A method for early warning and intervention of battery thermal runaway, a battery management system and a storage medium

By applying three-dimensional thermodynamic simulation and nonparametric kernel regression model in the battery management system, sensor placement is determined and artifacts are eliminated. Feature vectors are constructed and an upper limit of the dynamic error wrapping band is generated. This solves the problems of high false alarm rate and response delay in battery thermal runaway, and realizes early accurate warning and hardware cutoff.

CN122491098APending Publication Date: 2026-07-31SHENZHEN ZHIXIN WEINA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN ZHIXIN WEINA TECH CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing battery management systems are prone to frequent false alarms of battery thermal runaway when faced with background disturbances such as severe vehicle vibrations, sudden increases in electrical noise, or coolant evaporation. They also have delayed responses and cannot achieve early physical intervention.

Method used

The optimal installation location of the sensor is determined by a three-dimensional thermodynamic transport and fluid distribution simulation model. Artifacts are eliminated by combining a non-parametric kernel regression model. A feature vector of the degree of coordinated change of multiple gases is constructed. Based on the battery pack chemical system identification code, a dynamic error band upper limit is generated, and a risk indication signal and remaining safe escape time are output to perform physical intervention operations.

Benefits of technology

It achieves early and accurate warning of battery thermal runaway and microsecond-level hardware cutoff, effectively avoiding false alarms and missed alarms, and improving the system's response speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491098A_ABST
    Figure CN122491098A_ABST
Patent Text Reader

Abstract

This application discloses a battery thermal runaway early warning and intervention method, a battery management system, and a storage medium. The method determines sensor placement through three-dimensional thermodynamic simulation and dynamically adjusts microcontroller power consumption and sampling frequency based on the coefficient of variation of gas concentration signals. Non-parametric kernel regression is used to remove artifacts and generate dynamic confidence intervals. Multi-channel gas data is time-scaled at the hardware level to construct feature vectors, and step features are extracted through multi-resolution windows. A dual-layer ring buffer is used to remove environmental background. Based on the cell's chemical system, a gas production ratio matrix is ​​invoked to generate a dynamic error envelope upper limit for risk assessment and remaining escape time prediction. Bypass hardware truncation or predictive thermal management intervention is executed according to the risk level. The judgment deviation parameters are uploaded to the cloud to optimize the weight matrix. This application achieves early and accurate warning of thermal runaway and microsecond-level hardware truncation, effectively avoiding false alarms and missed alarms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery safety monitoring technology, and more specifically, to a battery thermal runaway early warning and intervention method, a battery management system, and a storage medium. Background Technology

[0002] In the field of safety monitoring of new energy power batteries, battery management systems generally introduce multi-gas sensor arrays based on microelectromechanical systems (MEMS) to monitor characteristic gases released inside the battery cells before thermal runaway and deflagration. However, inside the sealed and physically complex battery pack, the high-density sensor packaging is prone to local heat accumulation and thermal crosstalk; at the same time, the sensitive components of the sensors will inevitably experience baseline zero-point drift during long-term use.

[0003] Existing early warning technologies typically separate data from each gas monitoring channel, setting independent absolute concentration thresholds for each, and using simple AND / OR logic gates for analysis. This approach is highly susceptible to frequent false alarms when faced with background interference such as severe vehicle vibrations, sudden increases in electrical noise, or normal coolant evaporation. Furthermore, the complex filtering algorithms used to suppress false alarms consume significant microcontroller computing resources, leading to data processing delays. Consequently, the system often only issues a power-off signal after irreversible thermal runaway has occurred, missing the crucial window for early physical safety intervention. Summary of the Invention

[0004] This application provides a battery thermal runaway early warning and intervention method, a battery management system, and a computer-readable storage medium, aiming to solve the technical problems of high false alarm rate, large response delay, and inability to achieve very early physical blocking in the prior art.

[0005] To achieve the above objectives, in a first aspect, this application provides a battery thermal runaway early warning and intervention method, applied to the battery management system of an electric vehicle or energy storage system, wherein the battery management system includes a microcontroller and a microelectromechanical system (MEMS) multi-gas sensor module, and the method includes: Using a three-dimensional thermodynamic transport and fluid distribution simulation model, the structural stationary point coordinates of the multi-gas sensor module of the microelectromechanical system inside the battery pack are determined, and the module is installed according to the structural stationary point coordinates. The structural stationary point coordinates are the spatial coordinates in the simulation model that satisfy the sensor's self-heating temperature rise value being lower than a preset temperature rise threshold and the arrival time value of the exhaust microfluidic jet being lower than a preset time threshold. The gas concentration signal output by the multi-gas sensor module is acquired, and the power supply voltage and clock frequency of the microcontroller are dynamically adjusted based on the comparison result of the statistical coefficient of variation of the gas concentration signal and the preset sparsity threshold. Based on a nonparametric kernel regression model, artifacts in the gas concentration signal are removed, and a discrete sequence of multi-gas concentrations with artifacts removed is output. The data of different gas channels in the multi-gas concentration discrete sequence after artifact removal are time-aligned at the hardware level to construct a feature vector that reflects the degree of coordinated change of multiple gases. The corresponding gas production ratio matrix is ​​retrieved based on the chemical system identification code of the battery pack. The baseline parameters are updated during the resting period to generate the upper limit of the dynamic error band. The risk indication signal and the remaining safe escape time are output based on the relationship between the feature vector and the upper limit of the dynamic error band. Perform physical intervention operations based on the risk indication signals; Based on the triggering result of the physical intervention operation, the gradient deviation vector used to construct the weight matrix of the feature vector is calculated, and the gradient deviation vector is uploaded to the cloud. The cloud updates the weight matrix based on the received gradient deviation vector.

[0006] Furthermore, the step of dynamically adjusting the power supply voltage and clock frequency of the microcontroller based on the comparison result of the statistical coefficient of variation of the gas concentration signal and a preset sparsity threshold includes: When the coefficient of variation is lower than the preset sparsity threshold, the microcontroller is controlled to operate at a first power supply voltage and a first clock frequency. When the coefficient of variation exceeds the preset sparsity threshold, a hardware-level external interrupt is triggered. The interrupt handler controls the microcontroller to switch to a second power supply voltage and a second clock frequency, wherein the second clock frequency is higher than the first clock frequency.

[0007] Furthermore, the method of removing artifacts from the gas concentration signal based on a nonparametric kernel regression model and outputting a discrete sequence of multi-gas concentrations with artifacts removed includes: The discrete time series of raw gas concentrations acquired after the microcontroller switched to the second clock frequency was smoothed by a nonparametric kernel regression model. The nonparametric kernel regression model uses a kernel function with a finite support set. The upper and lower limits of statistical error are calculated based on the local data sampling density within the kernel function coverage bandwidth to generate a dynamic confidence interval. Sampling points falling within the dynamic confidence interval are identified as artifacts and removed. Sampling points that continuously penetrate the upper boundary of the dynamic confidence interval are output as the multi-gas concentration discrete sequence of the removed artifacts.

[0008] Furthermore, the step of hardware-level time-stamp alignment of the data from different gas channels in the artifact-free multi-gas concentration discrete sequence to construct a feature vector reflecting the degree of coordinated change among the multiple gases includes: The discrete sequences of multi-gas concentrations from different gas channels, after artifact removal, are time-stamped and strongly aligned under the same high-frequency hardware clock beat, and then spliced ​​along the time axis into a one-dimensional continuous data stream tensor. The inner product between different gas parameters in the tensor is calculated through hardware multiply-accumulate operations, and the multi-gas joint probability weight matrix is ​​output.

