*2.6. AutoML Algorithm*

The training of neural networks requires a lot of manual intervention which is very time-consuming. Here, with the help of the AutoML algorithm, we can realize model construction and hyperparameters optimization efficiently. Particularly, we apploed the genetic algorithm for finding appropriate hyperparameters of the LSTM network. The genetic algorithm is an optimization method inspired by the evolution process in nature selection [41].

The hyperparameters, including epochs, the number of neurons, and the sliding window size, were initialized arbitrarily ranging from 50 to 400, 50 to 300, and 10 to 300 with different intervals, respectively. Each individual in the population represents a potential solution to the problems to be resolved. The RMSE of LSTM prediction results in the test data set were used as its fitness value. Operations on individuals, including selection, crossover, and mutation, were performed to optimize the population. The parameters of genetic algorithm were set as follows: the population size is 12, the mutation rate is 0.2, the crossover rate is 0.5, and the iteration number is 5. The training process of LSTM was repeated until the genetic algorithm reached its maximum iteration.

#### **3. Results and Discussions**

The prediction results of our hybrid prognostics method are given in this section. Firstly, the voltage decomposition result is provided and then we will give and discuss our calendar aging model for PEMFC. Combined with the reversible aging model, we will obtain the final prediction.

#### *3.1. Voltage Decomposition*

The original voltage data of FC1 and FC2 are decomposed into the calendar aging part and the reversible aging part based on the LOESS, as shown in Figure 6. The smooth window size of FC1 is 300 and since FC2 fluctuates more violently, we set it to 500. The characterization tests (including the polarization curve test and the EIS measurement) are performed once a week, so the voltage recovery phenomenon appears periodically as shown in Figure 6c,d, where the red line indicates whether the characterization test was carried out. We can notice that the degradation of FC2 proves to be faster and more serious than FC1 because of its severe operating conditions.

**Figure 6.** Voltage decomposition result. (**a**) Calendar aging voltage of FC1; (**b**) calendar aging voltage of FC2; (**c**) reversible aging voltage of FC1; (**d**) reversible aging voltage of FC2.

#### *3.2. Calendar Aging Voltage Prediction*

Here, we implement the calendar aging model based on the AEKF with the introduction of three-dimensional aging factors (T-AEKF) to better forecast the aging trend for PEMFC. The initial values of the state *x*0, covariance matrix *P*0, process error covariance matrix *Q*, and measurement error covariance matrix *R* were set as follows:

$$\begin{cases} \begin{array}{l} \chi\_{0} = \left[ 8\varepsilon - 2, 2\varepsilon - 4, 2\varepsilon - 8 \right]^{T} \\ P\_{0} = \left[ 0.1, 0, 0; 0, 0.01, 0; 0, 0, 0.0001 \right] \\ Q = \left[ 5\varepsilon - 5, 0, 0; 0, 5\varepsilon - 5, 0; 0, 0, 5\varepsilon - 5 \right] \\ R = 100 \end{array} \end{cases}$$

Figure 7a,c,e shows the prediction results based on the T-AEKF for FC1 with 55%, 70%, and 80% training data, respectively. Figure 7b,d,f shows the prediction results based on the T-AEKF for FC2 with 55%, 70%, and 80% training data, respectively. The average values of the aging factors in the training phase were used for the iterative calculation in the predicting phase. The blue lines and the red dotted lines stand for AEKF output values in training and predicting phases, respectively. In Figure 7b,d,f the T-AEKF prediction result of FC2 is slightly higher than the actual value, which can be ascribed to the abnormal voltage drop in the training phase as FC2 worked under more severe operating conditions.

**Figure 7.** The prediction results based on T-AEKF. (**a**) FC1 with 55% training data; (**b**) FC2 with 55% training data; (**c**) FC1 with 70% training data; (**d**) FC2 with 70% training data; (**e**) FC1 with 80% training data; (**f**) FC2 with 80% training data.

Figure 8a–c demonstrates the estimation results of aging factors for FC1 with 55%, 70%, and 80% training data, and Figure 8d–f demonstrates the estimation results of aging factors for FC2 with 55%, 70%, and 80% training data. The blue lines and the red lines represent the aging factors in the training and the predicting phases, respectively. From Figure 8, we can see that the aging factor *α* increases slowly as the *β* decreases with a fluctuation tend. The AEKF algorithm can estimate the aging factor *α* iteratively so as to update the prediction of the voltage. In the predicting phase, factor *γ* remains constant. These results show that with the introduction of three-dimensional aging factors (*α*, *β*, *γ*),

the proposed calendar aging model can accurately track the overall aging trend both in training and predicting phases.

**Figure 8.** The three-dimensional aging factors of T-AEKF. (**a**) FC1 with 55% training data; (**b**) FC1 with 70% training data; (**c**) FC1 with 80% training data; (**d**) FC2 with 55% training data; (**e**) FC2 with 70% training data; (**f**) FC2 with 80% training data.

