Transform-based lithium battery health state estimation method

By adopting a Transformer-based method in the estimation of the health status of lithium-ion batteries, combined with CEEMDAN decomposition and improved sparrow search algorithm, the problems of medium- and long-term dependence and gradient vanishing in the existing technology are solved, and a more efficient and accurate estimation of the health status of lithium-ion batteries is achieved.

CN119846485AActive Publication Date: 2025-04-18SOUTHWEAT UNIV OF SCI & TECH

Patent Information

Application Number
CN202510336833.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-04-18
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

The prior art has long-dependence problems in the estimation of the health status of lithium-ion batteries, making it difficult to capture long-distance information, has weak feature extraction capabilities, and is prone to the problem of gradient disappearance or explosion.

Method used

The lithium battery health status estimation method based on Transformer is adopted, and the lithium-ion battery aging data set is established, outlier processing and feature extraction is performed, and the eigenmodal functions of different frequencies are extracted using the CEEMDAN decomposition algorithm, and the eigenmodal function of different frequencies is improved by combining sin chaotic mapping, adaptive dynamic weighting factor and reverse learning-Caucy alternating strategy to improve the sparrow search algorithm, and optimize the Transformer model to estimate the health status of lithium-ion batteries.

Benefits of technology

The prediction accuracy of the model is improved, the error caused by noise is reduced, the convergence and robustness of the model is enhanced, and the time complexity of the algorithm is reduced, achieving a more accurate and stable estimation of the health status of lithium-ion batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119846485A_ABST
    Figure CN119846485A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of lithium ion battery state prediction, and particularly relates to a Transform-based lithium battery health state estimation method. Comprising the following steps: carrying out abnormal value processing and feature extraction on a battery aging data set to obtain feature factors; calculating the relevancy between the characteristic factors and the original capacity sequence of the lithium ion battery, and obtaining the characteristic factors meeting a preset relevancy threshold value; decomposing the original capacity sequence based on a completely adaptive noise set empirical mode decomposition algorithm to obtain intrinsic mode functions of different frequencies; combining sin chaotic mapping, an adaptive dynamic weight factor and a reverse learning-Cauchy alternate variation strategy to improve a sparrow search algorithm, and optimizing the trained Transform model by using the improved sparrow search algorithm to obtain a lithium ion battery health state estimation model; and estimating the health state of the lithium ion battery. The method can accurately estimate the health state, and facilitates the user to optimize the use of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of lithium-ion battery state prediction, and in particular relates to a lithium battery health state estimation method based on Transformer. Background Art

[0002] Among the many energy storage technologies, the battery energy storage system (BESS) market share has exceeded 30%, especially in grid-scale and distributed energy storage applications, this proportion continues to grow. Lithium-ion batteries are widely used in electric vehicle charging stations, renewable energy smoothing supply, grid frequency and voltage regulation, etc. due to their high energy density, long service life, fast charge and discharge capabilities, low self-discharge rate, and low maintenance costs. Lithium-ion batteries account for more than 80% of the global BESS market, becoming the mainstream choice.

[0003] At present, the commonly used lithium-ion battery SOH estimation methods mainly include two categories: model-based methods and data-driven methods. Model-based methods include electrochemical models, equivalent circuit models, etc., but these methods require the establishment of complex models and cannot fully capture the nonlinear behavior of the battery. Their estimation accuracy often depends on the accuracy of the model parameters. With the development of artificial intelligence technology, more and more scholars have begun to use data-driven methods to estimate battery SOH. This type of method does not require the construction of a physical model, but directly uses the battery's charging and discharging voltage, current and temperature data for learning. It can reveal the complex nonlinear relationship between SOH and characteristic factors, and has strong adaptability and high real-time performance. Data-driven methods usually include regression models, support vector machines (SVMs), extreme learning machines (ELMs), Bayesian networks, and neural networks. However, neural networks are prone to long-term dependency problems when processing long sequences and are difficult to capture long-distance information. Its feature extraction ability is relatively weak and may not be able to fully capture complex patterns and relationships. At the same time, neural networks may face the problem of gradient disappearance or explosion when expanding. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides a lithium battery health state estimation method based on Transformer. Accurate estimation of the health state (SOH) helps users optimize battery use and ensure the reliability and safety of the device during use.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A method for estimating the health status of a lithium battery based on Transformer, the method comprising:

[0007] Based on the basic structure and working characteristics of lithium-ion batteries, a lithium-ion battery aging data set is established;

[0008] Performing outlier processing and feature extraction on the lithium-ion battery aging data set to obtain characteristic factors;

[0009] Calculating the correlation between the characteristic factor and the original capacity sequence of the lithium-ion battery to obtain the characteristic factor that meets a preset correlation threshold;

[0010] Decomposing the original capacity sequence based on a fully adaptive noise set empirical mode decomposition algorithm to obtain intrinsic mode functions of different frequencies;

[0011] Taking the characteristic factors that meet the preset correlation threshold as the input sequence of the Transformer model, taking the intrinsic mode function as the prediction sequence of the transformer mode, and training the Transformer model;

[0012] The sparrow search algorithm is improved by combining sin chaotic mapping, adaptive dynamic weight factor and reverse learning-Cauchy alternating mutation strategy, and the trained Transformer model is optimized by the improved sparrow search algorithm to obtain the health state estimation model of lithium-ion batteries.

[0013] Based on the lithium-ion battery health state estimation model, the health state of the lithium-ion battery to be estimated is estimated to obtain a lithium-ion battery health state estimation value.

[0014] Optionally, methods for obtaining eigenmode functions of different frequencies include:

[0015] Add white noise to the original capacity sequence to obtain the noisy capacity sequence;

