Optimal Estimation of Proton Exchange Membrane Fuel Cells Parameter Based on Coyote Optimization Algorithm

: In recent years, the penetration of fuel cells in distribution systems is signiﬁcantly increased worldwide. The fuel cell is considered an electrochemical energy conversion component. It has the ability to convert chemical to electrical energies as well as heat. The proton exchange membrane (PEM) fuel cell uses hydrogen and oxygen as fuel. It is a low-temperature type that uses a noble metal catalyst, such as platinum, at reaction sites. The optimal modeling of PEM fuel cells improves the cell performance in different applications of the smart microgrid. Extracting the optimal parameters of the model can be achieved using an efﬁcient optimization technique. In this line, this paper proposes a novel swarm-based algorithm called coyote optimization algorithm (COA) for ﬁnding the optimal parameter of PEM fuel cell as well as PEM stack. The sum of square deviation between measured voltages and the optimal estimated voltages obtained from the COA algorithm is minimized. Two practical PEM fuel cells including 250 W stack and Ned Stack PS6 are modeled to validate the capability of the proposed algorithm under different operating conditions. The effectiveness of the proposed COA is demonstrated through the comparison with four optimizers considering the same conditions. The ﬁnal estimated results and statistical analysis show a signiﬁcant accuracy of the proposed method. These results emphasize the ability of COA to estimate the parameters of the PEM fuel cell model more precisely.


Introduction
No doubt, clean energy technologies play a part an important role in defeating fossil fuel tiredness and global pollution.Proton exchange membrane fuel cells (PEMFCs) are prime examples of these technologies for electrochemical energy conversion [1].Proton exchange membrane fuel cells (PEMFCs) are considered an effective variant to diesel distributed generations that can back up electricity and balance grid power.The key merits of these PEMFCs in power system applications are high start-up reliability, little costs for startup, low carbon emissions, rapid reaction to demand changes, and quiet operation [1][2][3][4][5].For these reasons, the hydrogen-fueled cars on the global market have been fed by PEMFCs, where they participate in about 90% of fuel cell research and development [6].For instance, in Finland, a substantial amount of hydrogen is extracted as a byproduct in industrial factories that specialize in chlorine and sodium chlorate, whereas the hydrogen quality is adequate for employment as a sustainable fuel in PEMFCs [7,8].As a result, this hydrogen can be used in PEMFC power plants that operate at partial loading conditions, and so they can yield an important quick load cover in power systems, besides other renewable energy sources [9][10][11][12].In this regard, fuel cell units are considered as electrochemical Appl.Sci.2021, 11, 2052 2 of 15 energy conversion devices in AC and DC power networks [13,14].These units can convert chemical energy to electrical energy besides heat while they use oxygen and hydrogen as fuel.It is a low-temperature form that uses a noble metal catalyst, such as platinum, at reaction sites.In addition, energy releases during the reaction [15][16][17].The fuel cell chemical reactions produce dc electricity, heat, and liquid water [18,19].
The parameter estimation of fuel cells has attracted research interest in recent years.A PEMFC is considered one of the most promising devices that convert chemical energy fuels into electrical energy based on electrochemical responses [15][16][17][18].Specifically, the PEMFCs have numerous rewards, e.g., good electrical efficiency, little emission, and flexibility in fuel, that make them applicable to diverse applications [20][21][22][23][24].For instance, they can apply in the combined tough issue owing to PEMFC being a compound multivariable powerfully coupled scheme.For getting precise values for these parameters, numerous methods have been introduced in the literature.Most importantly, the usage of meta-heuristics has arisen as a viable and talented choice by reason of their robustness, ease of application, simplicity, and derivative-free generation of both electric power as well as heat.
To additionally enhance the PEMFC performance, numerous efforts have been made by researchers that are carried out to guess the parameters of the PEMFC, which can be summarized as follows:

•
The hybrid artificial bee colony technique for estimating the parameter of PEMFC in [28];

•
The estimation of PEMFC parameters was obtained by a combination between backtracking search technique combined with Burger's chaotic map in [29]; • A P systems-based optimizer for parameter estimation of PEMFC model in [30];

•
Another optimization called biogeography-based optimization technique improved by adding with mutations to estimate the parameter of two renewable energy cells solar and fuel cells in [31];

•
The parameter estimation problem based on the fuel cell polarization curve using bird mating optimization algorithm in [32];

•
In [35], the harmony search optimizer was developed for parameter identification of a PEMFC model;

•
Due to the recent development in machine learning methods [36,37], the authors of [38] the convolutional neural network have been used for the PEMFC parameters identification;

•
In [39], the PEMFC parameters are extracted based on the polarization curve and provide the behavior analysis considering the various temperature impacts;

•
In [5], the Matlab/Simulink-based model was proposed in conjunction with a waste heat recovery system; and

•
In [40], the parameters of PEMFC are identified by using a new modified version of the differential algorithm associated with the collective guidance factor.
In recent years, many optimization techniques were developed for several engineering problems.In particular, COA is a recent method for global optimization problems.It is a population-based metaheuristic technique.The COA has been classified as both swarm intelligence and evolutionary heuristic and it is based on the coyotes' behavior.The fitness function is reduced using the social structure and exchanging experiences between the coyotes instead of hunting only.In this regard, we propose a novel method to detect the unidentified parameter of the electrochemical model for PEM fuel cells in this paper.Specifically, a new swarm-based algorithm called coyote COA is developed to determine the accurate parameter of PEM fuel cells.In the proposed optimization model, the fitness function is minimized based on both the social structure and swapping experiences amongst the coyotes instead of only hunting.The main merit of COA is that it has no control parameters, and therefore it is a promising optimization tool compared with those in the literature.The efficacy of the proposed method is established while a significant improvement in the accuracy of the estimated parameters of PEM fuel cells is attained.
The reminder of this work is organized as follows: In Section 2, the electrochemical models of the fuel cell are presented.Section 3 presents the solution methodology of parameter estimation by using COA.Section 4 demonstrates the results and discussion of the proposed COA capability for solving the parameter estimation problem with aid of PEM fuel cells.Finally, Section 5 concludes the remarks and outputs of this research work.

Operating Principles of PEM Fuel Cell
The PEM fuel cell consists of three basic elements, anode, proton exchange membrane, and cathode.The hydrogen gas ionizes producing protons and electrons.The reaction of the anode site is given as follows: At the cathode site, a reduction process occurs, where oxygen molecules react with electrons from the circuit and protons from the electrolyte (proton exchange membrane) forming water.Equations ( 2) and (3) describe the reaction at the cathode site and the overall reaction of the cell.

Output Voltage of PEM Fuel Cell
The output voltage at the terminals of a single PEM fuel cell, V cell , has resulted from thermodynamic potential, E Nernst , and the potential losses within the conversion process [16,41], V cell = E Nernst − (All losses in a f uel cell). (4) The thermodynamic potential E Nernst can be determined from Equation (5) for the fuel cell.It depends on hydrogen/oxygen at real functioning conditions, the partial pressure of hydrogen (P * H 2 ) and oxygen (P * O 2 ), and temperature (T in Kelvin).
The losses associated with PEM fuel cells are classified into three categories; activation, ohmic, and concentration losses.These losses caused the variation of the output voltage of the fuel cell with the load current [18].The relation between cell terminal voltage and the load current is known as the polarization curve.
Figure 1 depicts the voltage losses of PEM fuel cells at different current levels.The PEM fuel cell has three categories of losses; activation loss, ohmic voltage loss, and concentration loss.
The losses associated with PEM fuel cells are classified into three categories; activation, ohmic, and concentration losses.These losses caused the variation of the output voltage of the fuel cell with the load current [18].The relation between cell terminal voltage and the load current is known as the polarization curve.
Figure 1 depicts the voltage losses of PEM fuel cells at different current levels.The PEM fuel cell has three categories of losses; activation loss, ohmic voltage loss, and concentration loss.Activation cell loss is the first category and the most dominant loss, especially at the beginning of the reaction.This is because of the slowness of the reaction resulting from electronic barriers that needed to be overcome [17].This loss is defined as the portion of voltage, lost to enable ions to flow from one electrode to another [26][27][28].It can be determined by Equation (9).
where the factors ξ 1 − ξ 4 are coefficients for activation loss voltage varied due to load current, I, at actual temperature, T(K), and oxygen concentration,   2 * .
The value of   2 * depends on the partial pressure of oxygen   2 * and the actual temperature.
The second category of losses is the ohmic voltage loss.It has resulted from resistance to electron transfer through cell electrodes and the resistance to proton flow in the solid polymer membrane.
The value of   can be determined using an empirical expression as follows [41]: .
(13) Activation cell loss is the first category and the most dominant loss, especially at the beginning of the reaction.This is because of the slowness of the reaction resulting from electronic barriers that needed to be overcome [17].This loss is defined as the portion of voltage, lost to enable ions to flow from one electrode to another [26][27][28].It can be determined by Equation ( 9).
where the factors ξ 1 − ξ 4 are coefficients for activation loss voltage varied due to load current, I, at actual temperature, T(K), and oxygen concentration, C * O 2 .The value of C * O 2 depends on the partial pressure of oxygen P * O 2 and the actual temperature.
The second category of losses is the ohmic voltage loss.It has resulted from resistance to electron transfer through cell electrodes and the resistance to proton flow in the solid polymer membrane.
where the value of electronic resistance, R c , is unknown.It is considered approximately constant over the cell operating conditions.The value of proton membrane resistance, R m , depends on the membrane characteristics; specific resistivity, ρ m (ohm.cm),area A (cm 2 ), and thickness l (cm).For Nafion membrane, the thickness considered maybe [115:5 mil (127 µm)] [26,27,41].
The value of ρ m can be determined using an empirical expression as follows [41]: The adjustable variable λ, reflects the effective water content of the membrane.It may be 14 under ideal, 100% relative humidity conditions to 22 and 23 under supersaturated conditions [41].
The third voltage loss of PEM fuel cell is the concentration loss, V concentraion .It takes place at a high limiting current (I max ) where the reduction of concentration is a result of the difficulty in transporting sufficient reactant to electrode surface [26][27][28].
where b is the unknown parametric coefficient.
The output voltage of the PEM fuel cell is determined by Equation (15).If fuel cells, n cells , are connected in series to obtain the desired voltage, the resulted stack voltage will be the summation of the output of all cells, as follows [19,27]: 3. Determination of PEMFC Parameter by COA 3.1.Coyote Optimization Algorithm (COA) Figure 2 shows the flow chart of COA that is developed for solving the parameter estimation problem of the PEM fuel cell.The total population of coyotes is divided into a number of packs, N P N* packs.Each pack contains N C N* coyotes.The number of the coyote in each pack is considered as a static value.The total number population can be obtained by multiplying both N P and N C .The solution to the optimization problem depends on the social conditions of the coyote.Each coyote can represent a possible solution to the problem based on its social conditions, soc.The social conditions of the coyote characterize the control variables (X) of a stated global optimization model [42].
COA is a d-dimensional environment representing the space of decision variables.The social condition soc, of cth coyote that belongs to the Pth pack at tth instant of time, is soc P,t C .It can be written as: The evaluation of coyote's social conditions determines the objective function, f it P,t C , which reveals the adaptation of coyotes to environmental conditions.
COA is achieved starting from the initialization of the global population of coyotes, packs with N C coyotes.The preliminary social conditions are designated arbitrarily for each coyote cth of Pth at instantaneous tth and jth dimension as follows: where, LB j and UB j represent the lower and upper bounds of the decision variable jth of the search space, d.The value of the real random number r j lies in the range [0,1], which is generated using uniform probability.The evaluation of the coyotes' adaptive corresponding to the current decision variables is determined.
The diversity of coyotes occurs due to leaving a pack and joining another one.The probability of a coyote leaving its pack or evicted from a pack is P e .It depends on N C and given as follows: P e = 0.005 The number of N C that makes P e > 1 is limited to 14 coyotes inside the pack.
The COA as swarm intelligence facilitates the distribution of social situations and relations all info from the total population.COA, formerly, calculates the cultural tendency of the pack, where O P,t represents the ranked decision variables (i.e., social conditions) of all coyotes in the pth pack at tth instant for every j in the search space of control variables d.The cultural tendency of the pack represents the median social conditions of all coyotes from that defined pack.The birth of a coyote, as well as the death, affects the size of the population.For the purpose of retaining the pack size static, the developed COA tool calculates the ages of all coyotes within a pack as age P,t C ∈ N. Further, the birth of an updated coyote is denoted by a mixture of the social circumstances of two parents in a pack, that is selected arbitrarily, as follows: soc P,t r1,j , randj < P s or j = j 1 soc P,t r2,j , randj ≥ (P s + P a ) where r 1 and r 2 represent the two random parameters of coyotes within the Pth pack.j 1 and j 2 are arbitrary dimensions of the optimization model.P s and P a represent, respectively, the scatter and association probabilities, specified by Equations ( 24) and ( 25).R j represents an arbitrary number that lies in the control variable bound of the jth dimension.Note that the values of the real random number r and j lie in the array [0.1],where they are produced by uniform probability.
Top reserve the population size as a static one, the birth and the death of specified coyote are treated by the following stages (Algorithm 1):

Algorithm 1. Solution steps of COA
Step1: Calculate the group worse modified to the environment than the pups, w and the number of the coyote in this collection, ϕ.Step2: Check if ϕ is one then go directly to step3, else if ϕ is larger than 1 goes directly to step4, else the pub should die.
Step3: This step involves that each pub survives while the only coyote on behalf of w is supposed to have died.
Step4: The pub in this step survives while the oldest coyote in w dies.In the case of two or more coyotes have similar ages, the individual with fewer ages dies.
The interaction between all coyotes in the global population in general and that inside each pack especially aid the cultural exchanging.The intelligence of coyotes and the sufficient organization assistance them to appraise their social circumstances considering the finest one inside the pack, al pha P,t , and the cultural tendency of the pack, cult P,t .This can be achieved by taking two factors δ 1 and δ 2 into account when a coyote updates its social conditions.The influence δ 1 is occupied as the change from an arbitrary coyote (Cr1) within the pack to the alpha coyote in a similar pack.Further, the pack influence (δ 2 ) is the change from an arbitrary coyote (Cr2) of a pack to the cultural tendency of the same pack.δ 1 = al pha P,t − soc P,t Cr1 (26) The new social condition of a coyote is updated as follows: where, r 1 and r 2 are random numbers within the range [0,1], which generated using uniform probability.
The evaluation of the new social condition results in a new value of the objective function.
At the next (t + 1)th instant of time, the coyotes decide if the new social condition is better than the older or not.If new_ f it P,t  C is less than f it P,t C (for minimization problem), then the decision is that the new social conditions are the best at that instant.Equation ( 30) explains this decision.
The global solution to the problem is that the social conditions of a coyote that best adapted itself to the environment.

Parameter Optimization of PEM Fuel Cell
The optimization of the proposed problem aims to identify the unknown parameter of the electrochemical model for PEMFCs.The optimized model must be accurate as possible to converge with the actual model.The set of control variables (x) of the parameter estimation problem is represented by x = {ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , λ, and b}.It is important to optimize these seven parameters affecting Equations ( 9)-( 14) to obtain the stack output voltage of the modelled PEMFCs.The calculated stack voltage is required to converge with the experimental values of the actual stack.To realize the convergence, the sum of square error (SSE) between the measured and modelled stack voltage must be minimized.The Coyote optimization algorithm as a metaheuristic optimization algorithm is used to minimize the objective function of the problem.
where n represents the number of real voltages at dissimilar load current.The problem can be stated as an optimization problem, as follows: subject to All control variables are preserved within the lower and upper boundaries as presented in Equation (33).

