Rapid Fault Diagnosis of PEM Fuel Cells through Optimal Electrochemical Impedance Spectroscopy Tests

The present paper is focused on proposing and implementing a methodology for robust and rapid diagnosis of PEM fuel cells’ faults using Electrochemical Impedance Spectroscopy (EIS). Accordingly, EIS tests have been first conducted on four identical fresh PEM fuel cells along with an aged PEMFC at different current density levels and operating conditions. A label, which represents the presence of a type of fault (flooding or dehydration) or the regular operation, is then assigned to each test based on the expert knowledge employing the cell’s spectrum on the Nyquist plot. Since the time required to generate the spectrum should be minimized and considering the notable difference in the time needed for carrying out EIS tests at different frequency ranges, the frequencies have been categorized into four clusters (based on the corresponding order of magnitude: >1 kHz, >100 Hz, >10 Hz, >1 Hz). Next, for each frequency cluster and each specific current density, while utilizing a classification algorithm, a feature selection procedure is implemented in order to find the combination of EIS frequencies utilizing which results in the highest fault diagnosis accuracy and requires the lowest EIS testing time. For the case of fresh cells, employing the cluster of frequencies with f > 10 Hz, an accuracy of 98.5% is obtained, whereas once the EIS tests from degraded cells are added to the dataset, the achieved accuracy is reduced to 89.2%. It is also demonstrated that, while utilizing the selected pipelines, the required time for conducting the EIS test is less than one second, an advantage that facilitates real-time in-operando diagnosis of water management issues.


Introduction
In recent years, scientists and engineers have been making notable efforts to mitigate air pollution and global warming by substituting fossil fuel based power generation systems with renewable and environment-friendly units [1,2]. The transportation and automotive sectors are shifting the production from gasoline to Electric Vehicles (EVs). However, these solutions depend on lithium-ion batteries, which guarantee a low autonomy. Furthermore, the time needed to completely charge the device is too long, if compared to the current refueling time of a generic car [3]. An alternative solution to the latter problem is the adoption of hydrogen as fuel and feeding it into a Polymer Electrolyte Membrane Fuel Cell (PEMFC), an electrochemical device that is able to convert the chemical energy of hydrogen into electrical energy [1]. Unfortunately, these devices are still too expensive (owing to the cost of the employed materials) and their durability does not meet today's need [4][5][6][7][8][9]. In addition, the device is complex and its operation is strongly dependent on the operating conditions, which need to be maintained in an optimized range as much as possible, in order to guarantee stable and reliable frequency ranges, the frequencies have been categorized into four clusters (based on the corresponding order of magnitude: >1 kHz, >100 Hz, >10 Hz, >1 Hz). Next, for each frequency cluster and for each specific current density, while employing a machine learning algorithm [38][39][40], a recursive feature elimination procedure is implemented and the set of EIS frequencies employed that result in the highest accuracy and require the lowest EIS testing time are determined. The procedure has firstly been implemented on fresh cells, and then on both fresh and degraded (aged) cells, in order to verify the dependence of the chosen frequencies along with the obtained accuracy on the cell's age.
It is worth noting that the key contribution of the present paper is selecting frequencies at which the EIS should be performed and determining the resulting accuracy. The obtained results facilitate reducing the required EIS testing time, which in turn permits the application of this methodology in real-time (in-operando) applications.

