Sliding-Window Hierarchical Fault Diagnosis for Lithium-Ion Battery Energy Storage Systems

Grid-scale energy battery storage is assembled from hundreds to thousands of lithium-ion cells. The central safety problem is not only whether a fault exists, but whether it can be found before it propagates from one cell to a module, from a module to a cluster, and from a cluster to the whole station. In lithium iron phosphate (LiFePO4) storage systems, early degradation often appears first as a small voltage or temperature deviation that remains inside the normal operating band of the cluster. A fixed threshold sees no alarm until that deviation is large enough to be unambiguous, which is often after the weak cell has already affected its neighbours.

Rack-mounted lithium-ion battery modules for grid-scale energy storage

The Detection Gap Between Cluster Alarms and Cell Failure

Large storage systems usually rely on a battery management system (BMS) that measures voltage and temperature at several levels. A common protection logic compares the voltage or temperature range within a cluster with a fixed limit. If the range exceeds that limit, the cluster is flagged. This approach is simple and transparent, but it has two structural weaknesses.

First, the threshold is static. A limit that is tight enough to catch a slow cell drift may also treat normal transient imbalance as a fault, especially when the system is cycling under variable photovoltaic input or changing load. A limit that is loose enough to avoid false alarms may delay detection until the cluster has already entered a degraded state. Second, the decision is aggregated at cluster level. A weak cell can be masked by stronger cells in the same cluster, and a cluster-level alarm does not identify which cell or module should be inspected.

The sensing architecture adds another constraint. In the system discussed here, one temperature sensor serves three cells, so cell-level thermal localization is not directly available. Internal resistance, an informative indicator of micro-short and degradation, is also not measured by the standard BMS. The diagnostic method therefore has to extract earlier and more specific evidence from the signals that already exist: cell voltage and module or cluster temperature.

System Configuration and Operational Evidence

The case system is an independent microgrid in Xinjiang, China. Its storage unit uses five parallel battery clusters. Each cluster contains nine series-connected modules, and each module contains 24 cells, giving 216 cells per cluster and 1,080 cells in total. The microgrid has no utility backup: photovoltaic panels charge the battery during the day, and the battery supplies the load at night. Winter snow and adverse weather produced intermittent operation, so the duty cycle was not a clean laboratory profile.

The validation dataset covered January to May 2024. The installed BMS used fixed cluster-level limits on voltage and temperature range. Two fault events in cluster 1 were later confirmed. After the fault, the average voltage of cluster 1 became nearly constant because the cluster had been disconnected; before confirmation, temperature inconsistency between clusters increased. The fixed-threshold BMS raised alarms only after the fault signature had become pronounced. The raw anomaly record also contained many isolated points in clusters 1 to 4, particularly cluster 2, which shows why a persistence test is necessary before a cluster is declared faulty.

A Three-Level Sliding-Window Architecture

The diagnostic architecture has three stages. At cluster level, an adaptive threshold detector and a trend detector run in parallel on the same voltage and temperature streams. The adaptive detector asks whether a feature has moved outside its recent statistical band; the trend detector asks whether the feature is drifting in a dangerous direction before the band is crossed. A cluster is confirmed only when its anomaly is persistent and distinguishable from the behaviour of other clusters. At cell level, a dual Z-score test compares each cell with its own history and with its peers in the cluster, producing a ranked set of suspect cells.

The method does not require a new sensor layer. It reorganizes existing BMS data into a hierarchy that moves from system-level warning to cluster confirmation and then to cell-level localization. That property matters in operating stations where retrofitting internal-resistance sensors or cell-level thermal sensors is costly and impractical.

Adaptive Thresholds with Persistence Screening

For a cluster \(C\), let \(\Delta X(t)\) be the range of a feature at time \(t\):

$$ \Delta X(t)=\max_{i\in C}X_i(t)-\min_{i\in C}X_i(t) $$

where \(X_i(t)\) is the voltage or temperature of cell or measurement point \(i\). The range is a compact measure of consistency: a growing range means that the weakest or hottest point is separating from the rest of the cluster.

Two windows are used to separate transient fluctuation from the cluster’s normal operating variability. A short window estimates the immediate fluctuation strength, and a long window estimates the baseline fluctuation level:

$$ \sigma_s(t)=\sqrt{\frac{1}{W_s-1}\sum_{i=t-W_s+1}^{t}\left(\Delta X(i)-\mu_s(t)\right)^2} $$

$$ \sigma_l(t)=\sqrt{\frac{1}{W_l-1}\sum_{j=t-W_l+1}^{t}\left(\Delta X(j)-\mu_l(t)\right)^2} $$

Here \(W_s\) and \(W_l\) are the short and long window lengths, and \(\mu_s(t)\) and \(\mu_l(t)\) are the corresponding window means. The short window covers second-scale electrochemical and load dynamics, roughly 1 to 60 s; the long window covers a representative operating period, roughly 5 to 60 min, so that it establishes a stable baseline. The exact sample counts depend on the BMS sampling interval.

