Data-Driven Fault Detection and Diagnosis for High-Voltage Battery Systems

1. Introduction

The global push toward carbon neutrality has accelerated the electrification of transportation. In China, the development of new energy vehicles has been elevated to a strategic priority within the Fourteenth Five-Year Plan. As the core energy storage component of these vehicles, the high-voltage battery system directly dictates driving safety, user experience, and overall vehicle reliability. However, thermal runaway incidents and other battery-related failures continue to pose significant threats to public safety and consumer confidence.

According to recent statistics, the fire incidence rate for new energy vehicles between 2021 and 2023 was approximately 2 to 3 times higher than that of conventional internal combustion engine vehicles. A vast majority of these incidents are attributed to high-voltage battery malfunctions. Faults within these battery systems can arise from a complex interplay of factors, including manufacturing defects leading to internal short circuits, material aging, mechanical abuse from collisions, electrical abuse such as overcharging, and thermal abuse from extreme operating conditions or inadequate thermal management.

The limitations of existing diagnostic methods are well-documented. Model-based approaches, while offering mechanistic clarity, often suffer from parameter uncertainty and poor generalizability. Signal-processing-based methods depend heavily on expert knowledge for feature extraction and struggle with low signal-to-noise ratios. Data-driven methodologies, particularly those employing deep learning, have shown promise but face critical challenges: they are highly dependent on large, high-quality, and well-labeled datasets, which are scarce for rare but dangerous fault events. Furthermore, the extreme class imbalance between normal and faulty data, coupled with the “black-box” nature of many models, hampers their practical adoption.

To address these challenges, this thesis proposes a progressive diagnostic framework that integrates data preprocessing, advanced oversampling strategies, and an ensemble learning architecture. The research focuses on three primary objectives:

  • To reconstruct and clarify fault labels from noisy, real-world operational data using Fault Tree Analysis (FTA).
  • To develop a robust diagnostic model using an improved SMOTE strategy combined with a Stacking ensemble.
  • To introduce a WGAN-GP based data augmentation strategy and evaluate its impact on model performance.

This chapter will outline the background and significance of this study, alongside a comprehensive review of existing research. The remainder of this paper is organized to describe the experimental data and methodology in Section 2, the implementation of the baseline SMOTE strategy in Section 3, and the evaluation of our methods in Section 4, with concluding remarks in Section 5.

2. Dataset and Fault Classification

2.1 Data Source and Preprocessing

The data for this study originates from real-world operational logs of ten battery electric vehicles, covering a period of six months of continuous driving. The dataset records information at a frequency of 0.1 Hz. Specific details are provided in the table below.

Data Field Description Remarks
vid Vehicle ID Unique identifier for each vehicle.
yr_modahrmn Data collection timestamp Format: YYYY-MM-DD HH:MM:SS
vehicle_state Vehicle status Indicates running, off, or other status.
charging_status Charging status Indicates charging, discharging, or completing.
speed Vehicle speed Valid range 0-220 km/h.
standard_soc State of Charge Valid range 0-100%.
mileage Total cumulative distance Minimum measurement unit of 0.1 km.
isulate_r Insulation resistance Can indicate insulation faults.
max_alarm_lvl Highest alarm level Range 0 to 3, based on original system.
alarm_info General alarm flags 32-bit binary string indicating specific component alarms.

The initial raw dataset contained over 5.5 million entries. A critical challenge was the extreme data imbalance, where for every one fault-related data point, there were roughly 550 normal data points. To address initial data quality problems, I employed two preprocessing steps. First, the time-series data was segmented into logical operational fragments based on physical vehicle characteristics, such as speed, and a stability criterion whereby status changes of less than three minutes were discarded due to a lack of statistical significance. Second, I handled anomalous data by removing duplicate samples, managing null or infinite values (either by deleting the field if the missing proportion was high or by forward-filling if the loss was minor), and re-sorting the data to ensure continuous time-series integrity.

2.2 Fault Tree Analysis for Severity Grading

