*2.2. Generic Model from MATLAB Toolbox (GMM)*

A fuel cell stack block integrated into MATLAB/Simulink implements a generic model parameterized to represent the most popular types of fuel cell stacks fed with hydrogen and air. The block represents two versions of the stack model: a simplified model, and a detailed model. The user can switch between the two models by selecting the level in the mask under the model detail level in the block dialogue box. In this paper, we consider the detailed model represented by Figure 3. The notations used are the same as those from [29,30].

The fuel cell voltage is related to the fuel cell current as follows:

$$V\_{fc} = E - R\_i \times I\_{fc} \tag{9}$$

where *R<sup>i</sup>* is the internal resistance, and the controlled voltage source *E* is described by the following equation:

$$E = E\_{oc} - NAIn\left(\frac{I\_{fc}}{i\_0}\right) \times \frac{1}{s\frac{T\_d}{3} + 1} \tag{10}$$

where *s* is the Laplace operator and *Eoc* is an open circuit voltage (V); *N* is the number of cells; *A* is a Tafel slope (V); *i<sup>0</sup>* is the exchange current (A); and *T<sup>d</sup>* is the response time (at 95% of the final value) (s). In Equation (10), the parameters (*Eoc*, *N*, *i*0) are updated online based on the input pressures and flow rates, stack temperature, and gas compositions [29]. Absolutesupplypressure of fuel

Absolutesupplypressure of air

Temperature of operation

Fuel flow rate

Air flow rate

+ -

݅ ܣ ைܧ

Internalresistance

*Micromachines* **2021**, *12*, x 5 of 15

1

ݏ ் ଷ + 1


ைܧ

ܣ ݅

Calculation blocks

**Figure 3.** Circuit of the generic model of a fuel cell stack. **Figure 3.** Circuit of the generic model of a fuel cell stack.

### The fuel cell voltage is related to the fuel cell current as follows: *2.3. Equivalent Electrical RC Circuit (RCM) 2.3. Equivalent Electrical RC Circuit (RCM)* Most dynamic models for PEMFCs are complex, and are not easy to use for control

tions [29].

(9) ܫ × ܴ − ܧ = ܸ where ܴ is the internal resistance, and the controlled voltage source *E* is described by the following equation: Most dynamic models for PEMFCs are complex, and are not easy to use for control purposes. An equivalent electrical circuit could be used as a good alternative to model the fuel cell's dynamical behaviour as represented in Figure 4. purposes. An equivalent electrical circuit could be used as a good alternative to model the fuel cell's dynamical behaviour as represented in Figure 4.

൬ ݈݊ܣܰ

ܸ ܧ

ܫ

ܫ ݅ ൰

൬ ݈݊ܣܰ − ܧ = ܧ

ܫ ݅ ൰ ×

**+**

ܫ

**-**

1

(10)

) are updated

(10)

ݏ ் ଷ + 1

ܴ

ܧ

**+ Figure 4.** Equivalent electric RC circuit of a fuel cell stack. **Figure 4.** Equivalent electric RC circuit of a fuel cell stack.

ܥ

ܫ ܴ From this figure, the fuel cell stack's static electrochemical behaviour can be represented by the following equations [15]:

$$V\_{fc} = E\_{oc} - V - R\_{oh}I\_{fc} \tag{11}$$

$$\frac{dV}{dt} = \frac{1}{\mathcal{C}} I\_{fc} - \frac{1}{\tau} V \tag{12}$$

ܴ + where *V* represents the dynamical voltage across the equivalent capacitor; *C* is the equivalent electrical capacitance; *Roh* is the ohmic resistance; and *τ* is the fuel cell electrical time constant, defined as follows:

$$
\boldsymbol{\pi} = (\boldsymbol{R}\_{\rm ac} + \boldsymbol{R}\_{\rm co})\boldsymbol{\mathsf{C}} \tag{13}
$$

**-** In Equation (11), *Eoc* is the open-circuit voltage, defined as follows:

$$E\_{0\mathcal{C}} = n\_s (E\_{Nernst} - V\_{act}) \tag{14}$$

where *n<sup>s</sup>* is the number of cells in series in the stack; *ENernst* is the thermodynamic potential of the cell, and represents its reversible voltage or Nernst potential; and *Vact* is the activation voltage drop. The quantities *ENernstVact* are given as follows [15,16,21,30]:

$$\begin{array}{l} E\_{\text{Nernst}} = & 1.229 - 8.5 \times 10^{-4} \times \left( T - 298.15 \right) - 3.33 \times 10^{-3} I\_{fc}(\text{s}) \frac{80 \text{s}}{80 \text{s} + 1} \\ & + 4.31 \times 10^{-5} \times T \times \left( \ln(P\_{H2}) + \frac{1}{2} (P\_{O2}) \right) - 3.33 \times 10^{-3} I\_{fc}(\text{s}) \frac{80 \text{s}}{80 \text{s} + 1} \end{array} \tag{15}$$

