dataesr/scientific-paragraphs-categorization huggingface dataset:
, 2018)  or more recently residual neural networks  (Bocquet, Farchi, and Malartic, 2020). Our study investigates an analog forecasting method relying on the principle of the nearest neighbors  (Lorenz, 1969). Analogue methods have the advantage of being computationally inexpensive, so that ensemble forecasts, used in data assimilation, are easy to make. The aforementioned non-parametric procedure has been firstly coupled with data assimilation filtering schemes in  (Tandeo et al. , 2015)  and further detailed by  Lguensat et al. (2017). In the present work, we propose an algorithm, developed in  (Hirvoas et al. , 2021) , interfacing Python library AnDA 1  combining analog forecasting with ensemble data assimilation. The algorithm we propose takes profit of the parallelization capabilities of high performance computing architectures which allows for example to evaluate the real-time damage of an operating wind turbine using a digital twin.
Consequently, this strategy requires the existence of a representative catalog of historical data, denoted by C. The reference catalog is formed by pairs of consecutive hidden-state vectors, separated by the same lag  (Fablet et al. , 2017). The first component of each pair is named as the analog (denoted by a) while the corresponding state is referred to as the successor (noted as s). The corresponding representative dataset of hidden-state sequences can be written as: C = {(a i , s i ) , i = [1 • • • P]}, with P ∈ N * • This historical catalog can be constructed using observational data recorded using in-situ sensors as well as from numerical simulations. Based on this database, the analog forecasting operator A is a non-parametric data-driven sampling of the state from iteration k -1 to iteration k.
A. Case description For the purpose of this work, the considered model is a numerical representation of a reference 2MW onshore horizontal-axis wind turbine based on the open-source aero-servo-elastic software FAST developed by the National Renewable Energy Laboratory (NREL)  (Jonkman, Buhl Jr. et al. , 2005). This numerical code employs a combined modal and multibody dynamics formulation which allows one to consider a limited degree of freedom number for the structure. Moreover, the aerodynamic model relies on the blade-element momentum theory coupled with some corrections, e. g. , dynamic stall. The generation of the synthetic turbulent wind field solicitation uses a Kaimal turbulence model with an exponential spatial coherence method thanks to the TurbSim software  (Jonkman, 2009). Some specifications of the turbine are presented in Table  IV.
The in situ data used to assess the performances of our procedure are based on a specific measurement campaign of eight months from the French national project SMARTEOLE. For that purpose, the wind turbine has a SCADA gathering 10-minute statistics about the external conditions at the level of the nacelle hub, e. g. , wind speed or direction, and also information on the turbine operation, e. g. , generator speed, generated power. Alongside, a Light Detection And Ranging (LI-DAR) system is placed on top of the wind turbine nacelle in order to measure the upstream wind flow conditions. A graphical representation of the monitoring system configuration is proposed in Figure  3. In the study, we suppose that the wind speed at hub height reconstructed from the LIDAR system is the free wind to be applied on the servo-aero-elastic model through the synthetic turbulence wind field.
They consist in performing forward aero-servo-elastic simulations considering known values of the input parameters, and then adding a Gaussian noise of known variance to the simulated measurements. In our study, the simulated data are perturbed by considering a covariance matrix such as the obtained standard deviation is equivalent to a 10% signal-to-noise ratio. The pseudo-simulated responses of the wind turbine structure are generated ∀k ∈ N * ,          x (k) =   x 1 (k) x 2 (k)   =   x 1 (k-1) A (k-1,k) (x 2 (k-1) )   + ε m (k) y (k) = H (k) (x (k) , v (k) ) + ε o (k) • where x 1 (k-1) and x 2 (k-1) are respectively the whittled-down set of five uncertain parameters for the model properties and the wind inflow conditions at iteration k -1 as described in Table  VIII , A (k-1,k) is the analog forecasting operator as detailed in Section III, v (k) is the forcing vector corresponding to the 10-minute mean and standard deviation wind speed obtained from the SCADA system, and H (k) is the combination of the aero-servo-elastic model FAST and the turbulent wind field generation software TurbSim.
For the initialization of the EnKF approach, independent Gaussian distributions are assumed to be the initial prior for each of the input parameters, see Table  VIII. The initial error covariance matrix of the input parameters, denoted by P b , is thus assumed to be diagonal. To create the catalog, we rely on the measurements obtained from both the SCADA system and the LIDAR installed on the onshore wind turbine. A data pretreatment has been performed in order to find any corrupted observations. The obtained database consists in both 4,735 analog situations to be compared to the current parameters related to the wind inflow and their corresponding successors at a 10-minute interval. Figure  5  shows the results of the identification of the considered input parameters by applying the AnEnKF approach with the locally-linear forecasting operator using N = 500 members and K = 50 nearest-neighbors.
It can be noticed that the augmented state vector is well reconstructed by using this non-parametric data assimilation procedure which allows to emulate the dynamical model from a dataset. Indeed, the mean of the empirical distribution obtained from the members of the ensemble is close to the true hidden-state for every parameter. A major advantage of the procedure is the confidence intervals obtained at each inference iteration allowing us to give information about the difficulty to retrieve the value of the input parameters from the measured outputs. We can notice that the uncertainties, represented by the ensemble, have drastically reduced trough the iterations. The confidence intervals take into account the errors related to the model and the observations.
Experimental part Experimental data is required to develop an FDI tool. The amount and type of data depends on the useful information extraction method. There are two main categories of useful information extraction methods: the ones that are based on a fuel cell model and the ones that are not. The experimental data can be composed of the different measured fuel cell operating conditions  (temperature, pressure, current. variations). This data is used for model-based diagnosis methods (explained in Section 5. 2), which consists of comparing the outputs of a fuel cell model with the same outputs of realtime measurements. The amount of required experimental data is low if the model is based on physical equations (grey box model) and large if it is a black box model as data is required to train the model.
Database formation and labeling In diagnosis applications, the real time measurements are compared to a database during the classification. This database substantially influences the diagnosis results. The data may come from different sensors or characterization techniques. As the selection of the measurements and characterization method is very important, a focus is presented on this subject in Section 4. Labeling the database is another important step in the diagnosis tool conception. Labeling consists in attributing a label or a class (typically healthy, flooded, dried. ) to the experimental data. This step is especially required for non-model based useful information extraction methods. This is tricky because it requires the identification of exact fault, the moment when it is created, as well as its duration.
2. 3 and 5)  Finally, the real-time extracted useful information is compared to the selected embedded experimental database. This comparison is performed using a classifier, which type and internal parameters have been determined during the offline classification algorithm selection (see  Sections 2. 2. 4 and 6). In some model-based applications, a complex classifier is not required. The classification is performed by evaluating the value of the residual between the model and the real time measurement. Typically, if the difference between the real time voltage and the voltage determined by the model in healthy conditions is high, the fuel cell is considered as faulty (for more information, refer to Section 6). In this case, only a threshold value is required to identify whether the fuel cell is in healthy or faulty condition.
Memory space In a vehicle, data storage capacity is limited. The comparative database to which real time samples are compared during classification must be stored in the vehicle microcontroller. This requires internal memory space. Thus, the database should be adapted to the available storage capacity. However, a minimum of data samples is required as the diagnosis should be adapted to the largest number of situations in a vehicle. In other words, the diagnosis should work properly at the beginning of fuel cell life, but also after several hundred or thousand hours of operation. Therefore, the embedded data quality and representativeness are crucial for diagnosis application.
Mohammadi et al. (2015)  applied an FFT to the voltage signal in order to detect fuel cell drying and flooding. The authors identified the 7 first harmonics as being the relevant features for drying and flooding detection. Model based methods have also widely been used for fuel cell diagnosis purposes. Gu et al. (  2021 ) developed a PEMFC model to detect flooding using a Long Short Term Memory (LSTM) neural network. They implemented their flooding diagnosis tool to a microcontroller and tested it on an automotive fuel cell system. The algorithm was developed offline using Matlab and implemented online using Simulink. Lu et al. (  2019 ) modified a Randle model to better fit to the fuel cell. The Warburg was replaced by parallel resistance and capacitor and replaced the double layer capacitor by a Constant Phase Element (CPE).
With a similar approach, Laribi et al. (  2019 ) used a feed forward neural network with two hidden layers of 20 and 10 neurons. This neural network enables to estimate the Randles model parameters, namely the membrane resistance, the double layer capacitance, the polarization resistance, the diffusion resistance, and the diffusion time constant. The values of those parameters indicated the health sate of the fuel cell and enabled to detect drying or flooding. Pohjoranta (2015)  modeled the voltage of a multi stack SOFC using six recurrent neural networks with 5 hidden neurons and 10 past inputs. They used the Apros and Matlab tools to extract online residuals and detect fuel cell degradation. In  Zheng et al. (2017) , a reservoir computing method is used on frequential signals to diagnose PEMFCs faults.
Vural et al. (2009)  used an Adaptive Neuro-Fuzzy Inference System (ANFIS) to model a PEMFC voltage. The inputs on the model were the current density, fuel cell temperature, anode and cathode dew points and anodic and cathodic pressures. The authors implemented their model using Matlab. As mentioned in Section 5. 2. 2, Support Vector Machines (SVM) can be used for classification or modeling purposes. In that sense,  Zhong et al. (2006)  modeled a Ballard PEMFC using SVM. The authors used a Radial Base Gaussian Function as a kernel function of the SVM. The inputs of the models were only current density and stack temperature. One limit to model based methods to diagnose fuel cell faults is the evolution of the fuel cell response over ageing. To overcome those problems, some authors modeled fuel cell considering their degradation for prognosis purposes.
Supervised classification algorithms tools compare a new sample to an existent database with known labels. On the contrary, unsupervised classifiers group the existent database with the new sample without prior information of the classes. Note that for comprehension purposes, the algorithms are presented as binary classifiers in the next sections: there are only two classes. It is however possible to apply those methods to multiple classes. In this section, the firsts two subsections explain the different supervised and unsupervised classifiers. The third subsection present classification methods using thresholds and ensemble methods. References of the use of classifiers for fuel cell diagnosis are given in the fourth subsection.
Supervised classification algorithms gather the k-nearest-neighbor (KNN), the Support Vector Machine (SVM), the decision tree, the random forest, the naïve bayes, neural networks classifiers, etc. The term supervised means that the labels of the training dataset are known. In other words, when a new sample is classified by a supervised classifier, it is compared to a bench of other samples, which labels have been identified beforehand. As presented on Fig. 6a , the k-nearest-neighbor (KNN) algorithm consists in: • calculating the distance of a new incoming point with all the database points (of which labels are known). • The attributed class to the new incoming point is the majority class of the k nearest points. The two variables of the KNN algorithm are the choice of k and the type of distance (Euclidian, Manhattan, cosine.
). More details on the KNN algorithm operation and application can be found in  Li et al. (2014). The main advantage of the KNN algorithm is that it is easy to understand its principle and use. However, the distances between the new sample and all the database points must be computed at each iteration, which makes it time consuming. Three mains naïve bayes classifiers exist: the gaussian naïve bayes classifier, the multinomial naïve bayes classifier and the Bernoulli naïve bayes classifier. Their names stand for the utilization of the Bayes theorem and the term naïve refers to the naïve assumption that the variables are independent. The classifiers determine the likelihood of being in a class or in another. The class that is the most probable is chosen. The Gaussian Naïve Bayes algorithm (presented in Fig.
• The second-best feature is selected, and the classification is made once again. This is repeated for all the features. A variant of the decision tree classifier is the random forest algorithm. As presented on Fig. 6d , the idea is to build a forest of multiple decision trees. The selected class is the mode of the prediction of all the decision trees in the forest. Random forest belongs to ensemble method which combines multiple classifiers. Using multiple decision trees usually improves the classification accuracy. Neural networks can also be used for classification purposes (see Fig. 6f ). The training of the neural network for classification problems consists in adjusting the weights and bias values to accurately predict the correct class for a dataset (whose labels are known). Once the weights and bias have been optimized (this is made offline), a new sample can be classified.
Clustering algorithms Unsupervised classification algorithms, also named clustering algorithms consist of grouping a data set into a fixed number of groups. The biggest difference between supervised and nonsupervised classifiers is that the labels are not known in advance for unsupervised classifiers. In other words, non-supervised classifiers consist in grouping the most similar samples of a dataset together. This type of classification is very interesting as preliminary labeling is not necessary. However, the biggest constraint of this type of classification is to select the right number of groups, or the threshold to consider a region as dense. Unsupervised classification algorithms gather the K-means algorithm, the hierarchical classifications, the DBscan (density-based spatial clustering of applications with noise) algorithm and fuzzy classifiers.
It resulted that with the dataset analyzed, all the classifiers had a good classification rate above 90% on their testing dataset. Benouioua et al. (2014b)  used a KNN and a SVM classifier to detect anodic starvation, cathodic starvation, and sub pressure faults. The features have been extracted with wavelet transform modulus maxima algorithm and selected with a Minimum Redundancy Maximum Relevance method. On the dataset tested by the authors, the KNN classifier appeared to have equal or better classification rate than the SVM classifier. Lee et al. (2019)  proposed a hierarchical fault diagnosis at the component level. They detected faults in the stack, the air supply system, the water management system, the thermal management system, and the fuel supply system. They used a model-based approach.
Escobet (2014)  used a Fuzzy Inductive Reasoning methodology to detect and identify faults in a fuel cell system. First, the detection process consists of comparing measured data which are fuzzified and defuzzified to thresholds. The fault identification step is made possible by modeling the different faults. The Fuzzy Inductive Reasoning uses a variant of the  KNN rule. Lim et al. (2021)  diagnosed five component failures of the fuel cell cooling system. The detected failures were the pump performance degradation, the radiator fouling, the tube clogging, the fan disabled and the pump disabled states. They used 5 temperature and 5 pressure sensors to identify component failures with a SVM classifier. Wu and Ye (2016) developed a least square support vector machine classifier to detect anode poisoning and cathode humidification on a solid oxide fuel cell.
They added two hidden semi-Mark models to compute the remaining useful lifetime of the fuel cell. Refs. Li et al. (2018)  and  Zheng et al. (2021)  used a SVM classifier combined with a PCA to diagnose a solid oxide fuel cell. In  Li et al. (2018) , the authors used a multi label SVM with a Radial Basis Function kernel classifier to detect fuel and air leakage at different locations in the fuel cell system. The main advantage of a multi label classifier is that it requires much less data than a single label classifier because it detects the combination of multiple faults with single faults data. The authors used temperature, pressure, and gas flow rate data in different location in the system. Then, a PCA is applied to reduce the dimensions while keeping the relevant information. The data comes from a solid oxide fuel cell system model developed by the authors.
To overcome the problem, they first generated the training database using a SOFC system model. Then, they used a domain adaptation technique, with signals containing random errors of maximum 2% to update the dataset and be able to detect off design operating conditions. Li et al. (2019)  presented a spherical shaped multi-class support vector machine with a diagnosis rule to detect faults of PEMFCs. The authors used high precise cell voltage sensors as input data and a fisher discriminant analysis to extract relevant features of cell voltage data. An incrementation of the database to increase the robustness of fault classification with fuel cell ageing is also proposed. The approach has been implemented in a microcontroller for online applications. Lu et al. (  2019 ) used a binary tree SVM to detect drying, flooding and air starvation.
They used equivalent circuit parameters as features. The authors developed and implemented a fast EIS measurement method. The diagnosis system has been tested online by sending the measured data through USB to a computer. The host computer uses C++ and Matlab to estimate EIS and perform diagnosis. In Ref. Zhou and Dhupia (2020) , the authors used a relevance vector machine to classify features obtained by an Orthogonal Linear Discriminant Analysis. The authors presented an adaptation of the database to be robust to fuel cell ageing. The features were single cell voltages projected in a 5-dimensional feature space. The authors incremented the database when the posterior probability of fault detection was above a threshold. Park et al. (2021)  used seven multi-layer perceptron neural networks having each a single output to diagnose thermal faults in a PEMFC.
With rapid prototyping, the algorithm can be tested in real-time and rapidly corrected, because there are less constraints than on an automotive Electronic Control Unit. Secondly, the algorithm is validated using the same database than the one used offline. The offline algorithm results should be very similar to the real time algorithm results (results may slightly differ, due to variable data precision). With this nonregression test, mistakes in the algorithm implementation can be detected. Thirdly, the rapid prototype is connected to a test bench. Faults are deliberately generated on this test station, to test if the rapid prototype correctly detects the faults. Once the rapid prototype has been validated, the algorithm can be implemented in the targeted automotive Electronic Control Unit (ECU).
Note that the diagnosis algorithm can be implemented to an additional ECU specifically dedicated to diagnosis, or on the existing ECU (dedicated to control). The rapid prototype hardware must be selected according to the type of ECU, as the programming languages should be compatible. As mentioned in Section 2. 4, the type of ECU should be chosen with care, with specifications that are adapted to the vehicle constraints. It should also apply with automotive safety regulations, to the diagnosis algorithm complexity and storage requirements, whilst remaining at low cost and volume. Then, the algorithm is tested using the same database than the one used offline and for the non-regression test of the rapid prototype. Once again, the results of the ECU should be very similar to the rapid prototype ones and to the offline algorithm ones.
Conclusion Fuel cells are prone to faults during operation. Fault occurrence can be limited by a good fuel cell control but not avoided. Faults cause fuel cell degradation and decrease the remaining useful lifetime of the fuel cell system. Fuel cell diagnosis enables real-time fuel cell state of health estimation. Fault tolerant control actions can be taken to correct faults and limit degradation. In other words, fuel cell diagnosis and fault tolerant control improve the fuel cell lifetime while using the best operating range. In this article, the main methods to diagnose a fuel cell stack in a vehicle during operation have been presented. The objective of this paper is to give to the reader an overview of the existing methods to diagnose fuel cells and their constraints in vehicles. As mentioned in Section 2, the database, the filter type, the useful information extraction method, and the classifier method must be determined considering the embedded constraints.
The useful information extraction is the most important step of the diagnosis process. The features or model quality, and accordingly the database quality, drastically influence the classification results. Classification methods are various. Obtaining a standardized optimal classifier is not possible, as its relevance strongly depends on the application. The main restrictive parameter in embedded application is the computational complexity of the algorithm because the Electronic Control Unit (ECU) must be capable of performing the calculations in a matter of seconds. Some algorithms as the gaussian naïve bayes classifier can also reduce the required storage space attributed to classification as only the mean and the standard deviation must be stored. Once again, it is important to highlight that the classification accuracy is mainly linked to the quality of its inputs: the useful information extraction method chosen and the database quality.