# Power and Voltage Modelling of a Proton-Exchange Membrane Fuel Cell Using Artificial Neural Networks

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Experimental Setup

## 3. Artificial Neural Networks (ANNs)

**I**, which includes five input variables of current, anode and cathode inlet flow rates, pressure, and temperature, while the output layer of the output vector,

**O**, is the output variable. This arrangement of the ANN model allows it to perform summation and apply activation functions to determine the values of a hidden or output layer for one time step ahead. The activation function of the output layer is chosen as the linear function, while the activation functions of the hidden layer are the log-sigmoid function.

**I**to the Hessian matrix to improve the conditioning. Extensive research has been done for finding decent initial values for µ [18]. Small values of µ allow the performance to approach Newton’s algorithm, whereas large values of µ are identical to the gradient descent or backpropagation algorithm performance. The scaled conjugate gradient (SCG) method, created by Moller [19], is premised on conjugate directions; however, unlike other conjugate gradient algorithms, this methodology does not perform a line search at each iteration, whereas other conjugate gradient algorithms do require a line search at each iteration [19]. This increases the computational cost of the system. SCG was created to eliminate the need for the time-consuming line search. When using the scaled conjugate gradient approach, the MATLAB network training function “trainscg” updates the weight and bias values of the network while it is being trained. It can train any network as long as its weight, net input, and transfer functions all have derivative functions. It can train any network with derivative functions. The step size in the SCG method is a function of the quadratic approximation of the error function, which makes it more resilient and independent of the parameters that the user has provided for it. The step size is estimated using a different approach. The second order term is calculated as

