# AI-enhanced RUL prediction of PEMFCs under dynamic operating conditions using XGBoost-based HI extraction and hybrid transformer-GRU model

Soufian Echabarri, Phuc Do, Hai-Canh Vu, Pierre-Yves Liegeois

► To cite this version:

Soufian Echabarri, Phuc Do, Hai-Canh Vu, Pierre-Yves Liegeois. AI-enhanced RUL prediction of PEMFCs under dynamic operating conditions using XGBoost-based HI extraction and hybrid transformer-GRU model. Reliability Engineering and System Safety, 2026, 269, pp.112042. 10.1016/j.ress.2025.112042. hal-05410617

HAL Id: hal-05410617

https://imt-mines-ales.hal.science/hal-05410617v1

Submitted on 11 Dec 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

# AI-enhanced RUL prediction of PEMFCs under dynamic operating conditions using XGBoost-based HI extraction and hybrid transformer-GRU model

Soufian Echabarri<sup>a,b</sup>, Phuc Do<sup>id</sup> c,*, Hai-Canh Vu<sup>id</sup> d, Pierre-Yves Liegeois<sup>b</sup>

## ARTICLE INFO

### Keywords:

Proton exchange membrane fuel cell

Health indicator

Remaining useful life

Explainable AI

Dynamic operating conditions

Machine learning

## ABSTRACT

Proton Exchange Membrane Fuel Cells (PEMFCs) are critical for zero-emission energy systems, particularly in electro-hydrogen generators (GEH2). Accurate Remaining Useful Life (RUL) prediction is crucial for ensuring operational reliability and enabling predictive maintenance. However, dynamic operating conditions present a significant challenge for existing prognostic approaches, particularly in extracting robust Health Indicators (HIs). Conventional HIs, often based on voltage or power, are highly sensitive to mission profiles and fail to generalize in real-world conditions. To address this limitation, we propose a novel data-driven approach based on XGBoost regression to extract a degradation-specific HI directly from raw voltage measurements. This method effectively filters out transient fluctuations caused by varying power demands, isolating the true degradation trend without requiring complex preprocessing or domain expertise. Leveraging the extracted HI, we introduce a hybrid deep learning model that combines Transformer networks and Gated Recurrent Units (GRUs) to capture temporal dependencies and provide accurate RUL predictions under dynamic conditions. Explainable AI techniques are integrated to interpret the model's predictions and analyze the influence of operational variables on fuel cell degradation. The proposed framework is validated on a real-world industrial dataset from four PEMFC stacks operating in GEH2 systems. Experimental results demonstrate superior accuracy, robustness, and generalizability compared to state-of-the-art methods, highlighting the potential of this scalable and interpretable approach for predictive maintenance in complex industrial environments.

## 1. Introduction

Proton Exchange Membrane Fuel Cells (PEMFCs) are a key en-
abler of clean energy conversion, offering high efficiency, low environ-
mental impact, and adaptability across a wide range of applications,
from portable electronics and automotive propulsion to stationary and
backup power systems [1]. In particular, PEMFCs play a critical role in
electro-hydrogen generators, such as the zero-emission GEH2 systems
developed by EODev, where they convert hydrogen and oxygen into
electricity with water as the sole byproduct. Despite their numerous ad-
vantages, the large-scale deployment of PEMFCs remains hindered by
concerns over durability, operational reliability, and high maintenance
costs. As industrial deployment increases, there is a growing need for ac-

curate prognostic tools that can predict the Remaining Useful Life (RUL) of these systems [2].

RUL prediction is a cornerstone of condition-based maintenance
strategies, offering the potential to significantly reduce operational
costs, improve system reliability, and avoid unexpected failures [3,4].
However, building accurate and robust RUL prediction models for PEM-
FCs is particularly challenging due to the complex and nonlinear na-
ture of their degradation processes, which are influenced by multiple
interdependent factors such as current density, temperature, humidity,
and load cycles [5]. These challenges are further exacerbated in real-
world industrial settings, such as GEH2 systems, where PEMFCs oper-
ate under highly dynamic conditions [6]. In such environments, tradi-
tional Health Indicators typically derived from voltage or power trends

<footnote><sup>a</sup> Université de Lorraine, CNRS, CRAN, F-54000 Nancy, France</footnote>

<footnote><sup>b</sup> Energy Designer and IT, EODev, Paris Region, 92130, France</footnote>

<footnote><sup>c</sup> SyCoIA, IMT Mines Ales, Ales, France</footnote>

<footnote><sup>d</sup> Université de Technologie de Compiègne, CS 60319, CEDEX, 60203 Compiègne, France</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>E-mail addresses: soufian.echabarri@univ-lorraine.fr (S. Echabarri), phuc.do@mines-ales.fr (P. Do), hai-canh.vu@utc.fr (H.-C. Vu), pierre-yves.liegeois@eo.dev (P.-Y. Liegeois).</footnote>
struggle to provide consistent and interpretable degradation signals [7]. Although these indicators can exhibit monotonic behavior under controlled, static testing, they become unreliable in dynamic regimes, where varying power demand and transient operating conditions can mask or distort actual degradation patterns [8].

The core difficulty lies in extracting a Health Indicator that reliably reflects the intrinsic degradation of the PEMFC, independent of variations in power demands. Voltage, while one of the most accessible and widely monitored parameters, is particularly susceptible to variations in power demand and other transient factors such as load changes, temperature shifts, and reactant flow rates [7]. As a result, voltage-based signals often conflate reversible operational effects with irreversible degradation, making it difficult to isolate the long-term degradation trend required for accurate RUL estimation. A robust HI must therefore disentangle these influences to capture only the degradation-specific component of the system's behavior, an objective that conventional statistical or physics-based models often fail to achieve under complex, real-world conditions.

To address this challenge, we propose a two-stage framework: (1) a XGBUGressor-based Health Indicator extraction model that leverages voltage measurements to isolate degradation-related trends, effectively filtering out fluctuations induced by variable power demands; and (2) a hybrid deep learning architecture that combines Transformer networks and GRUs to model the temporal evolution of the extracted Health Indicator, enabling accurate RUL prediction under dynamic operating conditions. The proposed framework is validated on a real industrial dataset from four PEMFC stacks in GEH2 systems, demonstrating its ability to accurately extract degradation trends and outperform conventional prognostic methods in dynamic conditions.

The remainder of this paper is organized as follows: Section 2 reviews relevant literature on RUL prediction of PEMFC and HI extraction. Section 3 presents the GEH2 system, dataset characteristics, and problem formulation. Section 4 details the proposed methodology, including the HI extraction process and the hybrid deep learning model. Section 5 reports the experimental results and comparative analysis. Finally, Section 6 concludes the paper.

## 2. Related works and scientific contributions

### 2.1. RUL prediction for PEMFC

Predicting the RUL of PEMFCs has attracted significant research attention in recent years, with data-driven approaches emerging as powerful alternatives to physics-based models due to their ability to capture complex degradation patterns without requiring detailed knowledge of underlying mechanisms. Within this data-driven paradigm, researchers have explored a wide range of machine learning and deep learning architectures to enhance prognostic accuracy. For example, [9] introduced a hybrid model that combines voltage recovery techniques with Bayesian optimization of a multi-kernel relevance vector machine (MK-RVM) for RUL prediction. Using the dataset from the Fuel Cell Laboratory (FCLAB), their approach demonstrated strong predictive performance. Recurrent neural networks, particularly Long Short-Term Memory (LSTM) architectures, have also been widely employed to model temporal dependencies in degradation patterns. Liu et al. [10] proposed an LSTM-based method enhanced by Locally Estimated Scatterplot Smoothing (LOESS) and interval sampling to preprocess aging data, achieving significantly higher accuracy than a standard backpropagation neural network. Similarly, [11] developed a short-term RUL prediction framework for fuel cell vehicles, leveraging adaptive Locally Weighted Scatterplot Smoothing (LOWESS) and a bidirectional LSTM (Bi-LSTM) to process stack voltage data from an operational fuel cell bus, with deployment integrated into a cloud-based online monitoring system.

Attention mechanisms and multi-scale approaches have been incorporated to enhance feature extraction capabilities. [12] proposed an

end-to-end framework leveraging a Multi-Scale Temporal Convolutional Network (MSTCN) with novel Self-Attention and Global Fusion Attention mechanisms to enhance multi-scale feature extraction and suppress redundant information. Their experiments on the NASA C-MAPSS dataset demonstrated superior performance compared to other methods. Fu et al. [13] introduced a Non-stationary Transformer model for RUL prediction of PEMFC stacks, incorporating the discrete wavelet transform (DWT) for data denoising. Their approach was evaluated under varying training lengths, prediction horizons, and End-of-Life (EoL) thresholds, consistently outperforming LSTM- and Echo State Network (ESN)-based methods.