Crucially, compared with the real voltage, we note that the spikes and fluctuations exist at the characterization time point for FC1 and FC2 during the aging test, which is regarded as the voltage recovery phenomenon. That is why we built the reversible aging model to capture detailed information for voltage degradation.

## *3.3. Reversible Aging Voltage Prediction*

We deployed the reversible aging model to capture detailed information on the voltage recovery phenomenon. After the voltage decomposition, the sequence of reversible aging voltage is fed into the LSTM network, where the output is the reversible voltage at the next time step. Inspired by [25], we implemented the sliding-window strategy to rebuild the data structure and to improve the prediction accuracy. Since the interruption time of characterization tests is known in advance, we input this information into LSTM as one of the features to make a better prediction, as shown in Figure 6c,d. Additionally, for FC2, as the sharp voltage drop in the two blue dashed boxes is not caused by the normal aging process, we smoothed this abnormal data to improve the prediction performance.

A total of 55% and 80% of the data were used for training and the rest of the data was used for testing. The loss function is the RMSE; the optimizer is Adam. The hyperparameters, including epochs, the number of neurons, and the sliding window size, were initialized arbitrarily, ranging from 50 to 400, 50 to 300, and 10 to 300 with different intervals, respectively. Then, hyperparameters were optimized by the AutoML algorithm with the iteration of 5, automatically. The predicted results of the reversible aging voltage superimposed with the calendar aging voltage will be provided in our final prediction, below.

#### *3.4. Final Aging Voltage Prediction*

We added the calendar aging component and the reversible aging component to obtain our final aging voltage prediction. The iterative structure is adopted to realize long-term degradation prediction [21,30]. The predicted values are used as part of the inputs that are fed into the model for forecasting the next step. To verify the advantages of the proposed T-AEKF-LSTM hybrid method, the traditional AEKF method, the LSTM method, and the improved AEKF method based on three-dimensional aging factors (T-AEKF) were used to make a comparison. For the traditional AEKF method, the initial values were the same as the T-AEKF method introduced in Section 3.2. For the LSTM method, the hidden units, epochs, and the sliding windows size were 50, 200, and 20, respectively, which were obtained by testing the performance of LSTM under different configurations.

The predicted results of FC1 under 55%, 70%,and 80% training sets are shown in Figure 9a,c,e, respectively. The traditional AEKF method can only give a linear voltage trend due to its degradation rate remaining constant in the predicting phase. In addition, we find it likely that a bad prediction results when the final point of the training phase is near the abrupt voltage. The LSTM method can predict local nonlinearity which contributes to capturing the voltage recovery phenomenon. However, its output voltage gradually deviates from the measured voltage as time goes on. The T-AEKF method can predict the overall aging trend of PEMFC more accurately than the traditional AEKF method. This decomposition forecasting strategy can prevent the AEKF model from being affected by short-term disturbance and can make the prediction more robust. In addition, threedimensional aging factors help to model and fit the aging process more accurately, since this scheme can adjust the degradation rate according to the different time. Based on the T-AEKF method and combined with the reversible aging model, the T-AEKF-LSTM method can further capture the voltage recovery information. It can predict the periodic fluctuation in voltage and give a better prediction performance of the aging process for PEMFC compared with other methods.

The prediction results under the dynamic condition for FC2 with 55%, 70%, and 80% training sets are shown in Figure 9b,d,f. It can be found from Figure 9a,d that the AEKF method is not robust enough, as its predicted voltage deviates significantly from the measured voltage. The LSTM method can predict the reversible aging phenomenon after every characterization but fails to trace the aging trend accurately. However, its short-term degradation prediction is more accurate than AEKF and T-AEKF. The T-AEKF can trace the degradation trend better than AEKF but it is not capable of forecasting the reversible aging process. The proposed T-AEKF-LSTM hybrid method can trace the degradation trend and predict reversible voltage components more accurately. It can be noticed that the prediction voltage of the hybrid method will rise slightly at the end of the aging test, which can be ascribed to the memory of the LSTM network, suggesting the occurrence of voltage recovery phenomenon at that time. Thus, the periodic fluctuation in voltage after every characterization test and the nonlinear variation in voltage can be accurately predicted by our hybrid method.

The root mean square error (RMSE) and mean absolute percentage error (MAPE) are used to evaluate the long-term voltage prediction performance [26]. The prediction error is used to evaluate the RUL estimation results. Those criteria are expressed as follows:

$$\text{RMSE} = \sqrt{\frac{1}{N} \sum\_{i=1}^{N} (y\_i - \hat{y}\_i)^2} \tag{20}$$

$$\text{MAPE} = \frac{1}{N} \sum\_{1}^{N} \frac{|y\_i - \hat{y}\_i|}{|y\_i|} \times 100\tag{21}$$

$$\text{Error} = \text{RUL} - \text{R\hat{U}L} \tag{22}$$

where *y*ˆ*<sup>i</sup>* is the predicted voltage, and *yi* is the measured voltage. RUL represents the actual RUL of the PEMFC, and RUL represents the estimated RUL.

