A battery state of health estimation method

By constructing the TCN-DBO-GRU-Attention model and combining the dung beetle optimization algorithm and attention mechanism, health factors are extracted from historical battery data, solving the accuracy problem of battery SOH estimation and achieving accurate prediction of battery performance and ensuring system safety and stability.

CN120722212BActive Publication Date: 2025-11-11SHENYANG SHUNYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511187089.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-11-11
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately estimate the health status of batteries, leading to a decline in battery performance during use and affecting system safety and stability.

Method used

By extracting seven health factors, a TCN-DBO-GRU-Attention model was constructed. Combined with the dung beetle optimization algorithm and attention mechanism, battery SOH estimation was performed, which is applicable to different battery models.

Benefits of technology

It achieves accurate estimation of battery SOH, with good accuracy and universality, and is applicable to different battery models. It solves the problem of insufficient adaptability to nonlinear fluctuations and local anomalies during battery degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120722212B_ABST
    Figure CN120722212B_ABST
Patent Text Reader

Abstract

This invention relates to the field of battery testing technology, and particularly to a method for estimating the state of health (SOH) of a battery, comprising: S1, acquiring historical battery data, including historical voltage, current, temperature, and capacity data; S2, extracting health factors by analyzing the historical battery data to obtain SOH data and extracting health factors closely related to SOH; S3, processing the health factors and capacity data; S4, establishing an estimation model by using the dung beetle optimization algorithm to optimize the hyperparameters of the gated recurrent unit and then introducing an attention mechanism to establish a TCN-DBO-GRU-Attention model as the estimation model; S5, model training; and S6, model validation and result evaluation. This method can accurately estimate the SOH of a battery, is applicable to different battery models, and has good accuracy and universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery testing technology, and in particular to a method for estimating battery health status. Background Technology

[0002] Batteries, with their advantages of long cycle life, no memory effect, and high energy and power density, are widely used in smart electronic devices, new energy vehicles, and aerospace. However, in actual use, battery performance gradually decreases due to the irreversible degradation of electrochemical reactions, affecting system performance and potentially causing safety issues. The battery's state of health (SOH) is a core indicator of the battery management system, and its accurate estimation is crucial for early warning, reducing failure risks, and ensuring safe system operation. With increased usage and the influence of factors such as charge / discharge cycles, rates, and depths, batteries inevitably age, and their SOH gradually declines. When it drops to a certain threshold, it may jeopardize normal equipment operation, causing economic losses and safety risks. Therefore, timely assessment of the battery's SOH is critical to ensuring its safety and stability in various applications. Currently, SOH estimation methods are mainly divided into two categories: data-driven and model-driven, each with its own advantages, aiming to improve the overall efficiency and safety of battery management systems. Summary of the Invention

[0003] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a battery health state estimation method. By extracting 7 health factors and constructing a TCN-DBO-GRU-Attention model, it can accurately estimate the battery SOH, is applicable to different battery models, and has good accuracy and universality.

[0004] To achieve the above objectives, the main technical solutions adopted by the present invention include:

[0005] A battery health state estimation method includes the following steps:

[0006] Step S1: Obtain historical battery data, which includes historical voltage, current, temperature, and capacity data.

[0007] Step S2: Health Factor Extraction. Seven health factors (HIs) are extracted from the battery historical data in four dimensions: discharge current, voltage, temperature, and energy. These are then analyzed to obtain SOH data, and health factors closely related to SOH are extracted.

[0008] Step S3: Data processing, which involves processing the health factor and volume data, including normalization and correlation analysis.

[0009] Step S4: Establish an estimation model. After optimizing the hyperparameters of the gated recurrent unit using the dung beetle optimization algorithm, an attention mechanism is introduced to establish a TCN-DBO-GRU-Attention model as the estimation model. The attention mechanism is a single-head dot product attention mechanism layer.