Upon inspection, I observed that the original fault codes in the dataset were inconsistent and contained many false or missed alarms. Furthermore, numerous alarm flags were unrelated to the high-voltage battery performance. To create a robust, clear, and nationally standardized target variable for our diagnostic models, I implemented a Fault Tree Analysis. The process started from an undesired top event (e.g., system failure) and deductively analyzed intermediate and basic events to establish a clear logical hierarchy. A sample of how the fault codes were restructured is shown below.

Decimal Code Binary Code Original Count Original Level
16 10000 1386 1
66 1000010 10 3
2048 100000000000 158 3
4096 1000000000000 3298 1
8192 10000000000000 1237 2
65536 10000000000000000 1835 2

After identifying irrelevant alarm data, I established a new set of fault level definitions based on national standards and data-driven thresholds. This re-categorization is essential because not all high-voltage battery faults are equal; while some are minor, others are immediately critical. I categorized these into four distinct levels from 0 to 3, corresponding to ‘no fault’, ‘minor fault’, ‘moderate fault’, and ‘severe fault’. This refined labeling enables the model to not only detect that something is wrong but also to assess the urgency of the required intervention.

Fault severity was graded using the following standard operating logic:

Alarm Flag Alarm Information Alarm Standard Fault Severity
0 Temperature difference >5°C 1
1 High battery temperature >53°C 3
2 Energy storage overvoltage Above rated max voltage 3
6 SOC too high Above set threshold 2
8 Cell inconsistency >80mV difference 2
9 Insulation fault <100 Ω/V 3
11 DC-DC status fault DC-DC off but not off 2

As a result of this meticulous reconstruction, I compiled a balanced dataset containing approximately 1.34 million normal data points and around 156,000 fault data points, resulting in a fault proportion of approximately 10.47%.

2.3 Feature Engineering

To accurately predict the state of a high-voltage battery, I derived feature variables from multiple perspectives. Rather than relying solely on raw voltage and current, I focused on capturing the inter-cell consistency and dynamic operational characteristics.

(1) Consistency Features: These features are paramount for identifying internal defects. For both temperature and voltage, I calculated the Coefficient of Variation (CV) and the Maximum Deviation Rate (DV). These can be mathematically formulated by the equations.

$$ C_v = \frac{1}{K_t} \sqrt{\frac{\sum_{m=1}^{n} (K_t^m – \overline{K}_t)^2}{n}} \times 100\% $$

$$ D_v = \frac{\max(K_t) – \min(K_t)}{K_t} \times 100\% $$

where \( K_t^m \) represents the temperature or voltage of the \( m \)-th cell at time \( t \), and \( K_t \) is the mean value. These features provide a clear indication of how evenly the cells within a high-voltage battery pack are operating.

(2) Driving Features: These include vehicle speed, operating mode, and their variance, linking driver behaviour to the load experienced by the high-voltage battery system.

(3) Temporal Features: Time variables like “time of day” and “day type” can indirectly capture patterns such as daily temperature fluctuations and typical driving conditions.

After deriving a comprehensive set of features, I filtered them using statistical methods to avoid redundancy and reduce noise. I calculated the Pearson Correlation Coefficient (\( r_{XY} \)) and mutual information for each feature against the target fault level, leading to the ranking of characteristics.

$$ r_{XY} = \frac{\sum_{i=1}^{n} (X_i – \bar{X})(Y_i – \bar{Y})}{\sqrt{\sum_{i=1}^{n} (X_i – \bar{X})^2 \sum_{i=1}^{n} (Y_i – \bar{Y})^2}} $$

$$ MI(X;Y) = \sum_{x \in X} \sum_{y \in Y} p(x,y) \log \frac{p(x,y)}{p(x)p(y)} $$

The visualization via a heatmap allowed for the final pruning of highly correlated variables. Through these rigorous procedures, I identified 13 core features for model development. The table below provides a comprehensive list of this final feature set.

Feature Dimension Feature Name Description
Battery State total_volt Total pack voltage
max_temp_diff Max temperature difference
max_temp Maximum cell temperature
mileage Total mileage
total_current Total pack current
isulate_r Insulation resistance
Battery Consistency cell_temp_CV Temperature coefficient of variation
cell_volt_DV Voltage reference deviation
cell_volt_CV Voltage coefficient of variation
cell_volt_CV_std Voltage CV standard deviation
Driving Pattern speed Vehicle speed
Temporal Context day_section_1 Morning period (06:00-11:59)
day_section_0 Early morning (00:00-05:59)

