Lightweight lithium battery state of health estimation method based on l-tcn and gl-former
Patent Information
- Application Number
- CN202311686888.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-12-08
AI Technical Summary
然而目前还没有基于模型的方法能够准确地描述各种任务中的所有老化动态行为
[0043]本发明的有益效果在于:本发明提出了一个基于深度神经网络的轻量化框架来估计锂电池健康状态,该框架主要包括轻量化改进时间卷积网络(L-TCN)与全局局部Transformer(GL-Former)网络,分别用于时间和空间的特征提取。L-TCN与GL-Former都采用了分组策略,将相邻层之间的全连接减少到组内连接,从而实现了比普通TCN和Transformer更低的复杂度。此外,本发明采用了一种基于平面叠加的架构,该架构简单而有效,它解耦了时间和空间的特征提取模块,使得中间特征的压缩和缩减更加灵活。在简单叠加的同时,本发明还采用了最后一次压缩方案。该方案只保留L-TCN模块提取的时间特征的最后一个时间步长切片,从而减少了传递给后续模块的特征,只有极少量的信息丢失,但简单的平面叠加与最后一次压缩结合在一起极大地降低了网络模型的计算复杂度。从而实现轻量化的锂电池SOH在线估计与预测,具有较大的应用意义。
Smart Images