[0010] Step S5: Model training. The SOH data obtained in step S2 and the data processed in step S3 are divided into a test set and a training set. The TCN-DBO-GRU-Attention model is trained using the training set.

[0011] Step S6: Model validation and result evaluation. The trained model is tested using a test set, and the evaluation results are output.

[0012] Furthermore, the indirect health factors HIs in step S2 are specifically as follows:

[0013] (1) Constant current discharge time T CC :

[0014] ;

[0015] (2) Current integral Q during constant current discharge:

[0016] ;

[0017] (3) The time t for the discharge voltage to reach its lowest point vmin :

[0018] ;

[0019] (4) Discharge time t of equal voltage drop 4V-3V :

[0020] ;

[0021] (5) Voltage integral V during constant current discharge CC :

[0022] ;

[0023] (6) Time t for the discharge temperature to reach its peak peak :

[0024] ;

[0025] (7) Total energy E during discharge time CC :

[0026] ;

[0027] Among them, t i_start and ti_end t represents the start and end times of the constant current discharge phase, respectively. start and t end These represent the start and end times of battery discharge, t. 3V It is the moment when the voltage reaches 3V, t 4V The voltage reaches 4V at this moment. I(t) is the current that changes with time, V(t) is the voltage that changes with time, T(t) is the temperature that changes with time, and the power P(t) is the instantaneous product of voltage and current, representing the energy conversion rate at a certain moment.

[0028] Furthermore, step S4 includes the following steps:

[0029] Step S41: Establish the TCN network;

[0030] Step S42: Introduce the GRU network;

[0031] Step S43: The dung beetle optimization algorithm optimizes the hyperparameters of the gated loop unit;

[0032] Step S44: Introduce a single-head dot product attention mechanism layer.

[0033] Furthermore, in step S42, the TCN network introduces dilated convolution, and the calculation formula for the dilated causal convolution with the introduced dilation factor is as follows:

[0034] ;

[0035] Where t represents the time point corresponding to the output feature, k represents the index of the element within the convolution kernel, K represents the kernel length, and d is the dilation factor. When d=1, the dilated causal convolution degenerates into a regular causal convolution. However, when d grows exponentially (e.g., 1, 2, 4, 8…), the model can cover a longer time span with fewer layers, improving the ability to model long-range dependency information. t-d·k This represents the value of the input sequence at time point td·k.

[0036] Furthermore, the TCN network employs residual connections. In each convolutional layer, the input data, after undergoing convolution and nonlinear transformation, is added to the original input through skip connections to form a residual mapping.

[0037] Furthermore, the hyperparameter optimization of the gated loop unit by the dung beetle optimization algorithm in step S43 includes the following steps:

[0038] Step S431: Initialize the dung beetle population and DBO parameters, with each dung beetle representing a set of GRU hyperparameter combinations;

[0039] Step S432: Calculate the fitness of each individual in the population. Fitness is defined as the mean squared error of the loss function of the GRU model on the test set. Apply the hyperparameter combination represented by each dung beetle to the GRU model, train the model and calculate its mean squared error of the loss function on the validation set, which is used as the fitness of that dung beetle.

[0040] Step S433: Update the position of the dung beetle;

[0041] Step S434: Update the location of the dung beetle;

[0042] Step S435: Update the location of the dung beetle;

[0043] Step S436: Update the fitness of each individual in the population, and recalculate the fitness of each dung beetle according to step S432 to evaluate the merits of the new hyperparameter combination;

[0044] Step S437: Check if the termination condition is met. If the condition is met, output the optimal hyperparameter combination; otherwise, return to step S433 to continue iterative optimization.

[0045] Step S438: Output the optimal parameters. Apply the found optimal hyperparameter combination to the GRU model for final training and testing to evaluate the model's performance.

[0046] Furthermore, in step S44, an attention mechanism layer is introduced. By constructing the correlation between the query vector q, the key vector k, and the value vector v, a weight distribution is generated and the information is aggregated in a weighted manner. For the hidden state representation {h1, h2, ..., h...} of the input sequence... T The attention score at each time step is generated through a dot product operation:

[0047] ;

[0048] Where q is the query vector for the current task, and k t Let h be the key vector at time step t. The two vectors are transformed from the hidden state h by a linear transformation. t Obtained by mapping;

[0049] The attention score is normalized using the Softmax function, transforming it into a probability distribution:

[0050] ;

[0051] Normalized weights α t This indicates the degree of attention the model pays to time step t;

[0052] Weight α t Acting on value vector v t The context vector c is generated by weighted summation:

[0053] ;

[0054] Wherein, the value vector v t From hidden state h t Obtained through linear transformation; the entire process is represented as:

[0055] ;

[0056] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, which are extracted from the input sequence through linear transformation.

[0057] The beneficial effects of this invention are:

[0058] This invention discloses a battery state of health estimation method. It extracts health factors and capacity from historical discharge data and performs normalization processing. Seven health factors are extracted from four dimensions: current, voltage, temperature, and energy. Correlation analysis is performed using Pearson and Spearman correlation coefficients. A TCN-DBO-GRU-Attention model is constructed. This model extracts long-cycle features of charge-discharge cycles through a temporal convolutional network and combines the enhanced sequence modeling capability of gated recurrent units optimized by the dung beetle optimization algorithm to capture the sequential degradation patterns during battery capacity decay. Furthermore, it utilizes an attention mechanism to focus on key features, effectively solving the problem of insufficient adaptability to nonlinear fluctuations and local anomalies during battery degradation. Therefore, this invention can accurately estimate battery state of health (SOH), is applicable to different battery models, and has good accuracy and universality. Attached Figure Description

[0059] Figure 1 This is a flowchart of a battery health state estimation method according to the present invention;

[0060] Figure 2 This is the capacity decay curve;

[0061] Figure 3 Discharge current curves under different discharge cycles;

[0062] Figure 4 Discharge voltage curves under different discharge cycles;

[0063] Figure 5 Discharge temperature curves under different discharge cycles;

[0064] Figure 6 Normalized health factors and capacity curves;

[0065] Figure 7 This is a flowchart of the DBO-GRU algorithm. Detailed Implementation

[0066] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] A battery health state estimation method includes the following steps:

[0068] Step S1: Obtain historical battery data, which includes historical voltage, current, temperature, and capacity data.

[0069] Step S2: Health Factor Extraction. Seven health factors (HIs) are extracted from the battery historical data in four dimensions: discharge current, voltage, temperature, and energy. These are then analyzed to obtain SOH data, and health factors closely related to SOH are extracted.

[0070] Step S3: Data processing, which involves processing the health factor and volume data, including normalization and correlation analysis.

[0071] Step S4: Establish an estimation model. After optimizing the hyperparameters of the gated recurrent unit using the dung beetle optimization algorithm, an attention mechanism is introduced to establish a TCN-DBO-GRU-Attention model as the estimation model. The attention mechanism is a single-head dot product attention mechanism layer.

[0072] Step S5: Model training. The SOH data obtained in step S2 and the data processed in step S3 are divided into a test set and a training set. The TCN-DBO-GRU-Attention model is trained using the training set.

[0073] Step S6: Model validation and result evaluation. The trained model is tested using a test set, and the evaluation results are output.

[0074] The following is combined with Figure 1 The flowchart shown illustrates each step of the above method.

[0075] Step S1: Obtain historical battery data, which includes historical voltage, current, temperature, and capacity data.

[0076] Specifically, the battery historical data described in step S1 is obtained under different discharge cycles. Taking the three battery groups B0005, B0006, and B0007 from the NASA battery public dataset as examples, Figures 2-5 The capacity decay curve and the discharge current, voltage and temperature curves under different discharge cycles are shown.

[0077] Step S2: Health factor extraction. Analyze the battery's historical data to obtain SOH data and extract health factors closely related to SOH.