Electrochemical Impedance Spectroscopy
Electrochemical Impedance Spectroscopy (EIS) is a diagnostic tool based on system dynamics: a harmonic voltage (or current) perturbation is superimposed to steady state potential (or current), so that the resulting impedance of the system can be measured in a wide range of frequencies. Solving the problem in a frequency-domain allows to separate different physical phenomena that are occurring in the system [29,41,42]. As such, the fastest phenomena can be shown only if the applied disturbance is fast enough [29,41,43]. Considering a voltage perturbation (Potentiostatic mode) being applied to the system: As shown in (1), the voltage variation is the sum of a steady-state value (∆V 0 ) and a sinusoidal oscillation. As a result, the current will adapt to this perturbation, according to (2), with a certain phase-shift φ: Under the hypothesis of linearity of the system, the impedance can be defined as the ratio between the oscillation of voltage and the one of current.
From (3), which is a complex number, some information about the modulus and the phase shift can be easily obtained, as follows: After repeating the same calculations for a wide range of frequencies, the result can be plotted in both Bode or Nyquist form. Bode is a (|Z| − f ) and (φ − f ) plot, whereas in a Nyquist plot the imaginary part of the impedance is plotted against the real one. The latter is the one used in the following analysis.

Nyquist Plot
From the analysis of an impedance spectrum in the Nyquist plot, possible PEM fuel cell's issues can be recognized [29]. Starting from the highest frequencies (left part of the graph, as demonstrated in Figure 1), the intercept of the impedance arc on real axis is called HFR (High Frequency Resistance) and it is the sum of the ionic resistance of the membrane and electric resistances of GDL, MPL, and the bipolar plates. A high frequency arc, related to the hydrogen oxidation reaction (HOR) is present, but it can be hardly seen since the fast kinetics at the anode results in a much smaller capacity element compared to ORR (cathode) reaction. A 45 • linear branch is often present in the left part of the Nyquist plot, and it figures out some limitations in the proton-transfer through the CL [31]. Moreover, two capacity loops can be detected: the former is due to kinetics of ORR, the latter is present when there are significant mass transport issues. When the current density increases, size of the first loop becomes smaller and the mass transport capacitive element grows up significantly.

Water Flooding Issues in Nyquist Plot
The EIS technique can be used to detect flooding or drying issues into PEM fuel cells. When the system suffers from dehydration, the membrane's ionic conductivity is reduced, the HFR increases and the impedance spectra progressively shifts towards higher real values [10,32]. The ionic conductivity of a PEM rises when the degree of humidification of the membrane is high. In the opposite case, when there is too much water in the cell, the conductivity of the membrane rises (well hydrated membrane, augmented ion transport), but the high content of water blocks the cathode GDL's pores, hindering mass transport, and reduces the active sites of the CCL. These two effects can be seen in the Nyquist plot: as the water content increases, the real part of the impedance becomes lower, and at the same time the spectrum's amplitude becomes wider (this last effect can be easily detected looking at both real values and imaginary ones at lower frequencies). The impedance spectra represented in Figure 2 have been obtained by changing cathodic relative humidity (RH c ), a parameter that can be easily linked to the water content of a PEMFC. At very low current densities (j = 0.2 A/cm 2 ), lowering the RH c the fuel cell starts suffering from minor to severe dehydration. At high current densities (j = 1.2 A/cm 2 ) instead, the cell becomes more and more flooded when the degree of humidification rises.

Impedance Spectra of Aged Cells
In addition to the dataset made of EIS spectra obtained from fresh cells, data from an aged cell has also been used. This cell suffers from electrocatalyst degradation, induced through an Accelerated Stress Test (AST), which was performed according to the protocol reported by the US Department of Energy for electrocatalyst degradation. For an ideal electrode, the oxygen reduction kinetics is described by the Tafel law, which is defined as: where the K r is the kinetic constant, a o 2 is the activity of oxygen, γ is the reaction order, ∆Φ is the electrode potential, and b ORR is the Tafel slope. Theoretically, when electrocatalyst degradation occurs, the result is a reduction in the kinetic constant K r , related to a decrease in the Electrochemical Surface Area of the PEMFC. Under the hypothesis of Tafel kinetics for the Oxygen Reduction Reaction, the term b ORR (Tafel-slope) does not change. The Tafel equation is valid when j is far from 0, otherwise a more complex equation (like Butler-Volmer) must be used. The Tafel-slope term is defined as: In (6), R is the Ideal Gas Constant, T is the absolute temperature, β is the symmetry factor (a kinetic parameter) and F is the Faraday constant. Thus, under the hypothesis of fixed current density j, as the Tafel slope is constant, the spectrum remains the same. In fact, the charge transfer resistance R CT , for an electrode with ideal oxygen and ion transport, is defined as: The resistance is related to the size of the spectrum, and it depends on the ratio of two constant values, therefore the spectrum does not change. It is possible to demonstrate that the latter is valid also when a non-ideal electrode is considered [44]. Theoretically, the fault diagnosis procedure is not affected by this kind of degradation phenomenon, as the spectra should be the same. However, in practice there is a marginal variation between the fresh cell's spectrum and the aged cell's one ( Figure 3). As already discussed in the literature [45], the latter is associated with the non-uniform degradation of the cathode catalyst layer. This will affect the precision of the implemented pipeline, decreasing the overall classification accuracy.