Figure CN117805651B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of new energy technology and relates to a lightweight lithium battery health status estimation method based on L-TCN and GL-Former. Background Technology
[0002] Lithium-ion batteries, due to their excellent charge-discharge capability, long lifespan, and absence of toxic or harmful substances, are known as green batteries and have been widely used in many important application areas, such as electric vehicles. For the safe, reliable, and economical use of lithium batteries, accurate and stable monitoring of their internal state is crucial for battery management systems. Lithium batteries are dynamic, time-varying electrochemical systems with nonlinear behavior and complex degradation mechanisms, resulting in significant differences in battery life under different operating conditions. With increasing charge-discharge cycles, the performance and lifespan of lithium-ion batteries gradually decline. The battery aging process is complex, and the internal chemical mechanisms are difficult to fully elucidate, making the prediction of remaining lithium battery life an extremely challenging task.
[0003] To address this challenge, researchers have proposed effective methods for predicting the State of Health (SOH) of lithium-ion batteries. These methods include model-based and data-driven approaches. Model-based methods primarily establish a mathematical model to describe the degradation trajectory based on battery kinetics, such as an electrochemical model or an equivalent circuit model. However, currently, no model-based method can accurately describe all aging dynamic behaviors across various tasks. Data-driven methods do not require analysis of the battery system's internal structure but rather extract hidden correlations from large amounts of data, predicting the SOH of lithium-ion batteries even without a mathematical model of the battery. Therefore, this method is widely used for SOH prediction of lithium-ion batteries, such as Support Vector Regression (SVR), Support Vector Machine (SVM), and Particle Filtering (PF). In recent years, neural network methods have also been increasingly applied to SOH estimation. This invention proposes a lightweight framework based on deep neural networks to estimate the state of health of lithium batteries. The framework mainly includes a lightweight improved temporal convolutional network (L-TCN) and a global local transformer (GL-Former) network, which are used for temporal and spatial feature extraction, respectively, achieving lower complexity than ordinary TCN and Transformer. At the same time, a simple and effective planar stacking architecture and a final compression scheme are adopted to optimize the overall network architecture. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method for estimating the state of health of lithium batteries based on an improved temporal convolutional network (L-TCN) and a global local transformer (GL-Former) architecture.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A lightweight lithium battery health estimation method based on L-TCN and GL-Former includes the following steps:
[0007] S1: Data Acquisition: Collect real lithium battery charging and discharging data through sensors, including discharge voltage, discharge current, battery body temperature and battery capacity;
[0008] S2: Establish a lightweight hybrid neural network model combining the improved temporal convolutional neural network L-TCN and the global-local Transformer architecture GL-Former to extract the temporal and spatial features of lithium battery data.
[0009] S3: Use a genetic algorithm to select the optimal model hyperparameters;
[0010] S4: Input the data from step S1 and the hyperparameters from step S3 into the hybrid neural network model for training to obtain a trained lithium battery health status estimation model, and then predict the battery health status based on the lithium battery health status estimation model.
[0011] Furthermore, in the lightweight improved temporal convolutional neural network L-TCN and the global-local Transformer architecture GL-Former hybrid neural network model described in step S2, the L-TCN module is first used to extract the temporal features of the lithium battery data, specifically including:
[0012] A grouping strategy is used to mitigate the impact of standard TCN; firstly, the input TCN feature map is divided into G... T A group of TCN layers with a grouping strategy consists of three consecutive, non-overlapping groups of equal size, and convolution is performed within each group. The result is as follows:
[0013]
[0014] Where K and δ are the kernel size and expansion rate, respectively. It is the feature map of the j-th input group, P represents the time dimension in the output, D is the embedding size, and concat(·) represents the concatenation operation;
[0015] A gating mechanism is used to determine the proportion of time information extracted by the shuffled TCN layer and that passes through the model. A lightweight TCN layer is represented as follows:
[0016] L-TCN(H)=tanh(SGTCN O (H|G T ))⊙σ(SGTCN g (H|GT ))
[0017] Among them, SGTCN O and SGTCN g These are two parallel shuffled TCN branches: SGTCN O SGTCN is used to extract temporal features. g The ratio used to control feature propagation is achieved through the sigmoid function σ(·), and the gating ratio is applied to each time feature element through element-wise multiplication ⊙.
[0018] Furthermore, in step S2, after extracting the time features of the lithium battery data using the L-TCN module, the time features are processed using a final compression scheme, specifically including:
[0019] This is the output characteristic of the b-th L-TCN layer, 1≤b≤L T , It is H b The final feature of this aggregation is the summation of the final features of all layers. The aggregated features H are then sent to an SE (squeeze and excitation) module for focusing on the feature representation:
[0020] H T =H·σ(W s2 ·ReLU(W s1 ·H o ))
[0021] in, It is achieved through global average pooling. It is the final time feature, given the reduction ratio r in the SE module, and The weight matrix is used to compress the representation, and then attention is generated using the sigmoid function σ(·) on the original aggregated features.
[0022] Furthermore, step S2 also includes: extracting spatial features of the lithium battery data using the GL-Former module, as detailed below:
[0023] A standard Transformer consists of a coding layer and Ls attention blocks. The Ls attention blocks are composed of global attention blocks and local attention blocks, and the number of the two is not necessarily the same.
[0024] Output generated using the last compression scheme For the input of this module, a positional encoding mechanism (PE) is introduced in the encoding layer to convert H... T Convert to learned positional encoding H PE:
[0025] H PE =H T +W PE
[0026] in, It is a learnable matrix for capturing identity information;
[0027] The generated encoding H PE The data is fed into sequential attention blocks, each consisting of a multi-head attention (MHA) layer and a feedforward network (FFN) layer; a grouping strategy is used to simplify the computation of the MHA and FFN layers in the attention blocks;
[0028] Using lightweight MHA (L-MHA), the input encoding H of L-MHA is first... PE Divided into G M Group, and then apply the original MHA to each group. The formula for calculating L-MHA is as follows:
[0029]
[0030]
[0031] Using a lightweight FFN (L-FFN), the input features are divided into G. F The calculation method for L-FFN is as follows:
[0032]
[0033]
[0034] A local attention block is employed, where the computation of local attention follows that of global attention. A mask function is applied to preserve relevant node pairs. If an element M[i,j] in the mask matrix is false, the mask function mask(Z,M) will hide an element Z[i,j] in the feature matrix Z, as follows:
[0035]
[0036] Set a hidden value of -∞, and obtain the mask matrix M by aggregating all relevant adjacency matrices of the domain, i.e., M = ∑ i A i A i It is one of the adjacency matrices, namely A i It is a sparse adjacency matrix threshold composed of filtering functions.
[0037] Furthermore, step S3 specifically includes the following steps:
[0038] S31: Select the population size and encode each individual in the population; each individual is composed of various hyperparameters of the neural network, and the hyperparameters are randomly selected within the range of values;
[0039] S32: Write a fitness function to decode the individual and use the hyperparameters obtained from the individual as the initial hyperparameters of the neural network; calculate the sum of the absolute errors between the predicted output and the actual output of the neural network model, and use this as the fitness value;
[0040] S33: Selection operation, using the roulette wheel method; take the reciprocal of the fitness value, the smaller the individual's fitness value, the greater the probability of being selected;
[0041] S34: Crossover operation, using real number crossover method, selects individuals according to crossover probability, and crosses chromosomes at any two positions of the selected individual and its neighboring individuals;
[0042] S35: Mutation operation, using uniform mutation, selecting mutated individuals by setting the mutation probability.
[0043] The beneficial effects of this invention are as follows: This invention proposes a lightweight framework based on deep neural networks for estimating the state of health (SOH) of lithium batteries. This framework mainly includes a lightweight improved temporal convolutional network (L-TCN) and a global-local transformer (GL-Former) network, used for temporal and spatial feature extraction, respectively. Both L-TCN and GL-Former employ a grouping strategy, reducing fully connected layers between adjacent layers to intra-group connections, thus achieving lower complexity than ordinary TCNs and Transformers. Furthermore, this invention adopts a planar stacking architecture, which is simple and effective. It decouples the temporal and spatial feature extraction modules, making the compression and reduction of intermediate features more flexible. In addition to simple stacking, this invention also employs a final compression scheme. This scheme only retains the last time-step slice of the temporal features extracted by the L-TCN module, thereby reducing the features passed to subsequent modules. Only a very small amount of information is lost, but the combination of simple planar stacking and final compression greatly reduces the computational complexity of the network model. This enables lightweight online estimation and prediction of the SOH of lithium batteries, which has significant application value.
[0044] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0045] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0046] Figure 1 This is a flowchart of the overall technical solution;
[0047] Figure 2 Diagram of an improved lightweight temporal convolutional neural network architecture;
[0048] Figure 3 This is a schematic diagram of the final compression scheme;
[0049] Figure 4 This is a diagram of the global and local Transformer network structure. Detailed Implementation
[0050] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0051] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0052] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0053] Please see Figures 1-4This invention provides a lithium battery health state estimation method based on an improved temporal convolutional network (L-TCN) and a global-local Transformer (GL-Former) architecture, with the specific design as follows:
[0054] 1. A general network architecture for optimizing lithium battery health status estimation
[0055] (1) Lightweight TCN based on shuffling grouping strategy
[0056] raw data of lithium batteries Embedded into the latent representation through the embedding module, i.e., the CNN layer. The output H of the embedded module is then passed through the TCN layer, as shown below:
[0057] TCN(H|δ,K)=H′
[0058]
[0059] Where H′ is the d-th output feature map of the i-th time series with time step t. is the d-th convolutional filter, where K and δ are the kernel size and dilation rate, respectively. Zero-padding is used in the input of each layer to maintain the temporal dimension in the output. The number of historical time steps used in the prediction.
[0060] Directly reducing the embedding size D decreases the model's representational power, resulting in lower accuracy than the standard. Therefore, a grouping strategy is used to lightweight the standard TCN. TCNs have redundant connections between adjacent TCN layers, which can be optimized. Specifically, standard TCN layers have complete connections between the input and output feature maps, while the grouping strategy first divides the input TCN feature map into G... T The TCN layers are composed of equal-sized, continuous, non-overlapping groups, and then convolution is performed within each group. A group of TCN layers with a grouping strategy is represented as follows:
[0061]
[0062] in, It is the feature map of the j-th input group, and concat(·) represents the concatenation operation.
[0063] A drawback of naive grouping strategies is the lack of information exchange between groups. Therefore, a shuffled grouping strategy is employed to support communication between feature map groups. For example... Figure 2As shown, shuffling the groups allows the group convolution to draw inputs from different groups, where one input feature map contributes to all groups. In implementation, it is stipulated that the number of feature maps in each input group is divisible by the number of output groups. Shuffling the groups enhances the naive grouping strategy in a simple and effective way, and achieves inter-group trust without increasing model complexity. The number of groups G... T It is a hyperparameter of the model structure that controls the balance between the lightweight nature of L-TCN and its ability to extract temporal feature information. High G T This can reduce the complexity of L-TCN, but it also reduces its capacity. Therefore, adjusting the appropriate G... T It is very important.
[0064] In summary, this invention employs a gating mechanism to determine the ratio of temporal information extracted by the shuffled TCN layer to that passed through the model. Therefore, an L-TCN layer is defined as follows:
[0065] L-TCN(H)=tanh(SGTCN O (H|G T ))⊙σ(SGTCN g (H|G T ))
[0066] Among them, SGTCN O and SGTCN g There are two parallel shuffled TCN branches: the former extracts temporal features, and the latter controls the proportion of feature propagation. The gating ratio is achieved through the sigmoid function σ(·), and applied to each temporal feature element through element-wise multiplication ⊙.
[0067] In summary, the L-TCN module reduces the time and space complexity of the standard TCN.
[0068] (2) Compression time characteristics using the last compression scheme
[0069] To further reduce computational complexity, a final compression scheme is adopted to reduce the input size of subsequent spatial modules. Figure 3 This is a schematic diagram of the final compression scheme. The features extracted from each L-TCN layer are summed to obtain an aggregated feature tensor of shape N×P×D with a time dimension of P, which is used for subsequent spatial feature extraction. If the temporal features extracted from each L-TCN layer can be compressed, the computational load of the subsequent spatial feature extraction module and the aggregated output module will be reduced.
[0070] The final compression retains only the features from the most recent time step as the output of each L-TCN layer. A potential issue is that this compression completely loses information from the previous P-1 time steps of the input feature map. However, because L-TCN stacks expanded convolutions, it ensures that the features from the last time step of each layer retain information from several recent input time steps within different ranges. Therefore, if only the features from the last time step of each L-TCN layer are aggregated, the model can still perceive the complete input, but focuses more on the most recent input time steps while performing higher compression on more distant input time steps.
[0071] It is the b-th (1≤b≤L) T Output characteristics of the L-TCN layer It is H b The final characteristic of the feature aggregation is to sum the final features of all layers. The aggregated features H are then sent to an SE (squeeze and excitation) module for attention feature representation:
[0072] H T =H·σ(W s2 ·ReLU(W s1 ·H o ))
[0073] in, It is achieved through global average pooling. This is the final time characteristic. Given the reduction ratio r in the SE module, and The weight matrix is used to compress the representation, and then attention is generated using the sigmoid function σ(·) on the original aggregated features.
[0074] Compared to the classic aggregation scheme with a feature size of N×P×D, the final compression achieves an N×D feature size, while reducing the time dimension from P to 1. Although the dimensionality is reduced, the final compression of L-TCN can still capture temporal features across all time steps. Therefore, the complexity of subsequent spatial feature extraction is effectively reduced.
[0075] (3) Global-Local Transformer Based on Grouping Strategy
[0076] Figure 4 This is a global-local Transformer network structure diagram. A standard Transformer consists of one encoding layer and Ls attention blocks. The input is generated by the last compression strategy. A positional encoding (PE) mechanism was introduced in the coding layer to encode H.T Convert to learned positional encoding H PE :
[0077] H PE =H T +W PE
[0078] in, It is a learnable matrix that captures identity information.
[0079] The resulting code H PE The input is fed into Ls sequential attention blocks, which include global attention and local attention, but the number of global attention and local attention blocks is not necessarily the same. For example, one global attention block can be followed by two local attention blocks. This alternation can prevent the loss of information from local attention.
[0080] Each attention block consists of a lightweight multi-head attention (L-MHA) layer and a feedforward network (L-FFN) layer.
[0081] The MHA layer is composed of h repeated self-focused modules pieced together in parallel:
[0082]
[0083] head i (H PE = softmax(H) I )·V i
[0084]
[0085] Q i =H PE ·W i Q ,K i =H PE ·W i K V i =H PE ·W i V
[0086] Among them, all learnable matrices Used to convert the embedding size from D to D / h. Each head i (·) is a self-attention module, and its input is... Generate attention scores. MHA provides powerful capabilities for encoding multiple relations.
[0087] Lightweight MHA (L-MHA) employs a grouping strategy similar to that proposed in L-TCN. First, the input encoding H of L-MHA is...PE Divided into G M Group, and then apply the original MHA to each group. The formula for calculating L-MHA is as follows:
[0088]
[0089]
[0090] Use the same number of multi-head attention for each partitioned group. The output size is The final output size of L-MHA is N×D, the same as that of standard MHA. However, the time and space complexity of L-MHA is significantly greater than that of standard MHA.
[0091] An FFN layer merges the output of the MHA layer. Nonlinear activation is achieved through two fully connected layers:
[0092] FFN (1) (H MHA ) = ReLU(H MHA ·W1+b1)
[0093] FFN(H MHA )=FFN (1) (H MHA )·W2+b2
[0094] in, These are learnable matrices and biases. The two layers first expand the embedding size from D to D′, which is typically four times D, and then scale it back to D.
[0095] Similarly, a lightweight FFN (L-FFN) was implemented, which partitions the input features into G. F Grouping. The grouping strategy is applied only to the second layer of the original FFN; the computation results of the first layer remain unchanged because the first layer has nonlinear activations. Therefore, the computation method of L-FFN is as follows:
[0096] FFN (1) (H MHA ) = ReLU(H MHA ·W1+b1)
[0097]
[0098]
[0099] The attention block described above is a global attention block, capable of capturing global scale spatial correlations among all data. While global attention blocks can provide powerful feature extraction capabilities, models that learn this complex information can be difficult to train. Therefore, a local attention block can be used to address this issue.
[0100] The computation of local attention follows the computation of global attention, except in the case of variable H. I A mask function is used in the calculation. Specifically, if the element M[i,j] of the mask matrix is false, the mask function mask(Z,M) will hide an element Z[i,j] in the feature matrix Z, as follows:
[0101]
[0102] One hidden value is set to -∞ because the hidden feature matrix is fed into a softmax(·) function. Furthermore, a domain may be associated with several adjacency matrices. In this case, we obtain the mask matrix M by aggregating all associated adjacency matrices of the domain, i.e., M = ∑ i A i A i It is one of the adjacency matrices. It is worth noting that A... i It is a sparse adjacency matrix threshold composed of filtering functions, which reduces the impact of noise and makes the model more robust.
[0103] Using the mask function, variable H I The calculation is as follows:
[0104]
[0105] (4) Lightweight SOH estimation framework based on simple stacked structure
[0106] Traditional SOH prediction architectures rely on temporal-space blocks, where temporal and spatial modules are stacked alternately. This alternating stacking pattern maintains an N×P×D feature size throughout the feature extraction process. However, the temporal dimension P is only considered in the temporal modules and ignored in the spatial modules, resulting in additional computational and storage overhead on the output of the spatial modules compared to the temporal modules. This research modifies the alternating stacking pattern by sequentially combining temporal and spatial modules, resulting in a conventional stacking scheme.
[0107] Temporal and spatial feature extraction are decoupled, enabling compression of the temporal dimension before applying more complex spatial modules. Furthermore, this architecture retains only the final features from the temporal and spatial feature extraction stages, rather than preserving features from all stacked temporal and spatial blocks in traditional architectures. Therefore, the conventional stacked architecture does not reduce the effectiveness of feature extraction but does reduce computational cost.
[0108] It is worth noting that this simple tiling structure does not reduce the effectiveness of feature extraction. There are two key reasons for this: 1) The final compression, combined with the proposed L-TCN, emphasizes features from the most recent time step and reduces noise in the feature map, thereby improving subsequent spatial feature extraction; 2) The proposed GL-Former addresses spatial correlations at both local and global scales. By considering the adjacency matrix in the attention block through a mask, GL-Former can capture prior knowledge of spatial correlations, which the standard Transformer cannot do, thus enhancing the ability to extract spatial features.
[0109] 2. A lithium battery health state estimation method based on lightweight improved temporal convolutional network and global-local Transformer architecture.
[0110] (1) Data acquisition: Real lithium battery charging and discharging data are acquired through sensors. This includes discharge voltage, discharge current, battery temperature, and battery capacity, and the data is preprocessed.
[0111] (2) Establish a hybrid architecture model based on L-TCN and GL-Former:
[0112] raw data of lithium batteries Embedded into the latent representation through the embedding module, i.e., the CNN layer. Temporal feature extraction is performed using an L-TCN module. The L-TCN layer based on the shuffling grouping strategy is as follows:
[0113] L-TCN(H)=tanh(SGTCN O (H|G T ))⊙σ(SGTCN g (H|G T ))
[0114] Among them, SGTCN O and SGTCN g There are two parallel shuffled TCN branches: the former extracts temporal features, and the latter controls the proportion of features passed. The gating ratio is achieved using the sigmoid function σ(·), and applied to each temporal feature element through element-wise multiplication ⊙. Number of groups G TIt is a hyperparameter of the model structure that controls the balance between the lightweight nature of L-TCN and its ability to extract temporal feature information.
[0115] It is the b-th (1≤b≤L) T To further reduce computational complexity, the output characteristics of the L-TCN layer are optimized using a final compression scheme. b Perform compression processing. It is H b The final feature of all layers is then aggregated. The aggregated features H are then sent to an SE module for attention-based feature representation:
[0116] H T =H·σ(W s2 ·ReLU(W s1 ·H o ))
[0117] in, It is achieved through global average pooling. This is the final time characteristic. Given the reduction ratio r in the SE module, and It is a weight matrix of compressed representation, and then attention is generated by using the sigmoid function σ(·) on the original aggregate features.
[0118] The GL-Former module includes an encoding layer and Ls attention blocks. The encoding layer is used to encode H... T Convert to learned positional encoding H PE ,in, It is a learnable matrix for capturing identity information:
[0119] H PE =H T +W PE
[0120] Then encode the position H PE The input is fed into Ls attention blocks, including global and local attention. The features generated by these Ls attention blocks are the final output of GL-Former, i.e., H. S Each attention block consists of a lightweight multi-head attention (L-MHA) layer and a feedforward network (L-FFN) layer.
[0121] First, the input encoding H of L-MHA is... PE Divided into G M Group, and then apply the original MHA to each group. (1≤j≤G MThe formula for calculating L-MHA is as follows:
[0122]
[0123]
[0124] Similarly, the formula for calculating L-FFN is as follows:
[0125] FFN (1) (H MHA ) = ReLU(H MHA ·W1+b1)
[0126]
[0127]
[0128] Configure the aggregated output module as two fully connected layers:
[0129]
[0130] For the prediction results, L represents the prediction dimension, and H... T and H S These are the last compression and the output features of GL-Former, respectively. and These are learnable weights and biases.
[0131] (3) Use a genetic algorithm to select the optimal network hyperparameters, input the data and hyperparameters into the model for training to find the optimal model;
[0132] (4) Battery health status prediction is performed based on the trained network model. Mean squared error (MSE) and root mean square error (RMSE) are used as the loss function and estimation accuracy, respectively, and are expressed as follows:
[0133]
[0134]
[0135] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it can implement the steps of the method. The storage medium may be, for example, ROM / RAM, magnetic disk, optical disk, etc.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A lightweight lithium battery health state estimation method based on L-TCN and GL-Former, characterized in that: Includes the following steps: S1: Data Acquisition: Collect real lithium battery charging and discharging data through sensors, including discharge voltage, discharge current, battery body temperature and battery capacity; S2: Establish a lightweight hybrid neural network model combining the improved temporal convolutional neural network L-TCN and the global-local Transformer architecture GL-Former to extract the temporal and spatial features of lithium battery data. S3: Use a genetic algorithm to select the optimal model hyperparameters; S4: Input the data from step S1 and the hyperparameters from step S3 into the hybrid neural network model for training to obtain a trained lithium battery health status estimation model, and then predict the battery health status based on the lithium battery health status estimation model. In step S2, the lightweight improved temporal convolutional neural network L-TCN and the global-local Transformer architecture GL-Former hybrid neural network model first uses the L-TCN module to extract the temporal features of the lithium battery data, specifically including: A grouping strategy is used to mitigate the impact of standard TCN; firstly, the input TCN feature map is divided into G... T A group of TCN layers with a grouping strategy consists of three consecutive, non-overlapping groups of equal size, and convolution is performed within each group. The result is as follows: Among them, K and These are kernel size and expansion rate, respectively. Let P be the feature map of the j-th input group, P represent the time dimension in the output, and D be the embedding size. Indicates a connection operation; A gating mechanism is used to determine the proportion of time information extracted by the shuffled TCN layer and that passes through the model. A lightweight TCN layer is represented as follows: in, and These are two parallel shuffled TCN branches: Used to extract time features Used to control the proportion of feature transfer; via the sigmoid function. A gating ratio is achieved and applied to each time feature element through element-wise multiplication ⊙. In step S2, after extracting the time features of the lithium battery data using the L-TCN module, the time features are processed using a final compression scheme, specifically including: This is the output characteristic of the b-th L-TCN layer. , yes The final feature of this aggregation is the summation of the final features of all layers. Then aggregate the features Send to an SE module for focusing on feature representations: in, It is achieved through global average pooling. It is the final time feature, given the reduction ratio r in the SE module, and The weight matrix is used to compress the representation, and then the sigmoid function is applied to the original aggregated features. Attention is drawn; Step S2 also includes: extracting spatial features of the lithium battery data using the GL-Former module, as detailed below: A standard Transformer consists of a coding layer and Ls attention blocks. The Ls attention blocks are composed of global attention blocks and local attention blocks, and the number of the two is not necessarily the same. Output generated using the last compression scheme For the input of this module, a positional encoding mechanism (PE) is introduced in the encoding layer to... Convert to learned positional encoding : in, It is a learnable matrix for capturing identity information; The generated encoding The data is fed into sequential attention blocks, each consisting of a multi-head attention (MHA) layer and a feedforward network (FFN) layer; a grouping strategy is used to simplify the computation of the MHA and FFN layers in the attention blocks; Using lightweight MHA, or L-MHA, the input of L-MHA is first encoded. Divided into Group, and then apply the original MHA to each group. , The formula for calculating L-MHA is as follows: Using a lightweight FFN, or L-FFN, the input features are divided into... The calculation method for L-FFN is as follows: Local attention blocks are employed, where the computation of local attention follows that of global attention. A mask function is applied to preserve relevant node pairs if the elements of the mask matrix... If false, then the masking function masks. An element will be hidden in the feature matrix Z. , in the form of: Set a value The hidden value is obtained by aggregating all relevant adjacency matrices of the domain to obtain the mask matrix. ,Right now ,in It is one of the adjacency matrices, the one described It is a sparse adjacency matrix threshold composed of filtering functions.
2. The lightweight lithium battery health state estimation method based on L-TCN and GL-Former according to claim 1, characterized in that: Step S3 specifically includes the following steps: S31: Select the population size and encode each individual in the population; each individual is composed of various hyperparameters of the neural network, and the hyperparameters are randomly selected within the range of values; S32: Write a fitness function to decode the individual and use the hyperparameters obtained from the individual as the initial hyperparameters of the neural network; calculate the sum of the absolute errors between the predicted output and the actual output of the neural network model, and use this as the fitness value; S33: Selection operation, using the roulette wheel method; take the reciprocal of the fitness value, the smaller the individual's fitness value, the greater the probability of being selected; S34: Crossover operation, using real number crossover method, selects individuals according to crossover probability, and crosses chromosomes at any two positions of the selected individual and its neighboring individuals; S35: Mutation operation, using uniform mutation, selecting mutated individuals by setting the mutation probability.
Citation Information
Patent Citations
Lithium battery health state estimation method based on stable characteristics and AS-TCN model
CN114578249A
Hybrid model lithium battery health state monitoring method based on data enhancement
CN116106773A