[0016] Performing empirical mode decomposition on the noisy capacity sequence to obtain a first intrinsic mode function;

[0017] The first intrinsic mode function is averaged to obtain the first mode component of the original capacity sequence after fully adaptive noise ensemble empirical mode decomposition;

[0018] Remove the first modal component in the original capacity sequence to obtain the first residual sequence;

[0019] Adding new white noise to the first residual sequence to obtain a noisy residual sequence;

[0020] Performing empirical mode decomposition on the noisy residual sequence to obtain a second mode component of the original capacity sequence;

[0021] Removing the second modal component from the first residual sequence to obtain a second residual sequence;

[0022] The modal components of the residual sequence are repeatedly extracted until the remaining residual sequence meets the preset requirements, and the intrinsic mode functions of different frequencies are obtained.

[0023] Optionally, the Transformer model includes an input block, an encoder, a decoder, and an output block; wherein the encoder and the decoder both include multiple stacked attention layers and feedforward networks, and the decoder also includes a masked multi-head attention layer.

[0024] Optionally, methods for improving the sparrow search algorithm include:

[0025] The population of the sparrow search algorithm is initialized based on the sin chaotic map with infinite mapping folding times, and the individual positions of the population after mapping are obtained;

[0026] Based on the preset fitness function, the population individuals are divided into discoverers and followers; the discoverer is used to explore the location of the global optimal solution, and the follower is used to perform local search around the discoverer;

[0027] Introduce adaptive dynamic weight factors to update the positions of discoverers and followers to obtain the current global optimal solution;

[0028] Based on the reverse learning-Cauchy alternating mutation strategy, the current global optimal solution is disturbed to obtain a new solution;

[0029] Based on the elitist principle, the fitness values ​​of the new solution and the position of the current global optimal solution are compared, and based on the fitness values, it is determined whether to update the position of the current global optimal solution.

[0030] Optionally, methods for obtaining the individual positions of the population after mapping include:

[0031] Generate a chaotic sequence based on the sin chaotic map with infinite mapping folding times:

[0032] ,

[0033] Linearly map the generated chaotic sequence to the search space:

[0034] ,

[0035] in, is a chaotic sequence, x n is a variable in the sin chaotic map, representing the nth value in the chaotic sequence. and are the lower and upper bounds of the search variable, The chaotic sequence values, is the individual position of the population after mapping.

[0036] Optionally, methods for introducing adaptive dynamic weight factors and updating the positions of discoverers and followers include:

[0037] Based on the adaptive dynamic weight factor and the global optimal solution generated in the iterative process of position update, the discoverer position is updated. The update formula is as follows:

[0038]

[0039] In the formula, Indicated in In the iteration The discoverer individual The location of the dimension; Indicates The global optimal solution in the iteration; is a random number that follows the normal distribution of [0,1], F is the warning value, S is the safety value; rand is a random generation function used to generate random numbers; is the adaptive dynamic weight factor; Indicates the maximum number of iterations;

[0040] Based on the discoverer's position and the current global worst individual, the follower's position is updated. The update formula is as follows:

[0041] ,

[0042] In the formula, Represents the current global worst individual; It is the location of the discoverer; Used to adjust the displacement direction; for A matrix in which each element is 1, and M is the total number of individuals in the sparrow search algorithm.

[0043] Optionally, the trained Transformer model is optimized using the improved sparrow search algorithm, including optimizing the number of attention mechanism heads, the initial learning rate, and the L2 regularization coefficient of the Transformer model.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1. CEEMDAN is used to decompose and remove high-frequency IMFs containing capacity regeneration noise, thereby ensuring that the feature sequence of the input model is cleaner. This noise removal mechanism improves the prediction accuracy of the model, reduces the error caused by noise, and effectively reduces the time complexity of the algorithm while keeping the spatial complexity unchanged, thereby enhancing the convergence and robustness of the model.

[0046] 2. The sin chaotic map is used to replace the randomly initialized population, which reduces the risk of the algorithm falling into the local optimal solution. The time-varying weight factor is introduced into the individual position update formula to expand the search range and achieve local precise development. The reverse learning-Cauchy mutation alternating mutation strategy balances the global exploration and local development capabilities, and uses the multi-strategy fusion SSA to optimize the parameter setting of the Transformer model, improve the model learning efficiency, enable it to adaptively find the optimal hyperparameter combination, and enhance the accuracy and stability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 This is a flow chart of a method for estimating the health status of a lithium battery based on Transformer according to an embodiment of the present invention;

[0049] Figure 2 This is a schematic diagram of the Transformer network architecture according to an embodiment of the present invention;

[0050] Figure 3 This is a flowchart of the overall algorithm framework of CEEMDAN-ISSA-Transformer according to an embodiment of the present invention;

[0051] Figure 4 The battery capacity change curve of CS2_35 in the embodiment of the present invention;

[0052] Figure 5 The voltage-current changes of the CS2_35 battery in the embodiment of the present invention at the initial cycle number; wherein (a) is the voltage change of CS2_35; (b) is the current change of CS2_35;

[0053] Figure 6 Schematic diagram of the change of HI1 to HI3 of the CS2_35 battery of the embodiment of the present invention as the battery ages; wherein (a) is the change of HI1 of the CS2 series battery as the battery ages; (b) is the change of HI2 of the CS2 series battery as the battery ages; (c) is the change of HI3 of the CS2 series battery as the battery ages;