**Figure 9.** The prediction results of AEKF, LSTM, T-AEKF, and the proposed method (T-AEKF-LSTM). (**a**) FC1 with 55% training data; (**b**) FC2 with 55% training data; (**c**) FC1 with 70% training data; (**d**) FC2 with 70% training data; (**e**) FC1 with 80% training data; (**f**) FC2 with 80% training data.

From the prognostic results for FC1 in Table 3, we can observe that the RMSE and the MAPE of LSTM remain the worst among the four methods. The RMSE and MAPE of T-AEKF are always smaller than AEKF due to the introduction of three-dimensional aging factors as well as the voltage decomposition framework. Since the T-AEKF-LSTM improved the abilities of modeling the reversible aging process based on an LSTM network, it has the lowest prediction error in most cases.

**Table 3.** The prognostic results for FC1.


Following the prognostic results for FC2 shown in Table 4, the T-AEKF-LSTM method has the best performance among the three methods according to its lowest prediction error. Particularly, in FC2, the RMSE and MAPE of T-AEKF-LSTM are much lower than that of T-AEKF, while in FC1, the improvements of T-AEKF-LSTM over the T-AEKF method is not very obvious. A possible explanation may be that the voltage recovery phenomenon of FC2 is more severe than FC1 and it greatly reduces the prediction accuracy of EKF-series-based approaches. In contrast, the reversible aging model can capture this detailed information and can significantly improve the prediction performance. The dramatic fluctuation in voltage can also contribute to the training of the LSTM network. The results above show that the proposed hybrid prognostics method can give a more robust and accurate prediction compared with single AEKF or LSTM methods.

**Table 4.** The prognostic results for FC2.


#### *3.5. RUL Estimation*

In this paper, the prediction results of a 55% training set were used to calculate the RUL of PEMFC. The degradation degree 4.0% of the initial voltage was selected as the end of life for fuel cell [33,39]. Since FC2 degrades faster than FC1, 5.0% of the initial voltage was also used to further evaluate the RUL estimation for FC2.

The RUL prediction results based on AEKF, LSTM, T-AEKF, and T-AEKF-LSTM are demonstrated in Table 5. The positive and negative values of the prediction error represent an early prediction or a late prediction, respectively. In order to predict faults in advance, an early prediction is preferred. From Table 5, the RUL estimation error of the proposed T-AEKF-LSTM method is within 30 h and always lower than that of other methods, which indicates that it can give a more accurate RUL estimation among them. The reason for the missing data is that the prediction performances of those methods are too bad to give the prediction errors.



As demonstrated in Table 5, the RUL estimation error of the proposed method is always lower than that of the PAM-ARMA-TDNN method [33] for each degradation degree, which verified the advantages of the proposed method. The results above demonstrate the effectiveness and robustness of the proposed method under static and dynamic operating conditions.

#### **4. Conclusions**

A robust hybrid prognostic method for PEMFC was proposed in this paper. Considering the voltage recovery phenomenon, a decomposition forecasting framework was established to predict the long-term voltage degradation for PEMFC. Firstly, the original

voltage data was decomposed into the calendar aging component and the reversible aging component based on LOESS. Then, we used the AEKF algorithm to predict the overall aging trend of PEMFC based on the calendar aging component. Meanwhile, we introduced three-dimensional aging factors to the physical aging model to better forecast the degradation trend. Next, the LSTM neural network was applied to capture the voltage recovery information through the reversible aging component. Particularly, the AutoML approach based on the genetic algorithm was adopted in the training phase of LSTM for the automatic hyperparameters tuning. The iterative structure was utilized to realize long-term degradation forecasting. The final prediction of the aging voltage can be obtained by combining the two predicted components and we can further realize RUL estimation. We verified the capability of the proposed hybrid prognostic method by two aging datasets under different operating conditions. Experiment results show that the proposed decomposition forecasting framework can combine the advantages of the model-based method for predicting long-term degradation trends and the data-based method for nonlinear modeling ability. In addition, this hybrid method can realize more accurate long-term degradation prediction for PEMFC compared with the single AEKF method or LSTM method. Developing online prognostic methods for PEMFC under high dynamic operating conditions, for example, in automotive applications, is still the major challenge for the prognostic research and it needs further exploration.

**Author Contributions:** Conceptualization, Z.X. and Y.W.; methodology, Z.X., Y.W. and Y.L.; software, Z.X.; validation, Z.X. and Y.W.; formal analysis, Z.X.; investigation, Z.X. and G.T.; resources, L.M. and G.T.; data curation, L.M. and Y.L.; writing—original draft preparation, Z.X.; writing—review and editing, Z.X. and Y.Z.; visualization, J.T.; supervision, L.M. and G.T.; project administration, L.M. and G.T.; funding acquisition, L.M. and J.T. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work is supported in part by the Open Research Project of the State Key Laboratory of Industrial Control Technology, Zhejiang University, China (No. ICT2022B31), and in part by the National Key R&D plan of China under Grant 2018YFB1702203.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The authors gratefully acknowledge the support of the National Key R&D plan of China and the Open Research Project of the State Key Laboratory of Industrial Control Technology, Zhejiang University, China.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:



#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
