A Deep Learning Framework for Energy Storage Battery Safety: Unsupervised Early Warning for Thermal Runaway

The global transition towards sustainable energy systems is fundamentally intertwined with the advancement of efficient and safe storage solutions. Energy storage batteries have emerged as the cornerstone technology for integrating intermittent renewable sources, stabilizing power grids, and electrifying transportation. However, as the deployment of large-scale and distributed energy storage accelerates, ensuring their absolute safety has become a paramount concern. Catastrophic failures, primarily driven by thermal runaway events, pose significant risks to life, property, and the broader acceptance of this critical technology. Thermal runaway is a complex, self-accelerating exothermic reaction within an energy storage battery, often triggered by internal short circuits, mechanical damage, or operational abuse, and can culminate in fire or explosion.

Traditional approaches to mitigating this risk face considerable limitations. Experimental methods, which define safety boundaries through rigorous testing, are costly, time-consuming, and difficult to generalize across diverse real-world operating conditions. Model-based methods, rooted in electrochemical-thermal coupling principles, offer valuable insights but often struggle with the complexity and variability of actual field data, leading to reduced accuracy in practical, multifaceted scenarios. The advent of data-driven methods, leveraging the vast operational data from Battery Management Systems (BMS), presents a promising alternative. Yet, prevailing supervised learning techniques hit a fundamental barrier: the “small sample” problem. While operational data from normal energy storage battery packs is abundant, labeled data from packs that have undergone thermal runaway is exceedingly rare. Training robust models on such imbalanced datasets is inherently challenging and often leads to poor generalization and high false-negative rates, which are unacceptable for safety-critical applications.

This article addresses this critical gap by proposing a novel, data-driven early warning framework for thermal runaway in energy storage batteries. The core innovation lies in shifting the paradigm from supervised to unsupervised learning. Instead of trying to learn from scarce failure examples, our method learns the definitive characteristics of normal operation from the plethora of available healthy energy storage battery data. We then detect anomalies by measuring how much a given battery’s behavior deviates from this learned normal profile. This deviation is quantified through a reconstruction error, a powerful concept where a neural network is trained to reconstruct its own input under normal conditions. A healthy energy storage battery, similar to the training data, will have a low reconstruction error. An energy storage battery on the path to thermal runaway, exhibiting subtle, incipient abnormalities, will prove difficult for the model to accurately reconstruct, resulting in a significantly higher error. To bolster the stability and reliability of this detection system, we incorporate ensemble learning, aggregating the judgments of multiple models to produce a calibrated thermal runaway probability, thereby mitigating the variance of any single model. Furthermore, to effectively capture the complex, time-varying signatures preceding failure—encompassing voltage, current, temperature, State of Charge (SOC), and cell statistics—we employ a sophisticated neural architecture based on Bidirectional Long Short-Term Memory (Bi-LSTM) networks enhanced with an attention mechanism. This allows the model to not only remember long-term dependencies in the sequential data but also to dynamically weigh the importance of different features at different times, leading to highly sensitive and accurate feature extraction. The proposed method is validated using real-world operational data from electric vehicle traction batteries, demonstrating its practical efficacy in providing early warnings for thermal runaway in energy storage batteries.

Theoretical Foundation: An Unsupervised and Ensemble-Based Warning Framework

The proposed framework is built on two pillars: the use of reconstruction error within an unsupervised learning context as a primary anomaly metric, and the application of ensemble learning to create a stable, probabilistic warning system.

1. The Unsupervised Learning Foundation and Reconstruction Error

Unsupervised learning aims to discover inherent patterns or structures within data without pre-existing labels. For energy storage battery monitoring, this is ideal because we possess vast amounts of unlabeled data from normally functioning systems. Our core hypothesis is that a model trained solely on normal operational data will establish a robust baseline of “expected behavior.” When presented with data from a potentially faulty energy storage battery, the model’s ability to accurately represent this data will degrade.