[0078] Specifically, step S2 includes the following steps:

[0079] Step S21: Extract the current maximum allowable discharge capacity of the battery and convert it into battery health state data. SOH represents the battery health state, which is generally expressed as a percentage of the battery's state from the beginning to the end of its lifespan. It quantitatively describes the current performance state of the battery. The battery health state is defined based on the capacity as follows:

[0080] ;

[0081] Among them, C t C0 represents the battery's current maximum allowable discharge capacity under the current cycle, while C0 represents the battery's nominal capacity.

[0082] Step S22: Construct indirect health factors HIs that are closely related to the battery's SOH. The specific indirect health factors HIs are as follows:

[0083] (1) Constant current discharge time T CC :

[0084] ;

[0085] (2) Current integral Q during constant current discharge:

[0086] ;

[0087] (3) The time t for the discharge voltage to reach its lowest point vmin :

[0088] ;

[0089] (4) Discharge time t under constant voltage drop 4V-3V :

[0090] ;

[0091] (5) Voltage integral V during constant current discharge CC :

[0092] ;

[0093] (6) Time t for the discharge temperature to reach its peak peak :

[0094] ;

[0095] (7) Total energy E during discharge time CC :

[0096] ;

[0097] Among them, t i_start and t i_end t represents the start and end times of the constant current discharge phase, respectively. start and t end These represent the start and end times of battery discharge, t. 3V It is the moment when the voltage reaches 3V, t 4V The voltage reaches 4V at this moment. I(t) is the current that changes with time, V(t) is the voltage that changes with time, T(t) is the temperature that changes with time, and the power P(t) is the instantaneous product of voltage and current, representing the energy conversion rate at a certain moment.

[0098] Step S3: Data processing, which involves processing the health factor and volume data, including normalization and correlation analysis.

[0099] Specifically, step S3 includes the following steps:

[0100] Step S31: Normalize the seven health factors obtained in step S2 using the Min-Max standardization method. By calculating the maximum and minimum values ​​in the historical data, each data point in the dataset is normalized to a value between 0 and 1, where 0 represents the minimum and 1 represents the maximum. Standardization not only makes the data easier to compare and analyze but also better preserves the original data structure. The standardization formula is:

[0101] ;

[0102] Among them, X norm X represents the normalized data value, where X is the historical data value. min X is the minimum value in the dataset. max It is the maximum value in the dataset. Through this formula, all 7 health factors are linearly mapped to the interval [0,1] and are denoted as HI1-HI7 in sequence, as shown in Table 1.

[0103] Table 1 is a summary table of health factors:

[0104] .

[0105] Step S32: Correlation analysis. The Pearson correlation coefficient and Spearman correlation coefficient were used to test the correlation between health factors and SOH. The formulas are as follows:

[0106] ;

[0107] ;

[0108] Where, r p r s These are the Pearson correlation coefficient and the Spearman correlation coefficient values, x i and y i For comparing sequences, and Let n be the mean of the rank data, and let n be the sequence length.

[0109] Normalized health factors and capacity curves, such as Figure 6 As shown in Tables 2 and 3, the Pearson and Spearman correlation coefficients between health factors and battery health status are presented.

[0110] Table 2 shows the Pearson correlation coefficients between health factors and battery health status:

[0111] .

[0112] Table 3 shows the Spearman correlation coefficients between health factors and battery health status:

[0113] .

[0114] Step S4: Establish an estimation model. After optimizing the hyperparameters of the gated recurrent unit using the dung beetle optimization algorithm, an attention mechanism is introduced to establish a TCN-DBO-GRU-Attention model as the estimation model. The attention mechanism is a single-head dot product attention mechanism layer.

[0115] This model extracts long-cycle features of charge-discharge cycles through a temporal convolutional network, enhances sequence modeling capabilities by combining gated recurrent units optimized by the dung beetle optimization algorithm, captures the sequence degradation patterns during battery capacity decay, and focuses on key features using an attention mechanism. This effectively solves the problem of insufficient adaptability to nonlinear fluctuations and local anomalies during battery degradation.