[0009] Furthermore, the method also includes: For the multi-gas joint probability weight matrix, multiple sampling windows with different time resolutions are opened in parallel, and matrix difference operations are performed in each window to obtain the concentration gradient. Verify the topological connectivity of the concentration gradient, apply weight penalties to gradient trajectories that have broken, and perform background suppression processing on gradient trajectories that pass the connectivity verification, outputting a multi-resolution pure step feature vector.

[0010] Furthermore, the method also includes: A first circular buffer is constructed for storing the multi-resolution pure step feature vector, and a second circular buffer is constructed for storing the mean and variance of the multi-resolution pure step feature vector. The first circular buffer has a time window of a first preset duration, and the second circular buffer has a time window of a second preset duration, wherein the second preset duration is longer than the first preset duration. In each operation cycle, the current feature vector stored in the first annular buffer is subtracted from the current environmental dynamic background vector stored in the second annular buffer to output the multi-gas relative concentration change bias matrix after filtering out the current environmental background, which serves as the feature vector reflecting the degree of multi-gas coordinated change.

[0011] Further, the step of retrieving the corresponding gas production ratio matrix based on the chemical system identification code of the battery pack, updating the baseline parameters during the resting period, generating a dynamic error containment band upper limit, and outputting a risk indication signal and remaining safe escape time based on the relationship between the feature vector and the dynamic error containment band upper limit includes: Retrieve the corresponding gas production ratio matrix based on the battery pack chemical system identification code; During the period when the vehicle is stationary without charging or discharging energy exchange for a preset duration, the gas concentration signal is captured as an observation value. The historical baseline mean and covariance matrix are fused with the observation value through a Bayesian posterior probability update equation to overwrite the background baseline mean vector and covariance matrix. The upper limit of the dynamic error envelope is generated based on the eigenvector, the updated covariance matrix, and the preset extreme pressure shock disturbance matrix; When the lower boundary of the feature vector crosses the upper limit of the dynamic error wrapping band, and the proportion of each gas concentration in the feature vector falls within the tolerance range allowed by the gas production ratio matrix, the cell temperature gradient and voltage drop gradient are extracted and constructed into a multidimensional physical state tensor with the feature vector. Through the pre-set degradation analysis mathematical model, integral deduction is performed to calculate the time difference required for the current state to evolve to the irreversible critical point of thermal runaway, and a certain danger Boolean signal and the remaining safe escape time are output. When the feature vector does not meet the above penetration conditions but exceeds the preset early warning threshold, an early sign indication signal and the remaining safe escape time are output.

[0012] Furthermore, the step of performing physical intervention based on the risk indication signal includes: A bypass hardware comparator is connected in parallel on the data flow path of the feature vector to monitor in real time the bias matrix used to construct the feature vector. The bypass hardware comparator bypasses the software polling of the microcontroller and is directly connected to the data flow of the bias matrix. When the confirmed danger Boolean signal is true, and the bypass hardware comparator detects that the product of the rate of change of hydrogen concentration and the rate of change of carbon monoxide concentration in the bias matrix exceeds the preset rigid physical collapse threshold, the bypass hardware comparator triggers a non-maskable hardware interrupt, and the interrupt handler truncates the current operation of the microcontroller and directly outputs a cut-off command to the high-voltage relay. When the early warning indication signal is true, the remaining safe escape time is used as a penalty weighting factor and input to the differentiable predictive control logic. The charging and discharging current limit command is output, and the charging and discharging current limit command is verified by the control barrier function to see if the predicted temperature trajectory of the battery cell intersects with the preset safe temperature upper limit boundary. If they intersect, the command to start forced cooling is output to the thermal management actuator.

[0013] Further, the step of uploading the gradient bias vector to the cloud, and the cloud updating the weight matrix based on the received gradient bias vector, includes: Based on the hardware computing power identification code of the microcontroller, the gradient deviation vector is processed by hierarchical truncation and then uploaded to the cloud; The cloud platform assigns adaptive aggregation weights based on the signal-to-noise ratio of the geographical environment of multiple vehicles, performs weighted aggregation on the received gradient deviation vectors, and updates the weight matrix based on the weighted aggregation result.

[0014] Secondly, this application provides a battery management system, characterized in that it includes: Microelectromechanical systems (MEMS) multi-gas sensor module; A hardware comparator is connected to the microelectromechanical system multi-gas sensor module. The microcontroller is connected to the hardware comparator; A bypass hardware comparator is connected in parallel to the data output path of the multi-gas sensor module of the microelectromechanical system, forming a parallel structure with the input terminal of the microcontroller; A high-voltage relay is connected to the microcontroller and the bypass hardware comparator. A thermal management actuator is connected to the microcontroller; The battery management system is used to execute the battery thermal runaway early warning and intervention method described in the first aspect.

[0015] Thirdly, this application also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the battery thermal runaway early warning and intervention method described in the first aspect.

[0016] Compared to existing technologies, this application discloses a battery thermal runaway early warning and intervention method, a battery management system, and a storage medium, applicable to battery management systems in electric vehicles or energy storage systems. The method determines sensor placement through three-dimensional thermodynamic simulation and dynamically adjusts microcontroller power consumption and sampling frequency based on the coefficient of variation of gas concentration signals. Non-parametric kernel regression is used to remove artifacts and generate dynamic confidence intervals. Multi-channel gas data is hardware-level time-scaled to construct feature vectors, and step features are extracted through multi-resolution windows, combined with a double-layer ring buffer to remove environmental background. Based on the cell's chemical system, a gas production ratio matrix is ​​invoked to generate a dynamic error envelope upper limit for risk assessment and remaining escape time prediction. Bypass hardware truncation or predictive thermal management intervention is executed according to the risk level. The judgment deviation parameters are uploaded to the cloud to optimize the weight matrix. This application achieves early and accurate warning of thermal runaway and microsecond-level hardware truncation, effectively avoiding false alarms and missed alarms. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating a battery thermal runaway early warning and intervention method provided in one embodiment of this application.

[0019] Figure 2 for Figure 1 A flowchart illustrating an embodiment of step S2.

[0020] Figure 3 for Figure 1 A flowchart illustrating an embodiment of step S3.

[0021] Figure 4 for Figure 1 A flowchart illustrating an embodiment of step S4.

[0022] Figure 5 for Figure 1 A flowchart illustrating an embodiment of step S5.

[0023] Figure 6 for Figure 1 A flowchart illustrating an embodiment of step S6.

[0024] Figure 7 This is a schematic diagram of a battery management system provided in an embodiment of this application.

[0025] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0027] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0028] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0029] See Figure 1 , Figure 1This is a flowchart illustrating a battery thermal runaway early warning and intervention method according to an embodiment of this application. The battery thermal runaway early warning and intervention method provided in this application is applied to the battery management system of an electric vehicle or energy storage system. The battery management system includes a microcontroller and a microelectromechanical system (MEMS) multi-gas sensor module. The method includes the following steps: Step S1: Using a three-dimensional thermodynamic transport and fluid distribution simulation model, determine the structural stationary point coordinates of the multi-gas sensor module of the microelectromechanical system inside the battery pack, and install it according to the structural stationary point coordinates. The structural stationary point coordinates are the spatial coordinates in the simulation model that satisfy the sensor's self-heating temperature rise value being lower than a preset temperature rise threshold and the exhaust microfluidic jet arrival time value being lower than a preset time threshold.

[0030] This step aims to address the localized thermal crosstalk problem caused by the inherent heat generation of the micro-sensor array within a sealed battery pack. In the enclosed and physically complex space of a battery pack, the high-density sensor packaging easily generates localized heat accumulation and thermal crosstalk, leading to sensor signal drift and interfering with the accurate extraction of subsequent weak signals. Traditional solutions often rely on software filtering to compensate for this physical defect, but the effect is limited and consumes significant computational resources. This application addresses the issue from its physical origin, using prior fluid and thermal field simulations to determine the optimal sensor installation location, providing a clean physical foundation for subsequent signal processing.

[0031] First, the computer-aided design three-dimensional geometric model of the battery pack's internal structure, the design opening pressure of the cell's explosion-proof valve (e.g., 0.2 MPa) and the initial exhaust velocity threshold (e.g., 10 m / s), and the static heat dissipation power matrix of each sensitive element in the micro multi-gas sensor array (e.g., the heating power of the hydrogen sensor's sensitive element is 5 mW, the carbon monoxide sensor's is 3 mW, and the volatile organic compound sensor's is 4 mW) are used as input data and imported into the three-dimensional thermodynamic transport and fluid distribution simulation model. Boundary conditions are applied to the model to simulate the microflow field distribution path in the very early stage (e.g., 100 ms before the explosion-proof valve opens) from the occurrence of microcracks inside the cell. Combined with the static heat dissipation power matrix of the sensor array, the local thermodynamic gradient radius formed by the sensor's own heating inside the battery pack under different ambient temperatures (e.g., -20℃ to 60℃), i.e., the parasitic thermal crosstalk region, is calculated.

[0032] Subsequently, the fluid dynamics equations are solved to find spatial coordinates that simultaneously satisfy the conditions that the sensor's self-heating temperature rise is below a preset temperature rise threshold (e.g., 0.5℃) and the arrival time of the exhaust microfluidic jet is below a preset time threshold (e.g., 5ms). These coordinates are defined as the structural stagnation point coordinates, and the sensor's physical hardware is riveted and installed according to these coordinates. This method, through prior fluid and thermal field calculations, allows the sensor to avoid the turbulent region of hot airflow generated by its own heating, eliminating the sensor's background signal drift caused by local thermal gradients at the physical source, and providing a clean physical substrate for subsequent weak signal extraction.

[0033] Step S2: Collect the gas concentration signal output by the multi-gas sensor module, and dynamically adjust the power supply voltage and clock frequency of the microcontroller based on the comparison result of the statistical coefficient of variation of the gas concentration signal and the preset sparsity threshold.

[0034] This step aims to resolve the contradiction between real-time, all-weather power consumption monitoring and the need for rapid response to microsecond-level burst signals. Batteries operate in a normal state for most of their lifespan. If the microcontroller continuously performs high-frequency sampling, it will lead to significant static power consumption, impacting the vehicle's driving range. Conversely, low-frequency sampling can easily miss microsecond-level step signals during thermal runaway. Traditional solutions typically use a fixed sampling frequency, failing to balance the conflicting requirements of power consumption and response speed. This application introduces a dynamic adjustment mechanism based on data sparsity. By monitoring the fluctuation of gas concentration signals, it intelligently switches the microcontroller's operating state, achieving an optimized balance between "low-power standby under normal operating conditions and rapid response under abnormal operating conditions."

[0035] See Figure 2 In some embodiments, step S2 may be the following process: Step S21: When the coefficient of variation is lower than the preset sparsity threshold, control the microcontroller to operate at a first power supply voltage and a first clock frequency; Step S22: When the coefficient of variation exceeds the preset sparsity threshold, a hardware-level external interrupt is triggered. The interrupt handler controls the microcontroller to switch to the second power supply voltage and the second clock frequency, wherein the second clock frequency is higher than the first clock frequency.

[0036] The microcontroller has an internally set dynamic threshold for data sparsity determination, for example, setting the coefficient of variation threshold to 0.1. The front-end analog-to-digital converter acquires discrete numerical sequences of gas concentration in real time at a base frequency of 1kHz and calculates the statistical coefficient of variation of the sequence within a preset time window (e.g., 1 second). This coefficient of variation is equal to the ratio of the standard deviation to the mean, characterizing the sparsity and volatility of the current gas concentration data. When the coefficient of variation is lower than the preset sparsity threshold (0.1), the system determines that the current data stream is in a sparse state and controls the microcontroller to operate at a first supply voltage and a first clock frequency, for example, reducing the core supply voltage to 0.9V and the sampling clock frequency to a sleep scan frequency of 32Hz to maintain extremely low power consumption (measured power consumption is less than 50μW).

[0037] When a minute leak occurs inside the battery cell, causing a sudden increase in the coefficient of variation of the discrete numerical sequence collected by the analog-to-digital converter and exceeding the preset sparsity threshold (0.1), a hardware-level external interrupt is directly triggered. The interrupt handler immediately sends a boost and frequency increase command to the power management chip, controlling the microcontroller to switch to a second supply voltage and a second clock frequency. For example, the core supply voltage is increased to 1.2V, the sampling clock frequency is switched to full speed at 1MHz, and high-frequency joint sampling of each gas channel is initiated (sampling rate increased to 10kHz). The second clock frequency (1MHz) is much higher than the first clock frequency (32Hz), representing a frequency increase of 31,250 times. This mechanism does not rely on complex software scheduling but directly maps and controls the underlying crystal oscillator and power supply through the statistical characteristics of data fluctuations. The interrupt response time is less than 5μs, achieving a balance between extremely low power standby under normal operating conditions and extremely fast response when abnormal signals occur.

[0038] Step S3: Based on the nonparametric kernel regression model, remove artifacts from the gas concentration signal and output the multi-gas concentration discrete sequence after artifact removal.

[0039] This step aims to filter out high-frequency clutter with minimal computational overhead. During vehicle operation, severe road vibrations and electromagnetic interference generate a large amount of high-frequency clutter, or artifacts. These artifacts are superimposed on the real gas concentration signal, severely interfering with subsequent feature extraction and decision-making. Traditional digital filtering algorithms (such as Kalman filtering) involve complex matrix inversion operations, making them unsuitable for real-time operation on low-computing-power microcontrollers; while simple moving average filtering struggles to distinguish between real signals and noise. This application employs lightweight nonparametric kernel regression logic to output a smooth signal and error limits with minimal computational overhead, achieving efficient artifact removal.

[0040] See Figure 3 In some embodiments, step S3 may be the following process: Step S31: The discrete time series of the original gas concentration collected after the microcontroller switches to the second clock frequency is smoothed by a nonparametric kernel regression model. The nonparametric kernel regression model uses a kernel function with a finite support set. The upper and lower limits of statistical error are calculated based on the local data sampling density within the coverage bandwidth of the kernel function to generate a dynamic confidence interval. Step S32: Sampling points falling within the dynamic confidence interval are identified as artifacts and removed. Sampling points that continuously penetrate the upper boundary of the dynamic confidence interval are output as the multi-gas concentration discrete sequence of the removed artifacts.

[0041] Specifically, after triggering a hardware-level external interrupt in step S2, the microcontroller switches to the second power supply voltage and second clock frequency operating state, at which point high-frequency joint sampling of each gas channel is initiated. Taking the hydrogen channel as an example, the analog-to-digital converter continuously acquires the original discrete-time sequence of gas concentration at a sampling rate of 10kHz, denoted as {x(t1), x(t2), x(t3),..., x(t_n)}, where t_i is the sampling time, and the interval between adjacent sampling points is 100μs. This original sequence is mixed with a large amount of high-frequency noise, i.e., artifacts, generated by severe road vibrations, electromagnetic interference, etc. In the time domain, these artifacts appear as spike signals with large amplitude but extremely short duration, and their frequency domain characteristics are fundamentally different from the gas concentration change signals generated by the actual cell rupture.

[0042] A lightweight nonparametric kernel regression estimation algorithm that requires no prior mathematical model is converted into low-level C language operation logic and burned into the read-only memory of the microcontroller. This algorithm employs the principle of local weighted averaging, applying a preset smoothing kernel function to the discrete-time series of the input original gas concentration. This embodiment uses a parabolic kernel function with a finite support set, whose mathematical expression is K(u) = 0.75(1-u²) (when |u| ≤ 1, otherwise 0), where u = (t - t_i) / h, and h is a preset bandwidth parameter. In this embodiment, h is set to 50ms (this value can be adjusted according to the actual sensor response characteristics).

[0043] For the current sampling point t to be estimated, the algorithm searches all historical data points (t_i, x(t_i)) within the bandwidth h, and calculates the weight w_i = K((t-t_i) / h) of each historical data point relative to the current point. The closer the historical point is, the higher its weight, and the weight of historical points that are more than a distance away from the bandwidth h decays to zero. Then, the weighted average is calculated as the smoothed concentration estimate: ∑[w_i·x(t_i)] / ∑w_i. By traversing all sampling points, a baseline of gas concentration change after removing high-frequency spikes is fitted. This algorithm does not require prior assumptions about the distribution model of the data, but only relies on the local density distribution of the data itself. The computational cost is only addition and multiplication operations, and it only takes about 2 μs to run on an 8-bit microcontroller.

[0044] While calculating the smoothed baseline, the corresponding upper and lower limits of statistical error are calculated based on the local data sampling density within the kernel function's coverage bandwidth. Specifically, for each estimated point t, the weighted standard deviation σ(t) of the local data within the bandwidth is calculated, and with a confidence level of 95%, the upper limit of the dynamic confidence interval is σ(t) + 1.96σ(t), and the lower limit is σ(t) - 1.96σ(t). This confidence interval changes dynamically over time. When the original data fluctuates drastically, σ(t) increases, and the confidence interval adaptively widens; when the original data is stable, σ(t) decreases, and the confidence interval narrows. This dynamic confidence interval is the frequency confidence interval that changes dynamically over time, also known as the dynamic error band.

[0045] The comparison logic within the microcontroller compares and verifies each newly acquired concentration value with the dynamic confidence interval. The specific judgment rules are as follows: If a new sampling point falls within the confidence interval (i.e., lower limit ≤ sampled value ≤ upper limit), the system, based on its underlying mathematical logic, determines it to be a random artifact caused by mechanical vibration or electrical background noise, and discards it directly, excluding it from subsequent calculations. If a new sampling point continuously penetrates the upper limit boundary of the confidence interval (i.e., multiple consecutive sampling points are greater than the upper limit), it is confirmed as a genuine abnormal gas signal emitted by a cell rupture. The judgment condition for "continuous penetration" can be set to multiple consecutive sampling points exceeding the upper limit boundary to avoid false triggering by a single noise spike.

[0046] After the above discrimination, the sampling points that continuously pierce the upper boundary of the dynamic confidence interval are output as a discrete multi-gas concentration sequence with artifacts removed to step four. Taking a certain measured data as an example, the original signal contains noise spikes with an amplitude of up to 20 ppm. After processing in this step, the noise spikes are effectively removed, while the real gas concentration increase signal (from the baseline of 5 ppm to 15 ppm) is completely preserved.

[0047] Step S4: Perform hardware-level time-stamp alignment on the data of different gas channels in the multi-gas concentration discrete sequence after artifact removal to construct a feature vector reflecting the degree of coordinated change of multiple gases.

[0048] This step aims to address the time phase difference problem caused by asynchronous and independent processing of data from different sensor channels, and to extract weak step signals from strong background interference. In existing technologies, data from different sensor channels are processed asynchronously and independently within the microcontroller. When faced with the physical phenomenon of multiple gases simultaneously escaping from a microcrack in the battery cell, independent channel processing generates a severe time phase difference, leading to the failure of joint analysis. Furthermore, in actual automotive scenarios, battery packs are often filled with high concentrations of normal coolant odors, and the exhaust volume signal in the very early stages of thermal runaway is often completely drowned out by the background odor. This application solves the above problems by constructing a single-stream sequence matrix operation and a multi-resolution sliding window.

[0049] See Figure 4 In some embodiments, step S4 may be the following process: Step S41: The discrete sequences of multi-gas concentrations with artifacts removed from different gas channels are time-scaled strongly aligned under the same high-frequency hardware clock beat and spliced ​​along the time axis into a one-dimensional continuous data stream tensor. Step S42: Calculate the inner product between different gas parameters in the tensor through hardware multiply-accumulate operations, and output the multi-gas joint probability weight matrix.

[0050] Step S43: For the multi-gas joint probability weight matrix, open multiple sampling windows with different time resolutions in parallel, and perform matrix difference operation in each window to obtain the concentration gradient; Step S44: Verify the topological connectivity of the concentration gradient, apply weight penalties to the gradient trajectories that have broken, and perform background suppression processing on the gradient trajectories that have passed the connectivity verification, and output a multi-resolution pure step feature vector.

[0051] Step S45: Construct a first circular buffer for storing the multi-resolution pure step feature vectors, and a second circular buffer for storing the mean and variance of the multi-resolution pure step feature vectors, wherein the first circular buffer has a time window of a first preset duration, the second circular buffer has a time window of a second preset duration, and the second preset duration is longer than the first preset duration. Step S46: In each operation cycle, subtract the current environmental dynamic background vector stored in the second ring buffer from the feature vector currently stored in the first ring buffer, and output the multi-gas relative concentration change bias matrix after filtering out the current environmental background, as the feature vector reflecting the degree of multi-gas coordinated change.

[0052] First, the discrete multi-gas concentration sequences of hydrogen, carbon monoxide, and volatile organic compounds (VOCs), after artifact removal, are time-scaled strongly aligned at the same high-frequency hardware clock (e.g., 10MHz) with an alignment accuracy of 0.1μs. These sequences are then concatenated along the time axis into a single one-dimensional continuous data stream tensor, discarding the branch processing architecture of independent channels. Next, the inner product between different gas parameters in this tensor is calculated using hardware multiply-accumulate operations, outputting a multi-gas joint probability weight matrix. This inner product result mathematically directly characterizes the correlation of the rising trends of different gases. For example, when the hydrogen concentration increases slightly, it is calculated whether the carbon monoxide channel exhibits a slope increase in the same direction at that moment.

[0053] Based on this, multiple sampling windows with different time resolutions are opened in parallel for the multi-gas joint probability weight matrix. For example, a 10ms window is used to capture the high-frequency transient of the gas valve micro-movement, a 100ms window is used to capture the mid-frequency process of gas diffusion, and a 1s window is used to capture the low-frequency state of cavity concentration accumulation. Matrix difference operations are performed in parallel within each window to obtain the concentration gradient. The topological connectivity of the concentration gradient is verified: the gas generated by the actual cell rupture will necessarily have a continuously rising trajectory on the microsecond time axis, i.e., the topological connectivity is higher than 90%; while the concentration fluctuation caused by coolant sloshing or external airflow inflow will result in a broken and discontinuous gradient trajectory, with a connectivity usually lower than 30%. The algorithm calculates the connectivity of the current gradient trajectory and imposes a weight penalty (weight coefficient set to 0.1) on gradient trajectories with a connectivity lower than 60%. Simultaneously, the average absolute concentration within each window is calculated as the background odor concentration. A hardware comparator generates an inversely proportional gating factor; for example, the gating factor is 0.2 when the background absolute concentration is 500 ppm, and 0.8 when the background absolute concentration is 50 ppm. The higher the background absolute concentration, the more the factor tends to suppress low-frequency signals and amplify high-frequency abrupt signals verified by connectivity. The gating factor is multiplied by the gradient trajectory of the connectivity to complete background suppression, outputting a multi-resolution pure step feature vector. This mechanism effectively solves the engineering problem of high absolute concentrations of safe background gases (such as VOCs generated by coolant evaporation reaching 1000 ppm) masking low absolute concentrations of dangerous leaked gases with high-frequency abrupt characteristics (such as early leaks of only 10-50 ppm).

[0054] Furthermore, a first circular buffer (e.g., with a storage capacity of 500 sampling points, corresponding to a 500ms time window) is constructed for storing the multi-resolution pure step feature vectors, and a second circular buffer (e.g., with a storage capacity of 600 sampling points, corresponding to a 10-minute time window) is constructed for storing the mean and variance of the multi-resolution pure step feature vectors. The first circular buffer has a first preset time window of 500ms, and the second circular buffer has a second preset time window of 10 minutes, with the second preset time (10 minutes) being significantly longer than the first preset time (500ms). As time progresses, newly generated data is continuously streamed into the first circular buffer, while the second circular buffer is updated by sliding according to a set step size (e.g., once per minute). The stored mean always represents the dynamic background of the vehicle's current real-world environment. In each operation cycle (e.g., every 10ms), the current feature vector stored in the first annular buffer is subtracted from the current environmental dynamic background vector stored in the second annular buffer to extract the pure change after filtering out the current environmental background, and the multi-gas relative concentration change bias matrix is ​​output as the feature vector reflecting the degree of multi-gas coordinated change.

[0055] This mechanism completely abandons the rigid absolute alarm threshold judgment mode of traditional safety systems. Through continuous self-updating and comparison of streaming dual-layer cache, it makes relative logical inferences about "what abnormal changes have occurred in the current second compared to the past ten minutes" at any time. This enables the system to be immune to interference caused by changes in external environmental odors. For example, when a vehicle drives from the outside into an underground garage containing a large amount of fuel exhaust, the system can still accurately identify abnormal increases in the battery pack itself.

[0056] Step S5: Retrieve the corresponding gas production ratio matrix according to the chemical system identification code of the battery pack, update the baseline parameters during the resting period, generate the upper limit of the dynamic error band, and output the risk indication signal and the remaining safe escape time according to the relationship between the feature vector and the upper limit of the dynamic error band.

[0057] This step aims to address issues such as differences in gas generation mechanisms among different battery cell materials, sensor aging drift, and interference from extreme airflow impacts. Existing technologies generally employ a single, fixed gas concentration threshold, ignoring the fundamental differences in gas composition generated during the initial chemical bond breaking of ternary lithium batteries and lithium iron phosphate batteries in the early stages of microcrack formation. Furthermore, after several years of use, the aging of the sensitive coating of microelectromechanical multi-gas sensors leads to severe baseline zero-point drift. Requiring vehicles to periodically return to the factory for recalibration is both impractical and costly. This application introduces an unsupervised baseline update mechanism and confidence interval determination logic that does not require extensive sample collection, outputting an absolutely certain danger signal within a stringent dynamic error band and quantifying the remaining escape countdown.

[0058] See Figure 5 In some embodiments, step S5 may be the following process: Step S51: Retrieve the corresponding gas production ratio matrix based on the battery pack chemical system identification code; Step S52: During the stationary period when the vehicle has not undergone charging and discharging energy exchange for a preset duration, the gas concentration signal is captured as an observation value. The historical baseline mean and covariance matrix are fused with the observation value through the Bayesian posterior probability update equation to overwrite the background baseline mean vector and covariance matrix. Step S53: Generate the upper limit of the dynamic error envelope based on the eigenvector, the updated covariance matrix, and the preset extreme pressure shock disturbance matrix; Step S54: When the lower boundary of the feature vector passes through the upper limit of the dynamic error wrapping band, and the proportion of each gas concentration in the feature vector falls within the tolerance range allowed by the gas production ratio matrix, extract the cell temperature gradient and voltage drop gradient, construct a multidimensional physical state tensor with the feature vector, perform integral deduction through a preset degradation analysis mathematical model, calculate the time difference required for the current state to evolve to the irreversible critical point of thermal runaway, and output a certain danger Boolean signal and the remaining safe escape time. Step S55: When the feature vector does not meet the above penetration conditions but exceeds the preset early warning threshold, output the early sign indication signal and the remaining safe escape time.

[0059] First, the corresponding gas production ratio matrix is ​​retrieved based on the battery pack chemical system identification code (e.g., 001 for ternary lithium cells and 002 for lithium iron phosphate cells). Taking ternary lithium cells as an example, the theoretical molar ratio range of hydrogen, carbon monoxide, and volatile organic compounds released during microcrack rupture and early side reaction stages is H2:CO:VOCs=0.6-0.7:0.2-0.25:0.1-0.15. This ratio is pre-simulated and calculated based on first-principles molecular dynamics and microscopic electron density calculation methods and is stored in the non-volatile memory of the main control chip, ensuring that the warning logic strictly follows the precise comparison of the chemical genes of different batteries.

[0060] Secondly, during the vehicle's continuous, preset-duration rest period (e.g., 4 hours) without any charging or discharging energy exchange, such as when the vehicle is locked in sleep mode and the battery management system is periodically woken up, the system continuously collects the original discrete sequence of low-frequency ambient background gas concentrations. By monitoring the bus current and cell temperature, it determines whether the system is in an absolutely stable rest period. When the bus current remains zero and the cell temperature change rate is below 0.1℃ / h for 4 hours, the system retrieves the expected values ​​of the hydrogen and volatile organic compound background baselines from the previous operating cycle (e.g., the expected H2 baseline value is 5ppm) and the covariance matrix. For example, using a diagonal element of 1 ppm² as the prior distribution, the low-frequency background gas sequence collected during the current stationary period (e.g., 1000 sampling points) is used as the likelihood function input. The Bayesian posterior probability inference formula is executed through a hardware-level multiplier-accumulator to automatically calculate the new expected value (e.g., updated to 8 ppm) and variance vector (e.g., updated to 1.2 ppm²). This overwrites the background baseline mean vector and covariance matrix, completing the zero-point drift calibration caused by sensor aging. This enables the sensor to have "self-healing" and "environmental adaptation" capabilities over a lifespan of up to ten years.

[0061] Then, based on the eigenvector, the updated covariance matrix, and the preset extreme air pressure impact disturbance matrix (e.g., the impact coefficient at the moment of explosion-proof valve rupture is 5 times the standard deviation), a dynamic error envelope upper limit is generated. This upper limit adaptively expands and contracts with the severity of the background noise. For example, the upper limit is ±10ppm in a stable environment and adaptively widens to ±50ppm in a severe turbulence environment. When the lower boundary of the eigenvector crosses the upper limit of the dynamic error wrapper band, and the proportion of each gas concentration in the eigenvector falls within the tolerance range allowed by the gas production ratio matrix (e.g., ±0.05), the cell temperature gradient (e.g., temperature rise rate exceeding 2℃ / s) and voltage drop gradient (e.g., voltage drop rate exceeding 0.5V / s) are extracted and constructed with the eigenvector to form a multidimensional physical state tensor. This tensor is then integrally derived using a pre-set lightweight degradation analysis mathematical model. This model includes an exponential decay equation τ·dT / dt = -T + k·C_gas describing the chain reaction rate of battery thermal runaway, where τ is a time constant (e.g., 10s), k is a coupling coefficient (e.g., 0.5℃ / ppm), and C_gas is a gas concentration bias. The comprehensive state vector is used as the input variable in the equation. An integral operation is performed over time on the current degradation rate to calculate the time difference required for the current state to evolve to the irreversible thermal runaway critical point (e.g., temperature exceeding 85°C or voltage experiencing a step drop). A boolean signal indicating a confirmed danger and the remaining safe escape time, for example, 300 seconds, are output. If the characteristic vector does not meet the above-mentioned penetration condition but exceeds a preset early warning threshold (e.g., the bias reaches 80% of the dynamic error band upper limit), an early sign indication signal and the remaining safe escape time, for example, 600 seconds, are output. This decision-making mechanism directly calculates the dynamic boundary that can encompass all physical noise without performing any complex probability sampling loops. Confirmation is only made when the intensity of the abnormal signal completely overwhelms the worst environmental noise limit, thus completely eliminating the possibility of false alarms from a mathematical logic perspective.

[0062] Step S6: Perform physical intervention operations according to the risk indication signal.

[0063] This step aims to achieve dual protection through microsecond-level hardware cutoff and flexible thermal propagation suppression. Traditional battery management systems often miss the crucial moment to disconnect the high-voltage circuit due to excessively long computation cycles (i.e., computational redundancy / over-inference) causing delays in command issuance during critical moments. Furthermore, traditional systems can only function as "after-the-fact alarms," ​​merely notifying occupants to evacuate upon detecting a problem, lacking proactive intervention capabilities. This application solves these problems through hardware-level streaming computation cutoff and differentiable predictable physical blocking control.

[0064] See Figure 6 In some embodiments, step S6 may be the following process: Step S61: A bypass hardware comparator is set in parallel on the data flow path of the feature vector to monitor the bias matrix used to construct the feature vector in real time. The bypass hardware comparator bypasses the software polling of the microcontroller and is directly connected to the data flow of the bias matrix. Step S62: When the confirmed danger Boolean signal is true, and the bypass hardware comparator detects that the product of the rate of change of hydrogen concentration and the rate of change of carbon monoxide concentration in the bias matrix exceeds the preset rigid physical collapse threshold, the bypass hardware comparator triggers a non-maskable hardware interrupt, and the interrupt handler truncates the current operation of the microcontroller and directly outputs a cut-off command to the high-voltage relay. Step S63: When the early warning indication signal is true, the remaining safe escape time is used as a penalty weighting factor and input to the differentiable predictive control logic. The charging and discharging current limit command is output, and the charging and discharging current limit command is verified by the control barrier function to see if the predicted temperature trajectory of the battery cell intersects with the preset safe temperature upper limit boundary. If they intersect, the command to start forced cooling is output to the thermal management actuator.

[0065] First, a bypass hardware comparator is connected in parallel on the data flow path of the feature vector to monitor the bias matrix used to construct the feature vector in real time. The bypass hardware comparator bypasses the software polling of the microcontroller and is directly connected to the data flow of the bias matrix. The comparator operates independently of the microcontroller, without any software processing, and has a response time of less than 1μs.

[0066] When the confirmed danger Boolean signal is true, and the bypass hardware comparator detects that the product of the hydrogen concentration change rate and the carbon monoxide concentration change rate in the bias matrix exceeds a preset rigid physical collapse threshold (e.g., when the hydrogen change rate is >50ppm / ms and the carbon monoxide change rate is >20ppm / ms, the product value is >1000ppm² / ms², and the threshold can be calibrated according to the cell characteristics), the bypass hardware comparator triggers a non-maskable hardware interrupt. The interrupt handler truncates the current operation of the microcontroller and directly outputs a cut-off command to the high-voltage relay. This mechanism transforms the complex catastrophic decision-making from time-consuming software reasoning into a pure hardware Boolean algebra flip, compressing the system's extreme response time from the usual hundreds of milliseconds to less than 5μs. This ensures that the high-voltage circuit is cut off before the cell's explosion-proof valve opens due to internal ultra-high pressure (the explosion-proof valve opening response time is usually 10-50ms), preventing the arc from igniting the ejected gas.

[0067] When the early warning indication signal is true, the remaining safe escape time (e.g., 300 seconds) is input as a penalty weighting factor into the differentiable predictive control logic, outputting a charge / discharge current limit command. The control barrier function verifies whether the charge / discharge current limit command causes the predicted temperature trajectory of the battery cell to intersect with the preset safe temperature upper limit boundary (e.g., 85°C). The control barrier function mathematically establishes an insurmountable physical safety red line, setting the battery's highest safe critical temperature of 85°C and the maximum permissible gas evolution rate (e.g., 10 ppm / s) as the barrier boundary. If the predicted trajectory will cross the boundary, the maximum permissible current value satisfying the barrier constraint is automatically calculated in reverse (e.g., limiting the charge / discharge current from 200A to 80A), generating a dynamic derating command to forcibly reduce the charge / discharge current. Simultaneously, a command to initiate forced cooling is output to the thermal management actuator, starting the liquid cooling water pump and compressor at maximum duty cycle (e.g., 100%) for forced cooling, causing the battery cell temperature to drop by 5-10°C within 30 seconds. This mechanism seamlessly transforms the predicted remaining escape time into an input variable for active control. In the very early stage when the battery cell only shows micro-leakage, it actively suppresses heat accumulation by combining limiting the heating power with forced liquid cooling, thus blocking the chain propagation path of thermal runaway between battery cells from the energy source.

[0068] Step S7: Based on the triggering result of the physical intervention operation, calculate the gradient deviation vector of the weight matrix used to construct the feature vector, upload the gradient deviation vector to the cloud, and update the weight matrix based on the received gradient deviation vector.

[0069] Specifically, this step aims to achieve the collective evolution of fleet-level judgment parameters, overcoming the problem of algorithm iteration gaps caused by the uneven computing power of chips installed in vehicles produced in different years. When a judgment deviation occurs in the vehicle's underlying calculation (e.g., the deviation between the warning time and the actual thermal runaway time exceeds 10%), the mathematical gradient vector of the error generated in the local single-stream sequence cross-correlation weight mapping module is extracted. The vehicle end never stores or uploads any original discrete-time series waveforms of gas concentration to the cloud, avoiding data compliance risks and network bandwidth bottlenecks. According to the hardware computing power identification code of the microcontroller (e.g., 0x01 for an 8-bit microcontroller and 0x02 for a 32-bit multi-core DSP), the gradient deviation vector is truncated in layers before being uploaded to the cloud: for older chips with low computing power such as 8-bit microcontrollers, the deep matrix mapping is truncated, and only the gradient deviation of the outer basic linear change (e.g., the 8 main elements of the weight matrix) is packaged and uploaded; for newer chips with high computing power such as 32-bit multi-core DSPs, the complete gradient deviation of the deep self-attention correlation matrix (e.g., all 64 elements of the weight matrix) is packaged and uploaded. The cloud-based system assigns adaptive aggregation weights based on the signal-to-noise ratio (SNR) of multiple vehicles' geographical environments (e.g., 10dB in urban environments and 20dB in suburban environments). It then weights and aggregates the received gradient deviation vectors, reverse-engineers and recalculates the globally optimal weight matrix configuration table. Based on the weighted aggregation results, this data is sent quarterly via a remote wireless communication channel (e.g., 4G / 5G network) to the battery management system memory of each vehicle, silently overwriting the old judgment weight parameters. This mechanism, while absolutely protecting the driver's privacy and without increasing the additional training computing power burden on the vehicle-mounted system, achieves a "herd immunity" evolution of the judgment parameters. This allows the entire system's ability to withstand complex environmental interference and identify very early, weak signals to continuously improve through the massive daily operational feedback from the fleet, enabling it to learn and evolve in a closed loop, becoming increasingly accurate with each use.

[0070] See Figure 7 This application also provides a battery management system 100 as the hardware execution carrier for the aforementioned battery thermal runaway early warning and intervention method. Through a specific hardware architecture and connectivity, this system provides a reliable physical implementation foundation for the physical layer purification, feature extraction, quantization decision-making, physical intervention, and parameter evolution stages in the method claims. The system 100 includes the following components: The MEMS multi-gas sensor module 10 integrates three MEMS sensing units: hydrogen, carbon monoxide, and volatile organic compounds. The placement of these units is pre-calculated and determined using a three-dimensional thermodynamic transport and fluid distribution simulation model. The three-dimensional geometric model of the battery pack's internal structure, the opening pressure and exhaust velocity of the cell's explosion-proof valve, and the static heat dissipation power matrix of the sensor itself are imported into the simulation system. The fluid dynamics equations are solved, and spatial coordinates that simultaneously satisfy "the sensor's self-heating temperature rise is lower than a preset temperature rise threshold" and "the exhaust microfluidic jet arrival time is lower than a preset time threshold" are selected as the structural stationary point coordinates for installation. This avoids thermal turbulence interference caused by the sensor's own heating from the source.

[0071] The hardware comparator 20 has its input connected to the output of the microelectromechanical system multi-gas sensor module 10. This hardware comparator has a preset sparse threshold internally configured to monitor the statistical coefficient of variation of the gas concentration signal in real time. When the coefficient of variation is below the preset threshold, it outputs a low level; when the coefficient of variation suddenly increases above the preset threshold, the output level flips, triggering a hardware-level external interrupt.

[0072] The microcontroller 30 has its interrupt input connected to the output of the hardware comparator 20, and its control output connected to the high-voltage relay 50 and the thermal management actuator 60, respectively. The microcontroller 30 internally contains programs such as a nonparametric kernel regression algorithm, a multi-resolution feature extraction algorithm, and a dynamic error band decision algorithm. Upon receiving an external interrupt triggered by the hardware comparator, the microcontroller immediately sends a boost and frequency upsampling command to the power management chip from the interrupt handler, switching the core power supply voltage and sampling clock frequency from a Hertz-level sleep scanning frequency to a kilohertz-level full-speed operating frequency. This initiates high-frequency joint sampling of each gas channel, followed by sequential execution of artifact removal, feature construction, step feature extraction, environmental background stripping, and hazard decision-making operations. Based on the decision results, it outputs a flexible intervention command in the early symptom stage and a power-off command in the confirmed danger stage.

[0073] A bypass hardware comparator 40 has its input connected in parallel to the output data stream path of the microelectromechanical system (MEMS) multi-gas sensor module 10, forming a parallel structure with the signal input of the microcontroller. Its output is directly connected to the high-voltage relay. This bypass hardware comparator has a rigid physical collapse critical characteristic surface internally, specifically the threshold value of the product of the hydrogen concentration change rate and the carbon monoxide concentration change rate. This comparator operates independently of the microcontroller, without any software polling or data processing by the microcontroller. It directly monitors the data stream in real time. When the product value of the hydrogen concentration change rate and the carbon monoxide concentration change rate in the bias matrix exceeds the preset rigid physical collapse critical threshold, the comparator output level immediately flips, directly triggering the microcontroller's highest-priority non-maskable hardware interrupt. Simultaneously, it bypasses the microcontroller and directly outputs a cut-off command to the high-voltage relay.

[0074] The high-voltage relay 50 has its control terminal connected to both the interrupt output terminal of the microcontroller 30 and the direct output terminal of the bypass hardware comparator 40, forming a dual control mechanism: in normal mode, it is controlled by the microcontroller to respond to software decisions; in emergency mode, it directly receives the direct signal from the bypass hardware comparator to bypass the microcontroller and perform a power-off operation, ensuring that the high-voltage circuit is cut off before the cell explosion-proof valve pops open due to internal ultra-high voltage.

[0075] A thermal management actuator 60 is connected to the control output of the microcontroller 30. This thermal management actuator includes active cooling devices such as a liquid-cooled water pump, compressor, and fan, and is used to respond to flexible intervention commands output by the microcontroller in the early warning stage. When the microcontroller outputs an early warning indication signal and the remaining safe escape time, it uses this time as a penalty weighting factor input to the differentiable predictive control logic. Based on the current cell temperature and requested current, it extrapolates the future heat accumulation trajectory along the time axis. If the predicted trajectory will cross the safety boundary of the control barrier function, it automatically generates a dynamic derating command to forcibly reduce the charging and discharging current, and simultaneously outputs a step-over command to the thermal management actuator to initiate forced cooling with the maximum duty cycle.

[0076] The six components work together in the following manner: Under normal conditions, the microcontroller is in a low-power sleep state, and the bypass hardware comparator continuously monitors the data stream; when the gas concentration fluctuates slightly, the hardware comparator triggers an interrupt to wake up the microcontroller and switch to high-frequency sampling mode. After the microcontroller performs complex algorithm calculations, it outputs an early sign or a confirmed danger signal. If it is an early sign, the microcontroller outputs a forced cooling command to the thermal management actuator and a dynamic derating command to the high-voltage relay to achieve flexible suppression. If it is a confirmed danger and the bypass hardware comparator detects that the product value exceeds the critical threshold, the bypass hardware comparator directly triggers a non-maskable interrupt and directly disconnects the high-voltage relay. The complex calculations in the microcontroller are unconditionally suspended, achieving microsecond-level hardware truncation. The system also uploads the judgment deviation gradient vector to the cloud. The cloud aggregates the data of the entire fleet, optimizes the weight matrix, and then distributes it to each vehicle through remote online upgrades, achieving a group evolution that becomes more accurate with use.

[0077] The battery management system is used to execute the battery thermal runaway early warning and intervention method according to any one of claims 1 to 8. Through the close cooperation of the above hardware architecture and method steps, this battery management system provides a complete and reliable physical implementation platform for very early warning and active intervention of battery thermal runaway.

[0078] Finally, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described battery thermal runaway early warning and intervention method.

[0079] Specifically, the computer-readable storage medium can be any medium capable of storing program code, including but not limited to: read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), flash memory, solid-state drive (SSD), hard disk drive (HDD), optical disc (CD-ROM, DVD), magneto-optical disc, magnetic tape, disk storage device or other magnetic storage device, or any other physical medium capable of storing the required program code and accessible by a computer or embedded system.

[0080] The computer program is pre-installed in the storage medium in firmware or software form. It is either burned into the microcontroller's embedded memory (such as on-chip flash memory) at the factory or downloaded and written to the storage medium via a wireless communication network during remote online upgrades of the vehicle. When the storage medium is mounted on the microcontroller of the battery management system, the microcontroller's processor reads and executes the computer program from the storage medium to implement the aforementioned method.

[0081] It should be noted that the computer-readable storage medium, as an independent protected object, is not limited to a specific physical form or a specific installation method. Whether it is an embedded storage chip pre-installed in the battery management system at the factory, a temporary storage medium used for remote online upgrades, or a master chip used for production line programming, as long as the computer program stored therein can implement the above-mentioned methods when executed, it falls within the protection scope of this application.

[0082] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0083] The above are merely optional embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made based on the inventive concept of this application and the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the patent protection scope of this application.

Claims

1. A battery thermal runaway early warning and intervention method, applied to the battery management system of an electric vehicle or energy storage system, wherein the battery management system includes a microcontroller and a microelectromechanical system multi-gas sensor module, characterized in that, include: Using a three-dimensional thermodynamic transport and fluid distribution simulation model, the structural stationary point coordinates of the multi-gas sensor module of the microelectromechanical system inside the battery pack are determined, and the module is installed according to the structural stationary point coordinates. The structural stationary point coordinates are the spatial coordinates in the simulation model that satisfy the sensor's self-heating temperature rise value being lower than a preset temperature rise threshold and the arrival time value of the exhaust microfluidic jet being lower than a preset time threshold. The gas concentration signal output by the multi-gas sensor module is acquired, and the power supply voltage and clock frequency of the microcontroller are dynamically adjusted based on the comparison result of the statistical coefficient of variation of the gas concentration signal and the preset sparsity threshold. Based on a nonparametric kernel regression model, artifacts in the gas concentration signal are removed, and a discrete sequence of multi-gas concentrations with artifacts removed is output. The data of different gas channels in the multi-gas concentration discrete sequence after artifact removal are time-aligned at the hardware level to construct a feature vector that reflects the degree of coordinated change of multiple gases. The corresponding gas production ratio matrix is ​​retrieved based on the chemical system identification code of the battery pack. The baseline parameters are updated during the resting period to generate the upper limit of the dynamic error band. The risk indication signal and the remaining safe escape time are output based on the relationship between the feature vector and the upper limit of the dynamic error band. Perform physical intervention operations based on the risk indication signals; Based on the triggering result of the physical intervention operation, the gradient deviation vector used to construct the weight matrix of the feature vector is calculated, and the gradient deviation vector is uploaded to the cloud. The cloud updates the weight matrix based on the received gradient deviation vector.

2. The method according to claim 1, characterized in that, The step of dynamically adjusting the power supply voltage and clock frequency of the microcontroller based on the comparison result of the statistical coefficient of variation of the gas concentration signal and the preset sparsity threshold includes: When the coefficient of variation is lower than the preset sparsity threshold, the microcontroller is controlled to operate at a first power supply voltage and a first clock frequency. When the coefficient of variation exceeds the preset sparsity threshold, a hardware-level external interrupt is triggered. The interrupt handler controls the microcontroller to switch to a second power supply voltage and a second clock frequency, wherein the second clock frequency is higher than the first clock frequency.

3. The method according to claim 1, characterized in that, The method of removing artifacts from the gas concentration signal based on a nonparametric kernel regression model and outputting a discrete sequence of multi-gas concentrations after artifact removal includes: The discrete time series of raw gas concentrations acquired after the microcontroller switched to the second clock frequency was smoothed by a nonparametric kernel regression model. The nonparametric kernel regression model uses a kernel function with a finite support set. The upper and lower limits of statistical error are calculated based on the local data sampling density within the kernel function coverage bandwidth to generate a dynamic confidence interval. Sampling points falling within the dynamic confidence interval are identified as artifacts and removed. Sampling points that continuously penetrate the upper boundary of the dynamic confidence interval are output as the multi-gas concentration discrete sequence of the removed artifacts.

4. The method according to claim 1, characterized in that, The step of hardware-level time-stamping the data from different gas channels in the artifact-free multi-gas concentration discrete sequence to construct a feature vector reflecting the degree of coordinated change among multiple gases includes: The discrete sequences of multi-gas concentrations with artifacts removed from different gas channels are time-scaled strongly aligned under the same high-frequency hardware clock beat and spliced ​​along the time axis into a one-dimensional continuous data stream tensor. The inner product between different gas parameters in the tensor is calculated by hardware multiply-accumulate operations, and the multi-gas joint probability weight matrix is ​​output.

5. The method according to claim 4, characterized in that, Also includes: For the multi-gas joint probability weight matrix, multiple sampling windows with different time resolutions are opened in parallel, and matrix difference operations are performed in each window to obtain the concentration gradient. Verify the topological connectivity of the concentration gradient, apply weight penalties to gradient trajectories that have broken, and perform background suppression processing on gradient trajectories that pass the connectivity verification, outputting a multi-resolution pure step feature vector.

6. The method according to claim 5, characterized in that, Also includes: A first circular buffer is constructed for storing the multi-resolution pure step feature vector, and a second circular buffer is constructed for storing the mean and variance of the multi-resolution pure step feature vector. The first circular buffer has a time window of a first preset duration, and the second circular buffer has a time window of a second preset duration, wherein the second preset duration is longer than the first preset duration. In each operation cycle, the current feature vector stored in the first annular buffer is subtracted from the current environmental dynamic background vector stored in the second annular buffer to output the multi-gas relative concentration change bias matrix after filtering out the current environmental background, which serves as the feature vector reflecting the degree of multi-gas coordinated change.

7. The method according to claim 1, characterized in that, The process of retrieving the corresponding gas production ratio matrix based on the chemical system identification code of the battery pack, updating the baseline parameters during the resting period, generating a dynamic error containment band upper limit, and outputting a risk indication signal and remaining safe escape time based on the relationship between the feature vector and the dynamic error containment band upper limit includes: Retrieve the corresponding gas production ratio matrix based on the battery pack chemical system identification code; During the period when the vehicle is stationary without charging or discharging energy exchange for a preset duration, the gas concentration signal is captured as an observation value. The historical baseline mean and covariance matrix are fused with the observation value through a Bayesian posterior probability update equation to overwrite the background baseline mean vector and covariance matrix. The upper limit of the dynamic error envelope is generated based on the eigenvector, the updated covariance matrix, and the preset extreme pressure shock disturbance matrix; When the lower boundary of the feature vector crosses the upper limit of the dynamic error wrapping band, and the proportion of each gas concentration in the feature vector falls within the tolerance range allowed by the gas production ratio matrix, the cell temperature gradient and voltage drop gradient are extracted and constructed into a multidimensional physical state tensor with the feature vector. Through the pre-set degradation analysis mathematical model, integral deduction is performed to calculate the time difference required for the current state to evolve to the irreversible critical point of thermal runaway, and a certain danger Boolean signal and the remaining safe escape time are output. When the feature vector does not meet the above penetration conditions but exceeds the preset early warning threshold, an early sign indication signal and the remaining safe escape time are output.

8. The method according to claim 7, characterized in that, The step of performing physical intervention based on the risk indication signal includes: A bypass hardware comparator is connected in parallel on the data flow path of the feature vector to monitor in real time the bias matrix used to construct the feature vector. The bypass hardware comparator bypasses the software polling of the microcontroller and is directly connected to the data flow of the bias matrix. When the confirmed danger Boolean signal is true, and the bypass hardware comparator detects that the product of the rate of change of hydrogen concentration and the rate of change of carbon monoxide concentration in the bias matrix exceeds the preset rigid physical collapse threshold, the bypass hardware comparator triggers a non-maskable hardware interrupt, and the interrupt handler truncates the current operation of the microcontroller and directly outputs a cut-off command to the high-voltage relay. When the early warning indication signal is true, the remaining safe escape time is used as a penalty weighting factor and input to the differentiable predictive control logic. The charging and discharging current limit command is output, and the charging and discharging current limit command is verified by the control barrier function to see if the predicted temperature trajectory of the battery cell intersects with the preset safe temperature upper limit boundary. If they intersect, the command to start forced cooling is output to the thermal management actuator.

9. A battery management system, characterized in that, include: Microelectromechanical systems (MEMS) multi-gas sensor module; A hardware comparator is connected to the microelectromechanical system multi-gas sensor module. The microcontroller is connected to the hardware comparator; A bypass hardware comparator is connected in parallel to the data output path of the multi-gas sensor module of the microelectromechanical system, forming a parallel structure with the input terminal of the microcontroller; A high-voltage relay is connected to the microcontroller and the bypass hardware comparator. A thermal management actuator is connected to the microcontroller; The battery management system is used to execute the battery thermal runaway early warning and intervention method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the battery thermal runaway early warning and intervention method as described in any one of claims 1 to 8.