Yunjin Ao

Salah Laghrouche

Daniel Depernet

Denis Candusso

Diagnosis of PEMFC based on autoregressive model and voltage fluctuation

Diagnosis of PEMFC based on autoregressive model and voltage fluctuation

Yunjin Ao * , Salah Laghrouche, Daniel Depernet, Denis Candusso

Abstract-A novel diagnosis approach for proton exchange membrane fuel cell (PEMFC) systems is proposed in this paper. Different fault conditions can be classified based on the patterns of stack voltage fluctuation, which can be extracted by the autoregressive model (AR model). The proposed method focuses on the stack voltage fluctuation over time, thus it is more practical and less complex as only the stack voltage needs to be collected. The AR model is employed to extract voltage fluctuation features, and then several widely applied classifiers are applied to classify fault conditions. Experiments are carried out to demonstrate the effectiveness. Those faults are introduced by the adjustment of anode stoichiometry, cathode stoichiometry, relative humidity level, and the cooling circuit temperature. The diagnostic accuracy for single-fault conditions is 99%, while it is 93% for multi-fault conditions. Also, compared to the singularity analysis method in our former research, the proposed method is more time-saving. Moreover, the voltage sampling frequency and sample window length are adjusted to research the diagnosis effectiveness, which is studied and discussed for the first time.

I. INTRODUCTION

As the target to cut down the carbon dioxide (CO 2 ) emissions has been emphasized by the whole world [START_REF] Chapman | Societal penetration of hydrogen into the future energy system: Impacts of policy, technology and carbon targets[END_REF], hydrogen fuel cells are considered as a promising alternative to fossil fuels. Among all kinds of fuel cells, proton exchange membrane fuel cell (PEMFC) is one of the most developed and concerned technologies, thanks to its high efficiency and ability to operate under normal temperature [START_REF] Shaffer | Global energy trends: Demands for scientific innovation[END_REF].

PEMFC has been applied to various fields, such as distributed power stations, mobile devices, and automobiles, etc [START_REF] Tanc | Overview of the next quarter century vision of hydrogen fuel cell electric vehicles[END_REF]. However, durability and reliability remain the biggest challenges on the road of large-scale commercialization. The performance and security of the PEMFC system will be reduced when the operating conditions are different from the nominal conditions [START_REF] Pera | Diagnostic & health management of fuel cell systems: Issues and solutions[END_REF]. Therefore, detecting the fault operating conditions and taking actions to correct them at the early stage is of great importance. For this purpose, the diagnosis is necessary to guarantee the health and safety of the PEMFC system, thus improving the reliability and durability.

The output voltage was applied as diagnostic tools in several studies, and a lot of classification methods have been applied to PEMFC diagnosis, such as k-nearest neighbors Yunjin Ao, Salah Laghrouche, and Daniel Depernet are with FEMTO-ST, UMR CNRS 6174, and FCLAB, UAR CNRS 2200, Université Bourgogne Franche-Comté, Belfort/UTBM 90000, France; Denis Candusso is with Univ Gustave Eiffel, Univ Paris-Saclay, ENS Paris-Saclay, CNRS, SATIE, FCLAB, 90010 Belfort Cedex, France (e-mail: yunjin.ao@utbm.fr; salah.laghrouche@utbm.fr; daniel.depernet@utbm.fr; denis.candusso@univ-eiffel.fr).

(KNN) [START_REF] Benouioua | Characterization of low and high frequency phenomena in a pem fuel cell using singularity analysis of stack voltage[END_REF], artificial neural network (ANN) [START_REF] Kim | State-of-health diagnosis based on hamming neural network using output voltage pattern recognition for a pem fuel cell[END_REF], extreme learning machine (ELM) [START_REF] Liu | A fast fault diagnosis method of the pemfc system based on extreme learning machine and dempster-shafer evidence theory[END_REF], support vector machine (SVM) [START_REF] Li | Fault diagnosis for pemfc systems in consideration of dynamic behaviors and spatial inhomogeneity[END_REF], extreme gradient boosting (XGBoost) [START_REF] Ma | Online fault diagnosis for open-cathode pemfc systems based on output voltage measurements and data-driven method[END_REF], etc. In these studies [START_REF] Kim | State-of-health diagnosis based on hamming neural network using output voltage pattern recognition for a pem fuel cell[END_REF], the features are the voltages of each cell, i.e., {V cell1 , V cell2 , ...V celln }. From these features, the spatial distribution characteristic of voltage can be revealed because the positions of the cells will greatly affect its voltage output. However, the mechanism of the voltage spacial distribution is still not clear, and it depends on the structure of the PEMFC [START_REF] Mao | Evaluation method for feature selection in proton exchange membrane fuel cell fault diagnosis[END_REF].

Except for the voltage spatial distribution, another interesting and important information is the stack voltage fluctuations over time, which is also called electrochemical noise [START_REF] Astaf'ev | Electrochemical noise measurement of polymer membrane fuel cell under load[END_REF]. Therefore, the data applied in the diagnosis is the stack voltage at different moments, i.e., {V t1 , V t2 , ...V t k }. For these time-series data, the voltage data sampled under high frequency can be separated into voltage profiles by windows of certain length, thus the diagnosis can be carried out for each profile within a certain period.

The most common fluctuation observed in electrochemical devices is the "1/f noise", because the noise intensity is inversely proportional to frequency [START_REF] Astafev | Flicker noise spectroscopy in the analysis of electrochemical noise of hydrogen-air pem fuel cell during its degradation[END_REF]. The voltage fluctuation has been analyzed by different methods, such as wavelet transformation [START_REF] Benouioua | Characterization of low and high frequency phenomena in a pem fuel cell using singularity analysis of stack voltage[END_REF], statistical features [START_REF] Maizia | Statistical short-time analysis of electrochemical noise generated within a proton exchange membrane fuel cell[END_REF], power spectral density [START_REF] Legros | First results on pemfc diagnosis by electrochemical noise[END_REF], and high order moments [START_REF] Martemianov | Noise diagnosis of commercial li-ion batteries using high-order moments[END_REF], etc.

To achieve quantitative diagnosis based on voltage time series data, D. Benouioua et al. [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF] employed the singularity analysis of the voltage time-series data for feature extraction to distinguish the operating conditions. The singularity spectrum is the multifractal spectrum calculated by wavelet transform-based multifractal formalism [START_REF] Benouioua | Characterization of low and high frequency phenomena in a pem fuel cell using singularity analysis of stack voltage[END_REF]. However, it needs about 4.5 minutes to obtain a voltage profile, and the mathematical complexity of the method is relatively high. Also, the accuracy of the fault classification can still be improved. Rather than implementing singularity analysis, we propose to look for other effective features that can be more easily identified, and in a shorter time.

According to the reference [START_REF] Kaulakys | Autoregressive model of 1/f noise[END_REF], as the autoregressive model (AR model) can represent the recurrence interval of fluctuations, it is a useful tool to describe the fluctuation patterns. To achieve a quick and accurate diagnosis based on stack voltage fluctuation, a novel data-driven diagnosis method is proposed. The main contributions of this paper are as follows:

II. DIAGNOSIS BASED ON AR MODEL

A. Overall diagnosis process based on AR model

The overall PEMFC diagnosis process based on output voltage data and AR model can be concluded as figure 1.

1) Collect experiment data of different PEMFC conditions

for training. In this research, the voltage data are measured under 3000 Hz frequency on a PEMFC stack, and both single-fault and multi-fault conditions are researched. 2) For the collected voltage data, intercept voltage profiles by windows. There are 3000 data in each profile, and 140 profiles (70% of total profiles) for each condition. This amount of data is enough for classification.

3) The AR model coefficients can be calculated for each profile and the features for the diagnosis can be obtained. It is explained in section II-B. 4) The classifiers can be trained based on the features.

Different classifiers (ANN, ELM, KNN, SVM) are compared, and the hyperparameters of the classifiers are also researched. The classifiers are explained in section II-C 5) For the online period, firstly the detected stack voltage data can be intercepted as profiles by the window, then the features can be obtained and applied to the trained classifiers. By comparing the diagnosis results with the real conditions, the diagnosis accuracy of different methods can be evaluated.

B. Feature extraction by AR model 1) Principle:

The AR model can describe the development of time series data [START_REF] Qibin | Ecg feature extraction and classification using wavelet transform and support vector machines[END_REF], and it was applied to system identification, future trend forecasting [START_REF] Detti | Fuel cell performance prediction using an autoregressive movingaverage arma model[END_REF], system control [START_REF] Yang | Low power proton exchange membrane fuel cell system identification and adaptive control[END_REF], etc.

y n = p i=1 y n-i × ψ i + e n ( 1
)
Where y is the time-series data, i.e., PEMFC voltage in this study; n is the time index; p is the order of the AR model, which should be artificially specified; ψ i is the coefficient for i th lag data. e n is a white noise whose mean is 0.

The coefficients means the degree that the current output is decided by former data, and the coefficients can be directly applied as features for pattern identification, i.e., diagnosis in our case.

2) Determination of model order: To have an accurate AR model, the model order should correspond to the characteristic of the data. The Bayesian information criterion (BIC) is proposed to search for a balance between the fitting accuracy and model complexity [START_REF]Book reviews[END_REF]. The BIC can be calculated by equations 2.

BIC = k ln(m) -2 ln(L) (2)
Where k is the number of model parameters, i.e., the order of the AR model in this research; L is the likelihood function, which can reflect the accuracy of the fitting; m is the number of the sample data. We can decide the order by choosing the model with the smallest BIC.

3) Calculation of model coefficients: When the order of the model is determined, the coefficients of every lag in the AR model can be obtained by solving the Yule-Walker equation, as shown by equation 3.

        γ 1 γ 2 . . . γ p         =         γ 0 γ -1 ... γ 1-p γ 1 γ 0 ... γ 2-p . . . ... . . . . ... . . . . ... . γ p-1 γ p-2 ... γ 0                 ψ 1 ψ 2 . . . ψ p         (3)
γ k = E((y i -µ)(y i-k -µ)) (4)
Where the γ k is the expectation of the auto-covariance for k order lags; µ is the expectation of the series data. There are a lot of methods to solve the Yule-Walker equation, such as the least square method, covariance method, and Burg method [START_REF] Hannan | The determination of the order of an autoregression[END_REF]. In this research, the Burg method is applied, as it needs no assumption about the out-of-range data.

By the identification of the AR model, the coefficients of every lags in equation 1 can be set as the feature vector of the voltage profile.

C. Classification

With the identified features, the objective of diagnosis is to find out the matchup relationship between the features and operating conditions. Four widely used methods are applied and compared in this research, including KNN, ANN, ELM, and SVM.

1) K-nearest neighbors method: K-nearest neighbors (KNN) is one of the simplest methods for classification [START_REF] Cover | Nearest neighbor pattern classification[END_REF]. The principle of KNN is to find the closest points of the aim point and then classify it to the class that appears most times around it.

2) Artificial neural network: The second method applied in this research is the ANN method [START_REF] Lippmann | Pattern classification using neural networks[END_REF]. In the ANN method, there are an input layer, an output layer, and several hidden layers. In each layer, there are several nodes, which are called neurons. The input of a neuron is the linear combination of all the inputs, and the input is transferred by a certain function. The parameters of the network are fitted according to the training data, to make the output of this network closest to the real output.

3) Extreme learning machine: Another widely used classification method is the extreme learning machine (ELM) method. ELM is a particular training method that can be applied to a single hidden layer neural network [START_REF] Huang | Extreme learning machine: Theory and applications[END_REF]. Compared with the traditional ANN training method, ELM can give accurate results with less calculation. In traditional training methods, the gradient descent methods are widely applied. However, a big disadvantage of this kind of method is the low efficiency. On the contrary, the ELM method can set the parameters in a random way, thus it can give results with fewer calculations.

4) Support vector machine:

The SVM is also a widely used classifier as it can give accurate results quickly [START_REF] Li | Online implementation of svm based fault diagnosis strategy for pemfc systems[END_REF]. The SVM method can give the maximum-margin hyperplane of the samples, and classify the new samples based on it. The aim of SVM is to find the optimal hyperplane with the maximum distance from the nearest samples. To solve linearly inseparable problems by SVM, the kernel functions can be applied to transfer them into linear separable cases. More details about the SVM method can be found in the reference [START_REF] Li | Online implementation of svm based fault diagnosis strategy for pemfc systems[END_REF].

III. EXPERIMENTS AND CONDITIONS

A. Experiments

To develop diagnosis strategies for a new PEMFC application so that to prevent operation faults and increase the durability of the PEMFC system, the experiments have been carried out using a test bench developed in FCLAB (Belfort, France). The investigated stack is with 12 cells. The characteristics and nominal operating parameters of the stack are given in table I. More details about the test bench can be found in the reference [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF].

B. Single-fault conditions

To study the fault conditions of the PEMFC system in the experiments, different fault conditions have been reproduced by adjusting four operation parameters, i.e., cathode stoichiometry (SC), anode stoichiometry (SA), cooling circuit temperature (T), and the relative humidity level (RH) (by controlling the temperature of the humidifier). Both singlefault conditions and multi-fault conditions have been tested.

8 experiments under single fault conditions were carried out by setting the 4 parameters to higher or lower values than those corresponding to the reference conditions. The detailed operation parameters under different conditions are shown in table II. During the experiment, the stack voltage data is obtained under a sampling frequency of 3000 Hz. As the fluctuations of voltage can reflect the PEMFC state, high-frequency detection of voltage can give more information that is not available by low-frequency detection. In this research, sliding windows are applied to obtain voltage profiles, and the length of the window is set to 3000 points so that one voltage profile can be obtained every second.

C. Multi-fault conditions

In addition to the single-fault conditions, some multifault conditions are also studied. 8 multi-fault conditions are considered and the detailed operation parameters are shown in table III.

IV. RESULTS AND ANALYSIS

In this section, the results obtained by the proposed diagnosis method are presented, and different classifiers are compared and analyzed. Both single-fault conditions and multi-fault conditions are researched, and 200 voltage profiles are applied for each condition.

To show the spatial distribution of features visually, principal component analysis (PCA) is applied to find the most representative features, and the 3 dimensions representation of the main features of samples can be given as figure IV. The samples under different conditions are represented by different colors, and most of them can be separated according to the features. Therefore, the AR model coefficients are effective features that can represent different operating conditions.

A. Accuracy for single-fault conditions

Both the SVM, KNN, ANN, and ELM methods with different hyperparameters are researched and compared. 30% data is set as test subset, i.e., 60 voltage profiles are tested for each operating condition.

To quantitatively evaluate the diagnosis accuracy, the recall rate, precision rate and F1 accuracy are introduced. The recall rate is the ratio of the detected samples and all the existing samples of the real condition. The precision rate is the ratio Fig. 2. The condition clustering based on 3 main features of the right detected samples and all detected samples for a certain condition. To balance the recall rate and precision rate, the F1 accuracy is the harmonic average of recall rate and precision rate.

The recall rate, precision rate, and F1 accuracy of each condition are given as table IV. The mean F1 accuracy is 99.44%, which proves that the proposed diagnosis method is very accurate. The diagnosis is also carried out by different classifiers in this research. For all four methods, the best F1 accuracy of different methods are given as table V.

The SVM method can give the best result than other methods, and the accuracy of the ANN method is almost the same as SVM. However, all four classification methods can give accuracy of more than 92 %, which also proves that the features extracted by the AR model from voltage fluctuation data can represent the operating conditions, and it is very effective for the PEMFC diagnosis.

Also the computational burden is another important criterion for PEMFC diagnosis because it will decide whether the algorithm can be applied in a real application. In this research, the different algorithms all run on a computer with a processor AMD A8-4500M 1.90 GHz, and the computa-tional time is also listed in table V. It can be seen that the SVM is not the most time-saving, while the ELM method is the fastest. However, the computational time is of little importance compared to diagnosis accuracy, thus the SVM and ANN methods are the most suitable for the proposed PEMFC diagnosis algorithm. [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF] 95.5

The same problem was also studied by another method in literature [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF], in which the singularity of the voltage fluctuation data was applied as features. The singularity is an important feature for time-series data calculated by wavelet analysis, and the fault operating conditions are classified by the KNN method. In the research, the diagnosis accuracy is 95.5%, thus the accuracy of the proposed method is higher than the literature, meaning that the AR model coefficients are very effective features.

B. Classification accuracy for multi-fault conditions

The same method is also applied to multi-fault conditions. The accuracy and computational time of the 4 methods are listed in table VI. Similar to single fault conditions, the ANN and SVM can give the most accurate result. However, the ANN method is a little more accurate than SVM in this case, and the performance of the KNN and ELM methods is poor, showing that different methods are suitable for different problems. [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF] 90

