Parameter Identification of Proton Exchange Membrane Fuel Cell Based on Hunger Games Search Algorithm

This paper presents a novel minimum seeking algorithm referred to as the Hunger Games Search (HGS) algorithm. The HGS is used to obtain optimal values in the model describing proton exchange membrane fuel cells (PEMFCs). The PEMFC model has many parameters that are linked in a nonlinear manner, as well as a set of constraints. The HGS was used with the aforementioned model to test its performance against nonlinear models. The main aim of the optimization problem was to obtain accurate values of PEMFC parameters. The proposed heuristic algorithm was used with two commercial PEMFCs: the Ballard Mark V and the BCS 500 W. The simulation results obtained using the HGS-based model were compared to the experimental results. The effectiveness of the proposed model was verified under various temperature and partial pressure conditions. The numerical output results of the HGS-based fuel cell model were compared with other optimization algorithmbased models with respect to their efficiency. Moreover, the parametric t-test and other statistical analysis methods were employed to check the robustness of the proposed algorithm under various independent runs. Using the proposed HGS-based PEMFC model, a model with very high precision could be obtained, affecting the operation and control of the fuel cells in the simulation analyses.


Introduction
Nowadays, DG is considered to be one of the prominent solutions in distribution networks. The use of DG has several advantages, including: (a) being a quick solution that defers the required expansion of the distribution network, (b) if the network deferral is imminent, new capacities are reduced, (c) it also supports the bus and overall system voltage, (d) it mitigates power losses considerably, (e) it increases the reliability of the distribution system, (f) above all, it decreases the amount of emitted green-house gases [1][2][3]. Of course, all of the aforementioned points are realized when using renewable energy resources with DGs. PEMFCs are considered to be one of the most promising clean DG units.
In PEMFCs, electrical energy is obtained from chemical reactions without producing any harmful emissions [4,5]. However, there are many industrial variants of fuel cells with similar concepts, including SOFCs [4][5][6], PEMFCs [7,8], etc. [9]. High performance is one of the notable merits of PEMFCs, along with their zero-waste material characteristics. PEMFCs operate at temperatures ranging from 50 to 100 • C, with efficiency lying between 30% and effect on all of the search steps. The HGS algorithm follows the games that are used by animals in the process. Actually, these games are considered to be evolutionary adaptations that represent the seeking out of food and the chance of survival of animals. The HGS algorithm has various merits, including a simple procedure and a high convergence speed, and it leads to high-quality solutions. Furthermore, it was verified by comparing its results with the results of other optimizers on 23 mathematical functions of the standard IEEE CEC 2014 test. Moreover, the HGS algorithm has been applied to solve several engineering problems [49].
In this paper, a novel implementation of the HGS algorithm is considered in order to obtain optimal values for the model representing the PEMFC. The PEMFC model has many parameters that are linked in a nonlinear manner, along with a set of constraints. The HGS is used with the aforementioned model to test its performance against nonlinear models. The main aim of the optimization problem is to obtain accurate PEMFC parameter values. The proposed heuristic algorithm is used with two commercial PEMFCs-the Ballard Mark V and BCS 500 W fuel cells. The fitness function of the optimization problem relies on the sum of square error obtained between the estimated and experimental fuel cell voltages. The constraints of the optimization problem are based on the boundaries of the design variables or model parameters. The simulation results obtained using the HGS-based model are compared with the experimental results. The accuracy of the proposed model is validated under variations in both temperature and partial pressure. The numerical results obtained using the HGS-based fuel cell model are compared with those obtained using models based on other optimization algorithms. Moreover, the parametric t-test and other statistical analyses are performed to check the degree to which the algorithm is robust under various independent runs. With the proposed HGS-based PEMFC model, a very accurate model can be obtained, affecting the operation, control of the fuel cells in simulation analysis.
The main contributions of the article include: (1) a novel implementation of the HGS algorithm, seeking to find the optimal values of the PEMFC model parameters; (2) a comparison between the simulation results based on the HGS fuel cell model and the experimental results obtained using two different commercial PEMFCs, (3) a presentation of an accurate model that can be used efficiently under various environmental conditions (with respect to temperature and partial pressure).
In the rest of this article, Section 2 presents the mathematical modeling of PEMFCs, including all of the equations describing it. The theoretical concepts and mathematical equations of the proposed HGS and the formulation of the problem are provided in Section 3. Section 4 then provides an analysis of the simulation and the experimental results. Finally, the Conclusions section wraps up all of the findings as well as proposing future research that the authors suggest should be carried out.