3. Methodology

This section details the comprehensive data enhancement and model construction process. The primary aim is to establish a high-performance diagnostic pipeline that can accurately classify high-voltage battery faults into their respective severity levels. The overall process is shown to tie together the data sampling techniques with the ensemble learning architecture. In this diagnostic framework, I first employ a data augmentation strategy to rectify the class imbalance, then feed this newly balanced dataset into a hybrid Stacking ensemble model to generate precise predictions.

3.1 Baseline Oversampling with Border-SMOTE Strategy

To address the challenge of imbalanced data, I leveraged an improved version of the standard SMOTE algorithm, known as Borderline-SMOTE. While standard SMOTE generates synthetic data by interpolating between a minority class sample and its randomly chosen neighbors, it does so indiscriminately, which can lead to the generation of noisy samples and obscure the true decision boundary. The improved Border-smote algorithm, in contrast, focuses the generation process on minority samples located near the class boundary, as these are the most critical for defining the model’s decision boundary. The core logic is fundamental to understanding the strengths of the approach. For every minority sample \( x_i \), the algorithm calculates its \( k \) nearest neighbors within the entire training set. The proportion of these neighbors that belong to the majority class, denoted as \( k’ \), determines the nature of \( x_i \).

Sample Categorization Condition Action
Noise \( k’ = k \) If all neighbors are majority class, it is considered noise and is ignored.
Danger \( \frac{k}{2} \le k’ < k \) If the sample is surrounded by a majority of opposing class neighbors, it is classified as ‘danger’ and is selected for synthesis.
Safe \( 0 \le k’ < \frac{k}{2} \) If the sample is within the minority class cluster, it is considered ‘safe’ and is ignored by the algorithm.

After identifying the set of ‘danger’ points, the generation process can proceed. For each ‘danger’ point \( x_i \), I select neighbors from the minority class and potentially the majority class to create new samples. The synthetic sample \( x_{new} \) is generated using the following interpolation formula, which is central to the SMOTE family of algorithms.

$$ x_{new} = x_i + \alpha \times (x_{zi} – x_i) $$

Here, \( \alpha \) is a random number in the interval [0, 1], and \( x_{zi} \) is one of the selected nearest neighbors. This strategy ensures that new samples are generated in regions that effectively sharpen the boundary between the normal and fault states of a high-voltage battery. To evaluate the validity of this enhanced data, I compared the density distributions of the newly generated data against the original data for several of the 13 key features like total voltage, speed, and insulation resistance. The probability density functions of the augmented data should show a high degree of consistency with the original minority class distribution, confirming the effectiveness and realism of the generated samples.

3.2 Ensemble Model: Stacking Architecture

Rather than relying on a single model that might overfit to specific patterns or exhibit poor generalization, I used a Stacking ensemble method. This machine learning technique stacks multiple classifiers strategically to increase predictive power. This process often extracts complementary insights from the data. The architecture can be simplified as a two-tier system.

For the first layer of base learners, I selected three advanced yet distinct algorithms. The diversity among them is a critical ingredient for the Stacking ensemble to succeed. The rationale for choosing each is as follows:

  • LightGBM and XGBoost: Both are powerful gradient-boosting frameworks, but they are good at capturing complex non-linear relationships from data. XGBoost has a strong regularization framework, whereas LightGBM is popular for its efficient leaf-wise tree growth.
  • Random Forest: This bagging algorithm creates numerous decision trees on different data subsets, then averages their results. It serves as a strong counter-balance to the boosting methods by reducing variance.

After generating predictions from the base models, a second-level meta-learner model, logistic regression, is employed. Rather than using a complex non-linear meta-model, logistic regression leverages the refined probabilities from the diverse models to maximize prediction precision to classify high-voltage battery faults. The framework follows a specific set of operational steps:

  • K-Fold Splitting: The training data with features is first divided into K (in this thesis ‘5’) folds.
  • Cross-Training: For each base model, it is trained using \( K-1 \) folds and performs predictions on the remaining one fold. This is repeated until each part has been used for prediction, thereby creating a new training matrix from the predictions for the next layer.
  • Meta-Learning: The resulting matrix along with the original true labels is then used to train the logistic regression meta-model.
  • Final Output: The meta-model outputs the final diagnosis result for each fault severity.

