**1. Introduction**

Owing to the global energy crisis and environmental pollution that humans face, fuel-cell technology has attracted more and more attention from researchers as well as commercial companies. With the advantages of clean, high energy efficiency, and low operating temperature [1,2], the proton-exchange-membrane fuel cell (PEMFC) has been considered as one of the most attractive energy devices for future power applications. However, the durability and the high cost of PEMFC have been the bottlenecks of its large-scale commercial deployment. During operation, the components of the fuel cell, including the proton-exchange-membrane (PEM), the bipolar plate, the gas diffusion layer (GDL), the catalyst layer, and a membrane will degrade due to different working conditions and load cycling [3]. The performance of PEMFC suffers from multiple failure mechanisms, such as conductivity loss, catalyst reaction activity, and mass transfer [4]. The performance of a PEMFC system is characterized by its efficiency and cyclability, which are highly influenced by membrane properties [5]. Shanmugam et al. [6] developed a new block copolymer membrane with a lower self-discharge rate. The cyclability with slight capacity decay showed its chemical stability for long-term operation. Rajput et al. [7] synthesized a graphene oxide composite membrane which has better mechanical and thermal stability. Furthermore, working under highly dynamic conditions, especially in automotive applications, will accelerate the aging process of PEMFC and increase the

**Citation:** Xia, Z.; Wang, Y.; Ma, L.; Zhu, Y.; Li, Y.; Tao, J.; Tian, G. A Hybrid Prognostic Method for Proton-Exchange-Membrane Fuel Cell with Decomposition Forecasting Framework Based on AEKF and LSTM. *Sensors* **2023**, *23*, 166. https://doi.org/10.3390/s23010166

Academic Editor: Chun Sing Lai

Received: 20 October 2022 Revised: 30 November 2022 Accepted: 14 December 2022 Published: 24 December 2022

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

probability of failure occurrence [8]. The International Energy Agency reported that the cost of commercial fuel cell stack is less than 10,000 USD/kW in 2017 [9]. The maintenance costs drastically decreased from 40 EUR Ct/kWh in 2012 to 20 EUR Ct/kWh in 2017.

The balance of plant (BOP), which mainly consists of an air-supply system, hydrogencirculation system, water-and-heat-management system and control system, maintains the stable and safe operation of the stack [10]. The degradation mechanism is too complicated to be fully understood with the current technology. To extend the fuel-cell lifetime and reduce its maintenance cost, the management and control strategy of the PEMFC has become a hot research topic. The prognostic method provides a potential solution to extending the PEMFC lifespan [11,12]. As the prerequisite for the maintenance of PEMFC, an effective prognostic method can estimate the state of health (SOH) of the fuel cell and predict the system's future evolution. By prognostic methods, the degradation process of PEMFC can be investigated and modeled [13] to guide the maintenance services of fuel cells before failures occur. The prognostic methods of PEMFC can generally be divided into three categories [2,14]: the model-based method, the data-based method, and the hybrid method.

The model-based method uses the mechanism degradation model or the empirical degradation model to realize the prognostics of PEMFC. The mechanism model adopts mathematical equations to describe the internal aging process, with the advantages of less training data and strong generality. However, it suffers from a large computational burden and a high complexity of the degradation mechanism [4,14]. Zhang and Pisu [15] built the catalyst degradation model to describe the relationship between operating conditions and the degradation rate of electrochemical surface area (ECSA). Dhanushkodi et al. [16] developed a diagnostic method to characterize the catalyst component durability. Based on the Pt/C catalyst degradation mechanism [17], Polverino and Pianese [18] proposed the dissolution-mechanism model and the Ostwald-ripening-mechanism model to estimate ECSA. However, the validity of the mechanism model needs to be verified by the experimental data, and the adjustment of model parameters depends on expert experience. The empirical degradation model with less computational burden is easier to deploy in online applications. Jouin et al. [19] proposed a PEMFC prognostic method based on logarithmic, polynomial, and exponential empirical equations. Bressel et al. [13] proposed a typical semi-empirical prognostic method that brings polarization curves into consideration. Li et al. [20] proposed an estimation algorithm for lithium-battery SOC in electric vehicles based on an adaptive unscented Kalman filter (AUKF). Zhang et al. [1] realized internal characterization-based prognostics for fuel cells based on a Markov-process algorithm.

