A method and related apparatus for detecting the thermal state of a battery
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-14
AI Technical Summary
但是,基于物理机理的模型方法大多缺乏有效的在线参数修正机制,在电池老化至电池寿命末期时,仍沿用电池出厂初期标定的参数进行产热计算,这必然导致模型计算出的产热量严重低估电池的实际发热量,进而引发热管理策略响应滞后,无法及时对电池进行有效的热调控,极端情况下可能诱发热失控风险,严重影响电池使用安全性
[0035]借由上述技术方案,本申请提供的一种电池热状态检测方法及相关装置,包括:获取待测电池的目标运行数据,并提取目标运行数据的状态特征;调取已训练的热状态预测模型,热状态预测模型是以对样本运行数据的状态特征所预测的目标电池温度趋近于其标签电池温度为目标,对基础模型进行迭代训练得到的,基础模型包括基于物理机理的物理分支、基于深度学习的数据分支和门控融合组件;将目标运行数据的状态特征输入至热状态预测模型,以通过物理分支预测获得第一物理温度、数据分支预测获得第一残差温度、门控融合组件对第一物理温度和第一残差温度进行融合后输出待测电池的目标电池温度。本申请中热状态预测模型在预测热状态时一方面基于物理分支来预测满足物理传导方程的物理温度,另一方面基于数据分支来捕捉复杂的瞬态变化(如热滞后效应)形成残差温度,最后基于门控融合组件对物理温度与残差温度进行融合输出目标电池温度。本申请不再依赖静态参数,即使电池老化、内阻增加,模型依然可以准确预测电池温度,误差不随使用年限增加而扩大,保证后续的热管理和热调控,提升电池使用安全。另外,本申请由于引入了物理先验,模型对训练数据的需求量大幅减少,且收敛速度更快。
Smart Images