3.3 Introduction to the WGAN-GP Strategy

Although Border-SMOTE performs well, its synthetic samples are generated by linear interpolation and may result in a high repetition of information and a high risk of overfitting. To tackle these limitations, I have incorporated a second, more advanced data augmentation strategy utilizing a generative model. The Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) was trained on the same high-voltage battery fault data.

The WGAN-GP model fundamentally differs from the standard GAN. The network is composed of a Generator (G) which produces synthetic data, and a Critic (C), which scores the authenticity of the input data.

While the classic GAN often suffers from unstable training due to the use of Jensen-Shannon (JS) divergence, which leads to vanishing gradients, the WGAN-GP method introduces a major theoretical upgrade. The optimization target of this method is the Wasserstein distance, also known as the Earth Mover’s distance, which provides a smoother and more meaningful measure of the difference between the distribution of generated data and the real, clustered fault data that can be calculated even when the distributions are disjoint. To ensure the critic adheres to the required mathematical constraint of a 1-Lipschitz function, WGAN-GP does not use weight clipping (which was used in earlier WGAN models and caused instability) but instead uses a subtle gradient penalty. This penalty is applied by adding an extra term to the critical loss function. The loss functions used for adversarial training of the model are defined as follows:

$$ L_{Critic} = \underset{z \sim P_z}{\mathbb{E}}[D(G(z))] – \underset{x \sim P_r}{\mathbb{E}}[D(x)] + \lambda \underset{\hat{x} \sim P_{\hat{x}}}{\mathbb{E}}[(|| \nabla_{\hat{x}}D(\hat{x})||_2 – 1)^2] $$

$$ L_{Generator} = – \underset{z \sim P_z}{\mathbb{E}}[D(G(z))] $$

In these equations, \( P_r \) is the true data distribution, \( P_z \) is the prior distribution for the generator’s random noise input, and \( \lambda_{gp} \) is the gradient penalty coefficient. The intermediate distribution \( P_{\hat{x}} \) refers to sampling uniformly along a straight line between pairs of points from the real and generated distributions. This stable training regime is particularly important for keeping data generation on track while preserving the fidelity of samples. When training completes, the generator is capable of producing highly realistic synthetic data that closely mimics the statistical patterns of the dataset, thereby providing a richer and more diverse set for training robust diagnosis models on high-voltage battery faults.

3.4 Evaluation Metrics

Given the multi-class nature of the fault detection problem (Normal, Fault Level 1, 2, and 3), selecting appropriate evaluation metrics is central to assessing the model correctly. I rely on metrics derived from the confusion matrix (True Positives, True Negatives, False Positives, and False Negatives). To assess the diagnostic capability comprehensively, I use the following key metrics:

Accuracy measures the overall correctness of predictions. It is calculated as:

$$ Accuracy = \frac{TP + TN}{TP + TN + FP + FN} $$

Precision for a specific fault class ‘i’ is the ratio of correctly predicted positive observations to the total predicted positives for that class. It reveals the reliability of the prediction when it flags a fault.

$$ Precision_i = \frac{TP_i}{TP_i + FP_i} $$

Recall (or Sensitivity) is the ratio of correctly predicted positive observations to all observations in the actual class. It quantifies the ability to find all the actual positive fault samples.

$$ Recall_i = \frac{TP_i}{TP_i + FN_i} $$

F1-Score is the harmonic mean of Precision and Recall, providing a balanced measure when there is an uneven class distribution.

$$ F1_i = \frac{2 \times Precision_i \times Recall_i}{Precision_i + Recall_i} $$

To compute the average Precision and F1-Score comprehensively across the multiple fault categories, I used macro-averaging, which calculates the average of these metrics across all classes, thereby giving equal weight to the occurrence of each fault level.

3.5 Hyperparameter Optimization

To ensure that each model is trained to its optimal potential, I used a robust hyperparameter tuning strategy. I integrated a 5-fold cross-validation with a Bayesian optimization search algorithm, viewing this as a random experiment guided by past knowledge to search for the most appropriate set of parameters. This approach is more efficient than traditional grid search and helps prevent overfitting by providing a stable estimation of the model’s generalization performance.

4. Experiments and Results

4.1 Experimental Setup

This section details the experiments performed to validate the effectiveness of the proposed diagnostic strategy on high-voltage battery systems. The experiments were split into two phases.

The first phase involved evaluating the performance of the diagnostic models after applying the Border-SMOTE data augmentation technique and comparing the proposed Stacking architecture against its three base learners: LightGBM, XGBoost, and Random Forest (RF).

The second phase of experiments involved repeating the same model comparisons but subjecting the data to the more sophisticated WGAN-GP augmentation method, thereby allowing me to evaluate how improved data generation impacts model performance.

4.2 Experimental Results and Discussions

(1) Evaluation of the Border-SMOTE Enhancement

In the first experimental phase, I evaluated the machine learning models by running the diagnostic task on the dataset that was balanced using the improved Border-SMOTE oversampling method.

Model A% P-1% P-2% P-3% P-ave% F1-1% F1-2% F1-3% F1-ave% R-ave%
LightGBM 94.41 96.61 91.79 93.15 94.09 93.82 93.00 94.42 94.20 94.38
XGBoost 94.50 95.79 95.58 97.13 95.06 95.11 94.53 94.54 94.55 94.10
Random Forest 91.94 91.30 96.13 97.18 93.21 92.89 94.23 90.15 92.05 91.22
Stacking 97.20 98.56 96.21 97.79 97.22 98.43 96.19 97.48 97.17 97.13

From the results presented in the table above, it is evident that the Stacking ensemble model outperforms all three single models across all evaluation metrics. The Stacking architecture achieved an Accuracy of 97.20%, which represents a significant enhancement of 2.7 percentage points over the best-performing single model, XGBoost. This substantial gain in performance underscores the effectiveness of integrating diverse base models for high-voltage battery fault diagnosis.

Examining the performance across each fault severity is important. The Stacking model demonstrates a marked improvement in classifying Level 1 faults, achieving a Recall of 98.43%. This indicates its exceptional capability in capturing minor faults that are often hard to detect. While the improvements in Level 2 and Level 3 Recalls are somewhat smaller, they are still consistent and high, at 96.19% and 97.48% respectively. The model’s ability to robustly handle all three severity levels confirms that the model has not simply learned to identify “fault vs. no fault” but has developed an understanding of differentiating the subtle numerical patterns that delineate distinct levels of risk with high-voltage battery systems.

To determine the added value of the modified strategy, I compared the output metrics of the Stacking model against prior experiments that used the full balanced dataset but with standard SMOTE conditioning. The observed results show a marked difference. The Border-Smote model achieved an Accuracy and Precision of 97.2% and 97.22%, respectively. This represents a significant enhancement over the standard SMOTE method. Importantly, this validates the initial hypothesis that over-sampling nearer to the most meaningful decision boundaries for a high-voltage battery is more useful than blanket interpolation.

(2) Evaluation of the WGAN-GP Enhancement

I then turned my attention to the more power data dimension. For this experiment, data balancing was performed using WGAN-GP to measure if the augmented samples yielded a more substantial diagnostic edge compared to statistical interpolation methods.

Model A% P-1% P-2% P-3% P-ave% F1-1% F1-2% F1-3% F1-ave% R-ave%
LightGBM 93.08 92.66 95.28 95.26 93.56 93.20 93.66 95.15 93.37 93.23
XGBoost 99.17 99.03 99.41 99.49 99.23 99.06 99.45 99.35 99.22 99.21
Random Forest 98.82 99.11 99.41 99.51 98.97 99.09 99.27 98.55 98.85 98.73
Stacking 99.81 99.90 99.70 99.65 99.79 99.90 99.80 99.63 99.80 99.81

