Battery state analysis method and system based on expansive force information, medium and equipment
Through the multi-scale CNN-Transformer combination model, the battery expansion force information is analyzed, and the lag problem of battery status monitoring in the existing technology is solved, and the early prediction and accurate evaluation of the operating status of lithium batteries is achieved, which improves the safety and adaptability of the battery system.
Patent Information
- Application Number
- CN202510484564.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-01
AI Technical Summary
The existing lithium battery status monitoring methods cannot reflect the operating status of the battery in a timely and accurate manner, especially when the battery changes less and the voltage and temperature monitoring lag behind internal changes. The application of expansion force analysis in energy storage battery modules is not yet popular, and the threshold detection method cannot adapt to the needs of different models and environments.
The multi-scale CNN-Transformer combination model is used to preprocess and extract the battery expansion force information. The spatial changes are captured through convolutional neural networks, and the Transformer network captures the time dependence relationship, and combines the softmax regression layer for classification and judgment to realize battery operation state analysis.
It can catch battery abnormalities earlier, improve the accuracy and reliability of battery system safety management, adapt to changes in different batteries and environments, and provide flexible and intelligent battery status evaluation.
Smart Images

Figure CN120405418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of on-line detection of transmission lines, and particularly relates to a battery state analysis method, system, medium and device based on expansion force information. Background Art
[0002] As an efficient, portable and rechargeable energy solution, lithium batteries are an important part of current economic production and life in various fields such as 3C electronics, new energy vehicles, and electrochemical energy storage. However, with the increase in the energy density of lithium batteries, the number of cycles, and the rate requirements, it is difficult to guarantee the stability and safety of existing lithium batteries. In the case of abuse, thermal runaway may even occur, leading to battery fire and explosion, seriously endangering the safety of the economic society. Therefore, the effectiveness of battery health state detection technology directly determines the performance and reliability of the energy storage system.
[0003] Existing battery state monitoring methods mainly rely on data such as voltage, current, and temperature to monitor the working state of the battery. Voltage and current measurements, as the most commonly used means, can provide real-time monitoring information for the charging and discharging process of the battery. However, when the battery changes slightly, single voltage and current information often cannot reflect the situation of the battery in a timely manner; temperature monitoring can reflect the working condition of the battery to a certain extent, especially overheating is a significant feature of battery failure. However, temperature changes often lag behind the internal changes of the battery, so it is impossible to respond to potential battery failures in a timely manner. Therefore, existing battery state monitoring cannot accurately and timely reflect the operating state of the battery.
[0004] In contrast, expansion force, as a direct reflection of the internal physical changes of the battery, has strong sensitivity and timeliness. The expansion force detection technology can monitor in real time the volume expansion phenomenon of the battery caused by charge and discharge cycles and battery thermal runaway expansion during the charging and discharging process. This change can not only reveal the health status of the battery but also reflect potential safety hazards such as internal short circuit and thermal runaway. Since the change in expansion force is closely related to the change in the internal structure of the battery, this detection method can identify potential problems of the battery earlier than voltage and temperature monitoring, and has important research and application value.
[0005] Although the advantages of expansion force analysis in battery state monitoring are becoming increasingly apparent, it still faces many challenges in practical applications. At present, there have been related works to reflect the battery operation situation by monitoring the expansion deformation and expansion force of the battery. However, the expansion force analysis algorithm is not yet popular in the application of energy storage battery modules. Since energy storage battery modules usually consist of multiple battery cells, the distribution of expansion force will be more complex. How to effectively integrate the expansion force data of each cell to obtain a health status assessment of the entire module is still an urgent problem to be solved.
[0006] In addition, the expansion force warning algorithm also faces certain reliability challenges. Most of the existing battery state analysis methods are realized through threshold judgment, that is, the detection standard is set through experimental data. However, the expansion information of batteries with different models and specifications is not consistent, and the expansion force changes of batteries under different working conditions may show great differences. This makes the single threshold detection method may not be able to meet the needs of different types of batteries or different usage environments. Therefore, how to design a more flexible and intelligent algorithm to automatically adapt to the expansion force change characteristics of different batteries and improve the accuracy and reliability of energy storage batteries and modules is an important issue in the current research of battery safety monitoring technology. Summary of the Invention
[0007] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a battery state analysis method, system, medium and device based on expansion force information, which can capture battery anomalies earlier than the prior art and is of great significance to the safety management of battery systems.
[0008] To solve the above technical problems, the present invention is implemented by the following technical solutions:
[0009] In the first aspect, the present invention provides a battery state analysis method based on expansion force information, including:
[0010] Perform data preprocessing on the collected battery expansion force change information to obtain processed data;
[0011] Input the processed data into a trained multi-scale CNN-Transformer combined model: through a multi-scale convolutional neural network CNN, perform multi-channel feature extraction and fusion on the processed data to obtain multi-scale feature vectors; through a Transformer neural network, perform feature analysis on the multi-scale feature vectors to obtain the overall expansion state of the battery; a softmax regression layer classifies and judges the overall expansion state of the battery to obtain the battery operation state result.
[0012] Optionally, the data preprocessing includes:
[0013] Use a first-order low-pass filter algorithm and a moving average algorithm to denoise the collected battery expansion force change information to obtain denoised data;
[0014] Use the Min-Max normalization algorithm to normalize the denoised data and adjust data of different scales to a unified scale to obtain processed data;
[0015] The update formula of the first-order low-pass filter algorithm is as follows:
[0016]
[0017] Among them, represents the filtered data at time represents the input signal at time represents the filtered data at time represents the filtering factor;
[0018] The moving average algorithm is as follows:
[0019]
[0020] Among them, represents the moving average value at time represents the window size, represents the filtered data at time
[0021] The Min-Max normalization algorithm is as follows:
[0022]
[0023] Among them, represents the normalized data, represents the set of moving average values, represents the minimum value in represents the maximum value in
[0024] Optionally, the convolutional neural network CNN includes three convolutional layers with different-scale convolutional kernels. The convolutional layers use the ReLU activation function, and each convolutional layer is followed by a max pooling layer;
[0025] The data processing flow of the convolutional neural network CNN includes:
[0026] Perform a convolutional operation on the input data using the convolutional layer, and input the result of the convolution into the ReLU activation function to obtain local features;
[0027] Use the max pooling layer to reduce the dimensionality of the local features to obtain a feature vector.
[0028] Optionally, the data processing flow of the Transformer neural network includes:
[0029] Perform positional encoding on the input data to obtain the encoded data;
[0030] Input the encoded data into the encoder: extract features from the encoded data through a multi-head attention layer to obtain the output of the multi-head attention layer; perform a residual connection between the encoded data and the output of the multi-head attention layer, and perform layer normalization on the result of the residual connection to obtain normalized features; perform a non-linear transformation on the representation of each position in the normalized features through a feed-forward neural network to obtain non-linearly transformed features; perform a residual connection between the normalized features and the non-linearly transformed features, and perform layer normalization on the result of the residual connection to obtain the encoder output;
[0031] Input the encoder output into the decoder: perform positional encoding on the previous output of the decoder, perform self-attention calculation through a masked multi-head attention layer to obtain the output of the masked multi-head attention layer; perform a residual connection between the previous output of the decoder and the output of the masked multi-head attention layer, and perform layer normalization on the result of the residual connection to obtain a normalized output; input the encoder output and the normalized output into a multi-head attention layer for feature extraction to obtain the output of the multi-head attention layer; perform a residual connection between the output of the multi-head attention layer and the normalized output, and perform layer normalization on the result of the residual connection to obtain normalized features; perform a non-linear transformation on the representation of each position in the normalized features through a feed-forward neural network to obtain non-linearly transformed features; perform a residual connection between the normalized features and the non-linearly transformed features, and perform layer normalization on the result of the residual connection to obtain the decoder output.
[0032] Optionally, the training process of the multi-scale CNN-Transformer combined model includes:
[0033] Perform label processing on the processed data, use one-hot encoding to label the battery operating state as normal, slightly overcharged or overcharged, and divide it into a training set, a validation set and a test set according to a ratio;
[0034] Build a multi-scale CNN-Transformer combined model and perform model training: input the training set into the model to calculate the predicted value, and calculate the error between the predicted value and the true label through the cross-entropy loss function; according to the error between the predicted value and the label, calculate the gradient of each model parameter through the backpropagation algorithm; according to the calculated gradient, use the Adam optimization algorithm to update the model parameters;
[0035] Evaluate the model performance using the validation set at the end of each training epoch, and adjust the model parameters according to the evaluation results;
[0036] Use the test set to test the trained multi-scale CNN-Transformer combined model.
[0037] Optionally, the calculation formula of the cross-entropy loss function is as follows:
[0038]
[0039] Among them, represents the true label, represents the probability that the model predicts that the sample belongs to the th class, represents the number of label categories, represents the error between the predicted value and the label;
[0040] The calculation formula of the Adam optimization algorithm is as follows:
[0041]
[0042] Among them, represents the number of iterations, represents the th iteration of the model parameters, represents the th iteration of the model parameters, represents the learning rate, represents a preset constant, represents the th iteration of the decay rate of the first moment of the parameter gradient, represents the th iteration of the estimate of the first moment of the parameter gradient, represents the th iteration of the estimate of the first moment of the parameter gradient, represents the th iteration of the decay rate of the second moment of the parameter gradient, represents the th iteration of the estimate of the second moment of the parameter gradient, represents the th iteration of the estimate of the second moment of the parameter gradient, represents the first-order derivative, represents the second-order derivative.
[0043] In a second aspect, the present invention provides a battery state analysis system based on swelling force information, including:
[0044] A data processing module, configured to: perform data preprocessing on the collected battery swelling force change information to obtain processed data;
[0045] The battery state analysis module is used to: input the processed data into a trained multi-scale CNN-Transformer combined model; through a multi-scale convolutional neural network (CNN), perform multi-channel feature extraction and fusion on the processed data to obtain a multi-scale feature vector; through a Transformer neural network, perform feature analysis on the multi-scale feature vector to obtain the overall swelling state of the battery; and a softmax regression layer to classify and judge the overall swelling state of the battery to obtain the result of the battery operation state.
[0046] In a third aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of any one of the battery state analysis methods based on swelling force information in the first aspect are implemented.
[0047] In a fourth aspect, the present invention provides a computer device, including:
[0048] a memory for storing computer instructions;
[0049] a processor for executing the computer instructions to implement the steps of any one of the battery state analysis methods based on swelling force information in the first aspect.
[0050] In a fifth aspect, the present invention provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the steps of any one of the battery state analysis methods based on swelling force information in the first aspect are implemented.
[0051] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0052] 1. The battery state analysis method based on swelling force information provided by the present invention extracts the swelling force characteristics between single cells and adjacent cells in the battery module through a multi-scale convolutional neural network (CNN). The CNN performs multi-scale feature extraction and fusion on multi-channel sensor data through a convolutional layer, which helps to capture the spatial changes in the swelling force of the battery module and extract local information of the swelling force. By using a Transformer network to capture the long-term temporal dependence relationship of the swelling force changes during the operation of the battery, the performance and operation state of the battery module usually change over time. The Transformer can analyze the swelling force changes at different time points through its memory mechanism and predict the change trend of the battery performance in the module. Compared with the prior art, it can capture battery anomalies earlier, which is of great significance for the safety management of the battery system.
[0053] 2. The battery state analysis system based on swelling force information provided by the present invention analyzes and predicts the operating states of batteries and modules by setting up a data processing module and a battery state analysis module, using the battery swelling force information as the characteristic parameter of the battery operating state. Compared with the existing battery state analysis methods based on electrical parameters, it can capture battery anomalies earlier, which has practical significance and good application prospects.
[0054] 3. The computer-readable storage medium, computer device, and computer program product provided by the present invention can execute the steps of the battery state analysis method based on swelling force information provided by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 FIG. is a flowchart of a battery state analysis method based on swelling force information according to an embodiment of the present invention;
[0056] Figure 2 FIG. is a structural diagram of a Transformer network unit according to an embodiment of the present invention;
[0057] Figure 3 FIG. is a schematic diagram of the multi-head attention mechanism of a Transformer according to an embodiment of the present invention;
[0058] Figure 4 FIG. is a network architecture diagram of a multi-scale CNN-Transformer combined model according to an embodiment of the present invention;
[0059] Figure 5 FIG. is a schematic diagram of the training process of a multi-scale CNN-Transformer combined model according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0060] The technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific features in the embodiments of the present application and the embodiments are detailed descriptions of the technical solutions of the present application, rather than limitations on the technical solutions of the present application. Without conflict, the technical features in the embodiments of the present application and the embodiments can be combined with each other.
[0061] It should be noted that the term "and / or" in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0062] Embodiment 1:
[0063] The embodiment of the present invention discloses a battery state analysis method based on swelling force information. Refer toFigure 1 As shown in the figure, it specifically includes the following steps:
[0064] The present invention provides a battery state analysis method based on swelling force information, including:
[0065] S1. Perform data preprocessing on the collected battery swelling force change information to obtain processed data;
[0066] S2. Input the processed data into a trained multi-scale CNN-Transformer combined model: Through a multi-scale convolutional neural network CNN, perform multi-channel feature extraction and fusion on the processed data to obtain a multi-scale feature vector; Through a Transformer neural network, perform feature analysis on the multi-scale feature vector to obtain the overall swelling state of the battery; A softmax regression layer classifies and judges the overall swelling state of the battery to obtain the battery operation state result.
[0067] Specifically, in step S1, a thin-film pressure sensor is pasted on each battery cell in the module to collect the swelling force change information of each battery during the operation of the module; The battery cells can be soft-pack or square-shell batteries with different capacities and different types; In this embodiment, the single battery is selected as an LFP square-shell battery with a capacity of 280 Ah and a rated voltage of 3.2 V; The module can be a module composed of the above-mentioned single batteries in a 1P13S series connection method.
[0068] The thin-film pressure sensor is in a thin-film state, and its thickness is within 0.5 mm, so that it can be pasted between the batteries inside the module; And the thin-film pressure sensor has the function of detecting the magnitude of the pressure. A typical thin-film pressure sensor has a double-layer structure of interdigital electrodes - pressure-sensitive layer or a three-layer structure of surface electrodes - pressure-sensitive layer - surface electrodes. When pressure acts on the thin-film pressure sensor, the resistance of the sensor decreases as the pressure increases, thereby reflecting the change in the magnitude of the pressure.
[0069] The thin-film pressure sensor is pasted on the central area of the front of the battery; The number of sensors required is one more than the number of batteries that make up the module; Sensors are pasted on both sides of the center of the last battery in the module, and sensors are pasted on one side of the remaining batteries; The sides of all the batteries with sensors are arranged and fixed in sequence to form a module. At this time, there is a thin-film sensor between two batteries, and there is also a sensor between the batteries at both ends of the module and the side wall of the module; When the battery swells, it will squeeze the sensors on both sides, so the swelling force signals of the two sensors can reflect the swelling information of one battery; The sensor signals can be connected to the acquisition circuit by wired or wireless means to output signals.
[0070] The collected battery swelling force change information includes the data of all sensors in the module. The number of data channels is one more than the number of single cells. Each channel of data is a continuous signal collected by ADC. The data format of each frame is , where is the number of sensors.
[0071] Before inputting the data into the model, preprocessing is required, including noise reduction, normalization, and labeling. Specifically, it includes:
[0072] Use the first-order low-pass filtering algorithm and the moving average algorithm to reduce the noise of the collected battery swelling force change information to obtain denoised data; when reducing noise, detect outliers, apply smoothing algorithms, filtering and other methods to reduce the noise in the data; the collected battery swelling force change information is a signal related to time series, so use the low-pass filtering and moving average algorithms to improve the signal-to-noise ratio of the data; smoothing uses the moving average method, and smooth the time series data by calculating the average value within a fixed time window.
[0073] Use the Min-Max normalization algorithm to normalize the denoised data, adjust the data of different scales to a unified scale, and obtain the processed data; the purpose of normalization is to adjust the data of different scales or ranges to a unified scale to avoid the values of some features being too large or too small, affecting the effect of the model.
[0074] The update formula of the first-order low-pass filtering algorithm is as follows:
[0075]
[0076] Among them, represents the filtered data at time represents the input signal at time represents the filtered data at time represents the filtering factor.
[0077] The moving average algorithm is as follows:
[0078]
[0079] Among them, represents the moving average value at time represents the window size, represents the filtered data at time
[0080] The Min-Max normalization algorithm is as follows:
[0081]
[0082] Among them, represents the normalized data, represents the set of moving averages, represents the minimum value in represents the maximum value in
[0083] In step S2, the preprocessed battery swelling force data is used as the model input. Through the multi-layer neuron structure in the neural network model, features are automatically extracted from the input data, complex patterns in the data are learned, and prediction or classification is performed according to the trained weight parameters. In this example, a multi-scale CNN convolutional neural network is used to extract the features of the sensor data, and the Transformer neural network is combined to analyze the temporal features of the sensor data, so as to accurately analyze the change rules of the sensor data in this time period. The obtained result is used as the input of the regression layer, and the result output by the regression layer is the battery operating state to be obtained.
[0084] In this embodiment, a multi-scale convolutional neural network (CNN) is used to extract features from the swelling force data, capturing features such as abnormal fluctuations, sudden swelling in the battery body swelling force signal, and extrusion transmission of the swelling force between adjacent batteries. The CNN convolutional neural network uses various convolution methods when processing temporal information, extracts and fuses the features of the self and adjacent channel sensor data, further expands the receptive field of the model, increases the depth of the network model, and improves the prediction effect. This multi-scale CNN can extract feature information at multiple levels by performing convolution operations at different scales (i.e., different sizes of convolution kernels). Small-scale convolution kernels can capture the self-swelling force features, while large-scale convolution kernels can extract the local rules of the adjacent channel swelling force. Therefore, the multi-scale CNN can simultaneously capture the detailed information and global information in the sensor data, enabling the model to more comprehensively understand the spatial distribution rules in the data and having better model generalization ability.
[0085] The convolutional neural network CNN includes 3 convolutional layers with different scales of convolution kernels, and the sizes of the convolution kernels are [1 1], [2 1], [3 1] respectively, and the stride is 1. The convolutional layer uses the ReLU activation function to capture the local features in the swelling force signal. After each convolutional layer, there is a max pooling layer, and the pooling layer further screens the output features of the convolutional layer to obtain more important feature information, playing a role in dimensionality reduction. The pooled data is directly input into the Transformer neural network.
[0086] The data processing flow of the convolutional neural network CNN includes:
[0087] The input data is convolved using a convolutional layer, and the result of the convolution is input into the ReLU activation function to obtain local features;
[0088] The local features are dimensionally reduced using a max pooling layer to obtain a feature vector.
[0089] The calculation formula for a convolutional layer with a convolutional kernel of [1 1] is as follows:
[0090]
[0091] Among them, represents the output of the convolutional layer at time represents the value of the convolutional kernel at position the value, represents the input signal at time
[0092] The calculation formulas for convolutional layers with convolutional kernels of [2 1] and [3 1] are as follows:
[0093]
[0094] Among them, represents the value of the output matrix at position the value, represents the value of the input matrix at position the value, represents the convolutional kernel at position the value, is the index of the convolutional kernel usually the convolutional kernel size is the convolutional kernel slides on the input sequence, calculates the weighted sum of the overlapping regions, and obtains each element in the output matrix in.
[0095] The calculation formula for the ReLU layer is as follows:
[0096]
[0097] Among them, represents the ReLU activation function, represents the max function, represents the input to the ReLU layer;
[0098] The calculation formula for the max pooling layer is as follows:
[0099]
[0100] Among them, represents the output at the corresponding position of the pooling window P represents the max function represents the elements within the pooling window
[0101] The multi-scale feature vectors extracted by the CNN are input into the Transformer neural network; the Transformer captures the dynamic characteristics of the battery self and adjacent swelling forces over time, and analyzes the input swelling force features to judge the overall swelling and operating state of the battery module; the Transformer structure is used to analyze the data time series features to reflect the changes in sensor data.
[0102] Reference Figure 2 As shown, the Transformer is a neural network based on the self-attention mechanism, designed specifically for parallel processing of sequence data; its core modules include an encoder, a decoder, and positional encoding, suitable for capturing global dependencies in sequences (such as long-range associations in sensor time series data), and the core design is as follows:
[0103] 1. Encoder: The encoder is stacked by N identical layers, and each layer contains the following sub-modules:
[0104] Multi-Head Self-Attention: As shown in Figure 3 dynamically calculates the association weights between each position in the sequence and other positions, and extracts global context features;
[0105] Feed-Forward Network (FFN): Performs a non-linear transformation on the representation of each position to enhance the model's expressive power;
[0106] Residual Connection and Layer Normalization: Alleviates the vanishing gradient and accelerates training.
[0107] 2. Decoder: The decoder is also stacked by N identical layers and contains the following sub-modules (taking the sequence generation task as an example):
[0108] Masked Multi-Head Self-Attention: Prevents the current position from attending to future information (causality constraint);
[0109] Encoder-Decoder Attention: Integrates the output information of the encoder to establish cross-sequence dependencies;
[0110] Feed-Forward Neural Network: Has the same structure as the encoder;
[0111] Residual connection and layer normalization.
[0112] 3. Positional Encoding: Since Transformer has no recursive structure, sequence order information needs to be explicitly injected.
[0113] The core module formulas of Transformer include:
[0114] 1. Self-Attention: The input sequence generates Query (Q), Key (K), and Value (V) through linear transformation: <X
[0115]
[0116] Among them, is a learnable weight matrix, is the input data;
[0117] Attention weight calculation (scaled dot-product attention):
[0118]
[0119] ]>Among them, is used to prevent the dot-product result from being too large and causing the gradient to vanish. The Softmax function normalizes the weights into a probability distribution;
[0120] 2. Multi-Head Attention: Splits Q, K, and V into h "heads", calculates them in parallel, and then concatenates the results:
[0121]
[0122] Among them, represents the set of attention heads, is the projection matrix for each head, is the projection output matrix, represents the concatenation result;
[0123] 3. Feed-Forward Neural Network (FFN): Applies two fully connected networks independently to each position:
[0124]
[0125] Among them, , represents the output of the feedforward neural network, represents the input of the feedforward neural network, represents the bias;
[0126] 4. Residual connection and layer normalization: The output of each sub-module is ensured to have stable gradients and accelerated convergence through residual connection and layer normalization:
[0127]
[0128] Among them, represents normalization, represents the residual connection, represents the input, represents the output.
[0129] Specifically, the Transformer structure in this embodiment uses 2 Transformer units, and each layer contains 64 hidden layers; the data processing flow of the Transformer neural network includes:
[0130] Perform positional encoding on the input data to obtain encoded data;
[0131] Input the encoded data into the encoder: perform feature extraction on the encoded data through the multi-head attention layer to obtain the output of the multi-head attention layer; perform a residual connection between the encoded data and the output of the multi-head attention layer, perform layer normalization on the result obtained from the residual connection to obtain normalized features; perform a non-linear transformation on the representation of each position in the normalized features through a feedforward neural network to obtain non-linearly transformed features; perform a residual connection between the normalized features and the non-linearly transformed features, perform layer normalization on the result obtained from the residual connection to obtain the encoder output;
[0132] Input the encoder output into the decoder: perform positional encoding on the previous output of the decoder, perform self-attention calculation through the masked multi-head attention layer to obtain the output of the masked multi-head attention layer; perform a residual connection between the previous output of the decoder and the output of the masked multi-head attention layer, perform layer normalization on the result obtained from the residual connection to obtain a normalized output; input the encoder output and the normalized output into the multi-head attention layer for feature extraction to obtain the output of the multi-head attention layer; perform a residual connection between the output of the multi-head attention layer and the normalized output, perform layer normalization on the result obtained from the residual connection to obtain normalized features; perform a non-linear transformation on the representation of each position in the normalized features through a feedforward neural network to obtain non-linearly transformed features; perform a residual connection between the normalized features and the non-linearly transformed features, perform layer normalization on the result obtained from the residual connection to obtain the decoder output.
[0133] ReferenceFigure 4 It is a network architecture diagram of a multi-scale CNN-Transformer combined model provided according to an embodiment of the present invention; the multi-scale CNN-Transformer combined model has a self-attention mechanism, and the self-attention mechanism can significantly improve the network's ability in feature representation. Especially when processing the battery expansion force information of temporal relationships, by allowing the network to focus on the most critical parts of the input data, it helps the model capture important features and temporal change information more effectively, thereby improving the prediction accuracy of the model; the parameter settings of the multi-scale CNN-Transformer combined model are shown in Table 1 below.
[0134] Table 1: Parameter settings of the multi-scale CNN-Transformer combined model
[0135]
[0136] It should be noted that introducing a Transformer neural network after the CNN layer is because compared with the CNN convolutional neural network commonly used in traditional sensor data analysis, the Transformer neural network can handle the time dependence of sensor data; specifically, during the operation of the battery, various physical characteristics (current, voltage, temperature, expansion force) change over time, and these changes reflect the operating state of the battery. Moreover, the charging and discharging process, aging, etc. of the battery are dynamic, and their change patterns accumulate over time. Therefore, using a Transformer network can capture the change trend of the battery expansion force information through the memory ability of the model, helping the system make a more accurate analysis of the battery operating state.
[0137] Reference Figure 5 As shown, the training process of the multi-scale CNN-Transformer combined model includes:
[0138] Perform label processing on the processed data, use one-hot encoding to label the battery operating state as normal, slightly overcharged, or overcharged, and divide it into a training set, a validation set, and a test set according to a ratio;
[0139] Build a multi-scale CNN-Transformer combined model and perform model training: input the training set into the model to calculate the predicted value, calculate the error between the predicted value and the true label through the cross-entropy loss function; according to the error between the predicted value and the label, calculate the gradient of each model parameter through the backpropagation algorithm; according to the calculated gradient, use the Adam optimization algorithm to update the model parameters;
[0140] Evaluate the model performance using the validation set after each training cycle, and adjust the model parameters according to the evaluation results;
[0141] The trained multi-scale CNN-Transformer combined model is tested using the test set.
[0142] Label processing is the process of processing the target variable (label) in classification or regression tasks, aiming to ensure that the label meets the input requirements of the model during training; the label processing is implemented by one-hot encoding, where each category is represented as a vector, the length of the vector is equal to the number of categories, and only one position is 1 and the rest are 0; the categories are divided into three steps: normal, slightly overcharged, and overcharged according to the battery operating status; the preprocessed data is divided into a training set, a validation set, and a test set in a ratio of 7:2:1; the CNN-Transformer combined model is trained using the training set and the validation set, and the generalization ability of the model is evaluated using the test set.
[0143] During the training process of the CNN-Transformer combined model, the Adam optimizer is used for optimization; the Dropout layer is used to prevent overfitting, and the Dropout rate is between 0.2 and 0.5; the loss function uses the cross-entropy loss function (Cross-Entropy Loss) to evaluate the model, aiming to minimize the error between the predicted value and the actual value.
[0144] The calculation formula of the Adam optimization algorithm is as follows:
[0145]
[0146] where, represents the number of iterations, represents the model parameters at the -th iteration, represents the model parameters at the -th iteration, represents the learning rate, represents a preset constant, represents the decay rate of the first moment of the parameter gradient at the -th iteration, represents the estimate of the first moment of the parameter gradient at the -th iteration, represents the estimate of the first moment of the parameter gradient at the -th iteration, represents the decay rate of the second moment of the parameter gradient at the -th iteration, represents the estimate of the second moment of the parameter gradient at the -th iteration, represents the estimate of the second moment of the parameter gradient at the -th iteration, represents the first-order derivative, represents the second-order derivative.
[0147] The calculation formula of the cross-entropy loss function is as follows:
[0148]
[0149] where, represents the true label, represents the probability that the model predicts the sample belongs to the th class, usually obtained through the softmax function, represents the number of label classes, represents the error between the predicted value and the label.
[0150] The physical meaning of the loss function is the difference between the operating state of the real battery and the operating state result output by the model; the model measures the gap between the predicted value and the true value through the loss function, and the error calculated by the loss function is used in the backpropagation algorithm to adjust the weights and biases of the model to minimize the loss value, thereby improving the prediction accuracy of the model. The specific steps are as follows:
[0151] 1. Forward propagation: The input data is calculated through each layer of the neural network to obtain the predicted value;
[0152] 2. Calculate the loss: The loss function calculates the error based on the predicted value and the true value.;
[0153] 3. Backward propagation: Calculate the gradient of the loss function with respect to each parameter through the backpropagation algorithm, and update the model parameters according to the gradient;
[0154] 4. Parameter update: Use the optimization algorithm to update the weights and biases of the model and calculate the new predicted value, gradually reducing the value of the loss function.
[0155] By continuously iterating this process, the neural network gradually optimizes the parameters during training, thereby improving the prediction accuracy of the model.
[0156] It should be noted that the battery state analysis method provided in this embodiment is only illustrated by the above division of software and hardware. In actual applications, the above functions can be expanded or allocated to different modules according to needs to complete all or part of the functions described above; for example, when applied to multiple battery modules or a battery pack containing multiple modules, the operating states of multiple battery modules can be analyzed according to the above steps. Only a thin-film pressure sensor needs to be installed in the battery module to collect data, and this data can be directly input into the CNN-Transformer combined model after the preprocessing to analyze the swelling force information of the module, realizing the monitoring of the operating state of the battery module.
[0157] Embodiment 2:
[0158] Based on the same inventive concept as in Embodiment 1, an embodiment of the present invention discloses a battery state analysis system based on swelling force information, including:
[0159] A data processing module, configured to: perform data preprocessing on the collected battery swelling force change information to obtain processed data;
[0160] A battery state analysis module, configured to: input the processed data into a trained multi-scale CNN-Transformer combined model; through a multi-scale convolutional neural network CNN, perform multi-channel feature extraction and fusion on the processed data to obtain a multi-scale feature vector; through a Transformer neural network, perform feature analysis on the multi-scale feature vector to obtain the overall swelling state of the battery; a softmax regression layer, perform classification and judgment on the overall swelling state of the battery to obtain the battery operation state result.
[0161] For the specific function implementation of the above modules, refer to the relevant content in the method of Embodiment 1, which will not be elaborated.
[0162] Embodiment 3:
[0163] This embodiment provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the battery state analysis method based on swelling force information as described in any one of Embodiment 1 are implemented.
[0164] Embodiment 4:
[0165] This embodiment provides a computer device, including:
[0166] A memory, configured to store computer instructions;
[0167] A processor, configured to execute the computer instructions to implement the steps of the battery state analysis method based on swelling force information as described in any one of Embodiment 1.
[0168] Embodiment 5:
[0169] This embodiment provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the steps of the battery state analysis method based on swelling force information as described in any one of Embodiment 1 are implemented.
[0170] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0171] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0172] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that realizes the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0174] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope protected by the present invention and the claims. These all belong to the protection scope of the present invention.
Claims
1. A battery state analysis method based on swelling force information, characterized in that, Including: Performing data preprocessing on the collected battery expansion force change information to obtain processed data; Inputting the processed data into a trained multi-scale CNN-Transformer combined model: Through a multi-scale convolutional neural network (CNN), performing multi-channel feature extraction and fusion on the processed data to obtain a multi-scale feature vector; Through a Transformer neural network, performing feature analysis on the multi-scale feature vector to obtain the overall expansion state of the battery; A softmax regression layer, classifying and judging the overall expansion state of the battery to obtain the result of the battery operating state.
2. The battery state analysis method based on expansion force information according to claim 1, wherein The data preprocessing includes: Using a first-order low-pass filtering algorithm and a moving average algorithm to denoise the collected battery expansion force change information to obtain denoised data; Using the Min-Max normalization algorithm to normalize the denoised data, adjusting data of different scales to a unified scale to obtain processed data; The update formula of the first-order low-pass filtering algorithm is as follows: Among them, represents the filtered data at time represents the input signal at time represents the filtered data at time represents the filtering factor; The moving average algorithm is as follows: Among them, represents the moving average at time represents the window size, represents the filtered data at time The Min-Max normalization algorithm is as follows: Among them, represents the normalized data, represents the set of moving averages, represents the minimum value in represents the maximum value in 3. The battery state analysis method based on expansion force information according to claim 1, wherein The convolutional neural network (CNN) includes 3 convolutional layers with different-scale convolutional kernels. The convolutional layers use the ReLU activation function, and each convolutional layer is followed by a max pooling layer; The data processing flow of the convolutional neural network (CNN) includes: Using the convolutional layer to perform a convolution operation on the input data, and inputting the result of the convolution into the ReLU activation function to obtain local features; Using the max pooling layer to perform data dimensionality reduction on the local features to obtain a feature vector.
4. The battery state analysis method based on expansion force information according to claim 1, wherein, The data processing flow of the Transformer neural network includes: Performing positional encoding on the input data to obtain encoded data; Inputting the encoded data into the encoder: Through a multi-head attention layer, performing feature extraction on the encoded data to obtain the output of the multi-head attention layer; Connecting the encoded data and the output of the multi-head attention layer in a residual connection, performing layer normalization on the result of the residual connection to obtain normalized features; Through a feed-forward neural network, performing a non-linear transformation on the representation of each position in the normalized features to obtain non-linearly transformed features; Connecting the normalized features and the non-linearly transformed features in a residual connection, performing layer normalization on the result of the residual connection to obtain the encoder output; Input the output of the encoder into the decoder: Perform positional encoding on the previous output of the decoder, perform self-attention calculation through the masked multi-head attention layer to obtain the output of the masked multi-head attention layer; perform residual connection on the previous output of the decoder and the output of the masked multi-head attention layer, and perform layer normalization on the result of the residual connection to obtain the normalized output; input the encoder output and the normalized output into the multi-head attention layer for feature extraction to obtain the output of the multi-head attention layer; perform residual connection on the output of the multi-head attention layer and the normalized output, and perform layer normalization on the result of the residual connection to obtain the normalized feature; perform non-linear transformation on the representation of each position in the normalized feature through the feed-forward neural network to obtain the non-linearly transformed feature; perform residual connection on the normalized feature and the non-linearly transformed feature, and perform layer normalization on the result of the residual connection to obtain the decoder output.
5. The battery state analysis method based on expansion force information according to claim 1, wherein The training process of the multi-scale CNN-Transformer combined model includes: Perform label processing on the processed data, use one-hot encoding to label the battery operating state as normal, slightly overcharged or overcharged, and divide it into a training set, a validation set and a test set according to a ratio; Build a multi-scale CNN-Transformer combined model and perform model training: Input the training set into the model to calculate the predicted value, and calculate the error between the predicted value and the true label through the cross-entropy loss function; According to the error between the predicted value and the label, calculate the gradient of each model parameter through the backpropagation algorithm; According to the calculated gradient, use the Adam optimization algorithm to update the model parameters; Evaluate the model performance using the validation set after each training cycle and adjust the model parameters according to the evaluation results; Use the test set to test the trained multi-scale CNN-Transformer combined model.
6. The battery state analysis method based on expansion force information according to claim 5, characterized in that, The calculation formula of the cross-entropy loss function is as follows: Among them, represents the true label, represents the probability that the model predicts the sample belongs to the th class, represents the number of label categories, represents the error between the predicted value and the label; The calculation formula of the Adam optimization algorithm is as follows: Among them, represents the number of iterations, represents the model parameters of the -th iteration, model parameters of the -th iteration, represents the learning rate, represents a preset constant, represents the decay rate of the first moment of the parameter gradient of the -th iteration, represents the estimate of the first moment of the parameter gradient of the -th iteration, represents the estimate of the first moment of the parameter gradient of the -th iteration, represents the decay rate of the second moment of the parameter gradient of the -th iteration, represents the estimate of the second moment of the parameter gradient of the -th iteration, represents the estimate of the second moment of the parameter gradient of the -th iteration, represents the first-order derivative, represents the second-order derivative.
7. A battery state analysis system based on swelling force information, characterized in that It includes: A data processing module for: performing data preprocessing on the collected battery swelling force change information to obtain processed data; A battery state analysis module for: Inputting the processed data into the trained multi-scale CNN-Transformer combined model: Through the multi-scale convolutional neural network CNN, perform multi-channel feature extraction and fusion on the processed data to obtain a multi-scale feature vector; Through the Transformer neural network, perform feature analysis on the multi-scale feature vector to obtain the overall swelling state of the battery; The softmax regression layer classifies and judges the overall swelling state of the battery to obtain the battery operating state result.
8. A computer-readable storage medium having computer instructions stored thereon, characterized in that, When the computer instruction is executed by the processor, the steps of the battery state analysis method based on swelling force information described in any one of claims 1-6 are implemented.
9. A computer device, characterized in that, It includes: A memory for storing computer instructions; A processor for executing the computer instructions to implement the steps of the battery state analysis method based on swelling force information described in any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by a processor, the steps of the battery state analysis method based on expansion force information described in any one of claims 1-6 are implemented.
Citation Information
Cited By
Battery cell expansion force non-contact prediction method and system based on pulse neural network
CN121113334A