[0054] Figure 7Schematic diagram of the result of time domain decomposition of the original capacity by CEEMDAN according to an embodiment of the present invention; wherein, (a) is the first mode function IMF1 of the original capacity signal of the CS2-35 battery; (b) is the first mode function IMF2 of the original capacity signal of the CS2-35 battery; (c) is the first mode function IMF3 of the original capacity signal of the CS2-35 battery; (d) is the first mode function IMF4 of the original capacity signal of the CS2-35 battery; (e) is the first mode function IMF5 of the original capacity signal of the CS2-35 battery; (f) is the first mode function IMF6 of the original capacity signal of the CS2-35 battery; (g) is the first mode function IMF7 of the original capacity signal of the CS2-35 battery; (h) is the first mode function IMF8 of the original capacity signal of the CS2-35 battery;

[0055] Figure 8 This is a schematic diagram of comparing the prediction results of a CS2-35 battery under four different models with a SOH reference value according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] State of Health (SOH) is a key indicator in battery management systems, measuring the reduction in the battery's ability to store and release power relative to a new battery. There are many ways to define SOH, the most commonly used of which is based on capacity, that is, the actual available capacity at the moment. With the initial capacity of the battery The specific expression is as follows:

[0059]

[0060] It is generally believed that when the battery capacity decays to 80% of the initial capacity, its life ends. Therefore, using advanced monitoring technology to accurately estimate SOH is of great significance for optimizing charging and discharging strategies, extending battery life, reducing maintenance costs, and improving user experience. How to quickly and accurately estimate the SOH of lithium-ion batteries is also a major challenge in the current energy storage system field.

[0061] Embodiment 1

[0062] like Figure 1 As shown, a method for estimating the health status of a lithium battery based on Transformer includes:

[0063] S1: Establish a lithium-ion battery aging dataset based on the basic structure and working characteristics of lithium-ion batteries;

[0064] S2: Perform outlier processing and feature extraction on the lithium-ion battery aging data set to obtain characteristic factors;

[0065] S3: Calculate the correlation between the characteristic factor and the original capacity sequence of the lithium-ion battery to obtain the characteristic factor that meets a preset correlation threshold;

[0066] S4: Decompose the original capacity sequence based on the fully adaptive noise ensemble empirical mode decomposition algorithm (CEEMDAN) to obtain the intrinsic mode functions of different frequencies. CEEMDAN is an improved EMD technology, which is often used to decompose nonlinear or non-stationary signals into several intrinsic mode functions of different frequencies with special significance and a residual signal, which effectively solves the problem of residual noise in EEMD.

[0067] A further implementation method is that the method for obtaining the eigenmode functions of different frequencies includes:

[0068] S41: Add white noise to the original capacity sequence to obtain a noisy capacity sequence; specifically, let the original capacity sequence be C(n), is the standard deviation of the adaptively decomposable Gaussian white noise, which is used to control the amplitude of the noise.

[0069] Add noise to the original capacity sequence C(n) to obtain the noisy capacity sequence:

[0070] ;

[0071] in represents a white noise sequence, Indicates Noise is added.

[0072] S42: performing empirical mode decomposition on the noisy capacity sequence to obtain the first intrinsic mode function;

[0073] S43: Averaging the first intrinsic mode function to obtain the first modal component of the original capacity sequence after fully adaptive noise set empirical mode decomposition; in this embodiment, averaging the first IMF obtained by all noise decompositions to obtain the first modal component of the original signal after CEEMDAN .

[0074] ; (2)

[0075] In the formula, Indicates the number of times noise is added; is the operator of the first mode in the classical EMD decomposition sequence.

[0076] S44: Remove the first modal component in the original capacity sequence to obtain the first residual sequence; specifically, in the original capacity sequence Remove the first modal component from , and get the first residual sequence :

[0077] ; (3)

[0078] S45: adding new white noise to the first residual sequence to obtain a noisy residual sequence; performing empirical mode decomposition on the noisy residual sequence to obtain a second modal component of the original capacity sequence; specifically, in the first residual sequence Add new white noise to generate multiple noise signals and perform classic EMD decomposition to obtain the second modal component of the original capacity sequence .

[0079] ; (4)

[0080] S46: removing the second modal component from the first residual sequence to obtain a second residual sequence; specifically, in the first residual sequence Remove the second modal component from , and get the second residual sequence :

[0081] ; (5)

[0082] S47: Repeatedly extract the modal components of the residual sequence until the remaining residual sequence meets the preset requirements, and obtain the intrinsic mode functions of different frequencies. Specifically, repeat the above steps to extract IMFs from the residual sequence one by one. represents the modes of different time scales in the sequence. When the remaining residual sequence When is a very small monotonic function, stop decomposing.

[0083] ; (6)

[0084] ; (7)

[0085] The original capacity sequence is decomposed into several IMF components and a residual sequence, as shown in formula (8).

[0086] ; (8)

[0087] S5: The characteristic factors that meet the preset correlation threshold are used as the input sequence of the Transformer model, and the intrinsic mode function is used as the prediction sequence of the transformer mode to train the Transformer model.

[0088] The Transformer model is different from the recurrent neural network (RNN) and the long short-term memory network (LSTM) in that it relies entirely on the attention mechanism instead of processing sequences through recursion.

[0089] A further implementation is that the Transformer model includes an input block, an encoder, a decoder and an output block; wherein the encoder and the decoder both include multiple stacked attention layers and feedforward networks, and the decoder also includes a masked multi-head attention layer for preventing the model from using future values ​​when predicting the next value.

[0090] The structure of the multi-head attention mechanism is as follows Figure 2 As shown in the dashed box, this is the core of the Transformer, which is used to capture the dependencies between different positions in the input sequence. The self-attention mechanism is completed through the query, key, and value vectors. Each element in the input sequence generates a set of Q, K, and V, and then the self-attention output is calculated by weighted summation.