System Architecture
Four identical MEAs (Membrane Electrode Assembly) have been tested. The MEA is made up of GDL (Gas Diffusion Layer-SGL29BC), ACL and CCL (Anode and Cathode Catalyst Layers) and the membrane (PEM: Nafion R XL). Two gaskets with a thickness of 175 µm each have been placed between the CCM (Catalyst Coated Membrane, i.e., membrane with catalyst layers) and the graphite plate. The gasket, manually designed by MRT Fuel Cell Lab's researchers, guarantees a perfect coincidence with MEA's borders. The assembly ends with the graphite flow-field, current collectors and end-plates connection. The whole structure is kept fixed by six bolts with 12 Nm torque [45]. The system is then connected to the experimental station, which is shown in Figure 4. The system includes three digital flow meters, used to control gas flow rates (air is fed fully dried, gas purity is estimated to be 99.999% for nitrogen and hydrogen and 99.995% for the oxygen). It also contains three bubblers that are utilized to saturate the inlet gases flow, which set the relative humidity of the flows by controlling the dew point temperature. Furthermore, the set-up comprises pressure transducers-placed at the inlet and at the outlet of the PEMFC (two for the cathode side, and two for the anode one), thermo-couples inserted in specific seats of the tightening plates and connected to an acquisition system. Other employed components include a potentiostat, back-pressure valve (to manage the operating pressure of the system), and the electric load to perform characterization tests (EIS measurements).
Electrochemical Impedance Spectroscopy (EIS) is an electrochemical technique and it has been conducted during the polarization test for each current density. The impedance spectra are characterized by 29 points, each of which is obtained at a specific frequency in the range of 1 Hz to 20 kHz. These measurements did not allow to obtain a complete spectrum in the Nyquist plot (lowe frequencies should be considered). However, using only a part of the spectrum can help reducing the EIS testing time (i.e., time needed to perform the EIS measurements) significantly [44].

Experimental Procedure
The PEMFC has been firstly initialized following the potentiostatic activation protocol reported in [46]. The cell has then been activated under galvanostatic (j = 0.5 A/cm 2 ) reference conditions. The reference conditions are characterized by: After twenty minutes of conditioning under steady state operation, the polarization is started (voltage measurement is steady state after ten minutes) and the reference curve is obtained. Once the first test is concluded, the operating parameter that has to be tested can be changed, and after another twenty minutes of conditioning (under steady state operation), the new polarization curve is ready to be obtained. The operating parameters have been changed one by one and in combinations in order to perform a sensitivity analysis aiming at finding out the optimal conditions for the PEMFC (i.e., the one with the highest voltage output, which corresponds to the smallest spectrum in the Nyquist plot). All of the conducted experiments are listed in Table 1. The experiments have been then repeated in galvanostatic mode for most of the following current densities: As the EIS tests on the above-mentioned cases have not been conducted at all of the mentioned current densities, number of available EIS tests for each current density is different. Table 2 represents number of the available fresh cell and aged cell tests for each of the considered current densities.

