Transformer model training, electrochemical model parameter identification method, system and device
By using the Transformer model training method and combining parameter set and voltage loss function to optimize the lithium battery electrochemical model, the problems of long parameter identification time and poor generalization ability in the existing technology are solved, and efficient parameter prediction with strong generalization ability is achieved, which is suitable for energy storage power stations and electric vehicles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI MAKESENS ENERGY STORAGE TECH CO LTD
- Filing Date
- 2025-08-26
- Publication Date
- 2026-08-04
AI Technical Summary
Existing heuristic-based electrochemical model parameter identification for lithium batteries is time-consuming and has poor generalization ability. This is especially true when the operating conditions of the battery cells are singular, resulting in low parameter identification efficiency and wasted computing power.
The Transformer model training method is adopted. By constructing multiple sets of electrochemical model parameter sets and combining parameter set loss function and voltage loss function to optimize model parameters, unsupervised learning is achieved. The model is trained using electrochemical model simulation data to improve the generalization ability of parameter prediction.
It improves the efficiency and generalization ability of lithium battery electrochemical model parameter identification, reduces training time, and is applicable to large amounts of cell data for energy storage power stations and electric vehicles without the need for label training.
Smart Images

Figure CN121034477B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery technology, specifically to a Transformer model training and electrochemical model parameter identification method, system, and device. Background Technology
[0002] Electrochemical models (EMs) can fully reflect the internal state of a battery, such as the lithium-ion concentration distribution at the positive and negative electrodes, potential distribution, and overpotential, significantly improving the management capabilities of lithium batteries. However, EMs involve a large number of coupled partial differential equations, especially dozens of physical parameters, which limits their practical application. With the improvement of hardware capabilities, model parameters can be obtained in a data-driven manner through methods such as heuristic algorithms (genetic algorithms, particle swarm optimization, cuckoo algorithm, etc.), neural networks, and Kalman filtering.
[0003] Current heuristic-based parameter identification methods suffer from several drawbacks. They are time-consuming, often taking several hours, require pre-setting battery parameter ranges, and necessitate repeated calls to the electrochemical model for each identification, resulting in significant computational waste. Furthermore, existing battery cells, such as those in energy storage power stations, often operate under relatively predictable and uniform conditions (e.g., charging and discharging at a fixed current rate with minimal variation), leading to poor generalization ability of parameters identified through heuristic algorithms. Summary of the Invention
[0004] The purpose of this application is to provide a method, system, and device for Transformer model training and electrochemical model parameter identification, which improves the efficiency and generalization ability of lithium battery electrochemical model parameter identification.
[0005] To address the aforementioned technical problems, this application provides a Transformer model training method, comprising: constructing multiple pre-defined sets of electrochemical model parameters; based on the electrochemical model, simulating reference voltage data and charge / discharge quantities for each parameter set under different constant current rates, dynamic operating conditions, and actual operating conditions according to input first operating condition data, wherein the first operating condition data includes at least current, time, and temperature data; inputting the first operating condition data, reference voltage data, and charge / discharge quantity data into a Transformer initial model to obtain predicted parameter values for the electrochemical model; and based on the electrochemical model, obtaining predicted voltage data according to the predicted parameter values and input second operating condition data, wherein the second operating condition data includes at least current, time, temperature, and charge / discharge quantity data.
[0006] The error between the predicted parameter value and the corresponding parameter set is optimized using a parameter set loss function. At the same time, the error between the predicted voltage data and the reference voltage data is optimized using a voltage loss function.
[0007] The total loss function is obtained by weighted summation of the parameter set loss function and the voltage loss function, and the parameters of the initial Transformer model are optimized based on the total loss function to obtain the optimized Transformer model.
[0008] In one embodiment, the construction of a pre-defined set of multiple electrochemical model parameters includes:
[0009] The key parameters of the electrochemical model and their physical value ranges are determined; multiple parameter sets are generated through parameter sampling methods, each containing complete electrochemical model parameters; wherein, the electrochemical model parameters include at least one of the following types of parameters: geometric structure parameters, material property parameters, concentration-related parameters, reaction kinetic parameters, and resistance-related parameters.
[0010] In one embodiment, the parameter set loss function LOSS P Represented as: P represents the parameter set, and M represents the total number of parameters in each parameter set. label,i Let P represent the i-th parameter in the parameter set P. predict,i This represents the predicted value of the i-th parameter; the voltage loss function LOSS V Represented as: N represents the number of voltage values included in each operating condition data point, v label,i This represents the reference voltage data corresponding to the i-th parameter, v. sim,i This indicates that the i-th parameter corresponds to the predicted voltage data; the total loss function is: LOSS1 = α * LOSS P +β*LOSS V α and β are weighting adjustment coefficients.
[0011] In one embodiment, before inputting the first operating condition data, reference voltage data, and charge / discharge data into the Transformer initial model, the method further includes:
[0012] The data under the first operating condition, the reference voltage data, and the charge / discharge data are normalized.
[0013] In one embodiment, the initial Transformer model architecture includes: a text embedding layer for mapping input data to a high-dimensional feature space through linear transformation, achieving unified processing of feature dimensions; a positional encoding layer for adding positional information to the input sequence, facilitating the model's recognition of the temporal characteristics of the data; a Transformer encoder for extracting features from the input data; a concatenation layer for concatenating features from different sources, broadening the feature dimensions; and a fully connected layer containing multiple linear transformation layers for mapping high-dimensional features to electrochemical model parameters.
[0014] This application also provides an unsupervised learning method for identifying parameters of an electrochemical model, including:
[0015] Acquire real-time data of the battery under operating conditions; the real-time data includes at least: voltage, current, temperature, time, and charge / discharge data; input the real-time data into a trained Transformer optimization model to obtain predicted electrochemical model parameters; input the predicted electrochemical model parameters and the input current and time data into the electrochemical model to obtain the corresponding estimated voltage value; calculate the mean square error between the estimated voltage value and the actual voltage value as a loss function to perform unsupervised training on the Transformer optimization model; when the training converges, output the final electrochemical model parameter values through the Transformer optimization model; wherein, the Transformer optimization model is obtained based on the model training method of any one of claims 1-5.
[0016] In one embodiment, calculating the mean square error between the estimated voltage value and the actual voltage value as a loss function includes: the loss function is expressed as follows:
[0017]
[0018] Among them, v cell,i Let v be the actual voltage value at the i-th time point in the real-time data. sim,i Let N be the estimated voltage value at the i-th time point output by the electrochemical model based on the predicted parameters, and let N represent the total number of voltage data points.
[0019] This application also provides a Transformer model training system, including: a parameter set construction module for constructing multiple pre-defined electrochemical model parameter sets; a reference voltage data acquisition module for simulating reference voltage data and charge / discharge quantities for each parameter set under different constant current rates, dynamic operating conditions, and actual operating conditions based on the electrochemical model and input first operating condition data, wherein the first operating condition data includes at least current, time, and temperature data; a model parameter prediction module for inputting the first operating condition data, reference voltage data, and charge / discharge quantity data into the Transformer initial model to obtain predicted parameter values for the electrochemical model; and a voltage data prediction module. Based on the electrochemical model, predicted voltage data is obtained according to the predicted parameter values and the input second operating condition data, wherein the second operating condition data includes at least: current, time, temperature, and charge / discharge data; a loss function optimization module uses a parameter set loss function to optimize the error between the predicted parameter values and the corresponding parameter set, and simultaneously uses a voltage loss function to optimize the error between the predicted voltage data and the reference voltage data; an optimization model acquisition module obtains a total loss function by weighted summation of the parameter set loss function and the voltage loss function, and optimizes the parameters of the initial Transformer model based on the total loss function to obtain the optimized Transformer model.
[0020] This application also provides an unsupervised learning-based electrochemical model parameter identification system, including:
[0021] A real-time data acquisition module is used to acquire real-time data during battery operation; the real-time data includes at least: voltage, current, temperature, time, and charge / discharge data; an electrochemical model parameter acquisition module is used to input the real-time data into a trained Transformer optimization model to obtain predicted electrochemical model parameters; an estimated voltage value acquisition module is used to input the predicted electrochemical model parameters and the input current and time data into the electrochemical model to obtain the corresponding estimated voltage value; an unsupervised training module is used to calculate the mean square error between the estimated voltage value and the actual voltage value as a loss function to perform unsupervised training on the Transformer optimization model; and a target parameter acquisition module is used to output the final electrochemical model parameter values through the Transformer optimization model after training convergence; wherein, the Transformer optimization model is obtained based on the model training system described in claim 8.
[0022] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the Transformer model training method described above, and / or the electrochemical model parameter identification method described above.
[0023] Compared to existing technologies, this application's embodiments optimize the initial Transformer model using two loss functions. Because different operating conditions are simulated for each electrochemical model parameter set, the optimized Transformer model's output parameter predictions exhibit high generalization ability. That is, when data under a specific operating condition is input into the model, the predicted parameters can not only simulate the voltage under that condition but also fit the voltage under other operating conditions well. Simultaneously, unsupervised learning allows for the direct use of large amounts of cell data from energy storage power stations or electric vehicles for training, without the need for labeling. Attached Figure Description
[0024] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0025] Figure 1 This is a flowchart of a Transformer model training method according to an optional embodiment of this application;
[0026] Figure 2 This is a schematic diagram of the architecture of the Transformer model and the electrochemical model according to an optional embodiment of this application;
[0027] Figure 3a This is a pre-training process for LOSS according to an optional embodiment of this application. P The gradient curve of a certain parameter;
[0028] Figure 3b Loss during pre-training according to an optional embodiment of this application V The curve of the change value;
[0029] Figure 4 This is a flowchart of an unsupervised learning method for electrochemical model parameter identification according to an optional embodiment of this application;
[0030] Figure 5a This is a voltage comparison diagram of the first cycle during the pre-training process according to an optional embodiment of this application;
[0031] Figure 5bThis is a voltage comparison diagram of the last cycle in the pre-training process according to an optional embodiment of this application;
[0032] Figure 6 This is a schematic diagram of the structure of a Transformer model training system according to an optional embodiment of this application;
[0033] Figure 7 This is a schematic diagram of the structure of an unsupervised learning electrochemical model parameter identification system according to an optional embodiment of this application;
[0034] Figure 8 This is a schematic diagram of the structure of an electronic device according to an optional embodiment of this application. Detailed Implementation
[0035] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] It should be noted that the following description covers various aspects of embodiments within the scope of the appended claims. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0037] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0038] Additionally, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that practice can be carried out without these specific details.
[0039] The first embodiment of this application provides a Transformer model training method, such as... Figure 1 As shown, it includes the following steps:
[0040] In step 101, multiple pre-defined sets of electrochemical model parameters are constructed. In this embodiment, the electrochemical model (EM) refers to a mathematical model built based on electrochemical principles to describe the internal physicochemical processes of a battery. Its core is to accurately characterize mechanisms such as ion transport, charge conservation, and electrochemical reactions during battery operation through a coupled system of partial differential equations. Electrochemical models typically involve many physical parameters. When constructing the electrochemical model parameter set, the key parameters of the electrochemical model and their physical value ranges can be predetermined, such as setting the maximum and minimum values for each parameter. Multiple sets of parameters are generated through parameter sampling methods, such as using an equal division method, where each parameter can take different values within the range of its maximum and minimum values, thus constructing multiple sets of electrochemical model parameters.
[0041] Each parameter set in the embodiments of this application contains complete electrochemical model parameters; wherein, the electrochemical model parameters include at least one of the following types of parameters: geometric structure parameters (such as electrode surface area, electrode thickness, membrane thickness, porosity, etc.), material property parameters (such as lithium-ion diffusion coefficient, conductivity, etc.), concentration-related parameters (such as maximum lithium-ion concentration of the positive electrode, maximum lithium-ion concentration of the negative electrode, initial lithium-ion concentration of the positive electrode, initial lithium-ion concentration of the electrolyte, etc.), reaction kinetic parameters (such as positive electrode reaction rate constant, negative electrode reaction rate constant, transport number, etc.), and resistance-related parameters (such as membrane resistance).
[0042] In step 102, based on the electrochemical model, reference voltage data and charge / discharge quantities for each parameter set under different constant current rates, dynamic operating conditions, and actual operating conditions are simulated according to the input first operating condition data. The first operating condition data includes at least current, time, and temperature data. Specifically, the first operating condition data in this application can be obtained in the following ways:
[0043] First, obtain data using standardized methods, such as charge and discharge data at different constant current rates (e.g., 0.05C, 0.2C, 0.5C, 1C), or data measured under dynamic operating conditions using standards such as HPPC (Hybrid Pulse Power Characterization) and DST (Dynamic Stress Test). Second, obtain actual operating data, such as the battery's actual operating current, temperature, and time data obtained through BMS (Battery Management System).
[0044] In this step, the multiple sets of electrochemical model parameter sets constructed in step 101 need to be input into the electrochemical model in advance, and then the first operating condition data needs to be input. Under dynamic operating conditions, the current will change with time; therefore, the current in the first operating condition data in this embodiment can also include time data. Based on the input multiple sets of electrochemical model parameters and the first operating condition data, the electrochemical model simulates voltage data and corresponding charge / discharge quantities for each parameter set under different constant current ratios (e.g., 0.05C, 0.2C, 0.5C, 1C, etc.), dynamic operating conditions (e.g., HPPC, DST, etc.), and actual operating conditions (e.g., the current detected by the BMS of the energy storage power station). The multiple sets of electrochemical model parameter sets, the first operating condition data, the first voltage data, and the charge / discharge quantities together constitute the pre-training dataset.
[0045] In this embodiment, when constructing the pre-training dataset, an electrochemical model is used to simulate the relevant data. At this time, the electrochemical model is equivalent to a data production tool, which naturally carries labels while producing data, without the need for manual labeling. In addition, the voltage simulated by the electrochemical model can also be used as a label without additional processing, and can be directly applied to the next training or optimization stage, forming unsupervised learning.
[0046] In step 103, the first operating condition data, reference voltage data, and charge / discharge data are input into the Transformer initial model to obtain the predicted parameter values of the electrochemical model. Specifically, the Transformer initial model architecture in this embodiment includes: a text embedding layer, a position encoding layer, a Transformer encoder, a splicing layer, and a fully connected layer. Figure 2 As shown.
[0047] The text embedding layer is used to map input data, such as voltage, current, and capacity, to a high-dimensional feature space through linear transformation, thereby achieving unified processing of feature dimensions.
[0048] The positional encoding layer adds positional information to the input sequence, making it easier for the model to recognize the temporal characteristics of the data;
[0049] The Transformer encoder is used to extract features from the input data. Optionally, the Transformer encoder in this embodiment may include two sub-layers. One is a multi-head attention mechanism layer, a normalization layer, and residual units (Add & Norm); the other is a feedforward layer, a normalization layer, and residual units (Add & Norm). The Transformer encoder computes multiple sets of attention in parallel through the attention mechanism to capture the complex dependencies between input data (such as voltage and current sequences) (e.g., the influence of current on voltage changes at different times). The normalization layer and residual units alleviate gradient vanishing, stabilize the training process, and improve model convergence. The feedforward layer further nonlinearly transforms the attention output to enhance feature representation.
[0050] The concatenation layer is used to concatenate features from different sources, thereby broadening the feature dimensions.
[0051] Fully connected layers contain multiple linear transformation layers and are used to map high-dimensional features to electrochemical model parameters.
[0052] In this embodiment of the application, the first operating condition data, reference voltage data, and charge / discharge data are input to the text embedding layer of the Transformer initial model, and are processed sequentially through each layer. Finally, the predicted values of the electrochemical model parameters are output through the fully connected layers.
[0053] In step 104, based on the electrochemical model, predicted voltage data is obtained according to the predicted parameter values and the input second operating condition data. The second operating condition data includes at least: current, time, temperature, and charge / discharge data. Specifically, the method for obtaining the second operating condition data in this embodiment is the same as the method for obtaining the first operating condition data in step 102, and will not be repeated here. In this step, the parameter prediction values obtained by the fully connected layer from the electrochemical model are directly input into the electrochemical model, and the second operating condition data is simultaneously input into the electrochemical model to output the predicted voltage data (Terminal voltage).
[0054] In step 105, a parameter set loss function is used to optimize the error between the predicted parameter value and the corresponding parameter set. At the same time, a voltage loss function is used to optimize the error between the predicted voltage data and the reference voltage data.
[0055] Specifically, the parameter set loss function LOSS P It can be represented as: P represents the parameter set, and M represents the total number of parameters in each parameter set. label,i Let P represent the i-th parameter in the parameter set P. predict,i This represents the predicted value of the i-th parameter;
[0056] Voltage loss function LOSS V It can be represented as: N represents the number of voltage values included in each operating condition data point, v label,i This represents the reference voltage data corresponding to the i-th parameter, v. sim,i This indicates the predicted voltage data corresponding to the i-th parameter.
[0057] In this embodiment of the application, LOSS P and LOSS V Curve changes as follows Figure 4 a and Figure 4 As shown in b.
[0058] from Figure 3a As can be seen, the gradient curve (grad_values) gradually declines from a high value (on the order of 1e-4) and approaches a very low value (close to 1e-11) in the later stage. This indicates that the gradient of the model parameters is continuously decaying, which means that the parameters are gradually converging to the "better range".
[0059] from Figure 3b As can be seen, the loss curve (train_loss) drops steadily from a high value (on the order of 1e-6) to a very low value (close to 1e-12), representing the "error" between the model's predicted values and the actual values. The smaller the loss, the better the model fits the data. The continuous decrease in the graph proves that the model is constantly learning and reducing errors.
[0060] In step 106, the total loss function is obtained by weighted summation of the parameter set loss function and the voltage loss function, and the parameters of the initial Transformer model are optimized based on the total loss function to obtain the optimized Transformer model.
[0061] Specifically, the total loss function can be expressed as: LOSS1 = α * LOSS P +β*LOSS V α and β are weighting adjustment coefficients.
[0062] In this embodiment, the initial Transformer model is optimized using two loss functions. Since different operating conditions are simulated for each set of electrochemical model parameters, the parameter prediction values of the electrochemical model output by the optimized Transformer model have high generalization ability. That is, when the model is input with data under a certain operating condition, the parameters predicted by the model can not only simulate the voltage under this operating condition, but also fit the voltage under other operating conditions well.
[0063] Therefore, compared with the prior art, the embodiments of this application can not only overcome the problem of the single operating current condition of the battery cell in actual scenarios, but also improve the generalization ability of the identified parameters. At the same time, unsupervised learning allows a large amount of battery cell data from energy storage power stations or electric vehicles to be directly used for training without the need for labeling.
[0064] Preferably, since the units of different data are different, and in order to accelerate the solution speed of gradient descent during model optimization, the above battery time-series data (first operating condition data, reference voltage data, and charge / discharge data) need to be normalized before step 103. For example, it can be standardized using the Z-score method, using the formula... The data is normalized, where x is the data feature, μ is the mean, σ is the data standard deviation, and x * This is the normalized data. Alternatively, other existing normalization methods can be used for processing, which is not limited in this application.
[0065] The second embodiment of this application provides a method for identifying parameters of an unsupervised electrochemical model, such as... Figure 4 As shown, it includes the following steps:
[0066] In step 201, real-time data of the battery's operating state is acquired. This real-time data includes at least: voltage, current, temperature, time, and charge / discharge data, where the voltage is the actual voltage value. Specifically, data under battery operating conditions (i.e., current I is not zero) can be extracted from the data of the energy storage station or power battery. This includes data on the relaxation process, i.e., data for a period of time after the current changes from non-zero to zero, such as a few minutes to tens of minutes, including voltage (V), current (I), temperature (T), etc.
[0067] Then, the data is standardized using the Z-score method. Voltage, current, time, charge / discharge amount, and temperature are used as input data, with only voltage serving as the label.
[0068] In step 202, the real-time data is input into the trained Transformer optimization model to obtain the predicted electrochemical model parameters.
[0069] In step 203, the predicted electrochemical model parameters and the input current and time data are input into the electrochemical model to obtain the corresponding estimated voltage value.
[0070] In step 204, the mean square error between the estimated voltage value and the actual voltage value is calculated as a loss function to perform unsupervised training on the Transformer optimization model; specifically, the loss function is expressed as follows:
[0071]
[0072] Among them, v cell,i Let v be the actual voltage value at the i-th time point in the real-time data. sim,i Let N be the estimated voltage value at the i-th time point output by the electrochemical model based on the predicted parameters, and let N represent the total number of voltage data points.
[0073] In step 205, after training convergence, the final electrochemical model parameter values are output through the Transformer optimization model. The Transformer optimization model is obtained based on the model training method in the first embodiment. In this embodiment, training convergence can be determined by a loss threshold or the number of iterations.
[0074] In this embodiment, the voltage of the first cycle during training is as follows: Figure 5a As shown, the voltage of the last cycle is as follows: Figure 5b As shown in the figure. In the figure, pred (blue line) represents the simulated voltage output by the electrochemical model layer, and label (orange line) represents the actual voltage value. Figure 5b As can be seen, the curve fitting pred (blue line) and label (orange line) almost completely overlap, proving that after multiple rounds of training, the model has achieved a "near-perfect" fit to voltage changes and can accurately reproduce voltage timing characteristics (such as the voltage rise and fall pattern during charging and discharging).
[0075] This application embodiment uses an unsupervised learning method, combining pre-training and multi-condition data with an electrochemical model layer, to significantly improve the efficiency and generalization ability of lithium battery electrochemical model parameter identification, making it suitable for practical scenarios such as energy storage power stations and electric vehicles.
[0076] The third embodiment of this application provides a Transformer model training system, such as... Figure 6 As shown, it includes:
[0077] Parameter set construction module 1 is used to construct multiple pre-defined sets of electrochemical model parameters;
[0078] Reference voltage data acquisition module 2 is used to simulate reference voltage data and charge / discharge quantity of each parameter set under different constant current ratios, dynamic conditions and actual operating conditions based on an electrochemical model and the input first operating condition data. The first operating condition data includes at least: current, time and temperature data.
[0079] Model parameter prediction module 3 is used to input the first operating condition data, reference voltage data and charge / discharge data into the Transformer initial model to obtain the parameter prediction values of the electrochemical model.
[0080] Voltage data prediction module 4, based on the electrochemical model, obtains predicted voltage data according to the predicted parameter values and the input second operating condition data, wherein the second operating condition data includes at least: current, time, temperature and charge / discharge data;
[0081] Loss function optimization module 5 uses a parameter set loss function to optimize the error between the predicted parameter value and the corresponding parameter set, and at the same time, uses a voltage loss function to optimize the error between the predicted voltage data and the reference voltage data.
[0082] The optimization model acquisition module 6 obtains the total loss function by weighted summation of the parameter set loss function and the voltage loss function, and optimizes the parameters of the initial Transformer model based on the total loss function to obtain the optimized Transformer model.
[0083] The fourth embodiment of this application provides an unsupervised learning-based electrochemical model parameter identification system, such as... Figure 7 As shown, it includes:
[0084] The real-time data acquisition module 7 is used to acquire real-time data of the battery's operating state; the real-time data includes at least: voltage, current, temperature, time, and charge / discharge data;
[0085] The electrochemical model parameter acquisition module 8 is used to input the real-time data into the trained Transformer optimization model to obtain the predicted electrochemical model parameters.
[0086] The estimated voltage value acquisition module 9 is used to input the predicted electrochemical model parameters and the input current and time data into the electrochemical model to obtain the corresponding estimated voltage value.
[0087] Unsupervised training module 10 is used to calculate the mean square error between the estimated voltage value and the actual voltage value as a loss function to perform unsupervised training on the Transformer optimization model.
[0088] The target parameter acquisition module 11 is used to output the final electrochemical model parameter values through the Transformer optimization model after training convergence.
[0089] The Transformer optimization model is obtained based on the model training system of the third embodiment.
[0090] The fifth embodiment of this application provides an electronic device, such as... Figure 8 As shown, it includes a memory 12, a processor 13, and a computer program stored on the memory 12 and used to run on the processor 13. When the processor 13 executes the computer program, it implements the steps of the Transformer model training method as described in the first embodiment and / or the electrochemical model parameter identification method as described in the second embodiment.
[0091] The electronic device in this application embodiment includes at least one processor 13 and a memory 12 communicatively connected to at least one processor 13. Figure 8 The following explanation uses a processor 13 as an example.
[0092] The electronic device may also include an input device 14 and an output device 15.
[0093] The memory 12, processor 13, input device 14, and output device 15 can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.
[0094] The memory 12, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the Transformer model training method in the first embodiment, and / or the program instructions / modules corresponding to the electrochemical model parameter identification method described in the second embodiment. The processor 13 executes various server functions and data processing by running the non-transitory software programs, instructions, and modules stored in the memory 12, thereby implementing the steps in the above method embodiments.
[0095] The memory 12 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the processing device based on the list item operation, etc. Furthermore, the memory 12 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 12 may optionally include memory remotely located relative to the processor 13, and these remote memories may be connected via a network to the processor 7 for Transformer model training methods and / or electrochemical model parameter identification methods. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0096] Input device 14 can receive input numeric or character information, as well as key signal inputs related to user settings and function control of the processing device for list item operations. Output device 15 may include display devices such as a display screen.
[0097] In this embodiment, when one or more modules stored in the memory 12 are executed by one or more processors 13, the processor 13 executes the steps in any of the above method embodiments.
[0098] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0099] The electronic devices of this invention exist in various forms, including but not limited to:
[0100] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include: smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones, etc.
[0101] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0102] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players (such as iPods), handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.
[0103] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A Transformer model training method, characterized in that, include: Construct multiple pre-defined sets of electrochemical model parameters; Based on the electrochemical model, the reference voltage data and charge / discharge quantity of each parameter set under different constant current rates, dynamic conditions and actual operating conditions are simulated according to the input first operating condition data. The first operating condition data includes at least: current, time and temperature data. The first operating condition data, reference voltage data, and charge / discharge data are input into the Transformer initial model to obtain the parameter prediction values of the electrochemical model. Based on the electrochemical model, predicted voltage data is obtained according to the predicted parameter values and the input second operating condition data. The second operating condition data includes at least: current, time, temperature and charge / discharge data. The error between the predicted parameter value and the corresponding parameter set is optimized using a parameter set loss function. At the same time, the error between the predicted voltage data and the reference voltage data is optimized using a voltage loss function. The total loss function is obtained by weighted summation of the parameter set loss function and the voltage loss function, and the parameters of the initial Transformer model are optimized based on the total loss function to obtain the optimized Transformer model.
2. The model training method of claim 1, wherein, The construction of pre-defined sets of multiple electrochemical model parameters includes: Determine the key parameters of the electrochemical model and their physical value ranges; Multiple parameter sets are generated using a parameter sampling method, and each parameter set contains complete electrochemical model parameters. The electrochemical model parameters include at least one of the following types of parameters: geometric structure parameters, material property parameters, concentration-related parameters, reaction kinetic parameters, and resistance-related parameters.
3. The model training method according to claim 1, characterized in that, The parameter set loss function LOSS P is represented as: P represents a parameter set, M represents the total number of parameters in each parameter set, P label,i represents the i-th parameter in the parameter set P, P predict,i represents the i-th parameter prediction value; The voltage loss function LOSS V is represented as: N represents the number of voltages contained in each working condition data, v label,i represents the reference voltage data corresponding to the i-th parameter, v sim,i represents the predicted voltage data corresponding to the i-th parameter; The total loss function is: LOSS1 = α * LOSS P +β*LOSS V α and β are weighting adjustment coefficients.
4. The model training method of claim 1, wherein, Before inputting the first operating condition data, reference voltage data, and charge / discharge data into the Transformer initial model, the following steps are also included: The data under the first operating condition, the reference voltage data, and the charge / discharge data are normalized.
5. The model training method of claim 1, wherein, The initial model architecture of the Transformer includes: The text embedding layer is used to map the input data to a high-dimensional feature space through linear transformation, thereby achieving unified processing of feature dimensions. The positional encoding layer adds positional information to the input sequence, making it easier for the model to recognize the temporal characteristics of the data. The Transformer encoder is used to extract features from the input data; The splicing layer is used to splice features from different sources, thereby broadening the feature dimensions; The fully connected layer, which contains multiple linear transformation layers, is used to map high-dimensional features to electrochemical model parameters.
6. An unsupervised learning method for parameter identification of electrochemical models, characterized in that, include: Acquire real-time data of the battery's operating status, including at least: voltage, current, temperature, time, and charge / discharge data; The real-time data is input into the trained Transformer optimization model to obtain the predicted electrochemical model parameters; The predicted electrochemical model parameters and the input current and time data are input into the electrochemical model to obtain the corresponding estimated voltage value. The mean square error between the estimated voltage value and the actual voltage value is calculated as the loss function, and the Transformer optimization model is trained unsupervised. Once the training converges, the final electrochemical model parameter values are output through the Transformer optimization model. The Transformer optimization model is obtained based on the model training method described in any one of claims 1-5.
7. The electrochemical model parameter identification method of claim 6, wherein, Calculating the mean square error between the estimated voltage value and the actual voltage value as a loss function includes: the loss function is expressed as follows: Among them, v cell,i Let v be the actual voltage value at the i-th time point in the real-time data. sim,i Let N be the estimated voltage value at the i-th time point output by the electrochemical model based on the predicted parameters, and let N represent the total number of voltage data points.
8. A Transformer model training system, comprising: include: The parameter set construction module is used to construct multiple pre-defined sets of electrochemical model parameters; The reference voltage data acquisition module is used to simulate the reference voltage data and charge / discharge quantity of each parameter set under different constant current ratios, dynamic conditions and actual operating conditions based on the electrochemical model and the input first operating condition data. The first operating condition data includes at least: current, time and temperature data. The model parameter prediction module is used to input the first operating condition data, reference voltage data, and charge / discharge data into the Transformer initial model to obtain the parameter prediction values of the electrochemical model. The voltage data prediction module, based on the electrochemical model, obtains predicted voltage data according to the predicted parameter values and the input second operating condition data. The second operating condition data includes at least: current, time, temperature, and charge / discharge data. The loss function optimization module uses a parameter set loss function to optimize the error between the predicted parameter value and the corresponding parameter set, and at the same time, uses a voltage loss function to optimize the error between the predicted voltage data and the reference voltage data. The optimization model acquisition module obtains the total loss function by weighted summation of the parameter set loss function and the voltage loss function, and optimizes the parameters of the initial Transformer model based on the total loss function to obtain the optimized Transformer model.
9. An unsupervised learning electrochemical model parameter identification system, comprising: include: A real-time data acquisition module is used to acquire real-time data of the battery's operating state; the real-time data includes at least: voltage, current, temperature, time, and charge / discharge data; The electrochemical model parameter acquisition module is used to input the real-time data into the trained Transformer optimization model to obtain the predicted electrochemical model parameters. The estimated voltage value acquisition module is used to input the predicted electrochemical model parameters and the input current and time data into the electrochemical model to obtain the corresponding estimated voltage value; An unsupervised training module is used to calculate the mean square error between the estimated voltage value and the actual voltage value as a loss function to perform unsupervised training on the Transformer optimization model. The target parameter acquisition module is used to output the final electrochemical model parameter values through the Transformer optimization model after training convergence. The Transformer optimization model is obtained based on the model training system described in claim 8.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory for running on the processor, characterized in that, When the processor executes a computer program, it implements the Transformer model training method as described in any one of claims 1-5, and / or the electrochemical model parameter identification method as described in claim 6 or 7.