Transfer learning has also been explored to address data limitations. Kebede et al. [14] introduced a transfer learning-based prognostic model combining a variational autoencoder with a Bi-LSTM-Attention mechanism to predict PEMFC stack voltage degradation and RUL. The method employs feature fusion, knee-point detection, and online rolling prediction using a sliding window, resulting in high accuracy with relative errors ranging from 1.69% to 5.04%.

Other contributions further illustrate the diversity of modeling strategies. Yi et al. [15] introduced a matrix LSTM (M-LSTM) that integrates structured matrix operations into LSTM cells to enhance temporal feature representation, achieving lower long-term prediction errors than conventional LSTM and GRU. In the study by [16], a method was introduced that combines a Convolutional Neural Network with Bidirectional Long Short-Term Memory (CNN-BiLSTM) to predict the RUL of PEMFC. The CNN is responsible for extracting relevant features from the fuel cells. In contrast, the BiLSTM is applied to predict the behavior of low-frequency components, thus enabling precise assessments of the performance decline in PEMFC. Zhang et al. [17] developed a multi-variable prognostic framework that combines random forest feature selection with a temporal convolutional network (TCN) for robust multifactor degradation modeling. Darwish et al. (2024) combined LSTM, self-attention, and scaled dot-product attention into a unified deep learning architecture, thereby improving the precision of RUL predictions on the 2014 PHM Data Challenge Dataset.

In addition, [18] proposed a temporal-causal inference framework for PEMFC RUL prediction, combining Graph Total Variation regularization with Monte Carlo dropout to balance efficiency and accuracy, achieving superior RMSE and probabilistic reliability compared to graph convolutional baselines on the PHM 2014 dataset. Xiong et al. [19] introduced an adaptive deep learning framework for RUL prediction, enabling interpretable and accurate RUL estimation under varying operational conditions. The framework adaptively trains and selects models based on failure mode recognition. Li et al. [20] proposed a Closed-form Continuous-depth neural (CfC)-based hybrid Difference Features Re-representation Network (CfC-F2RN) for RUL prediction, leveraging LSTM-based initial feature extraction and a CfC decoder for re-representation, combined with an attention mechanism to form a dual-latent feature representation.

Among the most recently published methods, [21] introduced an enhanced TCN-iTransformer architecture for PEMFC RUL prediction, combining Temporal Convolutional Networks, an improved iTransformer, Discrete Cosine Transform-based denoising, and a channel-attention mechanism. Their model demonstrated markedly superior performance to the standard Transformer, particularly for long sequence time-series forecasting. Zhou et al. [22] developed a De-stationary-Crossformer model for predicting the RUL of PEMFC. The proposed approach enhances the standard Crossformer by integrating adaptive normalization to address data non-stationarity and introducing a non-stationary attention mechanism to better capture temporal and feature dependencies. Experimental results demonstrated that this model reduced the mean squared error by 31% compared to the Transformer and 23% compared to the standard Crossformer, highlighting its effectiveness for non-stationary, multidimensional PEMFC degradation data.

Despite these advances, most existing studies have focused on controlled laboratory conditions or simulated dynamic profiles, with limited
validation on industrial-scale systems operating under truly dynamic conditions. Additionally, few approaches have explicitly addressed the challenge of extracting reliable health indicators from measurements heavily influenced by operational variations, a critical gap our work aims to fill.

## 2.2. Health indicator extraction for PEMFC

Health Indicators serve as quantitative measures that reflect the degradation state of a system and form the foundation for RUL prediction. For PEMFCs, various HIs have been proposed and evaluated in the literature, with voltage- and power-based indicators being the most common. Cell voltage, in particular, is widely used as a primary HI due to its direct correlation with fuel cell performance and its ease of measurement. For example, [23] proposed an adaptive data-driven prognostic strategy for PEMFCs under varying conditions, in which sliding segments of data were used to identify Linear Parameter-Varying (LPV) models. These models were then employed to derive a virtual steady-state voltage as a health indicator. An ensemble Echo State Network (ESN) was subsequently applied for RUL prediction, achieving reliable performance in long-term tests under diverse operating modes.

Several researchers have recognized the limitations of traditional health indicators under dynamic operating conditions. Hua et al. [24] addressed the limitations of conventional indicators like voltage and power, emphasizing that these common HIs are influenced not only by aging but also by varying operating parameters. To enhance RUL prediction in dynamic scenarios, they proposed novel HIs such as virtual stack voltage, average resistance, polarization resistance, and power loss. In a subsequent work, [2] introduced a dynamic health indicator called Relative Power-Loss Rate (RPLR) for PEMFCs, addressing the limitations of static indicators in varying mission profiles. They developed an improved Echo State Network with a double-input structure (voltage and current) to enhance RUL prediction performance, validated through three dynamic µ-CHP PEMFC durability tests.

Building on the RPLR concept, [25] developed a method to predict the RUL of vehicle-oriented PEMFCs using seasonal trends and a hybrid data-driven model based on real-vehicle data from a PEMFC city bus in Chengdu, China. In a related study, [26] proposed a hybrid RUL prediction method for vehicle-oriented PEMFCs that combines mode decomposition and a two-phase model using real-world bus data. Their approach utilizes improved complete ensemble empirical mode decomposition with adaptive noise to handle voltage recovery effects. A BiLSTM predicts low-frequency components, and a CNN-BiLSTM-Attention model, optimized by the Dung beetle algorithm, is employed for high-frequency data. An adaptive unscented Kalman filter is used for final estimation.

Other approaches have focused on HI extraction through degradation modeling. Wang et al. [27] developed a degradation behavior model combined with a sliding-window identification method to derive an HI, which was then used in a symbolic-based LSTM network for degradation trend prediction. This approach successfully captured the stack voltage behavior, achieving a prognostic horizon that covers up to 50% of the fuel cell's life cycle with an average RUL estimation accuracy of nearly 90%. In a related direction, [28] employed an auto-encoder neural network to automatically learn latent HIs from raw voltage measurements, which were subsequently used in an LSTM model for RUL prediction.

Signal decomposition methods have also been explored for HI extraction under dynamic conditions. Wang et al. [29] proposed a Hilbert-Huang Transform (HHT)-based approach to derive HIs in varying operating scenarios, combined with a symbolic-based gated recurrent unit (GRU) model to enhance prediction accuracy. Similarly, [30] applied HHT to extract the HI of solid oxide fuel cells (SOFCs) under steady operating conditions, demonstrating the versatility of such decomposition methods for fuel cell prognostics. Yue et al. [31] presented a polarization function-based model, where the measured voltage was segmented and processed via nonlinear regression to obtain an HI. Zhang et al. [32] proposed an LSTM-based health indicator construction method combined with an improved particle filter and Bayesian neural network to predict the RUL of complex systems.

## 2.3. Research gap and scientific contributions

Despite recent progress in data-driven prognostics, extracting reliable HIs for PEMFCs under dynamic operating conditions remains a significant challenge. Most existing approaches are developed and validated in controlled laboratory environments, which fail to reflect the complexity of real-world applications, such as in industrial GEH2 systems, where power demand and environmental conditions vary continuously based on user-specific mission profiles. In addition, the variation in power demand introduces considerable variability into voltage signals, making it difficult to distinguish between reversible operational effects and irreversible degradation.

Moreover, many of the HI extraction techniques reported in the literature rely on elaborate signal processing pipelines, including multi-stage filtering, normalization procedures, or model-based compensation strategies. These methods often lack generalizability across different systems and require substantial domain-specific tuning, limiting their practical deployment in industrial contexts.

Finally, the integration of robust, degradation-specific HI extraction with advanced deep learning architectures for Remaining Useful Life (RUL) prediction has received limited attention. A clear gap remains in the development of scalable, interpretable, and industry-validated prognostic frameworks that integrate data-driven health monitoring with temporal modeling of degradation.

To address these limitations, this work makes the following three main contributions:

* We introduce a novel XGBRepressor-based method to extract a degradation-specific HI directly from raw voltage measurements, effectively filtering out short-term fluctuations caused by dynamic power demands without complex preprocessing.

* Leveraging this HI, we design a hybrid deep learning model combining Transformer networks and GRUs to deliver accurate and robust RUL predictions under highly dynamic operating conditions.

* We conduct an extensive comparative study against state-of-the-art models on real-world industrial PEMFC datasets and incorporate explainable AI techniques, both of which highlight the superior predictive performance and interpretability of the proposed framework.