[0091] ; (9)

[0092] in, is the query matrix, is the key matrix, is the value matrix, is a scaling factor used to alleviate the gradient disappearance, so that The input of the function is kept within a reasonable range.

[0093] Multi-head attention is an extension of the self-attention mechanism. It projects the input data onto multiple subspaces, applies the self-attention mechanism to each subspace, and finally merges the outputs of each subspace by linear transformation using equations (10) and (11).

[0094] ; (10)

[0095] ; (11)

[0096] In formula (10), , , is corresponding to , , The weight matrix of . It can be found that the output of each attention layer of the Transformer passes through a feed-forward neural network (FFN). The FFN consists of two fully connected layers with a ReLU activation function in the middle:

[0097] ; (12)

[0098] In formula (12), x represents the input vector, that is, the output of the attention layer in Transformer, W1 represents the weight matrix of the first fully connected layer, W2 represents the weight matrix of the second fully connected layer, b1 represents the bias term of the first fully connected layer, and b2 represents the bias term of the second fully connected layer.

[0099] The Transformer model itself does not have the ability to process information in sequence, so the Positional Encoding (PE) provides position information for each position in the input sequence. Positional encoding is generated using sine and cosine functions of different frequencies, allowing the model to understand the order information in the sequence. The PE formula is divided into position Even index of and odd indexes , the specific expression is shown in formula (13) and formula (14):

[0100] ; (13)

[0101] ; (14)

[0102] in, is the dimension index in the positional encoding, Represents the number of hidden units in the model. The positional encoding calculated in this way can add distinguishable positional information to the input vectors at different positions, which helps the transformer model understand the sequential relationship in the sequence without relying on the order of the input sequence.

[0103] S6: The sparrow search algorithm is improved by combining sin chaotic mapping, adaptive dynamic weight factor and reverse learning-Cauchy alternating mutation strategy, and the trained Transformer model is optimized using the improved sparrow search algorithm to obtain a lithium-ion battery health status estimation model.

[0104] SSA (Sparrow Search Algorithm) is an emerging meta-heuristic swarm intelligence optimization algorithm that achieves global optimization by simulating sparrows' foraging, early warning, and leadership behaviors. However, the original SSA may have shortcomings such as slow convergence, poor optimization ability, and premature convergence. To address these problems, this study proposes an improved SSA that uses sin chaotic mapping for population initialization, time-varying weights, and reverse learning-Cauchy alternating mutation multi-strategy fusion.

[0105] A further implementation method is that the method for improving the sparrow search algorithm includes:

[0106] S61: In the basic sparrow algorithm, a random method is used to initialize the population. If the initialization is too centralized or localized, the algorithm is likely to fall into a local optimum. The present invention initializes the population of the sparrow search algorithm based on the sin chaotic mapping with an infinite number of mapping folds, and obtains the individual positions of the population after mapping;

[0107] A further implementation method is that the method for obtaining the mapped individual positions of the population includes:

[0108] Generate a chaotic sequence based on the sin chaotic map with infinite mapping folding times:

[0109] ; (15)

[0110] Linearly map the generated chaotic sequence to the search space:

[0111] ; (16)

[0112] Among them, formula (15) is used to iteratively generate chaotic values, and then linearly map the generated series of chaotic values ​​into the search space through formula (16). is a chaotic sequence, x n is a variable in the sin chaotic map, representing the nth value in the chaotic sequence. and are the lower and upper bounds of the search variable, The chaotic sequence values, is the individual position of the population after mapping.

[0113] S62: Based on a preset fitness function, the population individuals are divided into discoverers and followers; wherein the discoverer is used to explore the finder of the location of the global optimal solution, and the followers are used to perform local search around the discoverer.

[0114] S63: In order to better balance the relationship between exploration and exploitation, an adaptive dynamic weight factor is introduced to update the positions of discoverers and followers to obtain the current global optimal solution.

[0115] A further implementation method is to introduce an adaptive dynamic weight factor, and the method for updating the positions of the discoverer and the follower includes:

[0116] Based on the adaptive dynamic weight factor and the global optimal solution generated in the iterative process of position update, the discoverer position is updated. The update formula is as follows:

[0117] ; (17)

[0118] ; (18)

[0119] In the formula, Indicated in In the iteration The discoverer individual The location of the dimension; Indicates The global optimal solution in the iteration; is a random number that follows the normal distribution of [0,1], F is the warning value, S is the safety value; rand is a random generation function used to generate random numbers; is the adaptive dynamic weight factor; represents the maximum number of iterations; as shown in formula (17), in the discoverer’s individual position update formula, the global optimal solution in the previous iteration is added When the warning value F is less than the safety value S, a wide search is performed; when the warning value F is greater than the safety value S, the search is transferred as soon as possible to avoid falling into the local optimum. At the same time, a time-varying weight coefficient is introduced ,It is beneficial to expand the search scope in the early stage of iteration, and to carry out precise development and accelerate the convergence speed in the later stage of iteration.

[0120] Based on the discoverer's position and the current global worst individual, the follower's position is updated. The update formula is as follows:

[0121] ; (19)

[0122] In the formula, Indicates the worst individual in the current global situation; It is the location of the discoverer; Used to adjust the displacement direction; for A matrix in which each element is 1, and M is the total number of individuals in the sparrow search algorithm.

[0123] S64: Based on the reverse learning-Cauchy alternating mutation strategy, the current global optimal solution is disturbed to obtain a new solution. In this embodiment, the core idea of ​​reverse learning is to consider the current solution and its reverse solution simultaneously based on symmetry, expand the search space, effectively avoid the local optimal trap, and finally select the optimal solution by comparing the two. The mathematical expressions are shown in equations (20)-(22):

[0124] ; (20)

[0125] ; (twenty one)

[0126] ; (twenty two)

[0127] In the formula, Represents element-wise multiplication (Hadamard product), that is, the corresponding elements of two vectors are multiplied.

[0128] The current optimal solution Relative to the lower bound Reverse mapping of the position and adding the random number matrix Balance the learning process. represents the upper bound, ensuring that the reverse solution is within a reasonable solution space. As a benchmark, calculate the difference between the current optimal solution and the reverse solution, and use information exchange to control the disturbance of the difference After scaling, superimpose it on the reverse solution to generate a new solution .

[0129] Standard SSA is prone to fall into local optimality during local development. As a method based on Cauchy distribution, CM strategy has a higher probability of generating large-scale mutations by introducing large-step random perturbations, enabling individuals to conduct large-scale searches and escape from local optimal solutions. Cauchy distribution exhibits zero-point symmetry, and the generated mutation direction can be positive or negative, ensuring the diversity of search directions.

[0130] ; (twenty three)

[0131] From the standard Cauchy distribution Get a random number, apply it to the current optimal solution, and generate a new solution Based on the long-tail characteristic of the Cauchy distribution, this new solution may be far away from the optimal solution, further enhancing the global search capability.

[0132] Reverse learning and Cauchy mutation dynamically update the target position under specific strategies: the reverse learning strategy focuses on expanding the search range to avoid being confined to a small area; while Cauchy mutation breaks through the local optimal solution through large-scale mutation. The alternating execution of the two can better balance local development and global exploration.

[0133] ; (twenty four)

[0134] In the initial stage, due to the large value of the exponential term, the dynamic adjustment factor It may be closer to a smaller number, thus promoting the global search of the algorithm. In the later stage of the algorithm, as the number of iterations increases, the influence of the exponential term gradually decreases, and the dynamic adjustment factor Gradually approaching a constant , thus gradually transitioning to local search. By controlling the exponential function, a smooth transition from global search to local search can be achieved, avoiding premature convergence. It is a dynamic adjustment parameter used to balance the global exploration and local development capabilities of the algorithm.

[0135] S65: Based on the elitist principle, compare the fitness value of the new solution with the current global optimal solution, and based on the fitness value, determine whether to update the location of the current global optimal solution. The formula is as follows:

[0136] ; (25)

[0137] A further implementation method is to use the improved sparrow search algorithm to optimize the trained Transformer model, including optimizing the number of attention mechanism heads, the initial learning rate, and the L2 regularization coefficient of the Transformer model.

[0138] The specific steps of optimizing the Transformer model using the improved sparrow algorithm include:

[0139] 1) Number of heads of the multi-head attention mechanism in Transformer , the initial learning rate And the L2 regularization coefficient This is very important for improving model performance. The present invention uses ISSA to adjust the hyperparameters , and Automatic optimization is performed. The specific implementation steps are as follows:

[0140] 2) Define the expression of the fitness function and use the sin chaotic map of formula (15) to initialize the population. The initialization process must comply with the reasonable range of hyperparameters.

[0141] 3) Calculate the fitness value of the individual, select a part of the individuals as "discoverers" according to the fitness value of the current individual, and update their positions according to formula (17), responsible for exploring the area where the global optimal solution is located. The remaining sparrow individuals are "followers", and update their positions according to formula (19), mainly responsible for local search around the discoverer.

[0142] 4) According to formula (24), dynamically select the reverse learning strategy and Cauchy mutation to perturb the global optimal solution: , use Cauchy mutation to perturb when updating individual positions to increase randomness and avoid falling into local optimality; if , generating reverse solutions for contemporary individuals, making the search space more comprehensive.

[0143] 5) According to the elite principle of formula (25), determine whether to update the location and fitness value of the global optimal solution.

[0144] 6) Determine whether the maximum number of iterations has been reached : If yes, assign the optimal hyperparameter combination to the transformer model; otherwise, return to step 2) to continue execution.

[0145] S7: Based on the lithium-ion battery health state estimation model, estimate the health state of the lithium-ion battery to be estimated to obtain a lithium-ion battery health state estimation value.

[0146] In this embodiment, the overall process of the CEEMDAN-ISSA-Transformer algorithm is as follows: Figure 3 As shown: First, the basic structure and working characteristics of lithium-ion batteries are analyzed and an aging data set is selected to extract features and process outliers in the aging process. Then, the Pearson correlation coefficient analysis is performed between the three extracted characteristic factors and the original capacity. There are different degrees of capacity regeneration in the process of battery capacity degradation, which will affect the estimation accuracy of the transformer prediction model. CEEMDAN is used to perform modal decomposition on the original capacity sequence. The finite number of IMFs decomposed correspond to the low, medium and high frequency components of the battery signal, which enhances the prediction model's recognition effect on the characteristic factors while removing high-frequency noise in the data. The characteristic factors are divided into 60% training sets and 40% test sets as the input sequence of the model, and IMFs are divided in the same proportion as the prediction columns of the model. The number of hyperparameter attention mechanisms in the prediction model is adjusted using the improved sparrow optimizer. , initial learning rate And the L2 regularization coefficient Automatic optimization is performed, and finally the outputs of the models are combined to obtain the SOH prediction value.

[0147] Embodiment 2

[0148] The present invention also provides a lithium battery health status estimation system based on Transformer, which is used to implement the method, including:

[0149] A data set construction module is used to build a lithium-ion battery aging data set based on the basic structure and working characteristics of lithium-ion batteries;

