A lithium iron phosphate battery residual life prediction method and device based on electrochemical physical constraint transformer
Patent Information
- Application Number
- CN202611026983.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-13
AI Technical Summary
然而,若仅依靠Transformer进行端到端回归预测,模型学习到的隐含特征可能缺乏明确物理意义,难以保证其与电池内部反应动力学和固相扩散过程保持一致
第一,本发明通过Transformer网络对电池循环特征进行长程依赖建模,能够有效捕捉电池容量衰减过程中的长期退化趋势,降低传统循环网络在长序列建模中可能出现的信息遗忘问题。
Smart Images

Figure CN122901679A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of lithium-ion battery health status assessment and life prediction technology, specifically relating to a method and device for predicting the remaining life of lithium iron phosphate batteries based on electrochemical physical constraint Transformer. Background Technology
[0002] Lithium iron phosphate (LFP) batteries have been widely used in new energy vehicles, grid energy storage, and distributed energy systems due to their advantages such as long cycle life, high safety, and low cost. However, as the number of battery cycles increases, degradation processes such as loss of active lithium, loss of active materials, interfacial film growth, and increased diffusion resistance accumulate, leading to gradual capacity decay, increased internal resistance, and ultimately affecting the safe operation of the system. Therefore, accurately predicting the remaining lifespan of LFP batteries is crucial for battery management systems to formulate maintenance strategies, optimize energy dispatch, and ensure safe operation.
[0003] Existing battery life prediction methods mainly include physical modeling and data-driven methods. Physical modeling methods typically describe the internal electrochemical processes of a battery based on P2D models, single-particle models, or equivalent circuit models, offering good interpretability. However, their parameter identification is complex, computationally intensive, and difficult to apply directly when practical engineering data is incomplete. Data-driven methods typically use models such as support vector machines, random forests, recurrent neural networks, convolutional neural networks, or Transformers to model the nonlinear relationship between battery degradation characteristics and lifespan. They offer advantages such as flexible modeling and fast inference speed. However, purely data-driven models often lack electrochemical mechanism constraints, making them prone to overfitting, insufficient cross-cell generalization ability, and weak interpretability of prediction results. For example, Chinese patent CN122283455A discloses a method for jointly predicting the state of charge (SOC) and state of power (SOP) of a battery based on its health status. The method includes: collecting voltage, current, temperature, and capacity data of a lithium-ion battery under different operating conditions and temperatures; constructing multi-temperature SOC open-circuit voltage relationship curves; extracting health characteristics representing the degree of battery aging; establishing battery health status characterization quantities; establishing a second-order resistive-capacitive equivalent circuit model for the lithium-ion battery to achieve SOC prediction; co-optimizing the FFRLS forgetting factor and MIAUKF key parameters; comprehensively considering temperature constraints, voltage constraints, and SOC constraints in SOP prediction; and coupling the health status characterization quantities into the power prediction process to construct a two-layer network model, thereby achieving high-precision prediction of battery SOP. Chinese patent CN122283476A discloses a method and system for predicting battery remaining life. This method divides the modal components into trend modes and fluctuation modes based on the frequency domain characteristics of the modal components. The trend mode prediction part uses a differentiable monotonicity penalty term in the loss function combined with a Transformer network to ensure that the prediction result decreases over time, thereby improving the physical rationality and stability of the prediction curve. For the remaining fluctuation modes, BiLSTM combined with an attention mechanism is used for modeling. The combination of the two achieves effective modeling and extraction of high-frequency disturbance information. Then, the prediction results of the trend mode and each fluctuation mode are fused and reconstructed to restore the complete RUL prediction curve.
[0004] Transformer networks can capture global dependencies in long sequences through self-attention mechanisms, making them suitable for handling the long-term degradation trends of features such as capacity, voltage, and internal resistance during battery cycling. However, if end-to-end regression prediction is performed solely using Transformers, the implicit features learned by the model may lack clear physical meaning, making it difficult to guarantee consistency with the battery's internal reaction kinetics and solid-phase diffusion processes. Furthermore, in publicly available battery aging datasets, some samples may lack independent current labels or dynamic information from adjacent cycles, making it difficult to directly use traditional electrochemical constraint methods that require complete current-voltage-time information.
[0005] Therefore, there is an urgent need for a method to predict the remaining lifetime of lithium iron phosphate batteries that can combine electrochemical reaction kinetics, solid-phase diffusion mechanisms and Transformer long-range time-series modeling capabilities, in order to improve prediction accuracy, model generalization ability and physical interpretability. Summary of the Invention
[0006] The purpose of this invention is to provide a method and apparatus for predicting the remaining lifetime of lithium iron phosphate batteries based on electrochemical physical constraints of Transformer. This method combines electrochemical reaction kinetics, solid-phase diffusion mechanism and Transformer's long-range time-series modeling capabilities to improve prediction accuracy, model generalization ability and physical interpretability.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: A method for predicting the remaining lifetime of lithium iron phosphate batteries based on electrochemically constrained Transformers includes: 1) Collect charge and discharge data during the cyclic aging process of lithium iron phosphate batteries and construct a battery cycle characteristic matrix; 2) Construct an electrochemically physically constrained Transformer model, including a linear projection layer, a Transformer network, a remaining lifetime prediction head, and an electrochemical variable prediction head: Input the battery cycling feature matrix into the linear projection layer to obtain the input sequence, input the input sequence into the Transformer network to obtain the shared temporal embedding vector, and construct the remaining lifetime prediction head and the electrochemical variable prediction head based on the shared temporal embedding vector, which are used to output the remaining lifetime prediction value and the electrochemical variable, respectively. 3) Construct a solid-phase diffusion physical consistency loss based on electrochemical variables, the Butler-Volmer equation, and the reduced-order solid-phase diffusion relationship of the single-particle model, and jointly train the electrochemically constrained Transformer model based on the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss. 4) Collect charge and discharge data of the lithium iron phosphate battery to be evaluated and construct a cycle feature matrix. Input the jointly trained electrochemical-physical constraint Transformer model and output the predicted remaining lifetime value of the lithium iron phosphate battery to be evaluated.
[0008] The method provided by this invention utilizes Transformer to extract long-range time-series characterization of battery cycling degradation process and outputs implicit electrochemical variables through multiple physical variable prediction heads; further, it constructs physical constraint loss based on the open-circuit potential function of lithium iron phosphate cathode, Butler-Volmer equation and single-particle model reduced-order solid-phase diffusion relationship, to achieve joint optimization of data-driven lifetime prediction and electrochemical mechanism constraints.
[0009] In step 1), the charge and discharge data includes multiple features such as cycle number, capacity, voltage, current, temperature, and charge and discharge curve features or statistical features extracted from the above data. The charge and discharge data are cleaned, truncated, normalized, and matrixed to construct a battery cycle feature matrix.
[0010] In step 2), the linear projection layer maps the battery cycling feature matrix to a latent space of a specified dimension to obtain the input sequence of the Transformer network; the Transformer network extracts the long-range dependencies in the battery cycling degradation process through a multi-head self-attention mechanism to obtain a shared temporal embedding vector.
[0011] In step 2), the electrochemical variables include surface lithium stoichiometry, average lithium stoichiometry, solid phase potential, electrolyte phase potential, and equivalent solid phase diffusion coefficient.
[0012] In step 3), the surface lithium stoichiometry is input into the open-circuit potential function of the lithium iron phosphate cathode to obtain the open-circuit potential; the interfacial overpotential is calculated based on the solid phase potential, the electrolyte phase potential, and the open-circuit potential, and the interfacial overpotential is substituted into the Butler-Volmer equation to obtain the interfacial reaction flux; based on the reduced-order solid-phase diffusion relationship of the single-particle model, the static solid-phase diffusion physical residual is constructed using the surface lithium stoichiometry, the average lithium stoichiometry, the equivalent solid-phase diffusion coefficient, and the interfacial reaction flux, and this residual is used as the solid-phase diffusion physical consistency loss.
[0013] Furthermore, when the charging data contains feature matrices and time intervals of adjacent cycles or adjacent time steps, a dynamic solid-phase diffusion constraint is constructed. The error between the rate of change of the surface lithium stoichiometry at adjacent time steps and the reduced-order kinetic equation of the single-particle model is used as the dynamic solid-phase diffusion loss. The sum of the dynamic solid-phase diffusion loss and the static solid-phase diffusion physical residual is used as the solid-phase diffusion physical consistency loss. When the charging and discharging data does not contain information of adjacent time steps, only the static solid-phase diffusion physical residual is used as the solid-phase diffusion physical consistency loss. That is, when the charging and discharging data does not contain current labels, the real current supervision term is skipped, thereby realizing weak physical constraint training on public datasets without current labels.
[0014] Furthermore, in step 3), when the charge / discharge data contains current labels, the error between the predicted current and the actual current calculated based on the Butler-Volmer equation is used to construct the Butler-Volmer reaction kinetics loss. The remaining lifetime prediction loss, the Butler-Volmer reaction kinetics loss, and the solid-phase diffusion physical consistency loss are weighted and fused together as the total training loss function to jointly train the electrochemically constrained Transformer model. When the charge / discharge data does not contain current labels, the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss are weighted and fused together as the total training loss function to jointly train the electrochemically constrained Transformer model.
[0015] This invention also discloses a lithium iron phosphate battery remaining life prediction device based on electrochemically physically constrained Transformer using the above method, comprising: The data acquisition and preprocessing module collects charge and discharge data during the cyclic aging process of lithium iron phosphate batteries and constructs a battery cycle characteristic matrix. The feature extraction and electrochemical variable output module constructs and stores an electrochemically physically constrained Transformer model, including a linear projection layer, a Transformer network, a remaining lifetime prediction head, and an electrochemical variable prediction head. The battery cycling feature matrix is input into the linear projection layer to obtain the input sequence, and the input sequence is input into the Transformer network to obtain a shared temporal embedding vector. Based on the shared temporal embedding vector, the remaining lifetime prediction head and the electrochemical variable prediction head are constructed respectively to output the remaining lifetime prediction value and the electrochemical variable, respectively. The physical loss construction and joint training module constructs a solid-phase diffusion physical consistency loss based on electrochemical variables, the Butler-Volmer equation, and the reduced-order solid-phase diffusion relationship of the single-particle model. It then jointly trains the electrochemical physical constraint Transformer model based on the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss to obtain the jointly trained electrochemical physical constraint Transformer model. The remaining lifetime prediction output module collects the charge and discharge data of the lithium iron phosphate battery to be evaluated and constructs a cycle feature matrix. It inputs the jointly trained electrochemical-physical constraint Transformer model and outputs the remaining lifetime prediction value of the lithium iron phosphate battery to be evaluated.
[0016] The present invention also provides a computing device, including a memory and one or more processors, wherein the memory stores an executable program, and the one or more processors implement the above-described method for predicting the remaining life of lithium iron phosphate batteries when executing the program.
[0017] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when processed and executed, implements the above-described method for predicting the remaining life of lithium iron phosphate batteries.
[0018] Compared with the prior art, the present invention has the following beneficial effects: First, this invention uses Transformer networks to model the long-range dependency of battery cycling characteristics, which can effectively capture the long-term degradation trend during battery capacity decay and reduce the information forgetting problem that may occur in traditional cyclic networks in long sequence modeling.
[0019] Second, this invention sets up multiple electrochemical variable prediction heads after the Transformer shared characterization, so that the model can not only output lifetime prediction results, but also output implicit state variables with physical meaning such as surface lithium stoichiometry, average lithium stoichiometry, potential and diffusion coefficient, thereby improving the interpretability of the model.
[0020] Third, this invention introduces the open-circuit potential function of lithium iron phosphate, Butler-Volmer reaction kinetics, and the reduced-order solid-phase diffusion residual of the single-particle model into the neural network training process. This allows the electrochemically constrained Transformer model to be constrained by electrochemical mechanisms while learning the data distribution, which helps to improve the model's generalization ability under different batteries, different cycle stages, and different operating conditions.
[0021] Fourth, this invention is compatible with battery aging data that includes and does not include current tags. When the data includes current tags, Butler-Volmer current supervision can be enabled; when the data lacks current tags, solid-phase diffusion static residuals can be preserved to achieve weak physical constraint training, thus improving the applicability of the method to public datasets and incomplete engineering data.
[0022] Fifth, this invention does not require additional hardware acquisition devices. It completes model training and life prediction based solely on existing battery cycle data, which has good engineering deployment value and can be applied to new energy vehicles, grid energy storage, battery cascade utilization, and battery management systems. Attached Figure Description
[0023] Figure 1 A flowchart of a method for predicting the remaining lifetime of lithium iron phosphate batteries based on electrochemical physical constraint Transformer provided in this embodiment of the invention; Figure 2 This is a flowchart illustrating the construction of the battery cycle feature matrix in an embodiment of the present invention. Figure 3 This is a schematic diagram of the electrochemically physically constrained Transformer network structure in an embodiment of the present invention; Figure 4This is a schematic diagram illustrating the coupling between Butler-Volmer reaction kinetics and solid-phase diffusion residuals in a single-particle model in an embodiment of the present invention. Figure 5 This is a flowchart illustrating the switching between two training modes—one with current tags and one without—in an embodiment of the present invention. Figure 6 This is a comparison chart of the remaining lifetime prediction results of different models in the embodiments of the present invention. Detailed Implementation
[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited to the following embodiments.
[0025] like Figure 1 As shown in the figure, this embodiment provides a method for predicting the remaining life of lithium iron phosphate batteries based on electrochemical physical constraint Transformer, which specifically includes the following steps.
[0026] S1. Data Acquisition and Preprocessing Collect charge and discharge data of lithium iron phosphate batteries during cycle aging tests. This data can originate from laboratory testing platforms, energy storage system operation data, new energy vehicle operation data, or publicly available battery aging datasets. Input data includes, but is not limited to, battery voltage, current, capacity, cycle number, temperature, charge / discharge time, charge / discharge curve segments, and statistical features extracted from the charge / discharge curves.
[0027] like Figure 2 As shown, for each battery, the data is sorted according to the cycle number, and abnormal cycles and missing values are removed; input features with different dimensions are normalized to ensure they are on a uniform numerical scale; for charge-discharge curves of different lengths, resampling, truncation, or interpolation can be used to unify them to a fixed length. After processing, the data from a single cycle or multiple consecutive cycles are used to construct a battery cycle feature matrix: X∈R^(C×N×L); Where C represents the number of input channels, N represents the loop dimension or the number of feature positions, and L represents the feature length at each position.
[0028] In public battery datasets such as the MATR dataset, if the sample does not provide an independent current label, only voltage, capacity, cycle features, or a feature matrix composed of the original data are used as model input; if the sample provides current information, the current is used as an optional supervision variable for subsequent Butler-Volmer reaction kinetic loss calculation.
[0029] S2, Transformer Temporal Representation Extraction like Figure 3As shown, the battery cycle feature matrix obtained in step S1 is input into the linear projection layer to map the input features to a specified hidden layer dimension. If the input feature is a four-dimensional tensor, it is first transformed from shape (B, C, N, L) to (B, N, C×L), where B is the batch size; if the input feature is already a three-dimensional tensor, it is directly used as the temporal feature input.
[0030] The input sequence obtained after linear projection is fed into a Transformer network. The Transformer network includes at least one multi-head self-attention layer and a feedforward network layer to extract global dependencies in the battery cycling degradation process. Through the multi-head attention mechanism, the model can simultaneously focus on the correlations between different cycling stages and learn the nonlinear mapping relationship between early degradation features and later lifespan decay.
[0031] The sequence features output by the Transformer network are flattened to obtain a shared temporal embedding vector. h This shared temporal embedding vector is used for both remaining lifetime prediction and electrochemical latent variable prediction.
[0032] S3, Remaining Life Prediction Output like Figure 3 As shown, the shared temporal embedding vector h Input the remaining life prediction header to obtain the predicted battery life value: ; in, This represents a regression prediction function composed of fully connected layers. Labeled with actual remaining lifespan. As a monitoring signal, construct the remaining lifetime prediction loss: ; S4, Electrochemical Hidden Variable Prediction like Figure 3 As shown, to improve model interpretability, this embodiment is based on shared temporal embedding vectors. h Construct multiple electrochemical variable prediction heads, each outputting: surface lithium stoichiometry. Average lithium stoichiometry Solid-state potential Electrolyte phase potential Equivalent solid-phase diffusion coefficient .
[0033] in, and The sigmoid function is used to restrict the normalized lithium stoichiometry to between 0 and 1. The Softplus function is used to restrict the value to positive to satisfy the physical constraint that the diffusion coefficient is non-negative.
[0034] S5, Lithium iron phosphate open-circuit potential and Butler-Volmer reaction kinetics constraints like Figure 4 and Figure 5 As shown, the surface lithium stoichiometry Input open-circuit potential function of lithium iron phosphate cathode The open-circuit potential is obtained. Then, the interface overpotential is calculated based on the solid-phase potential, liquid-phase potential, and open-circuit potential. ; To avoid numerical divergence in exponential operations, the overpotential can be adjusted. η Perform cropping to confine it to a preset range; Then, the exchange current density and interfacial reaction flux are calculated using the Butler-Volmer equation. The exchange current density can be expressed as: ; in, The reaction rate constant is... and These are the charge transfer coefficients for the anode and cathode, respectively.
[0035] Interfacial reaction flux or reaction current density can be expressed as: ; in, F It is Faraday's constant. R The gas constant is... T For temperature.
[0036] When the charge / discharge data contains the actual current I At that time, the predicted current obtained from the Butler-Volmer equation is used. With real current The mean square error between them is used as the Butler-Volmer reaction kinetic loss: ; When the charge / discharge data does not contain the actual current At that time, no calculation was performed. But retain This term serves as the interfacial reaction flux term in the subsequent solid-phase diffusion residual.
[0037] S6. Physical constraints on solid-state diffusion based on the order reduction relationship of the single-particle model like Figure 4 and Figure 5As shown, to describe the lithium-ion diffusion process inside lithium iron phosphate particles, this embodiment uses a single-particle model with reduced-order relations to construct solid-phase diffusion physical constraints. Based on the surface lithium stoichiometry, average lithium stoichiometry, equivalent solid-phase diffusion coefficient, and interfacial reaction flux obtained from the Butler-Volmer equation, the static solid-phase diffusion physical residuals are constructed: ; in, This is the equivalent particle radius. This residual is used to ensure consistency between the internal diffusion replenishment process and the interfacial reaction consumption process within the particle.
[0038] The physical uniformity loss of solid-phase diffusion is defined as: ; In another implementation, if the charge / discharge data simultaneously includes the current cycle characteristics, the next cycle characteristics, and the time interval between them... Δt This allows for the construction of dynamic solid-state diffusion constraints. First, the surface lithium stoichiometry at the next time step is predicted based on the characteristics of the next cycle. And calculate the rate of change of surface lithium stoichiometry: ; Then, a theoretical rate of change is constructed based on the reduced-order kinetic equations of the single-particle model, and the mean square error between the two is used as the dynamic diffusion loss. .
[0039] The final loss of physical uniformity in solid-state diffusion can be expressed as: ; When the next time-instance feature or time interval is missing, only the static solid-state diffusion physical residual is used as the solid-state diffusion physical consistency loss.
[0040] S7. Total Loss Function and Model Training like Figure 4 and Figure 5 As shown, the remaining lifetime prediction loss, Butler-Volmer reaction kinetics loss, and solid-state diffusion physical constraint loss are weighted and fused to obtain the total training loss: ; in, and These are the weighting coefficients for Butler-Volmer reaction kinetic losses and solid-phase diffusion losses, respectively.
[0041] In training scenarios that include real current data and All participated in the training; in training scenarios that do not include real current data. Set to 0 to keep only and This enables training with weak physical constraints on data without current labels.
[0042] During training, the Adam or AdamW optimizer can be used to update parameters, and the optimal model parameters can be selected based on the validation set error. To evaluate model performance, the root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R²) can be used. 2 Evaluation is conducted using indicators such as [list of indicators].
[0043] S8, Lifetime Prediction Output After training, charge and discharge data of the lithium iron phosphate battery to be evaluated are collected and a cycle feature matrix is constructed. This matrix is then input into the trained electrochemical-physical constraint Transformer model, which outputs a predicted remaining lifetime value for the battery in its current state. This output can be further provided to the battery management system for health status assessment, maintenance plan development, energy storage scheduling optimization, or degradation early warning.
[0044] To verify the effectiveness of the method of this invention, this embodiment uses the publicly available battery aging dataset from the MIT-Stanford-Toyota Research Center for experiments. This dataset contains 124 commercial lithium-ion batteries, all of which were cycled to failure under fast-charging conditions. The batteries are lithium iron phosphate (LFP) / graphite systems, manufactured by A123 Systems (model: APR18650M1A). The experiment was conducted in a forced convection thermostatic chamber set at 30°C, using a 48-channel Arbin LBT electrochemical workstation to perform cycle tests on horizontally placed cylindrical batteries. Each cell has a rated capacity of 1.1 Ah and a rated voltage of 3.3 V.
[0045] First, the cycling data of each battery in the dataset is preprocessed to extract the voltage, capacity, or charge-discharge curve features corresponding to each cycle, and a cycling feature matrix of uniform length is constructed. Then, the feature matrix is input into the Transformer network, and the model extracts the long-range dependencies in the cycling degradation process through a self-attention mechanism, and outputs the remaining lifetime prediction and hidden electrochemical variables.
[0046] During the training phase, first set up =0, Several candidate values within the range of 1e-7 to 1e-5 were selected, and ablation experiments were conducted for different physical constraint strengths; then the optimal value was fixed. Further adjustments were made to the learning rate, hidden layer dimension, number of attention heads, and number of network layers to obtain optimal validation set results. If current labels exist in the dataset, the Butler-Volmer current supervision loss was further enabled, and joint optimization was performed. and .
[0047] The experimental comparisons included a pure Transformer model, a Transformer model with Butler-Volmer constraints, a Transformer model with SPM solid-state diffusion constraints, and a Transformer model with both Butler-Volmer and SPM dual physical constraints. Experimental results were evaluated using metrics such as RMSE, MAE, and MAPE. The results are as follows: Figure 6 As shown, compared to the pure Transformer model, the Transformer+BV+SPM model provided in this invention reduces RMSE by 33.801, a decrease of approximately 37.87%; MAPE by 0.0282, a decrease of approximately 30.23%; and MAE by 25.907, a decrease of approximately 37.56%. These results indicate that introducing BV constraints or SPM constraints alone can improve the model's predictive performance. Furthermore, the combined use of BV reaction kinetics constraints and SPM solid-phase diffusion constraints further enhances the model's physical consistency in representing the battery degradation process, thereby effectively improving the accuracy, stability, and interpretability of the remaining life prediction for lithium iron phosphate batteries.
[0048] Based on the same inventive concept, embodiments also provide a lithium iron phosphate battery remaining life prediction device based on electrochemically physically constrained Transformer, including: The data acquisition and preprocessing module collects charge and discharge data during the cyclic aging process of lithium iron phosphate batteries and constructs a battery cycle characteristic matrix. The feature extraction and electrochemical variable output module constructs and stores an electrochemically physically constrained Transformer model, including a linear projection layer, a Transformer network, a remaining lifetime prediction head, and an electrochemical variable prediction head. The battery cycling feature matrix is input into the linear projection layer to obtain the input sequence, and the input sequence is input into the Transformer network to obtain a shared temporal embedding vector. Based on the shared temporal embedding vector, the remaining lifetime prediction head and the electrochemical variable prediction head are constructed respectively to output the remaining lifetime prediction value and the electrochemical variable, respectively. The physical loss construction and joint training module constructs a solid-phase diffusion physical consistency loss based on electrochemical variables, the Butler-Volmer equation, and the reduced-order solid-phase diffusion relationship of the single-particle model. It then jointly trains the electrochemical physical constraint Transformer model based on the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss to obtain the jointly trained electrochemical physical constraint Transformer model. The remaining lifetime prediction output module collects the charge and discharge data of the lithium iron phosphate battery to be evaluated and constructs a cycle feature matrix. It inputs the jointly trained electrochemical-physical constraint Transformer model and outputs the remaining lifetime prediction value of the lithium iron phosphate battery to be evaluated.
[0049] Based on the same inventive concept, the embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when processed and executed, implements the above-described method for predicting the remaining life of a lithium iron phosphate battery.
[0050] It should be noted that the lithium iron phosphate battery remaining life prediction device, electronic device, and computer-readable storage medium provided in the above embodiments all belong to the same inventive concept as the lithium iron phosphate battery remaining life prediction method. For details of their specific implementation process, please refer to the above embodiments of the lithium iron phosphate battery remaining life prediction method, which will not be repeated here.
[0051] The above embodiments are only used to explain the inventive concept of the present invention, and are not intended to limit the protection of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical and methodological essence of the present invention shall still fall within the scope of the technical and methodological solutions of the present invention.
Claims
1. A method for predicting the remaining lifetime of lithium iron phosphate batteries based on electrochemically constrained Transformers, characterized in that, include: 1) Collect charge and discharge data during the cyclic aging process of lithium iron phosphate batteries and construct a battery cycle characteristic matrix; 2) Construct an electrochemically physically constrained Transformer model, including a linear projection layer, a Transformer network, a remaining lifetime prediction head, and an electrochemical variable prediction head: Input the battery cycling feature matrix into the linear projection layer to obtain the input sequence, input the input sequence into the Transformer network to obtain the shared temporal embedding vector, and construct the remaining lifetime prediction head and the electrochemical variable prediction head based on the shared temporal embedding vector, which are used to output the remaining lifetime prediction value and the electrochemical variable, respectively. 3) Construct a solid-phase diffusion physical consistency loss based on electrochemical variables, the Butler-Volmer equation, and the reduced-order solid-phase diffusion relationship of the single-particle model, and jointly train the electrochemically constrained Transformer model based on the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss. 4) Collect charge and discharge data of the lithium iron phosphate battery to be evaluated and construct a cycle feature matrix. Input the jointly trained electrochemical-physical constraint Transformer model and output the predicted remaining lifetime value of the lithium iron phosphate battery to be evaluated.
2. The method according to claim 1, characterized in that, In step 1), the charge and discharge data includes multiple data such as cycle number, capacity, voltage, current, temperature, and charge and discharge curve characteristics. The charge and discharge data is cleaned, truncated, normalized, and matrixed to construct a battery cycle characteristic matrix.
3. The method according to claim 1, characterized in that, In step 2), the linear projection layer maps the battery cycling feature matrix to a latent space of a specified dimension to obtain the input sequence of the Transformer network; the Transformer network extracts the long-range dependencies in the battery cycling degradation process through a multi-head self-attention mechanism to obtain a shared temporal embedding vector.
4. The method according to claim 1, characterized in that, In step 2), the electrochemical variables include surface lithium stoichiometry, average lithium stoichiometry, solid phase potential, electrolyte phase potential, and equivalent solid phase diffusion coefficient.
5. The method according to claim 4, characterized in that, In step 3), the surface lithium stoichiometry is input into the open-circuit potential function of the lithium iron phosphate cathode to obtain the open-circuit potential; the interfacial overpotential is calculated based on the solid phase potential, the electrolyte phase potential, and the open-circuit potential, and the interfacial overpotential is substituted into the Butler-Volmer equation to obtain the interfacial reaction flux; based on the reduced-order solid-phase diffusion relationship of the single-particle model, the static solid-phase diffusion physical residual is constructed using the surface lithium stoichiometry, the average lithium stoichiometry, the equivalent solid-phase diffusion coefficient, and the interfacial reaction flux, and this residual is used as the solid-phase diffusion physical consistency loss.
6. The method according to claim 5, characterized in that, When the charging data contains the feature matrices and time intervals of adjacent cycles or adjacent time steps, a dynamic solid-phase diffusion constraint is further constructed. The error between the rate of change of the surface lithium stoichiometry at adjacent time steps and the reduced-order kinetic equation of the single-particle model is used as the dynamic solid-phase diffusion loss. The sum of the dynamic solid-phase diffusion loss and the static solid-phase diffusion physical residual is used as the solid-phase diffusion physical consistency loss. When the charging and discharging data does not contain information about adjacent time steps, only the static solid-phase diffusion physical residual is used as the solid-phase diffusion physical consistency loss.
7. The method according to claim 1, characterized in that, In step 3), when the charge / discharge data contains current labels, the error between the predicted current and the actual current calculated based on the Butler-Volmer equation is used to construct the Butler-Volmer reaction kinetics loss. The remaining lifetime prediction loss, the Butler-Volmer reaction kinetics loss, and the solid-phase diffusion physical consistency loss are weighted and fused together as the total training loss function to jointly train the electrochemically constrained Transformer model. When the charge / discharge data does not contain current labels, the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss are weighted and fused together as the total training loss function to jointly train the electrochemically constrained Transformer model.
8. A device for predicting the remaining life of a lithium iron phosphate battery based on an electrochemically physically constrained Transformer, employing the method described in any one of claims 1-7, characterized in that, include: The data acquisition and preprocessing module collects charge and discharge data during the cyclic aging process of lithium iron phosphate batteries and constructs a battery cycle characteristic matrix. The feature extraction and electrochemical variable output module constructs and stores an electrochemically physically constrained Transformer model, including a linear projection layer, a Transformer network, a remaining lifetime prediction head, and an electrochemical variable prediction head. The battery cycling feature matrix is input into the linear projection layer to obtain the input sequence, and the input sequence is input into the Transformer network to obtain a shared temporal embedding vector. Based on the shared temporal embedding vector, the remaining lifetime prediction head and the electrochemical variable prediction head are constructed respectively to output the remaining lifetime prediction value and the electrochemical variable, respectively. The physical loss construction and joint training module constructs a solid-phase diffusion physical consistency loss based on electrochemical variables, the Butler-Volmer equation, and the reduced-order solid-phase diffusion relationship of the single-particle model. It then jointly trains the electrochemical physical constraint Transformer model based on the remaining lifetime prediction loss and the solid-phase diffusion physical consistency loss to obtain the jointly trained electrochemical physical constraint Transformer model. The remaining lifetime prediction output module collects the charge and discharge data of the lithium iron phosphate battery to be evaluated and constructs a cycle feature matrix. It inputs the jointly trained electrochemical-physical constraint Transformer model and outputs the remaining lifetime prediction value of the lithium iron phosphate battery to be evaluated.
9. A computing device, characterized in that, The device includes a memory and one or more processors, wherein the memory stores an executable program, and the one or more processors, when executing the program, implement the lithium iron phosphate battery remaining life prediction method according to any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is processed and executed, it implements the method for predicting the remaining life of a lithium iron phosphate battery as described in any one of claims 1-8.
Citation Information
Patent Citations
Charge state and power state combined prediction method for battery health state
CN122283455A
Method and system for predicting remaining life of battery
CN122283476A