Improved Metaheuristic Optimization Algorithm Applied to Hydrogen Fuel Cell and Photovoltaic Cell Parameter Extraction

: As carriers of green energy, proton exchange membrane fuel cells (PEMFCs) and photovoltaic (PV) cells are complex and nonlinear multivariate systems. For simulation analysis, optimization control, efﬁcacy prediction, and fault diagnosis, it is crucial to rapidly and accurately establish reliability modules and extract parameters from the system modules. This study employed three types of particle swarm optimization (PSO) algorithms to ﬁnd the optimal parameters of two energy models by minimizing the sum squared errors (SSE) and roots mean squared errors (RMSE). The three algorithms are inertia weight PSO, constriction PSO, and momentum PSO. The obtained calculation results of these three algorithms were compared with those obtained using algorithms from other relevant studies. This study revealed that the use of momentum PSO enables rapid convergence (under 30 convergence times) and the most accurate modeling and yields the most stable parameter extraction (SSE of PEMFC is 2.0656, RMSE of PV cells is 8.839 × 10 − 4 ). In summary, momentum PSO is the algorithm that is most suitable for system parameter identiﬁcation with multiple dimensions and complex modules.


Introduction
Since the start of the Industrial Revolution, humans began to replace animals with vehicles and ships as their primary means of transportation. However, this rapid technological development was also accompanied by numerous negative effects. In current times, the combustion of diesel and gasoline has resulted in a sharp increase in the amount of carbon dioxide and particulates worldwide. The overexploitation of oil also caused global concerns regarding the resulting economic crises. It follows that there is an utmost priority to find an alternative and cleaner energy source. One such alternative is fuel cells: devices that directly convert chemical energy into electricity. Fuel and oxygen undergo oxidation and reduction in the cell to produce energy, discharging pure water as its only byproduct. Among the numerous types of fuel cells, attention has been drawn largely to proton exchange membrane fuel cells (PEMFCs) due to their high efficiency in energy conversion, quick response time, and capability to operate at room temperature [1]. PEMFCs are complex systems that possess characteristics of high non-linearity and strong coupling, among others. During operation, their system performance is affected by numerous factors, such as system and environmental temperatures, humidity, current density, and fuel intake pressure. The crux to advancing PEMFC technology lies in the conversion of electrochemical reactions into mathematical equations. Modeling can aid users to quickly understand how to improve on the system performance. More importantly, there is a need to understand how the properties of the PEMFC can be accurately assessed. Currently, there are numerous methods of PEMFC modeling. One such method is mechanical modeling, which involves differential equations or thermal and water management on the electrochemical reactions within PEMFCs [2], as well as electrochemical reaction properties within the cells. There is also artificial neural network [3,4] and support vector machine [5] modeling, which involves designating a fuel cell as a "black box" in model recognition. However, not only is this method costly and requires a substantial amount of experimental data, it also does not thoroughly clarify the working mechanism within the cell. It is unable to analyze certain system parameters and can only represents the variable relationship between input and output-and thus, poses a hindrance to the design of an optimal system. Another method is semiempirical modeling, a mathematical model based on the PEMFC reaction mechanism [6][7][8]: studies have indicated that these mathematical models constructed by deriving experiment results are highly stable and efficient.
Photovoltaic (PV) cells are a form of alternative energy possessing mature technologies and numerous applications. Their efficacy of use is determined by their current-voltage (I-V) characteristics; therefore, the design of PV cells requires a level of precision in its modeling. PV cells are typically modelled using two steps: by creating a mathematical modeling equation, and getting an accurate estimation of every parameter value. After the parameters of a PV cell under various working conditions are acquired during the modeling process, the maximum power of the cell can then be estimated. Presently, single diode (SD) models are one of the more common models applied to simulate the equivalent electronic circuit in a PV cell [9,10]. The parameters to be determined in this model can be calculated through the fitting of the experimental data in the cell.
Generally, methods used for estimating PEMFC and PV cell parameters can be categorized in two ways: deterministic and metaheuristic. Some examples of deterministic methods include the least square method [11], Lambert W functions [12], and iterative curve fitting [13]. An advantage of such methods lies in their speed in yielding estimation results, but one disadvantage is also that their calculated solutions are highly sensitive to initial solutions and often lead to local optima.
Metaheuristic algorithm is an advanced process which guides a subordinate heuris-tic by balancing exploitation and exploration. The former assures the searching of optimal solutions within the given region, and the latter makes sure the algorithm reach different promising regions of the search space. In addition, the metaheuristic algorithm is classi-fied into four subcategories, including evolutionary algorithms [14], physics-based algorithms [15], swarm-based algorithms [16], and bio-inspired algorithms [17]. These algorithms are widely applied to solve complex problems in various domains. For example, studies that are related to online learning [18], scheduling [19], multi-objective optimization [20], vehicle routing [21], medicine [22], data classification [23], energy system [24,25], etc. can find the footage of the usage. This study, on the other hand, selected swarm-based algorithms to optimize the energy systems. Swarm Intelligence (SI) is known as "the collective behavior of decentralized, self-organized systems, natural or artificial" [26]. Several types of swarm optimization algorithms have been recently proposed for use in solving problems regarding PV cell parameters. Several types of swarm optimization algorithms have been recently proposed for use in solving problems regarding PV cell parameters. In other literatures, some swarm optimization algorithms that have been employed to estimate PV cell parameters include particle swarm optimization (PSO) [27], artificial bee colony [28], and whale optimization algorithms [29]. Such algorithms typically yield more satisfactory estimation results than deterministic methods. In particular, PSO, which is based on birds' foraging behaviors, is highly efficient in calculation. Although the original PSO has been applied to solve various optimization problems, it possesses the problem of possible premature convergence-a common characteristic found in other basic swarm intelligence algorithms. In this study, three types of improved PSO algorithm, namely inertia weight PSO, compressed PSO, and momentum PSO, were employed in PEMFC parameter optimization. In the following section will introduce PEMFC and photovoltaic (PV) cell mathematical modules and the used heuristic algorithms. Three algorithms are employed to find the parameter of a benchmark of PEMFC and PV cell model by minimizing the sum of squared errors (SSE) and root means square errors (RMSE) between the measured and estimated voltage. After 30 independent runs, the algorithm are compared in terms of the fitness values.

Proton Exchange Membrane Modeling and Theory
Hydrogen fuel cells are currently a very well-received form of green power system. The system operates by feeding hydrogen gas into the anode before it is broken down using a catalyst. Thereafter, the electrons form a circuit through the external circuit connection load. Hydrogen ions then travel to the cathode through proton exchange membranes, forming water with oxygen ions. This mechanism allows for low-pollution emissions: Cathode reaction : Chemical reaction : The theoretical voltage value for system modeling is calculated using the Nernst equation in accordance to the chemical energy and battery electrode potential. The Nernst equation was first proposed by the German chemist Walther Hermann Nernst [30] to determine the electromotive force in electrochemical cells. Under the standard condition with an environmental temperature of 298.15 K and atmospheric pressure of 1 atm, the standard electrode potential is 1.229 V, with F being a Faraday constant of 96,485 As/mol, and n representing the number of electrons per unit mole during the chemical reaction in a cell [31][32][33]: In the above equation, the value of 1.229 indicates the ideal electric potential energy under the standard condition, T represents cell temperature, and P H2 and P O2 each represents the effective partial pressure of hydrogen and oxygen, respectively. If H 2 and O 2 are the reactants, then the partial pressure can be calculated using Equation (5) and (6); however, if the reactants are H 2 and the air, the effective partial pressure of P O2 must then be calculated with Equation (7) [31]: The variables P a and P c represent the inlet pressure at the anode and cathode respectively, while RH a and RH c represent the relative humidity of the steam at the anode and cathode, respectively. Next, I represents the working current of the cell and A represents the effective area of the membrane. Lastly, P H2O indicates the saturation pressure of water vapor as a function of cell temperature T, as expressed in Equation (8) One must note that voltage loss can result from cell polarization, leading to a loss in potential and the inability of cells to operate at the ideal voltage. Cell polarization can occur in three ways: activation polarization, Ohmic polarization, or concentration polarization [34]. The polarization of PEMFC shown in Figure 1.
the effective area of the membrane. Lastly, PH2O indicates the saturation pres vapor as a function of cell temperature T, as expressed in Equation (8) One must note that voltage loss can result from cell polarization, leadin potential and the inability of cells to operate at the ideal voltage. Cell pol occur in three ways: activation polarization, Ohmic polarization, or concent zation [34]. The polarization of PEMFC shown in Figure 1. Activation polarization (Vact) is a reaction that occurs on the electrode su lay in electrochemical reaction causes potential drift, largely due to catalys and desorption. The main factor that affects activation polarization is the re cathode. Vact can be calculated using a semiempirical equation, as shown be tion (9): In the Butler-Volmer equation, which has its basis in kinetics, thermod electrochemistry, the semiempirical coefficients ξ1 to ξ4 bears physical signi the concentration of dissolved oxygen catalyzed at the cathode (CO2) can using Henry's law, as expressed in Equation Activation polarization (V act ) is a reaction that occurs on the electrode surface-a delay in electrochemical reaction causes potential drift, largely due to catalyst adsorption and desorption. The main factor that affects activation polarization is the reaction of the cathode. V act can be calculated using a semiempirical equation, as shown below in Equation (9): In the Butler-Volmer equation, which has its basis in kinetics, thermodynamics, and electrochemistry, the semiempirical coefficients ξ 1 to ξ 4 bears physical significance. Also, the concentration of dissolved oxygen catalyzed at the cathode (C O2 ) can be calculated using Henry's law, as expressed in Equation (10): Ohmic polarization occurs when energy is expended as the current passes through components of the fuel cell. The key reason for this is internal resistance, which is generated through multiple aspects: firstly, the resistance of hydrogen ions during their transmission through the proton exchange membrane, the resistance during the transmission of electrons, and the resistance caused by gaps in the contact surfaces between cell components. In particular, the resistance encountered by hydrogen ions during their transmission through the proton exchange membrane is the primary cause of Ohmic polarization, as denoted in Equation (11): Energies 2021, 14, 619

of 16
R c is usually regarded as a constant due to the relatively narrow range of the PEMFC working temperature. In order to encompass all the major membrane parameters, R m is expressed in the following universal equation: l denotes the thickness of the membrane and ρ m represents the specific resistivity of hydrated proton flow, which can be expressed by an empirical formula such as Equation (13). In the equation, λ is an adjustable parameter, while 181.6 ⁄ ((λ − 0.634) is the specific resistance value with no current and at the cell temperature of 30 • C. Meanwhile, the term 'exp' in the denominator represents the temperature correction item when the cell is not 30 • C. Following the effective water content of the exchange membrane (λ), 3(i/A) is a correction item in the experiment that represents the effects of current density and cell temperature on the average water content of the membrane.
Concentration polarization refers to the potential loss caused by the mass transfer limitation of the reactant. This is primarily due to a high current load-when a fuel cell generates electricity, the reactants near the electrode continues to be depleted. Following that, if the reactant transfer rate is not sufficiently high enough to meet the reaction efficiency requirement, the concentration of reactants in the reaction zone will decrease and lead to a potential loss. To express this decrease in concentration (V con ), the limiting current density corresponding to the maximal power supply speed (J max ) and the coefficient determined by the type and working condition of the cell (B) are defined in the empirical Equation (14) below: In general, the voltage loss in a low current density is caused by activation polarization. However, as the current density increases, ohmic polarization becomes the primary reason for voltage loss. It follows that when there is a high current density, the main cause for the loss will due to concentration polarization instead. The value of the fuel cell's theoretical output voltage is the same as its open circuit voltage. When the system exports a current for external work, polarization occurs. The relational equation of the cell is expressed in Equation (15), where the voltage loss caused by the three polarization effects is subtracted from the theoretical stack voltage, before multiplying it by the number of cell stacks (n cell ):

Objective Function of the Optimized PEMFC Model Parameters
In Equations (4)- (15), the measurable operation parameters T, P a , P c , RH a , RH c , P H 2 , P O 2 , and n cell are determined by the operation environment, whereas the physical parameters ξ 1 , ξ 2 , ξ 3 , ξ 4 , λ, R c , and B are unknown parameters. Taking in consideration that the unknown parameters X = (ξ 1 , ξ 2 , ξ 3 , ξ 4 , λ, R c , B) will considerably affect the model calculation results, these unknown values must thus be estimated as accurately as possible to fulfill the actual I-V characteristic. Nevertheless, before X = (ξ 1 , ξ 2 , ξ 3 , ξ 4 , λ, R c , B) is identified, the objective function needs to be defined. In this study, the objective function F(X) is to find a set of optimized parameter values so as to minimize the sum of squares for Energies 2021, 14, 619 6 of 16 errors (SSEs) between the experimental voltage (V exp ) and the estimated voltage that was calculated using the aforementioned equations (V mod ), as expressed in the equation: In Equation (16), g represents the number of data sets used for parameter extraction, N represents the number of experimental I-V data in each data set, and LB and UB are the lower and upper limits of the known model parameter X, respectively.

Photovoltaic Cell Modeling and Theory
Photovoltaic Cell converts light into energy due to the photovoltaic effect of semiconductors. The single-diode model represents the non-ideal single-exponential diode model [13]. The equation related to this model is relatively simple and can be expressed in the form of an equivalent circuit, as shown in Figure 2. This model displays a diode used as a shunt to divert the photogenerated current (I ph ), and a resistor which is connected in series to the diode.
for errors (SSEs) between the experimental voltage (Vexp) and the est was calculated using the aforementioned equations (Vmod), as express In Equation (16), g represents the number of data sets used for p N represents the number of experimental I-V data in each data set, an lower and upper limits of the known model parameter X, respectivel

Photovoltaic Cell Modeling and Theory
Photovoltaic Cell converts light into energy due to the photovo conductors. The single-diode model represents the non-ideal single model [13]. The equation related to this model is relatively simple an in the form of an equivalent circuit, as shown in Figure 2. This mod used as a shunt to divert the photogenerated current (Iph), and a re nected in series to the diode.  Figure 2, the SD PV cell model has a current source a parallel with a diode [13,35]. Under light, an actual PV cell exhib resistance. The terminal current (It) for the PV cell in the model can lows:

As shown in
In the above equation, Iph represents the source of photoelectric/p rent, Id represents the saturation current of the diode, and Ish represents caused by the shunt resistance, Rsh. In this study, the Shockley diode eq to produce a suitable model, where the relational equation between voltage (Vt) can be expressed as follows:  Figure 2, the SD PV cell model has a current source that is connected in a parallel with a diode [13,35]. Under light, an actual PV cell exhibits series and shunt resistance. The terminal current (I t ) for the PV cell in the model can be expressed as follows:

As shown in
In the above equation, I ph represents the source of photoelectric/photogenerated current, I d represents the saturation current of the diode, and I sh represents the leakage current caused by the shunt resistance, R sh . In this study, the Shockley diode equation was adopted to produce a suitable model, where the relational equation between the current (I d ) and voltage (V t ) can be expressed as follows: Consequently, Equation (19) can be formulated: In Equation (19), V t represents the terminal voltage, T represents the cell temperature, the charge of the electron is q = 1.602 × 10 −9 (C), and the Boltzmann constant is k = 1.380 × 10 −23 J/K. It can be seen that the nonlinear Equation (19) contains several unknown parameters-accordingly, the SD model has the following five parameters to be determined: photogenerated current (I ph ), reverse saturation current (I sd ), ideal factor for Energies 2021, 14, 619 7 of 16 the saturated diode (n), series resistance (R ser ), and shunt resistance (R sh ). These parameters can be estimated using the I-V equation of the PV cell. To accurately obtain the unknown parameters X = (R ser , R sh , I ph , I sd , n), IV curve of solar cell uses root mean square errors (RMSEs) Equation (20) and is identified by minimizing the errors between the experimental voltage and the estimated voltage as the optimization principle.

PSO Algorithm
As compared to other swarm intelligence algorithms, PSO stands out as one that is not only highly efficient, but also does not require much memory space in its calculation. The algorithm, which is based on birds' foraging behaviors, adjusts the speed of particles to alter their positions and conducts multiple searches to identify their optimal positions [36]. These equations are expressed in Equations (21) and (22), and Figure 3 depicts a schematic diagram of the particle search. A basic PSO search uses the optimal positions identified through an individual particle's and combined particle swarm's current search results to determine the direction of the subsequent search target, in order to quickly attain a convergent solution: , i = 1, 2, . . . , N particle (22) 021, 14, x FOR PEER REVIEW As a result of not being able to necessarily identify th through referencing a current local optimal solution, it can be being too preoccupied by the local optimal solution found. In posed an improved PSO algorithm [37], in which they introdu to control the algorithm's search speed, thereby reinforcing i improved algorithm is termed inertia weight PSO and has bee In Equations (21) and (22), → x i and → v i represent the position and speed vector of the ith particle respectively, pbest i represents the previous optimal position of the ith particle, and gbest represents the optimal position of the particle swarm N p when it evolves to the kth generation. The parameters in Equation (21) also include cognitive (c 1 ) and social (c 2 ) learning rate, which are generally set as c 1 = c 2 = 2.0.
As a result of not being able to necessarily identify the global optimal solution through referencing a current local optimal solution, it can be easy to fall into the trap of being too preoccupied by the local optimal solution found. In 1998, Shi and Eberhart proposed an improved PSO algorithm [37], in which they introduced a weight parameter (w) to control the algorithm's search speed, thereby reinforcing its local search ability. This improved algorithm is termed inertia weight PSO and has been verified to have a greater efficacy than a genetic algorithm. Weight (w) serves as a critical parameter in the algorithm's search for the optimal solution-the value of which can be solved linearly by setting two weight values, w max = 0.9 and w min = 0.4, according to the number of iterations. The inertia weight PSO is expressed as follows: Furthermore, in 1999, Clerc proposed a PSO algorithm with a constriction factor (K) [37] that can effectively dampen the speed of particles to enhance their local search capacity. The improved algorithm, referred to as constriction PSO, has been verified to significantly reinforce the particles'search capability in a local spatial setting. After running a stability analysis, the method proposes that K is a function of ϕ = c 1 + c 2 . When compared to the previously mentioned inertia weight PSO that was proposed by Shi and Eberhart, the constriction PSO produces better solutions and reduces the need for manual inputs with regards to the weight parameter (w). Moreover, both the cognitive learning rate (c 1 and c 2 ) can be set to the same value of 2.05. Constriction PSO can be expressed in the following equations: In the equations, ϕ = c 1 + c 2 , and ϕ > 4. The momentum PSO [38], which has been improved upon in recent years, generates the following equations in accordance with the physical characteristics of particle flight: , i = 1, 2, . . . , N particle (30) β is a positive momentum constant (0 ≤ β < 1) that controls the rate of change in particle speed vectors, while another momentum constant, α, is used to adjust the rate of change in particle positions. These aforementioned equations grant each particle, when searching for an optimal solution at different times, the capability to dynamically adjust itself. In this study, β is set to the value 0.1 and α is set to the value of 1.0. When the entire system is in a state of equilibrium (i.e., no better particle positions are detected;

Proton Exchange Membrane NedStackPS6 Parameter Optimization
The operating data of NedStackPS6 system can be found in Reference [31], which consists of 65 cells. The structural parameters and operation environment settings are presented in Table 1. The cell voltage V cell of the PEMFC model can be expressed as Equation (3), which contains parameters to be determined. This study employed three types of improved PSO algorithms to solve for these unknown parameters. Table 2 lists the scope of optimization searches of the parameters to be determined in the PEMFC model [31]. Table 2. Search scope of the parameter to be determined in the PEMFC model.

PSO Parameter Optimization Results in the NedStackPS6 Model
The number of particles for the three improved PSO algorithms was set as 50, and the number of iterations per run was set as 200. In total, 30 independent runs were conducted to analyze the robustness of the algorithms. The PEMFC model calculation results obtained were compared with calculation results from other studies. Figure 4a illustrates the I-V characteristic curve analysis results of the three algorithms used in the PEMFC model, which indicate that the experiment results were considerably consistent with the calculated results of the three algorithms. Figure 4b depicts the Power-V characteristic curve analysis results of the three algorithms, which show a clear increase in the output power following a rise in the stack current, and that the experiment results were also considerably consistent with calculated results of the algorithms. Convergent solutions are divided into two types, namely, Mean Best Solution and Best Solution. Figure 5a,b present a comparison of the algorithms regarding their convergence ability, in which it can be seen that momentum PSO significantly outperforms inertia weight PSO and constriction PSO.
Tables 3 and 4 present a comparison of the experimental and calculated values of the terminal current, which reveals consistency between the experimental values and the calculated values using the three improved PSO algorithms. The optimized parameter values calculated using the momentum PSO algorithm, which demonstrated the most efficient calculation of the three algorithms, were further compared with values acquired from other studies. Table 4 lists the optimal parameter solutions and Sum of Squares for Error (SSE) values acquired using the momentum PSO algorithm and algorithms from [37,38]. The SSE value of the momentum PSO algorithm was 2.0656, lower than that of the algorithms from [34,39,40]-this demonstrates that the momentum PSO algorithm exhibited the most satisfactory SSE value out of all the listed algorithms.
curve analysis results of the three algorithms, which show a clear increase in the output 3 power following a rise in the stack current, and that the experiment results were also con-3 siderably consistent with calculated results of the algorithms. Convergent solutions are 3 divided into two types, namely, Mean Best Solution and Best Solution. Figure 5(a) and 3 5(b) present a comparison of the algorithms regarding their convergence ability, in which 3 it can be seen that momentum PSO significantly outperforms inertia weight PSO and con-3 striction PSO.    Table 3 and Table 4 present a comparison of the experimental and calculated values of the terminal current, which reveals consistency between the experimental values and the calculated values using the three improved PSO algorithms. The optimized parameter values calculated using the momentum PSO algorithm, which demonstrated the most efficient calculation of the three algorithms, were further compared with values acquired from other studies. Table IV lists the optimal parameter solutions and Sum of Squares for Error (SSE) values acquired using the momentum PSO algorithm and algorithms from [37,38]. The SSE value of the momentum PSO algorithm was 2.0656, lower than that of the algorithms from [34,39,40]-this demonstrates that the momentum PSO algorithm exhibited the most satisfactory SSE value out of all the listed algorithms.     Table 4. Comparison between the momentum PSO algorithm and algorithms used in other studies regarding the optimal solutions of parameters to be determined in the PEMFC model.

Momentum-type
Parameter

Estimating the Parameters to Be Determined in the SD Model
The terminal current (I t ) if the SD model for a PV cell can be expressed as Equation (19), which contains parameters to be determined. Three improved PSO algorithms were adopted in this study to solve for these parameters. The photovoltaic (PV) cells operating data of can be found in Reference [35]. Table 5 indicates the scope of the op- timization search for the parameters to be determined in the SD model with the mentioned algorithms [28,35,[39][40][41]. Table 5. Search scope of parameters to be determined in the SD model. The number of particles for the three improved PSO algorithms was set as 150, and the number of iterations per run was set as 200. In total, 30 independent runs were conducted to analyze the robustness of the algorithms. The SD model calculation results obtained were also compared with the calculation results from other studies. Figure 6a illustrates the I-V characteristic curve analysis results of the three algorithms used in the SD model, which indicate considerable consistency between the experiment results and the calculated results using all the algorithms. Figure 6b depicts the Power-V characteristic curve analysis results of the three algorithms, which show that the output power was maximized at 0.3101 W when the terminal voltage was 0.459 V, and that the experiment results and the calculated results using the three algorithms were also considerably consistent. Convergent solutions are divided into two types, namely, Mean Best Solution and Best Solution. Figure 7a,b present a comparison of the algorithms regarding their convergence ability, where it can be seen that the momentum PSO algorithm significantly outperformed the inertia weight PSO and constriction PSO algorithms.

Parameter
Tables 6 and 7 present a comparison between the experimental and calculated values of the terminal current, which also includes the calculation results from the chaotic whale optimization algorithm (Chaotic WOA) proposed by Oliva et al. [17] The table indicates that the calculated values of all the three improved PSO algorithms were consistent with the experimental values. The optimized parameter values calculated using the momentum PSO, which demonstrated the most efficient calculation of the three algorithms, were further compared with those acquired in [37]. Table 7 lists the optimal parameter solutions and root mean square errors (RMSEs) acquired using the momentum PSO algorithm and the algorithms from other relevant studies. The RMSE value of the momentum PSO was 8.8389 × 10 −4 , which is lower than those of the 8 algorithms listed in the other referenced studies, demonstrating that the momentum PSO exhibited the most satisfactory RMSE out of all the listed algorithms.  The number of particles for the three improved PSO algorithms was set as 150, and the number of iterations per run was set as 200. In total, 30 independent runs were conducted to analyze the robustness of the algorithms. The SD model calculation results obtained were also compared with the calculation results from other studies. Figure 6a illustrates the I-V characteristic curve analysis results of the three algorithms used in the SD model, which indicate considerable consistency between the experiment results and the calculated results using all the algorithms. Figure 6b depicts the Power-V characteristic curve analysis results of the three algorithms, which show that the output power was maximized at 0.3101 W when the terminal voltage was 0.459 V, and that the experiment results and the calculated results using the three algorithms were also considerably consistent. Convergent solutions are divided into two types, namely, Mean Best Solution and Best Solution. Figure 7a and Figure 7b present a comparison of the algorithms regarding their convergence ability, where it can be seen that the momentum PSO algorithm significantly outperformed the inertia weight PSO and constriction PSO algorithms.    The effect of the temperature of a PV cell on its I-V and Power-V characteristic curves was further analyzed. For comparison, the PV cell temperature was set to 25 • C, 33 • C (used in the experiment), 50 • C, and 75 • C. The optimal parameters acquired using the momentum PSO algorithm were used for calculation. As shown in Figure 8a, when the cell temperature increased, the net current increased significantly after the terminal voltage on the I-V curve exceeded 0.4 V. Similarly, as depicted in Figure 8b, when the cell temperature increased, both the net power and maximum net power increased significantly after the net voltage on the Power-V curve exceeded 0.44 V. The effect of the temperature of a PV cell on its I-V and Power-V characteristic curves was further analyzed. For comparison, the PV cell temperature was set to 25 °C, 33 °C (used in the experiment), 50 °C, and 75 °C. The optimal parameters acquired using the momentum PSO algorithm were used for calculation. As shown in Figure 8a, when the cell temperature increased, the net current increased significantly after the terminal voltage on the I-V curve exceeded 0.4 V. Similarly, as depicted in Figure 8b, when the cell temperature increased, both the net power and maximum net power increased significantly after the net voltage on the Power-V curve exceeded 0.44 V.

Conclusions
In this study, three advanced PSO algorithms were adopted to improve upon the search efficiency of the original PSO and the accuracy of the optimal solution. These algorithms were applied in the NedStackPS6 PEMFC and SD models to optimize the undetermined energy system parameters. The results analysis revealed that the terminal current

Conclusions
In this study, three advanced PSO algorithms were adopted to improve upon the search efficiency of the original PSO and the accuracy of the optimal solution. These algorithms were applied in the NedStackPS6 PEMFC and SD models to optimize the Energies 2021, 14, 619 15 of 16 undetermined energy system parameters. The results analysis revealed that the terminal current values calculated using all three improved algorithms were considerably consistent with the experimental values. Of the three, the momentum PSO algorithm in particular significantly outperformed the inertia weight PSO and constriction PSO algorithms in terms of calculation efficacy. The analysis also revealed that the momentum PSO algorithm yielded more favorable calculation results as compared to the Chaotic WOA. Additionally, the optimized parameter and objective function values obtained using the momentum PSO algorithm were also compared with those obtained from other relevant studies, which revealed that these calculated solutions obtained using the momentum PSO algorithm were once again more satisfactory than those acquired using the algorithms adopted in other studies. To sum up, the self-adjustment mechanism of momentum PSO can substantially reduce the calculation time and the extraction of the effective data. This study makes a benchmark of PEMFC and PV cell system which expect to make a further application to the multi energy carrier and the real-time dynamic loading.