We formalize this using a reconstruction model. Let the multivariate time-series data from a healthy energy storage battery be represented as a normalized input vector $\mathbf{X}_{in}$:
$$
\mathbf{X}_{in} = [\mathbf{U}, \mathbf{SOC}, \mathbf{I}, \mathbf{T}, \mathbf{M}]
$$
where $\mathbf{U}$ is the pack voltage sequence, $\mathbf{SOC}$ is the state of charge, $\mathbf{I}$ is the current, $\mathbf{T}$ is the temperature, and $\mathbf{M}$ represents statistical features derived from individual cell voltages (e.g., mean, variance, max, min) across the pack. Each variable is a sequence over time $t=1$ to $N$, normalized using z-score standardization:
$$
x^* = \frac{x – \mu_x}{\sigma_x}
$$
where $\mu_x$ and $\sigma_x$ are the mean and standard deviation of the respective feature across the training dataset.

A neural network model $f_{\theta}$ (whose specific architecture is detailed later) is trained on a dataset comprising only normal energy storage battery profiles. Its objective is to reconstruct its input:
$$
\hat{\mathbf{X}}_{out} = f_{\theta}(\mathbf{X}_{in})
$$
The training process minimizes the reconstruction error $J$ between the input and the output over all $m$ dimensions and $N$ time steps:
$$
\min_{\theta} J(\mathbf{X}_{in}, \hat{\mathbf{X}}_{out}) = \min_{\theta} \frac{1}{m} \sum_{i=1}^{m} \sum_{t=1}^{N} (x_{in,i,t} – \hat{x}_{out,i,t})^2
$$
where $x_{in,i,t}$ and $\hat{x}_{out,i,t}$ are the actual and reconstructed values for the $i$-th feature at time $t$, respectively.

Once trained, this model serves as a “normalcy filter.” For a new, unseen energy storage battery profile $\mathbf{X}’_{in}$, we compute its reconstruction error $J’$:
$$
J’ = J(\mathbf{X}’_{in}, \hat{\mathbf{X}}’_{out})
$$
A simple binary warning rule can be established using a threshold $K$:
$$
y =
\begin{cases}
1 & \text{if } J’ \geq K \\
0 & \text{if } J’ < K
\end{cases}
$$
where $y=1$ indicates a “thermal runaway warning.” The threshold $K$ is typically set statistically from the reconstruction error distribution of the normal training set, for instance, at a value exceeding the mean by two standard deviations. This basic model effectively transforms the problem of fault detection into one of measuring deviation from a learned norm.

2. Enhancing Stability with Ensemble Learning

The performance of a single reconstruction model can be sensitive to the specific subset of normal data used for training. To create a more robust and stable warning system, we employ an ensemble approach. Instead of one model, we train $n$ distinct base models, $\{f_{\theta_1}, f_{\theta_2}, …, f_{\theta_n}\}$, each on a different, randomly sampled subset of the pool of normal energy storage battery data. Each base model $k$ provides its own binary decision $y_k$ (0 or 1) for a test sample based on its own reconstruction error and threshold.

The final output is not a binary decision but a thermal runaway probability $P$, calculated as the proportion of base models that flag the sample as anomalous:
$$
P = \frac{1}{n} \sum_{k=1}^{n} y_k
$$
This ensemble methodology offers two key advantages. First, it quantifies uncertainty. A probability of 0.9 suggests strong consensus among models that the energy storage battery is behaving abnormally, whereas a probability of 0.5 indicates high ambiguity. Second, it dramatically improves stability. The variance of the ensemble’s output is lower than that of a single model. Formally, if the average correlation between models is $\rho$ and each model’s variance is $\sigma^2$, the ensemble variance is approximately:
$$
Var(P) \approx \frac{\rho \sigma^2}{n} + \frac{(1-\rho)\sigma^2}{n}
$$
which decreases as $n$, the number of base models, increases. This makes the warning system more reliable across different operational datasets. A practical warning can then be triggered when $P$ exceeds a predefined confidence level, e.g., $P > 0.7$.

Advanced Feature Extraction: Bi-LSTM with Attention Mechanism

The efficacy of the entire framework hinges on the capability of the base model $f_{\theta}$ to learn meaningful, time-dependent representations of normal energy storage battery behavior. Thermal runaway precursors evolve over long durations (hours to days), requiring the model to capture long-range temporal dependencies. Furthermore, the importance of different signals (voltage sag, temperature rise, current fluctuation) varies over time. To address these needs, we propose a base model architecture combining Bidirectional Long Short-Term Memory (Bi-LSTM) networks and an attention mechanism.

1. Capturing Temporal Dynamics with Bi-LSTM

A standard LSTM network is adept at learning from sequence data by maintaining a cell state that acts as a long-term memory, mitigating the vanishing gradient problem. However, for understanding the state of an energy storage battery, context from both past and future time steps is valuable. A Bi-LSTM processes the sequence in both forward and backward directions. For each time step $t$, it computes a forward hidden state $\overrightarrow{h_t}$ and a backward hidden state $\overleftarrow{h_t}$:
$$
\overrightarrow{h_t} = \text{LSTM}(x_t, \overrightarrow{h_{t-1}})
$$
$$
\overleftarrow{h_t} = \text{LSTM}(x_t, \overleftarrow{h_{t+1}})
$$
where $x_t$ is the input feature vector at time $t$. These two states are then concatenated to form a comprehensive contextual representation $h’_t$ for time step $t$:
$$
h’_t = [\overrightarrow{h_t}; \overleftarrow{h_t}]
$$
This Bi-LSTM layer allows the model to understand how the energy storage battery’s current state is influenced by its entire operational history and immediate future context within the window, making it highly sensitive to developing anomalies.

2. Focusing on Critical Signals with Attention

Not all features contribute equally to the reconstruction task at every moment. During a charge cycle, voltage and SOC may be most informative; during a high-current discharge, temperature and current might dominate. An attention mechanism dynamically assigns weights to the Bi-LSTM’s hidden states $h’_t$, allowing the model to “focus” on the most relevant parts of the sequence when performing reconstruction. For a sequence of hidden states $\mathbf{H}’ = [h’_1, h’_2, …, h’_N]$, the attention mechanism computes a set of weight vectors $\alpha_t$. The context vector $c$ is a weighted sum:
$$
c = \sum_{t=1}^{N} \alpha_t h’_t
$$
The weights $\alpha_t$ are computed by comparing the current decoder state (in an encoder-decoder setup) or via a self-attention mechanism, often using a softmax function over similarity scores:
$$
\alpha_t = \frac{\exp(\text{score}(s, h’_t))}{\sum_{j=1}^{N} \exp(\text{score}(s, h’_j))}
$$
where $s$ is a query vector. In our architecture, this allows the model to learn to emphasize periods of subtle voltage divergence or initial temperature creep that might be early indicators of an internal short circuit in the energy storage battery. The final output sequence $\hat{\mathbf{X}}_{out}$ is generated from these attended contexts through fully connected layers.

The integration of Bi-LSTM and attention creates a powerful feature extractor specifically tailored for the sequential, multi-modal data from energy storage batteries, enabling the precise calculation of reconstruction errors that are sensitive to incipient faults.

Algorithm Implementation and Validation

The overall algorithm for the data-driven thermal runaway warning method for energy storage batteries follows a clear pipeline, as summarized in the table below.

Step Process Key Operations
1. Data Preprocessing Prepare the raw BMS data for model ingestion. Normalize features (U, I, SOC, T, M) using z-score. Construct multidimensional time-series samples. Split data into $n$ normal training sets and a test set containing both normal and faulty energy storage batteries.
2. Model Training Build and train the ensemble of base models. For $k=1$ to $n$: Build a Bi-LSTM + Attention base model $f_{\theta_k}$. Train $f_{\theta_k}$ on the $k$-th normal training set to minimize reconstruction error. Calculate its warning threshold $K_k$ from its training error distribution. Assemble all models into the ensemble.
3. Sample Evaluation & Warning Assess a new energy storage battery pack. Input the normalized sample data into the ensemble. Each base model computes $J’_k$ and outputs $y_k$ (0 or 1). Calculate the thermal runaway probability $P = \frac{1}{n}\sum y_k$. Issue a warning if $P > P_{threshold}$ (e.g., 0.7).

To validate the proposed method, we utilized real-world operational data from 48 electric vehicle battery packs, each with approximately six months of data sampled at 0.1 Hz. Within this dataset, two packs had experienced thermal runaway events. We compared several model configurations:

  • M0: A traditional unsupervised method (K-means clustering) for baseline comparison.
  • M1: A single base model (Bi-LSTM) as described in Section 1.
  • M2: The ensemble model with Bi-LSTM base models.
  • M3: The ensemble model with simpler Fully-Connected Neural Network (FCNN) base models.
  • M4: The full proposed method: ensemble model with Bi-LSTM + Attention base models.

The performance was evaluated using standard metrics: Accuracy (ACC), Precision (PRE), Recall (REC), and the F1-Score. The results clearly demonstrate the advantages of our proposed framework.

Model Description ACC (%) PRE (%) REC (%) F1-Score Missed Detection?
M0 (K-means) Distance-based clustering 78.6 0 0 0 Yes
M1 (Single Bi-LSTM) Unsupervised base model 92.9 50 100 0.67 No
M2 (Ensemble Bi-LSTM) Proposed without attention 92.9 50 100 0.67 No
M3 (Ensemble FCNN) Ensemble with simple base models 85.7 25 50 0.33 Yes
M4 (Ensemble Bi-LSTM+Attention) Full proposed method 92.9 50 100 0.67 No

The key findings are as follows:
1. Unsupervised vs. Traditional Clustering: M1 significantly outperforms M0 (K-means), which failed completely to detect the faulty energy storage batteries (Recall=0%). This validates the superiority of the reconstruction error approach over simple distance metrics for this complex anomaly detection task.
2. Ensemble for Stability: While M1 achieved high accuracy in one run, its performance varied across different training/validation splits. The ensemble methods (M2, M4) consistently maintained the high performance of the best single-model run, confirming the stabilizing effect of ensemble learning for energy storage battery warning systems.
3. Advanced Architecture for Precision: Although M2 and M4 show identical aggregate metrics, a deeper look at the warning probability rankings reveals the advantage of the attention mechanism. For the two known faulty energy storage batteries, M4 assigned them the highest warning probabilities (Rank 1 and 2), whereas M2 ranked them slightly lower (Rank 3 and 4). This sharper distinction is critical for prioritizing alerts in a fleet monitoring system.

Furthermore, the model provides interpretable insights through feature-wise reconstruction error analysis. For the two thermal runaway energy storage batteries, the distribution of the total reconstruction error $J’_X$ across features was calculated as:
$$
J’_X = J’_U + J’_{SOC} + J’_I + J’_T + J’_M
$$
$$
\alpha_U = J’_U / J’_X, \quad \alpha_{SOC} = J’_{SOC} / J’_X, \quad \text{etc.}
$$
The results indicated that voltage ($\alpha_U \approx 35-43\%$) and temperature ($\alpha_T \approx 28-30\%$) contributed the most to the total error, aligning with the known electrochemical signatures of internal short circuits leading to thermal runaway. This breakdown can help engineers pinpoint the primary deviating parameters during an alert.

Conclusion and Perspective

Ensuring the safety of energy storage batteries is a non-negotiable prerequisite for their widespread adoption in our energy and transportation ecosystems. This article has presented a comprehensive, data-driven framework for the early warning of thermal runaway, effectively addressing the critical challenge of “small sample” failure data. By leveraging unsupervised learning based on reconstruction error, we bypass the need for labeled failure examples, instead learning a detailed model of normal operation from abundant healthy energy storage battery data. The integration of ensemble learning transforms this into a stable, probabilistic warning system, providing a clear measure of risk rather than a brittle binary alert.

The technical core of the method—a Bi-LSTM network with an attention mechanism—is specifically designed to master the long-term, time-varying characteristics of energy storage battery operational data. This enables the detection of subtle, incipient anomalies long before they escalate into catastrophic failure. Validation on real-world electric vehicle battery data confirmed the method’s effectiveness, showing high detection accuracy and superior stability compared to simpler approaches.

The implications of this work extend beyond electric vehicles to stationary energy storage systems for grid support, renewable integration, and backup power. The unsupervised, data-driven nature of the method makes it adaptable to various battery chemistries, pack configurations, and duty cycles, as it learns directly from the specific system it monitors. Future work will focus on enhancing the granularity of warnings, moving from a simple “fault/no-fault” probability to estimating the time-to-failure or the severity of the developing fault. Integration with cloud-based fleet management platforms could enable continuous learning and model updating from a growing corpus of normal operational data, further refining the baseline and improving warning precision for the entire lifecycle of energy storage batteries. Ultimately, such advanced diagnostic frameworks are essential for building trust, ensuring safety, and unlocking the full potential of energy storage batteries in a sustainable energy future.

Scroll to Top