Data-based methods can be conducted without considering the complex mechanism of PEMFC and can improve the prediction accuracy as long as sufficient monitoring data are available. Silva et al. [21] developed a long-term prediction model for PEMFC based on the adaptive neuro-fuzzy inference system (ANFIS). The wavelet decomposition is proposed in [22] to improve short-term prediction accuracy. In [23,24], the echo state network (ESN) is adopted for forecasting the degradation process. Ma et al. [25] adopted a long shortterm memory network (LSTM) to predict the degradation voltage, which identified the superiority of the LSTM network compared with the relevance vector machine (RVM) and the Elman network. Yang et al. [12] proposed an RUL prediction method for the bearing's degradation process based on LSTM. However, the data-based method suffers from poor generality in practical deployment and there is a shortage of training data because of the costly and time-consuming PEMFC aging test.

The hybrid method is established by combining the advantages of the model-based method and the data-based method through different strategies [26]. It is usually more accurate and robust than a single method at the cost of a more complex structure and a higher computational burden [2]. Peng et al. [11] realized the RUL estimation for a turbofan engine based on the convolutional neural networks (CNN) and long shortterm memory (LSTM) structures. Li et al. [27] used a linear-parameter-varying model to build the virtual stack voltage as the health indicator and the degradation trend was predicted by ensemble ESN. Ma et al. [28] fused the extended Kalman filter (EKF) and

LSTM algorithms to realize a more accurate prediction result. EKF is used to estimate the system state and then the prediction of LSTM is regarded as the observation for EKF. Based on ANFIS [21], Liu et al. [26] realized the long-term degradation trend prediction and the remaining useful life (RUL) estimation is achieved by AUKF. The membership function is optimized automatically by a particle swarm optimization (PSO) algorithm. The methods above mainly focus on developing new prediction structures. However, the long-term prediction accuracy of those methods still cannot meet expectations: the prediction effectiveness under automotive load cycling needs to be improved.

The voltage-recovery phenomenon occurs periodically after the characterization test and it significantly influences the prediction accuracy. The investigation into this phenomenon can reveal the aging process of fuel cells and support appropriate maintenance strategies. Jouin et al. [29] combined the global power-aging model and powerrecovery model based on the particle filter (PF) algorithm to forecast voltage degradation. Morando et al. [30] used the wavelet filter to decompose the stack voltage into two parts and make predictions based on ESN. With the introduction of the self-healing factor, Kimotho et al. [31] realized the prediction of the voltage-aging process after each characterization. Deng et al. [32] proposd a novel empirical model based on the PF algorithm for the remaining useful-life prediction of a lithium-ion battery. The authors separated the local degradation process from the global degradation process to capture the degradation and regeneration phenomena. Zhou et al. [33] divided the voltage data into stationary and non-stationary sequences. Then, the autoregressive and moving average (ARMA) model and time-delay neural network (TDNN) were utilized to predict the degradation voltage. However, the prediction of those models is not robust or accurate enough, as the voltage-recovery phenomenon possesses strong nonlinearity.

Since the PEMFC degradation-process mechanism has not been fully investigated yet, the model-based method's prediction accuracy cannot meet expectations. The data-based method cannot give a satisfying prediction with enough long-term forecasting horizon. Moreover, the voltage-recovery phenomenon is still a problem for most of the prognostic methods. Thus, it is of great significance to explore a hybrid method to combine the advantages of those two methods to better predict the PMEFC degradation process. In addition, the parameter-adjustment process requires a lot of manual intervention which is very time-consuming. Therefore, it is meaningful to realize model construction and hyperparameters optimization automatically.

A hybrid prognostic method for PEMFC based on the decomposition forecasting framework is proposed in this paper. Specifically, the original voltage data is decomposed into the calendar aging components and the reversible aging components based on the locally weighted regression method (LOESS). Then, we apply the calendar aging model based on an adaptive extended Kalman filter (AEKF) and the reversible aging model based on LSTM to predict the two voltage components, respectively. In this way, the aging process of the PEMFC, including the voltage-recovery phenomenon, can be better forecasted. The final predicted voltage is derived from the sum of the two predictions, and we can further realize RUL estimation. The main contributions of this paper are summarized as follows:


(3) The automatic machine-learning (AutoML) method based on the genetic algorithm is adopted to optimize the hyperparameters of the LSTM network automatically, which can improve the prediction accuracy and training efficiency.

The remaining contents of this paper are organized as follows. In Section 2, the decomposition forecasting framework is introduced, followed by the configurations of the AEKF model and the LSTM network. The prediction results and discussions of our method are presented in Section 3. Finally, the conclusion is summarized in Section 4.

#### **2. Methodology**

#### *2.1. The Decomposition Forecasting Framework*