Results and Discussion
To validate the efficiency of the proposed COA, two practical cases of 250 W PEM stack [26,27] and NedStack PS6 [43][44][45] have been studied.The proposed algorithm is verified by means of the data in the literature [26,27,44].The parameters, technical, and working circumstances of the tested stacks are given in Table 1.Further, Table 2 shows the lower and upper bounds of the decision variables of the model at two different operating condi-tions, (operating condition #1: 1/1 bar and 343.15 K) for both stacks (250 W and NedStack PS6) and (operating condition #2: 3/5 bar and 353.15 k) for 250 W stack.The simulation results have been compared to other literature works [18][19][20][21][22].Moreover, four competitive methods; SSA [46], SCA [47], MFO [48], and PSO [16] have been implemented to test the effectiveness of COA.For a fair comparison, all of populations are set to 100 with 400 iterations.All simulation results were carried out using the MATLAB R2016b software on a PC with Intel (R) Core (TM) i3-CPU M370@2.4GHz 3 GB (RAM).Herein, the optimization techniques aim to minimize the square deviation between measured V-I data and the estimated data by the stack model.This optimization process results in extracting the optimal values of the decision variables (ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , λ and b) of the PEM stack model.These variables are used to obtain an accurate model of the PEM fuel cells stack.The simulation results for the two studied cases are explained as follows:

Case 1: 250 W PEM Stack
Table 3 clarifies the extracted optimal decision variables using the proposed algorithm, COA compared to existing literature, and other four competitive methods at 343.15 K and 1/1 bar.In our problem, it is anticipated to lessen the variance between the output voltages of the proposed optimization model with respect to the measured values at dissimilar current values.As noticed from Table 3, the ranking of SSE is COA followed by PSO [16], HGA [18], HADE [25], MVO [27], SSA [46], SCA [47], and MFO [48].At operating condition #2 (353.15K and 3/5 bar), the comparison of the simulation results shows that COA has the ability to estimate an accurate model of PEM 250 w stack with lower SSE (0.6691) compared to the others, Table 4.The value of SSE with COA is less than HABC by 91.64%, HADE by 91.62%, and 81.33% compared to MOV.Moreover, it is noticed from Figure 3a that the convergence of the objective function occurred quickly smoothly after about 27 iterations.The polarization (I-V) curve is shown in Figure 3b with the effect of different losses.The activation loss, as noticed, has a large value compared to the concentration loss which has been recorded as the lower value.Figure 4 shows the polarization curve (V-I curve) of the 250 W PEM fuel cell stack at different operating conditions and two boundaries of decision variables (bound #1 and bound#2).The figure shows the best agreement of the model curve with measured values.The power of the stack model is plotted and compared to the measured value, as presented in Figure 5.At four working settings, two for examining the proposed model and the other ones for legalizing the model, a set of the polarization curves is built.Figure 6

Case 2: 6000 W NedStack PS6 Stack
In the second case, Nedstack PS6 PEM stack, 65 fuel cells are in series with a rated power of 6 kW.The detailed technical characteristics are explained in Table 1.As procedures carried out for the first case study, the results obtained show that the best value of SSE over the 400 iterations is via the proposed COA.The best fitness is 2.10941 which is lower than the corresponding SSE obtained by the selected competitive methods SSA, SCA, MFO, and PSO.Moreover, the results, also, have been compared to the recent literature IAEO [44] and CFSO [45].The results presented in Table 5 emphasize that COA outperforms all reported methods.The optimal parameters of the generated model using the optimization methods are presented in Table 5.The generating model used the estimated parameters have been used to construct the polarization (I-V) curve, as shown in Figure 7.Moreover, the effect of various losses is shown in Figure 7b.The high closeness between generated model and the data-set (I-V) confirms the accuracy of the proposed COA.Again, the convergence rate of COA is compared to others, confirming the effectiveness of the proposed COA to generate a more precise model of PEM fuel cells stack.

Case 2: 6000 W NedStack PS6 Stack
In the second case, Nedstack PS6 PEM stack, 65 fuel cells are in series with a rated power of 6 kW.The detailed technical characteristics are explained in Table 1.As procedures carried out for the first case study, the results obtained show that the best value of SSE over the 400 iterations is via the proposed COA.The best fitness is 2.10941 which is lower than the corresponding SSE obtained by the selected competitive methods SSA, SCA, MFO, and PSO.Moreover, the results, also, have been compared to the recent literature IAEO [44] and CFSO [45].The results presented in Table 5 emphasize that COA outperforms all reported methods.The optimal parameters of the generated model using the optimization methods are presented in Table 5.The generating model used the estimated parameters have been used to construct the polarization (I-V) curve, as shown in Figure 7.Moreover, the effect of various losses is shown in Figure 7b.The high closeness between generated model and the data-set (I-V) confirms the accuracy of the proposed COA.Again, the convergence rate of COA is compared to others, confirming the effectiveness of the proposed COA to generate a more precise model of PEM fuel cells stack.

Conclusions
In this paper, a bio-inspired COA has been introduced for estimating an accurate model of PEM fuel cells.The algorithm identifies the optimum values of the model parameters accurately.Two practical cases including 250 W and 6 kW NedStack PS6 PEM system have been used to analyze the performance of the proposed COA method and its ability to generate a reliable model of PEM fuel cells stack.In COA the optimization process is based on the social structure and exchanging experiences among the coyotes.COA has only two parameters, the number of packs and the number of coyotes per pack that defines the population size, NP and Nc.No control parameters are required for COA.The features of COA are; rapidly, smoothly, and steadily convergence; no required efforts are needed to adjust the control variable of the algorithm as compared to other algorithms.The simulation results including the extracting parameters of the PEM stack and the minimum deviation between the generated model and the measured data point (I-V) are compared to the well-known optimizers.According to the numerical results obtained, COA has the ability and stability to estimate the global optimal parameters of the PEM fuel cell stack with minimal SEE compared to other algorithms.Well agreements between the estimated model using COA and the measured data ensure the effectiveness of COA and the accuracy of the PEM fuel cell stack model.The low value of the SSE emphasizes that COA is an effective and reliable technique in modeling PEM fuel.Thus, the COA is suggested to solve more complicated and large engineering optimization problems.

Figure 2 .
Figure 2. Flow chart of the proposed coyote optimization algorithm (COA).

Figure 2 .
Figure 2. Flow chart of the proposed coyote optimization algorithm (COA).The best social adapted to the environment, alpha, is only one for the global population.It represents the best solution to the optimization problem at tth instant of time of Pth pack.al pha P,t = soc P,t C arg C={1,2,...,N C } min f soc P,t C

Figure 3 .
Figure 3.The convergence of COA curve of 250 W PEM fuel cell and polarization curve at operating conditions #1.

Figure 3 .Figure 3 .
Figure 3.The convergence of COA curve of 250 W PEM fuel cell and polarization curve at operating conditions #1.

Figure 5 .
Figure 5. Power (P-I) curve of PEM fuel cell at operating conditions #1 and #2.Figure 5. Power (P-I) curve of PEM fuel cell at operating conditions #1 and #2.

Figure 5 .
Figure 5. Power (P-I) curve of PEM fuel cell at operating conditions #1 and #2.Figure 5. Power (P-I) curve of PEM fuel cell at operating conditions #1 and #2.
clarifies the polarization curves (V-I curves) at (3/5 bar and 353.15 k/2.5/3 bar and 343.15 k/1.5/1.5 bar and 343.15 k/1/1 bar and 343.15 k).The results obtained show the effectiveness of the proposed algorithm in estimating an accurate model for the PEM fuel stack.

Figure 6 .
Figure 6.A set of polarization (V-I) curves of PEM fuel cells at four operating conditions.

Figure 6 .
Figure 6.A set of polarization (V-I) curves of PEM fuel cells at four operating conditions.

Figure 7 .
Figure 7.The convergence of COA curve of 6 kW NedStack PS6 PEM fuel cell and polarization curve.

Table 1 .
Technical data and operating conditions of PEM fuel cell stack.

Table 2 .
Lower and upper bounds of PEM stack decision variables of two studied cases.

Table 3 .
Optimal decision variables obtained with different method compared to COA for 250 W proton exchange membrane fuel cell (PEMFC) at operating conditions #1.

Table 4 .
Optimal decision variables obtained with different method compared to COA for PEMFC at operating conditions #2.

Table 5 .
The optimal parameters of the generated model using the optimization methods.