Mathematical Model of Proton Exchange Membrane Fuel Cell
It is well established that the output voltage from a single PEMFC ranges from 0.90 to 1.23 volts. Thus, to obtain the desired voltage and current, the user can connect many PEMFCs in series/parallel combinations [39,50]. PEMFCs have different operating voltages in terms of their I-V polarization curves, which are dependent on their operating conditions. The operating conditions have three categories: (i) low-current conditions, in which the operating voltage is referred to as the activation voltage (v act ); (ii) linear operation, where the voltage is referred to as the Ohmic resistive drop (v R ); and higher loading, where the operating voltage is referred to as concentration voltage (v con ). Therefore, the final voltage output from the PEMFC stack (v Stack ) can be modeled using Equation (1), in accordance with [7,9,10,51]: To calculate each voltage in Equation (1), a series of equations will be used. In order to calculate E Nernst , for operating temperatures of 100 • C (or less), Equations (2)-(5) have the following formulas: Meanwhile, to calculate v act , Equations (6) and (7) will be used. Their formulas are as follows: Then, to calculate v R , Equations (8) and (9) will be used. They have the following formulas: v Finally, the v con can be calculated using Equation (10): Models (1)-(10) above comprise seven parameters (ξ 1 : ξ 4 . λ.R c and β) that were not provided originally in the data sheet of the manufacturers. This means that these parameters need to be obtained using optimization techniques in order to achieve accurate modeling of the PEMFC stack.

HGS Overview, Modeling, and Problem Formulation
The proposed HGS is a population-based algorithm and emulates the hunger-driven activity and social behavior of animals. It was introduced by Y. Yang and others in 2021 [49]. In the concept of the HGS algorithm, an adaptive weight is designed to emulate the effect of hunger on each of the search steps. The HGS algorithm follows the games, which are used by animals in this process. Actually, these games are considered to be evolutionary adaptations that represent the seeking of food and the chance of survival for animals. The following subsections provide an overview, as well as a description of the modeling and the problem formulation.

Overview
The motivation of the HGS optimizer described in [49] was to close the research gap found in all previous swarm intelligence techniques, including both meta-heuristic techniques and heuristic ones. This research gap, present in all other optimization techniques, forces users to focus on operations in order to achieve better convergence, and thus enhance the quality of the results. As a result, HGS was designed to be a general-purpose optimization technique that relies on performance, rather than a change in metaphor. The authors of the technique compared the results of HGS with various well-known optimization techniques in order to prove its superiority. The further analysis of these results is beyond the scope of this paper, and we refer the reader to the original reference [49] for further study.
The authors describe HGS as a novel meta-heuristic optimization algorithm based on swarm intelligence that aims to achieve balance between exploration and exploitation, which could lead to the discovery of more optimal solutions. The HGS has a simple structure that allows it to tackle both constrained and unconstrained problems. The HGS is based on animal activities that are driven by animals' hunger-driven behavior and choices. Hunger was selected due to its simple concept, dynamic nature, motivation of crucial importance, and the fact that the search is dependent on fitness. This means that hunger adapts each step of the optimization process. The HGS follows game theory based on the individual rule and its rival rules in an adaptive way.
The HGS algorithm consists of the following stages: initialization, fitness evaluation, sorting, hunger updating, weight updating, and location updating.

HGS Mathematical Modeling (Step 1): Approaching Food
For the (t) individual, its location is based on foraging behavior, and can be modeled mathematically as follows: The factor − − → X(t) × (1 + randn (1)) models the individual's search for food, in the current location, with a random hunger behavior. Meanwhile, the factor | − → depicts the t th individual's activity range, and the multiplication by factor − → W 2 simulates the effect of hunger on the activity of the individual. To control the activity of the individual, the term → R is introduced. When → R gradually approaches 0, this indicates that the individual is no longer hungry, i.e., the individual's activity is halted. Then the term − → W 1 × − → X b is added/subtracted to simulate that the individual has been informed that its peers have arrived at the location of the food, this stimulates the individual to search for food in its current location. Subsequently, the term → W 1 denotes the error experienced by the individual in acquiring the actual position of the food.
To calculate the variation control in all positions, the following equation is used: where i = 1, 2, · · · , n. In addition, sech(x) = 2 e x +e −x . → R can be calculated using the following formula: Energies 2021, 14, 5022 6 of 21 In the problem space, the HGS relies on the logic of searching depending on the following: • Search based on → X : the first game models the individual's independent efforts to search for the food out of hunger, and in a manner that is non-cooperative with other individuals.