For multi-fault conditions, the different fault operating conditions may result in similar health problems in PEMFC and affect each other, thus the situation is more complex and the voltage fluctuation is less regular. Therefore, the accuracy of the multi-fault conditions is a little lower than single-fault conditions. However, the accuracy of the proposed method is 93.18 %, and it is superior compared to the diagnosis accuracy of literature [START_REF] Benouioua | On the issue of the pemfc operating fault identification: Generic analysis tool based on voltage pointwise singularity strengths[END_REF], which is 90%. Therefore, the proposed method can provide better diagnostic accuracy for both single-fault conditions and multi-fault conditions. V. DISCUSSIONS

The quantitative research about the effect of sampling frequency and window length on the diagnosis accuracy has not been studied yet. By applying the voltage data with different frequencies and different window lengths in the proposed diagnosis algorithm, the diagnosis accuracy can be obtained as figure 3. According to the figure, the longer is the window length and the higher is the sampling frequency, the higher is the diagnosis accuracy. It also proves that highfrequency sampling is meaningful for PEMFC diagnosis. This is because more data can include more information about the system health state. 1) The AR model coefficients are first time applied as features to classify the PEMFC operating conditions. The AR model can well describe the voltage time-series data and provide information for voltage fluctuation patterns. The stack voltage can be applied to diagnosis directly. 2) With the proposed diagnosis method, 9 single fault operating conditions and 8 multi-fault conditions of the PEMFC system can be classified accurately, and the data acquirement time is only 1 second, which is very important for early fault detection. 3) A higher detection frequency and a wider sample window can increase diagnostic accuracy. Therefore, increasing the sampling frequency can help to obtain enough data for accurate diagnosis within a shorter measure time, which is beneficial for timely diagnosis and treatment.

Fig. 1 .

 1 Fig. 1. The diagnosis processes based on voltage data and AR model

Fig. 3 .

 3 Fig. 3. The diagnosis accuracy under different sampling frequencies and different window lengths

  For the first time, the quantitative effect of voltage sampling frequency and sample window length on the diagnosis accuracy is studied. It proves that a higher sampling frequency or longer data profile is beneficial to diagnosis accuracy.

	model, and the model coefficients are directly used
	as the features to classify the different fault operating
	conditions. The advantage of this method is that only
	stack voltage data are needed, and the voltage profile
	can be obtained every 1 second, thus it is quicker and
	more practical.
	2) The diagnostic method is experimentally demonstrated
	under extensive fault operating conditions. 9 single
	fault conditions and 8 multi-fault conditions are re-
	searched, and those conditions relate to the fault of the
	anode stoichiometry (SA), cathode stoichiometry (SC),
	relative humidity level (RH), and the cooling circuit
	temperature (T). The diagnosis is then carried out
	by several classifiers (ANN, ELM, KNN, and SVM),
	and both the accuracy and computational times are
	compared.
	3)
	1) A novel PEMFC diagnosis method is proposed, in
	which the stack voltage time-series data are applied.
	The voltage fluctuation patterns are identified by AR

TABLE III THE

 III OPERATING PARAMETERS UNDER MULTI-FAULT CONDITIONS

	Parameters Ref DFSC DFSA DT DRH DT+DFSC DT+DFSA DT+DRH
			2.6				2.6
	SC	2	1.6	2	2	2	1.6	2	2
				1.5				1.5
	SA	1.3 1.3	1.2	1.3 1.3	1.3	1.2	1.3
	T ( • C) 70 70	70	72 65	70	65	65	65
						54
	RH(%) 50 50	50 50	46	50	50	54
	Ref: reference/normal condition;

DFSC: cathode flow fault, higher or lower than normal; DFSA: anode flow fault, higher or lower than normal; DT: stack temperature fault, higher or lower than normal; DRH: relative humidity fault, higher or lower than normal; DT+DFSC: cathode flow fault with lower temperature fault; DT+DFSA: anode flow fault with lower temperature fault; DT+DRH: relative humidity fault with lower temperature fault;

TABLE VI THE

 VI BEST F1 ACCURACY AND CORRESPOND COMPUTATIONAL TIME BY

	DIFFERENT CLASSIFICATION METHODS FOR MULTI-FAULT CONDITION
	method	accuracy / % computational time (s)
	KNN	85.75	0.0748
	ANN	93.18	0.0385
	ELM	80.8	0.0590
	SVM	91.77	0.0756
	literature

ACKNOWLEDGMENT

The work performed was done thanks to the "Decentralized energy production" project, directed by EFFICACITY, the French R&D Institute for urban energy transition. We also gratefully acknowledge the support of this work by China Scholarship Council (CSC).