[0150] The feature extraction module is used to process outliers and extract features from the lithium-ion battery aging data set to obtain characteristic factors;

[0151] A correlation calculation module is used to calculate the correlation between the characteristic factor and the original capacity sequence of the lithium-ion battery to obtain the characteristic factor that meets a preset correlation threshold;

[0152] A mode decomposition module is used to decompose the original capacity sequence based on a fully adaptive noise set empirical mode decomposition algorithm to obtain the intrinsic mode functions of different frequencies;

[0153] A model training module is used to train the Transformer model by taking the characteristic factors that meet the preset correlation threshold as the input sequence of the Transformer model and taking the intrinsic mode function as the prediction sequence of the transformer mode;

[0154] The sparrow algorithm improvement module is used to improve the sparrow search algorithm by combining sin chaotic mapping, adaptive dynamic weight factor and reverse learning-Cauchy alternating mutation strategy, and use the improved sparrow search algorithm to optimize the trained Transformer model to obtain the health state estimation model of lithium-ion batteries;

[0155] The estimation module is used to estimate the health state of the lithium-ion battery to be estimated based on the lithium-ion battery health state estimation model to obtain the estimated value of the health state of the lithium-ion battery.

[0156] Embodiment 3

[0157] This embodiment provides an experimental process of a lithium battery health status estimation method based on Transformer.

[0158] Data source: This embodiment uses two battery aging experiment data sets, which are from the Center for Advanced Life Cycle Engineering (CALCE) of the University of Maryland and the Ames Research Center of NASA. The specific models of the selected 7 batteries are CS2_33, CS2_35, CS2_36, CS2_37 in the CALCE data set, and B0005, B0006 and B0007 in the NASA data set. Table 1 shows the basic parameter specifications of the two types of batteries. The specific steps of the aging experiment are: the CS2 series batteries are charged at a constant current (CC) of 0.5C until the voltage reaches the charging cut-off voltage of 4.2V, and then switched to constant voltage (CV) charging until the charging current drops to 20mA, and then discharged to the cut-off voltage of 2.7V in CC mode. The cycle experiment is terminated when the rated capacity of the battery drops to 0.77Ahr. NASA batteries also use the CC-CV-CC charge and discharge mode to carry out aging experiments at room temperature of 24 degrees. The discharge cut-off voltages of B0005, B0006 and B0007 are 2.7V, 2.5V and 2.2V respectively. The cycle experiment is terminated when the rated capacity of the battery drops to 30% of its rated capacity, i.e. 1.4Ahr.

[0159] Table 1

[0160] Battery parameters CALCE_CS2 Design efficiency 1.1Ahr Rated voltage 3.7V Cathode material <![CDATA[LiCoO2]]> scale 5.4*33.6*50.6mm

[0161] Figure 4 The curve of the battery capacity of CS2_35 in the embodiment of the present invention with the number of cycles (CN) is shown. In general, the battery capacity shows a trend of slow decay with the increase of the number of cycles. When the battery capacity decays to 70% of the initial capacity, it becomes the "end of life (EOL)". In the local area, there is a phenomenon of short-term capacity regeneration in the process of battery capacity decline. This volatility increases the difficulty of subsequent SOH estimation and also affects the estimation accuracy.

[0162] Health index extraction (characteristic factors): A complete cycle experiment includes three main stages: constant current charging stage (CCCP), constant voltage charging stage (CVCP) and constant current discharge stage (CCDP). In order to analyze the current and voltage change trends of lithium-ion batteries during the aging process in detail, the voltage-current change curve of CS2_35 battery in a complete CC-CV-CC charge and discharge mode in the initial cycle stage was selected and plotted. Figure 5 As shown in (a) and (b), the battery aging process is closely related to these three stages.

[0163] Figure 6(a), (b) and (c) show the changes of HI1~HI3 of CS2_35 battery with battery aging. As the number of cycles increases, the available capacity gradually declines, and the constant voltage charging time (CVCT) and the number of cycles show a positive correlation; the further decline of battery capacity, the less power accepted by CCCP, the faster the voltage rises, and the CC-CV conversion point is reached earlier, and the constant current charging time (CCCT) and the number of cycles show a negative correlation; during the cycle of battery use, the capacity attenuation and Re increase are interrelated, forming a feedback loop between the two. Therefore, CVCT, CCCT and Re are finally used as health indicator 1 (HI1), health indicator 2 (HI2), and health indicator 3 (HI3), respectively.

[0164] In order to further verify the correlation between the health indicators extracted from each data set and the capacity degradation, the Pearson correlation coefficients of HI1~HI3 and the original capacity of the seven battery aging data sets are listed in Table 2. As can be seen from Table 2, the absolute values ​​of the Pearson coefficients corresponding to HI1 and HI3 are both greater than 0.8, indicating that HI1 and HI3 have a strong negative correlation with capacity decay; the Pearson coefficient of HI2 is greater than 0.95, indicating that HI2 has a high positive correlation with capacity decay.

[0165] Table 2

[0166] Battery parameters HI1 HI2 HI3 CS2_35 -0.865 0.987 -0.857

[0167] CEEMDAN modal decomposition: The extracted health characteristic factors HI1~HI3 are used as the input sequence of the prediction model, and the capacity decay curve during battery aging is decomposed using CEEMDAN technology. Unlike VMD, which requires a customized number of IMFs after decomposition, CEEMDAN only needs to determine three parameters: noise standard deviation, number of resamplings, and maximum number of iterations to effectively decompose the original signal. The noise standard deviation is used to control the intensity of the noise, and is usually selected as the ratio of the standard deviation of the white noise to the amplitude standard deviation of the original signal. The number of noise resamplings usually ranges from 100 to 500. Considering the complexity of the original signal, in order to ensure that the amount of calculation is not greatly increased while obtaining a more robust decomposition effect, the number of noise resamplings for the original capacity signals of the batteries of the CS2 series and NASA systems is set to 300 and 200 respectively. The maximum number of iterations is used to control the convergence of the decomposition. It is initially set to 200 and analyzes whether there is modal aliasing in the decomposed IMFs. After many experiments and debugging, under the condition of limited computing resources, the maximum number of iterations was reduced to reduce computing overhead, balance accuracy and efficiency, and finally the maximum number of iterations was set to 100.

[0168] Figure 7(a)-(h) show the decomposition results of the original capacity signal of the CS2_35 battery, and the capacity decay curve is decomposed into 8 IMFs. Overall, as the number of decomposition layers increases, the frequency of IMF1 to IMF8 gradually decreases. At the same time, IMF1 to IMF7 can effectively capture the local short-term capacity regeneration changes in the original signal, and IMF8 reflects the overall capacity decay trend during the aging process. High-frequency IMFs usually contain noise signals caused by capacity regeneration, and medium and low-frequency IMFs reflect the actual capacity decay trend more. Screen and eliminate high-frequency IMFs, remove the impact of short-term fluctuations in capacity regeneration, and obtain an effective capacity curve reflecting the long-term decay of the battery.

[0169] Commonly used algorithm evaluation indicators are: mean square error (MSE), mean absolute error (MAE), root mean square error (RMSE) and mean absolute percentage error. In this study, the input sequence of the model is divided into a training set and a test set. For the selection of the objective function, if RMSE is used only on the training set as the objective function, the model may overfit. In the prediction of lithium-ion battery SOH, more attention is paid to the performance of the model on unseen data. RMSE can significantly amplify the large deviation between the predicted value and the true value by summing the square of the error, and is highly sensitive to significant errors of the model. Therefore, the RMSE of the test set is finally selected as the objective function of the algorithm. Compared with other metrics such as MAE, RMSE pays more attention to the square of the error, which can increase the penalty for extreme values, while avoiding the optimization of the model only for the training set, and promoting the versatility of the model.

[0170] SOH estimation based on CEEMDAN-ISSA-Transformer model: Before the health indicator series is input into the model, we use 60% of the dataset as a training set and the remaining 40% for testing the model. Figure 8 The prediction results are compared with the SOH reference values. All four models can effectively track the overall trend of capacity decline during battery aging. Compared with the single Transformer model, the introduction of CEEMDAN significantly reduces the noise interference of capacity regeneration on SOH prediction. Compared with the CEEMDAN-Transformer model, the added SSA optimization algorithm enables the model to adaptively find the optimal hyperparameter combination, thereby improving learning efficiency. The multi-strategy improved SSA algorithm balances the capabilities of global search and local development, reducing the risk of falling into local optimal solutions. Therefore, the model proposed in the present invention can more accurately predict the SOH of the battery, and its RMSE, MAE and MAPE do not exceed 0.009820, 0.008545 and 1.367037% respectively, and the R² value is greater than 0.9609.

[0171] Accurate and real-time estimation of the state of health (SOH) of lithium-ion batteries is crucial to the normal operation of energy storage systems, especially in the context of the increasing popularity of renewable energy and electric transportation. This paper proposes a CEEMDAN-ISSA-Transformer model for lithium-ion battery SOH estimation, aiming to improve the efficiency and safety of energy storage systems. First, the battery health characteristic indicators are extracted from the original capacity decay data and used as the input sequence of the subsequent prediction model. Then, the CEEMDAN decomposition method is used to decompose the original capacity information into intrinsic mode functions (IMFs) at different frequencies, which effectively captures the nonlinear capacity regeneration phenomenon during battery aging. By eliminating high-frequency IMFs containing capacity regeneration noise, the medium and low-frequency IMFs are used as the prediction subsequences of the model and input into the ISSA-Transformer prediction model. Finally, the output subsequences of the model are superimposed and combined to obtain the final SOH prediction value.

[0172] In summary, the present invention has the following technical effects:

[0173] 1. CEEMDAN is used to decompose and remove high-frequency IMFs containing capacity regeneration noise, thereby ensuring that the feature sequence of the input model is cleaner. This noise removal mechanism improves the prediction accuracy of the model, reduces the error caused by noise, and effectively reduces the time complexity of the algorithm while keeping the spatial complexity unchanged, thereby enhancing the convergence and robustness of the model.

[0174] 2. The sin chaotic map is used to replace the randomly initialized population, which reduces the risk of the algorithm falling into the local optimal solution. The time-varying weight factor is introduced into the individual position update formula to expand the search range and achieve local precise development. The reverse learning-Cauchy mutation alternating mutation strategy balances the global exploration and local development capabilities, and uses the multi-strategy fusion SSA to optimize the parameter setting of the Transformer model, improve the model learning efficiency, enable it to adaptively find the optimal hyperparameter combination, and enhance the accuracy and stability of the prediction.

[0175] 3. The prediction results of the present invention are compared with the new algorithms published in recent years, which verifies the innovation and superiority of the model, especially its performance in complex energy storage application scenarios.

[0176] 4. By reducing the proportion of training set data, the robustness and stability of the proposed algorithm are tested to ensure its wide applicability in actual energy storage systems.

