A method and device for predicting battery pack health status
Through spatiotemporal fusion modeling, the SE-TCN network and Performer encoder are used to capture the temporal and spatial dependencies of battery cells in the battery pack, solving the problems of misjudgment and model redundancy in battery pack health status prediction, and achieving more efficient battery management and usage guidance.
Patent Information
- Application Number
- CN202510293857.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-03-13
AI Technical Summary
Existing technologies fail to effectively capture the complex interactions between multiple cells in battery pack health status prediction, resulting in misjudgment and model redundancy, increasing system complexity and computational burden.
Using spatiotemporal fusion modeling, the SE-TCN network is used to capture the time dependency characteristics of battery cell time series data. The Performer encoder captures the global dependency between battery cells and generates health status prediction values through the spatiotemporal fusion layer.
The accuracy and robustness of battery pack health status prediction are improved, the model complexity is reduced, and the consumption of computing resources is reduced.
Smart Images

Figure CN119807672B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery detection, and more specifically, to a method and device for predicting the health status of a battery pack. Background Art
[0002] Accurately predicting the battery health status of a battery pack is crucial for optimizing battery usage, extending battery life, and ensuring safety. However, the complexity and dynamic characteristics of battery management systems make accurately predicting the health status of the entire battery pack challenging.
[0003] Existing technologies mainly process the data of each battery cell separately to obtain the health status of a single battery cell, or use a joint assessment with the battery state of charge. However, in actual applications, as battery scale expands, battery packs containing multiple batteries are widely used in new energy vehicles and energy storage systems. Predicting the health status of each battery cell separately has obvious drawbacks:
[0004] First, it ignores the mutual influence between battery cells. Multiple battery cells are affected by factors such as temperature, current, and mechanics. Predicting each battery cell individually can lead to significant misjudgments and fails to fully consider the complex relationships between battery cells.
[0005] Second, there is the problem of model redundancy. Modeling each battery cell individually requires building and maintaining a separate model for each cell, which not only increases the complexity of the system but also imposes a heavy computational burden.
[0006] Based on this, this application proposes a battery pack health status prediction solution, which can capture the complex interactive relationship between multiple battery cells and avoid the model redundancy problem. Summary of the Invention
[0007] In view of this, the present application provides a battery pack health status prediction method and device, which captures the complex interaction relationship between multiple battery cells through spatiotemporal fusion modeling, improves the accuracy and robustness of battery pack health status prediction, and avoids model redundancy problems.
[0008] A method for predicting a battery pack health state, comprising:
[0009] Constructing a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and performing sliding window processing on the three-dimensional battery pack matrix in combination with the currently updated window size and sliding step size to generate model input data. The window size and the sliding step size are dynamically adjusted based on the predicted performance;
[0010] Determine a battery pack health status prediction model, the battery pack health status prediction model including an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency relationship between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping;
[0011] The model input data is input into the battery pack health state prediction model to obtain a health state prediction value of the battery pack output by the battery pack health state prediction model.
[0012] Optionally, the three-dimensional matrix shape of the battery pack is:
[0013]
[0014] The model input data shape is:
[0015]
[0016]
[0017] Among them, S is the total sample size or the number of time steps, B is the number of cells, F is the number of features, N is the number of samples, the window size is W, and the sliding step size is Δ.
[0018] Optionally, the SE-TCN network includes multiple parallel and parameter-sharing SE-TCN structures, and the SE-TCN structure is composed of a temporal convolution module and a SE module;
[0019] The time convolution module extracts the time-dependent characteristics of the time series data of the corresponding battery cell through dilated convolution;
[0020] The SE module performs global average pooling on the channels through a compression operation, extracts the correlation between channels through an excitation operation, recalibrates the channel weights based on the correlation, and generates time series features in combination with the time-dependent characteristics.
[0021] Optionally, the dilated convolution formula is:
[0022]
[0023] The calculation formula for global average pooling of channels through compression operation is:
[0024]
[0025] The calculation formula for extracting the correlation between channels through the excitation operation is:
[0026]
[0027]
[0028] The calibration calculation formula for recalibrating channel weights is:
[0029]
[0030] in, is the dilated convolution output sequence, is the input sequence, is the convolution kernel size, The convolution kernel is at position The value at is the expansion rate, is the output time point, is the output value of channel c after global average pooling, L is the sequence length, is the activation value of channel c at position i, z is the weight vector obtained after the excitation operation, s is the vector composed of the values obtained by the global average pooling operation of each channel, C is the total number of channels, is the ReLU activation function, is the Sigmoid activation function, and is the weight matrix of the two fully connected layers in the SE module, is the eigenvalue of the channel after recalibrating the channel weight, is the weight value corresponding to channel c in the weight vector z, is the eigenvalue of the original channel c.
[0031] Optionally, the Performer encoder adopts a linear multi-head attention mechanism, which includes random feature mapping, linearized self-attention calculation, and multi-head self-attention output;
[0032] The random feature map is used to map the input vector to a low-dimensional feature space to form a low-dimensional feature space vector;
[0033] The linearized self-attention calculation is used to calculate the attention weights between input elements, and perform weighted summation on the value matrix according to the attention weights to obtain the output result based on the attention mechanism;
[0034] The multi-head self-attention output is used to splice the multi-head output results, and obtain the comprehensive output result through the linear transformation realized by the weight matrix.
[0035] Optionally, the calculation formula of the random feature map is:
[0036]
[0037] The linearized self-attention calculation formula is:
[0038]
[0039]
[0040] The calculation formula of the multi-head self-attention output is:
[0041]
[0042]
[0043] in, is a low-dimensional feature space vector, x is the input feature of each battery cell, is a random vector sampled from a specific distribution, M is the dimension of the random feature, is the linearized self-attention calculation result, is the query matrix, is the bond matrix, is the value matrix, The coefficient used to normalize the attention score, 1 is a full 1 vector, Output result of multi-head self-attention, for The output result of the head, Wo is the weight matrix.
[0044] Optionally, the Performer encoder uses residual connections and performs layer normalization on each layer;
[0045] The calculation formula for each layer in the Performer encoder is:
[0046]
[0047] in, is the layer calculation result, LayerNorm is the layer normalization calculation, is the output result of multi-head self-attention, and H is the hidden state vector of each battery cell at the last time step.
[0048] Optionally, the Performer encoder further includes an embedding layer;
[0049] The embedding layer generates a position embedding vector for representing the unique identity information of the battery cell according to the battery cell position of each battery cell.
[0050] Optionally, the process of determining the battery pack health status prediction model includes:
[0051] Acquire sample model input data, where the sample model input data is generated by performing sliding window processing on a three-dimensional matrix of a sample battery pack constructed based on sample historical data of battery cells;
[0052] Input the sample model input data into the constructed battery pack health status prediction model, train the model using the determined loss function and the selected optimizer, and iteratively update the model parameters until the preset training stop conditions are met, wherein the training stop conditions include reaching the maximum number of iterations, the loss function value being less than a preset threshold, or the validation set accuracy reaching a preset value;
[0053] The loss function is:
[0054]
[0055] The update rule for the optimizer to update the model parameters is:
[0056]
[0057] in, For the The true health status value of the sample battery pack, is the predicted value of the health status of the model, N is the total number of samples, are model parameters, and are the first-order and second-order moment estimates, respectively. is the learning rate, is the weight attenuation coefficient, is a preset constant.
[0058] A battery pack health status prediction device, comprising:
[0059] a data processing unit, configured to construct a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and perform sliding window processing on the three-dimensional battery pack matrix in combination with a currently updated window size and sliding step size to generate model input data, wherein the window size and sliding step size are dynamically adjusted based on the prediction performance;
[0060] A model determination unit is used to determine a battery pack health state prediction model, wherein the battery pack health state prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency relationship between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health state prediction value by fusing the time series features and the spatial correlation feature mapping;
[0061] The model prediction unit is used to input the model input data into the battery pack health state prediction model to obtain the health state prediction value of the battery pack output by the battery pack health state prediction model.
[0062] It can be seen from the above technical solutions that the embodiment of the present application provides a method and device for predicting the health status of a battery pack. First, a three-dimensional matrix of the battery pack is constructed based on the historical data of multiple cells in the battery pack collected, and the three-dimensional matrix of the battery pack is subjected to sliding window processing in combination with the currently updated window size and sliding step size to generate model input data. The window size and the sliding step size are dynamically adjusted based on the prediction performance. Then, a battery pack health status prediction model is determined. The battery pack health status prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping. Finally, the model input data is input into the battery pack health status prediction model to obtain the health status prediction value of the battery pack output by the battery pack health status prediction model.
[0063] This application can fully utilize the data of multiple battery cells and is no longer limited to the isolated analysis of a single battery cell. By combining the SE-TCN network, the Performer encoder and the spatiotemporal fusion layer, the time-dependent characteristics of the time series data of multiple battery cells in the battery pack and the global dependencies between the battery cells are captured respectively, and the time series features and spatial correlation features are fused, so that the model can capture the complex interactive relationships between multiple battery cells, and then make more comprehensive and reasonable estimates, which greatly improves the accuracy and robustness of the battery pack health status prediction. This modeling method that comprehensively considers spatiotemporal factors is more in line with the actual working conditions of the battery pack and can provide a more reliable basis and guidance for battery management and use. At the same time, by constructing a joint model, the previous method of modeling each battery cell separately has been changed, effectively reducing the complexity of the model. It avoids a lot of repetitive independent model establishment and maintenance work, thereby significantly improving computing efficiency and reducing the consumption of system resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0065] Figure 1 This is a flow chart of a battery pack health status prediction method disclosed in this application;
[0066] Figure 2 This is a schematic diagram of the structure of a battery pack health status prediction model disclosed in this application;
[0067] Figure 3 A schematic diagram of the analysis process of a battery pack health status prediction model disclosed in this application;
[0068] Figure 4 This is a schematic diagram of the analysis process of another battery pack health status prediction model disclosed in this application;
[0069] Figure 5 A schematic diagram of an example test result disclosed in this application;
[0070] Figure 6 This is a structural block diagram of a battery pack health status prediction device disclosed in this application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0072] Next, we will introduce the application scheme. This application proposes the following technical scheme, please see below for details.
[0073] Figure 1 This is a flow chart of a battery pack health status prediction method disclosed in an embodiment of the present application. The battery pack health status prediction method can be applied to a battery pack health status prediction device, such as Figure 1 As shown, the method may include:
[0074] Step S1: construct a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and perform sliding window processing on the three-dimensional battery pack matrix in combination with the currently updated window size and sliding step size to generate model input data.
[0075] Specifically, various historical data are collected for multiple cells in the battery pack, including timestamp (t), voltage (V), current (I), temperature (T), number of cycles (N_cycle), cumulative discharge capacity (Q_discharge), and historical health status information. This data comprehensively reflects the status and performance of the cells at different time points and usage conditions. For example, the timestamp records the specific moment of data collection, the voltage and current reflect the electrical characteristics of the cell during operation, the temperature is related to the working environment and heat generation of the cell, the number of cycles and cumulative discharge capacity reflect the degree of use of the cell, and the health status information is an important indicator of the health of the cell, which will change with the use and aging of the cell. These data together form a three-dimensional matrix, namely the battery pack three-dimensional matrix, in which each element corresponds to a certain eigenvalue of a specific cell at a specific time step. It should be noted that collecting multiple historical data of multiple cells in the battery pack, including collecting multiple historical data of each cell in the battery pack, can improve data integrity, help the model capture the differences between each cell, fully reflect the performance of the battery pack under different working conditions, and improve prediction accuracy. Of course, in order to improve computing efficiency, multiple historical data of multiple cells in key positions in the battery pack can be selected. For example, cells close to the beam can be selected, which are subject to greater temperature changes and mechanical stress and are more critical to predicting health status; cells in high current paths can also be selected. Some cells may bear higher current loads and are more prone to performance degradation, so they are equally important for predicting health status.
[0076] The three-dimensional matrix shape of the battery pack is:
[0077]
[0078] The model input data is generated using a sliding window method with a window size of W and a sliding step size of Δ.
[0079] The window size W determines the range of data input to the model each time, that is, considering multiple data points of the battery cell over a period of time as a whole input. For example, if W is 10, then the data input to the model each time is all the feature data of the battery cell in the past 10 time steps.
[0080] The sliding step size Δ controls the interval at which the window moves. A smaller sliding step size generates more samples and improves data continuity, but also increases the amount of computation. A larger sliding step size reduces the number of samples and may lose some intermediate information, but improves computational efficiency.
[0081] The model input data shape is:
[0082]
[0083]
[0084] Among them, S is the total sample size or the number of time steps, B is the number of cells, F is the number of features, N is the number of samples, the window size is W, and the sliding step size is Δ.
[0085] The window size and sliding step size are dynamically adjusted based on prediction performance. Different battery data characteristics and model structures may require different window sizes and sliding step sizes to achieve optimal prediction results. During model training and validation, by continuously trying different combinations of window sizes and sliding step sizes and observing the model's performance metrics (such as mean squared error and mean absolute error) on the validation set, the window size and sliding step size that optimize performance are selected. For example, an initial window size and sliding step size range can be set and then gradually adjusted. After each adjustment, the model is retrained and validated, and performance metrics are recorded to ultimately determine the optimal parameter combination.
[0086] Step S2: Determine a battery pack health status prediction model.
[0087] Specifically, the battery pack health status prediction model includes an SE-TCN network, a Performer encoder and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependence characteristics of the time series data of multiple battery cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency relationship between the battery cells in the battery pack, and the spatiotemporal fusion layer obtains the health status prediction value by fusing the time series features and the spatial correlation feature mapping.
[0088] Specifically, the TCN (Temporal Convolutional Network) is a neural network architecture specifically designed for processing time series data. It uses convolution operations to capture local patterns and long-term dependencies in time series. The SE (Squeeze-and-Excitation) module is an attention mechanism that adaptively adjusts the weights of different feature channels, allowing the network to focus more on features that are important for predicting battery health status.
[0089] In battery pack health prediction, the SE-TCN network is used to process time series data for each battery cell, such as voltage, current, and temperature, which change over time. For example, as a battery is used, the patterns of change in its voltage and current during charging and discharging change over time. The SE-TCN network can capture the time-dependent nature of these changes and extract valuable time series features. These features reflect the changing state of each battery cell at different points in time and are crucial for predicting the health status of the battery pack. Within the battery pack, the SE-TCN network uses dynamic feature extraction methods based on the location of the battery cells to extract more targeted features, highlighting important features, suppressing unimportant features, and quantifying the dynamic changes of the battery cells under different operating conditions.
[0090] The Performer encoder is a highly efficient attention-based encoder that captures global dependencies between elements in the input data at a relatively low computational cost. In the battery pack scenario, the pack consists of multiple cells, which interact and interact with each other. For example, a performance change in one cell may affect the operating status of other cells, thereby affecting the health of the entire battery pack. The Performer encoder captures this global dependency by analyzing the characteristic data of each cell in the battery pack, such as voltage differences and current distribution, and generates spatial correlation features. These spatial correlation features reflect the collaborative working and mutual influence between cells, providing important information for a comprehensive assessment of the health of the battery pack.
[0091] The spatiotemporal fusion layer fuses the time series features generated by the SE-TCN network with the spatial correlation features generated by the Performer encoder. This fusion process can be performed in a variety of ways, such as simple concatenation or weighted summation. The goal is to organically combine information from both the temporal and spatial dimensions to form a more comprehensive and representative feature representation. A mapping function (such as a fully connected layer) then maps the fused features into a predicted state of health value for the battery pack. This predicted value is used to assess the remaining useful life and performance degradation of the battery pack. For example, the spatiotemporal fusion layer allows the model to comprehensively consider the performance trends of battery cells over time and the interactions between cells in space, enabling a more accurate prediction of the battery pack's state of health at a future point in time, providing an important basis for battery management and maintenance.
[0092] Through the collaborative work of the above three parts, the battery pack health status prediction model can make full use of the time series data of battery cells and the spatial correlation information between cells to achieve accurate prediction of the battery pack health status and provide strong support for the efficient use and maintenance of the battery.
[0093] Step S3: input the model input data into the battery pack health state prediction model to obtain a health state prediction value of the battery pack output by the battery pack health state prediction model.
[0094] It can be seen from the above technical solutions that the embodiment of the present application provides a method and device for predicting the health status of a battery pack. First, a three-dimensional matrix of the battery pack is constructed based on the historical data of multiple cells in the battery pack collected, and the three-dimensional matrix of the battery pack is subjected to sliding window processing in combination with the currently updated window size and sliding step size to generate model input data. The window size and the sliding step size are dynamically adjusted based on the prediction performance. Then, a battery pack health status prediction model is determined. The battery pack health status prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of each cell in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping. Finally, the model input data is input into the battery pack health status prediction model to obtain the health status prediction value of the battery pack output by the battery pack health status prediction model.
[0095] This application can fully utilize the data of multiple cells, even the data of each cell in the battery pack, and is no longer limited to the isolated analysis of a single cell. By combining the SE-TCN network, the Performer encoder and the spatiotemporal fusion layer, the time-dependent characteristics of the time series data of each cell in the battery pack and the global dependencies between the cells are captured respectively, and the time series features and spatial correlation features are fused, so that the model can capture the complex interactions between multiple cells, and then make more comprehensive and reasonable estimates, which greatly improves the accuracy and robustness of the battery pack health status prediction. This modeling method that comprehensively considers spatiotemporal factors is more in line with the actual working conditions of the battery pack and can provide a more reliable basis and guidance for battery management and use. At the same time, by constructing a joint model, the previous method of modeling each cell separately has been changed, effectively reducing the complexity of the model. It avoids a lot of repetitive independent model establishment and maintenance work, thereby significantly improving computing efficiency and reducing the consumption of system resources.
[0096] The above embodiment describes the process of the battery pack health status prediction method in the present application. The following will explain the process of determining the battery pack health status prediction model in the present application.
[0097] In some embodiments of the present application, determining the battery pack health status prediction model may include:
[0098] Step S21: Obtain sample model input data.
[0099] Specifically, the sample model input data is generated by performing sliding window processing on a three-dimensional matrix of a sample battery pack constructed based on sample historical data of battery cells, that is, a three-dimensional matrix is constructed by collecting various historical data of battery cells, and then a sliding window method is used to generate input data suitable for model training.
[0100] Step S22: input the sample model input data into the constructed battery pack health status prediction model, train the model using the determined loss function and the selected optimizer, and iteratively update the model parameters until the preset training stop conditions are met. The training stop conditions include reaching the maximum number of iterations, the loss function value is less than the preset threshold, or the verification set accuracy reaches the preset value.
[0101] Specifically, the sample model input data is input into the constructed battery pack health status prediction model for training.
[0102] Wherein, the loss function is:
[0103]
[0104] The update rule for the optimizer to update the model parameters is:
[0105]
[0106] in, For the The true health status value of the sample battery pack, is the predicted value of the health status of the model, N is the total number of samples, are model parameters, and are the first-order and second-order moment estimates, respectively. is the learning rate, is the weight attenuation coefficient, is a preset constant.
[0107] In some embodiments of the present application, the structure and function of the battery pack health status prediction model of the present application are specifically introduced, such as Figure 2 As shown, the battery pack health status prediction model includes SE-TCN network A, Performer encoder B and spatiotemporal fusion layer C. Figure 3 and Figure 4 , the SE-TCN network A, Performer encoder B and spatiotemporal fusion layer C are introduced in detail in turn.
[0108] SE-TCN Network A:
[0109] Optionally, the SE-TCN network A includes multiple parallel and parameter-sharing SE-TCN structures, and the SE-TCN structure is composed of a temporal convolution module and a SE module.
[0110] The time convolution module extracts the time-dependent characteristics of the time series data of the corresponding battery cell through dilated convolution;
[0111] The SE module performs global average pooling on the channels through a compression operation, extracts the correlation between channels through an excitation operation, recalibrates the channel weights based on the correlation, and generates time series features in combination with the time-dependent characteristics.
[0112] Specifically, a parallel SE-TCN structure is designed for the time series data of each battery cell, and parameters are shared. The purpose of this is to capture the time-dependent characteristics of each battery cell. In this way, the model can process data from multiple batteries at the same time, which can greatly reduce the number of parameters of the model and avoid overfitting. Parameter sharing is also used to reduce the number of parameters of the model and improve training efficiency. At the same time, it can effectively capture the feature changes and dependencies of each battery cell in the time dimension. Among them, the input shape of the SE-TCN structure is , W is the window size, B is the number of cells, and F is the feature dimension.
[0113] This application uses dilated convolution to extract temporal features. Dilated convolution can expand the receptive field of the convolution kernel without adding too many parameters, thereby better capturing long-range dependencies in time series. For example, when the dilation rate is large, the convolution kernel can skip some input values, thereby covering a wider time range.
[0114] The dilated convolution formula is:
[0115]
[0116] The SE module first performs global average pooling on the channels through a compression operation. This step compresses the feature map of each channel into a scalar, obtaining the global information of that channel. For example, for a battery cell data containing multiple features (such as voltage, current, and temperature), each feature can be considered a channel. Through global average pooling, the information of each feature over the entire time series is compressed into a single value, thus obtaining a global summary of the feature.
[0117] Then, an excitation operation is used to extract the correlation between channels. This is achieved through fully connected layers, which can learn the weighted relationships between different channels, that is, the correlation between channels. For example, there is an inherent correlation between voltage and current channels. The excitation operation can capture this relationship and assign a weight to each channel to indicate its importance.
[0118] The calculation formula for global average pooling of channels through compression operation is:
[0119]
[0120] The calculation formula for extracting the correlation between channels through the excitation operation is:
[0121]
[0122]
[0123] Finally, channel weights are recalibrated based on the learned inter-channel correlations, and time series features are generated by combining them with the time-dependent features extracted by the temporal convolution module. Recalibrating channel weights involves multiplying the previously learned weights with the original channel features. This allows the model to focus on important channel features and suppress unimportant ones. By combining the time-dependent features, the generated time series features not only capture information about cell changes over time but also account for the importance differences between different feature channels, providing more valuable input features for subsequent tasks such as battery health prediction.
[0124] The calibration calculation formula for recalibrating channel weights is:
[0125]
[0126] in, is the dilated convolution output sequence, is the input sequence, is the convolution kernel size, The convolution kernel is at position The value at is the expansion rate, is the output time point, is the output value of channel c after global average pooling, L is the sequence length, is the activation value of channel c at position i, z is the weight vector obtained after the excitation operation, s is the vector composed of the values obtained by the global average pooling operation of each channel, C is the total number of channels, is the ReLU activation function, is the Sigmoid activation function, and is the weight matrix of the two fully connected layers in the SE module, is the eigenvalue of the channel after recalibrating the channel weight, is the weight value corresponding to channel c in the weight vector z, is the eigenvalue of the original channel c.
[0127] Performer Encoder B:
[0128] Optionally, the Performer encoder B adopts a linear multi-head attention mechanism, which includes random feature mapping, linearized self-attention calculation and multi-head self-attention output.
[0129] The random feature map is used to map the input vector to a low-dimensional feature space to form a low-dimensional feature space vector;
[0130] The linearized self-attention calculation is used to calculate the attention weights between input elements, and perform weighted summation on the value matrix according to the attention weights to obtain the output result based on the attention mechanism;
[0131] The multi-head self-attention output is used to splice the multi-head output results, and obtain the comprehensive output result through the linear transformation realized by the weight matrix.
[0132] Specifically, random feature mapping maps the input vector into a low-dimensional feature space, forming a low-dimensional feature space vector. This reduces the dimensionality of the data, reducing computational effort and model complexity. For example, random feature mapping can convert the high-dimensional feature data of a large number of cells in a battery pack into a low-dimensional representation while preserving important information, making subsequent processing more efficient.
[0133] The calculation formula of the random feature map is:
[0134]
[0135] The linearized self-attention calculation is used to calculate the attention weights between input elements and perform weighted summation on the value matrix according to these attention weights to obtain the output result based on the attention mechanism. The traditional self-attention calculation complexity is , while Performer uses random feature maps to approximate self-attention, so that the calculation can be linearized and the complexity is reduced to This is very important for processing long sequence data (such as large-scale cell data in battery packs) because it can greatly improve the computational efficiency of the model, allowing the model to quickly process large amounts of data without causing excessive training and prediction time due to excessive computation.
[0136] Specifically, through this linearized self-attention calculation, the model can automatically learn the importance of input elements, namely the attention weights. For example, in a battery pack, different cells may have different degrees of mutual influence, and the status of some cells may have a greater impact on other cells. Linearized self-attention calculation can capture these relationships and perform a weighted sum of the cell features based on the weights, highlighting important information and ignoring unimportant information.
[0137] The linearized self-attention calculation formula is:
[0138]
[0139]
[0140] The multi-head self-attention mechanism can integrate multiple representations of inter-cell relationships. The multi-head self-attention output first concatenates the outputs of multiple heads. This means the model calculates attention weights and outputs from multiple perspectives. Each head has its own parameters and calculation method, allowing the model to capture richer information and different characteristic patterns. A linear transformation implemented by the weight matrix then yields a combined output. This combined output, incorporating information from multiple heads, provides a more comprehensive and accurate representation.
[0141] The calculation formula for multi-head self-attention output is:
[0142]
[0143]
[0144] in, is a low-dimensional feature space vector, x is the input feature of each battery cell, is a random vector sampled from a specific distribution, M is the dimension of the random feature, is the linearized self-attention calculation result, is the query matrix, is the bond matrix, is the value matrix, The coefficient used to normalize the attention score, 1 is a full 1 vector, Output result of multi-head self-attention, for The output result of the head, Wo is the weight matrix.
[0145] The concatenated output is transformed by a linear transformation (the weight matrix is ), the dimension is , d head This is a custom parameter that defines the number of heads in the multi-head attention mechanism, indicating the number of cell relationship expressions.
[0146] Furthermore, the Performer encoder uses residual connections and performs layer normalization on each layer;
[0147] The calculation formula for each layer in the Performer encoder is:
[0148]
[0149] in, is the layer calculation result, is the output of multi-head self-attention, H is the hidden state vector of each cell at the last time step, and LayerNorm is the layer normalization calculation, which is used to normalize the output of each layer to make the data flow in the network more stable.
[0150] In addition, the Performer encoder may further include an embedding layer;
[0151] The embedding layer generates a position embedding vector for representing the unique identity information of the battery cell according to the battery cell position of each battery cell.
[0152] Specifically, when processing cell-related data, the cell's location information has a significant impact on the model's performance. The embedding layer generates a position embedding vector specifically representing each cell's unique identity based on its location. This application uses the position embedding vector generated by the embedding layer to enable the Performer encoder to better capture and utilize the cell's location features, thereby improving the prediction and analysis of the cell's status.
[0153] Spatiotemporal fusion layer C:
[0154] The spatiotemporal fusion layer obtains the health status prediction value by fusing time series features and spatial correlation feature mapping, that is, integrating different dimensional features (time and space) to achieve health status prediction.
[0155] Flatten the output of the Performer encoder into a vector:
[0156]
[0157] Mapped to the health status prediction value through the fully connected layer:
[0158]
[0159] in, is the activation function (such as ReLU).
[0160] The following is an example of this application:
[0161] 1. Collect the historical charge / discharge timestamps, maximum current, cut-off voltage, average temperature, equivalent cycle number, test duration of multiple cells in a battery pack; and the corresponding whole pack SOH test results.
[0162] 2. Load the above data and divide it into training set and test set according to the proportion; the training set is used to train the model, and the test set is used to evaluate the trained model on a large amount of data in real time to verify its generalization ability.
[0163] 3. Construct a sliding window dataset by combining the data of each battery cell according to the technical solution introduction and perform model training.
[0164] 4. Save the trained model parameters and read the test set to verify the generalization ability of the model.
[0165] 5. Deploy the verified model and use it to predict single-point, whole-package SOH or continuous prediction through actual data input.
[0166] Specific test results:
[0167] The results of dividing more than 2000 sets of data from 12 battery cells into training and test sets in a ratio of 8:2 are as follows Figure 5 and as shown in Table 1.
[0168] Figure 5 is a schematic diagram of the test results of the example, where Figure 5The middle figure (a) shows the comparison between the battery pack SOH prediction value and the true value of the training set, figure (b) shows the comparison between the battery pack SOH prediction value and the true value of the test set, figure (c) shows the battery pack SOH prediction error distribution of the training set, and figure (d) shows the battery pack SOH prediction error distribution of the test set.
[0169]
[0170] Table 1
[0171] The battery pack health status prediction device provided in an embodiment of the present application is described below. The battery pack health status prediction device described below and the battery pack health status prediction method described above can be referenced to each other.
[0172] See also Figure 6 , Figure 6 This is a structural block diagram of a battery pack health status prediction device disclosed in an embodiment of the present application.
[0173] like Figure 6 As shown, the battery pack health status prediction device may include:
[0174] A data processing unit 110 is configured to construct a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and perform sliding window processing on the three-dimensional battery pack matrix in combination with a currently updated window size and sliding step size to generate model input data. The window size and sliding step size are dynamically adjusted based on prediction performance.
[0175] A model determination unit 120 is used to determine a battery pack health state prediction model, wherein the battery pack health state prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency relationship between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health state prediction value by fusing the time series features and the spatial correlation feature mapping;
[0176] The model prediction unit 130 is configured to input the model input data into the battery pack health state prediction model to obtain a health state prediction value of the battery pack output by the battery pack health state prediction model.
[0177] It can be seen from the above technical solutions that the embodiment of the present application provides a method and device for predicting the health status of a battery pack. First, a three-dimensional matrix of the battery pack is constructed based on the historical data of multiple cells in the battery pack collected, and the three-dimensional matrix of the battery pack is subjected to sliding window processing in combination with the currently updated window size and sliding step size to generate model input data. The window size and the sliding step size are dynamically adjusted based on the prediction performance. Then, a battery pack health status prediction model is determined. The battery pack health status prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to generate spatial correlation features by capturing the global dependency between the cells in the battery pack, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping. Finally, the model input data is input into the battery pack health status prediction model to obtain the health status prediction value of the battery pack output by the battery pack health status prediction model.
[0178] This application can fully utilize the data of each battery cell and is no longer limited to the isolated analysis of a single battery cell. By combining the SE-TCN network, the Performer encoder and the spatiotemporal fusion layer, the time-dependent characteristics of the time series data of multiple batteries in the battery pack and the global dependencies between the batteries are captured respectively, and the time series features and spatial correlation features are fused, so that the model can capture the complex interactive relationships between multiple batteries, and then make more comprehensive and reasonable estimates, which greatly improves the accuracy and robustness of the battery pack health status prediction. This modeling method that comprehensively considers spatiotemporal factors is more in line with the actual working conditions of the battery pack and can provide a more reliable basis and guidance for battery management and use. At the same time, by constructing a joint model, the previous method of modeling each battery cell separately has been changed, effectively reducing the complexity of the model. It avoids a lot of repetitive independent model establishment and maintenance work, thereby significantly improving computing efficiency and reducing the consumption of system resources.
[0179] Optionally, the three-dimensional matrix shape of the battery pack is:
[0180]
[0181] The model input data shape is:
[0182]
[0183]
[0184] Among them, S is the total sample size or the number of time steps, B is the number of cells, F is the number of features, N is the number of samples, the window size is W, and the sliding step size is Δ.
[0185] Optionally, the SE-TCN network includes multiple parallel and parameter-sharing SE-TCN structures, and the SE-TCN structure is composed of a temporal convolution module and a SE module;
[0186] The time convolution module extracts the time-dependent characteristics of the time series data of the corresponding battery cell through dilated convolution;
[0187] The SE module performs global average pooling on the channels through a compression operation, extracts the correlation between channels through an excitation operation, recalibrates the channel weights based on the correlation, and generates time series features in combination with the time-dependent characteristics.
[0188] Optionally, the dilated convolution formula is:
[0189]
[0190] The calculation formula for global average pooling of channels through compression operation is:
[0191]
[0192] The calculation formula for extracting the correlation between channels through the excitation operation is:
[0193]
[0194]
[0195] The calibration calculation formula for recalibrating channel weights is:
[0196]
[0197] in, is the dilated convolution output sequence, is the input sequence, is the convolution kernel size, The convolution kernel is at position The value at is the expansion rate, is the output time point, is the output value of channel c after global average pooling, L is the sequence length, is the activation value of channel c at position i, z is the weight vector obtained after the excitation operation, s is the vector composed of the values obtained by the global average pooling operation of each channel, C is the total number of channels, is the ReLU activation function, is the Sigmoid activation function, and is the weight matrix of the two fully connected layers in the SE module, is the eigenvalue of the channel after recalibrating the channel weight, is the weight value corresponding to channel c in the weight vector z, is the eigenvalue of the original channel c.
[0198] Optionally, the Performer encoder adopts a linear multi-head attention mechanism, which includes random feature mapping, linearized self-attention calculation, and multi-head self-attention output;
[0199] The random feature map is used to map the input vector to a low-dimensional feature space to form a low-dimensional feature space vector;
[0200] The linearized self-attention calculation is used to calculate the attention weights between input elements, and perform weighted summation on the value matrix according to the attention weights to obtain the output result based on the attention mechanism;
[0201] The multi-head self-attention output is used to splice the multi-head output results, and obtain the comprehensive output result through the linear transformation realized by the weight matrix.
[0202] Optionally, the calculation formula of the random feature map is:
[0203]
[0204] The linearized self-attention calculation formula is:
[0205]
[0206]
[0207] The calculation formula of the multi-head self-attention output is:
[0208]
[0209]
[0210] in, is a low-dimensional feature space vector, x is the input feature of each battery cell, is a random vector sampled from a specific distribution, M is the dimension of the random feature, is the linearized self-attention calculation result, is the query matrix, is the bond matrix, is the value matrix, The coefficient used to normalize the attention score, 1 is a full 1 vector, Output result of multi-head self-attention, for The output result of the head, Wo is the weight matrix.
[0211] Optionally, the Performer encoder uses residual connections and performs layer normalization on each layer;
[0212] The calculation formula for each layer in the Performer encoder is:
[0213]
[0214] in, is the layer calculation result, LayerNorm is the layer normalization calculation, is the output result of multi-head self-attention, and H is the hidden state vector of each battery cell at the last time step.
[0215] Optionally, the Performer encoder further includes an embedding layer;
[0216] The embedding layer generates a position embedding vector for representing the unique identity information of the battery cell according to the battery cell position of each battery cell.
[0217] Optionally, the model determination unit performs a process of determining a battery pack health status prediction model, including:
[0218] Acquire sample model input data, where the sample model input data is generated by performing sliding window processing on a three-dimensional matrix of a sample battery pack constructed based on sample historical data of battery cells;
[0219] Input the sample model input data into the constructed battery pack health status prediction model, train the model using the determined loss function and the selected optimizer, and iteratively update the model parameters until the preset training stop conditions are met, wherein the training stop conditions include reaching the maximum number of iterations, the loss function value being less than a preset threshold, or the validation set accuracy reaching a preset value;
[0220] The loss function is:
[0221]
[0222] The update rule for the optimizer to update the model parameters is:
[0223]
[0224] in, For the The true health status value of the sample battery pack, is the predicted value of the health status of the model, N is the total number of samples, are model parameters, and are the first-order and second-order moment estimates, respectively. is the learning rate, is the weight attenuation coefficient, is a preset constant.
[0225] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0226] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0227] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting the health status of a battery pack, characterized in that: include: Constructing a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and performing sliding window processing on the three-dimensional battery pack matrix in combination with the currently updated window size and sliding step size to generate model input data. The window size and the sliding step size are dynamically adjusted based on the predicted performance; Determine a battery pack health status prediction model, the battery pack health status prediction model including an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to use a linear multi-head attention mechanism to capture the global dependency between the cells in the battery pack to generate spatial correlation features, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping; The SE-TCN network includes multiple parallel and parameter-sharing SE-TCN structures, which are composed of a time convolution module and an SE module, wherein the time convolution module extracts the time dependence characteristics of the time series data of the corresponding battery cell through dilated convolution, and the SE module performs global average pooling on the channel through a compression operation, extracts the correlation between channels through an excitation operation, recalibrates the channel weights based on the correlation, and generates time series features in combination with the time dependence characteristics; The Performer encoder captures the global dependency between the cells by analyzing the feature data of each cell in the battery pack, thereby generating the spatial correlation feature, wherein the feature data of each cell is the time series feature; The model input data is input into the battery pack health state prediction model to obtain a health state prediction value of the battery pack output by the battery pack health state prediction model.
2. The method according to claim 1, characterized in that The three-dimensional matrix shape of the battery pack is: ; The model input data shape is: ; ; Among them, S is the total sample size or the number of time steps, B is the number of cells, F is the number of features, N is the number of samples, the window size is W, and the sliding step size is Δ.
3. The method according to claim 1, characterized in that The dilated convolution formula is: ; The calculation formula for global average pooling of channels through compression operation is: ; The calculation formula for extracting the correlation between channels through the excitation operation is: ; ; The calibration calculation formula for recalibrating channel weights is: ; in, is the dilated convolution output sequence, is the input sequence, is the convolution kernel size, The convolution kernel is at position The value at is the expansion rate, is the output time point, is the output value of channel c after global average pooling, L is the sequence length, is the activation value of channel c at position i, z is the weight vector obtained after the excitation operation, s is the vector composed of the values obtained by the global average pooling operation of each channel, C is the total number of channels, is the ReLU activation function, is the Sigmoid activation function, and is the weight matrix of the two fully connected layers in the SE module, is the eigenvalue of the channel after recalibrating the channel weight, is the weight value corresponding to channel c in the weight vector z, is the eigenvalue of the original channel c.
4. The method according to claim 1, wherein The linear multi-head attention mechanism includes random feature mapping, linearized self-attention calculation and multi-head self-attention output; The random feature map is used to map the input vector to a low-dimensional feature space to form a low-dimensional feature space vector; The linearized self-attention calculation is used to calculate the attention weights between input elements, and perform weighted summation on the value matrix according to the attention weights to obtain the output result based on the attention mechanism; The multi-head self-attention output is used to splice the multi-head output results, and obtain the comprehensive output result through the linear transformation realized by the weight matrix.
5. The method according to claim 4, characterized in that The calculation formula of the random feature map is: ; The linearized self-attention calculation formula is: ; ; The calculation formula of the multi-head self-attention output is: ; ; in, is a low-dimensional feature space vector, x is the input feature of each battery cell, is a random vector sampled from a specific distribution, M is the dimension of the random feature, is the linearized self-attention calculation result, is the query matrix, is the bond matrix, is the value matrix, The coefficient used to normalize the attention score, 1 is a full 1 vector, Output result of multi-head self-attention, for The output result of the head, Wo is the weight matrix.
6. The method according to claim 1, wherein The Performer encoder uses residual connections and performs layer normalization on each layer; The calculation formula for each layer in the Performer encoder is: ; in, is the layer calculation result, LayerNorm is the layer normalization calculation, is the output result of multi-head self-attention, and H is the hidden state vector of each battery cell at the last time step.
7. The method according to claim 1, characterized in that The Performer encoder also includes an embedding layer; The embedding layer generates a position embedding vector for representing the unique identity information of the battery cell according to the battery cell position of each battery cell.
8. The method according to claim 1, characterized in that The process of determining the battery pack health status prediction model includes: Acquire sample model input data, where the sample model input data is generated by performing sliding window processing on a three-dimensional matrix of a sample battery pack constructed based on sample historical data of battery cells; Input the sample model input data into the constructed battery pack health status prediction model, train the model using the determined loss function and the selected optimizer, and iteratively update the model parameters until the preset training stop conditions are met, wherein the training stop conditions include reaching the maximum number of iterations, the loss function value being less than a preset threshold, or the validation set accuracy reaching a preset value; The loss function is: ; The update rule for the optimizer to update the model parameters is: ; in, For the The true health status value of the sample battery pack, is the predicted value of the health status of the model, N is the total number of samples, are model parameters, and are the first-order and second-order moment estimates, respectively. is the learning rate, is the weight attenuation coefficient, is a preset constant.
9. A battery pack health status prediction device, characterized in that: include: a data processing unit, configured to construct a three-dimensional battery pack matrix based on the collected historical data of multiple cells in the battery pack, and perform sliding window processing on the three-dimensional battery pack matrix in combination with a currently updated window size and sliding step size to generate model input data, wherein the window size and sliding step size are dynamically adjusted based on the prediction performance; A model determination unit is used to determine a battery pack health status prediction model, wherein the battery pack health status prediction model includes an SE-TCN network, a Performer encoder, and a spatiotemporal fusion layer, wherein the SE-TCN network is used to capture the time dependency characteristics of the time series data of multiple cells in the battery pack to generate time series features, the Performer encoder is used to use a linear multi-head attention mechanism to capture the global dependency between the cells in the battery pack to generate spatial correlation features, and the spatiotemporal fusion layer obtains a health status prediction value by fusing the time series features and the spatial correlation feature mapping; The SE-TCN network includes multiple parallel and parameter-sharing SE-TCN structures, which are composed of a time convolution module and an SE module, wherein the time convolution module extracts the time dependence characteristics of the time series data of the corresponding battery cell through dilated convolution, and the SE module performs global average pooling on the channel through a compression operation, extracts the correlation between channels through an excitation operation, recalibrates the channel weights based on the correlation, and generates time series features in combination with the time dependence characteristics; The Performer encoder captures the global dependency between the cells by analyzing the feature data of each cell in the battery pack, thereby generating the spatial correlation feature, wherein the feature data of each cell is the time series feature; The model prediction unit is used to input the model input data into the battery pack health state prediction model to obtain the health state prediction value of the battery pack output by the battery pack health state prediction model.
Citation Information
Patent Citations
Hybrid model lithium battery health state monitoring method based on data enhancement
CN116106773A
Method and device for estimating residual life of vehicle-mounted battery pack and storage medium
CN117825962A
Ultra-short-term wind power combined prediction method based on TCN-SENet-Transformer
CN119357634A