Figure CN122193947B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and in particular to a method and related apparatus for detecting the thermal state of a battery. Background Technology
[0002] In scenarios such as lithium-ion battery lifecycle management, complex dynamic operating conditions, and functional safety assurance, accurate estimation of battery thermal state is one of the core functions of the Battery Management System (BMS), which directly affects the battery's safety, lifespan, and operational reliability.
[0003] Currently, the mainstream battery thermal state estimation schemes in the industry are based on physical mechanism modeling methods, with the lumped parameter thermal network (LPTN) model being a typical example. However, most physical mechanism-based modeling methods lack effective online parameter correction mechanisms. As the battery ages to the end of its lifespan, the parameters calibrated at the initial manufacturing stage are still used for heat generation calculations. This inevitably leads to a significant underestimation of the actual heat generation by the model, resulting in a lag in the response of thermal management strategies. Consequently, the battery cannot be effectively thermally controlled in a timely manner, and in extreme cases, this may induce thermal runaway risks, seriously affecting the safety of battery use. Summary of the Invention
[0004] In view of the above problems, this application provides a battery thermal state detection method and related apparatus to effectively predict the battery thermal state. The specific solution is as follows:
[0005] The first aspect of this application provides a method for detecting the thermal state of a battery, the method comprising:
[0006] Acquire the target operating data of the battery under test, and extract the state features of the target operating data;
[0007] The trained thermal state prediction model is retrieved. The thermal state prediction model is obtained by iteratively training the basic model with the goal of predicting that the target battery temperature based on the state characteristics of the sample running data is close to its tag battery temperature. The basic model includes a physical branch based on physical mechanism, a data branch based on deep learning, and a gated fusion component.
[0008] The state characteristics of the target operating data are input into the thermal state prediction model to obtain a first physical temperature through the physical branch prediction, a first residual temperature through the data branch prediction, and the target battery temperature of the battery under test is output after the gating fusion component fuses the first physical temperature and the first residual temperature.
[0009] In one possible implementation, the state characteristics include: basic state characteristics and key state characteristics, wherein the key state characteristics are obtained by processing the basic state characteristics, and the basic state characteristics include at least SOC, average temperature and SOH.
[0010] In one possible implementation, the process of iteratively training the base model to obtain the thermal state prediction model, with the goal of the target battery temperature predicted by the state characteristics of the sample running data approaching its labeled battery temperature, includes:
[0011] The training samples for this iteration of training are determined from the sample running data;
[0012] The SOC, average temperature, and SOH of the training samples are input into the physics branch, so that the physics branch predicts and outputs the corresponding heat generation parameters, heat dissipation parameters, and ambient temperature, and performs physical mechanism calculations to obtain the second physical temperature; at the same time, the basic state features and key state features of the training samples are input into the data branch, so that the data branch predicts and outputs the second residual temperature based on the time attention mechanism.
[0013] The target battery temperature of the training sample is output after fusing the second physical temperature and the second residual temperature through the gated fusion component.
[0014] The loss function value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples.
[0015] If the loss function value does not meet the corresponding convergence condition, the learning parameters of the physical branch and the data branch are adjusted respectively, and the process returns to the step of determining the training samples for this iteration in the sample running data, until the loss function value meets the corresponding convergence condition.
[0016] In one possible implementation, the step of fusing the second physical temperature and the second residual temperature through the gated fusion component and then outputting the target battery temperature of the training sample includes:
[0017] The gated fusion component predicts the residual confidence level of the current training iteration, and the second physical temperature and the second residual temperature are fused according to the residual confidence level to output the target battery temperature of the training sample.
[0018] Accordingly, adjusting the learning parameters of the physical branch and the data branch respectively includes:
[0019] The learning parameters of the physical branch, the data branch, and the gating fusion component are adjusted.
[0020] In one possible implementation, determining the loss function value for the current training iteration based on the target battery temperature and the labeled battery temperature of the training samples includes:
[0021] The data fitting loss value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples.
[0022] The predicted temperature rise for this iteration of training is determined using the target battery temperature and its average temperature of the training samples. At the same time, a static mask corresponding to the training samples is generated.
[0023] Calculate the average physical loss of this training iteration based on the predicted temperature rise and the static mask;
[0024] The loss function value is determined based on the data fitting loss and the average physical loss.
[0025] In one possible implementation, the battery thermal state detection method further includes:
[0026] Monitor the heat generation parameters predicted by the physical branch, and generate an alarm message if the heat generation parameters exceed the corresponding threshold.
[0027] A second aspect of this application provides a battery thermal state detection device, the battery thermal state detection device comprising:
[0028] The model training module is used to iteratively train the basic model to obtain a thermal state prediction model with the goal of the target battery temperature predicted by the state characteristics of the sample running data approaching its label battery temperature. The basic model includes a physical branch based on physical mechanisms, a data branch based on deep learning, and a gated fusion component.
[0029] The thermal state detection module is used to acquire target operating data of the battery under test and extract the state features of the target operating data; retrieve a trained thermal state prediction model; input the state features of the target operating data into the thermal state prediction model, so as to obtain a first physical temperature through the physical branch prediction, obtain a first residual temperature through the data branch prediction, and output the target battery temperature of the battery under test after the gating fusion component fuses the first physical temperature and the first residual temperature.
[0030] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the battery thermal state detection method described in the first aspect or any implementation thereof.
[0031] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0032] The memory is used to store computer programs;
[0033] The processor is used to execute the computer program so that the electronic device can implement the battery thermal state detection method of the first aspect or any implementation thereof.
[0034] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform a battery thermal state detection method as described in the first aspect or any implementation thereof.
[0035] By employing the above technical solution, this application provides a battery thermal state detection method and related apparatus, comprising: acquiring target operating data of the battery under test and extracting state features of the target operating data; retrieving a trained thermal state prediction model, wherein the thermal state prediction model aims to make the predicted target battery temperature based on the state features of the sample operating data approach its labeled battery temperature, and is obtained by iteratively training a basic model, the basic model including a physical branch based on physical mechanisms, a data branch based on deep learning, and a gated fusion component; inputting the state features of the target operating data into the thermal state prediction model, thereby obtaining a first physical temperature through the physical branch prediction, obtaining a first residual temperature through the data branch prediction, and outputting the target battery temperature of the battery under test by fusing the first physical temperature and the first residual temperature through the gated fusion component. In this application, the thermal state prediction model predicts the physical temperature that satisfies the physical conduction equation based on the physical branch, and captures complex transient changes (such as thermal hysteresis effect) to form a residual temperature based on the data branch, and finally outputs the target battery temperature by fusing the physical temperature and the residual temperature through the gated fusion component. This application no longer relies on static parameters. Even with battery aging and increased internal resistance, the model can still accurately predict battery temperature, and the error does not increase with the number of years of use, ensuring subsequent thermal management and control and improving battery safety. In addition, because this application introduces physical priors, the model's requirement for training data is greatly reduced, and the convergence speed is faster. Attached Figure Description
[0036] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0037] Figure 1A schematic flowchart illustrating a battery thermal state detection method provided in an embodiment of this application;
[0038] Figure 2 A schematic diagram of the structure of a basic model provided in an embodiment of this application;
[0039] Figure 3 This is a partial flowchart illustrating a battery thermal state detection method provided in an embodiment of this application;
[0040] Figure 4 This is another schematic flowchart of a battery thermal state detection method provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram of the structure of a battery thermal state detection device provided in an embodiment of this application;
[0042] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0044] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0045] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0046] To facilitate understanding of this application, the relevant concepts involved in this application will be explained below:
[0047] BMS (Battery Management System): is the core system in new energy vehicles responsible for monitoring and managing the battery status.
[0048] SOH (State of Health): A core indicator used to measure the degree of battery performance degradation.
[0049] SOC (State of Charge): Used to indicate the percentage of a battery's nominal capacity that is currently available for charging.
[0050] Lumped-Parameter Thermal Network (LPTN) is an engineering modeling method used to simplify the analysis and rapid calculation of temperature distribution and heat transfer behavior in complex systems. Its core idea is to ignore the internal temperature gradient of an object and discretize the continuous heat transfer system into a network of "nodes" and "thermal resistances," thereby transforming complex partial differential equation problems into easily solvable algebraic or ordinary differential equation systems.
[0051] LSTM (Long Short-Term Memory) is a special type of recurrent neural network that can effectively solve the gradient vanishing or gradient explosion problems of traditional RNNs when processing long sequences of data.
[0052] Currently, existing battery thermal state estimation techniques can be broadly categorized into three types: physical mechanism-based modeling methods, data-driven methods, and parameter identification methods based on state observers. While these three methods have achieved certain results in their respective specific application scenarios, they still face significant technical bottlenecks when addressing core industrial application requirements such as dynamic changes throughout the battery's lifecycle, adaptability to complex dynamic operating conditions, and functional safety robustness. These limitations make it difficult to meet the accuracy, reliability, and safety requirements of practical applications. Among these, physical mechanism-based modeling methods remain the most widely used mainstream solution in the industry.
[0053] The physical mechanism-based modeling method takes the basic laws of heat transfer as its theoretical foundation and uses thermoelectric analogy theory to abstract the battery into an equivalent circuit network composed of thermal resistance and thermal capacity. Its simplest implementation is a first-order RC thermal model, which assumes that the battery is a homogeneous node and uses Newton's law of cooling to describe the balance between internal heat generation and external heat dissipation, thereby achieving the estimation of the battery's thermal state.
[0054] The estimation accuracy of this method is highly dependent on the accuracy of the thermal model parameters. In existing BMS development processes, thermal model parameters (such as internal resistance heat generation factor and convective heat transfer coefficient) are usually obtained through offline calibration experiments at the initial stage of battery manufacturing and fixed in the controller, without being updated during subsequent operation. However, lithium-ion batteries are complex electrochemical systems. During long-term use, with the increase in cycle number and calendar aging, a series of irreversible chemical reactions occur inside the battery (such as SEI film thickening, electrolyte drying, and loss of active lithium), which directly leads to a decrease in battery state of health (SOH) and a significant increase in battery internal resistance. Related research data shows that the internal resistance at the end of the battery's lifespan may increase by 50% or even more compared to the initial manufacturing stage.
[0055] However, most physical mechanism-based model methods lack effective online parameter correction mechanisms. When the battery ages to the end of its lifespan, the parameters calibrated at the beginning of the battery manufacturing process are still used to calculate heat generation. This inevitably leads to the model calculating heat generation that seriously underestimates the actual heat generation of the battery, resulting in a lag in the response of thermal management strategies. This makes it impossible to effectively regulate the battery's thermal performance in a timely manner, and in extreme cases, it may induce the risk of thermal runaway, seriously affecting the safety of battery use.
[0056] Secondly, the methods described above typically only consider Joule heat, neglecting reversible entropic heat and mixing heat. While Joule heat dominates at high rates, the endothermic / exothermic effects of entropic heat cannot be ignored at low rates or within specific SOC ranges. To reduce computational complexity, existing solutions often simplify the heat generation coefficient to a constant or a simple lookup table value that only varies with temperature, failing to accurately reflect the complex electrochemical heat generation characteristics of the battery under different SOC states.
[0057] Furthermore, the accuracy of the physical model is highly dependent on thermal boundary conditions (such as ambient temperature and coolant flow rate). In real-world vehicle environments, ambient temperature sensors are often installed outside the battery pack or in specific locations, making it impossible to accurately represent the micro-environmental temperature around each individual cell. When the external environment changes drastically, the constant thermal coefficient set by the model becomes inapplicable, leading to prediction bias.
[0058] To address the aforementioned issues, this application provides a battery thermal state detection method. In one aspect, the embodiment of this invention introduces State of Health (SOH) into the physical parameter generation network of the physical branch. This enables the physical branch to grow and automatically adapt to changes in thermal characteristics throughout the battery's entire lifecycle, from new to old, without requiring manual recalibration. Furthermore, this application proposes a monotonicity constraint under static conditions (i.e., no temperature rise under static conditions). This is a simplified engineering-based physical constraint that solves the overfitting problem of AI models and significantly reduces training difficulty. Additionally, this application utilizes a gating fusion component to achieve a dynamic trade-off between the physical branch and the data branch, which addresses the robustness issue of a single model under extreme conditions (such as sensor failure or ultra-high temperatures). The battery thermal state detection method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0059] See Figure 1 , Figure 1 This is a schematic flowchart illustrating a battery thermal state detection method provided in an embodiment of this application. Figure 1 As shown in the figure, the battery thermal state detection method provided in this application embodiment may include steps S101 to S103, which are described in detail below.
[0060] S101, acquire the target operating data of the battery under test, and extract the state features of the target operating data.
[0061] In this embodiment, the operating data of the battery under test during use (i.e., target operating data) is sampled. The target operating data includes sampling timestamp, voltage amplitude (in volts), current amplitude (in amperes), cell temperature (in degrees Celsius), SOC (current percentage of charge obtained by ampere-hour integration or OCV lookup table method, with a value range of [0,100]), and SOH (characterizing the ratio of the battery's current maximum usable capacity to its rated capacity, which can be estimated by internal resistance). In this embodiment, SOH is regarded as a key slowly changing variable affecting the physical mechanism.
[0062] Because sensor sampling may experience frame drops or jitter, all data needs to be resampled to a fixed frequency (time aligned). The time difference between two adjacent sampling timestamps is calculated; if data is interrupted, this time difference will increase to prevent physical integration errors. An upper limit is set for this time difference, and missing data is filled in using linear interpolation. Additionally, noise exceeding physical limits, such as total battery voltage and individual cell temperature, is removed. To improve the model's nonlinear fitting capability, this embodiment further extracts high-dimensional feature vectors from the target operating data as state features.
[0063] In one possible implementation, the state characteristics include: basic state characteristics and key state characteristics. The key state characteristics are obtained by processing the basic state characteristics. The basic state characteristics include at least SOC, average temperature and SOH.
[0064] Specifically, the basic state characteristics include at least SOC, average temperature (i.e., the average temperature of the individual cells) and SOH. Of course, the basic state characteristics may also include voltage amplitude, current amplitude, etc., but this application embodiment does not limit this.
[0065] Furthermore, key state characteristics can be derived from basic state characteristics, including power characteristics, thermodynamic characteristics, current stress factor, and voltage deviation. Specifically, the power characteristic is directly related to the total heat generation and can be calculated by combining the voltage amplitude and current amplitude. Thermodynamic characteristics include the temperature rise rate and temperature range; the temperature rise rate is the average temperature change per unit time (the ratio of the average temperature difference between two adjacent sampling timestamps to the time difference), which includes historical trend information; the temperature range is the difference between the maximum and minimum temperatures of a single cell, characterizing the thermal imbalance inside the battery. Of course, if the data returned by the BMS includes a temperature difference field, it can be used directly. The current stress factor is used to capture the special thermal shock to the battery caused by high current discharge at low charge levels (internal resistance usually increases at low SOC, resulting in more intense heat generation), and can be calculated based on the current amplitude and SOC. The voltage deviation is used to eliminate the influence of voltage plateau periods and highlight transient changes, and can be calculated by combining the voltage amplitude with the average voltage amplitude within its sliding window.
[0066] In practical applications, to capture temporal dependencies, this embodiment employs a sliding window technique to convert state features into tensor form, setting the sliding window length to be... Input tensor ,in, For batch size, The number of features, the target vector This is the predicted temperature for the next moment in the sliding window.
[0067] S102, retrieve the trained thermal state prediction model. The thermal state prediction model is obtained by iteratively training the basic model with the goal of predicting that the target battery temperature based on the state characteristics of the sample running data is close to the temperature of its labeled battery. The basic model includes a physical branch based on physical mechanisms, a data branch based on deep learning, and a gating fusion component.
[0068] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a basic model provided for an embodiment of this application. For example... Figure 2As shown in the embodiments of this application, the basic model includes a physical branch based on physical mechanisms, a data branch based on deep learning, and a gated fusion component. The physical branch and the data branch are two parallel branches. The gated fusion component fuses the physical temperature predicted by the physical branch and the residual temperature predicted by the data branch to obtain the target battery temperature at the next moment.
[0069] It should be noted that the physics branch includes a multidimensional state-dependent physical parameter generation network. This network is responsible for calculating macroscopic physical parameters based on the current microstate of the battery, and then outputting the corresponding physical temperature using physical thermal model formulas. Additionally, the data branch is data-driven and used to capture complex transient changes (such as thermal hysteresis). It can utilize deep learning networks to process time-series data, capture the historical impact of current surges, and thus predict the residuals of the physics branch, outputting the corresponding residual temperature to compensate for the physical temperature.
[0070] When training the base model to obtain the thermal state prediction model, sample operation data within a sliding window can be collected, and the state features of the sample operation data can be extracted. In addition, labels are pre-set on the sample operation data to indicate the battery temperature at the next moment (i.e., the labeled battery temperature). The state features of the sample operation data are input into the base model, and the learning parameters of the base model are iteratively trained multiple times with the goal of the predicted target battery temperature approaching its labeled battery temperature to obtain the thermal state prediction model.
[0071] See Figure 3 , Figure 3 This is a partial flowchart illustrating a battery thermal state detection method provided in an embodiment of this application. Figure 3 As shown in the embodiment of this application, a battery thermal state detection method is provided. The process of iteratively training a basic model to obtain a thermal state prediction model with the goal of the target battery temperature predicted by the state characteristics of the sample running data approaching its tag battery temperature may include steps S201 to S205, which are described in detail below.
[0072] S201, determine the training samples to be used for this iteration of training from the sample running data.
[0073] In this embodiment of the application, during each iteration of training, a portion of the sample running data can be randomly or partially selected as the training samples for this iteration of training.
[0074] S202, the SOC, average temperature and SOH of the training samples are input to the physics branch so that the physics branch predicts and outputs the corresponding heat generation parameters, heat dissipation parameters and ambient temperature, and performs physical mechanism calculations to obtain the second physical temperature; at the same time, the basic state features and key state features of the training samples are input to the data branch so that the data branch predicts and outputs the second residual temperature based on the time attention mechanism.
[0075] In this embodiment, the SOC, average temperature, and SOH of the training samples are concatenated and input into the physics branch. The purpose of introducing SOH is to enable the physics parameter generation network to understand that, under the same current and temperature, older batteries (with lower SOH) generate more heat, thus perceiving the increase in internal resistance due to battery aging. The physics parameter generation network structure includes an input layer, hidden layers, and an output layer. The input layer receives the SOC, average temperature, and SOH of the training samples; the hidden layer is a fully connected layer containing 16 neurons, with the hyperbolic tangent activation function; the output layer is also a fully connected layer with an output dimension of 1. Furthermore, the physics constraint activation function of the physics parameter generation network uses the Softplus function to ensure that the heat generation parameters output by the network are accurate. The values are always positive, avoiding the situation where the model outputs "negative resistance," which violates the laws of physics. Furthermore, the physics parameter generation network simultaneously learns heat dissipation parameters. and ambient temperature This enables the model to adaptively learn the heat dissipation environment.
[0076] The traditional Newtonian cooling theorem describes the temperature change of a battery as follows: (1)
[0077] (1);
[0078] in, Indicates specific heat capacity; Indicates quality; Indicates current; This represents internal resistance (highly nonlinear, affected by multidimensional states). Indicates the surface heat transfer coefficient; Indicates the heat dissipation area; This indicates the current temperature.
[0079] After discretization, the predicted physical temperature at the next moment can be expressed as the following formula (2):
[0080] (2).
[0081] Define heat generation parameters Heat dissipation parameters Then the predicted physical temperature at the next moment can be expressed as the following formula (3):
[0082] (3).
[0083] In the traditional model, the heat generation parameters While typically considered a constant, this application's embodiments consider it a function of the battery's multidimensional states. Therefore, a physical parameter generation network automatically learns this heat generation parameter. Simultaneously set heat dissipation parameters and ambient temperature It is also a trainable scalar parameter, allowing the model to automatically learn the environmental thermal resistance.
[0084] For the heat generation parameters predicted by the physics branch Heat dissipation parameters and ambient temperature Combining the average temperature and current amplitude at the last moment in the sliding window, the physical mechanism is calculated according to the above formula (3) to obtain the corresponding physical temperature (i.e., the second physical temperature).
[0085] In addition, in this embodiment, the basic state features (including at least SOC, average temperature, SOH, voltage amplitude, current amplitude, etc.) and key state features (power features, thermodynamic features, current pressure factor, voltage deviation, etc.) of the training samples are input to the data branch. This data branch uses LSTM as the basic model to process time series data, capture the historical impact of current surges, and introduces a time attention mechanism to automatically identify the key moment within the sliding window that has the greatest impact on the current temperature (such as the moment of a large current surge), and assigns it more weight. The residual (i.e., error amount) of the physical branch is predicted using context vectors, thereby outputting the corresponding residual temperature (i.e., the second residual temperature).
[0086] In one possible implementation, during the iterative training of the thermal state model, heat generation parameters can also be monitored, and an alarm can be triggered when the heat generation parameters experience an abnormal surge. To this end, the battery thermal state detection method provided in this application embodiment further includes the following steps:
[0087] Monitor the heat generation parameters predicted by the physical branch, and generate alarm information when the heat generation parameters exceed the corresponding threshold.
[0088] In this embodiment of the application, the heat generation parameter predicted by the physical branch is monitored. If the heat generation parameter is found to be greater than the corresponding threshold, it indicates that the battery internal resistance has increased abnormally, which may be a sign of a micro short circuit. An alarm message is generated and an alarm is triggered.
[0089] S203 outputs the target battery temperature of the training sample after fusing the second physical temperature and the second residual temperature through a gated fusion component.
[0090] In this embodiment of the application, the second physical temperature and the second residual temperature are fused by a gated fusion component, that is, the second residual temperature is used to perform residual compensation on the second physical temperature, so as to obtain the target battery temperature of the training sample.
[0091] S204, determine the loss function value for this iteration of training based on the target battery temperature and the labeled battery temperature of the training samples.
[0092] In this embodiment of the application, mean squared error (MSE) can be used to measure the difference between the target battery temperature of the training sample and its tag battery temperature, thereby obtaining the loss function value of this iteration of training.
[0093] In one possible implementation, to prevent the neural network from learning incorrect patterns amidst data noise, embodiments of this application design a loss function that incorporates physical constraints, including data fitting loss and physical-logic constraint loss. See also Figure 4 , Figure 4 This is another schematic flowchart illustrating a battery thermal state detection method provided in an embodiment of this application. Figure 4 As shown in the embodiment of this application, a battery thermal state detection method is provided, wherein step S204, "determining the loss function value of this iteration training based on the target battery temperature and the label battery temperature of the training sample", may include steps S301 to S304, which are described in detail below.
[0094] S301, determine the data fitting loss value for this iteration of training based on the target battery temperature and the labeled battery temperature of the training samples.
[0095] In this embodiment of the application, the data fitting loss value can be calculated according to the following formula (4):
[0096] (4);
[0097] in, This represents the value of the data loss function; Indicates the number of samples in the training samples; Indicates the first The target battery temperature for each sample; Indicates the first The temperature of the labeled battery in each sample.
[0098] S302, using the target battery temperature and its average temperature of the training samples, determines the predicted temperature rise for this iteration of training, and at the same time, generates the static mask corresponding to the training samples.
[0099] In this embodiment, current sensors often exhibit zero-point drift noise in actual BMS data, which can cause the model to mistakenly interpret a small current as a factor and thus predict temperature generation. This embodiment defines a static operating condition. ,in, Indicates the current amplitude. This indicates the current amplitude threshold under static operating conditions (e.g., 0.02A).
[0100] Therefore, the predicted temperature rise is calculated according to the following formula (5). :
[0101] (5);
[0102] in, Indicates the target battery temperature; This represents the average temperature at the last moment in the sliding window.
[0103] In addition, the current amplitude at the last moment of the sliding window is compared with the current amplitude threshold to determine whether it is a static operating condition. If it is a static operating condition, then the static mask is determined. Conversely, if it is not a static operating condition, then a static mask is determined. .
[0104] S303 calculates the average physical loss for this iteration of training based on the predicted temperature rise and static mask.
[0105] In this embodiment, the penalty amount for this iteration of training is first calculated according to the following formula (6). :
[0106] (6).
[0107] It should be noted that, The properties of a function are .if (That is, the predicted temperature has dropped.) The function outputs 0 (no penalty); if , The function retains this value as the penalty base. Furthermore, a temperature rise is only considered a violation and will incur a penalty value when the battery is at rest; if the battery is charging or discharging, a temperature rise is normal, and the penalty value will be masked to zero.
[0108] Furthermore, the average physical loss is calculated according to the following formula (7). :
[0109] (7).
[0110] S304, determine the loss function value based on data fitting loss and average physical loss.
[0111] In this embodiment of the application, the loss function value can be calculated according to the following formula (8).
[0112] (8).
[0113] in, This represents the value of the loss function; The penalty weight hyperparameter representing the physical loss (e.g., set to 0.2) is used to balance the accuracy of data fitting with the strictness of adherence to physical rules.
[0114] S205, if the loss function value does not meet the corresponding convergence condition, adjust the learning parameters of the physical branch and the data branch respectively, and return to step S201 until the loss function value meets the corresponding convergence condition.
[0115] In this embodiment, it is determined whether the loss function value meets the corresponding convergence condition. If it does, the Adam optimizer is used to adjust the learning parameters of the physical branch and the data branch, including the network parameters of the physical parameter generation network and the LSTM network parameters, with the goal of minimizing the loss function value. Then, the process returns to step S201 to enter the next iteration of training. Training ends when the loss function value meets the corresponding convergence condition.
[0116] The thermal state prediction model can be deployed on cloud-based BMS platforms and in-vehicle embedded chip scenarios. The powerful computing power of the cloud receives real-time data uploaded by the vehicle and performs high-precision thermal state monitoring. The trained model can be converted into a lightweight format via TensorRT or ONNX, which can run on automotive-grade chips (such as Infineon Aurix or Qualcomm Snapdragon Automotive). The thermal state prediction model consists of matrix multiplication and basic physical formulas, with moderate computational load, which can be supported by the computing resources of the vehicle.
[0117] In one possible implementation, unlike the simple superposition of physical temperature and residual temperature, to prevent excessive abnormal compensation from the data branch under unseen operating conditions, this application embodiment introduces an adaptive gating mechanism to dynamically determine the degree of trust in the residual prediction of the data branch, thereby automatically determining whether the data branch needs to be intervened. In this regard, this application embodiment provides a battery thermal state detection method, wherein step S203, "outputting the target battery temperature of the training sample after fusing the second physical temperature and the second residual temperature through a gating fusion component," may include the following steps:
[0118] The residual confidence level of this iteration of training is predicted by the gated fusion component, and the target battery temperature of the training sample is output after fusing the second physical temperature and the second residual temperature according to the residual confidence level.
[0119] Accordingly, step S205, "adjusting the learning parameters for the physical branch and the data branch respectively," can be achieved through the following steps:
[0120] Adjust the learning parameters for the physical branch, data branch, and gating fusion component.
[0121] In this embodiment, the basic model of the gating fusion component is a neural network, which may include a linear layer and a sigmoid function. The linear layer maps the context vector to a real number, and the sigmoid function compresses this real number into the interval (0,1), thus obtaining a gating coefficient. As the residual confidence level, the target battery temperature is further calculated according to the following formula (9):
[0122] (9);
[0123] in, Indicates the target battery temperature; Indicates the second physical temperature; This indicates the second residual temperature.
[0124] When the battery is in a steady state or under simple operating conditions, the physical branch is sufficient to describe it, and the gated fusion component may learn a small residual confidence level. This makes the target battery temperature more biased towards the physical output, ensuring stability. When the battery is under severe dynamic conditions (large physical branch error), the gated fusion component automatically increases the residual confidence level. When the residual confidence level → 0, the thermal state prediction model degenerates into a pure physical branch, which has extremely high safety. When the residual confidence level → 1, the thermal state prediction model mainly relies on the gated fusion component for correction, pursuing high accuracy.
[0125] Therefore, when optimizing the learning parameters of the physical branch and the data branch using the Adam optimizer, it is also necessary to adjust the network parameters of the linear layer of the gated fusion component in order to proceed to the next iteration of training.
[0126] S103, the state characteristics of the target operating data are input into the thermal state prediction model, so as to obtain the first physical temperature through physical branch prediction, obtain the first residual temperature through data branch prediction, and output the target battery temperature of the battery under test after the gating fusion component fuses the first physical temperature and the first residual temperature.
[0127] In this embodiment, the state characteristics of the target operating data are input into the thermal state prediction model. The physical branch predicts the corresponding physical temperature (i.e., the first physical temperature), and the data branch predicts the corresponding residual temperature (i.e., the first residual temperature). Then, the first physical temperature and the first residual temperature are fused by a gating fusion component to obtain the target battery temperature of the battery under test. In addition, if the target battery temperature of the battery under test is greater than the corresponding temperature threshold, an alarm message is generated and an alarm is triggered.
[0128] Based on the above description, the battery thermal state detection method provided in this application can achieve high-precision detection of the thermal state throughout the entire life cycle. Even if the battery ages and its internal resistance increases, the model can still accurately predict the temperature, and the error does not increase with the number of years of use. In addition, due to the physical constraints of static placement, the noise of the current sensor will not cause false temperature alarms. Furthermore, the method uses monitoring of heat generation parameters to infer the internal state of the battery, thus possessing the advantages of a white-box model.
[0129] The above describes a battery thermal state detection method provided by the embodiments of this application. The following will describe the apparatus for performing the above-described battery thermal state detection method.
[0130] See Figure 5 , Figure 5 This is a schematic diagram of a battery thermal state detection device provided in an embodiment of this application. Figure 5 As shown in the embodiment of this application, a battery thermal state detection device includes:
[0131] The model training module 401 is used to iteratively train the basic model to obtain a thermal state prediction model with the goal of the target battery temperature predicted by the state characteristics of the sample running data approaching its label battery temperature. The basic model includes a physical branch based on physical mechanisms, a data branch based on deep learning, and a gated fusion component.
[0132] The thermal state detection module 402 is used to acquire the target operating data of the battery under test and extract the state features of the target operating data; call the trained thermal state prediction model; input the state features of the target operating data into the thermal state prediction model, so as to obtain the first physical temperature through physical branch prediction, obtain the first residual temperature through data branch prediction, and output the target battery temperature of the battery under test after the gating fusion component fuses the first physical temperature and the first residual temperature.
[0133] In one possible implementation, the state characteristics include: basic state characteristics and key state characteristics. The key state characteristics are obtained by processing the basic state characteristics. The basic state characteristics include at least SOC, average temperature and SOH.
[0134] In one possible implementation, the model training module 401 is specifically used for:
[0135] The training samples for this iteration are determined from the sample running data. The SOC, average temperature, and SOH of the training samples are input into the physics branch, so that the physics branch predicts and outputs the corresponding heat generation parameters, heat dissipation parameters, and ambient temperature, and performs physical mechanism calculations to obtain the second physical temperature. At the same time, the basic state features and key state features of the training samples are input into the data branch, so that the data branch predicts and outputs the second residual temperature based on the time attention mechanism. The second physical temperature and the second residual temperature are fused through a gating fusion component to output the target battery temperature of the training samples. The loss function value for this iteration is determined based on the target battery temperature and the labeled battery temperature of the training samples. If the loss function value does not meet the corresponding convergence condition, the learning parameters of the physics branch and the data branch are adjusted, and the process returns to the step of determining the training samples for this iteration from the sample running data until the loss function value meets the corresponding convergence condition.
[0136] In one possible implementation, the model training module 401, used to output the target battery temperature of the training sample after fusing the second physical temperature and the second residual temperature through a gated fusion component, is specifically used for:
[0137] The residual confidence of this iteration of training is predicted by the gated fusion component, and the target battery temperature of the training sample is output after fusing the second physical temperature and the second residual temperature according to the residual confidence.
[0138] Accordingly, the learning parameters for the physics branch and the data branch are adjusted, including:
[0139] Adjust the learning parameters for the physical branch, data branch, and gating fusion component.
[0140] In one possible implementation, the model training module 401, used to determine the loss function value for this iteration of training based on the target battery temperature and its labeled battery temperature of the training samples, is specifically used for:
[0141] The data fitting loss value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples; the predicted temperature rise for this iteration of training is determined using the target battery temperature and the average temperature of the training samples, and a static mask corresponding to the training samples is generated; the average physical loss for this iteration of training is calculated based on the predicted temperature rise and the static mask; and the loss function value is determined based on the data fitting loss and the average physical loss.
[0142] In one possible implementation, the model training module 401 is also used for:
[0143] Monitor the heat generation parameters predicted by the physical branch, and generate alarm information when the heat generation parameters exceed the corresponding threshold.
[0144] It should be noted that the detailed functions of each module in the embodiments of this application can be found in the corresponding disclosure of the above-mentioned battery thermal state detection method embodiments, and will not be repeated here.
[0145] This application also provides an electronic device in its embodiments. See also... Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device in this embodiment may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0146] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. When the electronic device is powered on, the RAM 503 also stores various programs and data required for the operation of the electronic device. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0147] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, memory cards, hard drives, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0148] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the battery thermal state detection methods provided in this application.
[0149] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the battery thermal state detection methods provided in this application.
[0150] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0152] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0153] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for detecting the thermal state of a battery, characterized in that, The battery thermal state detection method includes: Acquire the target operating data of the battery under test, and extract the state features of the target operating data; The trained thermal state prediction model is retrieved. The thermal state prediction model is obtained by iteratively training the basic model with the goal of predicting that the target battery temperature based on the state characteristics of the sample running data is close to its tag battery temperature. The basic model includes a physical branch based on physical mechanism, a data branch based on deep learning, and a gated fusion component. The state characteristics of the target operating data are input into the thermal state prediction model to obtain the first physical temperature through the physical branch prediction, the first residual temperature through the data branch prediction, and the target battery temperature of the battery under test is output after the gated fusion component fuses the first physical temperature and the first residual temperature. The process of iteratively training the base model to obtain the thermal state prediction model, with the goal of the target battery temperature predicted from the state characteristics of the sample operating data approaching its labeled battery temperature, includes: The training samples for this iteration of training are determined from the sample running data; The SOC, average temperature, and SOH of the training samples are input into the physics branch, so that the physics branch predicts and outputs the corresponding heat generation parameters, heat dissipation parameters, and ambient temperature, and performs physical mechanism calculations to obtain the second physical temperature. , express The second physical temperature at that moment. express The second physical temperature at that moment. express The internal resistance at that moment, express Time and The time difference between moments Indicates quality, Indicates specific heat capacity. express Current at a given moment Indicates the surface heat transfer coefficient. Indicates the heat dissipation area. Indicates ambient temperature and defines heat generation parameters. Heat dissipation parameters Simultaneously, the basic state features and key state features of the training samples are input into the data branch, so that the data branch predicts the residual of the physical branch based on the time attention mechanism and outputs the second residual temperature. The target battery temperature of the training sample is output after fusing the second physical temperature and the second residual temperature through the gated fusion component. The loss function value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples. The step of determining the loss function value for this iteration of training based on the target battery temperature and the labeled battery temperature of the training samples includes: The data fitting loss value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples. The predicted temperature rise for this iteration of training is determined by using the target battery temperature and its average temperature of the training samples. At the same time, a static mask corresponding to the training samples is generated based on whether the condition is static. The average physical loss of this training iteration is calculated based on the predicted temperature rise and the static mask. The average physical loss will only occur when the battery temperature rises under the static condition. The loss function value is determined based on the data fitting loss and the average physical loss.
2. The battery thermal state detection method according to claim 1, characterized in that, The state characteristics include: basic state characteristics and key state characteristics. The key state characteristics are obtained by processing the basic state characteristics. The basic state characteristics include at least SOC, average temperature and SOH.
3. The battery thermal state detection method according to claim 2, characterized in that, The process of obtaining the thermal state prediction model by iteratively training the basic model with the goal of making the target battery temperature predicted by the state characteristics of the sample running data approach its label battery temperature also includes: If the loss function value does not meet the corresponding convergence condition, the learning parameters of the physical branch and the data branch are adjusted respectively, and the process returns to the step of determining the training samples for this iteration in the sample running data, until the loss function value meets the corresponding convergence condition.
4. The battery thermal state detection method according to claim 1, characterized in that, The step of fusing the second physical temperature and the second residual temperature through the gated fusion component and then outputting the target battery temperature of the training sample includes: The gated fusion component predicts the residual confidence level of the current training iteration, and the second physical temperature and the second residual temperature are fused according to the residual confidence level to output the target battery temperature of the training sample. Accordingly, adjusting the learning parameters of the physical branch and the data branch respectively includes: The learning parameters of the physical branch, the data branch, and the gating fusion component are adjusted.
5. The battery thermal state detection method according to claim 1, characterized in that, The battery thermal state detection method further includes: Monitor the heat generation parameters predicted by the physical branch, and generate an alarm message if the heat generation parameters exceed the corresponding threshold.
6. A battery thermal state detection device, characterized in that, The battery thermal state detection device includes: The model training module is used to iteratively train the basic model to obtain a thermal state prediction model with the goal of the target battery temperature predicted by the state characteristics of the sample running data approaching its label battery temperature. The basic model includes a physical branch based on physical mechanisms, a data branch based on deep learning, and a gated fusion component. A thermal state detection module is used to acquire target operating data of the battery under test and extract the state features of the target operating data; retrieve a trained thermal state prediction model; input the state features of the target operating data into the thermal state prediction model, so as to obtain a first physical temperature through the physical branch prediction, obtain a first residual temperature through the data branch prediction, and output the target battery temperature of the battery under test after fusing the first physical temperature and the first residual temperature by the gated fusion component. The model training module is specifically used for: The training samples for this iteration are determined from the sample running data; the SOC, average temperature, and SOH of the training samples are input into the physics branch, so that the physics branch predicts and outputs the corresponding heat generation parameters, heat dissipation parameters, and ambient temperature, and performs physical mechanism calculations to obtain the second physical temperature. , express The second physical temperature at that moment. express The second physical temperature at that moment. express The internal resistance at that moment, express Time and The time difference between moments Indicates quality, Indicates specific heat capacity. express Current at a given moment Indicates the surface heat transfer coefficient. Indicates the heat dissipation area. Indicates ambient temperature and defines heat generation parameters. Heat dissipation parameters Simultaneously, the basic state features and key state features of the training samples are input into the data branch, so that the data branch predicts the residual of the physical branch based on the time attention mechanism and outputs the second residual temperature; the second physical temperature and the second residual temperature are fused by the gating fusion component to output the target battery temperature of the training sample; the loss function value of this iteration of training is determined according to the target battery temperature of the training sample and its labeled battery temperature. The model training module, used to determine the loss function value for this iteration of training based on the target battery temperature and the labeled battery temperature of the training samples, is specifically used for: The data fitting loss value for this iteration of training is determined based on the target battery temperature and the labeled battery temperature of the training samples; the predicted temperature rise for this iteration of training is determined using the target battery temperature and the average temperature of the training samples, and a static mask corresponding to the training samples is generated based on whether the condition is static; the average physical loss for this iteration of training is calculated based on the predicted temperature rise and the static mask, and the average physical loss is only generated when the battery temperature rises under the static condition; the loss function value is determined based on the data fitting loss and the average physical loss.
7. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the battery thermal state detection method as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the battery thermal state detection method as described in any one of claims 1 to 5.
9. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the battery thermal state detection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for predicting maximum temperature of battery
CN121765339A
Battery internal temperature estimation method and device, storage medium and equipment
CN121787075A