Proton Exchange Membrane Fuel Cell Parameter Extraction Using a Supply–Demand-Based Optimization Algorithm

: For proton exchange membrane fuel cells (PEMFCs), the parameter extraction issue is among the most widely studied problems in the ﬁeld of energy storage systems, since the precise identiﬁcation of such parameters plays an important role in increasing the PEMFC performance and life span. The optimization process is intended to adjust the performance of PEMFCs by appraising the optimal parameters that produce a good estimation of the current–voltage (I–V) curve. In order to build an accurate equivalent circuit model for PEMFCs, a reliable and effective parameter extraction algorithm, termed a supply–demand-based optimization (SDO) algorithm, is proposed in this paper. Nine parameters ( ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , β , λ , l , and J max ) are evaluated, to minimize the sum squared deviation (SSE) between the experimental and simulated I–V curves. To validate the feasibility and effectiveness of the SDO algorithm, four sets of experimental data with diverse characteristics and two well-known PEMFC stacks (BSC500W and 500W Horizon) are employed. Comparison of the simulated and experimental results clearly demonstrates the superiority/competitiveness of the SDO algorithm over ﬁve well-established parameter extraction algorithms, i.e., the whale optimization algorithm (WOA), grey wolf optimization (GWO), Harris hawks optimization (HHO), and genetic algorithm (GA). Several evaluation criteria, including best SSE, worst SSE, mean SSE, and standard deviation, show that the SDO algorithm has merits in terms of PEMFC modeling.


Introduction
The exponential demand for electricity and the impact of fossil fuel use, e.g., global warming, have led to an increase in the utilization of renewable energy resources (RERs). Appropriate techniques for energy storage help to deal with the lower availability of RERs, such as wind and solar energy, and thus contribute to the de-carbonization of multiple applications, e.g., automotive, grid-connection, maritime, and residential applications [1]. Among the storage system techniques, fuel cell (FC) devices have received much attention as energy storage media [2,3]. Proton exchange membrane fuel cells (PEMFCs), which ordinarily generate electricity, through a chemical reaction between hydrogen and oxygen or another oxidizing agent, have become more ubiquitous in the recent years, owing to their inherent advantages. PEMFCs have several outstanding characteristics, such as high energy efficiency; high energy density; low overall cost; low working noise; low operating temperature; zero emissions of nitrogen oxides, sulfur oxides, and CO 2 ; short startup time; use of solid electrolytes; zero corrosion; and long life [4].
Considering the foregoing, metaheuristic algorithms are often acknowledged as more efficient and effective than classical algorithms. While a certain algorithm may perform admirably when optimizing a particular sort of problem, it may be incapable of selecting the most accurate solution within the range of possible values for another design condition. Also, the results in some studies have been obtained under different design conditions, especially the termination criterion and performance factors. Moreover, due to its stochastic nature, a metaheuristic algorithm commonly produces different solutions when it is applied to a specific problem for different runs. Therefore, the average solution, standard deviation (STD), and statistical testing, should also be applied. The average solution and STD assess the overall performance, whereas statistical testing assesses each run's solution and confirms its statistical significance.
For the first time, this study applies a recently developed and highly efficient metaheuristic algorithm, termed supply-demand-based optimization (SDO), to the parameter identification problem for PEMFCs. The SDO replicates the consumer-producer supplydemand relationship [48]. The supply-demand mechanism, according to economic prin-ciples, has the following two states: stable and instable. The quantity and cost converge to a balancing point in the stable mode, which can be adapted to the SDO as exploitation, to carry out a local pursuit. In the instable mode, the quantity and cost diverge from the balancing point and can be used in conjunction with the SDO, as exploration, to conduct a global chase in the search region. The better exploration, exploitation, and convergence rate, together with local optima avoidance, high accuracy, and lower number of parameters, are the most important reasons for studying the practical viability and rationality of SDO in the PEMFC identification problem. The main contributions of this study are as follows: (i) SDO is applied to effectively identify the parameters of PEMFC models. To our knowledge, this is the first attempt at identifying PEMFC parameters based on SDO; (ii) The performance of the PEMFC stack is thoroughly evaluated under various experimental pressure and temperature conditions. In addition, the sensitivity of SDO is explored; and (iii) The supremacy of SDO is statistically confirmed by comparison with five state-of-the-art metaheuristic algorithms, using average convergence, STD, and statistical testing.
The rest of this paper is organized as follows: Section 2 discusses the mathematical modeling of the PEMFC stack. Section 3 details the design circumstances, limitations, and SDO optimization technique. Section 4 contains experimental results, comparisons, and the discussion. Section 5 contains the work's conclusions.

Basic Operation of PEMFC
An FC basically converts chemical energy, stored in a fuel and oxidant, directly into DC electrical energy. An FC consists of the following major structural units: catalyst layers (anode and cathode), proton exchange membrane (PEM), gas diffusion layers, and bipolar plates [49], as shown in Figure 1. In the anode layer, hydrogen reacts with a catalyst surface, producing an electron and a proton, according to Equation (1).
The electron travels through a circuit to produce a current, while the proton passes through the electrolyte to the cathode side. At the cathode, oxygen reacts with the hydrogen ion and electron, producing water and heat, according to the following reaction: Processes 2021, 9, x FOR PEER REVIEW 3 of 18 For the first time, this study applies a recently developed and highly efficient metaheuristic algorithm, termed supply-demand-based optimization (SDO), to the parameter identification problem for PEMFCs. The SDO replicates the consumer-producer supply-demand relationship [48]. The supply-demand mechanism, according to economic principles, has the following two states: stable and instable. The quantity and cost converge to a balancing point in the stable mode, which can be adapted to the SDO as exploitation, to carry out a local pursuit. In the instable mode, the quantity and cost diverge from the balancing point and can be used in conjunction with the SDO, as exploration, to conduct a global chase in the search region. The better exploration, exploitation, and convergence rate, together with local optima avoidance, high accuracy, and lower number of parameters, are the most important reasons for studying the practical viability and rationality of SDO in the PEMFC identification problem. The main contributions of this study are as follows: (i) SDO is applied to effectively identify the parameters of PEMFC models. To our knowledge, this is the first attempt at identifying PEMFC parameters based on SDO; (ii) The performance of the PEMFC stack is thoroughly evaluated under various experimental pressure and temperature conditions. In addition, the sensitivity of SDO is explored; and (iii) The supremacy of SDO is statistically confirmed by comparison with five state-of-the-art metaheuristic algorithms, using average convergence, STD, and statistical testing.
The rest of this paper is organized as follows: Section 2 discusses the mathematical modeling of the PEMFC stack. Section 3 details the design circumstances, limitations, and SDO optimization technique. Section 4 contains experimental results, comparisons, and the discussion. Section 5 contains the work's conclusions.

Basic Operation of PEMFC
An FC basically converts chemical energy, stored in a fuel and oxidant, directly into DC electrical energy. An FC consists of the following major structural units: catalyst layers (anode and cathode), proton exchange membrane (PEM), gas diffusion layers, and bipolar plates [49], as shown in Figure 1. In the anode layer, hydrogen reacts with a catalyst surface, producing an electron and a proton, according to Equation (1).
The electron travels through a circuit to produce a current, while the proton passes through the electrolyte to the cathode side. At the cathode, oxygen reacts with the hydrogen ion and electron, producing water and heat, according to the following reaction: The overall chemical reaction occurring inside a PEMFC is calculated by the following equation: Processes 2021, 9, 1416 4 of 18

Theoretical Modeling
The terminal voltage of a PEMFC is calculated as the sum of theoretical voltage (E Nernest ) and three voltage losses, i.e., activation (V act ), ohmic (V ohm ), and concentration (V con ), as shown Equation (4) [49], as follows: The theoretical voltage can be expressed using Equation (5), which estimates the thermodynamic voltage and is expressed as [50], as follows: where T is the temperature of the cell (K), and P H 2 and P O2 are the partial gas pressures of hydrogen and oxygen, respectively. For O 2 and H 2 reactants, P O2 is calculated using Equation (6) [51], as follows: where RH C and P c represent the relative humidity and inlet pressure (atm) at the cathode side, respectively; A is the active membrane area (cm 2 ); and I is the current of the cell (A). P H2 can be calculated using Equation (7) [51], as follows: where RH a and P a represent the relative humidity and inlet pressure (atm) at the anode side, respectively, and P sat H 2 O is the saturation pressure of water (atm), calculated from Equation (8) [52].
The activation voltage loss can be determined using Equation (9) [50].
where ξ 1 , ξ 2 , ξ 3 , and ξ 4 are the semi-empirical constants, and C O 2 is the concentration of dissolved oxygen (mol cm −3 ), which can be calculated using Equation (10) [53], as follows: The ohmic voltage loss (V ohm ) can be obtained from Equation (11) [54], as follows: where R C and R m are the resistance of the membrane against the transfer of protons (Ω) and the equivalent resistance of the membrane (Ω), respectively, which is defined as in Equation (12), as follows: where l is the membrane thickness (cm) and ρ m is the specific resistivity of the membrane (Ω cm), which can be expressed using Equation (13) [55], as follows: where λ is an empirical parameter that is related to the membrane preparation. The concentration voltage loss can be obtained using Equation (14) [49], as follows: where β is the parametric coefficient (V), and J and J max are the current density and maximum current density (A/cm 2 ), respectively. The voltage produced by a single PEMFC at open circuit ranges from 0.9 to 1.23 V, depending on the operating condition. Therefore, the voltage increases by the series connection of several PEMFCs, while the current increases by the parallel connection. The total voltage of the PEMFC stack, consisting of a number of fuel cells (N cell ) connected in series, equals the product of N cell and the voltage of one cell (V cell ), as shown in Equation (15), as follows:

Objective Function and Constraints
The sum of the squared error (SSE) between the actual terminal voltage and the terminal voltage of the PEMFC stack model is expressed as an objective function for optimization, to thus find the optimal unknown model parameters (ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , β, λ, l, and J max ), as shown in Equation (16) [1], as follows: where V exp is the actual terminal voltage, V model is the output voltage produced by the PEMFC, and N is the number of tested data. Further, ξ k , R c , β, λ, l, and J max are the empirical coefficient, cell connections resistance, parametric coefficient, membrane preparation parameter, membrane thickness, and maximum current density, respectively. Then, x min and x max are the lowest and highest bounds of the PEMFC parameters, respectively.

Optimization Method and Implementation
Due to the nonlinear nature of the PEMFC modeling problem, this work used the exploratory algorithm SDO for the first time, to tackle a similar problem. The SDO's efficacy and performance were compared to those of the following five well-established metaheuristic algorithms: WOA, GWO, SSA, HHO, and GA.

Preliminary Concepts
The SDO replicates the consumer-producer supply-demand relationship [34]. Economic principles dictate that the quantity and cost of a commodity are determined by its current cost and quantity in the market, respectively. When the market's current cost Processes 2021, 9, 1416 6 of 18 of a product falls, the amount of that commodity provided increases. By contrast, as a commodity's supply grows, its market price drops. After a period of time, the quantity and cost reach a point of balance (x0, y0). The supply-demand strategy has the following two distinct modes: stable and instable ( Figure 2). The cost and quantity congregate at a balancing point in the stable mode, which may be applied to SDO as exploitation to conduct a local pursuit. In the instable mode, the cost and quantity vary from the equilibrium point and may be matched to SDO as exploration to conduct a global search in the search region [48].
cacy and performance were compared to those of the following five well-established metaheuristic algorithms: WOA, GWO, SSA, HHO, and GA.

Preliminary Concepts
The SDO replicates the consumer-producer supply-demand relationship [34]. Economic principles dictate that the quantity and cost of a commodity are determined by its current cost and quantity in the market, respectively. When the market's current cost of a product falls, the amount of that commodity provided increases. By contrast, as a commodity's supply grows, its market price drops. After a period of time, the quantity and cost reach a point of balance (x0, y0). The supply-demand strategy has the following two distinct modes: stable and instable ( Figure 2). The cost and quantity congregate at a balancing point in the stable mode, which may be applied to SDO as exploitation to conduct a local pursuit. In the instable mode, the cost and quantity vary from the equilibrium point and may be matched to SDO as exploration to conduct a global search in the search region [48].

Supply-Demand-Based Optimization (SDO) Algorithm
The SDO is predicated on the existence of n markets, each of which contains d commodities. Each commodity is limited in quantity and has a particular cost. The market's commodity cost and quantity are expressed as follows:  The commodity cost and quantity are determined for each market by inputting the decision variable values into the fitness function.
The modified cost and quantity are then evaluated using the objective function. If the value of the commodity quantities' fitness function is less than that of its cost, its cost will be swapped with its commodity quantity as a potential solution.
To prevent SDO from being trapped in a local optima, the balance cost y 0 and balance quantity vector x 0 are chosen at random, as shown in [48].
where r 1 is a random number. By changing the supply α and demand β constants, the subsequent commodity quantity and commodity cost are updated based on the equilibrium cost and equilibrium quantity, respectively.
where x i and y i denote the i th cost and quantity of a commodity at the tth iteration, respectively. The commodity cost may be expressed as follows, using (26) and (27): To achieve a balance between exploration and exploitation, α, β are expressed as follows: where T is the maximum number of iterations, t is the current iteration, r is a random value, and t is the current iteration.
To aid the SDO in quickly transitioning between exploration and exploitation, a new variable L is defined as follows: For each market, the commodity cost diverges from the balance cost when |L| > 1 and converges to the balance cost when |L| < 1. The SDO is depicted in Figure 3.

Experimental Results and Discussion
This section demonstrates the effectiveness of the SDO algorithm in estimating the optimal parameters of PEMFC stacks, by an analysis of the SDO algorithm under various operating and design parameters. The optimization processes are executed using MATLAB-R2019a (version 9.6) under Windows 7 Pro 64-bit with an Intel ® Core i7 CPU @ 2.8 GHz and 8 MB RAM.
Two cases were investigated, so that the superiority/competitiveness of the proposed SDO-based process was confirmed. The first case presents the achieved results related to different operational conditions of the PEMFC stack, whereas the second case presents the results for two well-known PEMFCs stacks, BSC500W and 500W Horizon. The SDO algorithm was also compared with five algorithms that were used in the literature, to evaluate its performance in estimating PEMFC stack parameters. Nine parameters ( , , , , , , , , and ) were optimized, and the maximum and minimum constraints of these parameters are listed in Table 1. It is worth mentioning that the optimal parameters, after 50 independent runs of each algorithm, were statistically evaluated and the best result was then selected from these runs.

Experimental Results and Discussion
This section demonstrates the effectiveness of the SDO algorithm in estimating the optimal parameters of PEMFC stacks, by an analysis of the SDO algorithm under various operating and design parameters. The optimization processes are executed using MATLAB-R2019a (version 9.6) under Windows 7 Pro 64-bit with an Intel ® Core i7 CPU @ 2.8 GHz and 8 MB RAM.
Two cases were investigated, so that the superiority/competitiveness of the proposed SDO-based process was confirmed. The first case presents the achieved results related to different operational conditions of the PEMFC stack, whereas the second case presents the results for two well-known PEMFCs stacks, BSC500W and 500W Horizon. The SDO algorithm was also compared with five algorithms that were used in the literature, to evaluate its performance in estimating PEMFC stack parameters. Nine parameters (ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , β, λ, l, and J max ) were optimized, and the maximum and minimum constraints of these parameters are listed in Table 1. It is worth mentioning that the optimal Processes 2021, 9, 1416 9 of 18 parameters, after 50 independent runs of each algorithm, were statistically evaluated and the best result was then selected from these runs.

Case Study 1 (Different Operational Conditions)
In this case, the supremacy of the SDO algorithm was evaluated using the experimental data that are shown in Table A1 (in the Appendix A). Four different sets of measured data were used; two sets (3/5 bar 353.15 K, 1/1 bar 343.15 K) were used to extract the PEMFC parameters, and the other sets (2.5/3 bar 343.15 K, 1.5/1.5 bar 343.15 K) were used in model validation. The operational ranges and the known parameters that were used in this study, are listed in Table 2. The I-V curves of the PEMFC stacks, along with the finest parameter values that were obtained by the SDO algorithm, are plotted in Figure 4. It is obvious that the simulated and experimental I-V curves agree well, regardless of the experimental data that were used for model validation or the experimental data that were used for parameter estimation.

Case Study 1 (Different Operational Conditions)
In this case, the supremacy of the SDO algorithm was evaluated using the experimental data that are shown in Table A1 (in the Appendix A). Four different sets of measured data were used; two sets (3/5 bar 353.15 K, 1/1 bar 343.15 K) were used to extract the PEMFC parameters, and the other sets (2.5/3 bar 343.15 K, 1.5/1.5 bar 343.15 K) were used in model validation. The operational ranges and the known parameters that were used in this study, are listed in Table 2. The I-V curves of the PEMFC stacks, along with the finest parameter values that were obtained by the SDO algorithm, are plotted in Figure 4. It is obvious that the simulated and experimental I-V curves agree well, regardless of the experimental data that were used for model validation or the experimental data that were used for parameter estimation.  After executing the SDO to identify the optimal values of the nine unknown param-  After executing the SDO to identify the optimal values of the nine unknown parameters, the best values of the identified PEMFC model, using five well-known algorithms (WOA, GWO, SSA, HHO, and GA), were identified (Tables 3 and 4). To statistically assess all of the algorithms, the following five statistical indicators were calculated: mean, median, standard deviation, maximum, and lowest indices of best-so-far solutions over all 50 separate runs. The best results are presented in bold text to simplify their readability. According to recent reports, these five algorithms can solve this problem well; for this reason, they were chosen for comparison in this study. All the parameters for each algorithm were set to the same values, to allow for a fair comparison. As per the results of these tables, it is evident that SDO is able to outperform other algorithms in terms of all the statistical indicators. When compared to the effectiveness of the WOA, GWO, SSA, HHO, and GA, in terms of the "STD" indicator, SDO outperforms them all. The SDO's low STD value indicates that it converged in the majority of the trials, showing its robustness.

Case Study 2 (Different Types of PEMFC Stacks) 4.2.1. BCS-500W
In this case, a BCS PEMFC stack, manufactured by the American Company BCS Technologies, with 500 W, was used to examine the performance of the SDO algorithm. The characteristics of this BCS PEMFC were reported by Ali M et al. [19], as follows: N cell = 32, A = 64 cm 2 , T stack = 333 K, PH 2 = 1 atm, and PO 2 = 0.2075 atm. The dataset measurements I/V (reported in Table A2 in the Appendix A) of the BCS 500-W PEMFC stack were utilized to optimize nine unknown parameters, using the SDO algorithm as well as the other five algorithms that were mentioned previously, for comparison. Table 5 presents the SSE results that were obtained by the different algorithms. Consistent with Table 5, the smallest SSE values were achieved by the SDO algorithm, as compared with the other algorithms, i.e., the results show that the SDO algorithm was able to improve the previous best SSE value. Table 6 shows that the algorithms that were used in this case study successfully extracted the nine parameters.

Horizon-500W
An open-cathode Horizon PEMFC, with a nominal power of 500 W, was used to validate the performance of the SDO. The operating details for this PEMFC can be found in Refs. [33,54], and its features are as follows: N cell = 36, A = 52 cm 2 , T stack = 333 K, PH 2 = 0.55 atm, and PO 2 = 1 atm.
The current vs. voltage datasets that were utilized to validate the SDO-determined optimal PEMFC stack parameters, are presented in Table A3. To assess the SDO results, comparisons with other algorithm methods were performed, as shown in Table 7. As per the tabulated values, SDO gave the best SSE value among all the optimizers. The performance test measures and numerical comparisons with the other optimizers noticeably highlight that the SDO was best able to optimize the nine unknown PEMFC model parameters. Table 8 compares the parameter values and minimum SSE values for the PEMFC stack with those given by the other algorithms. As shown in Table 8, the method precision and advantages of the SDO algorithm are greater than those for the other algorithms.

Average Convergence Rate
Under the same operating conditions that were used for the three above-mentioned PEMFC stacks, the average convergence curves of the best SSE values of 50 runs that were generated by SDO, WOA, GWO, SSA, HHO, and GA, are shown in Figure 5. It can be observed from Figure 5 that in the first 100 iterations, the average convergence rate of the first three algorithms followed the following order: SDO > GWO > WOA. In later iterations, the inset (zoomed-in portion) of Figure 5 indicates that their convergence rate follows the following order: SDO > GWO > SSA. Indeed, for the whole optimization process, the SDO algorithm has the fastest rate of convergence and the highest SSE accuracy when compared with WOA, GWO, SSA, HHO, and GA. This supremacy can be attributed to the algorithm architecture that was discussed in Section 3. generated by SDO, WOA, GWO, SSA, HHO, and GA, are shown in Figure 5. It can be observed from Figure 5 that in the first 100 iterations, the average convergence rate of the first three algorithms followed the following order: SDO > GWO > WOA. In later iterations, the inset (zoomed-in portion) of Figure 5 indicates that their convergence rate follows the following order: SDO > GWO > SSA. Indeed, for the whole optimization process, the SDO algorithm has the fastest rate of convergence and the highest SSE accuracy when compared with WOA, GWO, SSA, HHO, and GA. This supremacy can be attributed to the algorithm architecture that was discussed in Section 3.

Conclusions
A novel design methodology, based on a newly proposed computational intelligence algorithm, named SDO, to identify the parameters of three PEMFC stacks under different operating conditions, is proposed. A comparison of SDO with the WOA, GWO, SSA, HHO, and GA algorithms is accomplished by considering the SSE between the measured and calculated voltage for three PEMFC stacks over 50 independent runs. In this regard, the following nine estimated variables were considered: ξ 1 , ξ 2 , ξ 3 , ξ 4 , R c , β, λ, l, and J max . The investigation was experimentally implemented on the following different PEMFC stacks: 250W stack, BCS-500W, and Horizon-500W. It was assumed that the relative humidity at the anode and cathode sides was 100% for all the PEMFCs. The optimization results validate the supremacy and reliability of the SDO algorithm over the other algorithms, in terms of extracting the optimal parameters of PEMFC stacks under different conditions. SDO converged rapidly towards the optimum solutions for the three PEMFCs stacks; this was not the case for the other algorithms, particularly for GA, which diverged significantly. Moreover, the achieved STD of SDO was markedly lower than that for the other algorithms, highlighting the reason for the accuracy and repeatability of the SDO algorithm. Utilization of the SDO algorithm in dynamic PEMFC model identification, as well as the investigation of new algorithms, are suggestions for further work.

Appendix A
Tables A1-A3 present the experiment data used in this work.