The threshold multiplier is adjusted by the ratio of short-term to long-term fluctuation:

$$ k(t)=\operatorname{clip}\left(\alpha+\beta_k\frac{\sigma_s(t)}{\sigma_l(t)},k_{\min},k_{\max}\right) $$

The baseline value \(\alpha=1.5\) and the gain \(\beta_k=0.5\) were used in this system. When the short-term fluctuation exceeds the long-term baseline, \(k(t)\) increases and the threshold widens; this suppresses false alarms during transients. When the system is steady, the threshold narrows and sensitivity to small persistent deviations increases. The \(\operatorname{clip}\) function keeps the multiplier within configured bounds.

The time-varying limits are then computed from the recent mean and standard deviation of the range:

$$ \begin{aligned}
\mu_{\Delta X}(t)&=\frac{1}{W}\sum_{k=t-W+1}^{t}\Delta X(k),\\
\sigma_{\Delta X}(t)&=\sqrt{\frac{1}{W-1}\sum_{k=t-W+1}^{t}\left(\Delta X(k)-\mu_{\Delta X}(t)\right)^2},\\
\Delta X_{\mathrm{up}}(t)&=\mu_{\Delta X}(t)+k(t)\sigma_{\Delta X}(t),\\
\Delta X_{\mathrm{low}}(t)&=\mu_{\Delta X}(t)-k(t)\sigma_{\Delta X}(t).
\end{aligned} $$

The upper limit is the operative constraint for a nonnegative range. Three primary conditions can trigger further inspection: the range exceeds its adaptive limit; the minimum voltage in the window falls below the system mean voltage by three standard deviations; or the maximum temperature in the window exceeds the system mean temperature by three standard deviations.

A single point is not treated as a fault. A second-stage soft window checks whether anomalies are consecutive or dense. Only the centre of a dense anomaly window is labelled persistent. This step removes isolated spikes caused by sensor noise, switching transients, or brief load changes.

Trend Detection as a Leading Indicator

The trend detector operates before the adaptive range threshold is crossed. It computes first differences of the voltage and temperature features:

$$ V_{\mathrm{diff}}(t)=V(t)-V(t-1) $$

$$ T_{\mathrm{diff}}(t)=T(t)-T(t-1) $$

Raw differences are noisy, so a moving average over \(M\) samples is applied:

$$ \bar{V}_{\mathrm{diff}}(t)=\frac{1}{M}\sum_{i=t-M+1}^{t}V_{\mathrm{diff}}(i) $$

$$ \bar{T}_{\mathrm{diff}}(t)=\frac{1}{M}\sum_{i=t-M+1}^{t}T_{\mathrm{diff}}(i) $$

The smoothing horizon is chosen between about 0.1 and 10 s and then mapped to a sample count according to the BMS sampling rate. A short horizon responds quickly but admits noise; a long horizon is smoother but delays detection. The smoothed slope is compared with physical thresholds taken from the cell specification: a voltage decline rate beyond \(\theta_V\), or a temperature rise rate beyond \(\theta_T\), triggers a trend anomaly. The two results are combined with a logical OR.

The trend branch is sensitive to relative change rather than absolute offset. That makes it useful for slow degradation, where the cluster may remain inside its normal voltage band while one cell is steadily diverging. The adaptive threshold branch, in contrast, is better at catching abrupt range expansion. Running the two in parallel gives the detector both forward-looking and event-driven behaviour.

Cell-Level Localization with Dual Z-Scores

Once a cluster is confirmed, the diagnostic problem changes from detection to localization. Cell-level analysis is based on voltage because the temperature sensors are shared by three cells and cannot resolve a single cell. For each cell \(i\), a normal operating period is used to estimate a historical mean \(\mu_i\) and standard deviation \(\sigma_i\). Two standardized deviations are then computed.

The vertical, or historical, score measures how far the cell has moved from its own normal behaviour:

$$ Z_{\mathrm{self}}(t)=\frac{\left|V_i(t)-\mu_i\right|}{\sigma_i} $$

The horizontal, or peer, score measures how far the cell has moved from the cluster mean:

$$ Z_{\mathrm{cluster}}(t)=\frac{\left|V_i(t)-\bar{V}(t)\right|}{\sigma_{\mathrm{cluster}}} $$

where \(\bar{V}(t)\) is the mean voltage of all cells in the cluster at time \(t\), and \(\sigma_{\mathrm{cluster}}\) is the corresponding cluster-level standard deviation. The two scores are combined into a single abnormality score:

$$ Z_{\mathrm{combined}}=\sqrt{Z_{\mathrm{self}}^2+Z_{\mathrm{cluster}}^2} $$

The historical term detects a cell that has changed relative to its own past, even if the whole cluster has shifted. The peer term detects a cell that is out of line with the rest of the cluster, even if its own history is short or poorly conditioned. A cell is flagged when the combined score exceeds the configured confidence threshold. In this implementation the operating point was a \(3\sigma\) combined-score threshold, and the abnormal set was reported at a 99.78% confidence criterion.

