Battery cell capacity prediction method and device, electronic equipment and storage medium
By using the first charging data of the battery cell in the capacitance separation process for feature extraction, and building a gated attention model and a multi-head attention model, the problem of difficulty in accurately predicting the battery cell capacity in the existing technology is solved, and the problem of realizing the ability to achieve Fast and accurate cell capacity prediction, reducing production costs.
Patent Information
- Application Number
- CN202411450276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to accurately predict the battery cell capacity of the battery cell. Physical models require a lot of prior knowledge and complex parameter adjustments, and statistical methods are difficult to capture the complex relationship between the battery cell capacity and working conditions.
A battery cell capacity prediction method is proposed. By obtaining the first charging data of the battery cell during the capacitance separation process, performing feature extraction, and using the gated attention model and the multi-head attention model to construct the battery cell capacity prediction model to realize Accurate prediction of battery cell capacity.
This method can quickly and accurately predict the battery cell capacity, reduce the dependence on prior knowledge, simplify the model construction and adjustment process, improve the accuracy of battery cell capacity prediction, and reduce the time and space cost of battery cell production process .
Smart Images

Figure CN119471382A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric vehicles, and in particular to a method and device for predicting battery cell capacity, an electronic device, and a storage medium. Background Art
[0002] The battery cell is the basic unit of the battery, which is responsible for storing and converting electrical energy. The battery cell capacity is a key indicator for evaluating the quality of the battery cell. In the related art, physical models or statistical methods are used to predict the battery cell capacity. Although the physical model can provide a theoretical description of the physical process inside the battery cell, it often requires a lot of prior knowledge and complex parameter adjustments. The statistical method is to perform data analysis on historical data to infer the battery cell capacity, but it is difficult to capture the complex relationship between the battery cell capacity and the working conditions. Both physical models and statistical methods are difficult to accurately predict the battery cell capacity. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a method and device for predicting battery cell capacity, an electronic device and a storage medium, aiming to accurately predict the battery cell capacity of a battery cell.
[0004] To achieve the above object, a first aspect of an embodiment of the present application provides a method for predicting cell capacity, the method comprising:
[0005] Obtain the first charging data of the battery cell during the capacity division process;
[0006] Extracting features from the first charging data to obtain initial battery cell charging features;
[0007] Inputting the initial battery cell charging characteristics into a battery cell capacity prediction model, wherein the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model;
[0008] Extracting the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features;
[0009] Extracting the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells;
[0010] The cell capacity of the cell is predicted according to the charging characteristics of the target cell.
[0011] In some embodiments, the gated attention sub-model includes a first gated sub-model, a second gated sub-model, and a third gated sub-model, and the extracting the initial cell charging feature by the gated attention sub-model to obtain the candidate cell charging feature includes:
[0012] Extracting query features from the initial cell charging features by using the first gating sub-model to obtain a charging query feature vector;
[0013] Extract key features from the initial cell charging features through the second gating sub-model to obtain a charging key feature vector;
[0014] Extracting the value feature of the initial cell charging feature through the third gating sub-model to obtain a charging value feature vector;
[0015] The charging query feature vector, the charging key feature vector and the charging value feature vector are used as the candidate battery cell charging features.
[0016] In some embodiments, the first gating sub-model includes a first single-layer perceptron, a second single-layer perceptron, a first activation layer, and a second activation layer, and the query feature extraction of the initial battery cell charging feature by the first gating sub-model to obtain a charging query feature vector includes:
[0017] Performing a first feature mapping on the initial battery cell charging feature by using the first single-layer perceptron to obtain a first charging mapping feature;
[0018] Performing a second feature mapping on the initial battery cell charging feature by the second single-layer perceptron to obtain a second charging mapping feature;
[0019] Performing a first activation process on the first charging mapping feature through the first activation layer to obtain a first charging activation feature;
[0020] Performing a second activation process on the second charging mapping feature through the second activation layer to obtain a second charging activation feature;
[0021] The first charging activation feature and the second charging activation feature are multiplied element by element to obtain the charging query feature vector.
[0022] In some embodiments, the multi-head attention sub-model includes multiple sub-attention models, the candidate battery cell charging features include a charging query feature vector, a charging key feature vector, and a charging value feature vector, and the feature extraction of the candidate battery cell charging features by the multi-head attention sub-model to obtain the target battery cell charging features includes:
[0023] According to the number of models of the sub-attention models, the charging query feature vector is vector-segmented to obtain a sub-query feature vector of each of the sub-attention models, the charging key feature vector is vector-segmented to obtain a sub-key feature vector of each of the sub-attention models, and the charging value feature vector is vector-segmented to obtain a sub-value feature vector of each of the sub-attention models;
[0024] Performing attention calculation on the sub-query feature vector, the sub-key feature vector and the sub-value feature vector through the sub-attention model to obtain a sub-attention feature;
[0025] Feature splicing is performed on a plurality of the sub-attention features to obtain the target battery cell charging feature.
[0026] In some embodiments, the cell capacity prediction model is trained according to the following steps:
[0027] Obtain the first charge and discharge data of the sample battery during the capacity division process;
[0028] Calculating a reference cell capacity according to the capacity and temperature of the discharge data at the cut-off voltage in the first charge and discharge data;
[0029] Inputting the charging data in the first charge and discharge data into a preset model for capacity prediction to obtain a predicted cell capacity; the preset model has the same network structure as the cell capacity prediction model, and the cell capacity prediction model is obtained by training the preset model;
[0030] Calculate the loss according to the reference cell capacity and the predicted cell capacity to obtain a target loss;
[0031] The model parameters of the preset model are adjusted according to the target loss to obtain the battery cell capacity prediction model.
[0032] In some embodiments, calculating the reference cell capacity according to the capacity and temperature of the discharge data at the cut-off voltage in the first charge and discharge data includes:
[0033] Subtract the temperature of the discharge data at the cut-off voltage moment from the preset reference temperature to obtain a difference temperature;
[0034] Multiply the preset compensation coefficient by the differential temperature to obtain the differential capacity;
[0035] The capacity of the discharge data at the cut-off voltage is subtracted from the difference capacity to obtain the reference cell capacity.
[0036] In some embodiments, inputting the charging data in the first charge and discharge data into a preset model for capacity prediction to obtain a predicted cell capacity includes:
[0037] Extracting features from the charging data to obtain sample charging features;
[0038] performing a normalization process on the charging characteristics of the samples;
[0039] The sample charging characteristics after the standardization process are input into the preset model for capacity prediction to obtain the predicted battery cell capacity.
[0040] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a battery cell capacity prediction device, the device comprising:
[0041] An acquisition module is used to acquire the first charging data of the battery cell during the capacity division process;
[0042] A first feature extraction module, used to extract features from the first charging data to obtain initial battery cell charging features;
[0043] An input module, used for inputting the initial battery cell charging characteristics into a battery cell capacity prediction model, wherein the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model;
[0044] A second feature extraction module is used to extract the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features;
[0045] A third feature extraction module is used to extract the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells;
[0046] A prediction module is used to predict the cell capacity of the cell according to the charging characteristics of the target cell.
[0047] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the battery cell capacity prediction method of the above-mentioned first aspect when executing the computer program.
[0048] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the battery cell capacity prediction method of the above-mentioned first aspect is implemented.
[0049] The cell capacity prediction method, cell capacity prediction device, electronic device and computer-readable storage medium proposed in the present application only need to obtain the first charging data of the cell in the capacity division process, avoiding the subsequent charging and discharging process of the cell, and greatly reducing the time cost and space cost of the cell production process. Feature extraction is performed on the first charging data to extract key features from the first charging data to obtain the initial cell charging features. The initial cell charging features are input into the cell capacity prediction model, and the cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model. By combining the powerful fitting ability of the neural network, accurate and rapid prediction of the cell capacity is achieved. The initial cell charging features are feature extracted by the gated attention sub-model to capture the key information in the cell charging process, realize the learning and modeling of the complex relationship between the data, and obtain the candidate cell charging features. Feature extraction is performed on the candidate cell charging features by the multi-head attention sub-model, which enhances the ability of the model to focus on key feature information and obtains the target cell charging features. Through the neural network with a gated combination of multi-head attention mechanisms, the mathematical relationship between the input data and the output cell capacity can be better modeled to achieve cell capacity prediction. The cell capacity is predicted according to the charging characteristics of the target cell, which reduces the dependence on prior knowledge, simplifies the model construction and adjustment process, and improves the accuracy of the cell capacity prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a method for predicting battery cell capacity provided in an embodiment of the present application;
[0051] Figure 2 yes Figure 1 Flow chart of step S140 in FIG.
[0052] Figure 3 yes Figure 2 Flow chart of step S210 in FIG.
[0053] Figure 4 yes Figure 1 Flow chart of step S150 in FIG.
[0054] Figure 5 is a flow chart of the training process of the battery cell capacity prediction model provided in an embodiment of the present application;
[0055] Figure 6 yes Figure 5 Flowchart of step S520 in FIG.
[0056] Figure 7 yes Figure 5 Flow chart of step S530 in FIG.
[0057] Figure 8aIt is a rendering of the battery cell capacity prediction method provided in an embodiment of the present application;
[0058] Figure 8b is another effect diagram of the battery cell capacity prediction method provided in an embodiment of the present application;
[0059] Figure 8c is another effect diagram of the battery cell capacity prediction method provided in an embodiment of the present application;
[0060] Fig. 9 is a schematic diagram of the structure of a battery cell capacity prediction device provided in an embodiment of the present application;
[0061] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0065] With the rapid development of electric vehicles and large, medium and small energy storage systems, the global production capacity of new energy batteries continues to grow, which puts higher requirements on the reliability and cost control of battery production processes. Battery capacity is a key indicator for evaluating battery quality. Traditional battery capacity prediction methods are often based on physical models or statistical methods. Although physical models can provide a theoretical description of the physical processes inside the battery, they often require a lot of prior knowledge and complex parameter adjustments. Statistical methods are based on the analysis and inference of historical data, but it is difficult to capture the complex relationship between battery capacity and working conditions. At the same time, considering factors such as battery cell attenuation, temperature changes and discharge rate, the prediction accuracy of traditional methods such as physical models and statistical methods is limited, and it is difficult to accurately predict the battery capacity of the battery.
[0066] Based on this, the embodiments of the present application provide a battery cell capacity prediction method, a battery cell capacity prediction device, an electronic device and a computer-readable storage medium, aiming to improve the accuracy of battery cell capacity prediction.
[0067] The battery cell capacity prediction method, battery cell capacity prediction device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the battery cell capacity prediction method in the embodiments of the present application is described.
[0068] The battery cell capacity prediction method provided in the embodiment of the present application relates to the field of electric vehicle technology. The battery cell capacity prediction method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the battery cell capacity prediction method, etc., but is not limited to the above forms.
[0069] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0070] Figure 1 is an optional flow chart of a method for predicting battery cell capacity provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S160.
[0071] Step S110, obtaining the first charging data of the battery cell in the capacity division process;
[0072] Step S120, extracting features from the first charging data to obtain initial battery cell charging features;
[0073] Step S130, inputting the initial battery cell charging characteristics into a battery cell capacity prediction model, where the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model;
[0074] Step S140, extracting the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features;
[0075] Step S150, extracting the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells;
[0076] Step S160: predicting the cell capacity of the cell according to the charging characteristics of the target cell.
[0077] In step S110 of some embodiments, in the cell production process, formation and capacity division play an important role in ensuring the performance and quality of the cell, and are two key production processes that affect the cell capacity. The capacity division process includes constant current and constant voltage charging, shelving, constant current discharge, re-shelving, and re-constant current and constant voltage charging. With the rapid development and scale expansion of the electric vehicle industry, the demand for cell production capacity is growing, which puts higher requirements on the reliability and cost control of the cell production process. In order to reduce the consumption of power resources, time resources and human resources, and reduce the difficulty of data collection, the embodiment of the present application uses the first charge and discharge data of the cell in the capacity division process to predict the cell capacity, rather than the charge and discharge data of the complete charge and discharge process, and optimizes the capacity division process based on the predicted cell capacity. The cell can be a lithium iron phosphate cell, and the first charge and discharge data includes the charging data of the first constant current and constant voltage charging stage and the discharge data of the first constant current discharge. The charging data of the first charge and discharge data, that is, the charging data of the first constant current and constant voltage charging stage, is used as the first charging data. The first charging data includes data collection time, battery cell current, battery cell voltage, battery cell capacity, battery cell energy and battery cell temperature. The discharge data of the first constant current discharge is only used to calculate the reference capacity of the battery cell. Among them, the battery cell energy is the total amount of electric energy that the battery cell can store and release, usually in watt-hours or kilowatt-hours. The embodiment of the present application does not require battery cell production data of other processes, which greatly reduces the data demand.
[0078] In step S120 of some embodiments, the first charging data contains a large amount of information, and there may be redundant features or features that are irrelevant to the cell capacity prediction in the large amount of information. In order to improve the efficiency of the cell capacity prediction, the charging data in the first charging data during the capacity division process is feature extracted to reduce the data dimension, retain key feature information, and obtain the initial cell charging features. Feature extraction can be used to obtain the feature sequence required by the neural network model, enhance the correlation between the model and the actual charging and discharging physical mechanism, and thus improve the training and reasoning efficiency of the model. The initial cell charging features contain important physical information in the cell charging process, including charging start temperature, charging end temperature, temperature difference before and after charging, charging start voltage, charging end voltage, voltage difference during a preset charging time (such as 3 minutes), charging constant current time, charging constant voltage time, and total charging time.
[0079] In step S130 of some embodiments, the initial cell charging characteristics are input into the cell capacity prediction model to predict the cell capacity. The cell capacity prediction model is a neural network based on a gated combined multi-head attention mechanism constructed using a deep learning framework such as Pytorch, including multiple network layers cascaded in sequence, the first network layer and the last network layer are single-layer perceptrons, and each network layer between the first network layer and the last network layer includes a gated attention sub-model and a multi-head attention sub-model. The single-layer perceptron is a fully connected layer, which can be used as a basic component of a fully connected neural network to receive input data and perform linear transformations on the input data. By combining the gated attention mechanism and the multi-head attention mechanism, the model's ability to focus on key feature information is enhanced, the reliance on prior knowledge is reduced, and the model construction and adjustment process is simplified, so that the cell capacity prediction model can effectively capture key information in the cell charging process, and realize the learning and modeling of the complex relationship between cell charging information and cell capacity. At the same time, combined with the powerful fitting ability of neural networks, it can efficiently process large amounts of data, improve the accuracy and stability of predictions, and greatly reduce the time, economic and space costs of the battery production process, which has great positive significance for reducing the manufacturing cost of lithium batteries and improving production efficiency.
[0080] See also Figure 2 In some embodiments, the gated attention sub-model includes a first gated sub-model, a second gated sub-model, and a third gated sub-model, and the first gated sub-model, the second gated sub-model, and the third gated sub-model have the same model structure. Step S140 may include but is not limited to steps S210 to S240:
[0081] Step S210, extracting query features from the initial battery cell charging features through the first gating sub-model to obtain a charging query feature vector;
[0082] Step S220, extracting key features of the initial battery cell charging features through the second gated sub-model to obtain a charging key feature vector;
[0083] Step S230, extracting the value feature of the initial cell charging feature through the third gating sub-model to obtain a charging value feature vector;
[0084] Step S240: taking the charging query feature vector, the charging button feature vector and the charging value feature vector as candidate battery cell charging features.
[0085] In step S210 of some embodiments, the first gated sub-model, the second gated sub-model and the third gated sub-model are used to focus on different parts of the initial battery cell charging features, and are respectively used to extract query vectors, key vectors and value vectors to focus on key information. Query vector, key vector and value vector are three key concepts in the self-attention mechanism. Specifically, the initial battery cell charging features are linearly transformed by the single-layer perceptron of the first network layer, and the query feature extraction is performed on the initial battery cell charging features after the feature extraction of the first network layer by the first gated sub-model to obtain a charging query feature vector. The charging query feature vector is a query vector used for self-attention calculation, which is the key feature of battery cell charging captured by the first gated sub-model from the initial battery cell charging features. The feature extraction method of the second gated sub-model and the third gated sub-model is the same as that of the first gated sub-model.
[0086] In step S220 of some embodiments, the second gating sub-model extracts key features from the initial cell charging features after feature extraction at the first network layer to obtain a charging key feature vector. The charging key feature vector is a key vector for self-attention calculation and is a key feature of cell charging captured by the second gating sub-model from the initial cell charging features.
[0087] In step S230 of some embodiments, the third gating sub-model extracts value features from the initial cell charging features after feature extraction at the first network layer to obtain a charging value feature vector. The charging value feature vector is a value vector used for self-attention calculation and is a key feature of cell charging captured by the third gating sub-model from the initial cell charging features.
[0088] In step S240 of some embodiments, the charging query feature vector, the charging button feature vector and the charging value feature vector are used as candidate battery cell charging features, so that the subsequent multi-head attention sub-model uses the candidate battery cell charging features to perform self-attention calculations.
[0089] In the above steps S210 to S240, the gated attention mechanism can selectively focus on or suppress certain information flows in the initial battery cell charging characteristics, thereby improving the efficiency of model learning and the reasoning effect. By introducing the gated attention mechanism before the query, key, and value projection of the self-attention mechanism, the input of each attention head will be adjusted by the gated mechanism before the multi-head attention calculation, so that the model is more focused on the key information of battery cell charging related to the battery cell capacity prediction, eliminating irrelevant interference, and thus improving the accuracy of the battery cell capacity prediction.
[0090] See also Figure 3 In some embodiments, the first gated sub-model includes a first single-layer perceptron, a second single-layer perceptron, a first activation layer, and a second activation layer. Step S210 may include, but is not limited to, steps S310 to S350:
[0091] Step S310, performing a first feature mapping on the initial battery cell charging feature by using a first single-layer perceptron to obtain a first charging mapping feature;
[0092] Step S320, performing a second feature mapping on the initial battery cell charging feature by a second single-layer perceptron to obtain a second charging mapping feature;
[0093] Step S330, performing a first activation process on the first charging mapping feature through the first activation layer to obtain a first charging activation feature;
[0094] Step S340, performing a second activation process on the second charging mapping feature through a second activation layer to obtain a second charging activation feature;
[0095] Step S350: multiply the first charging activation feature and the second charging activation feature element by element to obtain a charging query feature vector.
[0096] In step S310 of some embodiments, the first gated sub-model includes two parallel single-layer perceptrons and two parallel activation layers, the two single-layer perceptrons are respectively a first single-layer perceptron and a second single-layer perceptron, and the two activation layers are respectively a first activation layer and a second activation layer. The initial battery cell charging feature is linearly transformed by the first single-layer perceptron (Linear1) to extract implicit features of the initial battery cell charging feature and obtain a first charging mapping feature.
[0097] In step S320 of some embodiments, in order to achieve sufficient and comprehensive feature extraction, the initial battery cell charging characteristics are linearly transformed by a second single-layer perceptron (Linear2) to extract implicit features of the initial battery cell charging characteristics, generate a gating signal, and obtain a second charging mapping feature.
[0098] In step S330 of some embodiments, the first activation layer uses a ReLU activation function, and nonlinear factors are introduced through the ReLU activation function, so that the model can capture the nonlinear interaction between the input features and learn the intrinsic structure of the input features, thereby accurately modeling the complex relationship between the charging characteristics and the cell capacity, thereby improving the accuracy of the cell capacity prediction. The first charging mapping feature is first activated by the ReLU activation function of the first activation layer to obtain the first charging activation feature. If the first charging mapping feature is represented by x, the first charging activation feature is represented by max(0,x).
[0099] If the feature dimension of the initial battery cell charging feature I is B×N, B is the batch size in deep learning training and testing, that is, batchsize, and N is the length of the feature vector. The initial battery cell charging feature I is linearly transformed by the first single-layer perceptron, and the ReLU activation function is used to obtain the hidden representation h, that is, the first charging activation feature, h=ReLu(Linear1(I)), and the first charging activation feature is a B×N feature vector.
[0100] In step S340 of some embodiments, the second activation layer adopts a sigmoid activation function, and the sigmoid activation function is used to generate a value between 0 and 1. The second charging mapping feature is subjected to a second activation process by the sigmoid activation function of the second activation layer, ensuring that the gating value is between 0 and 1, and obtaining a second charging activation feature. The elements in the second charging activation feature are greater than or equal to 0 or less than or equal to 1, indicating the importance of the second charging mapping feature. The second charging activation feature is a gating vector g, g = Sigmoid (Linear2 (I)). If the second charging mapping feature is represented by x, the second charging activation feature is represented by 1 / (1 + exp (-x)).
[0101] In step S350 of some embodiments, the first charging activation feature and the second charging activation feature are element-wise multiplied to weight the hidden representation according to the gating vector, so that the gating attention focuses more on important features and ignores features that have little impact on the prediction results, thereby obtaining a charging query feature vector. The charging query feature vector is a weighted hidden representation.
[0102] In the above steps S310 to S350, weights are applied to the features extracted by the single-layer perceptron, and the features of specific parts are weighted by multiplication operations, so that the gated attention can selectively focus on different parts of the input data, which helps the network learn the importance of the input data and better understand the structure and content of the input data, thereby improving the performance and generalization ability of the network.
[0103] See also Figure 4In some embodiments, the multi-head attention sub-model includes multiple sub-attention models, the candidate cell charging features include a charging query feature vector, a charging key feature vector, and a charging value feature vector, the charging query feature vector, the charging key feature vector, and the charging value feature vector have the same feature dimensions, and step S150 may include but is not limited to steps S410 to S430:
[0104] Step S410, according to the number of sub-attention models, the charging query feature vector is vector-segmented to obtain the sub-query feature vector of each sub-attention model, the charging key feature vector is vector-segmented to obtain the sub-key feature vector of each sub-attention model, and the charging value feature vector is vector-segmented to obtain the sub-value feature vector of each sub-attention model;
[0105] Step S420, performing attention calculation on the sub-query feature vector, the sub-key feature vector and the sub-value feature vector through the sub-attention model to obtain a sub-attention feature;
[0106] Step S430, performing feature splicing on multiple sub-attention features to obtain the target battery cell charging feature.
[0107] In step S410 of some embodiments, different feature vectors extracted by linear transformation and gating operation of multiple independent gated sub-models are used as input of the multi-head attention sub-model. The multi-head attention sub-model adopts a multi-head attention mechanism. The multi-head attention mechanism allocates attention of different dimensions to the input information in parallel by adding multiple attention heads to capture richer features and context information. Multiple attention heads are multiple sub-attention models, and each head performs attention calculation independently, that is, different attention weights are assigned to different parts of the input sequence. The number of models is the number of attention heads. The candidate battery cell charging features are feature segmented according to the number of models, and the candidate battery cell charging features are segmented into multiple parallel subspaces, each subspace corresponding to an attention head, so as to capture feature representation information from different subspaces. Each subspace includes a sub-query feature vector, a sub-key feature vector and a sub-value feature vector, and the feature dimensions of the sub-query feature vector, the sub-key feature vector and the sub-value feature vector are the same. If the number of models is h, the charging query feature vector Q, charging key feature vector K and charging value feature vector V are divided into h parts, and the sub-query feature vector, sub-key feature vector and sub-value feature vector of the i-th sub-attention model are represented as Q i , K i 、V i If the charging query feature vector Q, the charging key feature vector K, and the charging value feature vector V are all feature vectors of shape B×d, then the sub-query feature vector, the sub-key feature vector, and the sub-value feature vector are all feature vectors of shape B×d / h.
[0108] In step S420 of some embodiments, the sub-query feature vector, the sub-key feature vector and the sub-value feature vector are subjected to attention calculation by the sub-attention model, so as to perform feature scaling by a dot product operation to stabilize the gradient and obtain a sub-attention feature. The self-attention feature is expressed as:
[0109]
[0110] Wherein, T represents the transpose operation.
[0111] Multiple sub-attention models can capture diverse feature patterns in different feature representation subspaces in parallel. The Softmax function operation is performed along the last dimension to ensure that the sum of the attention weights is 1.
[0112] In step S430 of some embodiments, the sub-attention features output by all sub-attention models are concatenated, and the concatenated features are linearly transformed to obtain output feature representations, and the output feature representations are layer normalized to obtain target battery cell charging features.
[0113] The above steps S410 to S430 can capture richer features and context information from different feature spaces by processing the feature representations of different attention heads in parallel through multi-head attention. In combination with gated attention, the input feature vectors are deeply interacted and information fused, which significantly enhances the learning and expression capabilities of the model when processing complex data structures, thereby improving the accuracy of cell capacity prediction.
[0114] See also Figure 5 In some embodiments, the training process of the cell capacity prediction model may include but is not limited to steps S510 to S550:
[0115] Step S510, obtaining the first charge and discharge data of the sample battery cell during the capacity division process;
[0116] Step S520, calculating the reference cell capacity according to the capacity and temperature of the discharge data at the cut-off voltage in the first charge and discharge data;
[0117] Step S530, inputting the charging data in the first charge and discharge data into a preset model for capacity prediction to obtain a predicted cell capacity; the preset model has the same network structure as the cell capacity prediction model, and the cell capacity prediction model is obtained by training the preset model;
[0118] Step S540, calculating the loss according to the reference cell capacity and the predicted cell capacity to obtain a target loss;
[0119] Step S550, adjusting the model parameters of the preset model according to the target loss to obtain a cell capacity prediction model.
[0120] In step S510 of some embodiments, the first charge and discharge data of a large number of sample cells in the capacity division process are obtained, the first charge and discharge data include the charging data of the first constant current and constant voltage charging stage and the discharge data of the first constant current discharge, the sample cells are cells used for model training, the discharge data in the first charge and discharge data include discharge time, discharge voltage, cell capacity and discharge temperature, and the unit of cell capacity can be mAh (milliampere hour). The first charge and discharge data are preprocessed to exclude samples that are manually suspended and samples of machine failure to avoid the influence of abnormal samples on the training results.
[0121] In step S520 of some embodiments, the time when the discharge time reaches the preset cut-off time or the discharge voltage reaches the preset cut-off voltage is used as the cut-off voltage moment. The preset cut-off voltage and the preset cut-off time can be set according to actual conditions, and the embodiments of the present application do not specifically limit this. The cell capacity (capacity) and the discharge temperature (temperature) at the cut-off voltage moment are extracted from the discharge data of the first charge and discharge data, and the reference cell capacity is calculated. The reference cell capacity of the sample cell is the actual cell capacity of the sample cell, which can be used as a true label of the preset model.
[0122] In step S530 of some embodiments, the charging data of the first constant current and constant voltage charging stage in the first charge and discharge data is feature extracted to obtain a feature sequence, which includes the charging start temperature, the charging end temperature, the temperature difference before and after charging, the charging start voltage, the charging end voltage, the voltage difference of the preset charging time (such as 3 minutes), the charging constant current time, the charging constant voltage time, and the total charging time. Traditional machine learning methods usually require a large amount of production process data, which not only increases the difficulty of data collection, but also limits its application in certain application scenarios. In addition, since machine learning models usually require a large amount of computing resources to train and optimize, this makes its application in resource-limited environments impractical. The embodiment of the present application only uses the charging data in the capacity division process, and extracts key features from the charging data to obtain a feature sequence, and inputs the feature sequence into the preset model for capacity prediction to obtain the predicted cell capacity, which realizes the accurate, fast and low-cost prediction of the actual capacity of the cell in the capacity division stage, saves other intermediate production processes, and greatly reduces economic costs and energy consumption. The predicted cell capacity is the total capacity of the sample cell in the constant current discharge stage.
[0123] In deep learning, the division of training sets and test sets is crucial to the evaluation and verification of model performance. In order to ensure that the training set and the test set are independent and representative sample sets, a random sampling method is usually used to divide the data set. In order to make the model have a strong generalization ability, the feature sequences of a large number of batteries are randomly divided into training sets and test sets in a ratio of 7:3. The neural network is trained using the training set, and the trained neural network is tested using the test set and evaluation data is obtained. By evaluating the accuracy of the network model on an independent test data set, the performance of the model in actual application scenarios can be more objectively understood. The embodiment of the present application mainly uses the network architecture constructed by the Pytorch deep learning framework for training and testing. During the network training process, the Adam optimizer is used for optimization, and the batch size is set to 128. The initial learning rate is set to 0.001, and a total of 500 training rounds (epochs) are trained. The entire training process is performed on an NVIDIA GeForce RTX 4060 graphics card.
[0124] The preset model has the same network structure as the cell capacity prediction model, and the cell capacity prediction model is trained by the preset model. The preset model includes a single-layer perceptron and a gated combination multi-head module, and the gated combination multi-head module includes a gated attention sub-model and a multi-head attention sub-model. In an embodiment of the present application, the feature dimension of the feature sequence input to the preset model is B×9 (9 features), and after passing through a single-layer perceptron, the feature is linearly transformed into a feature vector of B×128 (the length of the intermediate feature vector is 128). If the preset model includes two gated combination multi-head modules, the feature dimension after the first gated combination multi-head module is B×128, and the feature dimension after the second gated combination multi-head module is still B×128. The predicted capacity value is output by a single-layer perceptron, that is, the output feature dimension is B×1.
[0125] In step S540 of some embodiments, the preset model is trained and the network parameters are updated through the propagation algorithm of deep learning. The loss is calculated according to the reference cell capacity and the predicted cell capacity to obtain the target loss. The target loss is used to measure the average error between the model prediction value and the actual observation value. The target loss is calculated as follows:
[0126]
[0127] Among them, RMSE is the root mean square error; n is the number of samples; y i is the reference cell capacity of the ith cell; is the predicted cell capacity of the i-th cell.
[0128] In step S550 of some embodiments, the model parameters of the preset model are adjusted to minimize the target loss to obtain an initial cell capacity prediction model, the trained neural network is tested using a test set, the network parameters that perform best on the test set are retained as the final cell capacity prediction model and the model is deployed so that the cell capacity prediction model can be used in a computer or device in a production environment. By recording the initial constant voltage and constant current data of the cell capacity division process, the actual total capacity of the cell can be predicted.
[0129] The indicators used for model testing are root mean square error RMSE and determination coefficient R 2 The coefficient of determination is a statistic that indicates the proportion of the variability of the dependent variable (target variable) that can be explained by the independent variable (feature variable). It is the square of the ratio of the covariance of the predicted value and the true value to the variance of the true value, ranging from 0 to 1, which measures the degree of fit of the model to the data. 2 The closer the value is to 1, the better the model fits the data. The coefficient of determination is calculated as follows:
[0130]
[0131] in, It is the average of all actual capacity values, i.e. the benchmark cell capacity.
[0132] In the embodiment of the present application, the number of samples in the training set and the test set are 35459 and 8865 respectively, and the performance of the battery capacity prediction model on the test set is: RMSE is 375.8724, R 2 It is 0.8056, which shows the effectiveness and accuracy of the scheme.
[0133] In addition, in order to prevent the increase of prediction errors caused by data drift, it is necessary to regularly obtain the actual capacity of the battery cells through the normal capacity division process to obtain training labels, and extract the feature sequence of the charging data of the battery cells in the constant current and constant voltage charging stage to add to the training set to update the network model parameters.
[0134] Through the above steps S510 to S550, a cell capacity prediction model can be obtained, so as to perform accurate and rapid capacity prediction based on the cell capacity prediction model.
[0135] See also Figure 6 In some embodiments, step S520 may include but is not limited to steps S610 to S630:
[0136] Step S610, subtracting the temperature of the discharge data at the cut-off voltage moment from the preset reference temperature to obtain a difference temperature;
[0137] Step S620, multiplying the preset compensation coefficient by the differential temperature to obtain the differential capacity;
[0138] Step S630, subtracting the capacity of the discharge data at the cut-off voltage from the difference capacity to obtain a reference cell capacity.
[0139] In step S610 of some embodiments, the discharge temperature at the cut-off voltage moment is subtracted from the preset reference temperature to obtain the difference temperature. The discharge temperature is the temperature of the sample cell at the end of discharge, and the preset reference temperature can be set according to actual conditions, for example, 29.2°C.
[0140] In step S620 of some embodiments, the preset compensation coefficient is multiplied by the differential temperature to obtain the differential capacity. The preset compensation coefficient is used to indicate the effect of temperature change on the battery capacity. If the preset compensation coefficient is 2%, it means that for every 1°C increase in the temperature of the sample battery cell, the capacity of the sample battery cell increases by 2%. The differential capacity is the capacity change caused by the differential temperature.
[0141] In step S630 of some embodiments, the capacity of the discharge data at the cut-off voltage is subtracted from the difference capacity to obtain the reference cell capacity. The reference cell capacity is calculated as follows:
[0142] Reference cell capacity = capacity of discharge data at the cut-off voltage moment - preset compensation coefficient * (temperature of discharge data at the cut-off voltage moment - preset reference temperature);
[0143] Among them, * represents multiplication operation.
[0144] Through the above steps S610 to S630, the reference cell capacity can be obtained, and the reference cell capacity can be used as a label to participate in the training of the neural network to obtain a cell capacity prediction model.
[0145] See also Figure 7 In some embodiments, step S530 may include but is not limited to steps S710 to S730:
[0146] Step S710, extracting features from charging data to obtain sample charging features;
[0147] Step S720, standardizing the sample charging characteristics;
[0148] Step S730, inputting the standardized sample charging characteristics into a preset model for capacity prediction to obtain a predicted cell capacity.
[0149] In step S710 of some embodiments, feature extraction is performed on the charging data in the first charge and discharge data to obtain sample charging features. The sample charging features include charging information in the constant current and constant voltage charging stage, which is a feature sequence consisting of charging start temperature, charging end temperature, temperature difference before and after charging, charging start voltage, charging end voltage, voltage difference of a preset charging time (such as 3 minutes), charging constant current time, charging constant voltage time, and total charging time.
[0150] In step S720 of some embodiments, since the dimensions of the sample charging features are different, the scale differences may be large, resulting in some features having too much influence on model training, while the influence of other features is ignored. Therefore, it is necessary to standardize the sample charging features to constrain the sample charging features between [-1,1]. Through standardization, all feature elements in the sample charging features can be scaled to a similar scale range to accelerate the convergence process of the model and suppress gradient explosion and gradient disappearance. At the same time, standardization can also help the model better generalize to new and unseen data. The standardization calculation formula is:
[0151] x′=(x-μ) / σ,
[0152] Among them, x is the eigenvalue of the sample charging feature, μ is the mean of the eigenvalue, σ is the standard deviation of the eigenvalue, and x′ is the standardized eigenvalue.
[0153] The sample charging characteristics include multiple characteristic elements. For each characteristic element, the characteristic element is standardized according to the mean and variance of the characteristic elements of a large number of battery cells.
[0154] In step S730 of some embodiments, the standardized sample charging characteristics are input into a preset model for capacity prediction to obtain a predicted cell capacity. The preset model has the same network structure as the cell capacity prediction model, and the cell capacity prediction model is trained by the preset model. The preset model includes a single-layer perceptron and a gated combination multi-head module, and the gated combination multi-head module includes a gated attention sub-model and a multi-head attention sub-model.
[0155] In the above steps S710 to S730, by standardizing the sample charging characteristics, the problem of poor model training effect caused by inconsistent dimensions can be avoided.
[0156] In step S160 of some embodiments, the target battery cell charging characteristics are input into a single-layer perceptron for linear transformation, and the characteristics are mapped to a single value by the single-layer perceptron to predict the battery cell capacity and output the predicted battery cell capacity.
[0157] Figure 8aIt is a schematic diagram of the training process of the battery cell capacity prediction model provided by the embodiment of the present application, the horizontal axis is the number of training iterations (training rounds), the vertical axis is the RMSE loss function value (after standardization), and the RMSE loss function values of the training set and the test set are the training loss and the test loss, respectively. The training loss and test loss of the embodiment of the present application can converge quickly, and show good battery cell capacity prediction performance on both the training set and the test set. Figure 8b This is a prediction error percentage diagram of the cell capacity prediction model provided by the embodiment of the present application on the test set. The horizontal axis represents the error percentage, and the vertical axis represents the sample frequency, i.e., the number of samples. The calculation formula for the error percentage of each sample is:
[0158] (predicted capacity - actual capacity) / actual capacity*100,
[0159] from Figure 8b It can be seen that the error percentage of 99.72% of the test set samples is within 1%, and the embodiment of the present application improves the prediction accuracy of the battery cell capacity prediction. 100 samples are randomly selected from the test set, and a line graph is drawn with the number of samples as the horizontal axis and the actual capacity and predicted capacity of these 100 samples as the vertical axis, as shown in the figure. Figure 8c As shown, the blue line is y_true, and the yellow line is y_pred. y_true represents the true capacity, and y_pred represents the predicted capacity. Both the true capacity and the predicted capacity are measured in milliampere hours. Figure 8c It can be seen that the predicted capacity is close to the actual capacity, which ensures the accuracy of the cell capacity prediction.
[0160] See also Fig. 9 The present application also provides a battery cell capacity prediction device, which can implement the above-mentioned battery cell capacity prediction method. The battery cell capacity prediction device includes:
[0161] An acquisition module 910 is used to acquire the first charging data of the battery cell during the capacity division process;
[0162] A first feature extraction module 920 is used to extract features from the first charging data to obtain initial battery cell charging features;
[0163] An input module 930, used to input the initial battery cell charging characteristics into the battery cell capacity prediction model, where the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model;
[0164] A second feature extraction module 940 is used to extract the initial battery cell charging features through a gated attention sub-model to obtain candidate battery cell charging features;
[0165] The third feature extraction module 950 is used to extract the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells;
[0166] The prediction module 960 is used to predict the cell capacity of the cell according to the charging characteristics of the target cell.
[0167] The specific implementation of the battery cell capacity prediction device is basically the same as the specific implementation of the above-mentioned battery cell capacity prediction method, and will not be repeated here.
[0168] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned battery cell capacity prediction method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0169] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0170] The processor 1010 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0171] The memory 1020 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1020 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1020, and the processor 1010 calls and executes the battery cell capacity prediction method of the embodiment of this application;
[0172] Input / output interface 1030, used to implement information input and output;
[0173] Communication interface 1040, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0174] Bus 1050 , which transmits information between various components of the device (e.g., processor 1010 , memory 1020 , input / output interface 1030 , and communication interface 1040 );
[0175] The processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 are connected to each other in communication within the device via a bus 1050 .
[0176] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned battery cell capacity prediction method is implemented.
[0177] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0178] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0179] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0180] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0181] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0182] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0183] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0184] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0185] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0188] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for predicting battery cell capacity, characterized in that: The method comprises: Obtain the first charging data of the battery cell during the capacity division process; Extracting features from the first charging data to obtain initial battery cell charging features; Inputting the initial battery cell charging characteristics into a battery cell capacity prediction model, wherein the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model; Extracting the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features; Extracting the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells; The cell capacity of the cell is predicted according to the charging characteristics of the target cell.
2. The method for predicting battery cell capacity according to claim 1, characterized in that: The gated attention sub-model includes a first gated sub-model, a second gated sub-model and a third gated sub-model, and extracting the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features includes: Extracting query features from the initial cell charging features by using the first gating sub-model to obtain a charging query feature vector; Extract key features from the initial cell charging features through the second gating sub-model to obtain a charging key feature vector; Extracting the value feature of the initial cell charging feature through the third gating sub-model to obtain a charging value feature vector; The charging query feature vector, the charging key feature vector and the charging value feature vector are used as the candidate battery cell charging features.
3. The method for predicting battery cell capacity according to claim 2, characterized in that: The first gating sub-model includes a first single-layer perceptron, a second single-layer perceptron, a first activation layer, and a second activation layer. The query feature extraction of the initial cell charging feature by the first gating sub-model to obtain a charging query feature vector includes: Performing a first feature mapping on the initial battery cell charging feature by using the first single-layer perceptron to obtain a first charging mapping feature; Performing a second feature mapping on the initial battery cell charging feature by the second single-layer perceptron to obtain a second charging mapping feature; Performing a first activation process on the first charging mapping feature through the first activation layer to obtain a first charging activation feature; Performing a second activation process on the second charging mapping feature through the second activation layer to obtain a second charging activation feature; The first charging activation feature and the second charging activation feature are multiplied element by element to obtain the charging query feature vector.
4. The method for predicting battery cell capacity according to claim 1, characterized in that: The multi-head attention sub-model includes multiple sub-attention models, the candidate battery cell charging features include a charging query feature vector, a charging key feature vector and a charging value feature vector, and the feature extraction of the candidate battery cell charging features by the multi-head attention sub-model to obtain the target battery cell charging features includes: According to the number of models of the sub-attention models, the charging query feature vector is vector-segmented to obtain a sub-query feature vector of each of the sub-attention models, the charging key feature vector is vector-segmented to obtain a sub-key feature vector of each of the sub-attention models, and the charging value feature vector is vector-segmented to obtain a sub-value feature vector of each of the sub-attention models; Performing attention calculation on the sub-query feature vector, the sub-key feature vector and the sub-value feature vector through the sub-attention model to obtain a sub-attention feature; Feature splicing is performed on a plurality of the sub-attention features to obtain the target battery cell charging feature.
5. The method for predicting battery cell capacity according to any one of claims 1 to 4, characterized in that: The cell capacity prediction model is trained according to the following steps: Obtain the first charge and discharge data of the sample battery during the capacity division process; Calculating a reference cell capacity according to the capacity and temperature of the discharge data at the cut-off voltage in the first charge and discharge data; Inputting the charging data in the first charge-discharge data into a preset model for capacity prediction to obtain a predicted cell capacity; The preset model has the same network structure as the cell capacity prediction model, and the cell capacity prediction model is obtained by training the preset model; Calculate the loss according to the reference cell capacity and the predicted cell capacity to obtain a target loss; The model parameters of the preset model are adjusted according to the target loss to obtain the battery cell capacity prediction model.
6. The method for predicting battery cell capacity according to claim 5, characterized in that: The step of calculating the reference cell capacity according to the capacity and temperature of the discharge data at the cut-off voltage in the first charge and discharge data comprises: Subtract the temperature of the discharge data at the cut-off voltage moment from the preset reference temperature to obtain a difference temperature; Multiplying the preset compensation coefficient by the differential temperature to obtain the differential capacity; The capacity of the discharge data at the cut-off voltage is subtracted from the difference capacity to obtain the reference cell capacity.
7. The method for predicting battery cell capacity according to claim 5, characterized in that: The step of inputting the charging data in the first charge-discharge data into a preset model for capacity prediction to obtain a predicted cell capacity includes: Extracting features from the charging data to obtain sample charging features; performing a normalization process on the charging characteristics of the samples; The sample charging characteristics after the standardization process are input into the preset model for capacity prediction to obtain the predicted battery cell capacity.
8. A battery cell capacity prediction device, characterized in that: The device comprises: An acquisition module is used to acquire the first charging data of the battery cell during the capacity division process; A first feature extraction module, used to extract features from the first charging data to obtain initial battery cell charging features; An input module, used to input the initial battery cell charging characteristics into a battery cell capacity prediction model, wherein the battery cell capacity prediction model includes a gated attention sub-model and a multi-head attention sub-model; A second feature extraction module is used to extract the initial battery cell charging features through the gated attention sub-model to obtain candidate battery cell charging features; A third feature extraction module is used to extract the charging features of the candidate battery cells through the multi-head attention sub-model to obtain the charging features of the target battery cells; A prediction module is used to predict the cell capacity of the cell according to the charging characteristics of the target cell.
9. An electronic device, characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the battery cell capacity prediction method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the battery cell capacity prediction method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method and device for predicting initial capacity of energy storage system, equipment and storage medium
CN119917959A
Energy storage system initial capacity prediction method and device, equipment and storage medium
CN119917959B
Method and device for predicting maximum available capacity of battery cell and energy storage system
CN120142956A