•
Search based on − → X b : the second and third games model the cooperation between individuals by means of sharing information regarding the location of food. By tuning the variables → R, − → W 1 , and − → W 2 , the position of the individual can be updated on the basis of the findings of other individuals.

HGS Mathematical Modeling (Step 2): Hunger Role
In this section, the individual hunger − → W 1 , from Equation (11), is modeled using the following model: Meanwhile, the other hunger − → W 2 , also from Equation (11), has the following formula: where hungry represents the hunger of each individual. To calculate the term hungry(i), Equation (17) is used: where AllFitness (i) indicates the fitness value of all individuals in this iteration. For any iteration, the hunger value of the best individual is set to 0. For the remaining individuals, a new value of their hunger (H) is calculated using the original hunger. This means that as an individual's hunger changes, the corresponding value of (H) will change as well. The formula of (H) is as presented in Equations (18) and (19), as follows: The factor F(i) − BF indicates the amount of food that the i th individual needs to satisfy his hunger. This value changes with each iteration. Meanwhile, the factor WF − BF describes the individual's capacity for food foraging. Then, the ratio F(i)−BF WF−BF is referred to as the hunger ratio. Finally, the factor r 6 × 2 introduces the positive/negative effects of the factors in the surrounding environment on the individuals hunger.

HGS Pseudo Code and Flowchart
The following pseudo code presents the steps for performing the HGS algorithm: Calculate the fitness of all individuals 5:→ Update BF. WF. X b . BI 6:→ Calculate the Hungry using Equation (17); W 1 using Equation (15); W 2 using Equation (16); 7:→ For each individual 8:→ Calculate E using Equation (12); update R using Equation (13); update positions using Equation (11)  9:→ End For 10:→ t = t + 1 11:→ End While 12:→ Return BF. and X b To sum up the previous equations of the HGS algorithm, Figure 1 presents the steps needed to perform the HGS algorithm:

Problem Formulation
To find the seven unknown parameters of the PEMFC model described in Section 2, it was considered to be an optimization problem with nonlinear constraints. In this problem, the SSD was calculated on the basis of measured and proposed model voltage points. The fitness function was minimized using the HGS algorithm to ensure matching values from both theoretical and actual measurements. The formula describing SSD can be found in [6,7,[29][30][31][32][33][34][35][36][38][39][40][42][43][44][45][46][47] and is as follows: Meanwhile, the fitness function FF has the following formula:

Simulation Results
In this study, the proposed HGS algorithm was applied directly to obtain the unknown parameters of the PEMFC model. To this end, the PEMFC model was considered nonlinear model, possessing a nonlinear nature due the impact of temperature and hydrogen and oxygen pressure. The HGS algorithm was implemented to minimize the objective function, yielding accurate parameters for the fuel cell model. To achieve this end, some commercial PEMFCs were tested, including Ballard Mark V, BCS 500 W, and Nedstack PS6. The detailed datasheets for these fuel cells provided in the vast literature available, while the search space limits for the unknown parameters are provided in [7]. The optimization problem under study was considered as an offline optimization problem, which entails the computational effort not being determinant. The simulations were carried out using the MATLAB program, version R2019a. The PC comprised an Intel(R) Core ™ i7 CPU, 2.6 GHz operating Microsoft Windows 10. The PEM fuel cell model and the proposed HGS algorithm codes were built using the MATLAB environment. The optimal settings of the HGS algorithm involved 50 agents and 100 iterations. Actually, these settings were selected by the designer in order to obtain precise results. To check the robustness of the proposed HGS algorithm, 100 independent simulation runs were performed, and some statistical data were obtained, such as the best value, worst value, and standard deviation (SD). The following subsections provide a detailed analysis of this PEMFC modeling.

Ballard Mark V
The Ballard V 5 kW PEMFC possesses thirty-five cells, which are connected in series. The maximum current of this fuel cell is 70 A. The proposed HGS algorithm was implemented to minimize the objective function in order to accurately obtain the PEM fuel cell model parameters. Several runs were performed, and the best values were chosen. The convergence curve of objective function is illustrated in Figure 2. Notably, this convergence curve is very smooth, with no fluctuations, and it reaches its final value in an expeditious way. Table 1 reports the optimal values of the unknown parameters of the Ballard PEMFC model using the proposed HGS algorithm in comparison with other models using other optimization algorithms. The statistical analysis presented in Table 1. It can be observed that the HGS-based PEMFC model results in a lower fitness value and SD, which demonstrates its superiority with respect to other approaches reported in the literature. This leads to an accurate model of the PEMFC. The current-voltage (I-V) and current-power (I-P) curves of this fuel cell model are shown in Figure 3a,b, respectively. The HGS-based fuel cell model results are compared with their experimental results in Figure 3. It is worth mentioning here that the proposed PEM fuel cell model is very close to the experimental model, and it achieves a very small error that lies within an acceptable range. Moreover, the simulation of the HGS-based fuel cell model was performed under different temperature and pressure conditions. Figure 4a,b depicts the I-V and I-P curves of this fuel cell model under various temperature conditions (25,50,70 and 90 o C), while maintaining the oxygen and hydrogen pressures constant at one atmospheric pressure. It can be observed that as the fuel cell temperature increases, the PEMFC voltage and power increases. Furthermore, Figure 5a,b show the I-V and I-P curves of the fuel cell model under various pressure conditions while maintaining the fuel cell temperature constant at 70 o C. It can be noted that as the partial pressure of oxygen and/or hydrogen increases, the voltage and power of the fuel cell increase. Therefore, these pressures can be carefully adjusted to achieve specific output power from the fuel cell under specific environmental conditions. be observed that as the fuel cell temperature increases, the PEMFC voltage and power increases. Furthermore, Figure 5a,b show the I-V and I-P curves of the fuel cell model under various pressure conditions while maintaining the fuel cell temperature constant at 70 o C. It can be noted that as the partial pressure of oxygen and/or hydrogen increases, the voltage and power of the fuel cell increase. Therefore, these pressures can be carefully adjusted to achieve specific output power from the fuel cell under specific environmental conditions.

BCS Fuel Cell
The BCS 500 W fuel cell has thirty-two cells, which are connected in series. This fuel cell is fabricated using BCS technology. The maximum current of the fuel cell is 30 A. The proposed HGS algorithm was implemented to minimize the objective function in order to accurately obtain the PEMFC model parameters. Several runs were performed and the best values were chosen. The convergence curve of objective function is illustrated in Figure 6. It can be observed here that the convergence curve is smooth, and it quickly reaches the final value. Table 2 demonstrates the optimal values of the unknown parameters of the BCS fuel cell model using the HGS algorithm in comparison with other models using other optimization algorithms. The statistical analysis is provided in Table 2. It can be

BCS Fuel Cell
The BCS 500 W fuel cell has thirty-two cells, which are connected in series. This fuel cell is fabricated using BCS technology. The maximum current of the fuel cell is 30 A. The proposed HGS algorithm was implemented to minimize the objective function in order to accurately obtain the PEMFC model parameters. Several runs were performed and the best values were chosen. The convergence curve of objective function is illustrated in Figure 6. It can be observed here that the convergence curve is smooth, and it quickly reaches the final value. Table 2 demonstrates the optimal values of the unknown parameters of the BCS fuel cell model using the HGS algorithm in comparison with other models using other optimization algorithms. The statistical analysis is provided in Table 2. It can be noted that the HGS-based PEMFC model leads to lower fitness values and SD. This indicates its great superiority over the other models reported in the literature. This indicates that an accurate model of the PEMFC was obtained. The polarization curves (I-V) and (I-P) of the BCS fuel cell model using the proposed HGS algorithm are shown in Figure 7a,b, respectively. The results for the HGS-based fuel cell model are compared with the experimental results in Figure 7. It is worth mentioning here that the proposed PEMFC model coincides with the experimental model. respectively. The results for the HGS-based fuel cell model are compared with the experimental results in Figure 7. It is worth mentioning here that the proposed PEMFC model coincides with the experimental model. Furthermore, the simulation results of the HGS-based fuel cell model were obtained under different temperature and pressure conditions. Figure 8a,b provide the I-V and I-P curves of this fuel cell model under various temperature conditions (30,50, and 70 o C), while maintaining the oxygen and hydrogen pressures at one atmospheric pressure. It can be observed that as the fuel cell temperature increases, the voltage and power of the PEMFC increase. Furthermore, Figure 9a,b show the I-V and I-P curves of the fuel cell model under various pressure conditions while maintaining the temperature of the fuel cell temperature at 60 o C. It can be noted that as the partial pressure of oxygen and/or hydrogen increases, the voltage and power of the fuel cell increase. Therefore, these pressures can be carefully adjusted to achieve specific output power from the fuel cell under specific environmental conditions.      Furthermore, the simulation results of the HGS-based fuel cell model were obtained under different temperature and pressure conditions. Figure 8a,b provide the I-V and I-P curves of this fuel cell model under various temperature conditions (30, 50, and 70 o C), while maintaining the oxygen and hydrogen pressures at one atmospheric pressure. It can be observed that as the fuel cell temperature increases, the voltage and power of the PEMFC increase. Furthermore, Figure 9a,b show the I-V and I-P curves of the fuel cell model under various pressure conditions while maintaining the temperature of the fuel cell temperature at 60 o C. It can be noted that as the partial pressure of oxygen and/or hydrogen increases, the voltage and power of the fuel cell increase. Therefore, these pressures can be carefully adjusted to achieve specific output power from the fuel cell under specific environmental conditions.

Robustness of the Proposed HGS Algorithm
To check the robustness of the proposed HGS algorithm, the hypothesis t-test was implemented in the Ballard PEMFC model. The hypothesis test is a procedure used to ensure that the characteristics of the population are correct. The goal test checks the statistical evidence for accepting the null hypothesis. To this end, 20 independent runs were carried out on the HGS-based PEMFC model, and the fitness values of each of these runs were recorded and used in the t-test, which was performed using the MATLAB environment. The test employed a 5% level of significance. The h-value and P-value were recorded as 0 and 1, respectively. The value of the test statistics was 0. The degree of freedom of these test records was 19 and the standard deviation was 4.9 × 10 −6 . These statistical

Robustness of the Proposed HGS Algorithm
To check the robustness of the proposed HGS algorithm, the hypothesis t-test was implemented in the Ballard PEMFC model. The hypothesis test is a procedure used to ensure that the characteristics of the population are correct. The goal test checks the statistical evidence for accepting the null hypothesis. To this end, 20 independent runs were carried out on the HGS-based PEMFC model, and the fitness values of each of these runs were recorded and used in the t-test, which was performed using the MATLAB environment. The test employed a 5% level of significance. The h-value and P-value were recorded as 0 and 1, respectively. The value of the test statistics was 0. The degree of freedom of these test records was 19 and the standard deviation was 4.9 × 10 −6 . These statistical measurements indicate the high robustness of the proposed HGS algorithm-based PEMFC model.

Discussion
The proposed HGS algorithm was effectively implemented in order to obtain the unknown parameters of the PEMFC model. As demonstrated in the previous subsections, the proposed algorithm provided the lowest fitness value among the results obtained from other algorithms. This demonstrates its superiority for solving the optimization problem under study. This high performance of the proposed algorithm comes from its appropriate design, which depends on the experience of the designer in finding its optimal settings. Moreover, the proposed algorithm possesses a high convergence speed, with a minimal number of parameters needing to be tuned. This has encouraged many researchers to use it to solve many engineering problems. There is a lack of studies focusing on finding suitable environments in which to operate and store hydrogen pipes, where safety is dependent on certain temperature and pressure requirements.

Conclusions
This paper presented a novel application of the HGS algorithm to efficiently identify the PEMFC model parameters. The PEMFC model can affect the simulation results of fuel cells and their analyses, having dramatic implications in many applications, such as distributed generation, microgrids, and smart grid systems. The fitness function is based on the sum of square error between the identified voltage model and the experimental voltage. The design variables of the model comprise seven unknown model parameters. The proposed HGS algorithm is applied to minimize the fitness function, and yields the design variables under varying constraints. In fact, this optimization problem was built in response to the shortage of PEMFC data provided by the manufacturers. The simulation results of the HGS-based model demonstrated its accuracy in comparison with the experimental results. Moreover, the simulation results demonstrated the capability and flexibility of the model for studying fuel cells under different environmental conditions (i.e., temperature and partial pressure of oxygen and/hydrogen). The results obtained using HGS outperformed those obtained with other optimizers, which was a result of the proper design of the HGS algorithm. The robustness of the HGS algorithm was successfully tested on the basis of several statistical analyses and the parametric t-test, achieving superior values. With the proposed HGS-based fuel cell model, accurate modeling of the fuel cell can be performed. Moreover, the proposed algorithm can be applied to solve other power engineering problem such as those in renewable energy and smart grid systems.