[0177] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A lithium battery health status estimation method based on Transformer, characterized in that: The method comprises: Based on the basic structure and working characteristics of lithium-ion batteries, a lithium-ion battery aging data set is established; Performing outlier processing and feature extraction on the lithium-ion battery aging data set to obtain characteristic factors; Calculating the correlation between the characteristic factor and the original capacity sequence of the lithium-ion battery to obtain the characteristic factor that meets a preset correlation threshold; Decomposing the original capacity sequence based on a fully adaptive noise set empirical mode decomposition algorithm to obtain intrinsic mode functions of different frequencies; Taking the characteristic factors that meet the preset correlation threshold as the input sequence of the Transformer model, taking the intrinsic mode function as the prediction sequence of the transformer mode, and training the Transformer model; The sparrow search algorithm is improved by combining sin chaotic mapping, adaptive dynamic weight factor and reverse learning-Cauchy alternating mutation strategy, and the trained Transformer model is optimized by the improved sparrow search algorithm to obtain the health state estimation model of lithium-ion batteries. Based on the lithium-ion battery health state estimation model, the health state of the lithium-ion battery to be estimated is estimated to obtain a lithium-ion battery health state estimation value.

2. The method for estimating the health status of a lithium battery based on Transformer according to claim 1, characterized in that: Methods for obtaining eigenmode functions of different frequencies include: Add white noise to the original capacity sequence to obtain the noisy capacity sequence; Performing empirical mode decomposition on the noisy capacity sequence to obtain a first intrinsic mode function; The first intrinsic mode function is averaged to obtain the first mode component of the original capacity sequence after fully adaptive noise ensemble empirical mode decomposition; Remove the first modal component in the original capacity sequence to obtain the first residual sequence; Adding new white noise to the first residual sequence to obtain a noisy residual sequence; Performing empirical mode decomposition on the noisy residual sequence to obtain a second mode component of the original capacity sequence; Removing the second modal component from the first residual sequence to obtain a second residual sequence; The modal components of the residual sequence are extracted repeatedly until the remaining residual sequence meets the preset requirements, and the intrinsic mode functions of different frequencies are obtained.

3. The method for estimating the health status of a lithium battery based on Transformer according to claim 1, characterized in that: The Transformer model includes an input block, an encoder, a decoder and an output block; wherein the encoder and the decoder both include multiple stacked attention layers and feedforward networks, and the decoder also includes a masked multi-head attention layer.

4. The method for estimating the health status of a lithium battery based on Transformer according to claim 1, characterized in that: Methods to improve the sparrow search algorithm include: The population of the sparrow search algorithm is initialized based on the sin chaotic map with infinite mapping folding times, and the individual positions of the population after mapping are obtained; Based on the preset fitness function, the population individuals are divided into discoverers and followers; the discoverer is used to explore the location of the global optimal solution, and the follower is used to perform local search around the discoverer; Introduce an adaptive dynamic weight factor to update the positions of discoverers and followers to obtain the current global optimal solution; Based on the reverse learning-Cauchy alternating mutation strategy, the current global optimal solution is disturbed to obtain a new solution; Based on the elitist principle, the fitness values ​​of the new solution and the position of the current global optimal solution are compared, and based on the fitness values, it is determined whether to update the position of the current global optimal solution.

5. The method for estimating the health status of a lithium battery based on Transformer according to claim 4, characterized in that: Methods for obtaining the individual positions of the population after mapping include: Generate a chaotic sequence based on the sin chaotic map with infinite mapping folding times: , Linearly map the generated chaotic sequence to the search space: , in, is a chaotic sequence, x n is a variable in the sin chaotic map, representing the nth value in the chaotic sequence. and are the lower and upper bounds of the search variable, The chaotic sequence values, is the individual position of the population after mapping.

6. The method for estimating the health status of a lithium battery based on Transformer according to claim 4, characterized in that: Methods for introducing adaptive dynamic weight factors and updating the positions of discoverers and followers include: Based on the adaptive dynamic weight factor and the global optimal solution generated in the iterative process of position update, the discoverer position is updated. The update formula is as follows: In the formula, Indicated in In the iteration The discoverer individual The location of the dimension; Indicates The global optimal solution in the iteration; is a random number that follows the normal distribution of [0,1], F is the warning value, S is the safety value; rand is a random generation function used to generate random numbers; is the adaptive dynamic weight factor; Indicates the maximum number of iterations; Based on the discoverer's position and the current global worst individual, the follower's position is updated. The update formula is as follows: , In the formula, Represents the current global worst individual; It is the location of the discoverer; Used to adjust the displacement direction; for A matrix in which each element is 1, and M is the total number of individuals in the sparrow search algorithm.

7. The method for estimating the health status of a lithium battery based on Transformer according to claim 4, characterized in that: Using the improved sparrow search algorithm to optimize the trained Transformer model includes optimizing the number of attention mechanism heads, initial learning rate, and L2 regularization coefficient of the Transformer model.

Citation Information

Patent Citations

  • Lithium ion battery state-of-health prediction method based on ISSA coupled DELM

    CN113884936A

  • Lithium ion battery health state estimation method based on trend perception attention and Transform encoder

    CN118731717A

  • Lithium battery remaining service life prediction method, device, equipment, medium and product

    CN118731720A

  • Lithium ion battery health state estimation method based on Bayesian optimization CNN-Transformer

    CN119104900A

  • Small sample regression prediction method for tunnel blasting effect

    CN119474644A

Cited By

  • Power battery health state prediction method and system, storage medium and equipment

    CN120559483A

  • A method, system, storage medium and device for predicting the health status of a power battery

    CN120559483B

  • Lithium ion battery capacity prediction method based on statistical characteristic evolution coding

    CN120742115A

  • Energy storage battery health state estimation method based on multi-feature fusion and Swin Transform model

    CN120993258A

  • Battery life prediction method based on pre-training model guided genetic programming

    CN121389835A