# Model Structure Optimization for Fuel Cell Polarization Curves

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Fuel Cell Data

_{k}, is 90.

_{tot}, anode pressure P

_{a}, and cathode pressure P

_{c}) can be used as input data for the model identification. This data was also available in [9,17], and it has further been complemented with the calculated values for the saturation pressure of water $({p}_{H2O}^{sat})$, partial pressures of oxygen (p

_{O}

_{2}) and hydrogen (p

_{H}

_{2}), and anode oxygen concentration (C

_{O}

_{2}). The equations adopted from Mo et al. [9] are presented in Appendix A. For the 250W FC, both anode and cathode relative humidity (RH

_{a}and RH

_{c}, respectively) are equal to one [9].

_{mem}), resistivity of the membrane (ρ

_{m}), limiting current (i

_{lim}), and thermodynamic potential (E

_{0}) can be utilized in the model development. The fuel cell data that was used in this study can be found in the Supplementary Material. In total, the data comprises one output, the FC voltage (y(k)), and nine possible input variable candidates X

_{j}(k), where k is an integer number between 1 and n

_{k}, and j is an integer number between one and nine. The input data naturally comprise the FC current (i) and the limiting current in order to be able to model the FC voltage throughout the current range. The operating conditions (T, C

_{O}

_{2}, p

_{O}

_{2}, p

_{H}

_{2}) and cell properties (L

_{mem}, A) are needed to capture the voltage–current characteristics in different FC systems or in the different conditions of a single FC.

#### 2.2. Reported Model Structures

_{p}). It can be observed that the reported model structures are with varying complexity. A more detailed review is given in Ohenoja et al. [7]. As mentioned, these parameterized models are simplifications of electrochemical phenomena, and are easily tuned with the measurable variables from the operating fuel cells. With the aid of experimental data, the curve-fitting properties—and therefore the prediction abilities of the models—are further enhanced, but with the expense of losing the generalization abilities for the unseen FC systems. Purely empirical, or data-driven models for the FC polarization curve also exist [18], but they are not in the scope of this work.

#### 2.3. Algorithm for Model Structure Identification

#### 2.3.1. Genetic Algorithms

^{®}software. The genetic algorithm applied uses uniform crossover and mutation operations; tournament selection is used with the number of candidates set to five, and elitism is applied by replacing the worst candidate from the new generation with the best candidate from the previous generation. In all of the studied scenarios, the population size is 500, the number of generations is 100, the crossing probability is 0.9, the mutation probability is 0.05, and the optimization loop is repeated 100 times with different initial populations. The Matlab

^{®}random number generator was initialized prior to the execution in order to be able to repeat the results. The elitism ensures that the best individual is preserved throughout the generations in a single GA run. The overall best solution is selected among the 100 best individuals from GA repetitions. The GA objective function (fitness function) that was used is given in Section 2.3.4. As the optimization task in this study is not critical with respect to computational time, the selection of optimization algorithm tuning parameters is more guided by experience and an algorithms’ ability to converge, rather than finding a compromise between convergence properties and computational time.

#### 2.3.2. Chromosome Encoding and Decoding

_{j}bits are reserved to represent the different model variable candidates in the binary format. Similarly, the number of mathematical transformation operators (m) and uniting mathematical operators (u) to be tested are defined, and a correct number of bits (N

_{m}and N

_{u}) are determined, respectively. Finally, the allowable maximum number of variables (n) in the final model structure is defined, and the chromosome size is propagated to be able to describe the model structure in binary format. An example of binary coded chromosome with j = 8, m = 4, u = 2, n = 3 and the resulted mathematical expression after decoding are presented in Figure 5.

^{2}in Figure 5) and adding a matrix column for it. Then, other model terms are dynamically added either as new columns (summation) or uniting the last matrix column with the new model term (multiplicative and power terms). Finally, a unit vector is added as a last column. The resulted matrix has a size of n

_{k}rows and n

_{t}columns, where n

_{t}≤ n + 1.

_{j}= 3. Eight functional transformations (mathematical operators) are applied; 1, ^2, ^3, sqrt, exp(−), 1/, exp, and ln. Hence, three bits are required to describe these eight operations. The uniting mathematical operators that are used in this study are $+$, $\times $, $\xf7$, $\wedge $. These four operators are described with two bits. The resulting individual contains a vector of bits, which are interpreted (decoded) into a model with the following general structure:

_{1}… f

_{n}are the selected variables among X

_{j}with their mathematical transformations, and a

_{0}…a

_{n}are the regression coefficients. Mathematical operators applied to the model variables may make the model nonlinear. The model can be solved as an ordinary regression equation, because it is always linear with respect to the regression coefficients. Since the terms are fused together, the number of regression coefficients (n

_{t}) in the final model may also be less than the number of selected variables (n). However, this depends on the applied mathematical operators.

#### 2.3.3. Parameter Estimation

_{k}instances. As the inverted matrix is non-square, the Moore–Penrose pseudoinverse is used (‘pinv’ in Matlab

^{®}). Linear regression parameters are calculated separately for each cell. The data sets from SR-12, BCS, and Ballard, and the two data sets from 250W are utilized in the parameter estimation.

#### 2.3.4. Objective Function and Model Performance

## 3. Results

^{®}R2016a without parallel computing. The model structure search involved 5,000,000 objective function evaluations (and 20,000,000 regressions), requiring 38−51 min of wall-clock time, where the elapsed time increased linearly as a function of allowed model complexity.

#### 3.1. Case 1

_{O}

_{2}, p

_{O}

_{2}, p

_{H}

_{2}, i

_{lim}, and a calculated variable, i/i

_{lim}. The optimization results for the nominal model complexity are presented in Figure 6, where the seven predicted polarization curves with experimental data are shown. Clearly, the model can follow the experimental data very accurately. In Table 2, the SSE values for each case are given. In comparison, the SSE values from our earlier studies [10,24] are given. It should be noted that all of these studies use exactly the same data sets, and thus, a comparison of SSE values is straightforward.

_{0}… a

_{7}are presented in the Supplementary Material. Equation (5) shows that the model structure that was found incorporates operating conditions (C

_{O}

_{2}, p

_{H}

_{2}, T). This is important in order to generalize the model predictions into different operating conditions. However, from the high SSE value for the 250W/4 polarization data, it is clear that this generalization ability is limited. Term i/i

_{lim}is repeated several times in the optimized model. Indeed, i

_{lim}has a strong effect on the polarization curve, as it determines the end point for the curve. In this exercise, it was assumed that the value for the i

_{lim}is known and fixed throughout the operating conditions. Naturally, unknown i

_{lim}values would require new model structure identification.

#### 3.2. Case 2

_{O}

_{2}, p

_{O}

_{2}, p

_{H}

_{2}, L

_{mem}, A, and i

_{lim}. This way, the number of variable candidates remains constant. The model complexity is also kept at a comparable level by allowing up to seven terms in the resulting model. The resulting SSEs are presented in Table 2, and the optimized model structure in Equations (6) and (7):

_{lim.}This might result in a predicted polarization curve that has zero crossing outside the actual current range of the FC. Hence, predictions in high currents may not be reliable with this model structure. Additionally, the incorporation of the logarithmic transformation of i leads to a situation where the model cannot represent open-circuit voltage, as it has no solution when i = 0. However, such a shortage may also be found in the semi-empirical models, as discussed in [25]. The comparison of the SSE values between the two model structures shows that this model structure has a higher total error (2.55). A closer look at the SSE values shows that in Case 2, the prediction performance of the 250W FC was emphasized with a cost of the modeling performance of the three other fuel cells. This indicates a poor generalization ability for the model structure. Hence, the conclusion is that the variables set used in Case 1 is preferred over Case 2.

#### 3.3. Case 3

## 4. Discussion

_{m}and the number of cells in an FC stack, for example, would be preferable. In addition, the structure identification could incorporate more than one nonlinear transformation in a series. Such alternations can be made with the approach presented, but require carefully made modifications to the optimization algorithm. Based on the results in Case 3, the model structure search could be utilized to extend the work in [15]. It would be interesting to observe what kind of expression for the high-current region could be found with an evolutionary optimizer. However, in order to facilitate such a test, more data is required, as only a few data points in the polarization curve data that were utilized in this study are in this high-current region.

## 5. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A

## References

- Sharaf, O.Z.; Orhan, M.F. An overview of fuel cell technology: Fundamentals and applications. Renew. Sustain. Energy Rev.
**2014**, 32, 810–853. [Google Scholar] [CrossRef] - Lee, J.H.; Lalk, T.R.; Appleby, A.J. Modeling electrochemical performance in large scale proton exchange membrane fuel cell stacks. J. Power Sources
**1998**, 70, 258–268. [Google Scholar] [CrossRef] - Mann, R.F.; Amphlett, J.C.; Hooper, M.A.I.; Jensen, H.M.; Peppley, B.A.; Roberge, P.R. Development and application of a generalised steady-state electrochemical model for a PEM fuel cell. J. Power Sources
**2000**, 86, 173–180. [Google Scholar] [CrossRef] - Pisani, L.; Murgia, G.; Valentini, M.; D’Aguanno, B. A new semi-empirical approach to performance curves of polymer electrolyte fuel cells. J. Power Sources
**2002**, 108, 192–203. [Google Scholar] [CrossRef] - Kulikovsky, A.A.; Wüster, T.; Egmen, A.; Stolten, D. Analytical and Numerical Analysis of PEM Fuel Cell Performance Curves. J. Electrochem. Soc.
**2005**, 152, A1290. [Google Scholar] [CrossRef] [Green Version] - Amphlett, J.C. Performance Modeling of the Ballard Mark IV Solid Polymer Electrolyte Fuel Cell. J. Electrochem. Soc.
**1995**, 142. [Google Scholar] [CrossRef] - Ohenoja, M.; Sorsa, A.; Leiviskä, K. Genetic Algorithms in Model Structure Identification for Fuel Cell Polarization Curve. In Proceedings of the 5th International Conference on Control, Decision and Information Technologies (CoDIT), Thessaloniki, Greece, 10–13 April 2018; pp. 539–544. [Google Scholar] [CrossRef]
- Jourdani, M.; Mounir, H.; Marjani, A. Three-Dimensional PEM Fuel Cells Modeling using COMSOL Multiphysics. Int. J. Multiphys.
**2017**, 11. [Google Scholar] [CrossRef] [Green Version] - Mo, Z.-J.; Zhu, X.-J.; Wei, L.-Y.; Cao, G.-Y. Parameter optimization for a PEMFC model with a hybrid genetic algorithm. Int. J. Energy Res.
**2006**, 30, 585–597. [Google Scholar] [CrossRef] - Ohenoja, M.; Leiviskä, K. Validation of genetic algorithm results in a fuel cell model. Int. J. Hydrogen Energy
**2010**, 35, 12618–12625. [Google Scholar] [CrossRef] - Sorsa, A.; Koskenniemi, A.; Leiviskä, K. Differential evolution in parameter identification fuel cell as an example. In Proceedings of the 9th International Conference on Informatics in Control, Automation and Robotics (ICINCO 2012), Rome, Italy, 28–31 July 2012; Volume 1, pp. 40–49. [Google Scholar]
- Sun, Z.; Wang, N.; Bi, Y.; Srinivasan, D. Parameter identification of PEMFC model based on hybrid adaptive differential evolution algorithm. Energy
**2015**, 90, 1334–1341. [Google Scholar] [CrossRef] - El-Fergany, A.A. Extracting optimal parameters of PEM fuel cells using Salp Swarm Optimizer. Renew. Energy
**2018**, 119, 641–648. [Google Scholar] [CrossRef] - Ali, M.; El-Hameed, M.A.; Farahat, M.A. Effective parameters’ identification for polymer electrolyte membrane fuel cell models using grey wolf optimizer. Renew. Energy
**2017**, 111, 455–462. [Google Scholar] [CrossRef] - Yang, S.; Chellali, R.; Lu, X.; Li, L.; Bo, C. Modeling and optimization for proton exchange membrane fuel cell stack using aging and challenging P systems based optimization algorithm. Energy
**2016**, 109, 569–577. [Google Scholar] [CrossRef] - Chakraborty, U.K. Static and dynamic modeling of solid oxide fuel cell using genetic programming. Energy
**2009**, 34, 740–751. [Google Scholar] [CrossRef] - Xue, X.D.; Cheng, K.W.E.; Sutanto, D. Unified mathematical modelling of steady-state and dynamic voltage–current characteristics for PEM fuel cells. Electrochim. Acta
**2006**, 52, 1135–1144. [Google Scholar] [CrossRef] - Han, I.-S.; Chung, C.-B. Performance prediction and analysis of a PEM fuel cell operating on pure oxygen using data-driven models: A comparison of artificial neural network and support vector machine. Int. J. Hydrogen Energy
**2016**, 41, 10202–10211. [Google Scholar] [CrossRef] - Srinivasan, S.; Ticianelli, E.A.; Derouin, C.R.; Redondo, A. Advances in solid polymer electrolyte fuel cell technology with low platinum loading electrodes. J. Power Sources
**1988**, 22, 359–375. [Google Scholar] [CrossRef] [Green Version] - Kim, J. Modeling of Proton Exchange Membrane Fuel Cell Performance with an Empirical Equation. J. Electrochem. Soc.
**1995**, 142, 2670. [Google Scholar] [CrossRef] - Squadrito, G.; Maggio, G.; Passalacqua, E.; Lufrano, F.; Patti, A. An empirical equation for polymer electrolyte fuel cell (PEFC) behaviour. J. Appl. Electrochem.
**1999**, 29, 1449–1455. [Google Scholar] [CrossRef] - Correa, J.M.; Farret, F.A.; Canha, L.N.; Simoes, M.G. An electrochemical-based fuel-cell model suitable for electrical engineering automation approach. IEEE Trans. Ind. Electron.
**2004**, 51, 1103–1112. [Google Scholar] [CrossRef] - Michalewicz, Z. Genetic Algorithms + Data Structures = Evolution Programs; Springer: Berlin/Heidelberg, Germany, 1996; ISBN 978-3-662-03315-9. [Google Scholar]
- Ohenoja, M.; Leiviska, K. Identification of electrochemical model parameters in PEM fuel cells. In Proceedings of the International Conference on Power Engineering, Energy and Electrical Drives, Lisbon, Portugal, 18–20 March 2009; pp. 363–368. [Google Scholar] [CrossRef]
- Chakraborty, U.K. Reversible and Irreversible Potentials and an Inaccuracy in Popular Models in the Fuel Cell Literature. Energies
**2018**, 11, 1851. [Google Scholar] [CrossRef]

**Figure 5.**Example of binary coded chromosome and resulted mathematical expression for a three-term model structure (n = 3) with up to eight possible variables (j = 8 = 2

^{3}, N

_{j}= 3), four possible transformation operators (m = 4= 2

^{2}, N

_{m}= 2), and two possible uniting operators (u = 2 = 2

^{1}, N

_{u}= 1).

**Table 1.**Overview on seven different polarization curve models showing the number of free parameters (n

_{p}) and variables utilized (denoted by x in the table).

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ohenoja, M.; Sorsa, A.; Leiviskä, K.
Model Structure Optimization for Fuel Cell Polarization Curves. *Computers* **2018**, *7*, 60.
https://doi.org/10.3390/computers7040060

**AMA Style**

Ohenoja M, Sorsa A, Leiviskä K.
Model Structure Optimization for Fuel Cell Polarization Curves. *Computers*. 2018; 7(4):60.
https://doi.org/10.3390/computers7040060

**Chicago/Turabian Style**

Ohenoja, Markku, Aki Sorsa, and Kauko Leiviskä.
2018. "Model Structure Optimization for Fuel Cell Polarization Curves" *Computers* 7, no. 4: 60.
https://doi.org/10.3390/computers7040060