# 3. System description and problem formulation

## 3.1. GEH2 system and data acquisition

The GEH2 system, developed by EODev, is an advanced electro-hydrogen generator designed to provide clean, high-power energy without producing CO2 emissions or delicate particulate matter. It operates primarily using a dihydrogen fuel cell, supported by an integrated battery system and auxiliary components, including pumps, cooling circuits, and power conversion units. In standalone mode, a single GEH2 can deliver up to 110 kVA of peak power. When connected in a multi-generator configuration, the system can scale up to 1 MVA, making it suitable for a wide range of industrial and commercial applications [EODev products]. To optimize fuel cell longevity while meeting diverse customer energy requirements, each GEH2 is equipped with a 47 kWh battery storage system. Sophisticated power conversion and control systems govern the harmonious operation of these components, ensuring stable power delivery across varying load profiles. Technical specifications and main characteristics of the GEH2 system are presented in Table 1.

To enable continuous monitoring, advanced diagnostics, and predictive maintenance capabilities, each GEH2 unit is equipped with a comprehensive IoT-based data acquisition system. This system captures
<figure><img src="image_3.png" /><figcaption>Fig. 1. Boxplot and Violin plot analysis of key operating parameters for PEMFC62, PEMFC63, PEMFC52, and PEMFC01.</figcaption></figure>

<table><caption>**Table 1**

Technical specifications of the GEH2 system.</caption><thead><tr><td>Characteristic</td><td>Value</td></tr></thead><tbody><tr><td>Power output - ESP ISO rating</td><td>110 kVA / 88 kW</td></tr><tr><td>Power output - PRP ISO rating</td><td>100 kVA / 80 kW</td></tr><tr><td>Voltage output</td><td>400 VAC / 480 VAC</td></tr><tr><td>Frequency output</td><td>50 Hz - 60 Hz</td></tr><tr><td>Operating temperature</td><td>-10°C to 40°C (without derating)</td></tr><tr><td>Protection index</td><td>IP 43</td></tr><tr><td>Fuel cell brand</td><td>Toyota</td></tr><tr><td>Fuel cell type</td><td>PEM</td></tr><tr><td>Fuel cell efficiency</td><td>50%</td></tr><tr><td>Battery type</td><td>LiFePO4</td></tr><tr><td>Battery capacity</td><td>44 kWh</td></tr></tbody></table>

<table><caption>**Table 2**

Range of PEMFC parameters.</caption><thead><tr><td>Parameter</td><td>Description</td><td>Unit</td><td>Range</td></tr></thead><tbody><tr><td>IFC</td><td>Stack current</td><td>A</td><td>0 - 290</td></tr><tr><td>PHL</td><td>Hydrogen pressure</td><td>kPa</td><td>50 - 282</td></tr><tr><td>FCO_TEMP</td><td>Fuel cell stack outlet coolant temperature</td><td>°C</td><td>15 - 69</td></tr><tr><td>FCI_TEMP</td><td>Fuel cell stack inlet coolant temperature</td><td>°C</td><td>16 - 61</td></tr><tr><td>PAFIC</td><td>Air pressure at fuel cell inlet</td><td>kPa</td><td>80 - 206</td></tr><tr><td>QAF</td><td>Fuel cell air flow</td><td>NL/Min</td><td>0 - 3600</td></tr><tr><td>VFC</td><td>Fuel cell voltage</td><td>V</td><td>0 - 400</td></tr></tbody></table>

more than 1000 different signals every 100 milliseconds from various sensors and control units dispersed throughout the generator. These signals include key physical quantities such as pressures, temperatures, flow rates, voltages, and currents, providing a rich, multi-dimensional view of the system's operational state. Among the recorded signals, 22 variables are directly associated with the PEMFC subsystem, reflecting critical aspects of its performance and health.

After downsampling to 30-s intervals, the data is transmitted to a cloud infrastructure for secure storage and subsequent analysis. This sampling rate ensures sufficient temporal resolution to capture the system's dynamic operational behavior. Key parameters influencing PEMFC performance were identified by [33] using kernel principal component analysis and mutual information techniques, as summarized in Table 2. These variables represent the main control inputs and environmen-

tal factors that shape the electrochemical performance and long-term degradation behavior of the fuel cells. A statistical comparison of the operational characteristics and environmental conditions of the four PEMFC units is shown in Fig. 1. For each parameter, violin plots depict the full distribution, while box plots emphasize central tendency and variability, highlighting the differences in usage profiles across units.

## 3.2. Problem statement

The prediction of RUL for PEMFCs operating within GEH2 units presents significant technical challenges due to the inherently variable operating conditions encountered in real-world deployments. Unlike laboratory testing environments, where controlled, steady-state conditions facilitate straightforward degradation modeling, commercial GEH2 units experience dynamic operational profiles dictated by client utilization patterns and fluctuating power demands.

The fuel cell voltage, a key indicator of stack health, is particularly sensitive to rapid changes in current density. Instantaneous fluctuations in load cause corresponding voltage transients, making it difficult to distinguish between normal operational variability and genuine degradation-related trends. As illustrated in Fig. 2, both the output current and voltage of a typical PEMFC stack measured in a GEH2 system exhibit significant, irregular fluctuations throughout regular operation. These dynamic variations mask the gradual voltage decay associated with long-term aging, complicating direct interpretation and RUL prediction.

In the static operating condition, the voltage deviation is considered to be influenced only by ageing degradation. Nevertheless, the voltage is also influenced by the mission profiles, and it is improper to take it as the HI in the dynamic or time-varying operating conditions. Extracting a robust HI is challenging, and only a few papers have presented handling methods [2]. Finding a more general and convenient HI under the dynamic operating condition is necessary for practical use.

Several HIs have been reported in the literature to capture fuel cell degradation trends. For instance, the Relative Power-Loss Rate (RPLR) has been widely used as a simple degradation metric, quantifying the relative decrease in output power over time [24]. Similarly, virtual voltage indicators estimate a reference voltage at nominal operating conditions to mitigate the impact of load variations [34]. While these approaches are straightforward and interpretable, they are often sensitive
<figure><img src="image_4.png" /><figcaption>Fig. 2. Normalized 5-min sample of PEMFC voltage and current, and overall voltage over the full operating period.</figcaption></figure>

to operational fluctuations and noise. They may not generalize well under highly dynamic load conditions, as in the case of GEH2. In contrast, the proposed XGBRepressor-based HI leverages machine learning to learn the nonlinear relationship between cell voltage and operating parameters, and then estimates a virtual healthy voltage under fixed nominal power. This allows the isolation of the degradation effect from operational variability in a data-driven manner. Furthermore, by capturing complex dependencies through gradient boosting trees, the proposed HI demonstrates higher robustness and adaptability compared to analytical indices such as RPLR, which rely on predefined mathematical formulations.

Therefore, the fundamental challenge addressed in this research is twofold: first, to extract a robust HI that accurately captures the degradation state of the PEMFCs, effectively disentangling it from transient effects caused by fluctuating power demand; and second, to develop a predictive framework that leverages this indicator to deliver accurate RUL prediction under dynamic and non-stationary operating conditions.

## 4. Methodology

This section provides a detailed description of the end-to-end framework developed to extract a robust HI from PEMFC voltage measurements under dynamic operating conditions, and to predict the RUL using the proposed Transformer-GRU architecture. The methodology is explained step-by-step to ensure full transparency and reproducibility. An overview of the complete workflow is illustrated in Fig. 3.

### 4.1. HI extraction

XGBRepressor is a supervised learning algorithm based on the Extreme Gradient Boosting (XGBoost) framework. It is optimized for speed and performance, offering high predictive accuracy for regression tasks. By iteratively building an ensemble of decision trees, it minimizes loss functions through a gradient descent approach. It is well-suited for structured data and handles both linear and nonlinear relationships efficiently [35].

To isolate a voltage-based HI that tracks PEMFC degradation independently of load fluctuations, we fix the power output to a nominal value $P_{out}(t) = P_{nom}$. We then train an XGBRepressor to predict the true stack voltage $VFC(t)$ whenever the PEMFC operates at this nominal power:

$$ \overline{VFC}_{nom}(t) = f_{XGB}(Pout(t), C(t)), \quad (1) $$

where $P_{out}(t)$ is the output power, $P_{nom}$ is the nominal output power, and $C(t)$ is the vector of auxiliary operating conditions at time $t$:

$$ C(t) = [IFC(t), FCI_TEMP(t), FCO_TEMP(t), PAFIC(t), PHL(t), QAF(t)], \quad (2) $$

with $IFC(t)$ the stack current, $FCI_TEMP(t)$ the inlet coolant temperature, $FCO_TEMP(t)$ the outlet coolant temperature, $PAFIC(t)$ the air pressure at the fuel cell inlet, $PHL(t)$ the hydrogen pressure, and $QAF(t)$ the fuel cell air flow.

During training, we restrict the dataset to those timestamps $T$ at which $Pout(t) = P_{nom}$. The XGBRepressor model $f_{XGB}$ is trained to
<figure><img src="image_5.png" /><figcaption>Fig. 3. Workflow of the proposed framework.</figcaption></figure>

<table><caption>**Table 3**
Estimated hyperparameters for the XGBRegressor per PEMFC.</caption><thead><tr><th>PEMFC ID</th><th>Learning Rate</th><th>Max Depth</th><th># Estimators</th><th>Subsample</th></tr></thead><tbody><tr><td>PEMFC62</td><td>0.01</td><td>6</td><td>500</td><td>0.8</td></tr><tr><td>PEMFC63</td><td>0.10</td><td>3</td><td>100</td><td>1.0</td></tr><tr><td>PEFMC52</td><td>0.05</td><td>3</td><td>500</td><td>0.8</td></tr><tr><td>PEFMC01</td><td>0.01</td><td>6</td><td>500</td><td>0.8</td></tr></tbody></table>

minimize a regularized squared-error objective over the set $\mathcal{T}$:

$$ \min_{f} \sum_{t \in \mathcal{T}} (VFC(t) - f_k(P_{\text{out}}(t), C(t)))^2 + \Omega[f_k], \quad (3) $$

where $f_k$ is the prediction function of tree $k$ and $\Omega$ is a regularization that penalizes the regression tree functions and is defined as follows:

$$ \Omega(f) = \gamma T + \frac{1}{2} \lambda \|w\|^2, \quad (4) $$

where $T$ is the total number of leaves in the tree, $w$ is the leaf weights, and $\gamma$ and $\lambda$ are hyperparameters that control the regularization strength.

Hyperparameters such as learning rate, maximum tree depth, number of estimators, and subsample ratio were tuned using GridSearchCV for each PEMFC to achieve a better balance between bias and variance. The estimated hyperparameter values are presented in Table 3.

After training, the voltage-based HI is given by the following:

$$ \text{HI}(t) = \begin{cases} VFC(t), & t \in \mathcal{T}, \\ f_{\text{XGB}}(P_{\text{nom}}, C(t)), & \text{otherwise.} \end{cases} $$

The extracted HI serves as the primary input to the subsequent Transformer-GRU deep learning architecture for RUL prediction, establishing a solid foundation for accurate prognostics under dynamic operating conditions.

## 4.2. Hybrid transformer-GRU architecture for RUL prediction

Building on the extracted HI, we design a hybrid deep network that combines Transformer encoders with Gated Recurrent Units (GRUs) to

capture temporal dependencies in the degradation signal and predict the RUL.

The input to the model is a multivariate time series consisting of the HI at each time step, together with operating parameters $X(t) = [\text{HI}(t), C(t)]$. We begin by rescaling all features and the HI to the [0, 1] interval using Min-Max normalization:

$$ X'(t) = \frac{X(t) - X_{\min}}{X_{\max} - X_{\min}}. \quad (5) $$

We then form overlapping windows of fixed length $L$; each window contains the normalized feature vectors at times $t, t+1, \dots, t+L-1$.

These windows first pass through the Transformer module. Here, each time step is linearly projected into query (Q), key (K), and value (V) vectors, and multi-head self-attention computes pairwise affinities between them.

$$ \text{Attention}(Q, K, V) = \text{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V, \quad (6) $$

where $d_k$ is the dimension of the key vectors. By stacking several attention layers with residual connections and layer normalization, the Transformer captures global contextual patterns and long-term trends across the entire window.

The Transformer's output sequence, denoted by $x_t^{\text{trans}}$, feeds into a GRU layer. The GRU's update and reset gates control how much past hidden state is retained versus how much new information is incorporated. Concretely, at each step, the GRU computes: (1) the update gate: $u_t = \sigma(W_u \cdot [c_{t-1}, x_t^{\text{trans}}])$; (2) the reset gate: $r_t = \sigma(W_r \cdot [c_{t-1}, x_t^{\text{trans}}])$; (3) the candidate state: $\tilde{c}_t = \tanh(W_r \cdot [r_t \odot c_{t-1}, x_t^{\text{trans}}])$; and (4) the new hidden state: $c_t = (1 - u_t) \odot c_{t-1} + u_t \odot \tilde{c}_t$, where $\odot$ denotes element-wise multiplication; the weight matrices $W_u, W_r$, and $W$ transform the inputs and hidden states; $\sigma(\cdot)$ and $\tanh(\cdot)$ denote the sigmoid and hyperbolic-tangent activations.

This hybrid architecture effectively combines the Transformer's strength in capturing long-range dependencies with the GRU's ability to model sequential dynamics, resulting in a robust model for RUL prediction under varying operating conditions. This combination demonstrates particular effectiveness in capturing the degradation trajectories of PEMFCs subjected to dynamic operational scenarios. Although PEMFCs share similar configurations, in practice, they operate under different dynamic
<table><caption>**Table 4**
Transformer-GRU model hyperparameters for each PEMFC.</caption><thead><tr><td>Parameter</td><td>Description</td><td>PEMFC62</td><td>PEMFC63</td><td>PEMFC52</td><td>PEMFC01</td></tr></thead><tbody><tr><td>Epochs</td><td>Maximum number of training iterations</td><td>100</td><td>150</td><td>150</td><td>100</td></tr><tr><td>Number of heads</td><td>Number of attention heads in Transformer</td><td>4</td><td>12</td><td>12</td><td>4</td></tr><tr><td>Number of layers</td><td>Number of Transformer encoder layers</td><td>2</td><td>1</td><td>1</td><td>2</td></tr><tr><td>Model dimension</td><td>Dimension of the embedding space</td><td>64</td><td>64</td><td>64</td><td>64</td></tr><tr><td>Sequence length</td><td>Number of time steps in each input sequence</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>GRU units</td><td>Number of units in the GRU layer</td><td>128</td><td>128</td><td>128</td><td>128</td></tr><tr><td>Batch size</td><td>Number of samples processed per update</td><td>32</td><td>32</td><td>32</td><td>32</td></tr><tr><td>Dropout</td><td>Dropout rate for regularization</td><td>0.2</td><td>0.1</td><td>0.1</td><td>0.2</td></tr><tr><td>Patience</td><td>Epochs with no improvement before early stopping</td><td>10</td><td>10</td><td>10</td><td>20</td></tr></tbody></table>

load profiles, environmental conditions, and usage histories, resulting in distinct degradation patterns. Hyperparameter optimization per PEMFC ensures that the model captures these specific temporal characteristics and achieves optimal predictive performance for each case. The key parameters of the Transformer-GRU model, along with their corresponding values, are summarized in Table 4. In our experiments, 80% of the data was used for training, while the remaining 20% was reserved for testing.

### 4.3. Model evaluation metrics

To evaluate the performance of the predictive model, several widely adopted statistical metrics are utilized [36], including the Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). These metrics are defined as follows:

$$RMSE = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (y_i - p_i)^2} \qquad (7)$$

$$MAE = \frac{1}{N} \sum_{i=1}^{N} |y_i - p_i| \qquad (8)$$

$$MAPE = \frac{100}{N} \sum_{i=1}^{N} \frac{|y_i - p_i|}{|y_i|} \qquad (9)$$

In these expressions, $y_i$ and $p_i$ represent the actual and predicted HI at time $t$, respectively. $N$ denotes the total number of observations.

## 5. Results and discussions

In this section, we present the experimental results obtained using real-world data from four distinct PEMFCs operating under dynamic conditions in GEH2 systems. The analysis is organized into four parts: (1) a comparative evaluation of the proposed XGBUGressor HI against Raw Voltage and RPLR as HIs; (2) the results of cross-validation and a benchmarking study with state-of-the-art models; (3) an ablation study to evaluate the role of each component; and (4) an interpretability analysis of the proposed framework.

The benchmark methods include:

* LSTM (Long Short-Term Memory): A recurrent neural network (RNN) variant designed to learn long-term temporal dependencies in sequential data by using memory cells and gating mechanisms to mitigate the vanishing gradient problem [10].

* TCN (Temporal Convolutional Network): A convolution-based architecture that uses dilated causal convolutions and residual connections to model long-range dependencies in time-series data more efficiently than traditional RNNs [17].

* MSTCN (Multi-Scale Temporal Convolutional Network): An extension of TCN that captures temporal patterns at multiple scales by employing parallel convolutional branches with different receptive fields [37].

* Transformer: A self-attention-based model originally developed for natural language processing, capable of modeling long-range dependencies without recurrence, and recently adapted for time-series forecasting tasks [13].

* CNN-BiLSTM (Convolutional Neural Network with Bidirectional LSTM): A hybrid model that combines convolutional layers with bidirectional LSTMs to capture forward and backward temporal dependencies. The CNN component enhances robustness to noise and highlights short-term dynamics, while the BiLSTM improves the modeling of long-term and contextual dependencies in sequential signals [16].

* BiGRU (Bidirectional Gated Recurrent Unit): A simplified recurrent architecture compared to LSTM, designed to handle temporal dependencies with fewer parameters by using reset and update gates. The bidirectional structure allows the model to capture information from both past and future time steps, improving predictive performance in time-series tasks with moderate complexity [38].

* De-stationary Crossformer: A transformer-based architecture designed for non-stationary and multidimensional time series. It incorporates adaptive normalization to mitigate non-stationarity, a non-stationary attention mechanism to leverage varying temporal patterns, and optional handcrafted statistical features to improve predictive performance [22].

* TCN-iTransformer: A hybrid model combining Temporal Convolutional Networks (TCN) with an improved transformer (iTransformer), enhanced by discrete cosine transform (DCT) and channel attention. The architecture captures both local and global temporal dependencies and dynamically weights feature channels for better sequence modeling [21].

Before presenting the prediction results obtained with the proposed framework, we first compare the effectiveness of different methods, namely: raw voltage, Relative Power-Loss Rate (RPLR), and the proposed HI extracted with an XGBUGressor.

### 5.1. Comparative analysis of health indicators

A Comparative evolution of Raw Voltage, RPLR, and XGBUGressor-based Health Indicator is shown in Fig. 4. The comparative analysis highlights substantial differences in predictive performance across the four PEMFC units. As shown in Table 5, the proposed XGBUGressor-based HI indicator consistently achieves the lowest RMSE, MAE, and MAPE values for PEMFC62, PEMFC63, and PEMFC01, indicating superior robustness and generalizability under dynamic operating conditions. In contrast, the Relative Power-Loss Rate (RPLR) exhibits excellent performance for PEMFC52, achieving the lowest errors among all HIs; however, its effectiveness is not consistently replicated across the other PEMFCs, suggesting limited generalizability. The raw voltage, although straightforward, yields the highest prediction errors, particularly for PEMFC52, underscoring the need for processed or extracted indicators to reliably capture degradation trends. Overall, these results confirm that the HI-XGBUGressor provides a more reliable and adaptive representation of fuel cell degradation, supporting
<figure><img src="image_6.png" /><figcaption>Fig. 4. Comparative evolution of Raw Voltage, RPLR, and XGBregressor-based Health Indicator.</figcaption></figure>

<table><caption>**Table 5**

Prediction performance of the Transformer-GRU model using different Health Indicators.</caption><thead><tr><th rowspan="2">Health Indicator</th><th colspan="3">PEMFC62</th><th colspan="3">PEMFC63</th><th colspan="3">PEMFC52</th><th colspan="3">PEMFC01</th></tr><tr><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th></tr></thead><tbody><tr><td>Raw voltage</td><td>0.0591</td><td>0.0418</td><td>0.28%</td><td>0.0925</td><td>0.0715</td><td>0.43%</td><td>0.1018</td><td>0.0762</td><td>2.79%</td><td>0.1305</td><td>0.1030</td><td>0.85%</td></tr><tr><td>RPLR</td><td>0.0556</td><td>0.0366</td><td>1.75%</td><td>0.0681</td><td>0.0484</td><td>2.34%</td><td><strong>0.0205</strong></td><td><strong>0.0142</strong></td><td><strong>0.23%</strong></td><td>0.0691</td><td>0.0494</td><td>2.39%</td></tr><tr><td>HI-XGBregressor</td><td><strong>0.0151</strong></td><td><strong>0.0098</strong></td><td><strong>0.05%</strong></td><td><strong>0.0387</strong></td><td><strong>0.0312</strong></td><td><strong>0.15%</strong></td><td>0.0517</td><td>0.0435</td><td>0.37%</td><td><strong>0.0617</strong></td><td><strong>0.0438</strong></td><td><strong>0.22%</strong></td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>Fig. 5. Proposed model performance evaluated via 5-fold cross-validation. Error bars indicate ±1 standard deviation.</figcaption></figure>

accurate RUL predictions across heterogeneous units and operating regimes.

In the following section, we present the prediction results obtained with the proposed framework and provide a comparative analysis against the benchmark methods introduced previously.

## 5.2. Analysis and comparison of prediction results

A 5-fold cross-validation was performed across the four PEMFC datasets, and the results are presented in Fig. 5. As expected, the error metrics exhibit relatively high values and substantial standard
<table><caption>**Table 6**
Comparison of prediction performance between the proposed method and benchmark models on four PEMFC datasets.</caption><thead><tr><th rowspan="2">Method</th><th colspan="3">PEMFC62</th><th colspan="3">PEMFC63</th><th colspan="3">PEMFC52</th><th colspan="3">PEMFC01</th></tr><tr><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th></tr></thead><tbody><tr><td>LSTM</td><td>0.0524</td><td>0.0471</td><td>0.23%</td><td>0.0870</td><td>0.0625</td><td>0.31%</td><td>0.0700</td><td>0.0537</td><td>0.46%</td><td>0.0977</td><td>0.0828</td><td>0.41%</td></tr><tr><td>TCN</td><td>0.0453</td><td>0.0421</td><td>0.21%</td><td>0.0963</td><td>0.0814</td><td>0.40%</td><td>0.1465</td><td>0.1317</td><td>1.13%</td><td>0.1459</td><td>0.1232</td><td>0.62%</td></tr><tr><td>MSTCN</td><td>0.0385</td><td>0.0359</td><td>0.18%</td><td>0.0692</td><td>0.0576</td><td>0.28%</td><td>0.0966</td><td>0.0829</td><td>0.71%</td><td>0.0785</td><td>0.0569</td><td>0.27%</td></tr><tr><td>Transformer</td><td>0.0579</td><td>0.0553</td><td>0.27%</td><td>0.0958</td><td>0.0865</td><td>0.42%</td><td>0.1044</td><td>0.0871</td><td>0.75%</td><td>0.1050</td><td>0.0829</td><td>0.41%</td></tr><tr><td>CNN-BiLSTM</td><td>0.0209</td><td>0.0166</td><td>0.08%</td><td>0.0627</td><td>0.0502</td><td>0.24%</td><td>0.1380</td><td>0.1000</td><td>1.02%</td><td>0.0713</td><td>0.0532</td><td>0.26%</td></tr><tr><td>BiGRU</td><td>0.0315</td><td>0.0248</td><td>0.12%</td><td>0.0489</td><td>0.0378</td><td>0.18%</td><td>0.1877</td><td>0.1359</td><td>1.37%</td><td>0.1528</td><td>0.1344</td><td>0.67%</td></tr><tr><td>De-stationary Crossformer</td><td>0.0225</td><td>0.0187</td><td>0.09%</td><td>0.0543</td><td>0.0432</td><td>0.20%</td><td>0.0850</td><td>0.0654</td><td>0.55%</td><td>0.0682</td><td>0.0550</td><td>0.29%</td></tr><tr><td>TCN-iTransformer</td><td>0.0251</td><td>0.0208</td><td>0.11%</td><td>0.0578</td><td>0.0467</td><td>0.22%</td><td>0.0905</td><td>0.0721</td><td>0.60%</td><td>0.0725</td><td>0.0583</td><td>0.31%</td></tr><tr><td><strong>Proposed Method</strong></td><td><strong>0.0151</strong></td><td><strong>0.0098</strong></td><td><strong>0.05%</strong></td><td><strong>0.0387</strong></td><td><strong>0.0312</strong></td><td><strong>0.15%</strong></td><td><strong>0.0517</strong></td><td><strong>0.0435</strong></td><td><strong>0.37%</strong></td><td><strong>0.0617</strong></td><td><strong>0.0438</strong></td><td><strong>0.22%</strong></td></tr></tbody></table>

<figure><img src="image_8.png" /><figcaption>**Fig. 6.** Comparison of RMSE, MAE, and MAPE between the proposed method and benchmark methods across the four PEMFCs.</figcaption></figure>