[0116] The specific steps for building the TCN-DBO-GRU-Attention model are as follows:

[0117] Step S41: Establish a TCN network, wherein the TCN network introduces dilated convolution and residual connections;

[0118] Temporal Convolutional Networks (TCNs) are a temporal modeling method based on one-dimensional convolutional neural networks. Compared to traditional recurrent neural networks and their variants, TCNs have advantages such as strong parallel computing capabilities and superior long-term dependency capture capabilities. TCNs introduce dilated convolutions and residual connections into the traditional one-dimensional causal convolution to enhance the model's feature extraction capabilities and expand its receptive field.

[0119] Causal convolution is a unidirectional convolution operation suitable for time series data. It ensures that each position in the output sequence depends only on the data at that position and before it in the input sequence, which is consistent with the characteristics of time series data. Let the input sequence be X={x1,x2,...,x...} T The formula for calculating causal convolution is:

[0120] ;

[0121] Where t represents the time point corresponding to the output feature, k represents the index of the element within the convolution kernel, K represents the length of the convolution kernel, and w k The weights of the convolution kernel, x t-k This represents the value of the input sequence at time point tk.

[0122] Expanded causal convolution, by introducing a dilation factor, can enlarge the receptive field and capture long-term dependency information. The formula for calculating expanded causal convolution is as follows:

[0123] ;

[0124] Where t represents the time point corresponding to the output feature, k represents the index of the element within the convolution kernel, K represents the kernel length, and d is the dilation factor. When d=1, the dilated causal convolution degenerates into a regular causal convolution. However, when d grows exponentially (e.g., 1, 2, 4, 8…), the model can cover a longer time span with fewer layers, improving the ability to model long-range dependency information. t-d·k This represents the value of the input sequence at time point td·k.

[0125] Furthermore, TCN employs residual connections to enhance information flow and improve the trainability and stability of the model. In each convolutional layer, the input data undergoes convolution and nonlinear transformation, and is then added to the original input through skip connections to form a residual mapping. This design allows gradients to propagate directly in the network, effectively mitigating the gradient vanishing problem and improving the model's parallel computing capabilities.

[0126] Step S42: Introduce the GRU network;

[0127] A Gated Recurrent Unit (GRU) is a variant of a recurrent neural network that addresses the vanishing and exploding gradient problems of traditional recurrent neural networks by introducing a "gating mechanism," enabling it to better capture long-term dependencies in sequential data. GRU controls the flow of information through reset and update gates, avoiding the information loss problem inherent in traditional recurrent neural networks.

[0128] Update Gate Z t The formula for determining the degree to which the current hidden state retains the memory from the previous moment is:

[0129] ;

[0130] Among them, W z To update the gate weight matrix, b z To update the bias term of the gate, σ is the sigmoid activation function, x t h is the input at the current moment. t-1 This is the hidden state from the previous time step.

[0131] Reset door r t The formula for controlling the degree of forgetting of memories from the previous moment is:

[0132] ;

[0133] Among them, W r To reset the weight matrix of the gate, b r To reset the door's bias.

[0134] Candidate hidden state It is generated by a weighted combination of the hidden state from the previous time step and the current input:

[0135] ;

[0136] Where tanh is the hyperbolic tangent activation function, W h Let b be the weight matrix of the candidate hidden states. h The bias term for the candidate hidden state.

[0137] Final hidden state h t Determined by both the update gate and the candidate hidden state:

[0138] ;

[0139] Among them, update gate z t The hidden state h from the previous moment has been controlled. t-1 and the current candidate state The weighted average.

[0140] In this way, GRU dynamically adjusts its dependence on information at different time steps.

[0141] Step S43: The dung beetle optimization algorithm optimizes the hyperparameters of the gated recurrent unit, such as... Figure 7 As shown, it includes the following steps:

[0142] Step S431: Initialize the dung beetle population and DBO parameters;

[0143] In the DBO algorithm, the initialization of the dung beetle population is the starting point of the optimization process. Each dung beetle represents a set of hyperparameter combinations of GRU: learning rate and number of hidden layer neurons. When initializing the population, these hyperparameters are randomly generated within a predefined range.

[0144] Step S432: Calculate the fitness of each individual in the population;

[0145] The fitness function is used to evaluate the performance of each hyperparameter combination. When optimizing GRU parameters, fitness is defined as the mean squared error (MSE) of the GRU model's loss function on the test set.

[0146] ;

[0147] Among them, y i It is the actual value. is the predicted value, and n is the number of samples. The hyperparameter combination represented by each dung beetle is applied to the GRU model, the model is trained, and its MSE on the validation set is calculated as the fitness of that dung beetle.

[0148] Step S433: Update the position of the dung beetle;

[0149] Simulating the behavior of the rolling dung beetle, we explore new combinations of hyperparameters by rolling the ball, using the formula:

[0150] ;

[0151] Where, x i (t) represents the position of the i-th dung beetle in the t-th iteration, k is the deflection coefficient, α is the natural coefficient (assigned a value of -1 or 1), and x w The worst position is represented by Δx, which is used to simulate changes in light intensity. The position of the dung beetle is updated according to the above formula to explore new combinations of hyperparameters.

[0152] Step S434: Update the location of the dung beetle;

[0153] Simulating the local exploration behavior of dung beetles, we apply local perturbations to the current optimal hyperparameter combination to discover a better solution, using the formula:

[0154] ;

[0155] Where θ is the deflection angle, ranging from [0, π]. The position of the dung beetle is updated according to the above formula, and a local search is performed.

[0156] Step S435: Update the location of the dung beetle;

[0157] Simulating the behavior of dung beetles stealing, some dung beetles are made to move directly towards the position of the current best dung beetle, achieving a global jump, using the formula:

[0158] ;

[0159] Where g is a random vector following a normal distribution, and X b S is the position vector of the dung beetle individual with the best fitness in the current population, and S is a constant.

[0160] Step S436: Update the fitness of each individual in the population;

[0161] After updating the location, the fitness of each dung beetle is recalculated according to step S432 to evaluate the merits of the new hyperparameter combination.

[0162] Step S437: Check if the termination condition is met;

[0163] Set termination conditions, such as reaching the maximum number of iterations or the fitness meeting the error requirements, to determine whether to stop the optimization process;

[0164] Check if the maximum number of iterations or other termination conditions have been reached. If the conditions are met, output the optimal combination of hyperparameters.

[0165] Otherwise, return to step S433 to continue iterative optimization.

[0166] Step S438: Output the optimal parameters;

[0167] After multiple rounds of iterative optimization, the optimal combination of hyperparameters with the best fitness is output. The found optimal combination of hyperparameters is then applied to the GRU model for final training and testing to evaluate the model's performance.

[0168] Step S44: Introduce a single-head dot product attention mechanism layer;

[0169] The attention mechanism generates a weight distribution and aggregates information by constructing the correlation between the query vector q, the key vector k, and the value vector v.

[0170] For the hidden state representation of the input sequence {h1, h2, ..., h...} T The attention score at each time step is generated through a dot product operation:

[0171] ;

[0172] Where q is the query vector for the current task, and k t Let h be the key vector at time step t. The two are typically transformed from the hidden state h using a linear transformation. t Obtained by mapping;

[0173] Next, the attention score is normalized using the Softmax function, transforming it into a probability distribution:

[0174] ;

[0175] Normalized weights α t This indicates the degree of attention the model pays to time step t.

[0176] Finally, the weight α t Acting on value vector v t The context vector c is generated by weighted summation:

[0177] ;

[0178] Wherein, the value vector v t From hidden state h t It is obtained through linear transformation. The context vector c incorporates global information from the input sequence and enhances the contribution of key time steps.