The application of WGAN-GP has furnished a high-quality dataset that allows models to reach near-saturated predictive performance. In this setting, the Stacking ensemble model achieves its best performance with an Accuracy of 99.81% and a Macro F1-Score of 99.80%. From a data perspective, this demonstrates that richer, more realistic samples offer unique temporal features that are far better than those using a strict linear interpolation. Interestingly, while the Stacking model remains the top performer, the performance gap between the singular models and the ensemble model has narrowed significantly. XGBoost, for example, achieves a 99.17% accuracy and performs exceptionally well across the board versus the ensemble model that has an accuracy of 99.81%.

This lack of a wide discrepancy indicates that when the data quality is sufficiently high, strong singular learners can achieve high diagnostic results, effectively reducing the need for complex ensemble architecture to bridge a large performance gap. However, the ensemble models serve as a high-precision tool for high-voltage battery management systems where even the smallest percentage gain in predictive accuracy could translate to a critical safety margin.

(3) Generalization and Broader Comparison

To better understand the advantages of WGAN-GP, I also ran the experiment using some extra widely-used classification algorithms to determine whether this particular distribution-of-distance-based data augmentation truly is beneficial in a general sense across model architectures. I tested Adaptive Boosting, Gradient Boosting, and Multi-Layer Perceptron on the same datasets. This comparison reveals that WGAN-GP’s “realistic” generated data works well across varying model types.

Model A% P-1% P-2% P-3% P-ave% F1-1% F1-2% F1-3% F1-ave% R-ave%
ADA 97.73 98.83 98.37 97.03 97.79 97.63 97.79 97.86 97.70 97.64
GBDT 99.71 99.79 99.68 99.54 99.69 99.79 99.71 99.58 99.70 99.71
MLP 99.32 99.57 98.67 99.03 99.22 99.63 98.91 99.14 99.27 99.31
Stacking 99.81 99.90 99.70 99.65 99.79 99.90 99.80 99.63 99.80 99.81

The results reveal excellent performance from all additional algorithms, with GBDT achieving an impressive Accuracy of 99.71%, almost tying with the Stacking model. It reinforces the finding that with high-quality data, complex generalization mechanisms are not always necessary. Yet, the Stacking model remains a very robust, safer choice, consistently giving faultless results across different types of fault data which is the key to guarding the health of a high-voltage battery.

5. Conclusion and Outlook

In this research, I have successfully developed a comprehensive framework for high-voltage battery fault diagnosis. This approach was underpinned by data preprocessing methods to deal with major class imbalances, severe differences in data quality, and predictive model complexity, which stands as the main pain point in this domain. The conclusions from the work are given below.

First, my use of fault-tree analysis with physical correlation to create a standard 4-class severity scale for high-voltage battery faults improved the dataset quality, making it far more accurate and dependable for modeling. Features were selected rigorously in order to identify several dynamic variables related to consistency and driving behavior, which serve as an excellent indicator of the abnormal conditions in a high-voltage battery system.

Second, the methodological contribution is clear. I proposed a novel model combination using an improved Border-SMOTE strategy with a heterogeneous Stacking ensemble model. Compared with the single model, the Stacking model improved the accuracy and generalization in detecting faults and showed a diagnostic accuracy of 97.20%. This demonstrated that leveraging diverse base models can mitigate the limits of singular models and efficiently detect different types of faults within the high-voltage battery.

Third, I delved into more intricate generative data augmentation strategies. Upon changing the data balancing methodology to the WGAN-GP, model performance parameters all grew significantly; the Stacking Diagnostic model reached an accuracy of 99.81%. This synthesis of data exploration highlighted the important conclusion that high-quality training data is an instrumental factor in applying high-voltage battery fault diagnostics. The subsequent drop in difference between a robust single-stage classifier versus an ensemble architecture on the augmented data asserts the impactful power of good quality model input.

In terms of future work, I have identified a promising outlook. First, I will explore extra combinations in the architecture of the ensemble method, such as multi-stage “model plus physics” structures, to further investigate the roots of high-voltage battery malfunctions. Second, the correlation between specific patterns of high-voltage battery failures and contextual information from driver behavior and weather data requires further exploration in future work. Constructing a dataset that covers the full life cycle and a wider range of extreme working conditions, and creating different types of adaptive algorithms for the field, will continue to be crucial steps. This ongoing line of analysis can further overcome the bottleneck in diagnostic precision, promoting the green evolution of the high-voltage battery transport ecosystem.

Scroll to Top