deviations for all PEMFCs. This behavior arises because dividing the time-series data into folds disrupts the continuous degradation trajectory: each fold may not fully capture the progressive aging of the fuel cell. Given that the operating duration of each PEMFC is approximately 3000 h, splitting the data prevents the model from observing the complete degradation trend within each fold, which naturally leads to higher variability in the metrics. To address this limitation, we adopt an 80/20 train-test split in the subsequent analysis, preserving the temporal sequence of the data, and repeat the prediction 15 times. This procedure enables us to assess the model's stability and generate reliable confidence intervals for the RUL predictions.

The numerical results for each PEMFC are summarized in Table 6, while Fig. 6 provides a visual comparison of the methods, including error bars, to highlight the best-performing approach for each case with gold stars.

The proposed method consistently outperforms all benchmark methods across all four PEMFC test cases in terms of RMSE, MAE, and MAPE. The performance gains are both significant and uniform, with the proposed approach achieving notably lower error levels compared to the most competitive benchmarks for each case. On PEMFC62, the proposed method achieves the best results by a large margin, surpassing the second-best model, MSTCN, by over 60% in RMSE, while also showing strong improvements in MAE and MAPE. Similar trends are observed for PEMFC63, where the proposed model reduces RMSE by over 44% compared to MSTCN, confirming its consistent superiority across different degradation profiles. On PEMFC52, characterized by more variable degradation patterns, the proposed method still achieves the lowest errors, outperforming LSTM, the best benchmark for this unit. Even in the challenging case of PEMFC01, the method delivers the lowest errors, exceeding CNN-BiLSTM, the previous top performer. These first
<figure><img src="image_9.png" /><figcaption>Fig. 7. Curves of prediction results for PEMFC62, PEMFC63, and PEMFC52 using the proposed method with 95% confidence interval.</figcaption></figure>

analyses demonstrate the robustness and generalization capability of the proposed architecture across different PEMFCs under dynamic operating conditions.

Among the benchmark methods, CNN-BiLSTM generally outperforms the other approaches for PEMFC62 and PEMFC01, while BiGRU achieves better results for PEMFC63, and LSTM performs best for PEMFC52. This observation suggests that convolutional architectures combined with BiLSTM are particularly effective at capturing local temporal patterns and subtle fluctuations in degradation dynamics, which are prominent in PEMFC62 and PEMFC01. On the other hand, BiGRU's strong performance on PEMFC63 indicates that gated recurrent units can effectively model longer-range dependencies in sequences with moderate variability. LSTM's success on PEMFC52 highlights its ability to track gradual degradation trends over time. De-stationary Crossformer and TCN-iTransformer provide improvements over classical benchmarks in several cases. De-stationary Crossformer demonstrates its strength and achieves competitive performance on PEMFC62 and PEMFC01, but it still falls short of the proposed method. Similarly, TCN-iTransformer, which combines temporal convolutional modeling with attention mechanisms, offers robust results across all PEMFCs, particularly on PEMFC63 and PEMFC52, outperforming conventional TCN and Transformer models. However, despite these successes on individual PEMFCs, none of these benchmark methods exhibit consistent performance across all four fuel cells. This variability underscores a limitation in generalization: models that excel on one PEMFC may perform poorly on another, likely due to differences in operating conditions, load profiles, and degradation patterns. By comparison, the proposed Transformer-GRU framework demonstrates robust accuracy across all PEMFCs, combining the strengths of attention mechanisms and recurrent modeling to effectively capture long-term dependencies.

All methods, including the proposed approach, exhibit varying degrees of predictive performance across the four PEMFCs, reflecting in-

herent differences in their degradation dynamics. The lowest overall prediction errors are observed for PEMFC62, followed by PEMFC63. In contrast, PEMFC52 and PEMFC01 consistently yield the highest errors across all models, indicating a more complex or variable degradation behavior. The performance gap between the proposed method and the benchmarks is most evident in PEMFC62, where the hybrid architecture demonstrates significantly improved accuracy. In contrast, for PEMFC52 and PEMFC01, all models face greater challenges, as evidenced by the higher MAPE values, suggesting that these units exhibit more complex and fluctuating degradation patterns, as shown in Fig. 7.

Overall, the proposed method achieves consistently low error values across all four test cells, representing prediction accuracy that would be highly valuable in practical applications. Such precision enables more reliable maintenance scheduling and operational planning for PEMFC systems. The consistent superiority of the proposed method across different fuel cells and multiple evaluation metrics demonstrates its robustness and generalizability, suggesting that it effectively captures the underlying degradation mechanisms of PEMFCs regardless of their specific operational characteristics or degradation patterns. The proposed method significantly advances the state-of-the-art in PEMFC RUL prediction, offering substantially improved accuracy that could translate to meaningful economic and operational benefits in real-world fuel cell applications.

It is worth noting that the data for each PEMFC originates from a different GEH2 unit, each operating under distinct dynamic conditions. This diversity allows us to partially evaluate the robustness of the proposed framework across varying operational profiles. However, despite these differences, all PEMFCs share similar system architecture and nominal specifications. Consequently, while the current results demonstrate strong predictive performance and generalization within this set of industrial units, further validation on additional datasets, potentially from PEMFCs with different designs, operating strategies, or
<table><caption>**Table 7**
RMSE, MAE, and MAPE results for ablation studies.</caption><thead><tr><th rowspan="2"></th><th colspan="3">PEMFC62</th><th colspan="3">PEMFC63</th><th colspan="3">PEMFC52</th><th colspan="3">PEMFC01</th></tr><tr><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th><th>RMSE</th><th>MAE</th><th>MAPE</th></tr></thead><tbody><tr><th>Transformer</th><td>0.0579</td><td>0.0553</td><td>0.27%</td><td>0.0958</td><td>0.0865</td><td>0.42%</td><td>0.1044</td><td>0.0871</td><td>0.75%</td><td>0.1050</td><td>0.0829</td><td>0.41%</td></tr><tr><th>GRU</th><td>0.0959</td><td>0.0895</td><td>0.43%</td><td>0.3161</td><td>0.3107</td><td>1.52%</td><td>0.1806</td><td>0.1750</td><td>1.67%</td><td>0.1916</td><td>0.1803</td><td>0.91%</td></tr><tr><th>Transformer-GRU</th><td><strong>0.0151</strong></td><td><strong>0.0098</strong></td><td><strong>0.05%</strong></td><td><strong>0.0387</strong></td><td><strong>0.0312</strong></td><td><strong>0.15%</strong></td><td><strong>0.0517</strong></td><td><strong>0.0435</strong></td><td><strong>0.37%</strong></td><td><strong>0.0700</strong></td><td><strong>0.0506</strong></td><td><strong>0.25%</strong></td></tr></tbody></table>

environmental conditions, would be valuable to confirm the broader applicability and robustness of the model.

### 5.3. Ablation studies

To assess the effect of different architectural components on model performance, ablation experiments were performed on the four PEMFC datasets. Three configurations were evaluated: the Transformer alone, the GRU alone, and the hybrid Transformer-GRU architecture. Table 7 reports the RMSE, MAE, and MAPE for each configuration across all PEMFCs. Additionally, Fig. 8 illustrates the performance gains of the hybrid model relative to the individual Transformer and GRU, highlighting the improvements achieved by combining both components.

The ablation study results demonstrate the superior performance of the proposed hybrid Transformer-GRU architecture compared to its individual components across all four PEMFC datasets. The standalone Transformer model exhibits moderate performance, with RMSE values ranging from 0.0579 to 0.1050. In contrast, the GRU model consistently underperforms, displaying significantly higher error rates, particularly evident in PEMFC63, where the RMSE reaches 0.3161. Most notably, the hybrid Transformer-GRU architecture achieves substantial performance improvements across all PEMFCs. The synergistic effect of combining both architectures is particularly pronounced in the MAE and MAPE metrics, where the hybrid model consistently achieves the lowest error rates across all datasets, with MAPE values as low as 0.05% for PEMFC62 and never exceeding 0.37% across all PEMFCs. The performance disparity between individual components reveals that while the Transformer excels at capturing long-range temporal dependencies in the degradation patterns, the GRU struggles with the sequential nature of the RUL prediction task, especially for datasets with more complex degradation behaviors such as PEMFC01. However, the hybrid architecture effectively leverages the Transformer's attention mechanism for feature extraction while utilizing the GRU's recurrent structure for temporal modeling, resulting in a complementary relationship that significantly enhances predictive accuracy. As illustrated in Fig. 8, the consistent improvements achieved by the Transformer-GRU model across all metrics and datasets validate the architectural design choice and demonstrate that the integration of both components creates a more robust and accurate RUL prediction framework than either component operating independently.

### 5.4. Explainable AI analysis: Feature importance and sensitivity

To better understand and interpret the predictions of the proposed model for the different PEMFC units, we employed two explainable AI techniques: Integrated Gradients (IG) and Sensitivity Analysis.

Integrated Gradients estimates the contribution of each input feature to a model's prediction by comparing the model's output for the actual input against a baseline (e.g., zero values or mean operating conditions). The method constructs a straight-line path from the baseline $x'$ to the actual input $x$ and computes the gradient of the model's output with respect to the inputs along this path. The average of these gradients is then multiplied by the difference $(x - x')$ to obtain the final attribution score:

$$ IG_i(x) = (x_i - x'_i) \times \int_{a=0}^{1} \frac{\partial F(x' + \alpha(x - x'))}{\partial x_i} d\alpha, \quad (10) $$

Where $F$ is the model's prediction function and $IG_i(x)$ represents the importance of feature $i$ for the specific prediction. This approach satisfies key axioms such as sensitivity and implementation invariance, ensuring that the attributions are both theoretically sound and faithful to the model's behavior [39].

Sensitivity Analysis complements IG by evaluating local responsiveness rather than cumulative attribution. For each feature, a small additive noise proportional to its standard deviation is introduced, and the change in the model's output is measured [40]. While IG provides a global path-based attribution from baseline to input, Sensitivity Analysis reveals how minor perturbations around the current input affect the prediction, offering a local perspective on model behavior.

Fig. 9 presents the IG and sensitivity scores for each feature across the four PEMFCs. All scores were normalized to facilitate cross-comparison, with values ranging from 0 (minimal importance) to 1 (maximal importance) within each PEMFC-method combination.

A remarkable observation across the four PEMFCs is the varying influence of temporal versus operational features. In PEMFC52 and PEMFC63, Time emerges as the most influential variable according to both Integrated Gradients and sensitivity metrics, suggesting that these units follow more predictable, time-dependent degradation trajectories. By contrast, PEMFC62 and PEMFC01 show markedly lower dependence on temporal progression. Instead, inlet temperature (FCL_TEMP) dominates in PEMFC62, while hydrogen pressure (PHL) is the key driver in PEMFC01. This contrast suggests a fundamentally different degradation mechanism in these two units, where real-time operating conditions exert greater influence than cumulative operating duration.

Thermal parameters exhibit distinct patterns of importance across the fuel cells. In PEMFC52, the outlet temperature (FCO_TEMP) shows high importance relative to inlet temperature, indicating that internal thermal gradients and heat accumulation within the stack play a significant role in degradation. Conversely, PEMFC62 reveals the opposite pattern: inlet temperature emerges as the most critical factor, while outlet temperature has minimal relevance. This suggests that PEMFC62 may be particularly sensitive to upstream thermal conditions. For PEMFC01, thermal parameters have only a weak influence overall, indicating that other variables are primary degradation drivers. In PEMFC63, both inlet and outlet temperatures are highly influential, with FCO_TEMP reaching especially high attribution scores. This highlights that degradation in PEMFC63 is highly responsive to thermal dynamics across the entire fuel cell stack. These inter-stack variations in thermal sensitivity are consistent with prior studies that have established temperature distribution as a key contributor to membrane degradation rates [41].

For the current (IFC), all four PEMFCs display low to moderate importance scores, indicating that current fluctuations are not primary drivers of degradation. This is consistent with the modeling context, in which the PEMFC power was fixed at a nominal value during the extraction of the health indicator, thereby minimizing the direct impact of current variability. However, despite their limited direct importance, PEMFC62 and PEMFC63 exhibit notably high sensitivity to current variations. This discrepancy suggests that, although current may not play a
<figure><img src="image_10.png" /><figcaption>Fig. 8. Percentage improvement of the proposed model Transformer-GRU compared to individual models.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 9. Integrated gradient and sensitivity scores for each feature across the four PEMFC units.</figcaption></figure>

dominant role in long-term degradation trends, it exerts a substantial influence on the model's local predictions. Such high sensitivity could indicate an indirect role, where the current interacts with other operational parameters, such as temperature or pressure, to modulate transient conditions that contribute to degradation.

The air flow rate (QAF) exhibits contrasting behaviors across the different PEMFCs. In PEMFC52, it demonstrates moderate importance but low sensitivity, suggesting a relatively stable influence on the degradation process. By contrast, in PEMFC62, QAF shows high sensitivity despite its low overall importance, indicating potential nonlinear interactions with other operational variables that can compromise prediction stability under dynamic conditions. Pressure-related features (PAFIC and PHL) display consistently moderate importance across most PEMFCs, except in PEMFC01, where PHL emerges as the most influential

factor in the degradation process. Notably, in PEMFC63, hydrogen line pressure (PHL) exhibits markedly higher sensitivity, underscoring this unit's particular vulnerability to fluctuations in hydrogen supply.

The insights derived from the explainable AI analysis reveal critical implications for RUL prediction accuracy and targeted maintenance strategies in PEMFCs. Despite identical nominal specifications, the four PEMFCs exhibit distinct degradation mechanisms driven by dynamic operating conditions, as evidenced by divergent feature importance and sensitivity patterns. These findings underscore the necessity of adaptive monitoring to account for operational variability. For instance, PEMFC62 demonstrates a strong reliance on inlet temperature, suggesting that thermal management systems should prioritize stabilizing upstream cooling to mitigate degradation. In contrast, PEMFC52 and PEMFC63 exhibit a heightened dependence on outlet temperature,
suggesting that degradation in these units is more closely tied to stack heat dissipation. Meanwhile, PEMFC01 exhibits a pronounced dependence on hydrogen pressure, highlighting the critical role of stable fuel supply in sustaining performance. This suggests that monitoring and controlling hydrogen line pressure should be a priority for predictive maintenance in PEMFC01 to prevent accelerated degradation.

## 6. Conclusion

In this study, we addressed the critical challenge of accurate RUL prediction for PEMFCs operating under real-world dynamic conditions, as found in GEH2 electro-hydrogen generators. Traditional health indicators based on raw voltage or power signals often fail to generalize under such variable regimes. To overcome this limitation, we proposed a simple yet effective method using XGB regressor to extract a robust HI from voltage measurements. This HI successfully captures long-term degradation trends while being resilient to short-term operational fluctuations.

Building upon this foundation, we introduced a Transformer-GRU deep learning architecture that leverages the strengths of both attention mechanisms and recurrent dynamics. This architecture demonstrated superior performance in modeling the temporal degradation behavior of PEMFCs, outperforming a suite of state-of-the-art models across multiple metrics. The model's predictive accuracy and generalization capabilities were validated on a diverse industrial dataset collected from four PEMFCs in dynamic mission profiles.

Beyond predictive performance, the interpretability of our model was explored using Integrated Gradients and Sensitivity Analysis. This provided valuable insights into how different operational and temporal features contribute to the RUL predictions, revealing stack-specific degradation behaviors and enabling targeted monitoring strategies.

Overall, the proposed framework represents a significant advancement in the domain of PEMFC predictive maintenance. Unlike many existing approaches that struggle with the variability introduced by real-world mission profiles, our method demonstrates strong adaptation across diverse and dynamic operating conditions. By leveraging a machine learning-based pipeline that integrates robust HI extraction and a deep learning architecture, the framework enables accurate, interpretable, and scalable RUL predictions. This ability to adapt to non-stationary environments makes it highly suitable for deployment in industrial settings, particularly those reflecting typical client usage scenarios.

For future work, we plan to extend the validation of the proposed framework to a wider range of PEMFC units, including systems with different architectures, operating strategies, and environmental conditions. This will help assess the generalizability and robustness of the method across diverse platforms. Additionally, incorporating real-time adaptive learning and online degradation monitoring could further enhance the predictive accuracy and practical applicability of the model in industrial settings.

## CRediT authorship contribution statement

**Soufian Echabarrí:** Writing – review & editing, Writing – original draft, Methodology, Investigation, Conceptualization; **Phuc Do:** Writing – review & editing, Writing – original draft, Visualization, Supervision, Methodology, Funding acquisition; **Hai-Canh Vu:** Writing – review & editing, Writing – original draft, Supervision, Methodology; **Pierre-Yves Liegeois:** Validation, Supervision, Funding acquisition, Data curation.

## Data availability

The data that has been used is confidential.

## Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

## Acknowledgment

This work was financed in part by the ANRT (Association nationale de la recherche et de la technologie) with a CIFRE n° 2023/0482.

## References

[1] Wee J-H. Applications of proton exchange membrane fuel cell systems. Renew Sustainable Energy Rev 2007;11(8):1720-38.

[2] Hua Z, Zheng Z, Pahon E, Péra M-C, Gao F. Remaining useful life prediction of PEMFC systems under dynamic operating conditions. Energy Convers Manage 2021;231:113825.

[3] Hua Z, Zheng Z, Pahon E, Péra MC, Gao F. Remaining useful life prediction of PEMFC systems under dynamic operating conditions. Energy Policy 2021;231:113825.

[4] Chen J, Zhou D, Lyu C, Lu C. A novel health indicator for PEMFC state of health estimation and remaining useful life prediction. Int J Hydrogen Energy 2017;42:20230-8.

[5] Li K, Hong J, Zhang C, Liang F, Yang H, Ma F. Health state monitoring and predicting of proton exchange membrane fuel cells: a review. J Power Sources 2024;612:234828.

[6] Zhang T, Hou Z, Li X, Chen Q, Wang Q. A novel multivariable prognostic approach for PEMFC degradation and remaining useful life prediction using random forest and temporal convolutional network 2025;385:125569.

[7] Hua Z, Zheng Z, Pahon E, Péra MC. Health indicators for PEMFC systems life prediction under both static and dynamic operating conditions. IECON 2020 the 46th annual conference of the IEEE industrial electronics society 2020;3963-8.

[8] Yu Y, Yu Q, Luo RS, Chen S, Yang J, Yan F. A predictive framework for PEMFC dynamic load performance degradation based on feature parameter analysis. Int J Hydrogen Energy 2024;71:1090-103.

[9] Tian Q, Chen H, Ding S, Shu L, Wang L, Huang J. Remaining useful life prediction method of PEM fuel cells based on a hybrid model. Electronics 2023;12(18): 3883.

[10] Liu J, Li Q, Chen W, Yan Y, Qiu Y, Cao T. Remaining useful life prediction of PEMFC based on long short-term memory recurrent neural networks. Int J Hydrogen Energy 2019;44(11):5470-80.

[11] Ma T, Xu J, Li R, Yao N, Yang Y. Online short-term remaining useful life prediction of fuel cell vehicles based on cloud system. Energies 2021;14(10):2806.

[12] Xu Z, Zhang Y, Miao Q. An attention-based multi-scale temporal convolutional network for remaining useful life prediction. Reliab Eng Syst Saf 2024;250: 110288.

[13] Fu S, Zhang D, Xiao Y, Zheng C. A non-stationary transformer-based remaining useful life prediction method for proton exchange membrane fuel cells. Int J Hydrogen Energy 2024;60:1121-33.

[14] Kebede GA, Lo S-C, Wang F-K, Chou J-H. Transfer learning-based deep learning models for proton exchange membrane fuel remaining useful life prediction. Fuel 2024;367:131461.

[15] Yi F, Shu X, Zhou J, Zhang J, Feng C, Gong H. Remaining useful life prediction of PEMFC based on matrix long short-term memory. Int J Hydrogen Energy 2025;111:228-37.

[16] Guo Y, Xia F. A study on prediction of the remaining useful life of PEMFC based on data-driven CNN-BILSTM. In: Proceedings of the 3rd international conference on electronic information technology and smart agriculture. 2023. p. 228-35.

[17] Zhang T, Hou Z, Li X, Chen Q, Wang Q, Lüddeke C, et al. A novel multivariable prognostic approach for PEMFC degradation and remaining useful life prediction using random forest and temporal convolutional network. Appl Energy 2025;385:125569.

[18] He Y, Qiao L, Zio E, Su H, Zhang L, Yang Z, et al. A framework based on temporal causal inference graph neural networks for the probabilistic estimation of the remaining useful life of proton exchange membrane fuel cells. Reliab Eng Syst Saf 2025;265:111584.

[19] Xiong J, Zhou J, Ma Y, Zhang F, Lin C. Adaptive deep learning-based remaining useful life prediction framework for systems with multiple failure patterns. Reliab Eng Syst Saf 2023;235:109244.

[20] Li X, Hu Y, Wang H, Liu Y, Liu X, Lu H. A closed-form continuous-depth neural-based hybrid difference features re-representation network for RUL prediction. Reliab Eng Syst Saf 2025;253:110540.

[21] Liang X, Chen T, Lan Y, Dai H, Wen J. Lifetime prediction of a proton exchange membrane fuel cell via an improved TCN-ietransformer model. Fuel Cells 2025;25(5):e70027.

[22] Zhou N, Zeng H, Zheng Z, Wang K, Zhou J. PEMFC RUL prediction for non-stationary time series based on crossformer model. Appl Sci 2025;15(5):2515.

[23] Li Z, Zheng Z, Outib R. Adaptive prognostic of fuel cells by implementing ensemble echo state networks in time-varying model space. IEEE Trans Ind Electron 2019;67(1):379-89.

[24] Hua Z, Zheng Z, Pahon E, Péra M-C, Gao F. Health indicators for PEMFC systems life prediction under both static and dynamic operating conditions. In: IECON 2020
the 46th annual conference of the IEEE industrial electronics society. IEEE; 2020, p. 3963-8.

[25] Yang J, Chen L, Wu X, Deng P, Xue F, Xu X, et al. Remaining useful life prediction of vehicle-oriented PEMFCs based on seasonal trends and hybrid data-driven models under real-world traffic conditions. Renew Energy 2025;249:123193.

[26] Chen L, Yang J, Wu X, Deng P, Xu X, Peng Y. Remaining useful life prediction of PEMFCs based on mode decomposition and hybrid method under real-world traffic conditions. Energy 2025;314:134279.

[27] Wang C, Li Z, Outbib R, Dou M, Zhao D. Symbolic deep learning based prognostics for dynamic operating proton exchange membrane fuel cells. Appl Energy 2022;305:117918.

[28] He K, Liu Z, Sun Y, Mao L, Lu S. Degradation prediction of proton exchange membrane fuel cell using auto-encoder based health indicator and long short-term memory network. Int J Hydrogen Energy 2022;47(82):35055-67.

[29] Wang C, Dou M, Li Z, Outbib R, Zhao D, Zuo J, et al. Data-driven prognostics based on time-frequency analysis and symbolic recurrent neural network for fuel cells under dynamic load. Reliab Eng Syst Saf 2023;233:109123.

[30] Zhang X, He Z, Zhan Z, Han T. Performance degradation analysis and fault prognostics of solid oxide fuel cells using the data-driven method. Int J Hydrogen Energy 2021;46(35):18511-23.

[31] Yue M, Li Z, Roche R, Jemei S, Zerhouni N. Degradation identification and prognostics of proton exchange membrane fuel cell under dynamic load. Control Eng Pract 2022;118:104959.

[32] Zhang Y, Zhang C, Wang S, Dui H, Chen R. Health indicators for remaining useful life prediction of complex systems based on long short-term memory network and improved particle filter. Reliab Eng Syst Saf 2024;241:109666.

[33] Echabarri S, Do P, Vu H-C, Bornand B. Machine learning and bayesian optimization for performance prediction of proton-exchange membrane fuel cells. Energy AI 2024;17:100380.

[34] Meng X, Liu M, Mei J, Li X, Grigoriev S, Hasanien HM, et al. Polarization loss decomposition-based online health state estimation for proton exchange membrane fuel cells. Int J Hydrogen Energy 2025;157:150162.

[35] Korstanje J. Gradient boosting with XGBoost and lightGBM. In: Advanced forecasting with python: with state-of-the-art-models including LSTMs, facebook's prophet, and amazon's DeepAR. 2021, p. 193-205.

[36] Benaggoune K, Yue M, Jemei S, Zerhouni N. A data-driven method for multi-step-ahead prediction and long-term prognostics of proton exchange membrane fuel cell. Appl Energy 2022;313:118835.

[37] Deng F, Bi Y, Liu Y, Yang S. Remaining useful life prediction of machinery: a new multiscale temporal convolutional network framework. IEEE Trans Instrum Meas 2022;71:1-13.

[38] Zhang R, Chen T, Xiao F, Luo J. Bi-directional gated recurrent unit recurrent neural networks for failure prognosis of proton exchange membrane fuel cells. Int J Hydrogen Energy 2022;47(77):33027-38.

[39] Sundararajan M, Taly A, Yan Q. Axiomatic attribution for deep networks. In: International conference on machine learning. PMLR; 2017, p. 3319-28.

[40] Molnar C. Interpretable machine learning. Lulu.com; 2020.

[41] Zhao D, Gao F, Massonnat P, Dou M. Parameter sensitivity analysis and local temperature distribution effect for a PEMFC system. IEEE Trans Energy Convers 2015;30(3):1008-18.