1. Introduction
The energy shortage and environmental pollution problems caused by using fossil fuels are becoming increasingly severe, which means new and clean alternative energy sources are gradually becoming the key research direction of various countries [
1]. The proton exchange membrane (PEM) fuel cell has become one of the ideal power sources for new energy transportation due to the advantages of high efficiency, fast start-up speed, environmental protection, and lower operating temperature [
2]. However, the promotion and large-scale commercial application of PEM fuel cells are restricted by their service life and reliability [
3]. Under vehicular conditions, improper internal states management can lead to adverse phenomena, such as reactant starvation, membrane drying, and flooding, finally affecting output performance and service life. Material and structural optimization and design, as well as manufacturing methods for internal components, including membrane [
4], catalyst layer [
5], gas diffusion layer [
6], and bipolar plate [
7], can fundamentally alleviate these failures. On the other hand, advanced system control and management to ensure that the fuel cell works under the right conditions are also important, where the online fault diagnosis system can detect the early stage of the fault in time so that the operating conditions can be adjusted in time to prevent further deterioration, which is of great significance to improving the reliability and lifetime of PEM fuel cells [
8].
For an online fault diagnosis system, two major elements, namely, the information acquisition module and diagnosis module, are included. In terms of critical information extraction, techniques are mainly divided into two main categories: physicochemical tests, such as pressure drop measurement, neutron imaging, and magnetic resonance imaging; electrochemical methods: such as polarization curve, current pulse injection, and electrochemical impedance spectroscopy (EIS) [
9]. The gas pressure drop between channel inlet and outlet is an effective signal for the determination of gas transfer resistance, which is closely associated with flooding failure, but it seems that drying information cannot be obtained [
10]. Neutron imaging and magnetic resonance imaging can realize internal in situ measurement but are not suitable for on-board applications due to limitations of measurement and price [
11]. The polarization curve or voltage under specific current density is the most direct indicator to judge output performance and is easy to obtain by cell voltage monitor, while it is not accessible to distinguish fault type since all failures are ultimately a drop in voltage [
12]. Current pulse injection mainly reflects ohmic resistance, which is primarily related to membrane water content, thus flooding or starvation cannot be accurately located [
13]. On the other hand, the electrochemical impedance spectroscopy analyzing internal dynamics of PEM fuel cells at different time scales from the perspective of the frequency domain has been widely applied in performance assessment [
14,
15]. Legros et al. [
16] found that PEM fuel cell flooding mainly affected the mass transfer impedance and cathode Warburg impedance by EIS measurement under fault experiment and further proved the feasibility of using EIS to diagnose flooding fault. Similarly, Debenjak et al. [
17] measured the EIS of an 80-piece PEM fuel cell stack and found that the impedance at 30 Hz, 100 Hz, and 300 Hz had more significant differences under flooding and drying, so they concluded that the impedance at these frequency points could be used for fault diagnosis. Considering that the faster impedance acquisition with quick calculation techniques had been already proposed for low-cost online application [
18], by this, the EIS-based feature acquisition is applied in this paper.
Fault diagnosis is an essential prerequisite for fault-tolerant control and fault elimination, and Gao et al. [
19] presented a comprehensive review of the real-time fault diagnosis method from model-based and signal-based perspectives. As for PEM fuel cells, fault diagnosis methods can mainly be divided into the model-based method, data-driven method, and hybrid method [
20,
21,
22]. The model-based approach, where the mechanism model or empirical model that can predict the system performance is needed, detects typical faults by a residual evaluation based on the variance between the predefined model and measured signal. In detail, the mechanism model shows satisfactory accuracy, but it is not suitable for online applications due to its high computation. In contrast, the empirical model with a simpler expression and fewer parameters, such as the equivalent circuit model (ECM), is more popularly used in fault diagnosis of PEM fuel cells. For example, Fouquet et al. [
23] improved the traditional Randles ECM by replacing the double-layer capacitor with a constant phase element (CPE) and provided a qualitative explanation for the variation of the model parameters under flooding and drying. Rubio et al. [
24] proposed two kinds of ECM and established the correlation between the parameters of ECM and internal states within the PEM fuel cell to diagnose flooding and drying fault. For another, the data-driven diagnosis method that considers the PEM fuel cell as a black box detects fault via artificial intelligence method, statistical method, and signal processing method based on analyzing a large amount of historical data [
25,
26]. Li et al. [
27] applied Fisher discriminant analysis to extract characteristic parameters from voltage and used the support vector machine to classify faults of fuel cells, which achieved good results both offline and online. Benouioua et al. [
28] analyzed the singularities of the output voltage signal of PEM fuel cell via wavelet transform and further classified the flooding fault of fuel cell accurately by using the k-nearest neighbor method. Riascos et al. [
29] used Bayesian networks classification for the PEM fuel cell fault diagnosis. Note that the data-driven diagnosis method is essentially the analysis of data, and the accuracy of its diagnosis results depends on the training of data, which means that high precision requires a particular scale of data. However, the acquisition and storage of large amounts of data are often not easy, which requires many prior experiments and has high requirements on hardware resources. Recently, several researchers have used EIS as the information acquisition to diagnose fuel cell faults in combination with a data-driven approach. Zhang et al. [
30] proposed a diagnosis method based on fuzzy clustering by extracting graphic features from the EIS of PEM fuel cell as indicators to complete the fault diagnosis of different degrees of flooding and drying. Lu et al. [
31] designed an online fault diagnosis system via online EIS calculation, and the parameters of the ECM identified by the least square method were input into the model on the basis of a machine-learning algorithm to complete the diagnosis. Their proposed system successfully diagnosed the flooding and drying faults of the PEM fuel cell with an accuracy of 90.9%. Inspired by the characteristics of the model-based method and data-driven method, these two methods can be combined, namely the hybrid method [
22]. Recently, Djeziri et al. [
32] proposed a hybrid method that combines a prior physical model and data-driven updated kernel for fuel cell failure diagnostics, where the updated kernel is enabled when the estimation error between the predicted and measured values of stack voltage surpasses a predefined threshold. Similarly, Pan et al. [
33] combined a model-based adaptive Kalman filter and data-driven NARX neural network to realize fuel cell failure diagnostics. From another perspective, the fault diagnosis of the PEM fuel cell based on external signals is inseparable from the sensor measurement. The accuracy of measurement data is the premise of subsequent diagnostic applications. In the actual application of fuel cell vehicles, sensors may encounter significant measurement errors and complete failure. In general, the underlying software of the fuel cell system control unit may determine whether there is a complete failure through analog detection. As for measurement errors, an example is given by Won et al. [
34], where the air flow meter fault caused by reduced measurement sensitivity was detected by an artificial neural network classifier and a residual-based diagnosis model. In comparison, this paper assumes that all sensors, including impedance measurement equipment, can work normally. The failure of the PEM fuel cell itself is the focus of research.
Although the above methods have made a significant effect on the fault diagnosis study of PEM fuel cells, there are still some challenges. Firstly, respecting fault features extraction based on EIS with a predefined ECM, the least-squares or directly software fitting is usually used for EIS fitting thanks to their fast convergence speed, but the initial value of various components of ECM needs to be set in advance artificially, which is not conducive to the online application of diagnosis. What is more, the vehicular fuel cell system operating under dynamic conditions has been facing a wide variety of situations with different fault types/degrees. It seems that incorrect fault degree detection may lead the controller to take drastic measures, even fault type is correctly identified, which may result in the fault aggravation or occurrence of other faults. Therefore, fault degree detection is also essential, and a case of the detection and identification of air stoichiometry fault with different degrees was given by Pahon et al. [
35], where the fault diagnosis tool was established by wavelet transform technology. Zheng et al. [
36] also proposed a data-driven fault detection tool on the basis of reservoir computing to study faults under four degrading operating conditions. However, multi-degree fault diagnoses of membrane drying, flooding, and air starvation are often overlooked. Considering these research gaps, it is strongly incentivized to design an innovative multi-stage online impedance-based fault diagnosis method for improving fuel cell management robustness. In this study, first, a comprehensive fuel cell fault experimental procedure is carried out, in which flooding, membrane drying, and air starvation, covering from minor to moderate and severe, are included. Accordingly, a fuel cell failure data set is established. Second, an improved Randles ECM is introduced to fit EIS by the hybrid genetic particle swarm optimization algorithm, in which the initial values of ECM components are replaced by parameter ranges, avoiding the accurate initial parameter selection. Then, a support vector machine with the binary tree (BT-SVM) is introduced for the detection of fault types, where part of the fitted ECM parameters is selected as characteristic inputs to realize the fault type classification, which can further distinguish the fault degree on the basis of fault types.