**Abstract**

Hydrogen is one of the leading candidates in the search for an alternative to fossil hydrocarbon fuels. The spread of these technologies requires a real-time control of generator performances. Artificial intelligence (AI) and mathematic tools can make smarter the smart grid. The electrochemical modeling can be coupled successfully with artificial intelligent approach, if these models can be quickly computed with a large numerical stability. This chapter shows a methodology to build this kind of modeling work. Thanks to a simplified but physically reasonable model of PEM fuel cell, we will show that the reactant access (oxygen) or water management (a product of the reaction) and the reaction rate can be easily described with low computing time consuming. In addition, the artificial neural network could be trained with a reduced amount of data generated by these cell models.

**Keywords:** electrochemical modeling, PEMFC, AI

## **1. Introduction**

In the current context of the spread of renewable energies, these are by nature variable, therefore subject to both daily and seasonal intermittencies. Electrochemical devices have been successful in proving their applicability in terms of energy storage (power to gas) [1]. Controlling in real time, predicting the performance is the advantage that electrochemical generators can offer.

In addition, electricity consumption and production must, at every moment, be in perfect adequacy with the demand of the users. However, this demand is variable and cannot be completely regulated. The production must be able to adapt instantly to the demand, to preserve the stability of the network. Thus, exchanging information between the production and storage sites becomes a major issue. This will result in a strategy of predictive actions in a power grid strongly constrained by intermittent sources of energy. The interpretation and exchange between blocks of storage and energy supplies will be the key to a decentralized energy production and smart grid [2, 3]. According to Ramchurn et al. [4] the grand challenge for artificial intelligence is to put the smarts into the Smart Grid.

Electrochemical modeling can provide "smart" tools for smart grid. The establishment of a mathematical model of an electrochemical generator is handled by the scientific culture of the researcher who establishes it. Therefore, a great deal of

subjectivity appears in any modeling work, the approach of a mechanic/energy specialist, an electrochemist, or a physicochemist will differ mainly in the basic assumptions of modeling (model simplifications). However, whatever the cultural origin of the modeler, the numerical resolution of a multiphysical problem makes it possible to assure three major functions in the phase of development [5]:

combination of inputs-outputs covering the studied domain. Therefore it is possible

As shown below, electrochemical modeling can be coupled successfully with artificial intelligent approach; thus in the following subsections, we provide basic mathematical models of fuel cells. These models can be quickly computed with

An electrochemical cell is characterized by the I-V (current–voltage) behavior: the current that passes across the cell to the applied cell voltage. The I-V relation depends on various physical phenomena and is fundamental to achieve efficiently electrochemical conversion. When current is drawn using computational tools, the current density may not be uniformly distributed on the electrode surfaces. The performance and lifetime of electrochemical cells, such, is often improved by a uniform current density distribution. Therefore, it is necessary to optimize the current distribution. The electric current is a flow of electric charges: through the electrolyte between the anode and the cathode in the ions form and within the wires and current collectors/electrode materials in the electrons form. When the overall current of the cell is equal to zero, for example, on the disconnection of an electrode from the power supply or the load, the cell voltage is equal to UOCV the open

where *Ea*,0 *and Ea*,0 are the potential of each electrodes at OCV. It is shown that the *UOCV* is related to the difference of free enthalpy differences of each reaction,

*UOCV* <sup>¼</sup> *<sup>Δ</sup>Gi*

where *ΔGi* is the Gibbs energy of the species i with specified cell temperature

irreversibilities standing in the electrochemical conversion. The electrode potentials

According to this description, an anode overvoltage is positive, while the cathode overvoltage is negative in all cases. The overvoltages depend on the current density at the electrode, depending on the involved electrochemical reactions, the electrode materials, and several operating conditions: concentration species, flow rate, etc. The current density is an extensive quantity that can be defined in any point of the electrochemical device, i.e., at the surface of the electrodes and through the electrolyte. In addition Ohm's law expresses the current density according to the

electrochemical reactor (electrolyzer) is greater than *UOCV*, and electrochemical

differ from the equilibrium values *Ea*,0 and *Ea*,0, and this difference is called

involving the number n of electrons exchanged and the Faraday constant:

(T) and cell pressure (P). At a non-zero current, the cell voltage of an

generator (fuel cell or battery) is smaller than *UOCV* due to the various

local potential gradient, using the conductivity as follows:

*I* ¼ 0; *Ucell* ¼ *UOCV* ¼ *Ea*,0 � *Ec*,0 (1)

*nF* (2)

*η<sup>a</sup>* ¼ *Ea* � *Ea*,0 (3) *η<sup>c</sup>* ¼ *Ec* � *Ec*,0 (4)

to generate database from model [14].

*DOI: http://dx.doi.org/10.5772/intechopen.89958*

*How to Build Simple Models of PEM Fuel Cells for Fast Computation*

**2. Main electrochemical phenomenon**

a large numerical stability.

circuit voltage:

overvoltage:

**81**


The modeling of an electrochemical system involves the mathematical expressions of the physical phenomena that take place there (a priori). Obviously, all model representations only offer a fragmentary assessment of the real systems. These various representations are distinguishable by their scales of time and space. However, the notion of adapted or appropriate modeling remains subjective. Indeed, as described in the literature about fuel cell models [6, 7], each of the approaches has limitations of description or prediction, and their main interest is to highlight one specific process. Despite this subjectivity, the model must prove its validity.

The validity of the model could be named external, i.e., related to theories, concepts, assumptions, and experimental data. Thus, the model is theoretically valid if it accepts theories or models already validated. In addition, if the model well matches to its potential of scientific explanation (the state of the art), one will qualify its heuristic validity. However, building a model cannot be done without solving it in all its intended range. Consequently, it is also necessary to define criteria of internal validity, which are criteria of evaluation of the model independent of the theories, results, and hypotheses. The algorithm (solver) must be appropriate, and the evaluation errors must remain within "valid" limits.

External validations that may be acceptable include empirical validity (the model corresponds to the available data) or pragmatic validity (the model satisfies the intended use).

A fuel cell is a nonlinear and strongly coupled dynamic system. It is a multiinput multi-output system based on multiphase flow, electrochemical reactions, and heat transfer. For example, the control strategies of PEMFC can be built on a prediction of the future output of the system to compute the current control action [8]. In practice, the current control action is obtained by solving online an optimization problem. The aim of the optimization problem is to find the optimum of a cost function that minimizes the mean squared difference between predicted outputs and target values.

To spare computation time due to computing of multiphysic fuel cell models, artificial intelligence (AI) techniques are useful as alternate approaches to conventional multiphysic modeling: e.g., artificial neural network (ANN) simulator could be employed to predict the fuel cell behavior [9–12]. The ANN could be trained with a reduced amount of data generated by a validated cell model [13]. Once this network is trained, it can predict different operational parameters of the fuel cell reducing the computation time [14]. This strategy has many possibilities [15]: spectroscopic analysis, prediction of reactions, chemical process control, and the analysis of electrostatic potentials. The ANN is trained to learn the internal relationships from data. These data may be taken from the real process even if there are noisy. The database should have a significant size and contain the maximum

#### *How to Build Simple Models of PEM Fuel Cells for Fast Computation DOI: http://dx.doi.org/10.5772/intechopen.89958*

combination of inputs-outputs covering the studied domain. Therefore it is possible to generate database from model [14].

As shown below, electrochemical modeling can be coupled successfully with artificial intelligent approach; thus in the following subsections, we provide basic mathematical models of fuel cells. These models can be quickly computed with a large numerical stability.
