# Fuel Cell

**Libraries:**

Simscape /
Electrical /
Sources

## Description

The Fuel Cell block models a fuel cell that converts the chemical energy of hydrogen into electrical energy.

This chemical reaction defines the electrical conversion:

$${H}_{2}+\frac{1}{2}{O}_{2}\to {H}_{2}O+heat$$

which occurs due to these anode and cathode half-reactions:

$$\begin{array}{l}{H}_{2}\to 2{H}^{+}+2{e}^{-}\\ \frac{1}{2}{O}_{2}+2{H}^{+}+2{e}^{-}\to {H}_{2}O\end{array}$$

A fuel cell stack comprises several series-connected fuel cells. This figure shows the equivalent circuit of a single fuel cell that this block uses

where:

*V*is the cell voltage._{FC}*R*is the_{i}**Internal resistance**.*R*is the_{d}**Sum of activation and concentration resistances**.*C*is the parallel RC capacitance that accounts for time dynamics in the cell._{dl}

### Equations

You can use the **Model fidelity** parameter to set the
Fuel Cell block to two different levels of fidelity:

`Simplified - nominal conditions`

— The block calculates the Nernst voltage at the nominal condition of temperature and pressure.`Detailed with physical inputs`

— The block calculates the Nernst voltage by considering the pressures and flow rates of fuel and air.

**Simplified Electrical Model**

When **Model fidelity** is set to ```
Simplified - nominal
conditions
```

, the Fuel Cell block
calculates the Nernst voltage, *E*, at the nominal condition of
temperature and pressure, as defined by these equations:

$$\begin{array}{l}E={E}_{oc}-NAln\left(\frac{{i}_{FC}}{{i}_{0}}\right)\\ {v}_{FC}={N}_{unit}E-{R}_{i}{i}_{FC}-{v}_{d}\\ \frac{1}{{R}_{d}}\left(\tau \frac{d{v}_{d}}{dt}+{v}_{d}\right)={i}_{FC}\end{array}$$

where:

*E*is the_{oc}**Open-circuit voltage**.*N*is the**Number of cells per module**.*i*is the current that the fuel cell generates._{FC}*v*is the voltage across the fuel cell terminals._{FC}*N*is the_{unit}**Module units (Series)**.*v*is the voltage drop that accounts for fuel cell dynamics._{d}*A*is the**Tafel slope**, in volts.*i*is the_{0}**Nominal exchange current**.$$\tau ={R}_{d}{C}_{dl}$$.

**Detailed Electrical Model**

When **Model fidelity** is set to ```
Detailed with physical
inputs
```

, the Fuel Cell block
calculates the Nernst voltage, *E*, by considering the
pressures and flow rates of fuel and air.

These equations determine the rates of utilization of hydrogen,
*U _{H2}*,
and oxygen,

*U*

_{O2}$$\begin{array}{l}{U}_{{H}_{2}}=\frac{60000N{i}_{FC}{V}_{e}}{{p}_{fuel}{q}_{fuel}{x}_{{H}_{2}}}\\ {U}_{{O}_{2}}=\frac{60000N{i}_{FC}{V}_{e}}{2{p}_{air}{q}_{air}{x}_{{O}_{2}}}\end{array}$$

where:

*V*is the thermal voltage at room temperature._{e}*p*is the supply pressure of the fuel, in_{fuel}`bar`

.*q*is the fuel flow rate._{fuel}*x*is the concentration of hydrogen in the fuel, in percent._{H2}*p*is the supply pressure of air, in_{air}`bar`

.*q*is the air flow rate._{air}*x*is the concentration of oxygen in the air, in percent._{O2}

These equations define the partial pressures:

$$\begin{array}{l}{p}_{{H}_{2}}={p}_{fuel}{x}_{{H}_{2}}-{U}_{{H}_{2}}\\ {p}_{{O}_{2}}={p}_{air}{x}_{{O}_{2}}-{U}_{{O}_{2}}\\ {p}_{{H}_{2}O}={p}_{air}{x}_{{H}_{2}O}-2{U}_{{O}_{2}}\end{array}$$

where
*x _{H2O}* is
the concentration of vapor in air, in percent.

Then, the block computes the Nernst voltage as

where:

$${K}_{z}=\frac{\frac{{E}_{oc\_adm}}{{K}_{c}N}-1.229}{\left({T}_{nom}-298\right)\frac{-44.43}{{z}_{0}F}+\frac{R{T}_{nom}}{{z}_{0}F}\mathrm{ln}\left({p}_{nH2}{p}_{n{O}_{2}}^{\frac{1}{2}}\right)}$$.

$${E}_{Tafel}=N{A}_{T}ln\left(\frac{{i}_{FC}}{{i}_{0}}\right)$$ is the electrokinetic term for the activation.

$${E}_{conc}={V}_{e}\frac{T}{298}\mathrm{ln}\left(\frac{{i}_{lim}}{{i}_{lim}-{i}_{FC}}\right)$$ is the electrokinetic term for the concentration.

$${E}_{oc\_adm}=max\left({E}_{oc},N\left(1.229+{\scriptscriptstyle \frac{R{T}_{nom}}{2F}}\mathrm{ln}\left({p}_{n{H}_{2}}{p}_{n{O}_{2}}^{\frac{1}{2}}\right)\right)\right)$$.

*K*is the voltage constant at nominal condition of operation._{c}*T*is the operating temperature of the fuel cell.*T*is the value of the_{nom}**Nominal temperature**parameter.*z*is the number of moving electrons per second.*z*is the number of moving electrons per second at the value of the_{0}**Nominal exchange current**parameter.*F*is the Faraday constant.*R*is the universal gas constant.*p*is the nominal hydrogen pressure, in_{nH2}`bar`

.*p*is the nominal oxygen pressure, in_{nO2}`bar`

.$${A}_{T}=\frac{AT}{\mathrm{ln}(10)\ast 298}$$ is the Tafel slope as a function of the temperature.

*i*is the value of the_{lim}**Collapse current**parameter.The voltage

`1.229`

represents the standard cell potential for the Nernst equation.

The block computes the power dissipated, or the heat released in the fuel cell, by using this equation

$${P}_{dissipated}={Z}_{e\_agg}\left(T\Delta S\right)+{R}_{i}{i}_{FC}+{v}_{d}^{2}\frac{1}{{R}_{d}}$$

where:

$${Z}_{e\_agg}=\frac{\left({N}_{unit}E-{R}_{i}{i}_{FC}-{v}_{d}\right){i}_{FC}}{2\Delta G}$$ is the total electron circulation rate, in

`mol/s`

.*TΔS*is the change in entropy of the fuel cell reaction, in`kJ/(mol*K)`

, at the operating temperature of the fuel cell.*ΔG*is the change in Gibbs free energy of the full fuel cell reaction, in`kJ/mol`

, at the operating temperature of the fuel cell.

### Variables

To set the priority and initial target values for the block variables before simulation,
use the **Initial Targets** section in the block dialog box or Property
Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Use nominal values to specify the expected magnitude of a variable in a model. Using
system scaling based on nominal values increases the simulation robustness. Nominal values
can come from different sources. One of these sources is the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see System Scaling by Nominal Values.

## Examples

## Limitations

The Fuel Cell block does not allow electrolysis.

## Ports

### Input

### Conserving

## Parameters

## References

[1] Do, T.C., et al. “Energy
Management Strategy of a PEM Fuel Cell Excavator with a Supercapacitor/Battery Hybrid
Power Source”. *Energies* 12, no. 22, (November 2019). DOI.org
(Crossref), doi:10.3390/en13010136.

[2] Motapon, Souleman N., O. Tremblay
and L. Dessaint, “A generic fuel cell model for the simulation of fuel cell
vehicles.” *2009 IEEE Vehicle Power and Propulsion
Conference*, Dearborn, MI, 2009, pp. 1722-1729, doi:
10.1109/VPPC.2009.5289692

[3] Hirschenhofer, J. H.,, D.B.
Stauffer, R.R. Engleman, and M.G. Klett. *Fuel Cell Handbook (4th
Ed)*. U.S. Department of Energy Office of Fossil Energy, 1988.

[4] Larminie, James, and Andrew Dicks.
*Fuel Cell Systems Explained*. West Sussex, England: John Wiley
& Sons, Ltd,., 2003. https://doi.org/10.1002/9781118878330.

## Extended Capabilities

## Version History

**Introduced in R2021a**