[0179] The entire process can be uniformly represented as:

[0180] ;

[0181] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, which are extracted from the input sequence through linear transformation.

[0182] An attention mechanism is applied to the output of the DBO-optimized GRU. By weighted summation of features at different time steps, a more representative and effective feature representation is generated, enabling the model to focus on key parts of the time series and improve the accuracy of health status estimation.

[0183] Step S5: Model training. The SOH data obtained in step S2 and the data processed in step S3 are divided into a test set and a training set. The TCN-DBO-GRU-Attention model is trained using the training set.

[0184] Specifically, step S5 includes the following steps:

[0185] Step S51: Construct the output of the SOH estimation model from the battery health state data transformed in step S21:

[0186] ;

[0187] Step S52: Use the normalized health factors obtained in step S31 as input to construct the SOH estimation model.

[0188] ;

[0189] Step S53: Correlation analysis;

[0190] Health factor data HI were analyzed using Pearson correlation coefficient and Spearman correlation coefficient. i The correlation between (i=1,2,…,7) and battery SOH data was analyzed, removing features with absolute correlation coefficients below 0.8 to avoid interference from low correlations. N (N≤7) indirect health factors with strong correlations to SOH were selected, and HI... i (i=1,2,…,7).

[0191] Step S54: Divide the test set and the training set;

[0192] The training and test sets are divided into ratios of 4:6, 5:5, and 6:4, respectively.

[0193] The specific steps for division include:

[0194] Step S541: Divide the training into groups;

[0195] Training set input: train_input;

[0196] Training set output: train_output;

[0197] Step S542: Divide the test set;

[0198] Test set input: test_input;

[0199] Test set output: test_output;

[0200] Step S55: Train the model constructed in step S4 using the training sets train_input and train_output, adjust the parameters until the expected result is achieved, and then save the model.

[0201] Step S6: Model validation and result evaluation. The trained model is tested using a test set, and the evaluation results are output.

[0202] The specific steps of step S6 include:

[0203] Step S61, Model Testing:

[0204] The model after parameter adjustment in step S55 is tested using the test sets test_input and test_output.

[0205] Step S62, Result Evaluation:

[0206] The root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) are used as the criteria for judging the accuracy of the SOH estimation results for lithium batteries, thus quantifying the model's precision. The evaluation metrics are shown in the following formula:

[0207] ;

[0208] ;

[0209] ;

[0210] Among them, y i For the true value, is the predicted value, and n is the total number of samples.

[0211] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for estimating battery health status, characterized in that, Includes the following steps: Step S1: Obtain historical battery data, which includes historical voltage, current, temperature, and capacity data. Step S2: Health Factor Extraction. Seven health factors (HIs) are extracted from the battery historical data in four dimensions: discharge current, voltage, temperature, and energy. These are then analyzed to obtain SOH data, and health factors closely related to SOH are extracted. Step S3: Data processing. The data of the seven health factors and volume are processed, including normalization and correlation analysis. Step S4: Establish an estimation model. After optimizing the hyperparameters of the gated recurrent unit using the dung beetle optimization algorithm, an attention mechanism is introduced to establish a TCN-DBO-GRU-Attention model as the estimation model. The attention mechanism is a single-head dot product attention mechanism layer. Step S5: Model training. The SOH data obtained in step S2 and the data processed in step S3 are divided into a test set and a training set. The TCN-DBO-GRU-Attention model is trained using the training set. Step S6: Model validation and result evaluation. The trained model is tested using a test set, and the evaluation results are output. The indirect health factors HIs in step S2 are specifically as follows: (1) Constant current discharge time T CC : ; (2) Current integral Q during constant current discharge: ; (3) The time t for the discharge voltage to reach its lowest point vmin : ; (4) Discharge time t under constant voltage drop 4V-3V : ; (5) Voltage integral V during constant current discharge CC : ; (6) Time t for the discharge temperature to reach its peak peak : ; (7) Total energy E during discharge time CC : ; Among them, t i_start and t i_end t represents the start and end times of the constant current discharge phase, respectively. start and t end These represent the start and end times of battery discharge, t. 3V It is the moment when the voltage reaches 3V, t 4V The voltage reaches 4V at this moment. I(t) is the current that changes with time, V(t) is the voltage that changes with time, T(t) is the temperature that changes with time, and the power P(t) is the instantaneous product of voltage and current, representing the energy conversion rate at a certain moment.