- $\overline{\omega}$ is denoted as the vector in space ${R}^{n}$;
- $E\overline{\omega}$ is the global error function;
- ${E}^{\prime}\overline{\omega}$ is the gradient of error;
- ${E}_{qw}^{\text{'}}\left(\overline{{y}_{1}}\right)$ is the quadratic approximation of error function;
- $\overline{{p}_{1}},\overline{{p}_{2}},\dots ,\overline{{p}_{k}}$ is the set of non-zero weight vectors.
- ${\lambda}_{k}$ is to be updated, such that,

- ${\mathsf{\Delta}}_{k}>0.75,\mathrm{then}{\lambda}_{k}=\frac{{\lambda}_{k}}{4}$
- ${\mathsf{\Delta}}_{k}<0.25,\mathrm{then}{\lambda}_{k}={\lambda}_{k}+\frac{{\delta}_{k}\left(1-{\mathsf{\Delta}}_{k}\right)}{\left|{p}_{k}^{2}\right|}$

## 4. Results and Discussion

#### 4.1. Experimental Results

^{TM}power module. The figure highlights the system’s response to step changes in the load. The fuel cell supplies the current to sustain the load step change. The regulator assembly supports the flow of hydrogen gas into the cell, provided there is enough fuel in the gas bottles. The changes in voltage and stack current, as well as the airflow in tandem to the step change, are captured in the figure below. In ideal conditions, the air flow rate carefully tracks the flow needed at nearly 16 slpm. After moving a load step to full power, the air pump rapidly speeds up to supply an airflow rate of nearly 85 slpm. The stack current also increases during the transient interval because of the increased parasitic power from the air compressor. A similar situation occurs after moving a load step from full power to idle. There is a decline in the airflow due to inertia in the air pump. The output voltage slowly recovers and stabilizes to 43 V over a 0.5 s interval. The net current output from Figure 5b ranges from 0–46 A. However, it can be deduced that the output voltage varies when increasing the operating load from the polarization curve. The ideal voltage for the fuel cell system was recorded as 43 VDC. The output voltage recorded at the rated power was between 26–29 VDC. Figure 5b further highlights the parasitic load with respect to the net current and output power. The system is designed in such a way that energy to support the functionality of the cooling fans, sensors, and air compressors originates from the fuel cell. When the system is idle, the power needed to support all of the components is nearly 35 watts. There is a direct correlation between the auxillary load and current, mainly to sustain higher air pump and cooling fan duties. When the fuel cell system is operating at its rated capacity, approximately 250 watts of auxiliary load is needed. As captured in Figure 5c, the rate of hydrogen consumption is also directly proportional to the rateed power. However, it can be deduced that current demand is directly correlated to hydrogen consumption. It can also be denoted that at the rated power, the highest rate of hydrogen being consumed is less than 18.5 slpm. At full power, the system efficiency from Figure 5d is 38%. The highest performance of the system is nearly 50% and this occurs at the part load. The production of waste heat from Figure 5e is also directly proportional to the output current and average net output power. Nearly 1650 W of waste heat is produced at the rated power.

#### 4.2. ANN Results

^{®}software with five input variables and two output variables [13]. The models used >90% of more than 400 data points for training, and <10% for testing and validation. The number of hidden layer neurons within the single hidden layer and the type of learning algorithms were varied in the models in order to determine the best fit model. Table 2 compares the MSE and coefficient of determination of the voltage model results for the three optimization algorithms. The first column presents the type of algorithms used for the ANN modeling approach, the second column lists the selected range of hidden layer neurons that were compared, the third column shows the coefficient of determination values, and the fourth column presents the MSE of each model. Similar to Table 2, Table 3 compares the MSE and coefficient of determination of the stack temperature model results for the three algorithms. Figure 6 shows the experimental and model responses of the stack voltage where the ANN models with LM had 1, 10, and 20 hidden neurons. The y axis is the voltage in V and the x axis is the time in s. Figure 7 includes plots of the experimental and model responses of the stack voltage, where the ANN models with the Bayesian algorithm used 1, 10, and 20 hidden neurons. Figure 8 demonstrates plots of experimental and model responses of the stack voltage where the ANN models with the SCG algorithm had 1, 10, and 20 hidden neurons.

#### 4.3. Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Biswas, M.A.R.; Robinson, M.D. Prediction of Direct Methanol Fuel Cell Stack Performance Using Artificial Neural Network. ASME J. Electrochem. Energy Convers. Storage
**2017**, 14, 031008. [Google Scholar] [CrossRef] - Biswas, M.; Mudiraj, S.; Lear, W.; Crisalle, O. Systematic Approach for Modeling Methanol Mass Transport on the Anode Side of Direct Methanol Fuel Cells. Int. J. Hydrogen Energy
**2014**, 39, 8009–8025. [Google Scholar] - Mudiraj, S.; Crisalle, O.D.; Biswas, M.; Lear, W. Comprehensive Mass Transport Modeling Technique for the Cathode Side of an Open-Cathode Direct Methanol Fuel Cell. Int. J. Hydrogen Energy
**2015**, 40, 8137–8159. [Google Scholar] - Ogungbemi, E.; Ijaodola, O.; Khatib, F.N.; Wilberforce, T.; El Hassan, Z.; Thompson, J.; Ramadan, M.; Olabi, A.G. Fuel cell membranes—Pros and cons. Energy
**2019**, 172, 155–172. [Google Scholar] [CrossRef] [Green Version] - Ogungbemi, E.; Wilberforce, T.; Ijaodola, O.; Thompson, J.; Olabi, A.G. Review of operating condition, design parameters and material properties for proton exchange membrane fuel cells. Int. J. Energy Res.
**2020**, 45, 1227–1245. [Google Scholar] [CrossRef] - Shen, G.; Liu, J.; Wu, H.B.; Xu, P.; Liu, F.; Tongsh, C.; Jiao, K.; Li, J.; Liu, M.; Cai, M.; et al. Multi-functional anodes boost the transient power and durability of proton exchange membrane fuel cells. Nat. Commun.
**2020**, 11, 1191. [Google Scholar] [CrossRef] [Green Version] - Jayakumar, A.; Chalmers, A.; Lie, T.T. Review of prospects for adoption of fuel cell electric vehicles in New Zealand. IET Electr. Syst. Transp.
**2017**, 7, 259–266. [Google Scholar] [CrossRef] - Miao, Q.; Cao, G.; Zhu, X. Performance analysis and fuzzy neural networks modeling of direct methanol fuel cell. J. Shanghai Univ.
**2007**, 11, 84–87. [Google Scholar] - Biswas, M.A.R.; Robinson, M.D.; Fumo, N. Prediction of residential building energy consumption: A neural network approach. Energy
**2016**, 117, 84–92. [Google Scholar] - Xu, L.; Xiao, J. Dynamic Modeling and Simulation of PEM Fuel Cells Based on BP Neural Network. In Proceedings of the 2011 3rd International Workshop on Intelligent Systems and Applications, Wuhan, China, 28–29 May 2011; pp. 1–3. [Google Scholar]
- Lopes, F.C.; Watanabe, E.H.; Rolim, L.G.B. Analysis of the time-varying behavior of a pem fuel cell stack and dynamical modeling by recurrent neural networks. In Proceedings of the Brazilian Power Electronics Conference (COBEP 2013), Gramado, Brazil, 27–31 October 2013. [Google Scholar]
- Li, P.; Chen, J.; Cai, T.; Liu, G. On-line identification of fuel cell model with variable neural network. In Proceedings of the 29th Chinese Control Conference, Beijing, China, 29–31 July 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 1417–1421. [Google Scholar]
- Puranik, S.V.; Keyhani, A.; Khorrami, F. Neural Network Modeling of Proton Exchange Membrane Fuel Cell. IEEE Trans. Energy Convers.
**2010**, 25, 474–483. [Google Scholar] [CrossRef] - Brunetto, C.; Moschetto, A.; Tina, G. PEM fuel cell testing by electrochemical impedance spectroscopy. Electr. Power Syst. Res.
**2009**, 79, 17–26. [Google Scholar] - Hagan, M.T.; Demuth, H.B.; Beale, M.H. Neural Network Design; PWS Publishing Company: Boston, MA, USA, 1996. [Google Scholar]
- Robinson, M.D.; Manry, M.T. Two-Stage Second Order Training in Feedforward Neural Networks. In Proceedings of the Twenty-Sixth International FLAIRS Conference, St. Pete Beach, FL, USA, 22–24 May 2013. [Google Scholar]
- Wille, J. On the structure of the Hessian matrix in feedforward networks and second derivative methods. In Proceedings of the International Conference on Neural Networks, Houston, TX, USA, 12 June 1997. [Google Scholar]
- Dennis, J.E., Jr.; Schnabel, R.B. Numerical Methods for Unconstrained Optimization and Nonlinear Equations; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 1996. [Google Scholar]
- Møller, M.F. A scaled conjugate gradient algorithm for fast supervised learning. Neural Netw.
**1993**, 6, 525–533. [Google Scholar] [CrossRef] - Gill, P.; Murray, W. Algorithms for the solution of the nonlinear least-squares problem. SIAM J. Numer. Anal.
**1978**, 15, 977–992. [Google Scholar]

**Figure 1.**Operating characteristics for proton-exchange membrane fuel cells [6].

**Figure 4.**Neural network model example with an input layer, one hidden layer with a time delay, and an output layer.

**Figure 5.**(

**a**) Fuel cell response with respect to time. (

**b**) Polarization and power curves for the 1.2 kW Nexa fuel cell. (

**c**) Rate of hydrogen consumption. (

**d**) Efficiency of the system. (

**e**) Waste heat produced from the module.

**Figure 7.**Experimental and model responses of the stack voltage using an ANN with the Bayesian-based algorithm.

**Figure 8.**Experimental and model responses of the stack voltage using an ANN with the SCG algorithm.

**Figure 9.**Experimental and model responses of the stack temperature using an ANN with the LM algorithm.

**Figure 10.**Experimental and model responses of the stack temperature using an ANN with the Bayesian-based algorithm.

**Figure 11.**Experimental and model responses of the stack temperature using an ANN with the SCG algorithm.

Part Number | Item Name | Function in Setup |
---|---|---|

1 | Batteries | 2 × 12 V batteries are connected in series. The batteries power the entire system during start up, as the auxiliary unit requires 5 W prior to Nexa^{TM} completing its start up process and running normally. |

2 | Fuse | Ensures the current via the circuit are below the threshold of the wires, as well as protecting the batteries and essential safety components |

3 | Resistor | Despite the desired resistances being low, the output power of the fuel cell was high; hence, a resistor to sustain the load was required. As a result, wire wound panel mount resistors with a ceramic core were selected. |

4 | Load bank cover | A cover was required as excess heat produced could cause body harm to the operator of the test rig. |

5 | DC/DC converter | The output power from the fuel cell is direct current that is not stable. The The DC/DC converter stabilizes the DC output at 24 V. It is able to elevate the voltage level from low to high and vice versa. |

6 | ISLE Display Unit | Supports when taking readings in terms of the operational characteristics of the fuel cell. |

7 | Isolator Switch | Supports the withdrawal of the batteries once the fuel cell is operating beyond its maximum parasitic load. |

8 | Relay | Connects the major test rig circuit with the batteries, which are independently connected in series. They are needed until the fuel cell starts operating after starting up. |

9 | Terminal blocks/Busbar | This device allows all the resistors to be connected to either the DC/DC converter or to the relay. Every output configuration from the switch box is connected to one of the two busbars. |

10 | Hydrogen sniffer | Supports the detection of potential hydrogen leakage. |

11 | Fuel/Hydrogen cylinder | Serves as a storage unit for the investigation. |

12 | Fuel regulator | For the monitoring of hydrogen in the cylinder. It also aid in regulating the output pressure from the fuel cell. |

13 | PC/Data logging software | NexamonOEM data logging software supports the reading and recording of data based on the experimental setup. |

14 | Hydrogen housing units | To ensure the hydrogen gas bottle is held in position during the experiment, a housing unit is required. |

15 | Cylinder brackets | Its also protects the gas bottle during the experiment |

16 | Power supply | The test rig was powered using energy from the grid with the aid of extension cables. |

17 | Switch boxes | Houses the switches. |

18 | Water collection unit | The water produced as by product from the operation of the fuel cell is carefully delivered to a tank, where the product water can be measured. |

19 | Ballard fuel cell | 1.2 kW PEMFC to be analysed via dynamic loading. |

ANN Learning Algorithms | Number of Hidden Neurons | Coefficient of Determination | Mean Squared Error (V) |
---|---|---|---|

LM | 1 | 0.916 | 4.150 |

LM | 5 | 0.919 | 3.998 |

LM | 10 | 0.923 | 3.790 |

LM | 15 | 0.923 | 3.842 |

LM | 20 | 0.930 | 3.478 |

SCG | 1 | 0.913 | 4.319 |

SCG | 5 | 0.901 | 4.874 |

SCG | 10 | 0.811 | 9.691 |

SCG | 15 | 0.905 | 4.706 |

SCG | 20 | 0.880 | 6.507 |

Bayesian | 1 | 0.917 | 4.093 |

Bayesian | 5 | 0.917 | 4.093 |

Bayesian | 10 | 0.917 | 4.091 |

Bayesian | 15 | 0.917 | 4.091 |

Bayesian | 20 | 0.917 | 4.090 |

ANN Structure | Number of Hidden Neurons | Coefficient of Determination | Mean Squared Error (°C) |
---|---|---|---|

LM | 1 | 0.961 | 3.131 |

LM | 5 | 0.961 | 3.121 |

LM | 10 | 0.961 | 3.141 |

LM | 15 | 0.966 | 2.761 |

LM | 20 | 0.964 | 2.922 |

SCG | 1 | 0.952 | 3.807 |

SCG | 5 | 0.941 | 4.861 |

SCG | 10 | 0.959 | 3.306 |

SCG | 15 | 0.959 | 3.312 |

SCG | 20 | 0.942 | 4.665 |

Bayesian | 1 | 0.961 | 3.126 |

Bayesian | 5 | 0.961 | 3.121 |

Bayesian | 10 | 0.961 | 3.122 |

Bayesian | 15 | 0.961 | 3.122 |

Bayesian | 20 | 0.961 | 3.121 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 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 (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Wilberforce, T.; Biswas, M.; Omran, A.
Power and Voltage Modelling of a Proton-Exchange Membrane Fuel Cell Using Artificial Neural Networks. *Energies* **2022**, *15*, 5587.
https://doi.org/10.3390/en15155587

**AMA Style**

Wilberforce T, Biswas M, Omran A.
Power and Voltage Modelling of a Proton-Exchange Membrane Fuel Cell Using Artificial Neural Networks. *Energies*. 2022; 15(15):5587.
https://doi.org/10.3390/en15155587

**Chicago/Turabian Style**

Wilberforce, Tabbi, Mohammad Biswas, and Abdelnasir Omran.
2022. "Power and Voltage Modelling of a Proton-Exchange Membrane Fuel Cell Using Artificial Neural Networks" *Energies* 15, no. 15: 5587.
https://doi.org/10.3390/en15155587