The framework of the proposed hybrid prognostic method for PEMFC is shown in Figure 1. First of all, the original voltage data were decomposed into the calendar aging part and the reversible aging part by LOESS. Then, we established the calendar aging model based on the AEKF algorithm to predict the overall aging trend for PEMFC. The genetic algorithm was applied to identify the parameters of physical aging model from the polarization curve. The three-dimensional aging factors were introduced in physical aging model to better depict the degradation trend. Next, based on the LSTM network, we built the reversible aging model to capture the voltage-recovery information. AutoML approach was adopted in the training phase of LSTM for the hyperparameters tuning automatically. In addition, the iterative structure was utilized to realize long-term degradation forecasting [30]. The final prediction of the aging voltage can be obtained by combining the two predicted components and we can further realize RUL estimation.

**Figure 1.** The decomposition forecasting framework of the proposed hybrid method.

#### *2.2. Dataset Analysis*

The dataset we used in this paper comes from IEEE PHM 2014 Data Challenge [34], conducted and collected by FCLAB. The FC1 has a constant current of 70 A while 10% triangular current ripples with the frequency of 5 kHz are added to the 70 A current for FC2. The monitoring data were obtained during the aging test, including voltage, operating parameters, electrochemical impedance spectroscopy (EIS) measurement, and polarization curve. The test bench was adapted for 1 kW fuel cell stack. To master the fuel cells' running conditions accurately, the experimental operating parameters of the PEMFC can be regulated and measured as shown in Table 1. The gas-humidification subsystem is composed of the two boilers placed upon the stack. Air and hydrogen flow through respective boilers before reaching the stack. Only the air boiler is heated to obtain the required relative humidity. The hydrogen boiler is kept at room temperature due to the need for dry anode gas. The cooling water subsystem dominates the temperature of the stack. The stack voltage is selected as the health indicator of PEMFC degradation since it can be measured easily and it is suitable for online applications [33]. Since the degradation process of fuel cells is slow, the dataset was down-sampled with the interval of one hour to reduce the computational burden. Each considered fuel-cell stack consisted of five cells. The length of FC 1 and FC 2 are 991 h and 1020 h, respectively.


**Table 1.** PEMFC stack and experimental operating parameters.

In Figure 2, it is easy to see that the voltage always increases after the characterization test, which is marked by black circles. This is the voltage-recovery phenomenon mainly caused by the interruption of continuous testing during the rest periods [29]. During this time, the water content and distribution of the catalysts return to the previous state, which contributes to ECSA and the proton transfer. The interruption time for characterizations is scheduled weekly, at about 48 h, 185 h, 348 h, 515 h, 658 h, and 823 h for FC1 and 35 h, 182 h, 343 h, 515 h, 666 h, and 830 h for FC2. In addition, it can be noticed in Figure 2 that sudden voltage drops occurred in the dashed boxes, which are regarded as faults during the aging test.

**Figure 2.** The voltage-degradation curves of FC1 and FC2.

#### *2.3. Voltage Decomposition*

#### Locally Weighted Regression

Motivated by the idea of decomposition forecasting, the original voltage data is decomposed into the calendar aging part and the reversible aging part by LOESS. LOESS is a nonparametric method for regional regression analysis, which mainly divides the samples into small windows and performs polynomial fitting on them. Repeating this process continuously, we can finally obtain the regression curve. The points near the fitting point have a greater impact on the regression curve and the weight is constructed by the tricube weight function [35]. The weight of fitting points is defined as follows:

$$w\_i = \begin{cases} \left(1 - |\frac{x - x\_i}{\Delta(x)}|^3\right)^3, |\frac{x - x\_i}{\Delta(x)}| \le 1\\ 0, |\frac{x - x\_i}{\Delta(x)}| \ge 1 \end{cases} \tag{1}$$

where Δ(*x*) is the size of the window, *xi* is the fitting point, and *x* is the center of the window. The weighted regression can be carried out based on the weighted least-square method.

After the original voltage *Vst*(*t*) was filtered by LOESS, we could obtain the calendar aging component *Vc*(*t*). Then, the original voltage *Vst*(*t*) was subtracted from *Vc*(*t*) to obtain the reversible aging component *Vr*(*t*). Thus, the fuel-cell stack voltage can be divided into two parts:

$$V\_{st}(t) = V\_c(t) + V\_r(t) \tag{2}$$

As shown in Figure 3, we adopted an iterative structure to realize the long-term time series forecasting [30]. When forecasting *h* steps ahead, we used the value *y*ˆ*k*+<sup>1</sup> just forecasted by a one-step prediction model as part of the input variables for forecasting the next step, where *uk* represents the input. We continued in this manner until the desired prediction horizon was reached. In particular, prediction errors accumulated through this strategy, which may lead to a divergence in results [36].

**Figure 3.** Iterative structure.

*2.4. Calendar Aging Model Based on AEKF*

#### 2.4.1. Physical Aging Model

Previous studies have shown that the polarization curve changes regularly as the operation of PEMFC continues [37], which enables us to build a degradation model based on it. The empirical model of the polarization curve introduced in [13] can be expressed as Equation (3).

$$\begin{split} V\_c(t) &= N \left( E\_{\text{ocv}} - i(t)R - aT \ln \left( \frac{i(t)}{i\_0} \right) \\ &+ bT \ln \left( 1 - \frac{i(t)}{i\_L} \right) \right) \end{split} \tag{3}$$

where *Vc* is the calendar aging voltage, which represents the approximate part of the stack voltage, *N* is the number of cells, *i* is the stack current, *T* is the operation temperature, *a* is the Tafel constant, *b* is the concentration constant, *Eocv* is the open-circuit voltage, *R* is the total resistance, *i*<sup>0</sup> is the exchange current, and *iL* is the limiting current.

According to the study in [13], only *R* and *iL* vary with the operating time obviously during the aging test. Parameters *Eocv* and *i*<sup>0</sup> changed a little, so they can be assumed as constant values. The increase in *R* may result from the polymer membrane's degradation and the plates' corrosion [38]. The decrease in *iL* is related to the ripening of the platinum particles and poor hydrophobicity of GDL, which accounts for the reduction in the mass transfer [39]. Therefore, an aging factor *α* is introduced to describe the change in the aging parameters (*R* and *iL*), since they have similar change speeds [13,26]. The empirical aging parameters can be expressed by Equation (4):

$$\begin{cases} R = R\_0(1 + \alpha(t)) \\ i\_L = i\_{L0}(1 - \alpha(t)) \\ \alpha(t) = \beta t, \beta(t) = \gamma t \end{cases} \tag{4}$$

where *α*(*t*) represents the degradation state of the fuel cell, *β*(*t*) represents the fuel-cell degradation rate, and *γ*(*t*) is the derivative of *β*(*t*). We notice that a constant *β*(*t*) will lead to a linear change in the degradation state *α*(*t*), which will reduce the prediction accuracy of the model. Therefore, we introduced another factor, *γ*(*t*), so that the degradation rate *β*(*t*) can change with time to better forecast the variation in the aging trend. As a result, the three-dimensional aging factors consist of *α*(*t*), *β*(*t*), and *γ*(*t*).

Combining Equations (3) and (4), we can obtain the expression of the physical aging model as follows:

$$\begin{split} V\_{\varepsilon}(t) &= N \left( E\_{0\varepsilon\upsilon} - R\_0 (1 + a(t)) i(t) - aT \ln \left( \frac{i(t)}{i\_0} \right) \right) \\ &+ bT \ln \left( 1 - \frac{i(t)}{i\_{L0} (1 - a(t))} \right) \end{split} \tag{5}$$

The degradation process of a fuel cell is nonlinear and can be expressed as Equation (6):

$$\begin{cases} \ x\_k = f(x\_{k-1}) + w\_{k-1} \\ \ y\_k = g(x\_k, u\_k) + v\_k \end{cases} \tag{6}$$

where *xk* is the aging state at *k*th sampling time, *uk*−<sup>1</sup> is the input(current), *yk* is the system output (stack voltage), *wk* and *vk* represent the process and measurement noises which are assumed to obey Gaussian distribution with zero mean and variances of Q and R, and *f*(·) and *g*(·) are functions used to describe the degradation model.

To better forecast the aging trend of PEMFC, here we introduce three-dimensional aging factors which can be expressed as Equation (7):

$$\mathbf{x}\_k = [\mathbf{a}\_{k'} \boldsymbol{\beta}\_{k'} \boldsymbol{\gamma}\_k]^T \tag{7}$$

where *α<sup>k</sup>* is the value of degradation state at *k*th sampling time, *β<sup>k</sup>* is the degradation rate at *k*th sampling time, and *γ<sup>k</sup>* is the derivative of *β*. Since *uk* = *ik*, *yk* = *Vc*,*k*, the discrete time-state-space equation for PEMFC can be expressed as follows:

$$\begin{cases} \begin{bmatrix} \alpha\_k\\ \beta\_k\\ \gamma\_k \end{bmatrix} = \begin{bmatrix} 1 & \Delta t & 0\\ 0 & 1 & \Delta t\\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \alpha\_{k-1}\\ \beta\_{k-1}\\ \gamma\_{k-1} \end{bmatrix} + w\_{k-1} \\\ y\_k = N \cdot \left[ \begin{bmatrix} E\_{\alpha \upsilon} - R\_0(1 + a\_k)i\_k - aT \ln\left(\frac{i\_k}{i\_0}\right) \end{bmatrix} \right. \\\ \left. \quad + bT \ln\left(1 - \frac{i\_k}{i\_{L0}(1 - a\_k)}\right) \right] + v\_k \end{cases} \tag{8}$$

where Δ*t* represents the sample period. Here, the parameters, including *Eocv*, *R*0, *a*, *b*, *i*0, and *iL*0, need to be identified to initialize our calendar aging model.

In order to avoid overfitting, Akaike information criterion (AIC) can be used to measure the fitting results of the proposed model [40]. In general, AIC can be expressed as:

$$AIC = 2k - 2\ln(L) \tag{9}$$

where *k* is the number of parameters and *L* is the likelihood function.

Let *n* be the number of observations and *SSR* represent the sum of the squares of the residuals; then, AIC becomes:

$$AIC = 2k + n \ln(SSR/n) \tag{10}$$

$$SSR = \sum \left( y\_i - \hat{y}\_i \right)^2 \tag{11}$$

AIC criterion is used to judge the goodness and the efficiency of the degradation models with two and three parameters (i.e., degradation state, its first derivative, and its second derivative). It can be seen from the Table 2 that AIC of the degradation model with three parameters is less than that of the model with two parameters. The smaller the AIC value, the better the model performance. Therefore, we chose three parameters to build our degradation model.

We regard the mean value of the state estimation as the optimal state estimate, and the point estimation of the trend components can be calculated by the system output matrix. Therefore, we can combine it with the prediction result of LSTM to obtain the final voltage prediction.

**Table 2.** AIC of the degradation models with different parameters for FC1 and FC2.


#### 2.4.2. Parameter Identification

We identified the parameters of our calendar aging model from the polarization curve data. Considering the multi-parameters and nonlinearity of the physical aging model, we chose the genetic algorithm to realize the parameter identification [39]. The aging factor *α<sup>k</sup>* remains at zero since the polarization curve was measured at the beginning of the operation.

The genetic algorithm first initializes the values randomly, and then it performs selection, crossover, and mutation operations on individuals [41] according to the fitness function *f fitness*. The optimal solution can be obtained through the iteration of the algorithm. The fitness function can be expressed as follows:

$$f\_{\text{fitness}}\left(E\_{\text{occ}}, R\_{0\prime}, a\_{\prime}b\_{\prime}i\_{0\prime}i\_{L0}\right) = \sum\_{k} \left[V\_{c,k} - \hat{V}\_{c,k}\right]^2\tag{12}$$

where *Vc*,*<sup>k</sup>* is the observed voltage and *V*ˆ *<sup>c</sup>*,*<sup>k</sup>* is the estimated voltage. *Eocv*, *R*0, *a*, *b*, *i*0, and *iL*<sup>0</sup> are the parameters that need to be identified.

#### 2.4.3. Extend Kalman Filter

In this paper, we applied the AEKF algorithm to deal with the nonlinearity of the fuel-cell system and to predict the calendar aging voltage. The traditional Kalman-filter algorithm assumes the process noise and the measurement noise as Gaussian white noise with zero means. However, it is difficult to obtain the statistical characteristics of noise in practice. Therefore, the AEKF method is introduced to correct the variance in those noises adaptively, to reduce the impact of unknown noise [42].

For the iterative calculation of our model, the Jacobian matrix can be obtained by linearizing the system with the first-order Taylor formula [39], as follows:

$$\begin{cases} \begin{array}{l} A = \left. \frac{\partial f(\mathbf{x}\_{k-1})}{\partial \mathbf{x}} \right|\_{\mathbf{x} = \mathbf{x}\_{k-1}^{+}} \\\\ \mathbf{C}\_{k} = \left. \frac{\partial \chi(\mathbf{x}\_{k}, \mu\_{k})}{\partial \mathbf{x}} \right|\_{\mathbf{x} = \mathbf{x}\_{k}^{-}} \end{array} \tag{13}$$

The algorithm of the discrete adaptive extended Kalman filter consists of four steps: initialization, state update, measurement update, and noise update, which are shown as follows:

