Improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder
Through an improved data segmentation method based on Transformer encoder, long and short period segmentation and feature extraction of lithium-ion battery charge and discharge cycle data is solved, and the problems of large calculation overhead and low prediction accuracy of the existing SOH estimation methods are solved, achieving more efficient and accurate SOH estimation.
Patent Information
- Application Number
- CN202411533404.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The existing SOH estimation methods of lithium-ion batteries have problems such as high computational overhead, inability to measure online, and the inability to share models for different battery models. In addition, deep learning-based methods have not fully utilized the coupling characteristics of battery data, and prediction accuracy needs to be improved.
Using an improved data segmentation method based on Transformer encoder, the lithium-ion battery charge and discharge cycle data is segmented in a long and short periodic period, and the data is converted into two-dimensional timing data. Local features are extracted using convolutional blocks, combined with the Transformer model to capture the dependencies of long-term timing data, and finally SOH estimation is performed through the full connection layer.
It improves the accuracy and model performance of SOH estimation, reduces the computational complexity, enhances the extraction ability of local time features of battery data, and significantly improves the prediction effect of the model.
Smart Images

Figure CN119046671B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of lithium-ion battery management, and in particular relates to an improved data segmentation lithium-ion battery SOH estimation method based on a Transformer encoder. Background Art
[0002] With the rapid development of portable electronic devices, electric vehicles and large-scale energy storage, lithium-ion batteries have attracted increasing attention for their high energy density and superior safety performance, making them rapidly rising in various energy storage devices. Traditional lithium-ion batteries have risks such as electrolyte leakage, overcharge, overheating or internal short circuit, which may cause fire, explosion and other safety issues that hinder their application in electric vehicles or aircraft, because electric vehicles or aircraft require energy storage devices with high energy density and, more importantly, high safety. Accurate estimation of SOH is of great significance to improving the safety and service life of lithium-ion batteries, as well as improving the efficiency of lithium-ion batteries and reducing equipment operating costs.
[0003] So far, the research methods of battery SOH by researchers from different countries are mainly divided into the following methods: direct measurement method, model building method and data-based deep learning method. Although the measurement method has the advantages of simple method and high accuracy, this type of method has strict requirements on test conditions and cannot be measured online, which is very restrictive. The model building method is mainly divided into electrochemical model, equivalent circuit model, etc. The model building method constructs a battery SOH identification model through a large number of precise parameters. This method requires a large number of model parameters and computational overhead, and different battery models cannot share a model method, so it costs a lot to use the model method to estimate the SOH of different types of batteries.
[0004] The data-based deep learning method has become a hot topic of research at home and abroad. This method does not require a large number of model parameters, does not require a strict measurement environment, and does not need to consider the chemical reactions inside the lithium-ion battery. It only needs to use the battery data in the battery aging test to achieve the battery SOH estimation. Among the deep learning methods, the SOH estimation method that only uses the terminal voltage as a single input data can effectively reduce the computational overhead, but does not consider the coupling characteristics between multiple battery data, and the prediction accuracy needs to be improved; the LSTM is used to capture time series data to predict the SOH of lithium-ion batteries, but the spatial feature extraction between data is ignored; the SOH estimation method based on the SSA-Elman model uses the SSA algorithm to optimize the network, but uses a point-by-point data input method and does not consider the importance of data segmentation. Summary of the invention
[0005] In order to solve the problems existing in the prior art, the present invention provides an improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows: an improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder, comprising the following steps:
[0007] S1, lithium-ion battery charge and discharge cycle data input model;
[0008] S2. Improve data segmentation, segment the data into short cycles according to the different states of the battery during the charging and discharging process, and segment the data into long cycles according to the number of battery cycles;
[0009] S3, normalizing and aligning the time periods of the same length in the data segments, and folding and splicing the one-dimensional time series based on different period divisions, so that the one-dimensional battery cycle data is converted into two-dimensional data divided into multiple periods, and the two-dimensional time series change of the data is obtained;
[0010] S4, using convolution blocks of different sizes to convolve the processed two-dimensional data to extract local features;
[0011] S5. Concatenate the extracted features and feed them into the Encoder part of the Transformer model. Use the improved encoder to convert the input sequence into a continuous representation, capture the information and model its features, and learn to obtain the dependencies in the features.
[0012] S6. Input the fully connected layer to obtain the estimated result.
[0013] Preferably, in step S2, each short cycle segment is a state, which includes but is not limited to charging, discharging and standing; each long cycle segment is a complete charge and discharge cycle of n times, n≧1.
[0014] Preferably, in step S2, each input univariate time series is represented by To represent it, the length of the data segment is represented as , the stride period is expressed as The stride period refers to the period length based on which data segments of different lengths are divided. The stride of data segmentation is set autonomously according to the battery data. A series of data segments will be generated during the segmentation process. ,in is the number of data segments under a fixed stride; the calculation formula for the number of data segments N under a fixed stride is shown in formula ①; the calculation formula for the number of data segments S of the overall input data is shown in formula ②,
[0015] ①;
[0016] ②;
[0017] in, is the dimension of the input data, The number of stride periods set for single-dimensional data. When the last segment of the sequence is less than When the last value The number of repetitions is added to the end of the original sequence.
[0018] Preferably, in step S5, the Transformer Encoder is used to capture the complex relationship between features of the extracted information.
[0019] The improved Encoder module consists of Position Embedding, Feedforward, Multi-HeadAttention, Dropout and Add & Norm. Position Embedding marks the input data according to the position, and each batch of input data has unique position encoding information; the main functions of Add & Norm are residual connection and layer normalization; Feedforward is a forward propagation network, which processes the extracted features through two linear mappings and an activation function and outputs the results; the Dropout mechanism is added after Multi-Head Attention and Feedforward to avoid model overfitting, and the conv1d module is added between every two layers of encoders to further capture local features to make up for the short-distance dependence of the self-attention mechanism; Multi-Head Attention is a multi-head attention module, which uses the attention mechanism to analyze the correlation between each data and the predicted result. The higher the correlation, the higher the attention score, and the multi-head attention mechanism can extract information features at different levels and scales. The calculation formula of multi-head attention is as follows:
[0020] ;
[0021] in, is the query vector, is the key vector, is a value vector, Normalize the result for the activation function. Represents the number of dimensions of each feature head.
[0022] Preferably, in step S5, the Transformer model records the features of each time period and aligns and flattens them in chronological order.
[0023] Preferably, in step S1, the types of data include but are not limited to test time, current, voltage, capacitance and temperature.
[0024] Preferably, in step S1, the battery under test is subjected to multiple complete charge and discharge cycles. In each cycle, the battery is first charged to U1 with a constant current, the battery is then left to rest, and then the battery is discharged to U2 with the same constant current. During the resting process, the battery data is recorded every t1 time, and during the charge and discharge process, the battery data is recorded every t2 time, U1>U2, t1:t2=(2~5):1.
[0025] Preferably, in step S4, the obtained two-dimensional data is combined according to the period, and the convolution block is used to perform multiple convolutions in different time periods on the data at different time points at the same time, and multiple feature information is marked on the data in each time period.
[0026] Preferably, in step S4, multiple feature information in each time period is shared.
[0027] Preferably, in step S6, the model result is input into the linear layer to obtain an estimated result, and the error term is statistically used to evaluate the result.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. Improve the previous single-point input to data segmented input, from input calculation at each time point to input calculation at each time period after segmentation, and then expand the one-dimensional data to two-dimensional data. After the battery data is segmented, it not only reduces the parameter calculation, but also retains the two-dimensional time series characteristics of the battery data;
[0030] 2. According to the data characteristics and parameter change characteristics of multiple cycles of the battery, the data is divided into data blocks of different lengths and aligned in sequence. Different from data segmentation according to a fixed threshold, the present invention segments the data into short-period segments according to different states of the battery during the charging and discharging process, such as charging, discharging, and static, and segments the data into long-period segments according to the number of cycles of the battery. The long-short period segmentation method is used to maintain the local characteristics of the time series, and the data correlation of different time steps in various battery information can be further obtained, which is more conducive to obtaining comprehensive semantic information, thereby effectively improving the estimation accuracy of the model for SOH;
[0031] 3. The ability of the Encoder in the Transformer to capture long-term time series data is then used to extract features from the input data, and finally the SOH is predicted. Compared with directly using the Transformer model, this method reduces the model complexity and improves the model performance while achieving good results;
[0032] 4. The encoder part was adjusted. The Dropout mechanism was added after Multi-Head Attention and Feedforward to avoid model overfitting. At the same time, a conv1d module was added between every two encoder layers to further capture local features and make up for the lack of short-distance dependence of the self-attention mechanism.
[0033] 5. The types of data include but are not limited to test time, current, voltage, capacitance and temperature. The input data types are diverse, and the model calculation takes into account the coupling between various battery data, which is conducive to improving the prediction accuracy;
[0034] In summary, this application improves the data segmentation method to segment the battery cycle data into long and short cycles, and performs splicing, normalization and alignment processing, which enhances the model's ability to extract local time features of the data, and then uses the encoder in the Transformer to capture long-term time series data to extract features from the input data, and finally predicts SOH, effectively improving the model's estimation accuracy for SOH. The results show that the method proposed in this application has achieved good performance in root mean square error, mean absolute error, and maximum error, and by comparing different models, the performance of the model using this method has been significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the overall system flow of an embodiment of the present invention;
[0036] Figure 2 is a system overall structure diagram of an embodiment of the present invention;
[0037] Figure 3 is a structural diagram of a Transformer encoder module according to an embodiment of the present invention;
[0038] Figure 4 is a schematic diagram of a battery data segmentation method according to an embodiment of the present invention;
[0039] Figure 5 is a schematic diagram of multiple time series features of a time period of an embodiment of the present invention;
[0040] Figure 6 is a graph of SOH estimation results on a public data set in one embodiment of the present invention;
[0041] Figure 7 yes Figure 6 A partial enlarged view of the middle part;
[0042] Figure 8It is a comparison diagram of the SOH estimation results and estimation errors on a self-test data set in an embodiment of the present invention and the SOH estimation results of the existing models Crossformer, Transformer and FEDformer;
[0043] Fig. 9 yes Figure 8 A partial enlarged view of point B;
[0044] Fig.10 is a comparison diagram of experimental results before and after data segmentation in an embodiment of the present invention;
[0045] Fig.11 yes Fig.10 A partial enlarged view of point C in the figure. DETAILED DESCRIPTION
[0046] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0047] The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder includes the following steps:
[0048] S1, lithium-ion battery charge and discharge cycle data input model;
[0049] S2. Improve data segmentation, segment the data into short cycles according to the different states of the battery during the charging and discharging process, and segment the data into long cycles according to the number of battery cycles;
[0050] S3, normalizing and aligning the time periods of the same length in the data segments, and folding and splicing the one-dimensional time series based on different period divisions, so that the one-dimensional battery cycle data is converted into two-dimensional data divided into multiple periods, and the two-dimensional time series change of the data is obtained;
[0051] S4, using convolution blocks of different sizes to convolve the processed two-dimensional data to extract local features;
[0052] S5. Concatenate the extracted features and feed them into the Encoder part of the Transformer model. Use the improved encoder to convert the input sequence into a continuous representation, capture the information and model its features, and learn to obtain the dependencies among the features.
[0053] S6. Input the fully connected layer to obtain the estimated result.
[0054] In one embodiment, in step S2, each short cycle segment is a state, which includes but is not limited to charging, discharging and standing; each long cycle segment is a complete charge and discharge cycle of n times, n≧1.
[0055] In one embodiment, in step S2, each input univariate time series is represented by To represent it, the length of the data segment is represented as , the stride period is expressed as The stride period refers to the period length based on which data segments of different lengths are divided. The stride of data segmentation is set autonomously according to the battery data. A series of data segments will be generated during the segmentation process. ,in is the number of data segments under a fixed stride; the calculation formula for the number of data segments N under a fixed stride is shown in formula ①; the calculation formula for the number of data segments S of the overall input data is shown in formula ②,
[0056] ①;
[0057] ②;
[0058] in, is the dimension of the input data, The number of stride periods set for single-dimensional data. When the last segment of the sequence is less than When the last value The number of repetitions is added to the end of the original sequence.
[0059] In one embodiment, in step S5, the Transformer Encoder is used to capture the complex relationship between features of the extracted information. The improved Encoder module consists of Position Embedding, Feedforward, Multi-HeadAttention, Dropout and Add & Norm. Position Embedding marks the input data according to the position, and each batch of input data has unique position encoding information; the main functions of Add & Norm are residual connection and layer normalization; Feedforward is a forward propagation network, which processes the extracted features through two linear mappings and an activation function and outputs the results; the Dropout mechanism is added after Multi-Head Attention and Feedforward to avoid model overfitting, and the conv1d module is added between every two layers of encoders to further capture local features to make up for the short-distance dependence of the self-attention mechanism; Multi-Head Attention is a multi-head attention module, which uses the attention mechanism to analyze the correlation between each data and the predicted result. The higher the correlation, the higher the attention score, and the multi-head attention mechanism can extract information features at different levels and scales. The calculation formula of multi-head attention is as follows:
[0060] ;
[0061] in, is the query vector, is the key vector, is a value vector, Normalize the result for the activation function. Represents the number of dimensions of each feature head.
[0062] In one embodiment, in step S5, the Transformer model records the features of each time period and aligns and flattens them in chronological order.
[0063] In one embodiment, in step S1, the types of data include but are not limited to test time, current, voltage, capacitance and temperature.
[0064] In one embodiment, in step S1, the battery under test is subjected to multiple complete charge and discharge cycles. In each cycle, the battery is first charged to U1 with a constant current, and then the battery is allowed to stand, and then the battery is discharged to U2 with the same constant current. During the standing process, the battery data is recorded every t1 time, and during the charge and discharge process, the battery data is recorded every t2 time, U1>U2, t1:t2=(2~5):1.
[0065] In one embodiment, in step S4, the obtained two-dimensional data is combined according to the period, and the convolution block is used to perform multiple convolutions in different time periods on the data at different time points at the same time, and multiple feature information is marked on the data in each time period.
[0066] In one embodiment, in step S4, multiple feature information in each time period is shared.
[0067] In one embodiment, in step S6, the model result is input into the linear layer to obtain an estimated result, and the error term is statistically used to evaluate the result.
[0068] Example 1: Based on the time series characteristics of battery cycle data, a data segmentation method based on the long and short cycles of battery data is proposed, which converts one-dimensional time series data into two-dimensional data while effectively retaining the local time characteristics of the battery. This method solves the problem of low accuracy or insufficient ability to obtain time series information in other models.
[0069] In view of the correlation between various data in SOH prediction and the time series characteristics of battery cycle data, an improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder is proposed. The overall structure of the system is shown in the figure Figure 2 The overall flow chart of the system is as shown in Figure 1 As shown, first, the battery cycle data is input, wherein the self-test data set in the lithium-ion battery charge and discharge cycle data is composed of data recorded by the arbin LBT20184 battery testing hardware platform for the charge and discharge cycle detection of laboratory solid-state lithium iron phosphate batteries. The data types include but are not limited to test time, current, voltage, capacitance, and temperature; in the lithium-ion battery charge and discharge cycle data test scheme, the battery under test is subjected to 150 complete charge and discharge cycles. In each cycle, the battery is first charged to 4V with a constant current, and then the battery is allowed to stand for 10 minutes, and then the battery is discharged to 2.5V with the same constant current. During the test, the temperature of the incubator is set to 25°C, and the battery data is recorded once every minute during the standing process, and once every 20 seconds during the charge and discharge process. The public data set used is the one from Oxford University in 2019, which follows the current curve to test the lithium-ion battery under test and records various data on time, including voltage, current, capacity, etc. The experimental results of the method of this application on the Oxford University data set are as follows Figure 6 and Figure 7 The results of the two experiments are summarized in Table 1. The predicted model values are highly consistent with the true values of the public datasets. The two datasets are divided in a ratio of 7:3 without special circumstances. The public dataset verifies the feasibility of the method, and the self-test dataset verifies the universality and robustness of the model under different datasets.
[0070] Table 1 Experimental results of the proposed method on the Oxford University dataset
[0071]
[0072] Then the long and short cycle data are segmented. This process divides the data into time periods of various lengths based on the innovation of the segmentation method. The battery data segmentation is as follows: Figure 4 As shown in the figure, the specific scheme is to use each input univariate time series To represent it, the length of the data segment is represented as , the stride period is expressed as The stride period refers to the period length based on which data segments of different lengths are divided. The stride of data segmentation is set autonomously according to the battery data. A series of data segments will be generated during the segmentation process. ,in is the number of data segments under a fixed stride; the calculation formula for the number of data segments N under a fixed stride is shown in formula ①; the calculation formula for the number of data segments S of the overall input data is shown in formula ②,
[0073] ①;
[0074] ②;
[0075] in, is the dimension of the input data, The number of stride periods set for single-dimensional data. When the last segment of the sequence is less than When the last value By using the data segmentation method, the amount of data input at a single time can be reduced from L to approximately .
[0076] like Figure 5 As shown, the setting Cycle 1 is characterized by five battery cycles. Cycle 2 is characterized by three battery cycles, Cycle 3 is characterized by a complete battery charge or discharge process.
[0077] After the segmentation is completed, the time periods of the same length are first normalized and aligned, and the one-dimensional time series are folded and spliced based on different period divisions, so that the one-dimensional battery cycle data is converted into two-dimensional data divided into multiple periods, and the two-dimensional time series changes of the data are obtained; then, the processed two-dimensional data are convolved using convolution blocks of different sizes, the local features are deeply extracted, and the extracted features are spliced and sent to the Encoder part of the Transformer to obtain the time series information, and finally input into the fully connected layer to obtain the estimation result.
[0078] The comparison of battery SOH prediction results before and after data segmentation is shown in the figure below: Fig.10 and Fig.11 The experimental results before and after data segmentation are shown in Table 2. On the self-test data set, before using the improved data segmentation method, the root mean square error and mean absolute error of the model were 1.73% and 1.35% respectively, and the maximum error was 1.86%. After using the improved data segmentation method, the root mean square error and mean absolute error of the model were reduced to 0.92% and 0.75% respectively, and the maximum error was reduced to 0.88%.
[0079] Table 2 Experimental results before and after data segmentation
[0080]
[0081] Example 2: Improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder, such as Figure 1 As shown, the following steps are included:
[0082] S1, lithium-ion battery charge and discharge cycle data input model;
[0083] S2. Improve data segmentation. According to the different states of the battery during the charging and discharging process, such as charging, discharging, and resting, the data is segmented into short cycles. Each short cycle segment is a different state. At the same time, according to the number of cycles of the battery in different states of charging, discharging, and resting, the data is segmented into long cycles. Each segment is a complete n cycles. The segmentation results are different for different number of cycles. In this method example, three cycles and five cycles are selected as the division of long cycle segments.
[0084] S3, normalizing and aligning the time periods of the same length in the data segments, and folding and splicing the one-dimensional time series based on different period divisions, so that the one-dimensional battery cycle data is converted into two-dimensional data divided into multiple periods, and the two-dimensional time series change of the data is obtained;
[0085] S4. Use convolution blocks of different sizes to convolve the processed two-dimensional data, extract local features, and normalize the two-dimensional data in segments. The two-dimensional data is combined according to the period. The convolution kernel will operate on the data at different time points at the same time, and the data in each time period will also be convolved multiple times. Therefore, each time period will have multiple information features, that is, each time period will be marked with multiple feature information; feature sharing is used to solve the problem of multiple feature information in each time period;
[0086] S5. The extracted features are concatenated and sent to the Encoder part of the Transformer model. The improved encoder is used to convert the input sequence into a continuous representation, capture the information and model its features, and learn to obtain the dependencies in the features; the Transformer's Encoder is used to capture the complex relationship between the features of the extracted information. The Transformer model records the features of each time period. After the convolution is completed, the model will record the features of each time period and align and flatten them in chronological order. In this way, the multi-dimensional information can enhance the model's feature learning for the time period; and the Transformer's Encoder part is used to estimate and predict the extracted features. Compared with the use of the entire Transformer model, while solving the problem of SOH estimation of lithium-ion batteries, the number of parameters is reduced, the model complexity is reduced, and the model performance is greatly improved. The structure diagram of the Transformer Encoder module is shown in the figure below. Figure 3 As shown in the figure, the improved Encoder module consists of Position Embedding, Feedforward, Multi-Head Attention, Dropout, and Add & Norm. Position Embedding marks the input data according to the position, and each batch of input data has unique position encoding information; the main functions of Add & Norm are residual connection and layer normalization. The Feedforward layer is a forward propagation network, which processes the extracted features through two linear mappings and an activation function and outputs the results; the Dropout mechanism is added after Multi-Head Attention and Feedforward to avoid model overfitting, and the conv1d module is added between every two layers of encoders to further capture local features and make up for the lack of short-distance dependence of the self-attention mechanism. Multi-Head Attention is a multi-head attention module. This module uses the attention mechanism to analyze the correlation between each data and the predicted result. The higher the correlation, the higher the attention score. The multi-head attention mechanism can extract information features at different levels and scales. The calculation formula of multi-head attention is as follows:
[0087] ;
[0088] in, is the query vector, is the key vector, is a value vector, Normalize the result for the activation function. Represents the number of dimensions of each feature head.
[0089] S6. Input the fully connected layer to get the estimated result. Input the model result into the linear layer and get the estimated result, and statistically calculate the error term to evaluate the result, including several characteristic standards, including root mean square error RMSE, mean absolute error MAE, and maximum error ME.
[0090] The mathematical equation of the statistical error is as follows:
[0091] ;
[0092] ;
[0093] ;
[0094] Where N is the total number of samples when averaging the error; i is used to mark the position of each data point in the error calculation, and its value range is from 1 to N; The estimated results given for the model; is the true reference value to be compared with the estimated value.
[0095] The lithium-ion battery charge and discharge cycle self-test data set was input into the prediction model of this application, Crossformer, Transformer and FEDformer models for comparison. The comparison of the prediction model of this application with the existing models Crossformer, FEDformer and complete Transformer is shown in the figure below. Figure 8 and 9 The comparative experimental results of the proposed method and other models are shown in Table 3.
[0096] Table 3 Comparative experimental results of the proposed method and other models
[0097]
[0098] The root mean square error, mean absolute error and maximum error of the Crossformer model are 2.98%, 3.51% and 1.81% respectively, the root mean square error, mean absolute error and maximum error of the Transformer model are 1.34%, 1.42% and 2.47% respectively, the root mean square error, mean absolute error and maximum error of the FEDformer model are 1.77%, 1.34% and 2.26% respectively, and the root mean square error, mean absolute error and maximum error of the prediction model of the present application are 0.92%, 0.72% and 0.88% respectively. Compared with the Crossformer, Transformer and FEDformer models, the present method achieves better results in root mean square error, mean absolute error and maximum error.
[0099] The experimental results show that the data segmentation method based on the long and short cycles of battery data can effectively improve the estimation accuracy of the model for SOH. In addition, the method proposed in this application has been experimentally verified in two data sets, and the results show that the method proposed in this application has strong performance and can meet actual needs.
[0100] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. An improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder, characterized in that: The following steps are involved: S1, lithium-ion battery charge and discharge cycle data input model; S2. Improve data segmentation, segment the data into short cycles according to different states of the battery during the charging and discharging process, and segment the data into long cycles according to the number of cycles of the battery; each short cycle segment is a state, including but not limited to charging, discharging and standing; each long cycle segment is a complete charging and discharging cycle of n times, n≧1; Each input univariate time series is represented by Y (i) denoted by L, the length of the data segment is denoted by T, and the stride period is denoted by d The stride period refers to the period length based on which data segments of different lengths are divided. The stride of data segmentation is set autonomously according to the battery data. A series of data segments will be generated during the segmentation process. Where N is the number of data segments under a fixed stride; the calculation formula for the number of data segments N under a fixed stride is shown in formula ①; the calculation formula for the number of data segments S of the overall input data is shown in formula ②, Where M is the dimension of the input data, d is the number of stride cycles set for single-dimensional data, and when the last segment length of the sequence is less than T d When the last value The number of repetitions is filled to the end of the original sequence; S3, normalizing and aligning the time periods of the same length in the data segments, and folding and splicing the one-dimensional time series based on different period divisions, so that the one-dimensional battery cycle data is converted into two-dimensional data divided into multiple periods, and the two-dimensional time series change of the data is obtained; S4, using convolution blocks of different sizes to convolve the processed two-dimensional data to extract local features; S5. Concatenate the extracted features and feed them into the Encoder part of the Transformer model. Use the improved encoder to convert the input sequence into a continuous representation, capture the information and model its features, and learn to obtain the dependencies in the features. S6. Input the fully connected layer to obtain the estimated result.
2. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 1 is characterized in that: In step S5, the Transformer Encoder is used to capture the complex relationship between features of the extracted information. The improved Encoder module consists of Position Embedding, Feedforward, Multi-HeadAttention, Dropout and Add&Norm. Position Embedding marks the input data according to the position, and each batch of input data has unique position encoding information; the main function of Add&Norm is residual connection and layer normalization; Feedforward is a forward propagation network, which processes the extracted features through two linear mappings and an activation function and outputs the results; the Dropout mechanism is added after Multi-Head Attention and Feedforward to avoid model overfitting, and the conv1d module is added between every two layers of encoders to further capture local features to make up for the short-distance dependence of the self-attention mechanism; Multi-Head Attention is a multi-head attention module, which uses the attention mechanism to analyze the correlation between each data and the predicted result. The higher the correlation, the higher the attention score, and the multi-head attention mechanism can extract information features at different levels and scales. The calculation formula of multi-head attention is as follows: ; Among them, q is the query vector, k is the key vector, v is the value vector, and softmax is the activation function to normalize the result. dead Represents the number of dimensions of each feature head.
3. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 2 is characterized in that: In step S5, the Transformer model records the features of each time period and aligns and flattens them in chronological order.
4. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 1 is characterized in that: In step S1, the types of data include but are not limited to test time, current, voltage, capacitance and temperature.
5. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 4 is characterized in that: In step S1, the battery under test is subjected to multiple complete charge and discharge cycles. In each cycle, the battery is first charged to U1 with a constant current, and then the battery is allowed to stand, and then the battery is discharged to U2 with the same constant current. During the standing process, the battery data is recorded every t1 time, and during the charge and discharge process, the battery data is recorded every t2 time, U1>U2, t1:t2=(2~5):
1.
6. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 1 is characterized in that: In step S4, the obtained two-dimensional data are combined according to the period, and the convolution block is used to perform multiple convolutions in different time periods on the data at different time points at the same time, and multiple feature information is marked on the data in each time period.
7. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 6 is characterized in that: In step S4, multiple feature information in each time period is shared.
8. The improved data segmentation lithium-ion battery SOH estimation method based on Transformer encoder according to claim 1 is characterized in that: In step S6, the model results are input into the linear layer to obtain the estimated results, and the error terms are statistically used to evaluate the results.
Citation Information
Patent Citations
Quantization method and device of health status, storage medium and computer program product
CN115236540A
Lithium battery SOH detection method, apparatus and device based on VMD-ICA, and medium
CN116699444A