EIS Testing Time
The required time for conducting the EIS measurements, which is utilized in the implemented feature and algorithm selection procedure, is a limiting factor. The time needed for conducting a measurement at a certain frequency is the inverse of that frequency. Therefore, the total required time is the sum of the inverse values of all of the required frequencies. The obtained value is then multiplied by a constant r, which is an integer number corresponding to the performed repetitions of the sinusoidal oscillation. According to the experience of the co-authors (MRT Fuel Cell Lab), r = 3 is a reasonable value. The overall required time can thus be estimated as:

Overall Methodology
As was previously explained, the EIS tests have been conducted in different operating conditions (presented in Table 1) and current densities (reported in Table 2). Since the resulting spectrum for each test includes m = 29 frequencies and considering the fact that two values ((Z ( f k ) and Z ( f k ))) are derived for each frequency f k , the corresponding total number of available features (real and imaginary values) is equal to 2m = 58. A label (which represents the type of fault or regular operation) is assigned to each spectrum based on the corresponding expert knowledge (the experience of laboratory's research staff gained through experimental activities) employing the cell's spectrum on the Nyquist plot. The labels which are given to the spectra, as demonstrated in Figure 5, are as follows:

1.
Regular: the system is working under optimized conditions (or very closed to them).

2.
Dried: there is evidence of ion conductivity loss, since the spectrum in the Nyquist plot is shifted to the right compared to the regular one.

3.
Flooded: the spectrum's amplitude has increased. Positive effect: lower HFR. In fact, while the cathodic GDL's pores are blocked by water, the membrane conductivity increases due to the high hydration.

4.
Severely Flooded: same effects of the "Flooded" case, but much more emphasized. This effect can be easily seen at high current densities.

5.
Severely Dried: very strong dehydration can be detected when current density is very low (0.1-0.2 A/cm 2 ).
As the key aim of the present work is recognizing the potential water management issues (represented by the above-mentioned labels) in PEMFCs employing the EIS spectra, a classification algorithm is provided with the real and imaginary values extracted for each frequency as inputs and is trained to estimate the assigned label (targets). Thus, as the algorithm will only require a spectrum to diagnose the faults, the validity of this procedure can be generalized to any spectrum, independently of the corresponding operating conditions. Linear Discriminant Analysis [47][48][49] is utilized as the classifier in all of the developed pipelines and the corresponding function, provided in the Scikit-learn free software package [50,51], is accordingly employed. As the procedure is implemented for each current density independently, the corresponding number of available EIS spectra (number of tests for each current density that are provided in Table 2) represents the number of rows in the corresponding utilized matrix, while the columns are the imaginary and real values that are obtained at the chosen frequencies (the corresponding selection procedure is explained below). Utilizing the EIS data extracted at a reduced number of frequencies (that would require a lower EIS testing time) facilitates employing the proposed fault diagnosis methodology in a real-time (in-operando) manner. Therefore, a procedure is implemented in order to select set frequencies for each current density, while giving a higher priority to the frequencies with inferior required EIS testing time. Accordingly, considering the notable difference in the time needed for carrying out the EIS tests at different frequency ranges (as explained in Section 3.3), the frequencies are first categorized into four clusters:  Figure 6 shows the spectra of labeled samples considering the above-mentioned frequency clusters (the axis ranges are kept constant in the sub-figures dedicated to different clusters aiming at demonstrating the relative differences in the corresponding ranges of real and imaginary values). Labeled spectra  The overall procedure that is performed for each of the considered frequency clusters is represented in Figure 7. In this procedure, recursive feature elimination is implemented and the accuracy achieved utilizing different combinations of frequencies (using EIS data obtained at these frequencies), is determined. For each set of frequencies, employing the formulation provided in Section 3.3, the corresponding required EIS testing time is then calculated. Next, for each current density, the set of frequencies utilizing which leads to the highest accuracy is determined. In case the highest accuracy can be achieved using multiple pipelines, the one which requires the lowest EIS testing time and the lowest number of frequencies is selected.
The latter procedure is first carried out using a dataset that only includes impedance spectra obtained from PEMFCs in Beginning of Life (BoL) conditions (fresh cells) and then utilizing the data of the EIS tests conducted on both fresh and aged cells.

Obtained Results Employing the Data Obtained from Tests Conducted on Fresh Cells
The chosen set of frequencies for each current density along with the resulting accuracy and the determined required EIS testing time, while only employing the cluster of frequencies with f > 1 kHz, are provided in Table 3. As can be observed in this table, for the current densities of j = 0.1 A/cm 2 and j = 0.2 A/cm 2 , all the labels can be estimated with 100% accuracy. The latter demonstrates that for these current densities, the HFR (High Frequency Resistance) is sufficient to detect the dehydration status of the membrane. Furthermore, as a single elevated frequency is only employed in these selected pipelines, the corresponding required EIS testing time is negligible (<10 −3 s). On the other hand, the measurements conducted at kHz frequencies ( f > 1 kHz) do not provide enough information to accurately estimate the labels for higher current densities. For these current densities, an average accuracy of 69% is reached, requiring an average EIS testing time of 0.0025 s, while six frequencies are required overall. Considering all of the frequencies higher than 100 Hz, as demonstrated in Table 4, the overall achieved accuracy increases (average accuracy: 83.6%). For the low current densities (j = 0.1 A/cm 2 and j = 0.2 A/cm 2 ), the accuracy of 100% was already achieved in the previous cluster; thus the selected frequencies for these current densities are identical to the ones of the previous cluster. Similarly, for j = 0.7 A/cm 2 , as a higher accuracy could not be achieved by adding more frequencies, the same frequencies as those of the previous cluster are selected. The accuracy increases for all of the remaining frequencies, nevertheless, several frequencies are required for j = 1.2 A/cm 2 , while an accuracy of only 75% is achieved in this case. As shown in Table 5, employing the frequencies higher than 10 Hz is the most promising choice as an accuracy of 100% can be reached for current densities of j = 0.1, 0.2, 0.5, 1, and 1.2 A/cm 2 , while elevated accuracies can be achieved for the remaining ones (95.7% for j = 0.7 A/cm 2 and 93.4% for j = 1.5 A/cm 2 ). Using the frequencies that are selected in this cluster, the required EIS testing time for all of the considered current densities is less than one second. These results demonstrate that not all the frequencies need to be considered in order to have an accurate diagnosis and a smaller portion of the spectrum is sufficient. As demonstrated in Table 6, utilizing the selected frequencies, while being provided the whole spectrum, only improves the accuracy at the current density of j = 0.7 A/cm 2 (from 95.7% to 100%). Though, the latter marginal improvement is obtained with the price of increasing the required EIS testing time from 0.47 s to 0.95 s. The selected frequencies for the other current densities are identical to the ones obtained for the previous cluster (frequencies higher than 10 Hz). Therefore, it can be concluded at conducting tests at the frequencies between 1 to 10 Hz (which require a notable EIS testing time), does not provide a significant benefit for improving the diagnosis of water management faults. Table 7 summarizes the latter discussion by comparing the average accuracy, the average required EIS testing time, and the number of required frequencies corresponding to the selected sets of frequencies of the considered frequency clusters. Most Influential Frequencies Figure 8 shows the number of times that the data obtained at a certain frequency is utilized (considering all of the current densities) for each frequency cluster. Thus, it illustrates the most influential frequencies in the selected frequency sets. For the case of f > 10 Hz, it can be observed that some frequencies ( f = 43.6, 305.18, 488.28, 976.56, 183143.6, 305.18, 488.28, 976.56, , 2563 are not useful as they are never employed. On the other hand, some of the elevated frequencies including 10132, 7202, 3662.1 and 1342.8 Hz are selected in all of the considered cases.

Fresh and Aged Cells
The same procedure, which was previously applied to fresh cells, is then repeated for a dataset including both fresh and aged cells. The latter is conducted in order to assess the dependence of the achieved accuracy and the selected frequencies on cell's aging. Table 8 summarizes the obtained results for the considered frequency clusters. Considering f > 1 kHz cluster, the accuracy is lower than the previous case (68.3% average accuracy vs. 78.1%) due to the fact that in the current density range between 0.7 A/cm 2 to 1.2 A/cm 2 , the accuracy is around 50%. However, similar to the previous case, 100% accuracy can be reached for j = 0.1 A/cm 2 , using only one frequency. The classification accuracy increases while more frequencies are considered ( f > 100 Hz), reaching 76.8%. To increase the classification accuracy, lower frequencies need to be employed. As such, using f > 10 Hz results in an average accuracy of 89.2%, while requiring an average EIS testing time of less than 0.5 s. The frequencies that are selected while providing the whole spectrum only marginally increase the accuracy to 90.4%, while resulting in a higher average EIS testing time (0.89 s). Therefore, similar to the previous case, using the cluster of frequencies between 1 to 10 Hz does not provide any significant benefit. For each of the considered frequency clusters, the average accuracy, the average required EIS testing time, and the number of required frequencies corresponding to the selected sets of frequencies are reported in Table 9. Figure 9 shows the number of times that a certain frequency is utilized by the algorithms, for each frequency cluster, demonstrating the most influential frequencies that are selected for the considered current densities.

Discussion
It was demonstrated using the frequencies that are selected while providing the f > 10 Hz frequency cluster, an elevated accuracy for the case of fresh cells (98.5%) and an acceptable one (89.2%) for the case of fresh/aged cells can be achieved, while requiring an average EIS testing time of less than 0.5 s in both cases. Therefore, the EIS testing can be conducted at the selected frequencies, while the cell is in operation, and the implemented procedure can be utilized as a real-time approach for diagnosing drying or flooding faults with an acceptable accuracy. It should be pointed out that, although the procedure is conducted at the cell level, the implemented methodology and the determined most influential frequencies can provide helpful insights and guidelines for conducting real-time diagnosis at the stack level.

Conclusions
In the present work, a methodology for rapid and robust fault diagnosis of PEM fuel cells utilizing the EIS spectrum was proposed and implemented. In order to reduce the required EIS testing time (which can facilitate utilization of the proposed method in real-time (in-operando) manner), a feature selection procedure was implemented. In this context, considering the notable difference between the required time for conducting EIS tests at different frequencies, the available frequencies were first categorized into four clusters based on the corresponding orders of magnitude. For each frequency cluster and for each specific current density, the achieved accuracy and required EIS testing time of different sets of frequencies were then determined. The frequency set resulting in the highest accuracy and requiring the lowest EIS testing time was then selected for each case. In order to take into account the effect of degradation, the investigation was also carried out using a dataset including both fresh and aged cells.
It was demonstrated that for the fresh cells, through employing the selected frequencies, the faults can be diagnosed with an accuracy of 98.5% while for the fresh/aged cells an accuracy of 89.2% can be achieved. The required EIS testing time in both cases in less than 0.5 s. Therefore, the EIS testing can be conducted at the selected frequencies, while the cell is in operation, and the implemented procedure can be utilized as a real-time strategy for diagnosing drying or flooding faults with an acceptable accuracy. It is worth noting that, although the proposed procedures in the present work are implemented at the cell level, the developed methodology and the determined most influential frequencies can provide helpful insights and guidelines for conducting real-time diagnosis at the stack level. Moreover, since an EIS test conducted at selected frequencies is the only required input in the implemented methodology, the proposed procedure facilitates an accurate diagnosis of water management issues independently of the operating conditions that have caused them. Funding: This research received no external funding.

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

Abbreviations
The following abbreviations are used in this manuscript: