An Explainable Fault Diagnosis Algorithm for Proton Exchange Membrane Fuel Cells Integrating Gramian Angular Fields and Gradient-Weighted Class Activation Mapping
Abstract
Reliable operation of proton exchange membrane fuel cells (PEMFCs) is crucial for their widespread commercialization, and accurate fault diagnosis is the key to ensuring their long-term stable operation. However, traditional fault diagnosis methods not only lack sufficient interpretability, making it difficult for users to trust their diagnostic decisions, but also one-dimensional (1D) feature extraction methods highly rely on manual experience to design and extract features, which are easily affected by noise. This paper proposes a new interpretable fault diagnosis algorithm that integrates Gramian angular field (GAF) transform, convolutional neural network (CNN), and gradient-weighted class activation mapping (Grad-CAM) for enhanced fault diagnosis and analysis of proton exchange membrane fuel cells. The algorithm is systematically validated using experimental data to classify three critical health states: normal operation, membrane drying, and hydrogen leakage. The method first converts the 1D sensor signal into a two-dimensional GAF image to capture the temporal dependency and converts the diagnostic problem into an image recognition task. Then, the customized CNN architecture extracts hierarchical spatiotemporal features for fault classification, while Grad-CAM provides visual explanations by highlighting the most influential regions in the input signal. The results show that the diagnostic accuracy of the proposed model reaches 99.8%, which is 4.18%, 9.43% and 2.46% higher than other baseline models (SVM, LSTM, and CNN), respectively. Furthermore, the explainability analysis using Grad-CAM effectively mitigates the “black box” problem by generating visual heatmaps that pinpoint the key feature regions the model relies on to distinguish different health states. This validates the model’s decision-making rationality and significantly enhances the transparency and trustworthiness of the diagnostic process.