*Vact* = −0.948 + *T* × h 2.86 <sup>×</sup> <sup>10</sup>−<sup>3</sup> <sup>+</sup> <sup>2</sup> <sup>×</sup> <sup>10</sup>−<sup>4</sup> ln(*A*) <sup>+</sup> 4.3 <sup>×</sup> <sup>10</sup>−<sup>5</sup> ln *CH*<sup>2</sup> <sup>+</sup> 7.6 <sup>×</sup> <sup>10</sup>−<sup>5</sup> ln *CO*<sup>2</sup> i (16)

> where *PH*<sup>2</sup> and *PO*<sup>2</sup> are the partial pressures (atm) of hydrogen and oxygen, respectively; *T* is the cell's absolute Kelvin temperature; and *A* is the cell's active area (cm<sup>2</sup> ). The terms *CO*<sup>2</sup> and *CH*<sup>2</sup> presented in Equation (16) are the oxygen concentration at the cathode membrane/gas interface (mol/cm<sup>3</sup> ), and the liquid phase concentration of hydrogen at the anode/gas interface (mol/cm<sup>3</sup> ), respectively. They can be obtained as follows [21]:

$$\mathcal{C}\_{\mathcal{O}\_2} = \frac{P\_{\mathcal{O}\_2}}{5.08 \times 10^6 \exp\left(\frac{-498}{T}\right)}\tag{17}$$

$$C\_{H\_2} = \frac{P\_{H\_2}}{1.09 \times 10^6 \exp\left(\frac{T}{T}\right)}\tag{18}$$

It should be emphasized that the capacitor *C* in the RC model of Figure 4 affects the transient response of the PEMFC. Using the simulation RC model shown in Figure 4, the shape of the transient response of this model to the step load change is represented in Figure 5. It should be noted that when the load current steps up, the voltage drops simultaneously to some value due to the ohmic losses, and then it decays exponentially to its steady-state value due to the capacitor *C*. However, the experimental voltage of the PEMFC, as can be seen later (Section 5) and found in many works [12,31,32] has the form of Figure 5. This figure clearly illustrates a big difference between the experimental fuel cell voltage and the corresponding voltage given by the RC model. We conclude that the equivalent electrical RC circuit is not suitable for a PEM fuel cell. In the next section, we will present a new equivalent electrical model using an inductor instead of a capacitor, and we will show that the transient of the obtained model fits the experimental transient. *Micromachines* **2021**, *12*, x 7 of 15

**Figure 5.** Comparison between the shape of the experimental FC voltage with the equivalent RC **Figure 5.** Comparison between the shape of the experimental FC voltage with the equivalent RC circuit.

As shown in the previous section, the equivalent electrical RC model is not appro-

to the experimental data. In this paper, a new equivalent electrical circuit is proposed using an inductor and resistors, as shown in Figure 6. Note that the open-circuit voltage

**+**

The electrical model presented in Figure 6 involves three parameters— ܮ, ܴ<sup>ଵ</sup>

**-**

The fuel cell voltage is governed by the following equations:

<sup>ଶ</sup>ܴ − ܧ = ܸ

ܴଶ—which can be determined using the response of the fuel cell voltage to load current step change. Let us first introduce some useful electrical relationships based on the pro-

, and

(19) (ܫ − ܫ)ଵ−ܴ ܫ

ܫ

ܸ

circuit.

*2.4. Equivalent Electrical RL Circuit (RLM)*

ܧ remains the same as in Equation (14).

**Figure 6.** Equivalent electric RL circuit of a fuel cell stack.

ܫ

2.4.2. Determination of Model Parameters

posed circuit.

2.4.1. Proposed RL Circuit

ܴଶ

ܮ <sup>ଵ</sup>ܴ

ܧ

circuit.

## *2.4. Equivalent Electrical RL Circuit (RLM) 2.4. Equivalent Electrical RL Circuit (RLM)*

ݐ ଵݐ ݐ∆

∆ܸ<sup>ଶ</sup>

*Micromachines* **2021**, *12*, x 7 of 15

### 2.4.1. Proposed RL Circuit 2.4.1. Proposed RL Circuit

∆ܸ<sup>ଵ</sup>

ݐ

ܫ

ܫ∆

ଵܫ

ܫ

ܸ௧ଵ

ܸஶ

ܸଶ

ܸଵ

ܸ

∆ܸ<sup>ଷ</sup>

As shown in the previous section, the equivalent electrical RC model is not appropriate for modelling the dynamics of a fuel cell, since its transient is different compared to the experimental data. In this paper, a new equivalent electrical circuit is proposed using an inductor and resistors, as shown in Figure 6. Note that the open-circuit voltage *Eoc* remains the same as in Equation (14). As shown in the previous section, the equivalent electrical RC model is not appropriate for modelling the dynamics of a fuel cell, since its transient is different compared to the experimental data. In this paper, a new equivalent electrical circuit is proposed using an inductor and resistors, as shown in Figure 6. Note that the open-circuit voltage ܧ remains the same as in Equation (14).

time (s)

time (s)

**Figure 5.** Comparison between the shape of the experimental FC voltage with the equivalent RC

RC

Experimental voltage

**Figure 6.** Equivalent electric RL circuit of a fuel cell stack. **Figure 6.** Equivalent electric RL circuit of a fuel cell stack.
