4.2.2. Polynomial Regression

In the case of the Polynomial regression algorithm, two different configurations was trained according to the degree of the polynomial used. First- and second-degree were chosen and tested with 10 K-Fold cross validation. The results for Polynomial regression algorithm is shown in Table 3 for the configuration set to first degree.

**Table 3.** MAE for first-degree Polynomial regression algorithm.


#### 4.2.3. Support Vector Machines for Regression

For the LS-SVR, a Matlab Toolbox by KULeuven-ESAT-SCD was used. This toolbox allows to autotune the internal parameters necessary in the LS-SVR algorithm. The training of this algorithm is made by using this autotune function, and it only generates one model against the others regression algorithm, which creates some different models with different internal configurations. The MAE errors using LS-SVR is shown in Table 4.


**Table 4.** MAE for Least Square Support Vector Regression (LS-SVR) regression algorithm.

#### 4.2.4. Best Regression Local Models Selection

Table 5 shows the best algorithms for the specific application in this paper. These best algorithms were chosen base on the Mean Squared Error (MSE) values for each cluster. Although the algorithm are the same, the internal parameters are different and each model are adjust to its own dataset. Table 6 shows the MSE value calculate using K-Fold cross validation to test the models.



**Table 6.** Mean Squared Error (MSE) for each individual hybrid model.


## *4.3. Validation Results*

To select the best hybrid configuration, a validation dataset is used. This data was separated, and isolated, from the clustering and the regression training phase. Once the best algorithm per cluster is selected, this validation dataset tests the final four configurations of the whole model (a global model and three hybrid models). The results of this validation test is shown in Table 7, and it shows that the best hybrid model is created with three local models.

**Table 7.** Mean squared error for each model


Different error values are calculated with the final configuration to evaluate its performance. The values of these errors are described in the list bellow.


#### **5. Conclusions and Future Works**

The model created in this research predicts the variation in the hydrogen flow consumption by a fuel cell in an early future. The model uses the desired generated power at the output of the fuel cell, the current generated power, and current hydrogen inlet flow as inputs, and it predicts the variation in the inlet flow as output.

A power converter is used to stabilize the electrical voltage in the output of the fuel cell. It produces the desired voltage for the specific application connected to the fuel cell. As the voltage of the fuel cell varies with the different working points, this power converter allows to control only the electrical power produced by the fuel cell; the output voltage of the converter will be constant all the time.

The bioinspired hybrid model created combines different regression algorithms with clustering to increase the prediction performance of the model. The final model includes three local models with an LS-SVR in each one, and the error values with a validation dataset show that it achieved good results. The NMSE was 0.45, and the MAE was 3.73.

As future works, it is possible to mention the integration of this model as a part of the control system. This configuration would allow to create a kind of predictive control that could increase the efficiency of the fuel cell system, as it would predict the reaction of the system.

**Author Contributions:** Data curation, J.A.B.-A. and P.N.; Investigation, H.L.G. and J.L.C.-R.; Methodology, H.A.-M. and H.Q.; Project administration, J.L.C.R. and P.N.; Software, H.A.-M. and J.-L.C.-R.; Supervision, E.J. and J.L.C.-R.; Validation, H.Q. and J.A.B.-A.; Writing, original draft, E.J. and H.L.G.

**Funding:** This work has been funded by Consejería de Educación (Junta de Castilla y León) through the LE078G18 project (UXXI2018/000149. U-220).

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