Validation Results

Cluster-level detection was run over the five-month record. Clusters 1 to 4 produced numerous raw anomaly points, and cluster 2 was especially noisy. None of clusters 2 to 5 passed confirmation because their anomalies were frequent but nonpersistent, or because they did not satisfy the inter-cluster uniqueness condition. Cluster 1 alone showed a continuous abnormal sequence while the other clusters remained normal, so it was confirmed as the fault cluster.

Two fault events in cluster 1 were compared with the fixed-threshold BMS. The sliding-window method issued warnings 23.3 h and 410.2 h before the BMS alarm in clock time. Because the microgrid was intermittent, raw clock time overstates the operating exposure. After excluding system downtime, the effective lead times were 13.5 h and 26.2 h. Centring the confirmation window introduces about a 0.5 h delay, so the method still provides hours-level warning rather than a post-event alarm.

Comparison of fixed-threshold protection and the sliding-window hierarchical method
Dimension Conventional fixed-threshold BMS Sliding-window hierarchical diagnosis
Decision variable Cluster voltage or temperature range against a static limit Adaptive range threshold, smoothed trend, and inter-cluster comparison
Warning stage After the fault signature is pronounced Before the hard threshold; 23.3 h and 410.2 h by clock time, 13.5 h and 26.2 h excluding downtime
Localization Cluster level Cell level; anomalous set 145–168, with cell 155 identified as the root-cause cell
False-alarm control Static limit; sensitive to threshold choice and transient noise Persistence plus inter-cluster uniqueness; isolated points rejected
Data requirement Voltage and temperature from the BMS Same BMS signals; no internal-resistance sensor required

For the confirmed cluster, the dual Z-score analysis flagged cells 145 to 168. All cells in this range exceeded the combined-score threshold, and many were near or above \(3.5\sigma\). The remaining cells stayed within about \(2\sigma\). The flagged range corresponds exactly to module 7, which contains cells 145 to 168. This spatial concentration is consistent with the physical structure of the station and with the shared electrical and thermal environment inside a module. The detector therefore narrowed the inspection from a cluster of 216 cells to a single module of 24 cells.

Root-Cause Path and Engineering Interpretation

Post-event analysis traced the failure to cell 155. Commissioning data from 2023 showed that module 7 had good thermal consistency, with a maximum temperature difference below 2 °C. However, the voltage curve of cell 155 showed a slight divergence at the end of the commissioning cycling. That divergence was a latent manufacturing defect rather than an operating fault. Under long-term cycle stress, the weak cell evolved into a progressive micro-short with rising internal resistance. The BMS did not measure internal resistance, so the early stage was invisible to its standard protection logic.

After operation, the voltage spread within module 7 exceeded 50 mV, breaking the cluster’s internal voltage consistency and causing imbalanced charge and discharge. The failure path was therefore: inherent cell defect, cell-level degradation, then module-level consistency collapse. The dual Z-score result was consistent with that path: the whole module appeared abnormal because cells share electrical connections and thermal conditions, while the root cause remained concentrated at cell 155.

The engineering value of the method lies in what it does with existing signals. It does not replace internal-resistance diagnostics or thermal-runaway sensors. Instead, it extracts earlier evidence from voltage and temperature by combining adaptive statistics, trend analysis, and hierarchical confirmation. That combination addresses the two practical failures of fixed-threshold protection: alarms that arrive too late, and alarms that identify a cluster without identifying the cell.

Limits and Deployment Considerations

  • The validation covers one LiFePO4 microgrid system, five clusters, and five months of field data. It demonstrates engineering feasibility in that setting, not universal performance across all chemistries, climates, and duty cycles.
  • Cell-level temperature is unavailable because one sensor serves three cells. Cell localization is therefore voltage-based; temperature is used mainly at cluster and module level.
  • Threshold parameters depend on sampling rate, cell chemistry, module design, cooling strategy, and operating profile. The short and long windows, smoothing horizon, and confidence level need re-tuning for another system.
  • Persistence and inter-cluster uniqueness reduce false alarms, but they cannot eliminate missed faults that produce no measurable voltage or temperature precursor before hard failure.
  • The method is a software layer on BMS data. Its reliability depends on data quality, time synchronization, sensor calibration, and a representative normal baseline.

Conclusion

Fixed-threshold protection answers a narrow question: whether a cluster has crossed a static limit. A sliding-window hierarchical method answers a more useful set of questions: whether a deviation is persistent, whether it is unique to one cluster, and which cells or modules are producing it. In the field case, the method advanced warning to the hourly scale, rejected isolated anomalies in other clusters, and localized the fault to module 7 and cell 155 without adding sensors. The result is a practical route from system-level alarm to cell-level evidence for energy battery storage systems that already collect voltage and temperature but do not measure internal resistance directly.

Scroll to Top