A battery soc / sob joint prediction method and system of a structure level physical information fusion pi-transformer
Patent Information
- Application Number
- CN202611136208.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]有鉴于此,本发明的目的在于提供一种结构级物理信息融合PI-Transformer的电池SOC/SOH联合预测方法及系统,用于解决现有纯数据驱动模型在电池状态预测中存在的预测越界、退化趋势不合理、搁置阶段波动、充放电方向不一致以及物理可解释性不足的问题
与现有技术相比,本发明至少具有如下有益效果:第一,将电流、电压、温度和应变等多源信息与工步、时间和容量标签统一到 SOC/SOH 联合预测框架中,提高了对复杂循环工况的表征能力;第二,通过数据编码器和物理编码器双分支结构区分统计时序规律与物理机理特征,提高了模型可解释性;第三,通过门控融合模块自适应调整不同表征的贡献,使模型能够在不同工况下兼顾数据拟合和物理一致性;第四,通过状态更新输出模块从结构层面约束 SOC/SOH 演化逻辑,降低 SOH 异常回升和 SOC 方向错误的风险;第五,通过多项物理约束损失进一步减少预测越界、搁置阶段波动和局部高频抖动,提高工程应用可靠性。
Smart Images

Figure CN122962427A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of battery state estimation, energy storage safety monitoring and artificial intelligence time series prediction technology, and relates to a battery SOC / SOH joint prediction method and system based on structural physical information fusion PI-Transformer. Background Technology
[0002] Lithium-ion batteries are widely used in electric vehicles, energy storage power stations, portable devices, and industrial power systems. State of charge (SOC) and state of health (SOH) are key parameters in battery management systems. SOC reflects the battery's current remaining usable charge, while SOH reflects the degree of capacity degradation and aging. Accurate prediction of SOC and SOH helps improve the reliability of energy dispatching, safety warnings, lifespan assessments, and maintenance decisions.
[0003] Existing SOC / SOH estimation methods mainly include methods based on equivalent circuit models, methods based on empirical degradation models, and data-driven methods based on deep learning. Model-based methods have a certain degree of physical interpretability, but modeling under complex operating conditions, nonlinear aging, and multi-sensor coupling is challenging. Deep learning-based methods can learn complex time-series relationships from large-scale cyclic test data, but purely data-driven models are prone to problems such as SOC or SOH exceeding limits, abnormal SOH recovery, SOC fluctuations during the resting phase, inconsistent charging and discharging directions, and insufficient generalization outside the operating conditions.
[0004] Furthermore, under multi-source sensor conditions, current, voltage, temperature, and strain signals reflect electrochemical load, thermal response, and structural stress state, respectively. If these features are only fed as ordinary inputs into a single Transformer encoder, the model can fit statistical correlations, but it is difficult to explicitly distinguish between data-driven temporal representations and physical mechanism representations. If only physical penalties are added to the loss function, it may not be possible to guarantee the evolution direction and state update logic of SOC / SOH at the model structure level. Therefore, it is necessary to propose a joint prediction method for battery SOC / SOH that simultaneously integrates multi-source electro-thermal-strain information, structural-level physical encoding, and physically constrained training objectives. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a battery SOC / SOH joint prediction method and system based on the PI-Transformer of structural physical information fusion, which is used to solve the problems of prediction over-limit, unreasonable degradation trend, fluctuation during the shelving stage, inconsistent charging and discharging directions, and insufficient physical interpretability in the existing pure data-driven models for battery state prediction.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A joint prediction method for battery SOC / SOH based on structural-level physical information fusion PI-Transformer, the method specifically includes the following steps: S1. Obtain battery cycle test data for model training. The battery cycle test data includes cycle number, step type, total time, current, voltage, capacity, first strain signal V1, second strain signal V2, first temperature T1 and second temperature T2. S2. Preprocess the battery cycle test data, parse the total time to obtain the time in seconds, generate the step code and whether it is put on hold according to the step type, calculate the time interval delta_t_s between adjacent sampling points and the time interval cycle_delta_t_s within the same cycle, and construct the SOC tag and SOH tag according to the capacity. S3. Construct physical derived features based on the preprocessed data. The physical derived features include absolute current value, power, average temperature, temperature difference, average strain, strain difference, ampere-hour integral increment, and stress factor. S4. Combine the original sensor features, process time features, and physical derived features into multi-source time-series input features, normalize the multi-source time-series input features, and construct time-series samples of fixed length within the same loop. S5. Input the time series samples into the structure-level physical information fusion PI-Transformer model, which includes a data encoder, a physical encoder, a gating fusion module, and a state update output module. S6. Extract data-driven representations of multi-source time-series input features through the data encoder, extract physical representations corresponding to steps, time, current, power, temperature, strain, ampere-hour integral increment and stress factor through the physical encoder, and generate fused representations through the gating fusion module. S7. Based on the fusion representation, the SOC prediction sequence and SOH prediction sequence are generated through the state update output module, and the SOC prediction value and SOH prediction value at the final time step are used as the battery state prediction result. S8. Construct a joint training objective based on data supervision loss, sequence supervision loss and physical constraint loss, and train the structure-level physical information fusion PI-Transformer model to obtain a model for joint prediction of battery SOC / SOH. S9. Obtain the operating data of the battery to be predicted, perform preprocessing, physical derived feature construction, normalization and sequence construction on the operating data in the same way as in the training phase, input the constructed time series sample to be predicted into the trained model, and output the SOC prediction value and SOH prediction value of the battery to be predicted. The physical constraint loss includes at least the SOC / SOH boundary constraint loss, the SOH degradation trend constraint loss, the SOC ampere-hour integral consistency loss, the shelved state SOC stability loss, the step direction consistency loss, the temperature-strain degradation constraint loss, and the sequence smoothing loss.
[0007] Furthermore, the battery cycle test data during the training phase includes capacity data, which is used to construct supervised training labels; the operating data to be predicted during the prediction phase does not require capacity data as a necessary input, but includes at least one or more of current, voltage, temperature, strain, time information, and step information; the SOC label is obtained by the ratio of the current sampling point capacity to the rated capacity, and the SOH label is obtained by the ratio of the maximum capacity to the rated capacity within the same cycle.
[0008] Furthermore, in step S2, the step encoding includes charging step encoding, discharging step encoding, and shelving step encoding, wherein the charging step encoding is 1, the discharging step encoding is -1, and the shelving step encoding is 0; the total time parsing supports time formats with more than 24 hours, hour-minute-second formats, time interval formats, or tabular time formats in days.
[0009] Furthermore, in step S3, the ampere-hour integral increment is calculated based on the step code, absolute current value, time interval, coulombic efficiency, and rated capacity, and is used to characterize the theoretical trend of SOC change with current and time; the stress factor is obtained by weighted summation or averaging of normalized absolute current value, absolute power value, mean temperature value, temperature difference, mean absolute strain value, and strain difference, and is used to characterize the degradation stress of the battery under high current, high power, high temperature, or high strain conditions.
[0010] Furthermore, in step S4, the fixed length is L, which is preset according to the sampling frequency, battery condition and model parameters, and all sampling points in each time series sample come from the same cycle number.
[0011] Further, in step S5, the data encoder includes a data projection layer, a position encoding layer, and at least one Transformer Encoder layer, used to extract the temporal dependencies of the battery cycling process from multi-source temporal input features; the physical encoder includes a physical feature projection layer, a position encoding layer, and at least one Transformer Encoder layer, used to extract physical mechanism representations from step encoding, whether it is paused, time interval, absolute current value, power, temperature, strain, ampere-hour integral increment, and stress factor; the gating fusion module generates gating coefficients based on the data-driven representation and physical representation, and performs weighted fusion of the data-driven representation and physical representation according to the gating coefficients; the state update output module includes an initial state prediction head, a SOC incremental prediction head, and a SOH degradation prediction head; the SOC incremental prediction head generates a bounded bidirectional SOC state update, enabling the SOC prediction sequence to rise or fall according to charging or discharging conditions; the SOH degradation prediction head generates a non-negative SOH degradation amount with an upper bound, enabling the SOH prediction sequence to be updated in a gradual degradation or stable manner.
[0012] Furthermore, the SOC / SOH boundary constraint loss is used to constrain the predicted SOC and SOH values to be within a preset reasonable range, which includes 0 to 1, and penalizes predicted values that are below the lower bound or above the upper bound; the SOC ampere-hour integral consistency loss calculates the theoretical SOC change based on the step code, current, time interval, coulomb efficiency, and rated capacity, and constrains the predicted SOC change of adjacent time steps to be consistent with the theoretical SOC change. The SOC stabilization loss in the shelving state is used to penalize abrupt changes in the predicted SOC value of adjacent time steps when the step encoding represents shelving or the absolute value of the current is less than a threshold; the step direction consistency loss is used to constrain the predicted SOC value from decreasing under the charging step and to constrain the predicted SOC value from increasing under the discharging step.
[0013] Furthermore, the SOH degradation trend constraint loss is used to penalize abnormal increases in SOH prediction values exceeding the allowable threshold between adjacent time steps, adjacent time series samples, or adjacent cycles, so that the SOH prediction results conform to the degradation law of battery capacity decreasing or approximately not increasing with the aging process; the temperature-strain degradation constraint loss constructs a stress factor based on the absolute value of current, maximum temperature, temperature difference, average strain, strain difference, and strain change, and strengthens the penalty for abnormal increases in SOH prediction values when the stress factor is large.
[0014] Furthermore, the sequence smoothing loss is constructed based on the first or second difference of the SOC / SOH prediction sequence to suppress local high-frequency jitter in the prediction curve; after the SOC prediction value and SOH prediction value are output, it also includes checking whether the SOC prediction value and SOH prediction value exceed the preset reasonable range, and outputting an out-of-bounds flag, a degradation anomaly flag, or a working condition consistency prompt.
[0015] The present invention also provides a joint prediction system for battery SOC / SOH based on structural-level physical information fusion PI-Transformer. The system includes a data acquisition module, a preprocessing module, a physical feature construction module, a sequence construction module, a data encoding module, a physical encoding module, a gating fusion module, a state update prediction module, a physical constraint training module, and a result output module; the system is configured to perform the method described above.
[0016] The beneficial effects of this invention are as follows: Compared with existing technologies, this invention has at least the following beneficial effects: First, it unifies multi-source information such as current, voltage, temperature, and strain with step, time, and capacity labels into a joint SOC / SOH prediction framework, improving the ability to characterize complex cyclic operating conditions; Second, it distinguishes between statistical time-series patterns and physical mechanism characteristics through a dual-branch structure of data encoder and physical encoder, improving model interpretability; Third, it adaptively adjusts the contributions of different representations through a gated fusion module, enabling the model to balance data fitting and physical consistency under different operating conditions; Fourth, it constrains the SOC / SOH evolution logic at the structural level through a state update output module, reducing the risk of abnormal SOH recovery and SOC direction errors; Fifth, it further reduces prediction out-of-bounds errors, stall fluctuations, and local high-frequency jitter through multiple physical constraint losses, improving the reliability of engineering applications.
[0017] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a flowchart of the battery SOC / SOH joint prediction method based on the structural-level physical information fusion PI-Transformer of the present invention; Figure 2This is a schematic diagram of the PI-Transformer model structure for structural-level physical information fusion of the present invention; Figure 3 This is a schematic diagram of the physical derived feature construction and gating fusion process of the present invention; Figure 4 This is a schematic diagram illustrating the generation of SOC / SOH prediction sequences by the state update output module of this invention. Detailed Implementation
[0019] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0020] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0021] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0022] Figure 1 This is a flowchart of the battery SOC / SOH joint prediction method based on the structural-level physical information fusion PI-Transformer of this invention. Figure 2This is a schematic diagram of the structure of the PI-Transformer model for structural-level physical information fusion according to the present invention. The present invention provides a battery SOC / SOH joint prediction method based on the PI-Transformer model for structural-level physical information fusion. During the training phase, this method collects battery cycle test data, including cycle number, step type, total time, current, voltage, capacity, strain signal, and temperature signal. The data undergoes time analysis, step encoding, standby state identification, time interval calculation, SOC tag construction, and SOH tag construction. Furthermore, physical derived features such as power, ampere-hour integral increment, temperature statistics, strain statistics, and stress factor are constructed based on current, voltage, temperature, strain, and time interval. Fixed-length time-series samples are constructed within the same cycle and input into the PI-Transformer model for structural-level physical information fusion.
[0023] Figure 3 This diagram illustrates the physical feature construction and gating fusion process of the present invention. The structure-level physical information fusion PI-Transformer model includes a data encoder, a physical encoder, a gating fusion module, and a state update output module. The data encoder is used to learn the statistical temporal relationships in the multi-source input features; the physical encoder is used to learn the battery operating mechanism features reflected by the steps, time, current, power, temperature, strain, ampere-hour integral increment, and stress factor; the gating fusion module is used to adaptively adjust the fusion ratio of data-driven representation and physical representation according to the sample state; the state update output module is used to generate the SOC / SOH prediction sequence in a state update manner, where SOC is allowed to rise or fall with the charge / discharge state, and SOH is updated according to the non-negative degradation amount.
[0024] Figure 4 This diagram illustrates the generation of the SOC / SOH prediction sequence by the state update output module of this invention. During training, in addition to data supervision loss and sequence supervision loss, this invention introduces SOC / SOH boundary constraints, SOH degradation trend constraints, SOC ampere-hour integral consistency constraints, idle state SOC stability constraints, step direction consistency constraints, temperature-strain degradation constraints, and sequence smoothing constraints. Through the synergistic effect of structural-level physical fusion and loss-level physical constraints, the model prediction results simultaneously satisfy data fitting accuracy and battery operating mechanism consistency.
[0025] In one embodiment, battery cycle aging test data is collected. The raw data includes cycle number, step type, total time, current, voltage, capacity, first strain signal V1, second strain signal V2, first temperature T1, and second temperature T2. The total time can be in a time format exceeding 24 hours, an hour-minute-second format, a time interval format, or a tabular time format in days. The system uniformly parses the total time into seconds, obtains delta_t_s based on the time difference between adjacent sampling points, and calculates cycle_delta_t_s within the same cycle. The system generates a step code based on the step type, where charging step code is 1, discharging step code is -1, and resting step code is 0, and generates a resting flag.
[0026] In the construction of training labels, the SOC label can be obtained by the ratio of the current sampling point capacity to the rated capacity, and the SOH label can be obtained by the ratio of the maximum capacity to the rated capacity within the same cycle. For the prediction stage, the operating data to be predicted may not include capacity data, but instead use current, voltage, temperature, strain, time information, and step information as the main inputs, thereby adapting to the online estimation scenario of the battery management system.
[0027] In the physical derivative feature construction, the system calculates power based on current and voltage, calculates the mean temperature and temperature difference based on a first and second temperature, and calculates the mean strain, strain difference, and strain change based on a first and second strain signal. The system calculates the ampere-hour integral increment based on the work step code, absolute current value, sampling time interval, coulombic efficiency, and rated capacity to characterize the theoretical SOC variation trend. The system can also normalize and weight the absolute current value, absolute power value, mean temperature, temperature difference, mean absolute strain value, and strain difference to obtain a stress factor, which is used to characterize the degradation risk under high load, high temperature, or large strain conditions.
[0028] In sequence construction, the system combines original sensor features, step-time features, and physically derived features into multi-source time-series input features, normalizes them using training set statistics, and constructs sliding time-series samples of length L within the same loop. L can be set according to the sampling frequency, battery condition, and model size, for example, from 10 to 200 sampling points, preferably 50. To avoid cross-loop state confusion, all sampling points in each time-series sample come from the same loop number.
[0029] In the model structure, the data encoder includes a data projection layer, a position encoding layer, and at least one Transformer Encoder layer to learn long-short-term temporal dependencies in multi-source input features. The physical encoder includes a physical feature projection layer, a position encoding layer, and at least one Transformer Encoder layer to learn the physical mechanism representations corresponding to steps, whether a pause occurs, time intervals, absolute current values, power, temperature, strain, ampere-hour integral increments, and stress factors. The gating fusion module receives data-driven representations and physical representations, generates gating coefficients, and performs weighted fusion of the two types of representations based on the gating coefficients.
[0030] In the state update output module, the initial state prediction head is used to generate the initial SOC / SOH state at the start of the sequence; the SOC increment prediction head is used to generate a bounded bidirectional SOC state update, allowing SOC to rise or fall according to charging or discharging conditions; the SOH degradation prediction head is used to generate a non-negative SOH degradation value with an upper bound, allowing SOH to gradually degrade or remain stable during the cycling process. Through the above state update methods, the model not only outputs the predicted SOC / SOH values at the final time step, but also the predicted SOC / SOH sequence for the entire time window.
[0031] In the training objectives, the data supervision loss is used to constrain the final time step SOC / SOH prediction value to be consistent with the label; the sequence supervision loss is used to constrain the SOC / SOH prediction sequence to be consistent with the true sequence; the SOC / SOH boundary constraint loss is used to penalize prediction values that are below the lower bound or above the upper bound; the SOH degradation trend constraint loss is used to penalize abnormal rises in SOH between adjacent time steps, adjacent samples, or adjacent cycles; the SOC ampere-hour integral consistency loss is used to constrain the change in SOC prediction between adjacent time steps to be consistent with the theoretical change in ampere-hour integral; the shelving state SOC stabilization loss is used to constrain the SOC from undergoing unreasonable abrupt changes in shelving or near-zero current states; the step direction consistency loss is used to constrain the SOC from decreasing during charging steps and from increasing during discharging steps; the temperature-strain degradation constraint loss is used to enhance the penalty for abnormal rises in SOH under high temperature, large temperature difference, or large strain conditions; and the sequence smoothing loss is used to suppress local high-frequency jitter in the prediction curve.
[0032] During the prediction phase, the system acquires the operational data of the battery to be predicted and performs the same time parsing, step encoding, physical derived feature construction, normalization, and time-series sample construction as in the training phase. The time-series samples to be predicted are then input into the trained structural-level physical information fusion PI-Transformer model to obtain the predicted SOC, predicted SOH, SOC / SOH prediction sequence, and optional out-of-bounds markers, degradation anomaly markers, and operational consistency indicators. This output can be used for real-time state estimation, safety warnings, life assessment, and operational decisions in the battery management system.
[0033] This invention also provides a joint prediction system for battery SOC / SOH based on a structural-level physical information fusion PI-Transformer. The system includes a data acquisition module, a preprocessing module, a physical feature construction module, a sequence construction module, a data encoding module, a physical encoding module, a gating fusion module, a state update prediction module, a physical constraint training module, and a result output module. These modules can be implemented by software, hardware, or a combination of both, and can be deployed in battery management systems, energy storage monitoring platforms, cloud-based model training platforms, or edge computing devices.
[0034] The present invention also provides a computer-readable storage medium and an electronic device. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-described method. The electronic device includes a processor and a memory, wherein the memory stores the computer program, and the processor, when executing the computer program, implements the above-described method.
[0035] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for joint prediction of battery SOC / SOH using a structural-level physical information fusion PI-Transformer, characterized in that, The method specifically includes the following steps: S1. Obtain battery cycle test data for model training. The battery cycle test data includes cycle number, step type, total time, current, voltage, capacity, first strain signal V1, second strain signal V2, first temperature T1 and second temperature T2. S2. Preprocess the battery cycle test data, parse the total time to obtain the time in seconds, generate the step code and whether it is put on hold according to the step type, calculate the time interval delta_t_s between adjacent sampling points and the time interval cycle_delta_t_s within the same cycle, and construct the SOC tag and SOH tag according to the capacity. S3. Construct physical derived features based on the preprocessed data. The physical derived features include absolute current value, power, average temperature, temperature difference, average strain, strain difference, ampere-hour integral increment, and stress factor. S4. Combine the original sensor features, process time features, and physical derived features into multi-source time-series input features, normalize the multi-source time-series input features, and construct time-series samples of fixed length within the same loop. S5. Input the time series samples into the structure-level physical information fusion PI-Transformer model, which includes a data encoder, a physical encoder, a gating fusion module, and a state update output module. S6. Extract data-driven representations of multi-source time-series input features through the data encoder, extract physical representations corresponding to steps, time, current, power, temperature, strain, ampere-hour integral increment and stress factor through the physical encoder, and generate fused representations through the gating fusion module. S7. Based on the fusion representation, the SOC prediction sequence and SOH prediction sequence are generated through the state update output module, and the SOC prediction value and SOH prediction value at the final time step are used as the battery state prediction result. S8. Construct a joint training objective based on data supervision loss, sequence supervision loss and physical constraint loss, and train the structure-level physical information fusion PI-Transformer model to obtain a model for joint prediction of battery SOC / SOH. S9. Obtain the operating data of the battery to be predicted, perform preprocessing, physical derived feature construction, normalization and sequence construction on the operating data in the same way as in the training phase, input the constructed time series sample to be predicted into the trained model, and output the SOC prediction value and SOH prediction value of the battery to be predicted. The physical constraint loss includes at least the SOC / SOH boundary constraint loss, the SOH degradation trend constraint loss, the SOC ampere-hour integral consistency loss, the shelved state SOC stability loss, the step direction consistency loss, the temperature-strain degradation constraint loss, and the sequence smoothing loss.
2. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 1, characterized in that, The battery cycle test data during the training phase includes capacity data, which is used to construct supervised training labels; the operating data to be predicted during the prediction phase does not require capacity data as a necessary input, but includes at least one or more of the following: current, voltage, temperature, strain, time information, and step information; the SOC label is obtained by the ratio of the current sampling point capacity to the rated capacity, and the SOH label is obtained by the ratio of the maximum capacity to the rated capacity within the same cycle.
3. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 2, characterized in that, In step S2, the step encoding includes charging step encoding, discharging step encoding, and shelving step encoding, wherein the charging step encoding is 1, the discharging step encoding is -1, and the shelving step encoding is 0; the total time parsing supports time formats with more than 24 hours, hour-minute-second formats, time interval formats, or tabular time formats in days.
4. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 3, characterized in that, In step S3, the ampere-hour integral increment is calculated based on the step code, absolute current value, time interval, coulomb efficiency, and rated capacity, and is used to characterize the theoretical trend of SOC change with current and time. The stress factor is obtained by weighted summation or averaging of normalized absolute values of current, power, temperature, temperature difference, strain, and strain difference, and is used to characterize the degradation stress of the battery under high current, high power, high temperature, or high strain conditions.
5. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 4, characterized in that, In step S4, the fixed length is L, which is preset according to the sampling frequency, battery condition and model parameters, and all sampling points in each time series sample come from the same cycle number.
6. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 5, characterized in that, In step S5, the data encoder includes a data projection layer, a position encoding layer, and at least one Transformer Encoder layer, used to extract the temporal dependencies of the battery cycling process from multi-source temporal input features; the physical encoder includes a physical feature projection layer, a position encoding layer, and at least one Transformer Encoder layer, used to extract physical mechanism representations from step encoding, whether it is paused, time interval, absolute current value, power, temperature, strain, ampere-hour integral increment, and stress factor; the gating fusion module generates gating coefficients based on the data-driven representation and physical representation, and performs weighted fusion of the data-driven representation and physical representation according to the gating coefficients; the state update output module includes an initial state prediction head, a SOC increment prediction head, and a SOH degradation prediction head; the SOC increment prediction head generates a bounded bidirectional SOC state update, enabling the SOC prediction sequence to rise or fall according to charging or discharging conditions; the SOH degradation prediction head generates a non-negative SOH degradation amount with an upper bound, enabling the SOH prediction sequence to be updated in a gradual degradation or stable manner.
7. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 6, characterized in that, The SOC / SOH boundary constraint loss is used to constrain the predicted SOC and SOH values to be within a preset reasonable range, which includes 0 to 1, and penalizes predicted values that are below the lower bound or above the upper bound; the SOC ampere-hour integral consistency loss calculates the theoretical SOC change based on the step code, current, time interval, coulomb efficiency, and rated capacity, and constrains the predicted SOC change of adjacent time steps to be consistent with the theoretical SOC change. The SOC stabilization loss in the shelving state is used to penalize abrupt changes in the predicted SOC value of adjacent time steps when the step encoding represents shelving or the absolute value of the current is less than a threshold; the step direction consistency loss is used to constrain the predicted SOC value from decreasing under the charging step and to constrain the predicted SOC value from increasing under the discharging step.
8. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 7, characterized in that, The SOH degradation trend constraint loss is used to penalize abnormal increases in SOH prediction values exceeding the allowable threshold between adjacent time steps, adjacent time series samples, or adjacent cycles, so that the SOH prediction results conform to the degradation law of battery capacity decreasing or approximately not increasing with the aging process. The temperature-strain degradation constraint loss constructs a stress factor based on the absolute value of current, maximum temperature, temperature difference, average strain, strain difference, and strain change, and strengthens the penalty for abnormal increases in SOH prediction values when the stress factor is large.
9. The battery SOC / SOH joint prediction method based on structural-level physical information fusion PI-Transformer according to claim 8, characterized in that, The sequence smoothing loss is constructed based on the first or second difference of the SOC / SOH prediction sequence to suppress local high-frequency jitter in the prediction curve. After the SOC and SOH prediction values are output, the system also checks whether the SOC and SOH prediction values exceed a preset reasonable range and outputs an out-of-bounds flag, a degradation anomaly flag, or a condition consistency prompt.
10. A battery SOC / SOH joint prediction system based on structural-level physical information fusion PI-Transformer, characterized in that, The system includes a data acquisition module, a preprocessing module, a physical feature construction module, a sequence construction module, a data encoding module, a physical encoding module, a gating fusion module, a state update prediction module, a physical constraint training module, and a result output module; the system is configured to perform the method of any one of claims 1 to 9.