2. The battery health status estimation method as described in claim 1, characterized in that: Step S4 includes the following steps: Step S41: Establish the TCN network; Step S42: Introduce the GRU network; Step S43: The dung beetle optimization algorithm optimizes the hyperparameters of the gated loop unit; Step S44: Introduce a single-head dot product attention mechanism layer.

3. The battery health state estimation method as described in claim 2, characterized in that: In step S42, the TCN network introduces dilated convolution. The calculation formula for the dilated causal convolution with the introduced dilation factor is as follows: ; Where t represents the time point corresponding to the output feature, k represents the index of the element within the convolution kernel, K represents the kernel length, and d is the dilation factor. When d=1, the dilated causal convolution degenerates into a regular causal convolution, while when d grows exponentially, the model can cover a longer time span with fewer layers, improving the ability to model long-range dependency information. t-d·k This represents the value of the input sequence at time point td·k.

4. The battery health status estimation method as described in claim 3, characterized in that: The TCN network employs residual connections. In each convolutional layer, the input data undergoes convolution and nonlinear transformation, and is then added to the original input through skip connections to form a residual mapping.

5. The battery health status estimation method as described in claim 2, characterized in that: The dung beetle optimization algorithm for hyperparameter optimization of the gated loop unit in step S43 includes the following steps: Step S431: Initialize the dung beetle population and DBO parameters, with each dung beetle representing a set of GRU hyperparameter combinations; Step S432: Calculate the fitness of each individual in the population. Fitness is defined as the mean squared error of the loss function of the GRU model on the test set. Apply the hyperparameter combination represented by each dung beetle to the GRU model, train the model and calculate its mean squared error of the loss function on the validation set, which is used as the fitness of that dung beetle. Step S433: Update the position of the dung beetle; Step S434: Update the location of the dung beetle; Step S435: Update the location of the dung beetle; Step S436: Update the fitness of each individual in the population, and recalculate the fitness of each dung beetle according to step S432 to evaluate the merits of the new hyperparameter combination; Step S437: Check if the termination condition is met. If the condition is met, output the optimal hyperparameter combination; otherwise, return to step S433 to continue iterative optimization. Step S438: Output the optimal parameters. Apply the found optimal hyperparameter combination to the GRU model for final training and testing to evaluate the model's performance.

6. The battery health state estimation method as described in claim 2, characterized in that: In step S44, a single-headed dot product attention mechanism layer is introduced. By constructing the correlation between the query vector q, the key vector k, and the value vector v, a weight distribution is generated and the information is aggregated in a weighted manner. The hidden state representation of the input sequence is {h1, h2, ..., h...}. T The attention score at each time step is generated through a dot product operation: ; Where q is the query vector for the current task, and k t Let h be the key vector at time step t. The two vectors are transformed from the hidden state h by a linear transformation. t Obtained by mapping; The attention score is normalized using the Softmax function, transforming it into a probability distribution: ; Normalized weights α t This indicates the degree of attention the model pays to time step t; Weight α t Acting on value vector v t The context vector c is generated by weighted summation: ; Wherein, the value vector v t From hidden state h t Obtained through linear transformation; The entire process is represented as follows: ; Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, which are extracted from the input sequence through linear transformation.

Citation Information

Patent Citations

  • Battery health state estimation method and system based on time sequence characteristics

    CN116224071A

  • Lithium battery health state prediction method and system based on optimized time domain convolutional network

    CN117723997A