Control of methanol fuelled HTPEM fuel

cell system
Reformer
WGS
Burner
air
Running/starting
mode switch
H2 for
burner
Burner
outlet
Methanol
gas
Evaporator
Pump
Methanol
inlet
Electric air
heater
Cooler
Aalborg University, 2009
ii
Title: [Control of methanol fuelled HTPEM fuel cell system]
Semester: [10th]
The period of work: [02-09-08 to 03-05-09]
Supervisor: [Søren Juhl Andreasen]
Group: [EMSD10]
Supplement: [CD]
[Simon Lennart Sahlin]
[Jesper Kjær Sørensen]
SUMMARY:
This project presents a nonlinear model
of a methanol fuelled high temperature
PEM fuel cell system in a two stage
operation. The system contains an
evaporator unit, a reformer and burner
unit and a fuel cell stack. The
nonlinear model simulates a start up
and a running mode. The nonlin-
ear model is converted to a linear
model and the linear model is used
for testing a PI-controller. A fuel
estimator is created with the purpose of
installing into a running system. The
theoretical results showed a reasonable
result compared to measured data.
The project contains a mathematical
parameter search routine for obtaining
the controller parameters. The electric
efficiency is calculated to about 20%
and can be seen in the nonlinear model.
Prints: [6] pcs.
Number of pages: [119] pages
Appendix pages: [121 - 198] pages
ii
Preface
This report is a master thesis for two students attending the 10th semester of Electro
Mechanical System Design at the university of Aalborg.
The report contains a CD containing the models, scripts, appendixes and experi-
mental data presented in the report. A PDF version of the report can be found on
the CD.
The following notations are used in this report. Citations are encapsulated in [x]
where x is a number. The number corresponds to an entry in the bibliography.
The bibliography contains the information about the articles and books used in the
project.
Equations are encapsulated in (x.y) and numbered by the chapter x and the equation
number y, i.e (6.7) corresponds to the 7th equation in the 6th chapter.
Figures marked figure x.y and not encapsulated but numbered by the chapter x and
a figure number y, i.e figure 1.2 corresponds to the 2nd figure in the 1st chapter.
In some cases the figures are noted with a letter if the figures are placed next to
eachother.
Appendices are noted with a capital letter and can be found in the back of the
report.
The report requires that the reader has a common knowledge about control
strategies, fuel cell systems, and thermodynamics in general.
iii
iv
Contents
1 Introduction 1
1.1 Fuel cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Types of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Components of the system . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Project goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Project scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Nonlinear system model 13
2.1 Fuel cell model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Reformer model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Evaporator model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.4 Fuel estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.5 System efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3 Linear system model 39
3.1 Linearisation of the temperature models . . . . . . . . . . . . . . . . 39
3.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4 Validation of models 47
4.1 Validation of nonlinear model . . . . . . . . . . . . . . . . . . . . . . 47
4.2 Validation of linear model . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5 Control strategies 59
5.1 General control systems . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2 Temperature control . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.3 Controller design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6 Implementation 87
6.1 Experimental setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.2 Evaporator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
6.3 Reformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.4 Simulated run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
v
CONTENTS
7 Conclusion 111
8 Future work 115
9 Project Summary 117
References 119
Appendices
A Experiments 121
A.1 Description of system . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A.2 Experiments with reformer . . . . . . . . . . . . . . . . . . . . . . . . 123
A.3 Experiment with cooler . . . . . . . . . . . . . . . . . . . . . . . . . . 133
B Description of model 137
B.1 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
B.2 Simulink model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
B.3 Reformer model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
B.4 Fuel Cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
B.5 Evaporator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
C Linearisation 171
C.1 Convective loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
C.2 Cell voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
C.3 Nonlinear voltage parts . . . . . . . . . . . . . . . . . . . . . . . . . . 172
C.4 Cathode loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
C.5 Anodic loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
C.6 Linear voltage approximation . . . . . . . . . . . . . . . . . . . . . . 177
C.7 Heat generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
D Labview program 181
D.1 FPGA Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
D.2 RT program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
D.3 Host program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
D.4 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
E Matlab scripts 191
E.1 Fzero coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
E.2 Fzero conservation of mass . . . . . . . . . . . . . . . . . . . . . . . . 193
E.3 Repeating simulation optimizer . . . . . . . . . . . . . . . . . . . . . 195
E.4 Controller parameter search . . . . . . . . . . . . . . . . . . . . . . . 198
vi
Nomenclature
α
c
Charge transfer coefficient [−]
¯
k
j
The k’th working point variable for the
j’th component
˙ n
j
Molar flow of j’th gas stream [kmol/s]
˙ q
air
Volumetric flow rate[l/min]
η
act
Activation loss [V/cell]
η
anode
Combination of the activation and
diffusion loss at the anode
η
cath
Combination of the activation and
diffusion loss at the cathode
η
conc
Concentration loss [V/cell]
η
FC
Electric efficiency of the system [−]
η
ohmic
Ohmic loss[V/cell]
λ Air stoichiometry ratio [−]
λ
H2
Hydrogen stoichiometry ratio [−]
ρ
j
Density of the j’th substance [kmol/m
3
]
C(s) System output signal
c
j
Specific heat capacity of the j’th compo-
nent [kJ/kg −K]
D(s) Disturbance signal
ESA Electrochemical surface area
f Pump frequency [Hz]
G(s) Transfer function
GDL Gas diffusion layer
h Enthalpy pr unit [kJ/kmol]
H(s) Feed back transfer function
i
o
Exchange current density [A/cm
2
]
K
com
Constant ration for the mass balance of
the reformer
K
j
i
Constant of linearisation of the j’th
process with the i’th variable
m
j
Mass of the j’th component [kg]
n
cell
Number of cells in the stack
R Universal gas constant [J/(mol · K)]
R(s) System reference signal
R
diff
Diffusion resistance [Ω · cm
2
]
T
l
Transport lag time constant [s]
T
cell
Cell temperature [K]
T
reform
Reformer temperature [K]
T
Stack
The stack temperature [K]
v
oc
Open circuit voltage [V/cell]
V
pump
Stroke volume of the pump [l]
EES Engineering Equation Solver
EMP Empirical constant [V ]
F Faradays constant [C/mol]
s Complex variable for the laplace trans-
form
SC Steam to carbon ratio [−]
WGS Water Gas Shift reaction
vii
CONTENTS
viii
Introduction 1
1.1 Fuel cell
1.1.1 Fuel cell structure
1.2 Types of operation
1.3 Components of the system
1.3.1 Fuel Cell Stack
1.3.2 Evaporator
1.3.3 Reformer and Burner
1.4 Project goal
1.5 Project scope
1.5.1 Project Limitation
Within the last century, increasing demands for alternative energy sources has
emerged. Recent studies suggest that global warming is not all caused by natural
means alone, and fossil fuel resources is predicted to deplete in the near future. For
this reason research needs to be done on alternative ways of supplying energy to
use for transport and general electric demands. Taking a closer look at the fuel
cell types, currently being developed, a few possible choices are presented; Solid
oxide fuel cell(SOFC), direct methanol fuel cell (DMFC), alkaline fuel cell (AFC)
and polymer electrolyte membrane fuel cell (PEMFC). All of these types of fuel
cells are still being investigated, because they all have different advantages. The
DMFC is fed directly with methanol, while the AFC and PEMFC needs to be fed
with hydrogen of a high purity. Using hydrogen gives the fuel cell a good dynamic
load resistance and has a non-polluting exhaust. DMFC is often discussed as a
good choice for automobiles since no reformer is needed, though performance is
rather limited because of lower reaction rate. SOFC’s is used in a wide variety
of applications, though it is often found in a stationary power generation and
with a high power output(300kW - 2MW). To function properly, the SOFC must
operated at high temperatures (above 800

C), which makes the use in automobile
applications complicated. The high temperature causes the startup time to be larger,
compared to intermediate temperature fuel cells. The cost of components does also
have a negative effect on SOFC systems. [11]
Methanol is a low-cost high energy liquid, and based on the current infrastructure
for gasoline, implementation can be adapted fairly easy. This project will thereby
investigate the use of methanol as fuel in a fuel cell system. Methanol can be
produced from almost any hydrocarbon fuel, and with quite high efficiency. A
mixture of hydrogen, carbon monoxide, and carbon dioxide is mixed together as
seen in (1.1) and (1.2)
1
1 Introduction
2H
2
+ CO →CH
3
OH (1.1)
or
3H
2
+ CO
2
→CH
3
OH + H
2
O (1.2)
These reactions are highly dependent on a suitable catalyst and a fairly high pressure
(about 50 bar). In the case of hydrogen generation, the high pressure and catalyst
is fortunate, since the reaction do not occur unless the conditions are right. State-
of-the-art plants are currently estimated to use about 29 kJ/kg of the supplied fuel.
This amount is based on the lower heating value (LHV) of the fuel and is the power
used to operate the process. The LHV of methanol is 19.93 kJ/kg and corresponds
to an efficiency of about 70%. Allthough most of the current methanol production
is based on natural gas and other fossile fuels, it can also be producd from renewable
biomass. The biomass process is estimated to create methanol, in a few years, with
an efficiency at about 60% and a cost pr Joule similar to the current refined diesel
and gasoline prices, though prices are about a factor of 3 in favour of the gasoline[11].
A fuel cell system can be designed in a lot of ways, though the most common is often
in its most basic form, a fuel cell stack, a unit for converting the DC current into AC
current, a fan/compressor for supplying the oxidant (Air) and a heat exchanger to
extract the heat from the fuel cell exhaust. The complexity of the system is increased
if the introduction of another fuel besides pure hydrogen. If a hydrocarbon fuel is
used, a reforming unit is needed for some fuel cells. A reforming unit can reform the
hydrocarbons into reformat gas containing H
2
, CO, CO
2
and H
2
O. Studies show
that the composition of the reformatted gas can cause a highly degrading effect on a
low temperature PEM fuel cell. By reforming methanol into a high energy reformat
gas, the concentration of CO, in the gas, is often up to several percent. This excludes
the low temperature PEMFC for now, though studies on high temperature PEM
fuel cell (HTPEM) has shown a higher tolerance of CO[10]. HTPEM fuel cells work
at about 160-200

C and is suitable for automobile projects. The HTPEM fuel cell
does not require any humidification of the cathode and this is why a fairly simple
system can be created, as long as the composition of the gas and temperature is
under control.This project will investigate the interaction between a reforming unit
and a HTPEM fuel cell stack. The system is going to be designed to increase the
overall efficiency by utilizing excess heat from the fuel cell stack to evaporate the
initial methanol liquid. Excess hydrogen in the fuel cell exhaust gas is used as fuel
for the burner part of the reformer. A model will be created to investigate the
relation between the different units in the system, and for estimation of controller
parameters. Further description of the system can be found in section 1.2.
2
1 Introduction
1.1 Fuel cell
This section describes the basic structure and reactions used in a fuel cell. The
reactions are based on a hydrogen based fuel cell.
1.1.1 Fuel cell structure
As seen in figure 1.1, the H
2
rich reformat gas and oxidant O
2
are distributed through
the channels in the bipolar plates on both the anode and cathode side respectively.
The gas and oxidant is diffused through the gas diffusion layer (GDL) to the catalyst
layers, which is placed on both sides of the membrane. The membrane layers are
porous carbon layers with dispersed platinum particles. The platinum acts as a
catalyst by increasing the surface area, which is key for getting a high reaction rate.
This surface area is often called the electrochemical surface area (ESA). When fuel
and oxidant are present at the two catalyst layers, an electrical potential difference
is created. This potential can be connected to a load and a current can be drawn.
The cathode and anode is considered positive and negative respectively.
1
2
3
4
5
6
7
Load
H
2
O
2
I
1: Anode bipolar plate
2: Anode gas diffusion layer (GDL)
3: Anode catalyst layer
4: Proton exchange membrane (PEM)
5: Cathode catalyst layer
6: Cathode gas diffusion layer
7: Cathode bipolar plate
Figure 1.1: Structure of a single fuel cel l unit
The typical voltage of a single HTPEM fuel cell will not exceed 0.95V at open
circuit, though this will drop when a current is drawn. If higher voltages is needed,
normally the cells are stacked to create a more applicable potential, see figure 1.2.
Assembling cells in a fuel cell stack has the advantage of increasing the potential,
but it also complicates matters. Fuel and oxidant need to be distributed evenly to
the individual cells. Furthermore, the performance of the cells is very dependent on
temperature, which also demands the cells to be cooled evenly in the stack. [8]
When working with fuel cells, hydrogen is the preferred fuel, but it often presents
volumetric problems because of the low density. When considering the energy
3
1 Introduction
Electrolyte
Anode
Cathode
Hydrogen
Oxygen
Load
Figure 1.2: Simple edge connection of four cel ls in series
density in kWh/m
3
, there is about 8 times more energy pr volume in methanol
compared to hydrogen at 200 bars [2]. By using hydrocarbons as e.g. methanol
the volumetric problems is lesser, and can be used directly in a PEM cell(DMFC).
This method of using methanol has proven to be with a poor performance and a
complicated water management system is needed. This is why a reforming process
is more suitable, though with a higher CO concentration in the gas. Since the
HTPEM works at temperatures of 160-200
o
C, it has a very high tolerance to CO
and is therefore an ideal choice when working with reformer systems[7].
The overall reaction in a fuel cell is shown in reaction (1.3)
H
2
+
1
2
O
2
→H
2
O (1.3)
The reaction (1.3) shows that, hydrogen reacts with oxygen, and the product is
water. This reaction can be divided into two reactions. The Hydrogen Oxidation
Reaction(HOR) and the Oxygen Reduction Reaction (ORR) as shown in reaction
(1.4) and (1.5) respectively.
H
2
→ 2H
+
+ 2e

(1.4)
1
2
O
2
+ 2H
+
+ 2e

→ H
2
O (1.5)
4
1 Introduction
Anode
Cathode
H+ ions through electrolyte
2H
2


H
+
H
+
2e

2e

1
2
O
2
H
2
O
Load
+
+ +
Figure 1.3: Electron flow in a hydrogen fuel cel l
The HOR reaction occurs at the anode and is often much faster compared to the
ORR reaction which happens at the cathode.
A ratio between the amount of methanol and the amount of water in the fuel mixture
is called the steam to carbon ratio (SC). The calculation of the portion of methanol
in a mixture of methanol and water can be seen from (1.6).
V
mix
= V
MeOH
+ V
H
2
O
= V
MeOH
+ SC · V
MeOH
V
MeOH
=
_
1
1 +SC
_
· V
mix
(1.6)
The calculation for the water part is performed by multiplying (1.6) with the steam
to carbon ratio. The steam to carbon ratio is an important factor for the steam
reforming process. The need for vaporized water to bind with the CO during the
reformation process[16]. To further increase the H
2
, and decrease CO, a water gas
Shift (WGS) catalyst is utilized. The WGS reaction can be seen from (1.9).
The reformation process is an endothermic reaction that combines a hydrogen rich
fuel with steam over a catalyst at high temperatures. The methanol is reformed by
a steam reforming process and can be seen in (1.7).
CH
3
OH + H
2
O ↔CO
2
+ 3H
2
(1.7)
which is the sum of the methanol decomposition and the water gas shift(WGS):
CH
3
OH ↔ CO + 2H
2
(1.8)
CO + H
2
O ↔ CO
2
+H
2
(1.9)
By using a reformation process the storage of hydrogen can be avoided. This opens
up for other problems like thermal requirements and more system management, and
this leads to a brief introduction of the different components of a reforming system.
5
1 Introduction
The system consists of a HTPEM fuel cell stack with 65 cells and a blower for the
anode convection of the stack. The anode gas inlet line is connected to a cooler
which ensures that the anode gas has the right temperature of 180

C. The cooler
is connected to a WGS reactor that removes CO gas from the reformat gas. The
WGS-reactor is connected to the gas outlet side of the reformer. The gas inlet
side of the reformer is connected to the gas outlet side of the evaporator and the
evaporator gas inlet side is connected to a fuel pump. The pump is connected to
a fuel tank. The fuel cell stack chathode inlet side is equipped with a blower that
supplies air from the surroundings. The exit air from the fuel cell is transported to
the evaporator for heating purposes. The anode gas outlet line is connected with
the burner gas inlet. The gas is mixed with air and is forced into the burner with
the fuel. This can be seen from the schematic in figure 1.4
Methanol + H
2
O
E
v
a
p
o
r
a
t
o
r
Reformer WGS Cooler
Fuel Cell Load
Blower
Blower
Exhaust Air
Burner
A
V
Air
Air
Methanol + H
2
O: 20-40
o
C
Air flow: 20
o
C
Methanol + H
2
O: 120-250
o
C
Reformate (H
2
+ H
2
O + CO + CO
2
): 500
o
C
Exhaust gas (H
2
O + CO
2
+ H
2
): 400
o
C
Exhaust air flow: 20
o
C
Figure 1.4: Schematic of the system design
The components will be discussed in detail in section 1.3. The system is designed
to operate in two modes, startup mode and running mode. This will be described
in the next section.
1.2 Types of operation
The system process is divided into 2 phases which contain the startup phase, the
running phase. While the system is in the startup phase, the main goal is to raise the
temperature of the system components until the different operation temperatures
are reached. Initially the evaporator is heated up with electric heaters installed in
6
1 Introduction
the evaporator. The evaporator vaporizes the methanol and this is fed directly into
the burner, where the fuel is mixed with air from a blower. This results in a catalytic
combustion of the methanol. The exhaust gas from the burner is lead though the
fuel cell stack and like in the normal running system and the exhaust air from the
fuel cell is passing over the evaporator, and thereby adding heat to the evaporation
process. The startup phase of the system can be see in figure 1.5, where the gray
lines are not it use.
T
T
T
T
T
T
T
T
T
P
P
T
Methanol + H
2
O
E
v
a
p
o
r
a
t
o
r
Reformer WGS Cooler
Fuel Cell
Blower
Blower
Exhaust Air
Burner
Air
Air
Methanol + H
2
O: 20-40
o
C
Air flow: 20
o
C
Methanol + H
2
O: 120-250
o
C
Reformate (H
2
+ H
2
O + CO + CO
2
): 500
o
C
Exhaust gas (H
2
O + CO
2
+ H
2
): 400
o
C
Exhaust air flow: 20
o
C
Figure 1.5: Schematic of the system in the startup phase
The system design for a running system is as shown in figure 1.6. The system
evaporates and reformats the methanol to H
2
,CO and CO
2
, which is let though a
WGS, thereby reducing the amount of CO and adding H
2
in the reformat gas for
the Fuel Cell. The reformat gas is passed though a condenser to cool down the gas
to a proper temperature to avoid damaging the Fuel Cell. The heat of the exhaust
air transferred from the fuel cell is directed into the evaporator, and then out of the
system. The exit of the anode side of the fuel cell, is led into the burner, because of
the excess hydrogen.
1.3 Components of the system
This section has the purpose of describing the different parts of a fuel cell system.
7
1 Introduction
T
T
T
T
T
T
T
T
T
P
P
T
Methanol + H
2
O
E
v
a
p
o
r
a
t
o
r
Reformer WGS Cooler
Fuel Cell
Blower
Blower
Load
Exhaust Air
Burner
A
V
Air
Air
Methanol + H
2
O: 20-40
o
C
Air flow: 20
o
C
Methanol + H
2
O: 120-250
o
C
Reformate (H
2
+ H
2
O + CO + CO
2
): 500
o
C
Exhaust gas (H
2
O + CO
2
+ H
2
): 400
o
C
Exhaust air flow: 20
o
C
Figure 1.6: Schematic of the system in the running phase
1.3.1 Fuel Cell Stack
The fuel cell stack contains 65 single fuel cells and each cell has a reactive area of
46.16cm
2
. The cells are connected in a serial connection and the fuel cell stack is
insulated with a melamine foam layer with a thickness of 0.03m. The operating
temperature of the fuel cell stack has an interval between 433 K (160

C) and 473
K (200

C) which is typical for a HTPEM cell. During operation the cells in the
stack produce heat and to ensure that the temperature, within the stack, is kept at
a given interval. The stack is fed with air at room temperature from an electrical
blower. The air is heated inside the stack and transfers the heat out of the stack
through the exhaust. A typical HTPEM can be seen from figure 1.7.
Fuel is fed to the fuel cell stack from the reformer and distributed through the gas
channels. The stack is initially supplied with 120% of the needed hydrogen in order
to have 20% excess hydrogen. The combustion of the excess hydrogen is used to add
heat to the endothermic reactions happening in the reformer, where the methanol
and watermixture is reformed to be used as fuel for the fuel cell stack.
8
1 Introduction
Figure 1.7: Picture of a HTPEM fuel cel l
1.3.2 Evaporator
The evaporator is a heat exchanger made of two aluminum parts, and with a total
mass of 0.5kg. The heat exchanger is build into a chamber connected to the exhaust
of the fuel cell stack. The installed evaporator can be seen in figure 1.8
Air input
Air input
Gas output
Methanol
input
Figure 1.8: Picture of the evaporator without isolation
The two parts of the heat exchanger can be seen from figure 1.9(a) and figure 1.9(b).
The heat exchanger has 34 fins on each side and the bottom has two mounting
slots for the electrical cartridge heaters, see figure 1.9(b). The bottom of the heat
exchanger has flow channels, on the side that is in contact with the top of the heat
exchanger, for the methanol flow. In order to avoid leakage a rubber O-ring is
inserted in the assembly of the heat exchanger parts.
The methanol enters the flow channels from the pump and is in the fluid phase
and at room temperature. Heat is added to the heat exchanger, both from the
cartridge heaters and from the passing hot exhaust air. The temperature of the
9
1 Introduction
(a) Bottom (b) Top
Figure 1.9: Cad model of the evaporator
methanol mixture increases until the boiling point is reached and the methanol
mixture starts to vaporize. The methanol mixture expands during the vaporization
and this expansion moves the vaporized methanol mixture through the evaporator
during operation. This step is required by the reformer because the fuel needs to be
in gas form for the reformation can happen.
1.3.3 Reformer and Burner
The reformer and burner have the function of changing the gas from the evaporator,
into a more useful composition. Steam reforming is the most common way to
obtain hydrogen from hydrocarbons in systems. The reformer can be seen from
figure 1.10(a), and a view of the reformer installed can be seen from figure 1.10(b).
(a) Side view (b) Installed view
Figure 1.10: Images of reformer
10
1 Introduction
The CO tolerance in fuel cells varies from around 20ppm for low temperature PEM
fuel cells to around 3% for high temperature PEM fuel cells[6]. In many systems,
where Steam Reforming is applied, there is a need for an extra purifier so the amount
of CO is minimized. The overall steam reforming reaction, as seen in (1.10), is
endothermic and heat must be supplied.
CH
3
OH + H
2
O →CO
2
+ 3H
2
(1.10)
In the reformer a WGS reaction (1.11) is happening at the same time. This WGS
reaction is an exothermic process and it releases heat.
CO + H
2
O ↔CO
2
+ H
2
(1.11)
In the steam reforming process, steam reacts though a catalyst to produce H
2
and
CO
2
. Depending on the operating conditions of the reformer, the reformatted gas
contains mostly hydrogen, with lesser amounts of carbon dioxide, water, methanol
and carbon monoxide. The heat needed in the process varies much on the amount
of the number of carbons. If there is a high amount of carbons, the higher amount
of heat is needed to evaporate it. Other parameters in the process is temperature,
pressure and the molar steam to carbon ratio.
1.4 Project goal
The overall goal of the project is to investigate different control strategies on a
HTPEM based fuel cell system. More specifically the focus is to improve the
overall power efficiency by investigating control strategies, and the optimization
issues in HTPEM fuel cells. This project will investigate the possibility to use the
unused hydrogen from the fuel cell as fuel for a burner. To increase the efficiency
even further, the use of the exhaust air, from the fuel cell, is used to heat up the
evaporator. Within the project scope is the modeling of the system, both nonlinear
and linear. The goal of the models should be to test different control strategies. A
PI control strategy will be tested and evaluated. An overall model of the system
can be seen in figure 1.6.
1.5 Project scope
This report will focus on the following tasks:
11
1 Introduction
• Creation of a dynamic nonlinear model for the fuel cell system in Matlab
Simulink™
• Verification of the fuel cell model by experiments and earlier studies.
• Linearisation of the created nonlinear model.
• Investigation of the connection between the different parts of the system.
• Investigation of the controlling part of the system.
1.5.1 Project Limitation
The project does not contain the following tasks:
• The control systems implemented in this project is limited focusing on the
linear continuous control strategies.
• The temperatures of the gas is assumed to be the correct temperature when
entering a component of the system.
• The cells of the fuel cell stack are assumed to behave uniformly and the
temperature changes between the cells are neglected.
• The temperature of the reformer is equal to the temperature of the burner.
• The internal convection from the gas passing through the reformer is neglected.
• The heat loss of the pipeline connections between the components is neglected.
• The moving air is distributed evenly through the components.
12
Nonlinear system model 2
2.1 Fuel cell model
2.1.1 The fuel cell voltage
2.1.2 Calculating voltage loss
2.1.3 Fuel cell temperature
2.2 Reformer model
2.2.1 Reformer temperature
2.2.2 Reformation process
2.3 Evaporator model
2.3.1 Evaporator temperature
2.4 Fuel estimation
2.5 System efficiency
2.6 Summary
This chapter contains a presentation of the mathematical model that represents the
system components presented in Chapter 1. The models are created in Simulink
(TM)
and a description can be seen in Appendix B. The models are solved with an ordinary
differential equation solver called ”ode15s”.
The chapter consists of three sections. The first section represents the mathematical
model of the fuel cell stack. The second section is the model of the reformer and
the last section contains the model of the evaporator. The system is subjected to a
load pattern that can be seen from figure 2.1
The load of the entire system based on the current density. This indicates the power
demands from the electrical load, connected to the fuel cell.
2.1 Fuel cell model
The fuel cell model is divided into two parts. The first part calculates the electric
potential of the stack and the second part calculates the stack temperature.
13
2 Nonlinear system model
0 5 10 15
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Time [s]
C
u
r
r
e
n
t
d
e
n
s
i
t
y
[
A
/
c
m
2
]
Figure 2.1: The current density load pattern
2.1.1 The fuel cell voltage
The fuel cell works almost like a battery delivering a voltage based on an
electrochemical reaction between the reactants hydrogen and oxygen. The main
difference is that the fuel cell can deliver a voltage for as long as the reactants can
be supplied, whereas the battery deteriorates at some point. The voltage equation
for the fuel cell is based on a difference between the voltage at thermodynamic
equilibrium, where no current is applied, and the loss involved in the increasing of the
current. The term reversible voltage v
rev
is the voltage produced at thermodynamic
equilibrium. When current is drawn from the fuel cell, the voltage is decreased in
order to keep up the equilibrium. The reversible cell voltage of most feasible fuel
cell reactions varies in the range of 0.8V to 1.5V. If a higher voltage is needed from
a fuel cell system, several cells are stacked together in series[8]. The voltage of the
stack can be represented by (2.1)
V
Stack
= n
cell
· (v
rev
−η
act
−η
ohmic
−η
conc
) (2.1)
where v
rev
is the reversible voltage of a single cell, η
ohmic
is the ohmic loss, η
act
is the
activation loss due to reaction kinetics, η
conc
is the concentration loss due to mass
transport.[8] The characteristics of these losses can be seen in figure 2.2
To calculate the theoretical value of the reversible voltage, the gibbs free energy can
be used. The Gibbs free energy is defined as:
G = H −T · S (2.2)
14
2 Nonlinear system model
C
e
l
l
V
o
l
t
a
g
e
(
V
)
C
e
l
l
V
o
l
t
a
g
e
(
V
)
C
e
l
l
V
o
l
t
a
g
e
(
V
)
C
e
l
l
V
o
l
t
a
g
e
(
V
)
C
e
l
l
V
o
l
t
a
g
e
(
V
)
Current density (A/cm
2
) Current density (A/cm
2
)
Current density (A/cm
2
) Current density (A/cm
2
) Current density (A/cm
2
)
-
-
-
=
Reversible Voltage
Activation loss Ohmic loss
Concentration loss
Net fuel cell performance
Figure 2.2: Pictorial summary of major factors
where G is the Gibbs free energy, H is enthalpy, T is temperature and S is entropy.
The Gibbs free energy is the maximum amount of non-expansion work that can
be extracted from a closed system. If a system changes from one initial state to
another, the Gibbs free energy ∆G equals the work exchanged by the system with
its surroundings, during a reversible transformation from initial state to the final
state. When the ∆G is negative it means that the reaction will release energy. In
contrast, if ∆G is positive, then work would be to be added to the reacting system
to make the reaction go.
When a system reaches equilibrium, at constant pressure and temperature, the
Gibbs free energy is at its minimum. The relationship between Gibbs free energy
and voltage can be seen in the electrical work done calculated from (2.3)
W
elec
= −∆ˆ g
rxn
(2.3)
The electrical work done by moving a charge Q [C] through an electrical difference
E is
W
elec
= EQ (2.4)
The charge Q can be related to the number of electrons that can be moved between
an electrical difference
Q = nF (2.5)
15
2 Nonlinear system model
where n is the number of moles of electrons transferred and F is Faraday’s constant.
If the reaction is hydrogen based, the number of electrons released is 2. By combining
(2.3), (2.4) and (2.3) we get an expression for the reversible voltage at a constant-
temperature and constant-pressure process (dT, dp = 0).
∆ˆ g = −nFE
E = −
∆ˆ g
nF
(2.6)
The theoretical open circuit voltage is calculated to about 1.14V/cell, when
operating at a temperature of 200
o
C. However, when the fuel cell is put to use,
it is found that the voltage is much less than the theoretical values, due to the
activation loss not being zero when the current density is equal to zero. The model
uses an open circuit voltage of 0.95 V based on [15]. This is caused by the activation
loss is still present at no current density.
Activation loss
Because of the bonds of the atom and the electrode surfaces, there is an energy
barrier. For example, the overall reaction H
2
⇋2H
+
+ 2e

:
1. Mass transport of H
2
gas to the electrode:
(H
2(Bulk)
→H
2(near electrode)
)
2. Absorption of H
2
onto the electrode surface, where M is the electrode:
(H
2(Near electrode)
+M →M· · · H
2
)
3. Separation of the H
2
molecule into two individually bound hydrogen atoms
onto the electrode surface. This is also called chemisorbed.
(M· · · H
2
+ M →2M· · · H)
4. Transfer of electrons from the chemisorbed hydrogen atoms to the electrode,
releasing H
+
ions into the electrolyte:
2 ×
_
M· · · H →(M + e

) + H
+
near electrode
_
5. Mass transport of the H
+
ions away from the electrode
16
2 Nonlinear system model
2 ×
_
H
+
(near electrode)
→H
+
(bulk electrolyte)
_
The overall reaction is limited by the slowest step in the series. As shown in
figure 2.3, in order for reactants to be converted into products, it must first make it
over the activation hill. The probability for this to happen, determines the rate of
which the reaction occurs.
∆G
+
Reactants (H
2
+O
2
)
Products H
2
O
∆G
rxn
F
r
e
e
e
n
e
r
g
y
Reaction progress
Figure 2.3: Activation barrier (∆G
+
) which needs to be exceeded to convert reactants to
products
The M· · · H represents a hydrogen atom chemisorbed on the metal surface and the
(M +e

) represents a liberated metal surface site and a free electron in the metal.
∆G
rxn
∆G
+
1
∆G
+
2
F
r
e
e
e
n
e
r
g
y
1
2
Distance from interface
Figure 2.4: Free energy compared to distance from interface
Curve 1 in figure 2.4 depicts the free-energy of the chemisorbed atomic hydrogen,
H, which increases with distance from the metal surface. The chemisorption
improves the hydrogen stability by partially satisfying the bonding requirements,
thus lowering the free energy. Separating the atomic hydrogen from the metal surface
destroys this bond, thus increasing the free energy.
Now consider curve 2 which describes the free-energy of a H
+
atom in the electrolyte.
It can be noticed that the H
+
ion has the highest free-energy when the ion is close
17
2 Nonlinear system model
to the metal surface. This means that the “easiest” (minimum) energy path for the
conversion of chemisorbed hydrogen to H
+
and (M + e

) is given by a blue line
in figure 2.4. The highest point in the figure describes species in the active state
that have overcome the free-energy barrier, and they can be converted into either
products or reactants.
Concentration loss
For the fuel cell can produce electricity, a continual supply of fuel and oxidant
must be available. At the same time, products must be removed from the fuel
cell to avoid “strangling” of the cell. The movement of supplying reactants
and removing products is often termed “mass transport”. Reactant depletion or
product accumulation at the fuel cell catalyst layer can severely affect the fuel cell
performance. The loss in performance is called the “concentration” loss or “mass
transport” loss. The concentration loss in a fuel cell often represent the limit of the
current density.
H
2
Flow Electrode
C
o
n
c
e
n
t
r
a
t
i
o
n
Diffusion layer
c
H2
Distance
Anode Electrolyte Cathode
H
2
H
2
O
2
c
0
H2
H
2
H
+
Figure 2.5: Schematic of diffusion layer
The schematic shown in figure 2.5 is an illustration on how the diffusion layer
influences on the concentration of hydrogen at the electrolyte. Consumption of
H
2
gas in the electrode results in a depletion of H
2
. The concentration of H
2
gas
falls from its maximum value (c
0
H2
) to a lower value (c
H2
) at the catalyst layer.
If the current density is set high, there is a possibility of reactant depletion and
product accumulation. If the fuel cell is operated on H
2
and air, only the cathodic
overvoltage is important. This is caused by the OOR reaction is slower compared
to the HOR reaction, and the fact that the reactant at the cathode is not pure O
2
.
18
2 Nonlinear system model
2.1.2 Calculating voltage loss
The voltage loss in the fuel cell is split up in three parts: Ohmic loss, Anode loss and
cathode loss. Each of these are discussed below. The cell temperature is assumed
to be the same as the stack temperature.
Ohmic loss
Ohmic loss is the resistance in the flow of electrons through the voltage connections,
and the resistance of the ions through the membrane. This voltage loss is essentially
proportional to current density. This is linear when the temperature is constant and
also referred to as resistive loss. Ohmic loss can be calculated using (2.7).
η
ohmic
= i · R
ohmic
(2.7)
where i is the current density [A/cm
2
] and R
ohmic
is the equivalent ohmic resistance
[Ω · cm
2
]. The model for the ohmic resistance is based on the resistance changes
with the temperature of the cell and the change can be calculated from (2.8).
R
ohmic
(T
s
) = b
1
+ a
1
· T
cell
(2.8)
where a
1
and b
1
are fitting parameters and presented in Appendix B. T
c
ell is the
stack temperature. The linear nature of the function (2.8) is verified by [10].
Anode loss
The anode voltage loss is primarily based on the presence of CO in the syngas for
the fuel cell. Assuming Butler-Volmer kinetics applies to the system, and assuming
a symmetry factor of α = 0.5, the anode loss equation is simplified to (2.9). The
forward and backward rate terms are calculated by the inverse hyperbolic sinus
function.
η
anode
=
R · T
cell
α
a
· F
· sinh
−1
_
i
2 · k
eh
· θ
H
2
_
(2.9)
where T
cell
is the cell temperature, α
a
is the anode charge transfer coefficient, θ
H
2
expresses the surface coverage of hydrogen and k
eh
is the H
2
electro oxidation rate.
The equations for both the coverage of H
2
and CO can be seen in Appendix B.4.2.
The modeling approach is solving the equations for the coverage at equilibrium,
using a numerical solver in MATLAB and return the value for the H
2
coverage to
the Simulink model.
19
2 Nonlinear system model
Cathode loss
Because of the continual backward and forward flow of electrons from and to the
electrolyte, there is a need to specify a term that indicates the transfer rate at
equilibrium. This is referred to as the “exchange current density”, and is often
indicated by i
0
. When the “exchange current density” is high, the surface of the
electrode is more ’active’ and a current in one particular direction is more likely to
flow. This “exchange current density” i
0
is one of the main elements in performance
of a fuel cell electrode. This means that the exchange current density value must be
as high as possible. In the modeling of the cathode loss certain changes were made
to comply with the HTPEM fuel cell used in the project. A modeling strategy for
the exchange current density i
0
from [15] was implemented in the model and the
exchange current density increases as a function of the cell temperature T
cell
, see
(2.10). The exchange current density compared to temperature can be seen from
figure 2.6.
280 300 320 340 360 380 400 420 440 460 480
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
Fuel cell stack temperature [K]
E
x
c
h
a
n
g
e
c
u
r
r
e
n
t
d
e
n
s
i
t
y
[
A
/
c
m
2
]
Figure 2.6: Exchange Current Density vs. Stack temperature
i
0
(T
s
) = a
2
· e
−b
2
_
1
T
s

1
T
limit
_
(2.10)
where T
limit
is 433K(160
o
C) and the lower limit of the HTPEM’s temperature
operating range. The constants a
2
and b
2
are fitting parameters, found in earlier
experiments[15], and they can be seen from appendix Appendix B.1. These
constants shape the exchange current density with the change in temperature.
The cathode loss is a summation of the activation loss and the concentration loss.
The activation loss η
act
is the voltage required to drive the chemical reactions at
20
2 Nonlinear system model
the electrodes of the fuel cell. This loss is nonlinear and have a large impact at low
current densities. Activation loss is caused by the slowness of the reactions taking
place on the surface of the electrodes. The activation loss can be calculated as shown
in (2.11).
η
act
=
R T
cell
2 · α · F
ln
_
i
i
0
_
(2.11)
The constant α is called the “charge transfer coefficient” and is held constant, which
is commonly used in thermal fuel cell models. For most electrochemical reactions,
α ranges from about 0.2 to 0.5.
Diffusion loss is commonly known as concentration loss and result from a decrease
of the available reactant over the length of the fuel cell membrane[11]. The
concentration losses can be calculated by (2.12).
η
conc
=
R · T
cell
4 · α
c
· F
· ln
_
i + i
o
i
o
_
(2.12)
The overall cathode loss can be calculated with (2.13)
η
cathode
=
R · T
cell
4 · α
c
· F
· ln
_
i + i
o
i
o
_
+
R
diff
· i
λ −1
(2.13)
where R is the universal gas constant [J/(mol · K)], T
cell
is the cell temperature [K],
α
c
is the charge transfer coefficient [−], F is Faradays constant [C/mol], R
diff
is
the diffusion resistance [Ω · cm
2
], i
o
is the exchange current density [A/cm
2
] and λ
is the air stoichiometry ratio [−]. The stoichiometry is a measure for the amount
of reactant present for a given process. A stoichiometric ratio of 1 means that the
amount of reactant is precisely enough for the reaction to occur, and a stoichiometric
ratio higher than 1 results in an excess of reactants after the process has occurred.
The modeling of the cathode loss is performed almost like the model mentioned in
(2.13) but with the exchange current density of (2.10). It is assumed that the air
stoichiometry is large enough to avoid concentration loss. The last term of (2.13) is
substituted by an empirical constant.
EMP (T
s
) = a
30
· e
−b
30
(T
s
−T
limit
)
(2.14)
21
2 Nonlinear system model
This constant EMP account for various deviations between the experiments and
the model. The reason for the empirical constant is the loss is not linear at higher
temperatures and the empirical factor is added[15]. The constants a
30
and b
30
are
the fitting parameters and they are presented in Appendix B.1. These parameters
have been obtained from simulation of the polarisation curve of the fuel cell, see
section 4. Adding the changes from (2.10) and (2.14) respectively, results in an
equation for the cathodic voltage loss.
η
cathode
(T
s
, i) =
R · T
s
4 · α
c
(T
s
) · F
· ln
_
i
i
0
_
+ EMP (T
s
) (2.15)
The charge transfer coefficient α
c
(T
s
) can be seen in Appendix B. The change of
the cathode voltage with the temperature held constant at 453K(180

C)and the
current density changing, can be seen from figure 2.7
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
Current density [A/cm
2
]
V
o
l
t
a
g
e

[
V
]
Figure 2.7: Cathode voltage loss compared to current density at 180

C
As the three voltage losses is described a stack voltage based on current density can
be calculated.
Stack voltage
The governing stack voltage equation is shown in (2.1) and is rewritten to include
the cathode and anode loss instead of activation and concentration loss, see (2.16).
22
2 Nonlinear system model
V
stack
= n
cell
· (v
oc
−η
ohmic
−η
cath
−η
anode
) (2.16)
where V
oc
is the open circuit voltage, η
ohmic
is the ohmic loss. η
cath
represents the
combination of the activation and diffusion loss at the cathode and η
anode
represents
the activation and diffusion loss at the anode. N
cell
represents the number of cells
in the stack. The model for calculating the voltage of the stack has been presented
and it can be seen that most of the losses are directly affected by a change in the
stack temperature. This
2.1.3 Fuel cell temperature
The temperature of the fuel cell stack is used in all of the equations for the voltage
and it is a crucial part in modeling the fuel cell. It is assumed that the temperature
of the stack is uniform and that all entrance and exhaust effects are neglected. A
schematic of the thermal model is depicted in figure 2.8.
˙
Q
Heat
˙
Q
Conduction
˙
Q
Convection
H
2
Air
Figure 2.8: Thermal model of the Fuel Cel l stack
where
˙
Q
Heat
is the heat generated inside the fuel cell stack,
˙
Q
Conduction
is the heat
lost from the fuel cell stack by conduction, and
˙
Q
Convection
is the energy transported
away from the stack by forced convection.
Heat generated inside the fuel cell stack
In the model the fuel cell produces heat when in operation and the heat is calculated
from (2.17). The heat is based on the difference of the reversible voltage v
ocv
and
the voltage drawn from the cell v
cell
. The voltage of the cell is the electric potential
that is usable for running electric appliances.
23
2 Nonlinear system model
˙
Q
Heat
= i · (v
ocv
−v
cell
) · n
cell
· A
cell
[W] (2.17)
where i is the current density and v
ocv
is the open circuit voltage of the cell, (2.6)
and v
cell
is the cell voltage from (2.16). n
cell
is the number of cells used to convert
the cell voltage to stack voltage and A
cell
is the area of a single cell. When the fuel
cell is operating this is the only function in the stack that transfers energy into the
system. The reason for the heat being generated is the voltage loss from (2.16) are
converted to heat as the chemical reactions happen.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
100
200
300
400
500
600
700
800
Current density [A/cm
2
]
H
e
a
t
p
r
o
d
u
c
e
d
i
n
f
u
e
l
c
e
l
l
[
W
]
Figure 2.9: Heat generated compared to the current density at constant temperature
(180

C)
The heat produced inside the fuel can be seen from figure 2.9 for a constant
temperature of 453K (180

C). The heat must be transfered away by conduction
and convection to keep a steady temperature in the fuel cell.
Heat transfer due to conduction from the fuel cell stack
From figure 2.8 it can be seen the loss of heat from the fuel cell stack to the
surroundings is modeled as conduction. As mentioned earlier it is assumed that
the stack has uniform temperature and the conduction model can be seen from
(2.18)
24
2 Nonlinear system model
˙
Q
conduction
= −k · A
surface
·
(T
s
−T
ambient
)
x
[W] (2.18)
where k is the thermal conductivity factor [W/m· K], A
surface
is the surface areal,
T
s
is the stack temperature, T
ambient
is the ambien temperature. To prevent a high
heat transfer by conduction, from the fuel cell stack, a layer of insulation is applied.
The thickness of the insulation is represented by the x in (2.18) and k is a coefficient
of heat transfer based on the type of the insulation applied to the stack. The
insulation is melamine foam and it is assumed that the conduction is linear with the
temperature, which can be seen from figure 2.10.
280 300 320 340 360 380 400 420 440 460
0
2
4
6
8
10
12
14
16
18
20
Temperature of the fuel cell stack [K]
H
e
a
t
t
r
a
n
s
f
e
r
f
r
o
m
c
o
n
d
u
c
t
i
o
n
[
W
]
Figure 2.10: Heat transfered from the stack based on conduction
For the reactions from (2.15) to occur oxygen must be supplied from ambient air
and this involves the heat transfer by convection.
Heat transfer due to convection in the fuel cell stack
Since the fuel cell stack needs oxygen to produce a voltage and since it can produce
enough heat to create a high stack temperature, convection must be applied by an
external blower forcing air through the fuel cell stack. The mathematical model
calculates the change in enthalpy of the air between the inlet temperature and the
exhaust temperature. It is assumed that the exhaust temperature is equal to the
stack temperature. The enthalpy is based on regressions for the enthalpy of air,
from the program Engineering Equation Solver (EES). The enthalpy is multiplied
with the molar flow of air resulting in a heat transfer rate, see (2.19).
25
2 Nonlinear system model
˙
Q
convection
= ˙ n
air
· (h(T
exhaust
) −h(T
inlet
)) [W] (2.19)
where h(T) is a regression for the enthalpy in kJ/mol of air as a function of
temperature and ˙ n
air
is molar flow of air in mol/s.
0 50 100 150 200
0
100
200
300
400
500
600
700
800
900
Airflow through the fuel cell stack [L/min]
H
e
a
t
t
r
a
n
s
f
e
r
b
y
c
o
n
v
e
c
t
i
o
n
[
W
]
Figure 2.11: Convection plotted against airflow at constant temperature(180
o
C)
Plotting the convection against the airflow of the stack gives a view of the convection
heat transfer. The change in convection when the airflow increases has linear
characteristics if the temperature of the stack is 453 K (180

C). The heat production
and heat transfers, used in the model, have been described and the temperature can
be calculated in the following section.
The temperature of the stack
When calculating the temperature of the fuel cell stack the heat transfers. The heat
transfers (2.17), (2.18), and (2.19) are summed up in (2.20). The sign notation is
positive for heat being created by the system and negative for heat being transported
out of the system.
˙
Q
stack
=
˙
Q
Heat

˙
Q
Conduction

˙
Q
Convection
(2.20)
The difference in the heat lost and heat generated will result in the power applied
to or substracted from the system, depending on the sign of the sum
˙
Q
stack
and this
will result in a change in temperature. The powers involved in the fuel cell stack
thermal model can be seen from figure 2.12
26
2 Nonlinear system model
0 5 10 15
x 10
4
−600
−400
−200
0
200
400
600
800
1000


Time [s]
P
o
w
e
r
s
i
n
t
h
e
f
u
e
l
c
e
l
l
s
t
a
c
k
[
W
]
Heat produced
Convection
Conduction
Figure 2.12: Heat transfers in the fuel cel l stack
The heat transfers is summed up to represent the heat tranfers of the system
˙
Q
stack
.
The power generated inside the fuel cell stack is added to the fuel cell and the power
from the convection and conduction is subtracted. From figure 2.12 it is shown that
the convection has the same characteristics as the energy produced inside the fuel
cell. The convection balances (2.20) so the temperature calculated in (2.21) is kept
constant.
T
s
=
1
m
stack
· c
stack
·
_
t
0
˙
Q
stack
dt (2.21)
where T
s
is the stack temperature, m
stack
is the mass of the fuel cell stack, c
stack
is the
specific heat capacity, and
˙
Q
stack
is the power transfered to or from the system. The
temperature of the fuel cell stack is modeled from (2.21). The calculation integrates
over the power and changes the temperature as the time changes from 0 to a given
time t[17].
The interconnection between the thermal model and the voltage model can be seen
in Appendix B. It may be noted that since the temperature has a direct influence
on the electrochemical loss of the fuel cell stack voltage, it is important to keep the
temperature at a steady state.
This concludes the presentation of the nonlinear fuel cell stack model and a
presentation of the nonlinear modeling of the reformer can begin.
27
2 Nonlinear system model
2.2 Reformer model
The reformer model is divided into two parts. The first part calculates of the
temperature of the reformer and the second part calculates of the molar fractions of
the reformat gas.
2.2.1 Reformer temperature
Since the burner and reformer in the laboratory are integrated into one component
the model of the reformer temperature receives the power from the burning of the
H
2
or CH
3
OH depending on the respective mode of the system. The modeling of
the temperature for the reformer is based on a summation of the heat transfers.
The sign notation is positive when transferring energies into the reformer system
and negative, when the energies are consumed in the reformer. A diagram of the
energies taken into considerations can be seen from figure 2.13.
˙
Q
H
2,burn
˙
Q
SR
˙
Q
Conduction
MeOH
in
Exhaust
Gas
out
H
2,in
˙
Q
Convection
Air
Figure 2.13: Thermal model of the reformer.
From figure 2.13 depicting the energy transfers considered in the thermal model of
the reformer. The reformer temperature is controlled by forced convection from a
blower, where air at room temperature is blown into the burner and leaves at the
reformer temperature. The modeling of the convection is performed analog to the
convection of the fuel cell stack, see (2.19). The model neglects the convection by
the reformat gas because the burner convection, and the loss from the reformation
process, is assumed to dominate the temperature. The heat loss from conduction is
taken into account and the conductive power is modeled from (2.18). The reformer
is heated by burning the remaining H
2
in the cathode exhaust gas stream. The
respective reactions happening in the reformer are divided into two types of reaction.
The steam reforming reaction can be seen from (1.7) and the enthalpy required to
28
2 Nonlinear system model
make the reaction happen is 49.4kJ/mol. This reaction breaks up the methanol
into the respective gas components. The molar flow of the fuel from the evaporator
is multiplied with the enthalpy of the steam reforming process to model the power
needed to reform the fuel. It is assumed that the steam reforming process only needs
to break up the methanol part of the incoming fuel. The energies are summed up
to balance the energy in the reformer system. see (2.22)
˙
Q
reformer
=
_
˙
Q
burn

_
˙
Q
Convection
+
˙
Q
SR
+
˙
Q
conduction
__
(2.22)
The temperature can be calculated by integration of the sum of the energy transfers,
see (2.23)
T
reformer
=
1
m
reformer
· c
reformer
_
t
0
˙
Q
reformer
dt (2.23)
2.2.2 Reformation process
The governing reactions have been presented earlier, see (1.7), and regressions have
been made based on minimizing the Gibbs free energy and obtaining an equilibrium
in the gas. These regressions are based on the steam to carbon ratio and the
temperature of the reformer at which the reformation occurs[1]. The regressions
are all linear regressions from EES, and of the 6th order. In the model of the
reformer it is assumed that the steam to carbon ratio is a constant of 1.5. The
change of the fractions compared to the temperature can be seen from figure 2.14.
The fraction of the hydrogen in the gas decrease with higher temperature and the
fraction of CO increase with increasing temperature. The fractions are calculated
in the reformer model and sent to the WGS. The model of the reformer is bound by
the law of conservation of mass and therefor a mass balance must be presented. The
mass of the fuel fed to the reformer must be the same as the mass of the reformat
gas leaving the reformer. The mass balance can be seen from (2.24)
˙ n
MeOH
· M
MeOH
+ ˙ n
H
2
O
· M
H
2
O
= x
MeOH
· M
Meoh
· ˙ n
gas
+x
CO
· M
CO
· ˙ n
gas
+x
CO
2
· M
CO
2
· ˙ n
gas
+
x
H
2
· M
H
2
· ˙ n
gas
+ x
H
2
O
· M
H
2
O
· ˙ n
gas
(2.24)
when solving (2.24) with respect to the gas flow out of the reformer ˙ n
gas
a ratio
between the fuel gas and the reformat gas can be calculated. This ratio is assumed
constant with respect to the reformer temperature.
This change from fuel gas to reformat gas is used later in the fuel calculation for
the system. The change in gas flow is applied with a constant K
com
, since the
29
2 Nonlinear system model
400 450 500 550 600 650 700 750 800 850
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
F
r
a
c
t
i
o
n

[

]
Temperature [K]


MeOH
CO
CO2
H2
H2O
Figure 2.14: Gascomposition with constant SC-ratio of 1.5 and a change in temperature
from 373K to 873K
250 300 350 400 450 500 550 600 650
1.72
1.74
1.76
1.78
1.8
1.82
1.84
1.86
1.88
Reformer temperature [K]
K
c
o
m
[

]
Figure 2.15: Plot of the change in the ratio between ˙ n
gas
and ˙ n
mix
with respect to
reformer temperature. The steam to carbon ratio is 1.5
steam to carbon ratio is assumed to be constant. The change of K
com
is 0.12 over a
temperature range of 200K, and is caused by the change in H
2
fraction. The change
is neglected and a constant of 1.86 is used in the model.
30
2 Nonlinear system model
The reformer in different operating modes
During the startup mode of the system the reformer receives no vapor flow, since
this is redirected to the burner and combusted. The burner releases heat from
the combustion and heat is transfered from the burner to the fuel cell stack. The
hot air heats up the fuel cell stack and when the temperature of the stack reaches
383K(110
o
C) the running mode can begin. The temperature of the reformer is held
constant at 433K(160
o
C) since the heating of the fuel cell stack is supposed to be
none destructive to the stack membranes. The degradation and possibly destruction
of the membranes would be more likely at temperature above the 473K(200
o
C)
which is the top of the HTPEM operation temperature. As the required gas into
the reformer needs to be at a specific temperature the evaporator is modeled and is
shown in the next section.
2.3 Evaporator model
The evaporator is a heat exchanger that has the purpose of heating the methanol-
water mixture to the point of boiling and then super heating the vapors to a
temperature of 393 K (120
o
C). The model of the power needed to evaporate the
mixture is divided into two parts. The first part calculates the power needed to
evaporate the flow of methanol. The second part is the power needed to evaporate
the flow of water.
At the startup operating mode, the evaporator only evaporates a fuel of pure
methanol. This requires the fuel tank to be split into two separate containers, one
with methanol and one with distiled water. When in startup mode the evaporator
will primarily be heated by the electric heaters incorporated into the evaporator.
The air from the stack will have a temperature of 293K(20
o
C) and rising. As the
stack is warming up the electric heaters will primarily be heating up the fuel.
2.3.1 Evaporator temperature
The temperature of the evaporator is calculated like the temperature of the reformer
and the fuel cell stack. A summation of the energies applied to the evaporator
and the calculation of the temperature by integration of the summation. The
temperature is critical for the calculation of the power needed to evaporate the
mixture and the assumption of uniform temperature applies. The summation of the
power and temperature can be seen from (2.26).
31
2 Nonlinear system model
˙
Q
Evap
=
˙
Q
Air
+
˙
Q
Electric

˙
Q
vaporize
(2.25)
T
Evap
=
1
m
Evap
· c
Evap
·
_
t
0
˙
Q
Evap
dt (2.26)
Data for the powers that are summed up in (2.25) can be seen from figure 2.16.
The powers are based on the system load, see figure 2.1.
0 5 10 15
x 10
4
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4


Time [s]
P
o
w
e
r
[
k
W
]
˙
Q
air
˙
Q
heaters
˙
Q
MeOH
˙
Q
H2O
Figure 2.16: Comparison of difference energies in the evaporator
The temperature of the air, exiting the evaporator, is assumed to be the same as
the evaporator. The enthalpy is calculated at the input and output of the air flow,
and this difference in enthalpy is multiplied with the airflow. This is assumed to be
the heat added to the evaporator from the fuel cell exhaust. The other contribution
to the evaporator is two 100W electric heaters.
Modeling the vaporization power
The model of the power needed to vaporize the fuel, is based on the first law of
thermodynamics. The model represents the three stages that both methanol and
water is in during the vaporization process.
The first stage is the preheating of the fluid, where the fluid is heated from
ambient temperature of 293K(20
o
C) to the evaporation temperature. The boiling
temperature is calculated with regressions made by [12]. The boiling temperature
is based on the steam to carbon ratio of the fuel, see figure 2.17
32
2 Nonlinear system model
0 2 4 6 8 10
65
70
75
80
85
90
Estimated boiling Temperature
Steam−Carbon Ratio
T
e
m
p
e
r
a
t
u
r
e

[
C
]
Figure 2.17: The boiling temperature in Celcius
Methanol has a boiling point of 64.5

C and water boils at 100

C. The model of
preheating the methanol is made by calculating the enthalpy when the temperature
changes from ambient to the boiling temperature. The second stage of the
vaporization is the phase change of the fluid. The model assumes that the phase
changes instantaneously and that all the fluid is vaporized. The required enthalpy
for the phase change is the enthalpy of vaporization for the methanol and a regression
has been made from the data in EES. The last stage of the vaporization is the super
heating of the methanol vapors. A T-s diagram of the process can be seen from
figure 2.18 where the tree phases are marked.
-5,0 -4,0 -3,0 -2,0 -1,0 0,0 1,0 2,0 3,0
-100
-50
0
50
100
150
200
250
300
s [kJ/kg-K]
T

[
°
C
]
101 kPa
0,2 0,4 0,6 0,8
Methanol
Stage 1 Stage 2 Stage 3
Figure 2.18: T-s Diagram of the process
33
2 Nonlinear system model
The process is the same for the water in the mixture and regressions for the enthalpy
in the three stages is based on data from EES. The calculation of the power needed
to evaporate the mixture is calculated from the product of the enthalpy at a given
stage and the molar flow of the respective fluid. The powers of the three stages are
summed up to represent the power needed to preheat, vaporize and superheat the
given fluid.
Since the model is assuming the instantaneous change of phase for the given
fluid, some logics has been implemented in the model. The temperature of the
evaporator is compared to the boiling temperature of the fuel. When the evaporator
temperature is above the boiling point, the power consumption for super heating
the fluid is applied to the sum the powers, otherwise the super heating power is
neglected.
2.4 Fuel estimation
The reason for developing an estimator is to control the energy supplied to the fuel
cell and to achieve a constant hydrogen stoichiometry. The estimator should be able
to be run online in the system, which means that the hydrogen fraction and mass
convertion, K
com
, is estimated. During the operation of the fuel cell, the needed
amount of fuel can be calculated based on the current drawn from the fuel cell
stack, see (2.27). Equation (2.27) only describes the usage of the hydrogen and is
only applicable for estimation of fuel for a system running on pure hydrogen. Since
this system is running on methanol it is necessary to make a number of modifications
for the estimation to apply.
˙ n
H
2
=
A
cell
· i · n
cell
2 · F
_
mol
s
_
(2.27)
where n
cell
is the number of cells, i is the current density, A
cell
is the areal of the
cell, and F is Faraday’s constant. Assuming that (2.27) can be utilized to calculate
the needed fuel based on the current density, an estimator can be derived. The fuel
delivered to the fuel cell equals the flow of methanol delivered by the pump and
the fraction of hydrogen that the flow is reformed into. Since only a fraction of
the methanol is reformed into hydrogen, the hydrogen fraction x
hydrogen
(T
r
) is also
an important factor of the fuel estimation, see (2.28). The composition of the gas
changes when the temperature of the reformer changes.
˙ n
estimated
=
A
cell
· i · n
cell
· λ
hydrogen
2 · F · x
hydrogen
(T
r
)
_
mol
s
_
(2.28)
34
2 Nonlinear system model
When the fraction of hydrogen is decreasing, more fuel is needed and when the
fraction is increasing the fuel supplied must decrease. Since the project uses the
exhaust gas of the fuel cell stack cathode a control factor for the amount of hydrogen
in the exhaust gas is needed. λ
hydrogen
is the stoichiometric factor for the excess of
hydrogen. This excess hydrogen is also used in fuel cells working on pure hydrogen,
though this is to avoid starvation. The increasing and decreasing of the hydrogen in
the reformat gas is coupled with the temperature of which the reforming process is
taking place. The estimator controls the frequency of the fuel pump. The estimator
must take into account the changes happening to the fuel, when the fuel travels from
the pump to the fuel cell stack. The pump is a fixed volume pump and the volume
of the pump stroke V
pump
must be applied in the estimator.
f
pump,est
=
A
cell
· i · n
cell
· λ
hydrogen
2 · F · x
hydrogen
· ρ
MeOH
· K
com
(T
r
) · V
pump
[Hz] (2.29)
The estimator, from (2.27), calculate the amount of hydrogen needed in mol/s/, but
the pump delivers the flow in liters and therefore the estimator must use the density
of the methanol in kmol/m
3
to convert between these two units. The estimator also
needs to account for the steam reforming action since the law of conservation of
mass applies to the steam reforming. The amount of gas that enters the reformer is
lower compared to the amount of gas leaving the reformer, but both amounts are of
the same mass. This is accounted for by the factor K
com
which is the ratio between
the flow in and out of the reformer. This is independent of the temperature as can
be seen in figure 2.15.
2.5 System efficiency
Efficiency is a great tool for comparing energy conversion devices. The concepts
when talking about efficiency is the “ideal” efficiency and “real” efficiency, where
the ideal is the reversible and the real is the practical efficiency. The efficiency is the
ratio between the energy converted and the energy supplied. The electric efficiency
can be calculated by (2.30).
η
FC
=
U · I −P
blower
−P
Evaporator
˙ m· HHV
MEOH
(2.30)
where U is the electric voltage of the fuel cell stack, I is the current drawn from the
stack, P
blower
is the power needed to drive blowers for the convection of the fuel stack
and reformer respectively. P
evaporator
is the power consumed in the evaporator for
the electric heaters. When calculating the electric efficiency of the fuel cell stack, the
power supplied to the stack is the methanol fuel supplied during running operation.
The efficiency is based on the higher heating value(HHV) of the methanol due to
35
2 Nonlinear system model
the methanol entering the system in fluid phase and the higher heating value is the
highest amount of energy that can be converted. The efficiency is based on the load
pattern applied to the system figure 2.1, and the efficiency can be seen in figure 2.19.
0 5 10 15
x 10
4
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
Time [s]
E

c
i
e
n
c
y
[
-
]
Figure 2.19: Plot of the model led efficiency.
It can be seen from figure 2.19 that the efficiency is negative while the fuel cell stack
produces less electric power than the electric heaters provide. The efficiency for the
system is approximately 17% based on the higher heating value. The model of the
entire system has been presented and must be validated against experiments and
data from articles. The efficiency of the system is affected directly by the amount of
the methanol needed for driving the system. The temperature affects the voltage of
the stack and changes in temperature is mapped into the voltage of the stack. The
power needed for the evaporator P
evaporator
is also a major factor for the efficiency.
Minimizing the need for electric heaters is positive for the efficiency of the entire
system. The negative part of the efficiency presented in figure 2.19 is based directly
on the electric heaters in the evaporator. The model of the system must be validated
against data from experiments and data from articles.
The calculated efficiency can be seen in figure 2.19, and is calculated to be a little
below 20%.
2.6 Summary
The nonlinear model is based on calculating the voltage and temperature. The
available voltage of the fuel cell is based on an open circuit voltage, anode and
36
2 Nonlinear system model
cathode losses. The temperature for the fuel cell, reformer and evaporator is
calculated. The fuel cell is heated by the loss of current in the fuel cell, and is
controlled by forced convection from a blower. The conduction of the fuel cell is
included and are based on the difference between the fuel cell stack and ambient
temperature. The temperature of the reformer is based on a catalytic burn of excess
hydrogen from the fuel cell. The temperature is controlled by forced convection
though the burner side. The conduction of the reformer is based on the temperature
of the reformer compared to ambient temperature. The evaporator is heated by the
exhaust air from the fuel cell, and assumes the temperature of the outlet air is the
same as the evaporator temperature. By using the change in enthalpy of the inlet
and outlet air, the heat transfered to the fuel can be calculated. The estimation of
required fuel is based on used hydrogen in the fuel cell and an excess hydrogen factor
λ
H2
. The mass convertion factor is assumed constant, and the hydrogen fraction
in the gas is estimated on the reformer temerature. The efficiency of the system is
calculated to approximately 18% at a current density of 0.66 based on the higher
heating value.
37
2 Nonlinear system model
38
Linear system model 3
3.1 Linearisation of the temperature models
3.1.1 The Stack Temperature
3.1.2 Reformer temperature
3.2 Summary
This chapter focus on the linearisation of the fuel cell stack temperature and reformer
temperature. The chapter documents the linear models for which the control of
the respective temperatures can be applied. The chapter also presents a transient
model of the respective temperatures, from which the controller parameters can be
calculated. The linearisation of the temperature models presented in Chapter 2 is
performed with a first order Taylor series, see (3.1).
f(x
1
, x
2
) = f ( ¯ x
1
, ¯ x
2
) +
_
df
dx
1
(x
1
− ¯ x
1
) +
df
dx
2
(x
2
− ¯ x
2
)
_
(3.1)
where the partial derivatives are evaluated at x
1
= ¯ x
1
and x
2
= ¯ x
2
. The higher
order terms of the Taylor series, are neglected, when considering small deviations
from the operating point ( ¯ x
1
, ¯ x
2
)[13]
3.1 Linearisation of the temperature models
This section presents the linearized temperature of the stack and the presentation
of the linearized reformer temperature is performed after the stack temperature.
3.1.1 The Stack Temperature
The temperature of the stack is based on an energy balance in the dynamic model
of the entire system. The model applies conduction, convection and heat produced
inside the fuel cells and balance this to calculate the temperature, see (3.2).
m
stack
· c
stack
dT
s
dt
= −
˙
Q
conduction
(T
s
) −
˙
Q
convection
(T
s
, ˙ n
air
) +
˙
Q
electric
(i, v(T
s
, i)) (3.2)
39
3 Linear system model
The conductive term is based on the temperature of the stack and the ambient
temperature and the constant of convection, which is a linear approximation of the
losses due to conduction. The convective term of the power balance is a nonlinear
approximation that calculates the energy transported away from the system, based
on the enthalpy difference of the air at the inlet and outlet of the stack. The
convective term is used for the control of the temperature based on controlling the
airflow into the stack. The electric term is the heat generated from the cells in the
stack and this is dependent on both the current density and the voltage of the cells.
The voltage of the cells is dependent of both current density and the temperature
of the stack. These individual terms needs to be linearized.
Conduction
The conductive term is based on the difference between the stack temperature and
the ambient temperature multiplied with a constant, which is a linear approach to
the approximation, see (3.3).
˙
Q
cond
=
k · A
stack
x
· (T
s
−T
a
) (3.3)
where k is the thermal conductivity of the insulating material in J/(m· K), A
stack
is the conductive area of the stack in m
2
and x is the thickness of the insulation
material in m, and T
a
is the ambient temperature in K.
Convection
The convective term is based on the difference in the enthalpy of the air at the inlet
and outlet of the fuel cell stack. The enthalpy is approximated from a linear first
order regression of enthalpy data from EES see (3.4).
˙
Q
conv
(T
s
, ˙ n
air
) = ˙ n
air
· (h(T
s
) −h(T
a
)) (3.4)
where h is the enthalpy pr mol of air in J/kmol and ˙ n
air
is the molar flow of air in
kmol/s. By rewriting the molar airflow ˙ n
air
to a volumetric airflow ˙ q
air
multiplied
with a constant results in a more comprehensible equation. The enthalpy regression
accounts for the changes of the enthalpy of the air with respect to temperature. The
rewriting and linearisation can be found in Appendix C and the resulting equation
40
3 Linear system model
can be seen from (3.5).
˙
Q
conv,lin
=
K
conv
wp
¸ .. ¸
˙
Q
conv
_
¯
T
s
,
¯
˙ q
air
_
+
K
conv
q
¸ .. ¸

˙
Q
conv
∂ ˙ q
air
¸
¸
¸
¸
¸
¯
T
s
,
¯
˙ q
·
_
˙ q
air

¯
˙ q
air
_
+
K
conv
Ts
¸ .. ¸

˙
Q
conv
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
˙ q
·
_
T
s

¯
T
s
_
(3.5)
Since the derivatives from (3.5) is evaluated in the working point they can be
expressed at constants, see (3.6). The equations for the derivatives can be seen
from (C.2) and (C.3) respectively.
˙
Q
conv,lin
= K
conv
wp
+ K
conv
q
·
_
˙ q −
¯
˙ q
_
+ K
conv
Ts
·
_
T
s

¯
T
s
_
(3.6)
The linearisation of the convection is now complete. This convection is used to
control the temperature of the stack and remove some of the heat that is generated
inside the stack.
Heat generated i fuel cell
The fuel cell generates heat when current is drawn from the stack and the heat can
be expressed from (3.7). This expression is nonlinear and needs to be linearized.
˙
Q
heat
= (v
rev
−v
cell
(T
s
, i)) · i · n
cell
· A
cell
(3.7)
The linearization can be seen in Appendix C and the result can be seen from (3.8)
˙
Q
heat,linear
=
K
heat
wp
¸ .. ¸
˙
Q
heat
_
¯
T
s
,
¯
i
_
+
K
heat
Ts
¸ .. ¸

˙
Q
heat
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_
+
K
heat
i
¸ .. ¸

˙
Q
heat
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_
(3.8)
Evaluating the partial derivatives and the working point, represented in (3.8), as
constants results in (3.9).
˙
Q
heat,linear
= K
heat
wp
+ K
heat
Ts
·
_
T
s

¯
T
s
_
+ K
heat
i
·
_
i −
¯
i
_
(3.9)
41
3 Linear system model
The linearized fuel cell stack temperature
Now the three parts of the stack temperature model has been linearized. The
governing equation of the stack temperature can be expanded by inserting (3.3),
(3.6) and (3.9) in (3.2). This gives (3.11).
m
stack
· c
stack
dT
s
dt
= −
_
k · A
stack
x
· (T
s
−T
a
)
_

_
K
conv
wp
+ K
conv
Ts
·
_
T
s

¯
T
s
__
+ K
conv
q
·
_
˙ q
air

¯
˙ q
air
_
+ K
heat
wp
+ K
heat
Ts
·
_
T
s

¯
T
s
_
+ K
heat
i
·
_
i −
¯
i
_
(3.10)
Separation and factorization of the variables can be performed in order to ease the
Laplace transformation of the temperature model, see (3.11).
m
stack
· c
stack
dT
s
dt
+ T
s
·
_
k · A
stack
x
+ K
conv
Ts
−K
heat
Ts
_
=
k · A
stack
x
· T
amb
−K
conv
wp
−K
conv
q
·
_
˙ q
air

¯
˙ q
air
_
+K
heat
wp
+ K
heat
i
·
_
i −
¯
i
_
+ (K
conv
Ts
−K
heat
Ts
) ·
¯
T
s
(3.11)
Applying the Laplace transformation of (3.11) and summing up the constant parts
in one constant results in (3.12).
_
m
stack
· c
stack
· s +·
_
k · A
stack
x
+K
conv
Ts
−K
heat
Ts
__
· T
s
(s) =
k · A
stack
x
· T
amb
−K
conv
wp
+ K
heat
wp
−K
conv
q
·
_
˙ q
air
(s) −
¯
˙ q
air
_
+K
heat
i
·
_
i(s) −
¯
i
_
+ (K
conv
Ts
−K
heat
Ts
) ·
¯
T
s
(3.12)
A linear model the stack temperature represented in Simulink™can be seen from
figure 3.1.
For the purpose of control the investigation of the transients of the linear model is in
order. The linear temperature model is turned into a transient model by neglecting
the stationary contributions. This changes the output of the model to only provide
42
3 Linear system model
1
m_s*c_s
Temperature
of the stack1
1
s
Fuel Cell 1
Current density
Temperature
Q_heat
Convection 1
Temperature
Airflow L/ min
Q_conv
Conduction 1
Temperature Q_ cond
Figure 3.1: Linear Model of the stack temperature
an amplitude of the change instead of a value for the temperature. For a reduction
of (3.12) to a transient model, see (3.13).
_
_
_
_
_
_
m
stack
· c
stack
· s +
_
_
_
_
_
_
K
cond
s
¸ .. ¸
k · A
stack
x
+K
conv
Ts
−K
heat
Ts
_
_
_
_
_
_
_
_
_
_
_
_
· T
s
(s) =
−K
conv
q
· ˙ q
air
(s) + K
heat
i
· i(s) (3.13)
The model for the transients of the fuel cell model has been presented. The model
is linear and the model can be used for the control of the fuel cell. The model is
linearized in a working point and the constants are calculated based on the working
point parameters. From (3.13) it can be seen that the temperature of the stack
is dependent of the current density to add heat to the system and the airflow to
remove heat from the system, shown by the sign convention.
3.1.2 Reformer temperature
The reformer temperature is governed by a balance of heat transfers, see (3.14).
m
r
· c
r
·
dT
r
dt
=
˙
Q
H2burn
(T
r
, i) −
˙
Q
SR
(T
r
, i) −
˙
Q
conv
(T
r
, ˙ q) −
˙
Q
cond
(T
r
) (3.14)
where
˙
Q
H2burn
is the heat transfer from the burner in kW,
˙
Q
SR
is the heat
transfered for the endothermic reformation process in kW,
˙
Q
conv
and
˙
Q
cond
are
43
3 Linear system model
the heat transfers from convection and conduction respectively. The applications
of convection and conduction in (3.14) are the modeled the by (3.3) and (3.6)
respectively. The heat supplied by burning the hydrogen
˙
Q
H2burn
is calculated from
the current density of the fuel cell stack and the temperature of the reformer, see
(3.15). The energy lost to the steam reforming process is also based on both the
current density and the temperature of the reformer, see (3.16).
˙
Q
H2burn
= (f
pump
(i, T
r
) · K
system
−FC
usage
(i)) · HHV
hydrogen
(3.15)
˙
Q
SR
= f
pump
(i, T
r
) · K
pump
· K
evaporator
· H
SR
· 1000 (3.16)
where the constants K
system
is the changes made to the fuel from being pumped
into the system and until the burning process. K
pump
and K
evaporator
represents
the changes happening to the fuel when it enters the pump and is evaporated.
HHV
hydrogen
is the higher heating value for the hydrogen being burned. H
SR
is
the enthalpy required for the steam reforming process. The fuel cell uses some
of the hydrogen in the gas during operation and this is modeled with (2.27). A
mathematical relation between the fuel pump frequency and the current density was
proposed in (2.29). This estimator is nonlinear since it depends on the temperature
and the current density. In order to simplify the estimation for the calculation
and implementation, the values from (2.29) for the fraction of the hydrogen in the
reformat gas is assumed constant. The change of the molar flow inside the reformer
due to the reformation process is assumed constant as well, and the equation for the
estimation can be seen from (3.17).
f
pump,lin
=
K
estimator
¸ .. ¸
n
cell
· A
cell
2 · F
·
λ
H
2
x
H
2
· ρ
MeOH
· K
com
· V
pump
·i (3.17)
The change in pump frequency has a linear relationship with the current density
and can be summed up into one constant and by inserting both (3.17) and (2.28)
into (3.15) and (3.16) respectively. Rewriting of the respective equations for the
reformation and burning processes results in (3.18) and (3.19).
˙
Q
H2burn
=
K
H2burn
¸ .. ¸
_
K
estimator
· K
system

n
cell
· A
cell
2 · F
_
· HHV
hydrogen
·i (3.18)
˙
Q
SR
= K
estimator
· K
pump
· K
evaporator
· H
SR
· 1000
. ¸¸ .
K
SR
·i (3.19)
44
3 Linear system model
Inserting (3.18) and (3.19) into (3.14) results in a linear equation with the dynamics
of the temperature for the reformer, see (3.20). This represents the linearized
temperature of the reformer with the given variables from the reformer.
m
r
· c
r
·
dT
r
dt
= K
H2burn
· i −K
SR
· i
− K
conv
wp
K
conv
Tr
·
_
T
r

¯
T
r
_
−K
conv
q
·
_
˙ q −
¯
˙ q
_


k
reformer
· A
reformer
x
reformer
. ¸¸ .
K
cond
r
(T
r
−T
a
) (3.20)
The linearized model is presented in Simulink™and the model can be seen from
figure 3.2.
1
m_ref*c_ref
Temperature
of the reformer
Reformation and burner reaction
Current density
Q_H2burn
Q_SR
1
s
Convection
Airflow L/ min
Temperature
Q_conv
Conduction
Temperature Q_ cond
Figure 3.2: Linear model of the reformer temperature from Simulink™
In order to be able to study the transient responses from the reformer temperature,
based on changes in the variables, the constant terms, e.g. terms involving
¯
T
r
, are
neglected. The model is transformed into a transient model based only the changing
variables using Laplace transform. The various factors are collected with respect to
their given variables, see (3.21).
(m
r
· c
r
· s + K
conv
Tr
+ K
cond
r
) · T
r
= (K
H2burn
−K
SR
) · i −K
conv
q
· q (3.21)
The transient model of the reformer temperature has been presented and it is a linear
model. This model is the base for the calculation of the controller parameters for
45
3 Linear system model
the reformer. The model shows that the temperature is dependent of two variables,
the current density and the airflow. The current density adds heat to the reformer
and the airflow removes heat from the reformer as was expected.
3.2 Summary
The models from Chapter 2 have been linearized and the respective temperatures
have been presented with the variables that affect the temperature. The models
have all been approximated with a first order Taylor series and this approximation
will result in deviations from the nonlinear temperatures. The deviations from the
respective linearized parts of the model are dependent of the deviation from the
operating point. These models are to be validated against the nonlinear model to
see if the linear model is a good approximation.
46
Validation of models 4
4.1 Validation of nonlinear model
4.1.1 Polarisation curve
4.1.2 Reformer conduction model
4.1.3 Convection
4.2 Validation of linear model
4.2.1 Fuel cell stack
4.2.2 Reformer temperature
4.3 Summary
This chapter contains the validation of the models presented in Chapter 2. The
models are validated against data from various experiments.
4.1 Validation of nonlinear model
4.1.1 Polarisation curve
The polarisation curves in the model is validated against experiments in [9]. The
empirical value used in (2.14) is fitted by two parameters, a
30
and b
30
. A script is
made in Matlab™and can be seen in Appendix E.3. The range for a
30
∈ [0.3, 0.6]
and b
30
∈ [0.026, 0.028] is searched for the best set of fitting parameters.
The script routine is changing the coefficients a
30
and b
30
from chosen intervals.
These intervals are spread out over an repeating number, and the repeating number
is set to 10. First a loop changes a
30
to the starting number and the whole interval
of b
30
is run. This can be seen in figure 4.1 and it can be seen that for every change
of a
30
there is 10 changes in b
30
.
At every change of b
30
the model is processed with a changing current density from
0.01 to 0.66 A/cm
2
. The values of a
30
and b
30
can be seen in B.1. The temperature
is held constant at 180 [

C] and CO is at set at 1000 ppm. This is evaluated against
experimental data and a difference at every timestep is calculated. The absolute
value of all the time steps are added together and is saved with the parameters a
30
and b
30
. This gives a total of 100 simulations and it is evaluated at which index the
score is the lowest. This can also be seen from figure 4.1 as the score is compared
to the simulated run number.
47
4 Validation of models
0 10 20 30 40 50 60 70 80 90 100
0
1
2
3
4
5


Voltage score
Run session number
V
o
l
t
a
g
e
s
c
o
r
e
Figure 4.1: Simulated run sessions
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
−0.05
−0.04
−0.03
−0.02
−0.01
0
0.01
0.02


Voltage difference
V
o
l
t
a
g
e
[
V
]
Current density A/cm
2
Figure 4.2: Difference in voltage from experimental data compared to simulated
The lowest score is found at run 46 and got the score 0.1924. The difference in
voltage for this operating point can be seen in figure 4.2 and it shows that the
largest difference is present at low current densities. The two polarization curves
are compared in figure 4.3.
It is considered precise enough for the simulation to run, though if other constants
needs to be evaluated it is possible to change the a
30
and b
30
to other constants. The
48
4 Validation of models
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8


Experimental
Simulated
V
o
l
t
a
g
e
[
V
]
Current density A/cm
2
Figure 4.3: Polarization curves of the simulated parameters plotted against the
experimental data from [9]
simulations shows that the deviations from the polarization curve has the largest
value at current densities lower than 0.1 A/cm
2
, see figure 4.3. This might be
caused by the used mass flow controllers, and their lacking ability to deliver flows
at very low current densities. The measurements for the experiments in [9] and the
measurements at current densities lower than 0.1 A/cm
2
shows very few data points
and therefore the uncertainties in this region will be larger. The model of the fuel
cell stack is assumed correct for the purpose of control.
4.1.2 Reformer conduction model
To validate the model for the heat transfer by conduction for the reformer an
experiment is performed. The reformer is heated up until a temperature of 350

C is reached. The reformer is heated with hydrogen and the feed of hydrogen is
cut off, and convection is stopped. The temperature of the reformer were logged by
Labview™ software developed for the project. The change in temperature can be
seen from figure 4.4.
It can be seen from figure 4.4 that the convection applied in the model of the system
does not return the same drop in temperature as the experiments. This may be
caused by differences between the model and the experiment. In the experiment the
reformer were insulated with a 1 cm thick layer of insulation around the main of
the reformer where the temperature is measured, but the pipes of the reformer is
not insulated. This may add to the change in the reformer temperature from the
49
4 Validation of models
0 200 400 600 800 1000 1200 1400
100
150
200
250
300
350


Modeled
Experimental
T
e
m
p
e
r
a
t
u
r
e
[
K
]
Time [s]
Figure 4.4: Temperature plot of conduction in model compared to experimental
conduction
experiment. The reformer had earlier been used for the steam reforming process and
it is uncertain if the reformer lost heat due to the endothermic reformation process.
The conduction from the model represented by the blue line is only based on the area
perpendicular to the surfaces. The area of which conduction is calculated from may
be estimated wrong, and a factor of 6.5 for the correction is added to the conduction
model. The corrected convection can be seen from figure 4.5.
0 200 400 600 800 1000 1200 1400
100
150
200
250
300
350


Modeled
Experimental
T
e
m
p
e
r
a
t
u
r
e
[
K
]
Time [s]
Figure 4.5: Plot of the corrected conduction compared to experimental conduction
50
4 Validation of models
The tendency of the two temperatures are alike and the constant for the convection
model is considered correct. Since the conduction and convection is only based on
two experiments, more extensive experiments must be conducted.
4.1.3 Convection
An experiment is performed in order to calculate the temperature control of the
reformer by convection. In the experiment the stack is heated to a temperature of
308

C and the feed of the hydrogen used in the burner is stopped. The airflow is
set to a fixed rate of 50 l/min and the temperature is logged. The model is build
to calculate the temperature based on both the convection of the reformer and the
conduction from the reformer. It would be impossible to neglect the temperature
drop due to the conduction in the experiment and the model must account for the
change in temperature due to conduction. The model output is plotted against the
temperature logged in the experiment figure 4.6
0 50 100 150 200 250
120
140
160
180
200
220
240
260
280
300
320


Modeled
Experimental
T
e
m
p
e
r
a
t
u
r
e
[
K
]
Time [s]
Figure 4.6: Temperature plot of refoermer due to convection compared to experimental
convection
The convection from the model shows a lesser decrease in temperature than the
experimental data presented. The uncertainties regarding the convection is difficult
to predict, but the temperature is measured close to the entrance of the fuel into the
reformer and the rapid decrease may partially be caused by the measuring point.
Multiplying the modeled convection with a constant for the correction is in order.
Choosing a constant value of 4 presents good coherence with the data from the
experiment and the model output can be seen from the figure 4.7
51
4 Validation of models
0 50 100 150 200 250
100
150
200
250
300
350


Modeled
Experimental
T
e
m
p
e
r
a
t
u
r
e
[
K
]
Time [s]
Figure 4.7: Plot of the corrected convection compared to experimental convection
The change in temperature in the experiment and the model of the convective
changes in temperature exhibits the same tendencies and the amplitude of the
changes is approximately the same, thus the convection is assumed correct.
4.2 Validation of linear model
The nonlinear and linear model needs to be compared to see how the linarisation
influences the equations. Both models are subjected to the same parameters and
the results of each model is plotted to show the differences. The linear temperature
models is linearized in a working point and the parameters for the working point is
presented in table 4.1.
Variable Value
Current density
¯
i 0.3 A/cm
2
Stack temperature
¯
T
s
450 K
Reformer temperature
¯
T
r
600 K
Stack airflow
¯
˙ q
air,s
10 l/min
Reformer airflow
¯
˙ q
air,r
8 l/min
Table 4.1: Working point parameters for the respective linear models
52
4 Validation of models
4.2.1 Fuel cell stack
The model of the fuel cell stack temperature, that is linearized in section 3, only
models the temperature changes. The model calculates the convection, conduction
and heat generated inside the fuel cell stack. Only the convection and generated
heat will be compared because the conduction equation is already linear.
Convection
Both models are subjected to a change in airflow from 0 to 100 l/min and the
temperature is held constant at 453K(180

C). The result can be seen from figure 4.8.
0 10 20 30 40 50 60 70 80 90 100
0
50
100
150
200
250
300
350


Airflow [L/min]
C
o
n
v
e
c
t
i
v
e
t
r
a
n
s
f
e
r
[
W
]
Nonlinear
Linear
Figure 4.8: Convection plotted with a ramp change in airflow from 0 to 100 l/min
From figure 4.8 it can be seen that the coherence between the linear and nonlinear
convection is acceptable. The slope of the convections are approximately the same
and they both start in the origin. The linear model has a higher convective power
at higher airflows, though is assumed negligible.
Changing the calculation of the convective term to model a variation in temperature
from 433K(160

C) to 453K(180

C) at a constant airflow, shows the deviations for
the linear convection model, see figure 4.9.
The difference in the linear and nonlinear based on the temperature is very small,
see figure 4.9. The slope of the lines are the same and they are both in the same
region. This concludes the validation on the convection in the linear model and the
heat generated inside the fuel cell stack will be covered.
53
4 Validation of models
430 435 440 445 450 455
0
5
10
15
20
25
30
35


Temperature [K]
C
o
n
v
e
c
t
i
v
e
t
r
a
n
s
f
e
r
[
W
]
Nonlinear
Linear
Figure 4.9: Changes in convection with constant airflow (8l/min) and change in
temperature
Heat generated
The heat produced inside the fuel cell stack, at a given current density and stack
temperature, must be validated. First the changes of the heat generated, based on
changes in temperature, is investigated. The current density is kept constant at 0.3
A/cm
2
and the temperature is varied from 433K to 473K. The temperature changes
the voltage and thereby affects the heat generated inside the fuel cell stack.
It can be seen, from figure 4.10, that there is a presence of an offset in the linear
model. The nonlinear model is subjected to a fixed value for the coverage of the cells,
which may cause the offset. The linear model shows the linear change of the heat
generated as expected. The offset may be neglected, since the Taylor expansions of
the nonlinear equations will result in a loss of precision. The linear model changes
more than the nonlinear model, but the change is in the same magnitude, and the
higher heat production in the linear model will result in a higher air flow in the
linear model. Plotting the change in the heat produced when changing the current
density, from 0.01 to 0.6 A/cm
2
, and keeping a constant temperature of 450K. This
can be seen from figure 4.11.
From figure 4.11 it can be seen that the model of the heat generated changes sign
at very low current densities, which is undesirable. This is most likely caused by
the deviation from the operating current density, of which the heat generation is
linearized. The linear model changes the heat production faster compared to the
nonlinear model and this might be caused by the linearisation process thus leading
54
4 Validation of models
430 435 440 445 450 455 460 465 470 475
0
100
200
300
400
500
600


Temperature [K]
H
e
a
t
p
r
o
d
u
c
e
d
[
W
]
Nonlinear
Linear
Figure 4.10: Change in the heat generated based on a change in temperature
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
100
200
300
400
500
600
700
800
900
1000


Current density [A/cm
2
]
H
e
a
t
p
r
o
d
u
c
e
d
[
W
]
Nonlinear
Linear
Figure 4.11: Change in heat based on current density and at constant temperature at
180

C
to some degree of uncertainty. The characteristics of the heat generation at high
current densities are approximately the same though with a small offset in the favor
of the linear model. The higher heat production will cause the linear model to
apply a higher airflow to control the temperature. The offset is present in the heat
generation, based on both the temperature and current density. This is neglected
55
4 Validation of models
neglected in the transient model. The linear model is assumed valid for the change
in heat based on temperature and current density.
4.2.2 Reformer temperature
The thermal linear model for the reformer must be validated to fit with the
parameters from the nonlinear model. As in the fuel cell validation, the conduction
is linear and will not need any linerasation.
Convection
Plotting the convective heat transfer for the reformer is done at a constant airflow
of 30 l/min and the temperature changes from 500 to 700K, see figure 4.12.
500 520 540 560 580 600 620 640 660 680 700
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35


Temperature [K]
E
n
e
r
g
y
t
r
a
n
s
f
e
r
f
o
r
t
h
e
r
e
f
o
r
m
e
r
[
k
W
]
Nonlinear
Linear
Figure 4.12: Change in convection at constant airflow and change in temperature
The change in the nonlinear heat transfer is higher compared to the change in the
linear model. This is based on the enthalpy regression, as was the case with the
fuel cell stack convection. The operation point for the convection, with respect to
temperature, is 600K and the temperature in this validation is varied from 500 to
700K. The change of the heat transfer, with the higher temperature, is lower for
the linear model as expected. Investigating the change in the convection is done
by keeping a steady temperature at 600K and changing the airflow from 0.1 to 100
l/min. This can be seen from figure 4.13.
56
4 Validation of models
0 10 20 30 40 50 60 70 80 90 100
0
0.5
1
1.5
2
2.5
3


Airflow [l/min]
E
n
e
r
g
y
t
r
a
n
s
f
e
r
f
o
r
t
h
e
r
e
f
o
r
m
e
r
[
k
W
]
Nonlinear
Linear
Figure 4.13: Change in convection at changing airflow
The convective heat transfer for the linear thermal reformer model is based on the
operation point. The chosen operation point shows that the convective powers of
the reformer is higher compared to the convective part of the nonlinear model. The
differences is evaluated to be small enough to be neglected.
4.3 Summary
The linear model of the stack temperature and reformer temperature both shows
good coherence with the nonlinear models, with respect to the convection. The heat
generation of the linear fuel cell temperature model shows a constant deviation from
the nonlinear model. The current density based heat generation does not start from
origin, but the slope of the linear model is equal to the slope of the nonlinear model
at higher current densities. The change in temperature for the linear model is higher
compared to the nonlinear model, though the change has the same magnitude. The
linear model has an approximate constant difference from the nonlinear model. The
results is evaluated to be valid and the linear models can still be used for control
strategies. As the constants, in the transient model, is neglected control strategies
will be valid.
57
4 Validation of models
58
Control strategies 5
5.1 General control systems
5.1.1 Transport lag
5.1.2 The feed forward approach
5.1.3 Antiwindup
5.1.4 Model overview
5.1.5 Controller demands
5.2 Temperature control
5.2.1 Reformer
5.2.2 Fuel cell stack
5.3 Controller design
5.3.1 Reformer temperature controller
5.3.2 Fuel cell stack temperature controller
5.4 Summary
This chapter is divided into three parts. The first part presents the general control
of systems and the control approach for the project. The second part presents the
models to be controlled and the responses of the models. The third part of the
chapter contains the controller design and the responses for the controllers.
5.1 General control systems
Any system can be broken down into an input R(s) and an output C(s) and through
measurement the output is fed back and subtracted from the input to represent the
error E(s). The system can be seen from figure 5.1. The relation between E(s) and
C(s) is the open loop transfer function transfer function G(s). The measurement
may be converted by the feedback transfer function H(s).
Most open loop transfer functions are stable but may destabilize when the output is
fed back and subtracted from the input. To investigate the stability of the system
the feedback loop must be closed. The function is called the closed loop transfer
function, see (5.1).
59
5 Control strategies
+

R(s)
E(s)
G
p
(s)
H(s)
C(s)
B(s)
Figure 5.1: The common closed loop configuration
C(s) = G
p
(s) · E(s)
E(s) = R(s) −B(s)
= R(s) −H(s) · C(s)
C(s) = G
p
(s)[R(s) −H(s) · C(s)]
C(s) + G
p
(s) · H(s) · C(s) = G
p
(s) · R(s)
C(s)
R(s)
=
G
p
(s)
1 +G
p
(s) · H(s)
(5.1)
The closed loop transfer function must be stabilized and the root locus method
is a method for analyzing the stability. The poles and zeros of G(s) is obtained
and plotted in the imaginary s-plane. The purpose of the root locus method is to
investigate the closed loop poles for the plant. The s-plane is defined so the closed
loop poles in the negative left half plane are in the stable region and the poles and
zeros in the positive right half plane are in the unstable region. The general open
loop transfer function (5.2) has m poles and n zeros respectively. The order of m
must be higher that n in order to have a realizable system.
G
p
(s) =
(s + z
n
)(s + z
n−1
) ·
···
·(s + z
1
)(s + z
0
)
(s +p
m
)(s + p
m−1
) ·
···
·(s + p
1
)(s + p
0
)
(5.2)
The root locus starts from the poles and travels towards the zeros of the open loop
transfer function as the gain K is varied from zero to infinity. The gain is a measure
for the amplification that a controller can apply to the controlled variable. The gain
is limited by the physical system being investigated and the gain can not amplify
the error signal more than is allowed by the boundaries for the controlled variable.
The root locus is symmetric about the real axis. The presence of a complex pole,
or zero, will also force the presence of the complex conjugate pole, or zero. A zero
can cancel out a pole and vice versa. The reason for using root locus plots for
control purposes is that the knowledge of the open loop poles and zeros gives a good
knowledge about the placement of the closed loop poles. The closed loop pole(s)
60
5 Control strategies
closest to the imaginary axis is called the dominant closed loop pole(s) and are the
most important pole to investigate, since it dominates the response of the system.
Changing the input from one value to another value instantly with an step function
results in a system response. This response can be shaped and this is the goal of the
control strategies. The cancellation of one of the dominant poles by adding a zero
and placing another pole will alter the response of a system and this method is called
pole/zero placement. The cancellation and addition of poles and zeros are summed
up in a transfer function, which commonly is called a controller or compensator. A
compensator is multiplied with the open loop transfer function and the result is an
altered system with the response wanted. The controller is most commonly a piece
of software or an analog circuit board which receives the feedback signal and alters
the control signal in order to make a faster response. The compensator may induce
an overshoot or oscillations in the response of the system, which may unwanted,
depending on the systems working environment. A system that cannot become
unstable has all the poles and zeros placed in the left half plane of the s-plane. This
is called a minimum phase system. When a pole or zero is placed in the right half
plane, the system is called a non-minimum phase systems. The non-minimum phase
systems will become unstable if the closed loop poles are placed in the right half
plane. Caution must be exercised when changing the gain K a non-minimum phase
system since closed loop poles of the non-minimum phase system moves towards
the right half plane. The placement of a closed loop pole in the right half plane
will make the error increase and thereby the output increase beyond the possible
boundaries of the system. When the poles of the system is placed in the left half
plane of the s-plane the error decreases and the response settles on the input. If
the dominant closed loop pole is placed on the imaginary axis the system will be
oscillatory and the error will never decay nor increase. After a short introduction
to control strategies the explanation of the two degree freedom systems follows.
Two-degree-of-freedom systems
The system presented in figure 5.1 is a system with one input and one output. This
type of system can be used to represent many systems and are the most common
configuration for control systems. The system considers only the direct relation
between a reference and an output. This may not always be the case since the
system may be dependent of two variables, see figure 5.2.
+
+
+
-
E(s)
G
c
(s)
U(s)
D(s)
G
p
(s)
C(s)
R(s)
Figure 5.2: A two-degree freedom system in general
61
5 Control strategies
The two-degree-of-freedom system is dependent of the reference R(s) and a
disturbance D(s). The output must be investigated for both the inputs and the
system must be stable against disturbances. The control transfer function G
c
(s)
only changes the controlled variable U(s) based on the error and the controller must
be stable against the disturbances. After a short introduction to root loci and control
systems the discussion of transport lag will continue.
5.1.1 Transport lag
For some reason there may be a delay in a system of some sort. This delay can
occur i. e. due to a slow reacting transducer or a chemical reaction happening. The
transport lag must be dealt with in the control strategy. When modeling the lag a
transfer function in the continuous control with the (5.3)
G
lag
(s) = e
−T
l
·s
(5.3)
Where the lag time constant T
l
is the time in seconds and s is the complex variable
for the Laplace transfer. This presents an infinite amount of zeros in the right half
plane of the s-plane. This creates an instability of the system based on the amount
of gain that can be applied. Since the lag is dominated by the poles closest to the
imaginary axis the lag can be approximated with the Pade approximation. The
general approach of the approximation is presented in (5.4).
e
−T
l
·s
=
1 −
T
l
·s
2
+
(T
l
·s)
2
8

(T
l
·s)
3
48
+· · ·
1 +
T
l
·s
2
+
(T
l
·s)
2
8
+
(T
l
·s)
3
48
+· · ·
(5.4)
The approximations creates per definition zeros in the right half plane which can be
seen from a first order approximation of a 30 second lag, see (5.5). The 30 second
lag time constant is empirical.
G
lag
(s) =
−s +
1
30·2
s +
1
30·2
(5.5)
Plotting the root loci for (5.5) can be seen from figure 5.3.
The lag from figure 5.3 presents a zero in the right half plane. The lag transfer
function closed loop poles moves from the pole in the left half plane towards negative
infinity and from the positive infinity towards the zero in the right half plane. This
causes no problem since the lag transfer function always is multiplied onto the
transfer function that is lagged. The transport lag has been presented and the
presentation of the feed forward approach follows.
62
5 Control strategies
−0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3
−0.03
−0.02
−0.01
0
0.01
0.02
0.03
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
Figure 5.3: Root locus for a lag of 30 seconds
5.1.2 The feed forward approach
The reason for using the feed forward technique for thermal chemical systems is the
chemical reactions. These reactions must be fed with the right amount of reactants
for the reaction to occur. The feed forward in the systems investigated in this project
are based on the reactions in the burner and the fuel cell stack respectively. The
burner part of reformer burns the excess hydrogen from the fuel cell and oxygen is
needed for the combustion. From experiments, see section 6.3.1, the air to hydrogen
ratio must be at least 5-8 times higher in order to avoid a pyrolytical burn of
the hydrogen. The fuel cell cathode reaction requires a correct amount of oxygen
to occur. The feed forward functions supply the needed reactant based on the
current density. The feed forward is a part of the controllers for the respective
temperatures. The feed forward transfer function must supply the air for the burner
and the controller keeps the temperature at the reference.
5.1.3 Antiwindup
A common thing when using the PI-controller is that integral part tend to dominate
the calculation. The integral part of the calculation must be limited and this is called
integrator anti-windup. This is applied since the controller has an upper limit to the
voltage that the controller can supply. The approach for the anti-windup applied in
the linear model of the reformer, can be seen from figure 5.4.
63
5 Control strategies
+
+
+
+
+

e(s) u

(s)
u(s)
K
P
1
T
i
1
1
s
1
T
aw
Figure 5.4: Anti-windup scheme for the control ler of the air blown into the reformer
burner side.
The saturated variable u

(s) is the output from the controller which complies with
the controller limits. When the controller reaches the limits for the output and the
controller calculates a value higher than the top limit of the output, the sum under
the saturation on figure 5.4 changes sign. This results in a subtraction for the input
for the integral part of the controller. When no saturation appears the anti-windup
is neglected. The rule for the anti-windup constant T
aw
is that it must be lower
than the integral constant T
i
, see (5.6).
T
aw
≤ T
i
(5.6)
This antiwindup must be implemented in the controller for the model.
5.1.4 Model overview
The models of both the reformer and fuel cell stack temperature has been presented
and the control of these temperatures can be performed. The temperatures are
controlled by convection from a blower and the blower must be controlled by a
control algorithm from a digital controller. The control algorithm is presented in
this section. The general control of the two temperatures can be seen from figure 5.2
and adding the feed forward controller based on the disturbance to the system results
in figure 5.5.
The control approach assumes that the temperature can be controlled by controlling
the one variable, marked u(s), and expecting the other variable to be a disturbance,
marked d(s). The disturbance has a feed forward function, marked G
ff
(s) which
change the controlled variable according to the disturbance. The controller of the
system, marked G
c
(s), calculates the needed change of the controlled variable based
on the error, marked e(s). The output of the controller is usually a voltage and drives
an actuator. The actuator in the system investigated is a blower and the voltage
64
5 Control strategies


+ +
+
+
G
c
(s) K
V
G
con
(s)
G
ff
(s)
G
D
(s)
D(s)
G
p
(s)
T
out T
ref
e(s)
u(s)
Figure 5.5: A general control approach
is converted to an airflow. The disturbance d(s) is the input of the disturbance
transfer function G
D
(s) and the input to the plant G
P
(s) is the difference between
the controlled variable and the disturbance transfer function output. The output
of the plant is the temperature gradient and this is integrated in order to obtain
the temperature of the system T
out
and this is fed back to the error calculation.
This is the general approach to the control of the temperature. It is perhaps more
common to change the sign on the error calculation, so the error equals the reference
minus the measured value. But since the controller only needs to be active when
the reference temperature is reached the controller must be deactivated when the
error is negative. The controlled variable is the airflow through the stack and the
reformer for the respective model. The controller can only send air into the model
for cooling purposes and not be active when the controller error is negative. The
disturbance of the system is for the reformer system the change in flow based on
the estimator. When the current density changes the flow of the fuel changes. The
disturbance in the linear fuel cell model is the change in heat produced by the fuel
cell stack based on a change in the current density.
5.1.5 Controller demands
When defining what a good controller is, a set of parameters are needed. These
parameters are dependent of the given system and must be realizable. A realizable
controller is compatible with the limits of the system, e.g. the controller cannot
require a larger amount of air than the blower can deliver. The parameters also
include the amount of error allowed by the controller and the "sluggishness" of the
controller. The parameters for the reformer are the following
• The overshoot must be within 0 to 2% of the reference temperature.
• The lag of the controller must be minimal.
• The controller must only react when the temperature is above the reference
temperature.
65
5 Control strategies
The overshoot restriction of the reformer temperature is a restriction on the
controller parameters. Overshoot is the allowed temperature difference above the
reference temperature and the controller parameters must be adjusted accordingly.
The controller is faster than the system it controls and the controller must be quick
to react. Oscillations in the temperature is unwanted since these may have unwanted
effects on the output of the system, especially on the stack temperature since the
characteristics of the voltage resemble those of the temperature.
5.2 Temperature control
The control strategy for the respective temperature models is presented in this
chapter. The open loop transfer functions are calculated in order to investigate the
placement and behavior of the closed loop poles. The closed loop transfer functions
are calculated in order to obtain the step response. This is done for both the reformer
and the fuel cell stack models.
5.2.1 Reformer
The transient model of the reformer was presented in (3.21) and the transient model
presents only the dynamic of the model and not the changes in actual value of the
temperature. The transient model can be seen from figure 5.6.


+ +
+
+
G
c
(s) K
V
G
conv
(s)
G
R
ff
(s)
G
D
(s)
i(s)
G
pr
(s)
T
reformer
T
reference
e(s)
˙
Q
conv
(s)
˙
Q
reform
(s)
Figure 5.6: The transient model of the reformer
The transfer functions that converts a variable to an power balance input can be
represented in a Laplace transform. To start with the most important one the
transfer function for the plant can be seen from (5.7). The transfer function transfers
the result of the balance of the respective heat transfers into the temperature of the
reformer. This transformation is based on the left hand side of (3.21) which controls
the dynamics of the temperature. This transfer function is assumed to be inalterable
and the response of the temperature must be shaped by using controllers.
66
5 Control strategies
G
pr
(s) =
1
m
r
· c
r
· s + K
conv
Tr
+ K
cond
r
(5.7)
The transfer function G
conv
(s) is the transfer function between the airflow ˙ q(s) and
controlled variable
˙
Q
conv
. There is no dynamics involved in the transfer function
and the function is only a constant, which can be seen from (5.8). The convection
transfer function is calculated from (3.21) and contains the factors in front of the
variable ˙ q
air
G
conv
(s) = K
conv
q
(5.8)
The feed forward transfer function G
R
ff
(s)
has earlier been mentioned to be the
function supplying the air to the reaction. In order to be able to plot the root loci of
the transient model and thereby the reformer, the contribution of convection added
by the feed forward transfer function must be included in the disturbance transfer
function. The transfer function G
R
ff
(s) for the reformer feed forward controller is
based on the estimated amount of excess hydrogen from the fuel cell, in l/min, and
this is multiplied with the air stoichiometry for the burner λ
H2Burn
, see (5.9).
G
R
ff
=
_
K
estimator
· K
system

n
cell
·A
cell
2·F
_
· 1000 · 60 · λ
H2Burn
1000 · ρ
H2
· K
V
. ¸¸ .
K
r
ff
·i (5.9)
where K
V
is the conversion factor from the blower voltage to the airflow in [l/min].
The conversion between the molar flow of the volumetric flow is the density of the
hydrogen. The disturbance transfer function G
D
(s) transforms the current density
into the heat provided from burning the hydrogen and the power needed for the
steam reforming process, see (5.10).
G
D
(s) = K
H2
−K
SR
(5.10)
Looking at figure 5.6 there are two components dependent of the current density.
These can be written in one function which is represents the change of the system
based on the change in the current density. Summing up the changes based on the
current density, can be seen from (5.11).
G
Di
(s) =
_
G
D
(s) −G
R
ff
· K
V
· G
conv
_
= (K
H2
−K
SR
−K
r
ff
· K
V
· K
conv
q
) (5.11)
67
5 Control strategies
Since the reformer experiments, from section 6.3.1, presented a lag in the change of
the reformer temperature, when the frequency of the pump changed, a transport lag
must be implemented in the transient model of the disturbance. This transport lag
is multiplied to the entire disturbance transfer function G
Di
(s). The transport lag is
approximated with a first order pade approximation from MATLAB, see (5.5). The
lag of the function must be multiplied with the entire disturbance transfer function,
see (5.12).
G
Di
lag
= G
Di
(s) · G
lag
(s)
=
(K
H2
−K
SR
−K
r
ff
· K
V
· K
conv
q
) ·
_
−s +
1
T
l
·2
_
s +
1
T
l
·2
(5.12)
The controller transfer function G
c
(s) is neglected for now and assumed to be a gain
of unity. This is done since the controller is to be derived from the control strategies
later on. Plotting the root loci of the system requires the open loop functions.
Starting with the open loop function for the temperature reference signal the open
loop transfer function can be seen from (5.13).
T
reformer(s)
T
reference
(s)
= G
c
(s) · K
V
· G
con
· G
P
(s)
=
1 · K
V
· K
conv
q
· 1
m
r
· c
r
· s + K
conv
Tr
+ K
cond
(5.13)
The open loop transfer function for the disturbance signal, assuming the controller
is unity and that the temperature reference signal is neglected, can be seen from
(5.14).
T
reformer(s)
i(s)
= G
Di
lag
· G
P
(s)
=
(K
H2
−K
SR
−K
r
ff
· K
V
· K
conv
q
) ·
_
−s +
1
T
l
·2
_
· 1
_
s +
1
T
l
·2
_
· (m
r
· c
r
· s +K
conv
Tr
+ K
cond
r
)
(5.14)
With the given transfer functions presented the control of the system can be
initiated.
68
5 Control strategies
Root loci of the reformer system.
Plotting the root locus requires the knowledge of the poles and zeros of a the given
function. The poles for the transfer function of open loop convection. It can be
seen from (5.13) that the transfer function only has one pole and no zeroes due to
the presence of an s in the denominator of the transfer function. Therefore the root
locus must only consist of one pole, which can be seen from figure 5.7.
−10 −8 −6 −4 −2 0 2
x 10
−4
−4
−3
−2
−1
0
1
2
3
4
x 10
−5
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
Figure 5.7: Root locus plot of the convection part with unity control
From figure 5.7 it can be seen that the root locus moves away from the imaginary
axis as the gain increases towards infinity. This can be changed by adding a more
dynamic controller than unity. Looking at the open loop transfer function for the
disturbance signal, see (5.14), it can be seen that the root loci should have a zero and
two poles. This is caused by the s present in the numerator of (5.14). Furthermore
it can be seen that the zero is placed in the positive right half plane of the s-plane,
due to the negative sign in the numerator of (5.14).
From figure 5.8 it can be seen that the root locus moves towards the right half plane
as the gain increases. The reason for the zero in the right half plane is the lag
implemented in the modeling. (5.5) presents a zero and a pole which is multiplied
with the disturbance function and this sets a limit to the amount of gain that can
be applied. To obtain the response of the system the loop must be closed.
69
5 Control strategies
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
−0.02 0 0.02 0.04 0.06 0.08 0.1
−0.025
−0.02
−0.015
−0.01
−0.005
0
0.005
0.01
0.015
0.02
0.025
Figure 5.8: Root locus plot of the open loop transfer function between the reformer
temperature and the current density.
Closed loop of the reformer system
To close the loop of the reformer the closed loop transfer function for the disturbance
and the reference respectively must be calculated. Since the controllers only may
function when the temperature is above the reference some changes to the general
closed loop must be applied. The reference is negative and the measured temperature
is fed back with a positive feed back, see figure 5.9.

+
R(s)
E(s)
G
p
(s)
H(s)
C(s)
B(s)
Figure 5.9: A negative reference system with positive feedback
Recalculating the closed loop transfer function from (5.1) and solving the relation-
ship between C(s) and C(s) gives a new transfer function, see (5.15).
70
5 Control strategies
C(s) = G
p
(s) · E(s)
E(s) = B(s) −R(s)
= H(s) · C(s) −R(s)
C(s) = G
p
(s)[H(s) · C(s) −R(s)]
C(s) −G
p
(s) · H(s) · C(s) = −G
p
(s) · R(s)
C(s)
R(s)
=
−G
p
(s)
1 −G
p
(s) · H(s)
(5.15)
The negative signs present in both the numerator and the denominator of the closed
loop transfer function. Closing the loop of the temperature reference and applying
(5.15). When figure 5.6 is analyzed with no disturbance the model can be rearranged
to figure 5.10.
T
reference
G
c
(s) K
V
G
conv
(s) −1 G
pr
(s)
T
reformer

+
Figure 5.10: The altered system approach for the closing of the feedback loop of the
system.
Solving the closed loop transfer function of figure 5.10 using (5.15), gives (5.16).
T
reformer
(s)
T
reference
(s)
=
−G
c
(s) · K
V
· G
con
(s) · (−1) · G
pr
(s)
1 −G
c
(s) · K
V
· G
con
(s) · (−1) · G
pr
(s)
(5.16)
Inserting the respective systems from (5.7) and (5.8) into (5.16) and assuming the
controller transfer function G
c
(s) is a unity gain, gives (5.17).
T
reformer
(s)
T
reference
(s)
=
K
V
· K
conv
q
m
r
· c
r
· s + K
V
· K
conv
q
+K
conv
Tr
+ K
cond
r
(5.17)
With the closed loop transfer function calculated, the step response of the reformer
can be achieved.
To calculate the closed loop transfer function for the disturbance is based on the
open loop transfer function, presented in (5.14). The reference temperature input of
the reformer is neglected and the reformer model can be rearranged, see figure 5.12.
Looking at figure 5.12 the transient model can be recognized as a normal control
system with a negative feed back and a feedback function. This results in an
application of (5.1) and the closed loop transferfunction can be derived, see (5.18).
71
5 Control strategies
0 5 10 15 20 25 30 35 40
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Step Response
Time (sec)
A
m
p
l
i
t
u
d
e
Figure 5.11: Step response of the reference with resulting change in reference
temperature.
D(s)
G
c
(s) K
V
G
conv
(s)
G
pr
(s)
T
reformer
i(s)
G
Di
lag
(s)
+

Figure 5.12: The rearranged transient model
T
reformer
(s)
i(s)
= G
Di
lag
(s) ·
G
pr
(s)
1 +G
c
(s) · K
V
· G
conc
· G
pr
(s)
(5.18)
Inserting (5.7), (5.8) and (5.12) in (5.14) and assuming the controller is unity gives
(5.19).
T
reformer
(s)
i(s)
=
_
K
H2
−K
SR
−K
r
ff
· K
V
· K
conv
q
_
·
_
−s +
1
T
l
·2
_
_
s +
1
T
l
·2
_
·
1
m
r
· c
r
· s +K
V
· K
conv
q
+ K
conv
Tr
+ K
cond
r
(5.19)
72
5 Control strategies
5.2.2 Fuel cell stack
Building the transient model and investigating the control issues of the fuel cell
stack temperature is also needed in order to control the entire system. Like the
modeling of (3.21) as a block diagram, the same approach is applied with (3.13), see
figure 5.13.


+ +
+
+
G
c
(s) K
V
G
con
(s)
G
s
ff
(s)
G
D
(s)
i(s)
G
ps
(s)
T
out
T
ref
e(s)
u(s)
Figure 5.13: The setup for the control of the stack temperature
The transfer function for the stack temperature G
ps
(s), or the plant, is based on the
left hand side of (3.13), which can be seen from (5.20).
G
ps
(s) =
1
m
s
· c
s
· s + K
cond
s
+ K
conv
Ts
−K
heat
Ts
(5.20)
The transfer function for the convection is a constant that changes the convection
contribute from the airflow. The transfer function can be derived from (3.13), and
the transfer function is presented in (5.21).
G
conv
(s) = K
conv
q
(5.21)
The feed forward transfer function can be determined from the amount of air that
is needed for the reaction happening inside the fuel cell stack. The amount of air
sent into the fuel cell can be calculated from (5.22) and the air blown into the stack
is at room temperature T
a
.
G
s
ff
=
n
cell
· A
cell
4 · F · x
O
2
·
60
ρ
air
(T
a
)
·
1
K
V
. ¸¸ .
K
ff
s
(5.22)
The disturbance transfer function is a constant that relates the current density with
the power balance of the stack, see (5.23).
73
5 Control strategies
G
D
(s) = K
heat
i
(5.23)
From figure 5.13 it can be seen that the feed forward air controller (5.22) can be
summed up with the disturbance transfer function, from (5.23), since both the
respective functions are constants multiplied onto the current density. The feed
forward function G
ff
s
(s) is multiplied with the convection transfer function from
(5.21) and the voltage constant K
V
, resulting in (5.24).
G
D
i
(s) = G
D
(s) −G
s
ff
(s) · K
V
· G
con
(s)
= K
heat
i
−K
ff
i
· K
V
· K
conv
q
(5.24)
One of the things necessary for a change in current density is the presence of a given
amount of hydrogen, and from (5.14) a lag was presented, due to the transport
time from the pump to the reformer exit. This must also be implemented in the
fuel cell stack temperature control. The approach is to lag the current density and
force the system to wait for the right amount of hydrogen. Since the transport lag
time constant for the hydrogen moving through the WGS-reactor and the cooler
is undetermined, this is left for future studies. The lag, from (5.5), is applied, see
(5.25).
G
D
lag
(s) = G
lag
· G
D
i
=
−s +
1
T
l
·2
s +
1
T
l
·2
·
_
K
heat
i
−K
ff
i
· K
V
· K
conv
q
_
(5.25)
Since the transfer functions for the respective parts of the fuel cell stack model has
been presented and the respective open loop functions for inputs of the system. The
open loop transfer function for the reference temperature, neglecting the input from
the current density, can be seen from (5.26).
T
s
(s)
T
ref
(s)
= G
c
(s) · K
V
· G
conv
(s) · G
ps
(s)
=
−1 ·
_
G
c
(s) · K
V
· K
conv
q
_
· 1
m
s
· c
s
· s +K
conv
Ts
+K
cond
s
−K
heat
Ts
(5.26)
The open loop transfer function for the input from the current density can be seen
from (5.27).
74
5 Control strategies
T
s
(s)
i(s)
= G
D
lag
(s) · G
ps
(s)
=
_
K
heat
i
−K
ff
i
· K
V
· K
conv
q
_
·
_
−s +
1
T
l
·2
_
(m
s
· c
s
· s + K
conv
Tr
+ K
cond
s
−K
heat
Tr
) ·
_
s +
1
T
l
·2
_
(5.27)
With the open loop transfer functions calculated the respective root loci can be
plotted.
Root loci for the fuel cell stack
Plotting the root loci for the open loop transfer function presents a problem. The
negative sign, in (5.26), is neglected since closing the loop also presents negative
signs in both the numerator and the denominator. The root locus can be seen from
figure 5.14.
−12 −10 −8 −6 −4 −2 0 2
x 10
−3
−5
−4
−3
−2
−1
0
1
2
3
4
5
x 10
−4
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
Figure 5.14: Root locus for the reference open loop transfer function
From this it can be seen that the closed loop poles moves towards negative infinity
as the gain increases towards infinity. The root locus is plotted with a gain of unity
in the controller. The change of the temperature based on the current density from
the open loop transfer function, presented in (5.27) can be presented, see figure 5.15.
75
5 Control strategies
−0.02 0 0.02 0.04 0.06 0.08 0.1
−0.03
−0.02
−0.01
0
0.01
0.02
0.03
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
Figure 5.15: Root locus plot of the disturbance open loop function
The lag presents the zero in the right half plane as with the reformer disturbance
plot. With the root loci presented for the linear stack model.
Closed loop for the stack temperature
Closing the feedback loops for the respective open loop transfer functions are
completely analog to the method in the reformer. The relation between the reference
temperature T
ref
and the stack temperature T
stack
is a negative reference system
with positive unity feedback. This can be calculated from (5.15). The closed loop
transfer function can be seen from (5.28).
T
stack
T
reference
=
−G
c
· K
V
· G
conv
· (−1) · G
ps
(s)
1 −G
c
· K
V
· G
conv
· (−1) · G
ps
(s)
(5.28)
When inserting the expressions from (5.20),(5.21) and (5.25) into (5.28) and
assuming that the controller is a gain of unity results in (5.29).
T
stack
(s)
T
ref
(s)
=
K
V
· K
conv
q
m
s
· c
s
· s + K
cond
s
+ K
conv
Ts
−K
heat
Ts
+K
V
· K
conv
q
(5.29)
76
5 Control strategies
The step response of the stack is the response to a rapid change in the input which
is the temperature reference T
ref
. The step response can be seen from figure 5.16.
0 20 40 60 80 100 120 140
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Step Response
Time (sec)
A
m
p
l
i
t
u
d
e
Figure 5.16: Stepresponse of the stack temperature closed loop system
When the step response of the reference has been presented, the loop for (5.27)
must be closed. The system is analyzed with the disturbance being positive and
the feedback branch contains the convective parts of the model, which is analog to
figure 5.12. The transfer function can be seen from (5.30).
T
stack
(s)
i(s)
= G
lag
·
G
ps
(s)
1 + G
ps
(s) · G
c
(s) · K
v
· G
con
(s)
(5.30)
Inserting the respective expressions for the systems referred to in (5.30), from
(5.20),(5.21) and (5.25) results in (5.31).
T
stack
(s)
i(s)
=
_
K
heat
i
−K
ff
· K
V
· K
conv
q
_
·
_
−s +
1
T
l
·2
_
_
s +
1
T
l
·2
_
·
1
m
s
· c
s
· s + K
cond
s
+ K
conv
Ts
−K
heat
Ts
+ K
V
· K
conv
q
(5.31)
Plotting the step response of the stack temperature based on a step change in the
current density is presented in figure 5.17
77
5 Control strategies
0 50 100 150 200 250 300 350 400 450 500
−6
−4
−2
0
2
4
6
8
10
12
Step Response
Time (sec)
A
m
p
l
i
t
u
d
e
Figure 5.17: Step response of the temperature at a current density step
The change in the temperature decreased due to the presence of the lag. The lag
temperature looses heat to conduction and the change results in a decrease of the
temperature.
5.3 Controller design
The closed loop responses of the system has been presented and the controllers have
been assumed to have a gain of unity. Changing the controller transfer function
G
c
(s)for the respective reference changes the dynamics of the system. The changes
are applied to the open loop transfer function of the respective models. The reason
for changing the dynamic is to get a faster response of the system when a change in
the disturbance is applied. The most common linear controller is the PID-controller
and this is analyzed along with the effects of adding the PI-controller to the system.
The differential part of the controller reacts on small changes of the error and noise
will trigger a control. To avoid the problem of the noise in signals the PI controller
is chosen, but the PID controller can also be applied. The method for applying the
PI-controller is presented in this section but the application of the PID-controller
is completely analog. Controllers in real time digital control systems are discrete
controllers and the controllers are to be discretized, in a way so that they are based
on the current error and the error from the run before this one. The transformation
from the continuous s-plane to the discrete z-plane is called z-transformation. This
transformation is neglected in this project.
78
5 Control strategies
5.3.1 Reformer temperature controller
The PI-controller is also known as a proportional(P) and integral(I) controller. The
controller is usually a piece for software in a digital control system, or it can be made
from operational amplifiers. In both cases the controller makes changes to a voltage
of an actuator that tries to correct the error of the system. The PI-controller can
be seen from (5.32). The proportional part of the controller ensures a fast response
and the integral part ensures that the steady state error is removed.
G
c
(s) = K
p
_
1 +
1
T
i
· s
_
(5.32)
Where K
p
is the proportional constant and T
i
is the integral constant. These
constants changes the poles for controller and shapes the root locus for the system.
It is assumed that the controller only has positive constants. otherwise the controller
would add poles and zeros in the right half plane and that would increase the
instability of the system. Rearranging the controller to better apply for the root
locus, can be seen from (5.33).
G
c
(s) = K
P
·
_
s +
1
T
i
_
s
(5.33)
It can be seen from the rearranged controller that it adds a zero to the root locus.
The controller is multiplied with the open loop transfer function of the reformer,
from (5.13), and result in (5.34).
T
reformer
(s)
T
reference
(s)
= K
p
·
s +
1
T
i
s
·
K
V
· K
conv
q
m
r
· c
r
· s + K
V
· K
conv
q
+ K
conv
T
r
+ K
cond
r
(5.34)
Plotting the root locus for the reformer transfer function with the controller and
neglecting the negative sign in the numerator of the open loop transfer function can
be seen from figure 5.18, and the integral constant T
i
is set to 0.06.
Now the closed loop poles can be plotted closer to the imaginary axis of the s-plane.
The root locus changes when the zero moves towards the poles by changing the
integral constant. The step response must be generated for the open loop transfer
function and therefore the loop must be closed, using (5.1), see (5.35).
T
reformer
T
reference
=
K
P
_
s +
1
T
i
_
K
V
K
conv
q
m
r
c
r
s
2
+
_
K
conv
Tr
+ K
cond
r
+ K
P
K
V
K
conv
q
_
s +
1
T
i
K
p
K
V
K
conv
q
(5.35)
79
5 Control strategies
−60 −50 −40 −30 −20 −10 0 10
−20
−15
−10
−5
0
5
10
15
20
Root Locus
Real Axis
I
m
a
g
i
n
a
r
y

A
x
i
s
Figure 5.18: Root Locus plot of the reformer with a PI-comtrol ler with a Ti=0.06
Calculating the parameters for the controller is dependent of the demands, for the
controller that were presented in section 5.1.5. A mathematical search method was
created to locate for a good set of parameters for the controller. The step response
of the reformer with the controller is basis for the script. The method set a value
for T
i
and then runs through the gain K
P
and tests all the step responses. The
overshoot is calculated for the response and is used as a search parameter. The
overshoot was restricted to 2%.
K
P
T
i
Overshoot[%]
100 5.8 1
116 5 1
84 6.9 1
Table 5.1: Sets of variables from the parameter search
If the overshoot of the step response fit inside the restriction, the gain K
P
and
integration constant T
i
was saved along with the overshoot. The table was afterwards
sorted in ascending order with regards to the overshoot. The best approximation
was the one with the lowest overshoot. Three sets of variables from the search
can be seen from table 5.1 and the step response of the variables can be seen from
figure 5.19.
The temperature is assumed to have reached the reference temperature when the
temperature output is within 2% and all the sets of parameters have an allowable
overshoot. The temperature controller has an influence on the disturbance closed
80
5 Control strategies
0 0.2 0.4 0.6 0.8 1
0.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
0.9
0.95
1


K
P
=100 and T
i
=5.8
K
P
=116 and T
i
=5
K
P
=84 and T
i
=6.9
Time [s]
A
m
p
l
i
t
u
d
e
Figure 5.19: Step response with a change in temperature using a PI control ler.
loop transfer function, which can be seen from (5.18), and inserting (5.33) instead
of G
c
(s) results in (5.36).
G
c
i
(s) =
_
−s +
1
T
l
·2
_
·
_
K
H2
−K
SR
−K
r
ff
· K
V
· K
conv
q
_
_
s +
1
T
l
·2
_
·
s
m
r
c
r
s
2
+
_
K
conv
Tr
+ K
cond
r
+ K
p
K
V
K
conv
q
_
s +
1
T
i
K
p
K
V
K
conv
q
(5.36)
The system must be stable with regards to a step response for both the reference and
the current density and the controller parameters from table 5.1 must be inserted
in the transfer function and the step response must be obtained. The step response
for the tree sets can be seen from figure 5.20.
From figure 5.20 it can be seen that the parameters with K
P
= 116 and T
i
= 5
have the fastest response and lowest overshoot when a change in current density
occurs. These parameters are used in the linear model for the temperature of
the reformer. Implementing the controller in the linear model of the reformer
temperature and obtaining the temperature response from the change in input from
both the temperature reference and the disturbance can be seen from figure 5.21.
The reference changes from 400K (125

C) to 550K (277

C) at T = 3000 s and the
current density changes from 0.3 to 0.66 at T = 5000.
As it can be seen from the figure that the reformer temperature does not cross the
reference of the of the controller and thereby the controller makes no changes. The
81
5 Control strategies
0 20 40 60 80 100
−20
−15
−10
−5
0
5
x 10
−4


K
P
=100 and T
i
=5.8
K
P
=116 and T
i
=5
K
P
=84 and T
i
=6.9
Time[s]
A
m
p
l
i
t
u
d
e
[
-
]
Figure 5.20: Step response for the temperature with the parameters from table 5.1
0 2000 4000 6000 8000 10000
250
300
350
400
450
500
550


Reference
Linear model
Time [s]
R
e
f
o
r
m
e
r
t
e
m
p
e
r
a
t
u
r
e
[
K
]
Figure 5.21: PI-control led reformer temperature using λ
H2
at 1.6 and λ
H2burn
of 5
reason for the temperature not following the reference is that the heat input from the
current density is too low. The plot in figure 5.21 was performed with a hydrogen
stoichiometry λ
H
2
of 1.6, which shows to be too low for the reformer.
82
5 Control strategies
5.3.2 Fuel cell stack temperature controller
The controller presented in (5.33) can also be added to the temperature controller
for the fuel cell stack and this changes the closed loop transfer functions from (5.29)
to (5.37).
G(s) =
K
P
K
V
K
conv
q
s +
1
T
i
K
P
K
V
K
conv
q
m
s
c
s
s
2
+ (K
cond
+ K
conv
Ts
−K
heat
Ts
+K
p
K
V
K
conv
q
)s +
K
p
K
V
K
conv
q
T
i
(5.37)
The search method for the controller parameters is extended for the stack controller
and the result can be seen from table 5.2. The search for the parameters for the
proportional gain K
P
was varied from 2 to 250 in the search algorithm and the
search parameters for the integral constant T
i
was varied from 2 to 14.5 and the
three best sets of results are shown in table 5.2.
K
P
T
i
Overshoot[%]
150 13.6 1
228 9.1 1
156 13.1 1
Table 5.2: Sets of variables from the parameter search
In order to select the best parameters, from the three given sets in table 5.2, the
step response is plotted for all the parameters to see the response of the system with
the given parameters. The step response can be seen from figure 5.22.
The step response from figure 5.22 of the PI-controller parameter search, shows that
the second set of parameters results in the fastest response but has a higher overshoot
than the first set of parameter, but the difference is negligible. The controller has
an impact on the disturbance since the PI-controller is placed in the feed back path
of the closed loop transfer function. If the closed loop transfer function for the
disturbance is recalculated from (5.30) and (5.33), (5.21) and (5.20) is inserted the
closed loop transfer function for the disturbance results in (5.38).
G
d
(s) =
_
K
heat
i
−K
ff
· K
V
· K
conv
q
_ _
−s +
1
T
l
·2
_
_
s +
1
T
l
·2
_
·
s
m
s
c
s
s
2
+ (K
cond
+ K
conv
Ts
−K
heat
Ts
+ K
P
K
V
K
conv
q
)s +
K
P
K
V
K
conv
q
T
i
(5.38)
83
5 Control strategies
0 20 40 60 80 100
−0.08
−0.07
−0.06
−0.05
−0.04
−0.03
−0.02
−0.01
0
0.01
0.02


K
P
=150 and T
i
=13.6
K
P
=228 and T
i
=9.1
K
P
=156 and T
i
=13.1
Time [s]
A
m
p
l
i
t
u
d
e
Figure 5.22: Step response with a change in temperature
0 0.5 1 1.5 2
0
0.2
0.4
0.6
0.8
1
x
y


K
P
=150 and T
i
=13.6
K
P
=228 and T
i
=9.1
K
P
=156 and T
i
=13.1
Figure 5.23: Step response of the disturbance with the PI control ler, using parameters
from table 5.2
Plotting the step response for the closed loop transfer function can be seen from
figure 5.23.
It can be seen that the set of parameters where K
P
= 228 and T
i
= 9.1 again
has the fastest response with a change in the disturbance. Inserting the controller
parameters in the linear model for the stack temperature gives the response for the
84
5 Control strategies
temperature. The temperature is held at 433K (160

C) until the time reaches 2000
seconds then the temperature is stepped up to 453K (180

C). The current density is
held at 0.15 and then the current density is stepped up to 0.4 when the time reaches
4000 seconds. The response from the model can be seen from figure 5.24
0 2000 4000 6000 8000 10000
280
300
320
340
360
380
400
420
440
460


Reference
Linear model
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[
K
]
Figure 5.24: Temperature response for the linear model of the stack temperature with
K
P
= 228 and T
i
= 9.1
The temperature responds to the changes in both the reference and the disturbance.
Taking a closer look at the temperature when the reference is changed shows a
small overshoot in the temperature which was expected from table 5.2. The first
temperature change is where the temperature is held at 433 and the temperature
response can be seen from figure 5.25(a).
The overshoot was expected to be 1% and the model shows that it is lower than
expected. The change of the temperature at 2000 seconds of the simulation shows
the same overshoot. When the current density changes from 0.15 to 0.4 A/cm
2
and
the changes in temperature can be seen from figure 5.25(b).
5.4 Summary
This chapter has shown that it is possible to control the system with a PI-controller
and that the parameters for the controllers can be determined from a parameter
search in Matlab™. The model includes the lag from the reformation process and
the system response did not change much from the reference. The overshoot of 1%
does not comply with the thermal system since the change in the temperature is
less than 0.01K from simulations. The reformer temperature model showed that the
85
5 Control strategies
545 550 555 560 565 570 575
432.98
432.99
433
433.01
433.02
433.03


Reference
Linear model
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[
K
]
(a) Zoom of the overshoot at the temperature
of 433K
3990 4000 4010 4020 4030 4040 4050 4060 4070 4080
451
451.5
452
452.5
453
453.5
454
454.5


Reference
Linear model
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[
K
]
(b) Zoom of the step change in current density
at T=4000
amount of hydrogen in the exhaust gas was too low for the temperature to reach
the reference during a step up in reference.
86
Implementation 6
6.1 Experimental setup
6.2 Evaporator
6.3 Reformer
6.3.1 Temperature experiments
6.3.2 Gas flow in the system
6.3.3 Dry gas composition
6.4 Simulated run
6.5 Summary
This chapter investigates the physical system and evaluates on the first estimated
system parameters. More plots of the experiments can be seen from Appendix A.
The program, used to control the system, is described in Appendix D
6.1 Experimental setup
Before a fuel cell is attached to the reformer system, the need for a measurement of
the available H
2
and CO is required. As mentioned before, the fuel cell is able to
sustain an CO amount of 2-3%. A mass spectrometer is used, as shown in figure 6.1,
to measure the molar fractions in the reformer gas. At the first experiments the WGS
is empty and this requires the mass spectrometer to be able to read up to 5-8% CO.
All experiments are made with a SC ratio of 1.5.
Pure H
2
is used to fuel the burner and is manually controlled by the labview program.
The amount of H
2
is initially set to around 2 l/min and the flow of air into the burner
is set to about 10 times the H
2
flow. The flow of H
2
is measured from the MFC. This
airflow is applied to avoid flashback in the burner. A flashback would be noticed by
a high temperature rise at the burner inlet. This flashback is quite damaging to the
burner, firstly because the metal cant withstand the temperatures, and the catalyst
in the burner would sinter.
The fuel pump mentioned in this system, is a fixed displacement pump. By applying
an PWM signal to the pump at 24 V , the pump will transfer 30ml of methanol
mix to the evaporator. The maximum frequency for the pump is 20 Hz, though
by the mathematical model, shown in Chapter 2, the frequency will not exceed
approximately 14 Hz at a current density of 0.66. Some plots in this chapter will
show the frequency of the pump, for comparison of the model and the system.
87
6 Implementation
T
T
T
T
T
T
T
T
P
P
T
T
MFC
MFC
MFC
MFC
Heater
E
v
a
p
o
r
a
t
o
r
Reformer
Burner
WGS Cooler
mass
spectrometer
100l/min
200l/min
1300l/min
H
2
Tank
Pump
Figure 6.1: Running system without a fuel cel l
Reformer
WGS
Burner
air
Running/starting
mode switch
H2 for
burner
Burner
outlet
Methanol
gas
Evaporator
Pump
Methanol
inlet
Electric air
heater
Cooler
Figure 6.2: System overview
The mass flow controller (MFC) is used to drive the airflow for the burner, evaporator
and the cooler. The input for the MFC’s are 0-10V, and the maximum available flow
is 100 l/min, 200 l/min and 1300 l/min. The 100 l/min is installed on the burner
88
6 Implementation
input, the 200 l/min is installed on the evaporator, and the 1300 l/min is installed
on the cooler. The delivered flow is measured from the MFC’s as a feedback, and
converted in the program. The MFC’s has a rated settling time of < 500ms, though
overshoot on the delivered flow is common.
As shown in figure 6.2 and figure 6.1, the first component in the gas flow is the
evaporator and is described below.
6.2 Evaporator
As shown in section 1.3 the evaporator contains 34 fins and have a mass of about
0.5kg. The mixture is led into the evaporator as shown at figure 6.2, where the
methanol is vaporized. The evaporator is heated by an electric air heater, which
simulates the exhaust of the fuel cell, see figure 6.2. The airflow is varied throughout
the experiments, and the temperature is initially set to about 160

C.
1000 1200 1400 1600 1800 2000 2200 2400
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
1000 1200 1400 1600 1800 2000 2200 2400
0
25
50
75
100
125
150
175
200
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Evaporator air input
Evaporator
Evaporator gas outlet Temperature
Figure 6.3: Evaporator temperature with 5 Hz methanol flow. Airflow at 60 l/min
As shown in figure 6.3 the evaporator falls in temperature when there is a flow of
5Hz on the methanol pump. This temperature is decreasing until it reaches the
condensing temperature of the fuel mix. As mentioned before, the temperature of
the evaporator should be above 120

C, to ensure the mix is evaporated.
The evaporator should be able to evaporate a 5Hz flow from the pump as shown in
figure 6.3, though some problems is shown in the setup of the system.
A thermal image is taken from the evaporator casing and it can be noticed that the
evaporator is quite revealed to the outside air. There is no isolation at the front side
89
6 Implementation
of the evaporator, so loss of heat due to conduction is higher in this area. This can
be seen in figure 6.4(c) and figure 6.4(d).
Methanol
inlet
Air inlet
(a) Picture of air inlet side
Methanol
inlet
Air outlet
Electric
heater
(b) Picture of air outlet
(c) Thermal image of air inlet side (d) Thermal image of air outlet side
Figure 6.4: Images of evaporator
Considering the airflow through the evaporator, the model is based on the fact that
the output temperature is the same as the evaporator temperature. Because of
physical setup, a measurement of the output temperature is not available, though it
is estimated that the temperature is higher compared to the evaporator temperature.
The redesign should be done with more attention to the way the fuel is passed
through the evaporator. As the output air, from the fuel cell, is in a pipe with a
diameter of about 50 mm, the evaporator width would be about the same. With the
same amount of material as the current evaporator the length would be increased.
As described in [17] the most effective heatexchanger should be designed with a
counterflow, because the difference in temperature would be the largest compared
to the inlet air and the methanol mix. This means that the flow of fuel and the
flow of air would be in each direction towards each other. As the nonlinear model
describes, the heat transfer is calculated by
90
6 Implementation
˙
Q = ˙ n(h
out
−h
in
) (6.1)
The model assumes the enthalpy of the output air is only dependent on the
evaporator temperature. If a regression on the output temperature and the airflow,
a more precise calculation on how much heat is transfered to the methanol.
The model assumes no loss of heat due to conduction, though the evaporator is
only covered partly with a layer of isolation. At the start of the experiment, a
pump frequency of 5 Hz caused the evaporator to reduce its temperature to the
condensing temperature of the fuel mix. If the mixed methanol and water is not in
a vapor phase, this might cause the gas composition to change rapidly and this is
not desirable.
As the evaporator is not able to keep up at the given variables, the electric air
heater is turned up. When a flow of methanol is started, the temperature of the
evaporator is monitored and if the gas outlet temperature falls below 100

C, the
methanol pump is stopped. This ensures the flow of methanol is evaporated when
it enters the reformer. This increased temperature of the air inlet is used in the rest
of the experiments.
The next step in the gas flow is the input into the reformer, and the reformer is
described below.
91
6 Implementation
6.3 Reformer
The reformer is designed with a burner on the one side and a reformer on the other.
The advantages of this design is, good heat transfer, compact design and a low
thermal mass. The volume of the reformer is 0.4l and the weight is around 1kg.
This can be seen from figure 6.5, the burner inlet and outlet can be seen. The
reformer is located on the far side of the picture, and can be seen with a reformer
inlet and outlet.
Running/starting
mode switch
Reformer
inlet
Reformer
outlet
Burner
outlet
Burner
inlet
Figure 6.5: Reformer image
Initially the reformer was covered in the middle with a layer of Rockwool, to decrease
the thermal gradient through the reformer. Experiments based on [16] show that
the temperature difference can be up to 150 ˆcirc C. A thermal picture was taken and
can be seen in figure 6.7(a) and figure 6.7(b). The thermal loss due to conduction
was a concern, so some improvements was made to reduce the thermal conductivity.
This is done by adding Rockwool at the ends of the reformer, and this can be seen
from figure 6.5.
6.3.1 Temperature experiments
The placement of the different temperatures sensors can be seen in figure 6.6.
“Burner Temperature 1” is shown as “T1”, “Burner Temperature 2” is “T2”,
“Reformer outlet temperature” is “T3” and “Burner gas outlet temperature” is
“T4”. The temperature sensors used is a K type sensor, and is attached with a
high temperature resistant glue. As shown in [16] the temperature on the length is
as high as 150

C, though on the width of the reformer the temperature difference
is about 50

C. As the temperature on the reformer side is about the same as the
burner side, the reference temperature is set at the burner side.
92
6 Implementation
T1 T2
T4
T3
MeOH
H
2
MeOH
H
2
out
out in
in
Figure 6.6: Placement of temperature sensors
The next experiment is conducted to see how much hydrogen and air that is needed
for the reformer to reach the desired temperature. The experiment is shown in
figure 6.8. Two temperature sensors is applied to the burner. One at the gas
inlet of the burner side (Burner temperature 2) and another about 2 cm down the
burner areal (Burner temperature 1). “Burner temperature 1” is chosen as reference
temperature, because of a faster feedback of the temperature is possible.
(a) (b)
Figure 6.7: Thermal images of reformer without end isolation
The desired temperature of the reformer is about 350

C, though different
temperatures is read throughout the reformer length[16]. The difference between
“Burner temperature 1” and “Burner temperature 2” is about 50-100

C, thus the
reference temperature for “Burner temperature 1” is 350

C.
In figure 6.8 there is no flow of methanol through the reformer part. This means
that the loss of temperature in the reformer only depends on the conduction and
convection from the airflow. The airflow is set to 10 times the flow of the hydrogen
and is based on experiments in [3]. At about 250s, the feed forward is changed to
deliver 9 times the hydrogen flow and at 280s the feed forward is changed to 8. If
there is any indication on flashback in the burner, the temperature would change
rapidly. This does not seem to happen, since the temperature in the outlet gas is
93
6 Implementation
0 50 100 150 200 250 300 350 400 450 500 550
0
10
20
30
40
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
0 50 100 150 200 250 300 350 400 450 500 550
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure 6.8: Airflow compared to hydrogen flow in burner
almost constant. At about 460s the feed forward gain is changed back to 10 and the
hydrogen flow is changed to 2l/min. The temperature of the reformer is tested in
the same way, and it is concluded that a gain of 5 is enough for the temperature to
be stable.
The same experiment is shown later in figure 6.9 where a PI regulator is applied. The
reference set point is 350

C and the gain of the regulator is set at a low level(K
p
=
0.001, T
i
= 0.01). The oscillating change in temperature is not desirable, and will
be covered later in this chapter. As for the finished system, a change in hydrogen
can happen, and this could look something like the effect the slow PI regulator is
doing. So by leaving the PI regulator at a low regulation, the effects of changing
temperatures can be seen in the composition. As mentioned before, the difference
in the two temperature measuring points is about 50-100

C and the temperature at
“Burner temperature 1” is changing faster compared to “Burner temperature 2”.
An experiment was carried out to test a starting sequence to see how long it takes to
change the temperature from 150 to 350

C. This is shown in figure 6.10 and it takes
about 350s. At 800s the reference temperature reaches 350

C and the temperature
is kept relatively constant.
The experiment continues in figure 6.11 where the methanol pump frequency is set
to 5Hz.
The temperature of “Burner gas outlet temperature” is decreasing throughout the
experiment, though this is leveling out at about 125

C. Fittings and tubes at the
exit temperature is not isolated in any significant way, and this might suggest that
a larger mass of the reformer should be used.
94
6 Implementation
650 700 750 800 850 900 950
0
10
20
30
40
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
650 700 750 800 850 900 950
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure 6.9: Control ling temperature of reformer with a low gain controller
500 600 700 800 900 1000 1100
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
500 600 700 800 900 1000 1100
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure 6.10: Startup from 150

C with 2l/min and 8 times the airflow in feed forward
gain
6.11 was also conducted to see the temperature is in the reformatted gas. The next
step in the system is to direct the gas though the WGS (as shown in figure 6.1).
This WGS catalyst is designed to withstand a temperature at around 300

C. The
temperature is measured at about the halfway between the reformer gas outlet and
the WGS inlet. The temperature in the end of the WGS container is measured, and
is much below the 300

C first estimated. The temperature measured at the WGS
can be seen in figure 6.11 and is a little below 100

C. As the
95
6 Implementation
1000 1200 1400 1600 1800 2000 2200 2400
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
1000 1200 1400 1600 1800 2000 2200 2400
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Reformer Outlet temperature
Burner gas outlet Temperature
WGS Temperature
Figure 6.11: Change in methanol flow from 0 to 5 Hz
Temperatures is compared in figure 6.12 between the reformer outlet temperature,
WGS temperature and Cooler temperature. The temperature of the fuel cell is
about 160-180

C and the input temperature of the gas flow is measured to around
80

C at the cooler outlet.
1000 1200 1400 1600 1800 2000 2200 2400
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
1000 1200 1400 1600 1800 2000 2200 2400
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Reformer Outlet temperature
Cooler outlet temperature
WGS Temperature
Figure 6.12: Temperatures measured after the reformer with a methanol flow of 5Hz
As the ripple on the burner is undesirable, some changes in the PID parameters
was conducted. The change can be seen in figure 6.13where the parameters from
table 6.1 is changed. The PID regulator in the program can be seen from Appendix
D.2.
96
6 Implementation
Seconds P I D
Start 0.001 0.01 0
540s 0.01 0.01 0
815s 0.1 0.01 0
900s 1 0.01 10
Table 6.1: PI parameters change in figure 6.13
0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400
0
5
10
15
20
25
30
35
40
45
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
0 200 400 600 800 1000 1200 1400
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure 6.13: Changing the control ling variables
To avoid temperature fluctuations, a differential part is added to the regulator.
Differential regulators are known to add stability to the system, but if there is noise
in the reference signal, the differentiator can reduce stability.
There is some times a need to combine a PI and a lead-compensator in a regulating
system. Such a combination is often called a PID regulator, though the theoretical
PID regulator is not physical installable. The theoretical PID regulator can be seen
in (6.2).
G
c
(s) = K
p
(1 +
1
τ
i
s
+ τ
d
s) (6.2)
This theoretical PID-system has two zeros and one pole, and this it cannot be
realized. If we modify the differentiator to only being effective under a certain
frequency, you can get a controlling system like (6.3).
G
c
(s) = K
p
_
1 +
1
T
i
s
+
T
d
s
αT
d
s + 1
_
(6.3)
97
6 Implementation
where α < 1. This is a transfer function with two zeros and two poles. This system
is able to be realized, at least at certain frequency areas.
The influence of the MFC’s in the system is not included in any way, and this might
cause some variations compared to the theoretical model. If the MFC’s are used in
future work, the need of identifying the transfer function for the MFC is required.
As mentioned before the overshoot of the MFC’s is high and because of this the use
of MFC’s in this system is not desirable.
6.3.2 Gas flow in the system
When doing these experiments, a lag is measured between the input flow of methanol
and the reformatted gas. During the experiments a few indications was seen on how
long this gap is.
Since there is no flow measurements on the system, another way to see how long the
lag is, is to look at the temperature change when the methanol flow is turned on. A
noticeable change of temperature in the reformatted gas can be seen at about 1100s
into the measurement figure 6.14(a).
The change in methanol is zoomed in at the frequency change, so an estimation of
the lag can be seen in figure 6.14(b). When the flow of methanol is started, there
is a lag of about 31s before the temperature change is noticed. This temperature
change can be noticed in the reformer gas outlet and also in the WGS container.
This container is empty in this experiment, so this only validates the transport lag
time. This transport lag is considered to be the same as the flow lag through the
reformer and evaporator, though an experiment with a flow measurement should be
conducted to verify the temperature and flow correlation.
Another experiment was conducted at 1 Hz flow instead and this can be seen in
Appendix A.2.4. This experiment concludes the same, though there is not the same
noticeable change in temperature.
98
6 Implementation
0 500 1000 1500 2000 2500 3000 3500
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500 3000 3500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Reformer Outlet temperature
Burner gas outlet Temperature
(a) Temperatures compared to methanol flow
1000 1050 1100 1150 1200 1250
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
1000 1050 1100 1150 1200 1250
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
T
e
m
p
e
r
a
t
u
r
e

[
C
]


WGS Temperature
Reformer Outlet temperature
Cooler outlet temperature
31s
(b) Zoomed in at the frequency change from 1000s to 1250s
Figure 6.14: Influence in temperature at the reformer gas exhaust when the pump
frequency changes from 0 to 5 Hz
99
6 Implementation
6.3.3 Dry gas composition
The molar fractions is made with a Pfeiffer Omnistar mass spectrometer, calibrated
to measure H
2
, CO
2
, CO, and CH
4
. This mass spectrometer measures the dry gas
composition of the gas placed as shown in figure 6.1. On the reformer gas outlet, a
switch valve is installed between outside air and the reformatted gas. This can be
seen from figure 6.15.
Swich for
reformat gas
Reformat gas
measurement
Condenser
Figure 6.15: Condenser before the mass spectrometer
Switching from air to reformat gas can be seen in almost all the experiments, at the
change in gas composition. The spectrometer is very sensitive to condensed water
which requires the water and methanol is extracted by a condenser before gas is
measured. As the methanol and water is extracted from the gas, the measurement
of the gas is the dry gas composition. This can be calculated by (6.4)
x
drygas
=
x
gas
1 −(x
h2o
+x
ch3oh
)
(6.4)
The molar fraction in (6.4) describes the relationship between the drygas fraction
compared to the real gas composition. First measurements was done without any
WGS catalyst and at a low methanol flow (1 Hz). The results can be seen in
figure 6.16 and shows how the composition changes over time. The measurement
is started at about 50 seconds after the methanol pump is started, and the switch
valve is changed to the gas flow at 80 seconds. The measurement ends up at about
6% CO, 16% CO2 and 75% H2.
100
6 Implementation
0 20 40 60 80 100 120 140 160 180 200
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
0 20 40 60 80 100 120 140 160 180 200
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
T
e
m
p
e
r
a
t
u
r
e
s

[
C
]


Burner Temperature 1
WGS Temperature
Evaporator
Reformer Outlet temperature
Figure 6.16: Sample measurement from mass spectrometer. Measurement is without a
WGS catalyst and 1 Hz methanol pump frequency
The container is filled with a WGS catalyst BASF SP-68, and the temperature is
monitored in the next experiments. The rated operating temperature is about 200
- 300

C, though typical operating temperatures are in the range of 230 - 260

C.
Temperatures above 280

C should be avoided, though peaks can be tolerated up
to 320

C [4]. The catalyst is installed in a 8 cm long cylindric container with a
diameter at about 3 cm.
Gas output
Gas input
Temperature
measurement
Figure 6.17: WGS container
The container is placed in a horizontal position, though it is considered a vertical
position is better. As the catalyst is installed in 1.5x1.5 mm pellets, the room for
installing the catalyst is limited. The rising WGS temperature is compared to the
dry gas fraction and shown in figure 6.18.
Isolation is installed on the WGS container, and figure 6.18 shows the center
temperature of the catalyst to from about 120 to 200

C. This is a bit under
101
6 Implementation
5400 5500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
5400 5500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
WGS Temperature
Evaporator
Reformer Outlet temperature
Figure 6.18: Sample measurement from mass spectrometer. Measurement with WGS
SP-06 catalyst and the container with the catalyst has been isolated. The pump is set at
5Hz
the rated temperature, though before more isolation is installed, more investigation
on the gas inlet temperature is necessary. In the dry gas concentrations,it can be
noticed that the CO concentrations i greatly reduced. This measurement is taken
about 5400 seconds (about 1:30 hours) and it can be seen that the CO concentrations
is stable about 2% CO.
The experiment shown in figure 6.19 shows the dry fraction compared to the
methanol flow and the temperature of the system. The temperature of the WGS
catalyst changes by the rate of the flow from the reformer. This temperature changes
from 100

C to about 200

C. The flow is manually changed so the temperature of the
evaporator is always higher compared to the boiling point of the mixed fuel. Molar
fractions compared to temperature can be seen in figure 6.19(a) and methanol flow
in figure 6.19(b).
At about 4000 seconds into the experiment the reference temperature of the reformer
is changed to 400

C. At about 3500s into the experiment, a change in methanol
flow is made to 15 Hz. This change does inflict on the temperature of the WGS
and the evaporator. The evaporator temperature decreases rapidly and the WGS
temperature changes about the same though in the opposite direction. As the
temperature is changed to 400

C, the CO2 concentrations are rising and the CO
concentrations is falling. This can indicate that the reaction rates on the WGS
reaction is increasing, though more research into this catalyst has to be made.
The mass spectrometer is recalibrated, and new measurements is taken. In the next
experiment, measurements are taken with changing flow of methanol.As shown in
102
6 Implementation
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
WGS Temperature
Evaporator
Reformer Outlet temperature
(a) Measurement of WGS temperature and varying methanol pump frequency
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]


Methanol
(b) Pump frequency compared to dry gas fractions
Figure 6.19: Measurement from mass spectrometer
figure 6.20 the different temperatures are compared to the methanol flow. It can be
noticed how the temperature at “burner temperature 2” is changing compared to the
regulated “burner temperature 1”. The startup of the reformer with no methanol
flow, the “burner temperature 2” is higher, though after the methanol flow is started,
the temperature drops much below the regulated temperature. As the maximum
temperature of the heat exchanger is about 500 degrees, the temperature of the
reformer might be higher and might damage the heat exchanger. This temperature
difference in the reformer can also have an influence in the gas composition. The
dry gas composition can be seen from figure 6.21(a) and figure 6.21(b).
103
6 Implementation
0 500 1000 1500 2000 2500 3000 3500 4000
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500 3000 3500 4000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Cooler outlet temperature
WGS Temperature
Burner gas outlet Temperature
Figure 6.20: Temperatures compared to methanol flow. Same experiment is compared to
dry gas fraction in figure 6.21
It can be noticed that the temperature of the WGS is changing from 100 to about
140

C, and it is seen that the concentration of CO is decreasing. The output gas
from the reformer ( 300

C) is not needed to be lowered by any external equipment,
because it is estimated that the temperature is lowered enough by the unisolated
tubes between the reformer and WGS. The measured gas composition in figure 6.21
is about 3% CO, 19% CO
2
and 80% H
2
at a setpoint of 400

C at the burner.
The output gas temperature of the WGS is, at its highest, at 200

C. This could
indicate that the heat lost in the uisolated tubes between the reformer and WGS
is lowering the temperature too much. The cooler installed is thereby unnecessary
large and the loss in the tubing is estimated to be enough for the gas to enter
the fuel cell. A temperature sensor is placed on the surface side of the reformer,
to test the difference between the burner temperature and the reformer surface
temperature. The temperature sensor is not attached to the reformer, and is thereby
not comparable to the experiments done in [4]. The next section investigates the
needed amount of hydrogen added to the burner.
104
6 Implementation
0 500 1000 1500 2000 2500 3000 3500 4000
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
0 500 1000 1500 2000 2500 3000 3500 4000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
WGS Temperature
Evaporator
Reformer Outlet temperature
(a) Measurement with mass spectrometer from 700s to 2400s
0 500 1000 1500 2000 2500 3000 3500 4000
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
100
D
r
y

g
a
s

[
%
]
Time [s]


CO
CO2
H2
0 500 1000 1500 2000 2500 3000 3500 4000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
WGS Temperature
Evaporator
Reformer Outlet temperature
(b) Measurement with mass spectrometer from 2600s to 4000s
Figure 6.21: Measurements with mass spectrometer with changing methanol flow. The
methanol flow can be seen from figure 6.20
6.4 Simulated run
To determine the needed excess hydrogen for the burner, a series of experiments
was conducted. The temperature of the reformer was logged and compared to the
methanol flow in the reformer. The required temperature of the reformer is 350

C
and is measured in the exit gas of the reformer. Temperatures on the surface of the
reformer and burner was also logged. As the temperature in the evaporator is not
105
6 Implementation
able to be held at a acceptable level, at the given flow rates from the model, the
temperature of the electric heater is increased.
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(a) Temperature compared to hydrogen flow
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(b) Temperature compared to methanol flow
Figure 6.22: First simulated experiment - Temperature of reformer and burner compared
to methanol flow
The temperature of the reformer outlet gas is monitored as the flow of hydrogen
and methanol is changed, and this can be seen in figure 6.22(a) and figure 6.22(b).
Before the methanol flow is started, the reformer is heated to about 400

C with
1 l/min hydrogen. The feed forward is set to a gain of 5 times the airflow, and
by this ratio the temperature of 300

C is reached in about 500 seconds. As the
106
6 Implementation
temperature at the reformer is lower compared to the 350

C goal temperature, the
reference temperature is changed to 400

C and then 450

C.
As the temperature drops at the burner and reformer, the hydrogen flow is changed
to 2 l/min at about 3400s. This increases the temperature of the reformer again
and the flow of methanol is changed to 8 Hz at about 4700s. The temperature of the
reformatted gas is stable at about 360

C and a second experiment was conducted
with these data in mind.
0 500 1000 1500 2000 2500
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(a) Temperature compared to hydrogen flow
0 500 1000 1500 2000 2500
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(b) Temperature compared to methanol flow
Figure 6.23: Second simulation experiment - Temperature of reformer and burner
compared to methanol flow
107
6 Implementation
The second experiment was done with the burner reference temperature of 400

C
and the flow of hydrogen was changed to 1.6 l/min . This can be seen from
figure 6.23(a) and figure 6.23(b). The methanol flow was changed to 8 Hz and
the temperature was monitored. This flow was kept for 800s and the temperature
of the reformatted gas was stable at about 350

C. The methanol flow was changed
to 15 Hz, and the temperature was stable for another 500 seconds.
0 500 1000 1500 2000 2500
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(a) Temperature compared to hydrogen flow
0 500 1000 1500 2000 2500
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
(b) Temperature compared to methanol flow
Figure 6.24: Third simulated experiment - Temperature of reformer and burner compared
to methanol flow
In the third experiment the flow was set to 1.6 l/min and the methanol flow was set
to 15 Hz at about 550s. The temperature of the reformer outlet gas is seen stable at
108
6 Implementation
about 340

C and this is kept for about 1000s. At 1500s the hydrogen flow is changed
to 1.4 l/min and the temperature of the gas is decreasing. At about 2400s the flow
of hydrogen is changed back to 1.6 l/min and it is concluded that the burner flow
at 15Hz methanol flow is about 1.5 l/min .
The 15Hz methanol flow is set after a calculation made in the model, where the fuel
cell is at its maximum capacity. As the temperature is held constant at a hydrogen
flow of 1.5 l/min and the calculated hydrogen usage in the fuel cell is 2 l/min. The
estimated λ
h2
is calculated to 1.75, which means that 175% excess power from the
fuel is required.
6.5 Summary
The feed forward gain on the burner side is estimated to be around 5 times the
hydrogen flow. This gain must be high enough for the hydrogen is catalytic
burned.The evaporator is estimated to be too small for the system with the
parameters from the model. Too much power is lost due to conduction and the
assumption on the output air, being the same as the evaporator, is questionable.
The gas compositions measured does imply that the WGS reaction is temperature
dependent, because at higher temperatures, the CO concentrations is lowered. The
measured CO concentrations is about 3% CO, 19% CO
2
and 80% H
2
with a setpoint
of 400

C at the burner. The change in methanol does not seem to have a large
impact on the composition of gas, though since the measured gas is made with a
mass spectrometer, alternative measurements could be adviceable. The temperature
of the burner seems fairly easy to control, though a specific blower might reduce the
small deviations from the specified setpoint. Experiments were made with the intent
of identifying the needed amount of H
2
for the burner, so the temperature of the
reformer does not fall in temperature at maximum rated methanol flow. This was
estimated to be around 1.5 l/min hydrogen with airflow feed forwarded with a gain
of 5. The needed λ
h2
is estimated to be about 1.75.
109
6 Implementation
110
Conclusion 7
The model is evaluated as being fast and reliable enough for controllers to be tested.
The model has a low simulation time and simulates the system in two modes;
Start up and running mode. From a control point of view, the model describes
the bottlenecks in the system. The model can be used to evaluate a lot of issues
with the system, i.e
˙
fuel needs for the fuel cell and reformer, heating demands for the
vaporation, or the reformatted gas composition at different temperatures. As these
parameters can be changed, the model calculates electric efficiency of the system
and effects of the changes can be viewed quickly.
The nonlinear model has been linearized and acts as the base for the controller
parameters calculation. The feedforward function is part of the controllers for
the reformer and fuel cell stack models. The reformer feedforward transfer
function shows a high convective heat transfer, which may be based on the burner
stoichiometry. The approach of using the feed forward airflow controller is good for
the system, since the feed forward function is used to avoid the flashback from the
burning of the hydrogen. The difference in controller parameters, compared to the
implemented system, is assumed to be caused by the mass flow controllers. The
mass flow controllers are known to cause large overshoots at step changes, and is
highly tuned. Before implementing the parameters from the controlling chapter,
ordinary blowers should be used.
The linear models are all created with a changeable working point. This means that
the equations can be changed quickly according to different operating points. The
model assumes a constant steam to carbon ratio. Changing this ratio will require the
user to recalculate the variables for the hydrogen coverage of the cell. The model
does not apply changes to the hydrogen fraction, though this is assumed valid,
since the change of the hydrogen fraction is small compared to the temperature.The
parameter search scripts are based on the linear model of the system. Changes in
the linear model will also change the output controller parameters from the script.
The responses of the system components are assumed to have reached the reference
temperature when the output is within 2%. All the controller parameters showed
a 1% overshoot and a fast response. The response from the linear model, of the
fuel cell stack, shows that the controllers in theory are faster than the thermal
systems that they are controlling. The model for the fuel cell stack had no problem
changing the reference temperature. A problem was found in the reformer model
as the reformer had trouble reaching the reference temperature. This is explained
with a combination of low λ
h2
of 1.5, and the loss from convection and conduction.
From experiments the hydrogen stoichiometry was found to be 1.75 and this will
111
7 Conclusion
supply more hydrogen as fuel for the burner. This would increase the temperature
and decrease the efficiency based on the extra fuel needed.
The approach for lagging the current density shows usable results. Lagging the
current density showed that a step change of the current density was possible within
30 seconds. The reformer linear model did not reach the temperature specified, but
the characteristics for the reformer temperature showed that a fast change in the
current density was possible. The air for the feed forward controller is also lagged
since it is based on the amount of hydrogen at the reformer. Changing the current
density from a higher current density to a lower current density without a lag, could
force a flashback inside the reformer. This is caused by the feedforward controller
would react too fast and would decrease the air below the allowable limit.
The estimator is designed with an implementation in mind. In the nonlinear
model the estimator uses the hydrogen fraction from the reformer gas composition
regressions. The linear model uses a constant for the hydrogen fraction, though this
may be calculated from a linear regression based on the reformer temperature. The
reformer temperature is controlled and if the reformer temperature is constant, the
hydrogen fraction may also be assumed constant. Both the linear model and the
nonlinear model estimator uses a constant mass conversion factor in the reformer,
with a value at about 1.86, though deviation at changing temperatures and SC ratio
is required to be included. The calculation that involves the hydrogen consumption,
in the fuel cell, can also be lower compared to the experimental amount. The
estimator is inserted into the nonlinear model, and it is seen that the inserted
λ
H2
is the same as the measured hydrogen input for the burner. If this estimator
is implemented in a real system, the hydrogen fraction must be known, and the
conversion factor K
com
has to be tested.
The model assumes no loss in tubes, and this might cause some deviations from
the model to the physical system. The heat transfered from the fuel cell is set to
the same temperature as the heat inserted in the evaporator, though it is not the
case. The temperature of the output air from the fuel cell might also be lower
compared to the fuel cell temperature. If the airflow from the fuel cell is increased,
the temperature of the air might decrease, and this should be investigated. For
the model to apply in this area, experiments has to be conducted where the airflow
compared to the temperature is plotted.
The evaporator has a problem concerning the available heat transfered from the
fuel cell. If the assumption, that the temperature of the outlet is the same as
the evaporated temperature, then the available energy transfered from the fuel cell
should be sufficient. Even though the assumption is correct, the electric heaters,
used in the evaporator, would still be required. In the current system, 200W is used
from the electric power generated at the fuel cell.
112
7 Conclusion
The amount of excess fuel λ
H2
, used in the burner, was estimated to be around
120% in the initial phase. The nonlinear model estimated that his was too low
for the reformer to keep its temperature, and λ
H2
was changed to about 1.5 which
was sufficient. The experiments and the linear model showed that the estimated
λ
H2
of 1.5 was too low, and the experiment worked only with a λ
H2
above 1.75.
This experiment was done on a catalyst that had been used in other experiments as
[16], and the temperature in those experiments was above the limit of the reformer.
This might have caused λ
H2
in the experiment to be higher compared to a newer
heat exchanger. A newer reformer should be installed and the experiment should
be conducted again.
The efficiency of the system is calculated by comparing the input from the fuel to the
electrical output. The electrical usage for the blowers and evaporator is subtracted
from the fuel cell electrical output. The electric heaters, in the evaporator, is
assumed to be about 25% of the electrical output from the fuel cell. A significan
way to increase the overall efficency would be to utilize the excess heat from the
burner, and thereby reducing the need for electrical heaters in the evaporator. The
calculated efficiency from the model is approximately 18%.
The input fuel, based on the estimator, is one of the main factors when talking
about efficiency. As the input fuel for the system is based on the estimator, a
good approximation on the hydrogen usage and the reformation hydrogen fraction
is crucial. Even though the parameters of the estimator is known, the need for excess
fuel might still be necessary, because if the reformer lacks hydrogen, the reformer
might decrease in temperature. If the fuel estimator delivers a higher amount of
fuel, compared to the necessary amount, the input hydrogen for the burner would
increase, and thereby increasing the fan connected to the burner. The system is
currently not designed to utilize the excess burner gas, though if the evaporator could
utilize the excess heat, the need of electric heaters would be lowered. By removing
the electric heaters in the evaporator, would directly inflict on the efficiency, since
the heaters is run on electricity from the fuel cell. This is why efficiency is highly
dependent on the electric heaters in the evaporator, methanol flow estimation, and
temperature of the reformer.
113
7 Conclusion
114
Future work 8
The project presents a good base for control strategies, though some of the work
presented in this report must be investigated in the future.
The evaporator shows a dropping temperature when experiments with high fuel flows
are performed. Investigations on how much the heat is transfered to the evaporator
from the fuel cell exhaust air. If the need for electric heaters in the evaporator is
reduced, the use of more controlling applications is needed.
The flow of methanol enters at the side of the evaporator, where the air from the fuel
cell has the highest temperature. If the entry of the liquid methanol was presented
at the colder side, the methanol vapor would maybe exit the evaporator at a higher
temperature.
Some considerations for the reconstruction of the system may be needed, as the
need for the cooler was lesser or none. The fittings used in the system also presents
large volumes for the flows and this may reduce the amount of heat for fluid passing
through the phases.
The startup mode for the system assumes that the system can heated from burning
pure methanol in the burner and the convection can transfer the heat from the burner
to the fuel cell stack. This has only been modeled, and a physical experiment needs
to be performed. For the methanol can be inserted directly in the burner, the need
of two pumps needs to be implemented. One with methanol and one with water.
The control strategies applied to the system was based on a PI-regulator and
changing the control strategies might reveal better response. Implementing faster
and more reliable blowers for the system might improve the reduce the reformer
temperature gradients. Stable temperatures in the reformer might cause the
reformat gas to be with higher hydrogen concentrations, though this has to be
tested.
Investigations for the estimator in a real system should be applied, since the
estimator is only presented in the model. To validate the estimation of the fuel,
data for the gas composition and the hydrogen usage in the fuel cell stack must be
investigated.
115
8 Future work
116
Project Summary 9
This project investigates the efficiency of a methanol fuelled high temperature PEM
fuel cell system. The system is created to run in two operation modes; startup
mode and running mode. The purpose of the project is also to investigate a
general control approach for the system, using a feedforward approach. The system
contains an evaporator unit, a reformer and burner unit and a fuel cell stack. The
system is modeled with the start up and a running stage. The start up stage uses
pure methanol for the burner and convection is used for heating up the respective
components of the system. The nonlinear model simulates the start up and the
running stage. In the running stage the reformer unit is heated by burning the
excess hydrogen from the fuel cell stack exhaust gas. The system reformer unit uses
the endothermic steam reforming process and is heated directly by the burner. To
obtain a constant stoichiometry for the hydrogen, in the exhaust gas, an estimator
is presented. The estimator shows good theoretical results but has not been tested
on a physical system. The feedforward approach is used in the system to feed the
reactions happening in both the reformer and fuel cell stack. The electric efficiency
for the system is calculated to approximately 18% based on the higher heating value
of methanol.
The nonlinear model is converted to a linear model and is used for testing a PI-
controller. The investigation of a fuel estimator, based on the current density, has
been presented. To obtain a good set of controller parameters, a mathematical
parameter search routine is presented in MatLab ™.
Experimental work is presented to obtain knowledge about the hydrogen stoichiome-
try. The experiments are performed by simulating the fuel cell exhaust using a mass
flow controller. The hydrogen needed, for keeping a constant reformer temperature,
is found by varying the flow of hydrogen in the burner. The hydrogen stoichiometry
is varied ,in the nonlinear model, until the model has the same amount of excess
hydrogen as shown in the experiments.
117
9 Project Summary
118
Bibliography
[1] Søren J. Andreasen, Søren K. Kær, and Mads P. Nielsen. Experimental evaluation of a
pt-based heat exchanger methanol reformer for a htpem fuel cell stack. ECS Transactions,
12(1):571–578, 2008.
[2] Søren Juhl Andreasen and Søren Knudsen Kær. 400 w high temperature pem fuel cell stack
test. ECS Transactions, 5(1):197–207, 2007.
[3] Søren Juhl Andreasen and Søren Knudsen Kær. Modelling and evaluation of heating strategies
for high temperature polymer electrolyte membrane fuel cell stacks. International Journal of
Hydrogen Energy, 33(17):4655 – 4664, 2008.
[4] BASF. Basf catalyst selectra sp - 60, 2008. Found on CD, “Selectra SP 60, Product Bulletin
- Mar 08-2.pdf”.
[5] CRCnetBASE. Handbook of Chemistry & Physics. Taylor and Francis Group, LLC, 89th
edition, 2009. ISBN:142006679X.
[6] Inc. EG&G Services Parsons. Fuel Cel l Handbook. Science Applications International
Corporation, 5th edition, 2000.
[7] Chao Pan et al. Integration of high temperature pem fuel cells with a methanol reformer.
Journal of Power Sources, pages 392–398, 2005.
[8] Ryan O’Hayre et al. Fuel Cel l Fundamentals. John Wiley and Sons, Inc, 2005.
ISBN: 0-471-74148-5.
[9] Anders R. Korsgaard and Mads Pagh Nielsen, December 2005. Found on CD,
PBI_FUEL_CELL_MODEL.EES, Data are fitted to a PEMEAS MEA operated from 160
to 180 [

C].
[10] Anders R. Korsgaard, Rasmus Refshauge, Mads P. Nielsen, Mads Bang, and Søren K. Kær.
Experimental characterization and modeling of commercial polybenzimidazole-based mea
performance. Journal of Power Sources, 162(1):239 – 245, 2006.
[11] James Larminie and Andrew Dicks. Fuel Cel l System Explained. John Wiley and Sons, Inc,
2003. ISBN-13: 978-0-470-84857-9.
[12] Mads Pagh Nielsen. Regressions for boiling temperatures of mixed fuel based on [5] and [14].
Research based on [5] and [14].
[13] K. Ogata. Modern Control Engineering. Prentice Hall, 4. edition, 2001. ISBN: 0-13-043245-8.
[14] R.H. Perry and D.W. (Editors) Green. Perry’s Chemical Engineers’ Handbook. McGraw-Hill,
2007. ISBN:0-07-142294-3.
119
Appendix
[15] P. L. Rasmussen. Investigation of Lifetime Issues in HTPEM Fuel Cel l Based CHP Systems:
Stack Level Degradation. AAU, 1. edition, 2008. HyTec 10th semester Master Thesis.
[16] Søren J. Andreasen, Søren K. Kæ r, and Mads P. Nielsen. Experimental evaluation of a
pt-based heat exchanger methanol reformer for a htpem fuel cell stack. ECS Transactions,
12(1):571–578, 2008.
[17] R. H. Turner Y. A. Cengel. Fundamentals of thermal-fluid science. McGraw Hill, 2 edition,
2005. ISBN: 007-123926-x.
120
Experiments A
A.1 Description of system
Reformer
WGS
Burner
air
Running/starting
mode switch
H2 for
burner
Burner
outlet
Methanol
gas
Evaporator
Pump
Methanol
inlet
Electric air
heater
Cooler
Figure A.1: System overview
Figure A.1 is a general overview of the system. From below, a mixture of
methanol and water is pumped into the evaporator. The exit gas is sent either
into the reformer, or into the burner. This is done by changing the state of the
running/startup switch. The outlet of the reformer can be noticed on the far side
of the reformer, where the reformatted gas is directed into the WGS container.
The MFC is of the type Bürkert 8626 and has a analog input reference at 0-10V.
The installed MFC’s in the system is a 100 l/min, 200 l/min and a 1300 l/min,
where the burner, evaporator and cooler is install respectively.
As shown in figure A.1 the WGS is isolated. Before isolation a thermal image was
taken of the WGS. This can be seen from figure A.2(a) and figure A.2(b).
121
Appendix A
(a) Normal image (b) Thermal image
Figure A.2: WGS container
Temperatures are measured to about 150

C at the inlet.
A thermal image was taken of the reformer and this can be seen from figure A.3(b).
(a) Real picture (b) Thermal picture
(c) Real picture (d) Thermal picture
Figure A.3: Reformer images
As shown in figure A.1 there is added isolation at the ends of the reformer.
122
A Experiments
A.2 Experiments with reformer
A.2.1 Experimental setup
Figure A.4 is a drawing of the Reformer burner seen from above.
T1 T2
T4
T3
MeOH
H
2
MeOH
H
2
out
out in
in
Figure A.4: Placement of temperature sensors “Burner Temperature 1” and “Burner
Temperature 2”
In figure A.4 the placement of the different temperatures sensors can be seen. The
temperature sensors used is a K type sensor, and is attached with a high temperature
resistant glue. “Burner Temperature 1” is shown as “T1”, “Burner Temperature 2” is
“T2”, “Reformer outlet temperature” is “T3” and “Burner gas outlet temperature”
is “T4”.
123
Appendix A
A.2.2 Startup and shutdown of reformer
0 1000 2000 3000 4000 5000 6000
0
5
10
15
20
25
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
0 1000 2000 3000 4000 5000 6000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.5: Startup and shutdown of reformer. Starting up with 1 l/min H
2
and a
airflow of 10 times the H
2
flow. This experiment is without an isolating cover hence the
lower temperatures of the burner
500 600 700 800 900 1000 1100
0
5
10
15
20
25
30
35
40
45
50
55
60
65
70
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
500 600 700 800 900 1000 1100
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.6: Startup from 150[

C]
124
A Experiments
A.2.3 Controlling temperature of reformer
0 100 200 300 400 500 600 700 800 900
0
10
20
30
40
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
0 100 200 300 400 500 600 700 800 900
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.7: Control ling temperature with a feed forward and PI regulator
0 500 1000 1500 2000 2500 3000 3500
0
10
20
30
40
50
60
F
l
o
w

[
l
/
m
i
n
]
Time [s]


Airflow
H
2
0 500 1000 1500 2000 2500 3000 3500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
125
Appendix A
A.2.4 Experiment with a change in methanol flow to deter-
mine the lag
0 500 1000 1500 2000 2500 3000 3500
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500 3000 3500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.8: Phase lag experiment 1
1000 1050 1100 1150 1200 1250
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
1000 1050 1100 1150 1200 1250
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
T
e
m
p
e
r
a
t
u
r
e

[
C
]


WGS Temperature
Reformer Outlet temperature
Cooler outlet temperature
31s
Figure A.9: Influence in temperature at the reformer gas exhaust when the pump
frequency changes from 0 to 10 Hz. Zoomed in at the frequency change from 1000s to
1250s (see figure A.8)
126
A Experiments
0 200 400 600 800 1000
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 200 400 600 800 1000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
T
e
m
p
e
r
a
t
u
r
e
s

[
C
]


Burner Temperature 1
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.10: Phase lag experiment 2
640 650 660 670 680 690 700
0
5
10
15
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
640 650 660 670 680 690 700
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
T
e
m
p
e
r
a
t
u
r
e
s

[
C
]


Burner Temperature 1
Reformer Outlet temperature
Burner gas outlet Temperature
32s
Figure A.11: Influence in temperature at the reformer gas exhaust when the pump
frequency changes from 0 to 1 Hz. Zoomed in at the frequency change from 640s to 700s
(see figure A.10)
127
Appendix A
A.2.5 Determine the lowest amount of hydrogen needed at
maximum pump frequency
First experiment
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]
Time [s]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
WGS Temperature
Evaporator gas outlet
Figure A.12: First experiment
128
A Experiments
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.13: First experiment
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.14: First experiment
129
Appendix A
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
600
625
T
e
m
p
e
r
a
t
u
r
e

[
C
]
Time [s]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
WGS Temperature
Evaporator gas outlet
Figure A.15: Second experiment
130
A Experiments
0 500 1000 1500 2000 2500
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.16: Second experiment
0 500 1000 1500 2000 2500
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.17: Second experiment
131
Appendix A
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
600
625
T
e
m
p
e
r
a
t
u
r
e

[
C
]
Time [s]


Burner Temperature 1
Burner Temperature 2
Reformer Outlet temperature
Burner gas outlet Temperature
WGS Temperature
Evaporator gas outlet
Figure A.18: Third experiment
132
A Experiments
0 500 1000 1500 2000 2500
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
4.2
4.4
F
l
o
w

[
l
/
m
i
n
]
Time [s]


H
2
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.19: Third experiment
0 500 1000 1500 2000 2500
0
2
4
6
8
10
12
14
16
18
20
F
u
e
l

p
u
m
p

f
r
e
q
u
e
n
c
y

[
H
z
]
Time [s]


Methanol
0 500 1000 1500 2000 2500
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
400
425
450
475
500
525
550
575
T
e
m
p
e
r
a
t
u
r
e

[
C
]


Burner Temperature 1
Burner Temperature 2
Reformer surface temperature
Reformer Outlet temperature
Burner gas outlet Temperature
Figure A.20: Third experiment
A.3 Experiment with cooler
This experiment shows the characteristics of the heatexchange which is used as
cooler in the overall system. The experimental setup can be seen in figure A.21
The purpose of the heatexchanger is to be able to cool the H
2
at 300
o
C to about
180
o
C. This is done by a counterflow of air at about 20
o
C with a flow from 0 to
400 l/min. This can be seen in figure A.22.
133
Appendix A
Figure A.21: The setup of the cooler test
T
gas inlet
T
gas outlet
T
air outlet
P
air inlet
Heat exchanger
60 l/min
0

4
0
0
l
/
m
i
n
M
F
C
MFC
Figure A.22: Drawing of heatexchanger
The size of the cooler is highly over dimensioned, though the main goal of the cooler
is to ensure the safety of the fuel cell, so a temperature above the fuel cell can be
avoided. A blower can be installed by comparing the pressure at a given flow. This
can be seen in figure A.23
The temperature of the heat exchanger is fully able to keep a stable temperature at
180 [

C] at about 80 [l/min], though a more suitable cooler should be found because
of the high conduction of this heat exchanger.
134
A Experiments
0 50 100 150 200 250 300 350 400 450
0
10
20
30
40
50
60
70
Flow [l/min]
P
r
e
s
s
u
r
e

[
k
P
a
]



y = 0.00027*x
2
+ 0.032*x − 0.29
data 1
quadratic
Figure A.23: Pressure - Flow Characteristic
135
Appendix A
136
Description of model B
B.1 Constants
The constants of the ulinear Simulink Model has been presented here.
Cells = 65
Cell
area
= 45.16 [cm
2
]
Electric
power
= 1000 [W]
U
rev
= 1.2 [V ]
u
ocv
= 0.95 [V ]
Lambda
air
= 2.5 [−]
T
amb
= 293.15 [K]
T
limit
= 433.15 [K]
T
start
= 293.15 [K]
p
amb
= 1.013 [bar]
SC
ratio
= 1.5 [−]
D
hyd
= 0.001
k
channel
= 0.003343
m
s
= 2.8
c
s
= 970
_
J
kg·K
_
R = 8.314
_
kJ
kmol·K
_
F = 96485
alfa
anod
= 0.5 [−]
k
ha
1
= 2.3
k
ha
2
= 2.2571e −2
k
ha
3
= −1.4286e −5
k
ny
1
= −1 ∗ (0.000004079)
k
ny
2
= 3.9763e −8
k
ny
3
= 9.0515e −11
Desorption
b
fc
= 8.817e12
b
fh
= 2.038e6
Electro Oxidation
k
ec
= 3.267e18
k
eh
= 25607
Adsorption
k
fc
= 94.08
k
fh
= 2.743e24
E
bfc
= 127513
E
bfh
= 47904
E
kec
= 196829
E
keh
= 34777
E
kfc
= 19045
E
kfh
= 1.899e5
k
cond
= 0.03
A
1
= 0.0035
A
2
= 0.0027
A
3
= 0.0099
A
4
= 0.0036
A
5
= 0.0134
A
stack
= 0.023
x
1
= 0.02
x
2
= 0.03
k
reactor
= 0.000043
A
reactor,total
= 0.04467
H
wgs
= −41.1
H
sr
= 49.4
m
reformer
= 1.5
c
reformer
= 0.9
m
heater
= 0.5
cp
alu
= 0.9458
a
1
= −0.000166667
b
1
= 0.228858333
a
2
= 4.641e −2
b
2
= 6.143e3
a
3
= 0.000820312455
b
3
= 0.430604326
a
30
= 4.3e −1
b
30
= 2.72e −2
k1
reg
= 40.08912844923
k2
reg
= 2.5706646294883
k3
reg
= 18.357126208929
k4
reg
= 4.2845217013023
137
A
p
p
e
n
d
i
x
B
B
.
2
S
i
m
u
l
i
n
k
m
o
d
e
l
When the temperature rises above the 453 K
the plant changes into working mode and
the production of electricity starts
startup pump
frequency
5
Transport
Delay
Temp
stack
453
453
Startup
0.0000001
Stack temperature Controller
Current density
Stack temp Reference
Stack temperature
Airflow [l/min]
Stack Airflow
Stack
Temperature
Reformer temperature controller
Reformer temperature
Reformer temp Reference
H2 in exhaust mol /s
Airflow [l/min]
Reformer Airflow
Reformer
Temperature
Reformer
Temp Reference
623
Plant
Current Density
Airflow Stack
Airflow
Pump frequency
Gas Compositions
Electric Power produced
Flow kmol/s
Temperature of stack
T_reformer
H2_exhaust mol /s
H2 l/min
Mode Control logics
Stack temperature Control Variable
H2 in %
65.1
MeOH_flow
Global var
Mode
Gain 2
1e2
1e2
1e6
Frequence
Estimator
A/cm2 -> Hz
Current Density
H2frac
Frequency
Electric power
produced
by Fuel Cell
Efficiency calculation
Efficiency
Efficiency
Current Density
to Workspace
current _density
Current Density
Controller of system mode 3
Input Startup mode
Input Running mode
Output
Controller of system mode 2
Input Startup mode
Input Running mode
Output
Controller of system mode 1
Input Startup mode
Input Running mode
Output
Controller of system mode
Input Startup mode
Input Running mode
Output
CO in PPM
4.667 e+004
CO in %
4.667
<H2>
<H2>
<H2>
<CO>
F
i
g
u
r
e
B
.
1
:
F
u
e
l
C
e
l
l
M
o
d
e
l
s
y
s
t
e
m
1
3
8
B Description of model
The main part of the model is presented in figure B.1. It consists of controllers and
a plant. The input is the current density and is varying over time. This can be seen
in figure B.2(a).
0 5 10 15
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Time [s]
C
u
r
r
e
n
t
D
e
n
s
i
t
y
[
A
/
c
m
2
]
(a) Current Density
0 5 10 15
x 10
4
0
200
400
600
800
1000
1200
Time [s]
P
o
w
e
r
[
W
]
(b) Power generated by fuel cell
Figure B.2: Current density and Power generated by fuel cel l
0 5 10 15
x 10
4
0
50
100
150
200
250
Time [s]
A
i
r

o
w
[
l
/
m
i
n
]
(a) Stack airflow
0 5 10 15
x 10
4
0
50
100
150
200
250
300
Time [s]
A
i
r

o
w
[
l
/
m
i
n
]
(b) Reformer airflow
Figure B.3: Airflow for stack and reformer respectively
The current density is input for the plant, temperature controller and the estimator.
The current density is delayed by 30 seconds for the inputs for the fuel cell and
controller because of the delay there is between the flow change in the pump and
the gas reaches the fuel cell. The estimated power output from the cell can be seen
in figure B.2(b)
The airflow created from the input from the controllers can be seen in figure B.3(a)
and figure B.3(b).
The temperature of the reformer and fuel cell stack can be seen in figure B.4(a) and
figure B.4(b). The frequency of the fuel pump can be seen in section figure B.5(a)
and the electric efficiency of the system can be seen in figure B.5(b).
139
Appendix B
0 5 10 15
x 10
4
250
300
350
400
450
500
550
600
650
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[
K
]
(a) Reformer temperature
0 5 10 15
x 10
4
280
300
320
340
360
380
400
420
440
460
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[
K
]
(b) Stack temperature
Figure B.4: Temperature of the control led parts of the system
0 5 10 15
x 10
4
2
4
6
8
10
12
14
16
18
x
y
(a) Frequency of pump
0 5 10 15
x 10
4
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
x
y
(b) Electric efficiency
Figure B.5: Electric efficiency and fuel pump frequency
The plant in the model consists of a reformer/burner, evaporator and fuel cell as
shown in figure B.6. The reformer is explained in more detail in B.3.
140
B
D
e
s
c
r
i
p
t
i
o
n
o
f
m
o
d
e
l
H2 l /min
7
H2_exhaust mol /s
6
T_reformer
5
Temperature of stack
4
Flow kmol /s
3
Electric Power
produced
2
Gas Compositions
1
Water Gas Shift
Reformated Gas inReformated Gas out
Reformer model
Airflow [l/min]
Flow [mol/s]
Molar flow [Kmol/s]
Reformated gas
Reformer temperature [K]
methanol _flow_kmol
Gain
1000
Fuel Cell Stack Model
Current density
Reformate gas
Airflow L /min
Electric Power
Reformate Gas
H2_exhaust [l/min]
H2_exhaust [mol/s]
T_stack
Exit Heater Temperature [K]
Evaporator
model
Airflow L /min
T_air_in [K]
Pump Hz
Exit Heater Temperature [K]
Fluid flow out kmol /s
Controller of system mode
Input Startup mode
Input Running mode
Output
Condenser -Cooler Model
Reformated Gas in Reformated Gas out
Pump frequency
4
Airflow
3
Airflow Stack
2
Current Density
1
kmol/s
kmol/s
kmol/s
mol/s
F
i
g
u
r
e
B
.
6
:
F
u
e
l
C
e
l
l
M
o
d
e
l
1
4
1
A
p
p
e
n
d
i
x
B
B
.
3
R
e
f
o
r
m
e
r
m
o
d
e
l
Regressions from EES that
calculates the molar fractions
Limit : T=[350 ,873 .15] K
SC=[1,4]
Calculate the flows
on molar basis
Reformer
temperature [K]
2
Reformated gas
1
x_H2O
f(u)
x_H2
f(u)
x_CO2
f(u)
x_CO
f(u)
x_CH3OH
f(u)
molar fractions
To Workspace
kmoldifference
Temperature calculation
Flow [mol/s]
Airflow
Molar Flow kmol /s
T_reformer
Goto
reformer _temp
Gasdifference
Dry molar fraction
Dry Gas Component : H2
u[4]/(1-(u[1]+u[5]))
Dry Gas Component : CO2
u[3]/(1-(u[1]+u[5]))
Dry Gas Component : CO
u[2]/(1-(u[1]+u[5]))
Divide
Display
-1.202 e-005
0. 04667
0.1859
0.651
0.1164
Controller of system mode
Input Startup mode
Input Running mode
Output
SC_ratio
0
Conservation of mass
molar fractions
kmol/s
n_mix
Molar flow
[Kmol /s]
3
Flow [mol /s]
2
Airflow [l /min ]
1
n_mix
n_mix
n_mix
CH3OH
CO
CO2
H2
H2O
Molar_fractions
Molar_fractions
Gas_CO
Gas_CO2
Gas_H2
Gas Components
T_reformer
T_reformer
n_mix
F
i
g
u
r
e
B
.
7
:
R
e
f
o
r
m
e
r
M
o
d
e
l
1
4
2
B Description of model
The reformer model consists of two parts. The first part calculates the reformatted
gas fractions, and the second part calculates the temperature of the reformer. As
the molar flow of the methanol and the reformatted gas is not the same, the model
calculates the reformatted gas by applying the rules of conservation of mass. This
can be seen in more detail in figure B.10
B.3.1 Calculation of molar fractions
Regressions are calculated by EES and can be seen in figure B.8. The regressions
depend on the temperature and the SC ratio of the fuel. As the SC ratio is constant
it can be displayed as a function of temperature.
400 450 500 550 600 650 700 750 800 850
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
F
r
a
c
t
i
o
n

[

]
Temperature [K]


MeOH
CO
CO2
H2
H2O
Figure B.8: Gas fractions at a SC ratio of 1.5
The calculation of the gas fractions can be seen in Gas_fractions_plot.m on the
CD.
The model calculates both the molar fractions and the dry molar fractions, and this
can be seen in figure B.9(a) and figure B.9(b).
143
Appendix B
0 5 10 15
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1


Time [s]
M
o
l
a
r
f
r
a
c
t
i
o
n
CH3OH
CO
CO2
H2
H2O
(a) Molar fractions
0 5 10 15
x 10
4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1


Time [s]
M
o
l
a
r
f
r
a
c
t
i
o
n
CO
CO2
H2
(b) Molar fractions of the dry gas
Figure B.9: Molar fractions from model
B.3.2 Calculation of reformer temperature
Contributions
• Heat is added by burning hydrogen
• WGS heat contributions are neglected (CO + H2O -> CO2 + H2)
Losses
• Steam-reforming (CH3OH + H2O -> H2 + CO + CO2)
• Heat loss from conduction
The power balance is calculated from the total amount of power that is in the
reformer.
Temperature change based on
˙
Q
T =
1
m· c
_
˙
Qdt (B.1)
Conduction
˙
Q = k · A · (T
surface
−T
amb
) (B.2)
Convection
˙
Q = ˙ n(H
out
−H
in
) (B.3)
144
B Description of model
Assumptions:
The weight of the reformer is assumed to be about 1.5kg aluminum and the specific
heat transfer is based on this. It is assumed that the temperature throughout the
reformer is the same. The temperature at startup is set to 180 [

C] to avoid the fuel
cell will take any damage. The molar fractions is only dependent on the reformer
temperature because of the SC-ratio is constant.
B.3.3 Calculation of the molar flow out of reformer
Methanol fraction
M_MEOH
M_CO
M_CO2
M_H2
M_H2O
n_mix
1
1/(1+SC_ratio )*u(1)
Fcn
f(u)
18.02
2.016
44.01
32.04
28.01
Calculation of H 2 Coverage
Sfunction _fzero_massfunction
kmol /s
2
molar fractions
1
methanol fraction
methanol fraction
water fraction
Figure B.10: Calculation of molar flow before and after reformation
Because the reformation reaction processes methanol, the molar flow is different.
The rate of which the output flow is calculated by applying the rules of conservation
of mass. This equation is the central equation in the Sfunction_fzero_massfunction
block seen in figure B.11.
˙ n
MeOH
· M
MeOH
+ ˙ n
H
2
O
· M
H
2
O
= x
MeOH
· M
Meoh
· ˙ n
gas
+x
CO
· M
CO
· ˙ n
gas
+x
CO
2
· M
CO
2
· ˙ n
gas
+
x
H
2
· M
H
2
· ˙ n
gas
+ x
H
2
O
· M
H
2
O
· ˙ n
gas
(B.4)
The input for (B.4) is the molar flows of methanol and water. This is equal to the
sum of all molar flows of the reformatted gas. The plot shown in figure B.11 is a
calculation from the model that shows the ratio of the output flow compared to the
input flow. This ratio is used in the estimator.
145
Appendix B
0 5 10 15
x 10
4
1.72
1.74
1.76
1.78
1.8
1.82
1.84
1.86
1.88
Time [s]
R
a
t
i
o
Figure B.11: Reformer flow rate compared before and after reformation
B.3.4 Reformer temperature
The model shown in figure B.13 describes the different heating contributions to
the reformer. It involves four different heating models; Burning hydrogen, steam-
reforming, convection and conduction.
Burning gas in the reformer is shown in figure B.14. It depends on the mode of the
system, which selects if the gas is methanol or hydrogen. The “heat of combustion”
(kJ/mol) is selected for both gases and is multiplied with the flow (mol/s).
The convection in the reformer is shown in figure B.15. The convection is calculated
by the difference in enthalpy multiplied with the molar flow of the air. The enthalpy
is calculated from the air at ambient temperature and from the temperature of the
reformer.
The steam reforming process is calculated by the enthalpy of the reaction multiplied
with the molar flow (mol/s)
CH
3
OH + H2O ↔CO
2
+ 3H
2
_
49.4
kJ
mol
_
(B.5)
The conduction is calculated by a heat transfer coefficient multiplied with the total
areal of the reformer. This heat transfer coefficient was calculated from the fact
that there is a 1cm rockwool, though later experiments show that the coefficient was
about 6.5 times higher. All this is multiplied with the temperature difference from
ambient temperature to the reformer temperature, and this gives the heat transfer
from convection. This model is based on the fact that there is no forced convection,
146
B Description of model
though the reformer was placed in a very ventilated room, so the coefficient needs
to be verified again when the system is taken in use. The model also assumes that
the reformer is totally isolated, though the area of the fittings and tubes are not, so
the estimated conduction is expected to be lower than the real conduction.
147
A
p
p
e
n
d
i
x
B
Conduction losses to surroundings
Assumed weight of 1.5kg
Assumed C value of aluminum
The reformer has the ambient temperature at startup Q_dot _out -Q_dot _in
(SR-proces+conduction +Convection )-(Burner heat )
T_reformer
1
P_RF_Cond
P_RF_SR
P_RF_Conv
P_RF_Burn
T_reformer
1/(1+SC_ratio )*u(1)
1000
1
1000
1
1000
1
1000
1
k_reactor *A_reactor _total *6.5
0.01
1
m_reformer *c_reformer
Transfer Fcn 1
H_sr*1000
1
Reformer contributions [Watt]
1
s x
o
[P_RF_Cond ]
[P_RF_SR]
[P_RF_Conv ]
[P_RF_Burn]
[P_RF_Cond ]
[P_RF_SR]
[P_RF_Conv ]
[P_RF_Burn ]
Convection
Reformer Temp
Airflow L /min
Q_dot_Conv [kJ/s]
T_amb
T_amb
Burner Model
Flow [mol/s] Q_dot_Burn [kW]
Molar Flow
kmol /s
3
Airflow
2
Flow [mol /s]
1
T_reformer
T_reformer
T_reformer
Ref _cond
Ref _cond
Ambient
Burn Heat
Burn Heat
Ref _sr
Conv
Conv
Conv
F
i
g
u
r
e
B
.
1
2
:
R
e
f
o
r
m
e
r
t
e
m
p
e
r
a
t
u
r
e
m
o
d
e
l
1
4
8
B Description of model
0 5 10 15
x 10
4
0
500
1000
1500
2000
2500
3000
3500
4000
4500


Time [s]
P
o
w
e
r
[
w
a
t
t
]
˙
Q
burn
˙
Q
conv
˙
Q
SR
˙
Q
cond
Figure B.13: Different heating contributions to reformer temperature [watt]
The heat of combustion is
from Handbook of Physics and chemistry
Q_dot _Burn [kW]
1
Product 1
Heat of combustion H 2
kJ/mol
242
Heat of combustion CH 3OH
kJ/mol
726 .1-44 .204
Controller of system mode
Input Startup mode
Input Running mode
Output
Flow [mol /s]
1
Figure B.14: Burning gas in reformer
m^3/s
Q_dot _Conv [kJ/s]
1
1
1000 *60
5
1
Product 1
Product
T_amb
Air density :
Range . T= 273 -873 K
Output kmol /m^3
f(u)
Air Enthalpy :
Range .T= 273 -873 K
Output kJ /kmol
f(u)
Air Enthalpy :
Range . T= 273 -873 K
Output kJ /kmol
f(u)
Airflow L /min
2
Reformer Temp
1
Figure B.15: Reformer temperature calculation - Convection
149
A
p
p
e
n
d
i
x
B
B
.
4
F
u
e
l
C
e
l
l
When the temperature rises above the 453 K
the plant changes into working mode and
the production of electricity starts
startup pump
frequency
5
Transport
Delay
Temp
stack
453
453
Startup
0.0000001
Stack temperature Controller
Current density
Stack temp Reference
Stack temperature
Airflow [l/min]
Stack Airflow
Stack
Temperature
Reformer temperature controller
Reformer temperature
Reformer temp Reference
H2 in exhaust mol /s
Airflow [l/min]
Reformer Airflow
Reformer
Temperature
Reformer
Temp Reference
623
Plant
Current Density
Airflow Stack
Airflow
Pump frequency
Gas Compositions
Electric Power produced
Flow kmol/s
Temperature of stack
T_reformer
H2_exhaust mol /s
H2 l/min
Mode Control logics
Stack temperature Control Variable
H2 in %
65.1
MeOH_flow
Global var
Mode
Gain 2
1e2
1e2
1e6
Frequence
Estimator
A/cm2 -> Hz
Current Density
H2frac
Frequency
Electric power
produced
by Fuel Cell
Efficiency calculation
Efficiency
Efficiency
Current Density
to Workspace
current _density
Current Density
Controller of system mode 3
Input Startup mode
Input Running mode
Output
Controller of system mode 2
Input Startup mode
Input Running mode
Output
Controller of system mode 1
Input Startup mode
Input Running mode
Output
Controller of system mode
Input Startup mode
Input Running mode
Output
CO in PPM
4.667 e+004
CO in %
4.667
<H2>
<H2>
<H2>
<CO>
F
i
g
u
r
e
B
.
1
6
:
F
u
e
l
C
e
l
l
S
t
a
c
k
M
o
d
e
l
1
5
0
B Description of model
There is 3 major parts of the fuel cell stack as shown in figure B.16.
• Calculation of the stack temperature
• Calculation of the stack voltage
• Calculation of the stack hydrogen usage
0 5 10 15
x 10
4
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Time [s]
H
2

o
w
[
l
/
m
i
n
]
Figure B.17: Hydrogen in exhaust gas [l/min]
The hydrogen in the exhaust gas can be seen from figure B.17 and is calculated in
figure B.20
Hydrogen usage in cell
The calculation on the hydrogen usage is based on
H2
usage
=
(cells ×cell area) · i
2F
(B.6)
rate of H 2 in exhaust gas
mol /s
1
stochiometri
Product
Hydrogen used in Cell
(Cells *Cell _area *u(1))/(2*F)
1000 *u(1)
H2 in gas vs h 2 used
to workspace
H2_exhaust
Divide
Controller of system mode
Input Startup mode
Input Running mode
Output
Constant
0
Current density
3
Molar Flow [kmol /s]
2
H2_frac
1
Figure B.18: Fuel Cel l Stack - Calculation of Hydrogen usage
151
Appendix B
The output of figure B.18 is the rate of H
2
in exhaust gas. The flow of syngas from
the reformer is multiplied with the fraction of hydrogen, and the fuel cell usage of
hydrogen is subtracted. The about of hydrogen in the syngas compared to the usage
in the fuel cell is shown in figure B.19. This constant is and should be equal to the
stoichiometry chosen in Appendix B.1.
0 5 10 15
x 10
4
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Time [s]
R
a
t
i
o
Figure B.19: Ratio of hydrogen used vs hydrogen present in fuel cel l
To compare the molar flow of the gas in an experiment, the hydrogen exhaust gas is
calculated by figure B.20.The hydrogen in the exhaust gas is divided by the density
of the gas. The density of the gas is calculated from the temperature of the gas at
atmospheric pressure by an regression made in EES.
kmol /l
C
kmol /m3
FC exhaust H2 [l /min ]
1
minute 1
60
m3 -> l 1
1000
Product 1
Divide 4
Divide 3
Divide
Density of H 2
based on temperature
[150 ,200 ]C
kpa=1
f(u)
Constant 1
1000
Constant
273
Add
Stack temperature
2
H2_exhaust [mol /s]
1
kmol/s
Figure B.20: Fuel Cel l Stack - Calculation of hydrogen in exhaust gas [l/min]
152
B Description of model
Current model
The total electric power that can be drawn from the fuel cell is calculated by (B.7)
P = U · I = (cell voltage ×cells) · (cell area ×current density) (B.7)
This equation is displayed in figure B.21
Electric Power
1
Goto2
P_electric
Cell _area
Cells
Cell Voltage
2
Current Density
1
Figure B.21: Fuel Cel l Stack - Current Model
153
A
p
p
e
n
d
i
x
B
B
.
4
.
1
S
t
a
c
k
t
e
m
p
e
r
a
t
u
r
e
Assumption :
Losses from the fuel are , Forced Convection and Conduction
The FC generates heat from the losses .
T_stack
1
1
m_s*cp
To Workspace
T_stack
1
s x
o
Heating
Heat loss from conduction
T_stack
T_Ambient
Q_dot_cond
Heat loss from convection
Stack Temparature
Inlet temp
Airflow
Q_dot_conv
Heat generation in FC
i
U_cell
Q_dot_FC
Heat generated
P_heat _gen
[FC_cond ]
[FC_heat ]
[FC_conv]
[FC_heat ]
[FC_conv]
[FC_cond ]
Convection from stack
to Workspace
P_FC_Conv
T_start
Conduction in FC stack to Workspace
P_FC_Cond
Cell _voltage
5
q_dot _air
4
T_inlet
3
T_ambient
2
Current _Density
1
FC_heat
FC_heat
FC_Cond
FC_Cond
FC_conv
F
i
g
u
r
e
B
.
2
2
:
F
u
e
l
C
e
l
l
S
t
a
c
k
-
T
e
m
p
e
r
a
t
u
r
e
1
5
4
B Description of model
0 5 10 15
x 10
4
−600
−400
−200
0
200
400
600
800
1000


Time [s]
P
o
w
e
r
[
W
a
t
t
]
˙
Q
heat
˙
Q
conv
˙
Q
cond
Figure B.23: Heating contributions for the fuel cel l stack
There are 3 parts of the temperature calculation of the fuel cell stack. Heat generated
in fuel cell, convection and conduction. The tree calculated contributions can be
seen in figure B.23. The convection in this figure is a lot higher compared to the
conduction, and this is because of the high airflow in the fuel cell, see figure B.3(a).
The total wattage from the heat generated minus convection and conduction is
multiplied with the mass and the specific heat transfer coefficient. This gives a
temperature difference pr second and this is calculated from the starting temperature
T_start.
Conduction : Losses from the area of the FC
Q_dot _cond
1
Stack conduction x 2
k_cond *2*A_stack
x_2
Outlet conduction x 2
k_cond *(2*A_4+2*A_5)
x_2
Outlet conduction x 1
k_cond *A_1
x_1
Inlet conduction x 2
k_cond*(2*A_3)
x_2
Inlet conduction x 1
k_cond*(A_1+2*A_2)
x_1
T_Ambient
2
T_stack 1
Figure B.24: Fuel Cel l Stack Model - Temperature - Conduction
155
Appendix B
The conduction of the stack is shown in figure B.24 and is based on [3]. The different
areas of the fuel cell is multiplied with the difference in temperature from the ambient
and the stack temperature.
omregning
m^3/s kmol /s
kJ/kmol
kJ/s
J/s
Q_dot _conv
1
1
1000 *60 1000
1
Product 1
Product
Air density :
Range . T= 273 -873 K
Output kmol /m3
f(u)
Air Enthalpy :
Range . T= 273 -873 K
Output kJ /kmol 2
f(u)
Air Enthalpy :
Range . T= 273 -873 K
Output kJ /kmol 1
f(u)
Add
Airflow
3
Inlet temp
2
Stack Temparature
1
Figure B.25: Fuel Cel l Stack - Temperature - Convection
Convection in the stack is calculated as shown in figure B.25. The difference in
enthalpy is calculated from the stack temperature and the inlet air temperature.
This is multiplied with the airflow in kmol/s and this gives a rate of heat (J/s).
I
loss total loss
p=u*i
Q_dot _FC
1
Cells
1
Cell _area
1
U_rev
U_cell
2
i
1
Figure B.26: Fuel Cel l Stack - Temperature - Heat generation in fuel cel l
The heat generated in the fuel cell is calculated as shown in figure B.26. The total
loss is calculated and multiplied with the total current drawn from the stack. This
current is calculated by multiplying the cell area with the current density. The total
voltage loss in the fuel cell is calculated by taking the reversible voltage u_rev minus
the actual cell voltage. This voltage loss is multiplied with the number of cells.
156
B
D
e
s
c
r
i
p
t
i
o
n
o
f
m
o
d
e
l
B
.
4
.
2
S
t
a
c
k
v
o
l
t
a
g
e
ohm /cm^2
A/cm^2
V
Cell Voltage
1
loss cathode
losscathode
loss anode
lossanode 1
Voltages
ThetaH 2
R_ohmic
b_1+a_1*u(1)
Product
[u_anode ]
[u_cath]
[u_ohm ]
[u_ocv]
Fuel Cell Voltage
[u_anode ]
[u_cath]
[u_ohm]
[u_ocv]
Coverage equation
p
yH 2
yCO
i
Temperature of stack
thetah2
Controller of system mode
Input Startup mode
Input Running mode
Output
Constant 1
0
Constant
u_ocv
Cathodic loss
i
T stack
Loss cathode
Anode loss
T stack
i
thetah2
Anode loss
Molar Fraction H 2
5
Molar Fraction CO
4
Pressure
3
Temperature of stack
2
Current Density
1
Ohmic Loss
Cath loss
Anode loss
Anode loss
F
i
g
u
r
e
B
.
2
7
:
F
u
e
l
C
e
l
l
S
t
a
c
k
-
V
o
l
t
a
g
e
1
5
7
Appendix B
The stack voltage in the fuel cell is dependent on the “open circuit voltage”, “ohmic
losses”, cathode losses and anode losses. The open circuit voltage is constant and
calculated from [6]. The different losses and the open circuit voltage can be seen in
figure B.28(a). The fuel cell voltage can be seen in figure B.28(b)
0 5 10 15
x 10
4
0
0.5
1
1.5


Time [s]
V
o
l
t
a
g
e
[
V
]
V
ocv
V
ohm
V
cath
V
anode
(a) Voltage losses
0 5 10 15
x 10
4
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time [s]
V
o
l
t
a
g
e
[
V
]
(b) Fuel cell voltage
Figure B.28: Fuel Cel l stack voltages
Coverage of the Cell
In the calculation of the anode voltage loss the coverage of the cell is needed. The
equations for the coverage of the cell is (B.8) and (B.9) respectively. These are based
on an equilibrium and this results in both equations are equal to zero.
ρ

H
2
dt
= k
fh
· x
H
2
· p · (1 −Θ
H
2
−Θ
CO
)
n
−b
fh
· k
fh
· Θ
n
H
2
−i = 0 (B.8)
ρ

CO
dt
= k
fc
· x
CO
· p(1 −Θ
H
2
−Θ
CO
) −b
fc
· k
fc
· Θ
CO

i · k
ec
· Θ
CO
2 · k
eh
· Θ
H
2
= 0 (B.9)
Since both (B.8) and (B.9) are equal to zero and assuming that the H
2
-coverage is
a second order reaction where n equals 2, it is possible to calculate a value of the
H
2
-coverage that satisfies the equations. The pressure p is represented and molar
fraction of the respective gasses is denoted with x
k
. The coefficients (k
ij
and b
ij
), in
both the equations, are based on the temperature of the cell. These coefficients are
modeled with Arrhenius expressions, see (B.10)
k
ij
= k
ij0
· e
(
−ActivationEnergy
R·T
s
)
(B.10)
The constant k
ij0
used in figure B.10 is equal to k
ij
when the temperature is infinite
and this constant called the pre-exponential factor. R
u
is the gas constant and T
s
is the stack temperature.
158
B Description of model
The calculation of the hydrogen coverage is based on solving (B.9) with respect to
Θ
CO
and inserting the expression in (B.8) results in an implicit equation thats equal
to zero. Solving (B.9) with respect to Θ
CO
can be seen from (B.11)
Θ
CO
=
k
fc
· x
CO
· p (1 −Θ
H
2
)
k
fc
· x
CO
· p + b
fc
· k
fc
+
i·k
ec
2·k
eh
·Θ
H
2
(B.11)
Inserting (B.11) in (B.8) can be seen from (B.12)
k
eh
· x
H
2
· p ·
_
_
1 −Θ
H
2

k
fc
· x
CO
· p (1 −Θ
H
2
)
k
fc
· x
CO
· p + b
fc
· k
fc
+
i·k
ec
2·k
eh
·Θ
H
2
_
_
2
−b
fh
· k
fh
· Θ
2
H
2
−i = 0
(B.12)
(B.12) can be solved numerically in MATLAB using the "fzero"-function and a script
for the model has been written as an Sfunction. The inputs for the fzero function is
shown in figure B.29 and the
thetah 2
1
k_fh
f(u)
k_fc
f(u)
k_eh
f(u)
k_ec
f(u)
b_fh
f(u)
b_fc
f(u)
Controller of system mode
Input Startup mode
Input Running mode
Output Constant
420
Calculation of H 2 Coverage
Sfunction _fzero
Temperature of stack
5
i
4
x_CO
3
x_H2
2
p
1
Figure B.29: Fuel Cel l Stack - Voltage - Coverage Equation
Anode loss
The reactions that take place at the anode when CO is present
159
Appendix B
CO + M
k
fc
⇐=====⇒
b
fc
θ
CO
k
fc
(CO −M) (B.13)
H
2
+ 2M
k
fh
⇐=====⇒
b
fh
θ
CO
k
fh
2(M −H) (B.14)
(M −H)
k
eh
−−−→ H
+
+ e

+ M (B.15)
H
2
O + (M −CO)
k
ec
−−−→ M + CO
2
+ 2H
+
+ 2e

(B.16)
The double arrows used in (B.13) and (B.14) where the top is the reaction rate to
the right. Reaction (B.13) and (B.14) defines the absorption process of CO and H2,
where reaction (B.15) and (B.16) describes the electro oxidation of CO and H
2
.
Pre-exponential factors
CO desorption rate, b
fc0
8.817e12 bar
H2 desorption rate, b
fh0
2.038e6 bar
CO electrooxidation rate, k
ec0
3.267e18 A/cm
2
H2 electroexidation rate, k
eh0
25607 A/cm
2
CO adsorption rate, k
fc0
94.08 A/(cm
2
· bar)
H2 adsorption rate, k
fh0
2.743e24 A/(cm
2
· bar)
Activation energy values
CO desorption rate, E
bfc
127513 kJ/kmol
H2 desorption rate, E
bfh
47904 kJ/kmol
CO electrooxidation rate, E
kec
196829 kJ/kmol
H2 electrooxidation rate, E
keh
34777 kJ/kmol
CO adsorption rate, E
kfc
19045 kJ/kmol
H2 adsorption rate, E
kfh
1899e5 kJ/kmol
Table B.1: Values used in Anode loss equation
The anode loss is calculated in (B.17) where the anode overpotential is related to
the current density and the surface coverage of.
V
anode
(T
s
, i) =
R · T
s
α
a
· F
· sinh
−1
_
i
2 · k
eh
(T
s
) · Θ
H
2
(T
s
, i)
_
(B.17)
This is modeled as shown in figure B.30.
θ
H2
is calculated from the coverage equations, see figure B.29.
160
B Description of model
Anode loss
1
k_eh
k_eh0*exp(-1*E_keh/(R*u(1)))
asinh
R
alfa _anod *F
Constant
2
thetah 2
3
i
2
T stack
1
Anode loss
Figure B.30: Fuel Cel l Stack - Voltage - Anode Loss
Cathode loss
Cathode constants
Ohmic loss constant, a
1
-0.000166667 [-]
Ohmic loss constant, b
1
0.228858333 [-]
Exchange current density constant, a
2
4.641e-2 [-]
Exchange current density constant, b
2
6.143e3 [-]
Empirical constant, a
3
0.000820312455 [-]
Empirical constant, b
3
0.430604326 [-]
Table B.2: Values used in Cathode loss equation
The cathode loss can be seen in figure B.31. The calculation is based on (B.18) and
the empirical value can be seen in figure B.32. This equation is based on the work
done in [15].
V
cathode
(T
s
, i) =
R · T
s
4 · α(T
s
) · F
· ln
_
i
i
0
_
+EMP (B.18)
Loss cathode
1
alpha _cath1
f(u)
Transfer Fcn 1
R
4*F
To Workspace1
emp _model
To Workspace
excudens
Fcn1
ln(u[1])
Exchange current density
Stack Temp
i0
EMP
Divide 4
T stack
2
i
1
I_0_PL
i
Figure B.31: Fuel Cel l Stack - Voltage - Cathode loss
As alpha is dependent on the fuel cell temperature, the function can be seen in
(B.19). This regression is based on [9]
161
Appendix B
alpha_cath1 : (−1.89064783 + 5.52249057E −3 ∗ u(1)) ∗ 0.5 (B.19)
The current density and the empirical value of the cathode loss is shown in
figure B.32. The constants used in this model can be seen in (B.1). T
limit
is
433K(160
o
C) which is the lower limit of the HTPEM’s temperature operating range.
i
0
(T
s
) = a
2
· e
−b
2
_
1
T
s

1
T
limit
_
(B.20)
The empirical value can be seen in (B.21) and is graphed in figure B.33
EMP (T
s
) = a
30
· e
−b
30
(T
s
−T
limit
)
(B.21)
EMP
2
i 0
1
Exchange Current density 3
a_30*exp(-1*b_30*(u[1]-T_limit ))
Exchange Current density 2
a_2*exp(-1*b_2*((1/u[1])-(1/T_limit )))
Stack Temp
1
i0_PL
Figure B.32: Fuel Cel l Stack - Voltage - Cathode loss - Exchange Current Density
280 300 320 340 360 380 400 420 440 460
0
2
4
6
8
10
12
14
16
18
20
Figure B.33: The Empirical change of the Cathodic loss compared to temperature
FiXme !
1
1
FiXme: enheder på figur
162
B Description of model
B.5 Evaporator
The evaporator is a 1kg heat exchanger made of aluminum. The evaporator is fitted
with 200 watt electric heaters, and this can be seen from the red wires in figure B.34.
The inlet of the methanol mixture has its inlet from the front side of the evaporator,
and the outlet is shown in the left of the picture. As the evaporator is installed on
the system, the evaporator is covered with a layer of Rockwool on the top side.
Air input
Air input
Gas output
Methanol
input
Figure B.34: Evaporator seen from the air outlet side
The model got 3 inputs, and 2 outputs. The first output is the temperature of
the evaporator and the second is the flow of methanol. The flow of methanol is
used in calculation of the temperature, where the airflow from the fuel cell and the
temperature of the air is input as well.
Fluid flow out
kmol /s
2
Exit Heater Temperature [K]
1
Pump flow pr hz
30e-6*60*u(1)
SC_ratio
Calculation of the flow in Kmol /s
Mix Flow[L/min] Mix Flow [Kmol/s]
Calculation of temperature
Airflow L /min
T_air[K]
SC Ratio
Molar Flow [kmol/s]
Heater Temperature [K]
Pump Hz
3
T_air _in [K]
2
Airflow L /min
1
Figure B.35: Evaporator Model
The density of the mixture is based on
163
Appendix B
Mix Flow [Kmol /s]
1
SC_ratio
273
mixture temp
T_amb
kmol *l /(m3*min ) -> kmol /s
1
1000 *60
g/cm3->kmol /m3
u(1)*1000 /32.04
Methanol mixture density
Limit
T=[10,70]*C
f(u)
Mix Flow [L/min ]
1
kmol/l
Figure B.36: Evaporator - Calculation of flow in kmol/s
ρ
MeOH
= 1/(9, 72192540E −01 +8, 24527833E −04 ∗ T +2, 00480577E −06 ∗ T
2
+
2, 77045714E −01 ∗ x
MeOH
+ 8, 91428571E −03 ∗ x
2
MeOH
)
where x
MeOH
is the MeOH fraction of the mixture, and is calculated by 1/(1+SC).
The density of the methanol is multiplied with the molar mass and multiplied with
the flow. The flow is converted to a molar flow and is set as output.
B.5.1 Temperature of evaporator
The temperature is calculated from four contributions and solves the total amount
of power added or subtracted from the evaporator block. The different powers can
be seen in figure B.38, and can be seen in figure B.39
The air from the fuel cell and the electric heaters all contribute power to the
evaporator, and the vaporization of methanol and water is subtracted. The
temperature is initially 20 [

C].
164
B Description of model
Heater
Temperature
[K]
1
m_heater *cp_alu
1
m_heater *cp_alu
1000
1
1000
1
1000
1
1000
1
1000
1
P_HE_H2O
P_HE_MeOH
P_HE_Electric
P_HE_Conv
T_evap
Integrator
1
s x
o
Goto
P_HE_elec
Energy balance
Energies in evaporator
Convection
Heater temperature
Airflow L /min
T_air[K]
Convection
Calculation of heating demands
Evaporator temperature
Molar flow [kmol/s]
SC Ratio
Power for MeOH kJ /s
Power for H 2O kJ /s
293
2x100 W carthridge
heaters
0.2
Molar Flow [kmol /s]
4
SC Ratio
3
T_air [K]
2
Airflow L /min
1
Figure B.37: Evaporator - Temperature
0 5 10 15
x 10
4
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4


Time [s]
P
o
w
e
r
[
k
W
]
˙
Q
air
˙
Q
heaters
˙
Q
MeOH
˙
Q
H2O
Figure B.38: Comparison of difference energies in the evaporator
The total power is divided by the mass of the heater and the specific heat capacity
and is integrated to output the temperature over time.
165
Appendix B
0 5 10 15
x 10
4
250
300
350
400
450
500
550
600
Time [s]
T
e
m
p
e
r
a
t
u
r
e
[

C
]
Figure B.39: Temperature of evaporator
The air from the fuel cell will in the startup phase cool the evaporator down until it
reaches a higher temperature compared to the evaporator. This heat is calculated
by figure B.40.
Q_dot _in-Q_dot _out
Convection 1
1
1000 *60
Q_dot _in-Q_dot _out
Air density :
Range . T= 273 -873 K
Output kmol /m3
f(u)
Air Enthalpy :
Range . T= 273 -873 K
Output kJ /kmol 1
f(u)
Air Enthalpy :
Range . T= 273 -873 K
Output kJ/kmol
f(u)
T_air [K]
3
Airflow L /min
2
Heater temperature
1
Figure B.40: Evaporator - Temperature - Conduction
The heat transfer from the fuel cell air exhaust is assumed to reduce its temperature
to the evaporator when it is blown though the heat exchanger. From this
temperature the enthalpy is calculated and it is subtracted from the enthalpy of
the fuel cell air exhaust air. The airflow in m
3
/s is multiplied with the density of
the exhaust air and this molar flow is multiplied with the difference in enthalpy, as
shown in (B.3).
166
B
D
e
s
c
r
i
p
t
i
o
n
o
f
m
o
d
e
l
Methanol fraction
Water fraction
Power for H 2O
kJ/s
2
Power for MeOH
kJ/s
1
1/(1+u(1))
1/(1+SC_ratio )*u(1)
Power for MeOH
Power for H 2O
Goto
[Boiling _of _mix ]
[Boiling _of _mix ]
[Boiling _of_mix ]
Enthalpy from vaporizing CH 3OH
f(u)
Enthalpy from preheating of H 2O
f(u)
Enthalpy from Vaporization of H 2O
f(u)
Enthalpy from Superheating H 2O
f(u)
Enthalpy from Superheating CH 3OH
f(u)
Enthalpy from Heating CH 3OH
f(u)
Calculation of boiling temperature
f(u)
Add1
Add
SC Ratio
3
Molar flow [kmol /s]
2
Evaporator temperature
1
P_pre_H2O
P_vap _H2O
P_SH_H2O
P_SH_MeOH
P_vap _MeOH
P_pre_MeOH
F
i
g
u
r
e
B
.
4
1
:
E
v
a
p
o
r
a
t
o
r
-
T
e
m
p
e
r
a
t
u
r
e
-
H
e
a
t
i
n
g
d
e
m
a
n
d
s
T
h
e
h
e
a
t
i
n
g
d
e
m
a
n
d
s
o
f
t
h
e
m
e
t
h
a
n
o
l
a
n
d
w
a
t
e
r
m
i
x
t
u
r
e
i
s
c
a
l
c
u
l
a
t
e
d
b
y

g
u
r
e
B
.
4
1
.
T
h
e
m
o
d
e
l
a
s
s
u
m
e
s
t
h
a
t
t
h
e
h
e
a
t
i
n
g
,
e
v
a
p
o
r
a
t
i
o
n
,
a
n
d
s
u
p
e
r
h
e
a
t
i
n
g
h
a
p
p
e
n
s
i
n
s
t
a
n
t
l
y
.
T
h
e
i
n
p
u
t
s
a
r
e
t
h
e
S
C
r
a
t
i
o
,
e
v
a
p
o
r
a
t
o
r
t
e
m
p
e
r
a
t
u
r
e
a
n
d
t
h
e
m
o
l
a
r

o
w
1
6
7
Appendix B
of the mixture, and the outputs are the power needed to superheat a mix of CH3OH
and H2O.
The boiling temperature of the mix are calculated by [12]
T
boiling
= (99.6186125 − 148.761078 ∗ vapor_frac + 432.651496 ∗ vapor_frac
2

734.917965∗vapor_frac
3
+616.827122∗vapor_frac
4
−200.586579∗vapor_frac
5
)+
273
where vapor_frac is 1/(1 + SC). The boiling point of the mix is used in the
calculation of the enthalpy for the different stages of the superheating. These
regressions are made with EES and can be seen from Model_heat_vapo.EES on
the CD. The evaporator temperature is used in the superheating of both CH3OH
and H2O because, because of a check if the temperature of the heater is below the
boiling point. This does only apply when the system is starting up because the
temperature of the evaporator always is above the boiling point of the mixture. The
enthalpy is multiplied with the molar flow of either the CH3OH fraction or the H2O
fraction, and this gives the power needed to preheat, vaporize, and super heat to a
temperature of about 120 [

C].
0 5 10 15
x 10
4
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
Time [s]
P
o
w
e
r
[
k
W
]
(a) Power needed for evaporating MeOH
0 5 10 15
x 10
4
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
Time [s]
P
o
w
e
r
[
k
W
]
(b) Enery needed for evaporating H2O
Figure B.42: Power needed for evaporating input fuel
The power needed to preheat, vaporize and superheat can be seen from figure B.42(a)
and figure B.42(b), both for CH3OH and H2O.
B.5.2 Fuel pump estimator
The fuel cell pump frequency estimator is based on an assumption that it needs to
be implemented on a real controlling system. This means that the conversion factor
on the flow in the reformer is inserted directly into the model. This can be seen in
168
B Description of model
figure B.43, and is a constant of about 1.86. This requires the molar mass of the
methanol and this is calculated by dividing with the methanol density. Fuel required
is based on the fuel cell hydrogen consumption and this amount is multiplied with
the excess value used for the burner. The excess hydrogen, Lambda
h
2 is set to 1.5,
which means 50% more hydrogen compared to the fuel cell consumption.
Frequency
1
Lambda _h2
1.86
Saturation
Methanol density
kmol/m3
H_fin
Fcn
(Cells*Cell _area *u(1))/(2*F*30e-6)
H2frac
2
Current Density
1
Figure B.43: Estimator of frequency
B.5.3 Electric efficiency
The efficiency is calculated by comparing the electric output to the heating value
of the methanol flow. This can be seen in figure B.44. The electric power from the
electric heaters and the blower in the fuel cell, is subtracted from the electric power
of the fuel cell. This gives a total electric power output from the system.
Electric output
Fuel input
Efficiency
1
To Workspace1
efficiency
Fuel power
methanol flow watt
fc_blower _voltage
methanol _flow_kmol
P_HE_elec
P_electric
Divide
Burner blower power
Blower voltage Watt
Figure B.44: Electric efficiency
The blower power usage is calculated in figure B.45.
The power for the blower is calculated by P = U · I, where the current is calculated
from the used blower voltage.
f(u) = 0.003081 ∗ u(1)
2
+ 0.01201 ∗ u(1) (B.22)
169
Appendix B
Watt 1
current
f(u)
To Workspace
P_blower _stack
Product
Blower voltage
1
Figure B.45: Electric efficiency - FC blower power
The methanol fuel power is calculated by figure B.46
W
watt
1
P_provided 1
1/(1+SC_ratio )*u(1)
Product
Heat of combustion
CH3OH kJ/mol
726 .1
1000
1000
methanol flow
1
Figure B.46: Electric efficiency - Energy from methanol fuel based on HHV
The water is subtracted from the methanol fuel mix and is converted to mol/s. This
is multiplied with the higher heating value of methanol and the output is kJ/s. This
is multiplied with 1000 and the output is watt. The higher heating value is used
because the input fuel is in a liquid phase.
170
Linearisation C
The linearisation of the stack temperature model is needed in order to apply linear
control algorithms and the linearisation can be found in this appendix. The first
part of this appendix is the linearisation of the convective part and the second part
is the linearisation of the stack voltage.
C.1 Convective loss
The convective losses depend on the temperature of the stack and the air blown into
the stack. Assuming that the density of the air is constant within the temperature
range of the model is a valid assumption. The convective losses can be sen from
(3.4) which is repeated here.
˙
Q
conv
(T
s
, ˙ n) = ˙ n · (H(T
s
) −H(T
a
))
Since the molar flow of air is represented in (3.4)by ˙ n but this is a nonintuitive
variable, and rewriting the equation to depend of the flow of air ˙ q and multiplying
the flow with a constant results in (C.1). Assuming that the enthalpy of the air can
be modeled by a first order regression of temperature is applied.
˙
Q
conv
(T
s
, ˙ q) = ˙ q · K
rho
· ((K
H1
+ K
H2
· T
s
) −(K
H1
+ K
H2
· T
a
)) (C.1)
Equation (C.1) can be differentiated with respect to the airflow see (C.2)

˙
Q
conv
∂ ˙ q
= K
rho
· ((K
H1
+ K
H2
· T
s
) −(K
H1
+ K
H2
· T
a
)) (C.2)
Taking the partial derivative of (C.1) with respect to temperature results in (C.3)

˙
Q
conv
∂T
s
= ˙ q · K
rho
· K
H2
(C.3)
171
Appendix C
Linearizing the convective part of the nonlinear model is done by evaluating (C.1)
at the working point and add the linear changes from the working point.
˙
Q
conv,lin
=
˙
Q
conv
_
¯
T
s
,
¯
˙ q
_
+

˙
Q
conv
∂ ˙ q
¸
¸
¸
¸
¸
¯
T
s
,
¯
˙ q
·
_
˙ q −
¯
˙ q
_
+

˙
Q
conv
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
˙ q
·
_
T
s

¯
T
s
_
(C.4)
Since the derivatives are evaluated at the working point parameters these are
constant for the given working point and applying this to (3.5) results in
˙
Q
conv,lin
=
˙
Q
conv
_
¯
T
s
,
¯
˙ q
_
+ K
conv
q
·
_
˙ q −
¯
˙ q
_
+ K
conv
Ts
·
_
T
s

¯
T
s
_
C.2 Cell voltage
The cell voltage is dependent on the temperature of the stack and the current density,
and in order to apply the voltage to the calculation of the current the voltage must
be linearized with respect to the stack temperature and current density. The cell
voltage can be seen from (C.5) and this represents the nonlinear cell voltage.
V
cell
(T
s
, i) = U
ocv
−η
ohmic
(T
s
, i) −η
cathodic
(T
s
, i) −η
anodic
(T
s
, i) (C.5)
The three negative parts of the equation is highly nonlinear and needs to be
linearized in order to determine the change in voltage from the working point based
on a change in either current density or stack temperature. The parts will be
linearized in the order they appear in (C.5). The working point for the system is
defined by the temperature of the stack in the working point
¯
T
s
and the current
density in the working point
¯
i. The MATLAB script Temperature_linear.m on the
CD in the MATLAB folder contains the calculation of the gradients and the working
points.
C.3 Nonlinear voltage parts
The calculation of the linear approximations of the nonlinear equations based on
a Taylor series expansion of the equations. By neglecting the higher order therms
above the first order, a linear equation can be produced from the derivatives by both
the temperature and the current density.
172
C Linearisation
C.3.1 The Ohmic Losses
The model applies the calculation of the Ohmic voltage losses based on a linear
regression for the ohmic resistance inside the fuel cell, see (C.6)
η
ohmic
(T
s
, i) = (b
1
+a
1
∗ T
s
) · i (C.6)
When a Taylor series is applied the ohmic losses can be divided into parts containing
only current density and temperature respectively.
η
ohmic
_
¯
T
s
,
¯
i
_
=
_
b
1
+ a
1
·
¯
T
s
_
·
¯
i (C.7)
∂η
ohmic
∂T
s
= a
1
· i (C.8)
∂η
ohmic
∂i
= b
1
+ a
1
· T
s
(C.9)
η
o,lin
(T
s
, i) = η
ohmic
_
¯
T
s
,
¯
i
_
+
∂η
ohmic
∂i
¸
¸
¸
¸
¸
¯
T
s
·
_
i −
¯
i
_
+
∂η
ohmic
∂T
s
¸
¸
¸
¸
¸
¯
i
·
_
T
s

¯
T
s
_
(C.10)
In (C.10) the expressions for the ohmic losses changes with respect to the current
density, see (C.9), and stack temperature, see (C.8). These have been multiplied
with the change of the given variables from the working point and they are valid for
small changes in the signals.
C.4 Cathode loss
The Cathodic losses are based on highly nonlinear factors and subfunctions based
on the stack temperature and can be seen from (C.11)
η
cathodic
(T
s
, i) =
R · T
s
α(T
s
) · 4 · F
· ln
_
i
i
0
(T
s
)
_
+ EMP (T
s
) (C.11)
The factor α(T
s
), see (C.12), the exchange current density i
0
(T
s
), see (C.13) and
the empirical part,see (C.14) is based on the stack temperature and they need to be
linearized in order to obtain a cathodic loss based on the input of the temperature
and the current density.
173
Appendix C
α(T
s
) = (k
1
+k
2
· T
s
) k
3
(C.12)
i
0
(T
s
) = a
2
· e
−b
2
_
1
T
s

1
T
l
_
(C.13)
EMP (T
s
) = a
30
· e
−b
30
(T
s
−T
l
)
(C.14)
Taking the partial derivative of the cathodic loss, see (C.11), with respect to the
current density is calculated and evaluated, see (C.15). The equations of (C.12),
(C.13) and (C.14) are observed as constants since the equations only depend on the
temperature.
∂η
cathodic
∂i
=
R · T
s
α(T
s
) · 4 · F
·
1
i
(C.15)
The partial derivative of the cathodic losses, see (C.11), with respect to temperature
is also calculated in order to obtain the linearized expression of the cathodic losses,
see (C.16). The equations of (C.12), (C.13) and (C.14) are observed as functions
that also needs to be derived. The derivation of the cathode loss is performed with
Symbolic Toolbox in Matlab.
∂η
cathodic
∂T
s
=
R · T
s
4 · F · α(T
s
)
·
_
ln
_
i
i
0
_

k
2
α(T
s
)
· ln
_
i
α(T
s
)
_

b
2
T
s
_
−a
30
· b
30
· e
−b
30
·(T
s
−T
l
)
(C.16)
The calculation of the linear contribution from the cathodic losses is based on (C.11)
evaluated at the working point temperature and current density. The deviations
in the current density multiplied with (C.15) , evaluated at the working point
temperature and current density, is added to the linear expression. The deviation of
the temperature multiplied with (C.16), evaluated at the working point temperature
and current density, is added to the linearized expression, see (C.17)
η
c,lin
(T
s
, i) = η
cathodic
_
¯
T
s
,
¯
i
_
+
∂η
cathodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
_
i −
¯
i
_
+
∂η
cathodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
_
T
s

¯
T
s
_
(C.17)
The linearized cathodic losses are applied into the linearisation of the cell voltage.
174
C Linearisation
C.5 Anodic loss
The anodic losses are based on equations that both use the stack temperature and
the current density and in order to obtain the linear approximation of the voltage
the anodic losses need to be differentiated with respect to both variables, see (C.18)
η
anodic
(T
s
, i) =
R · T
s
α · F
· asinh
_
i
2 · k
eh
(T
s
) · Θ(T
s
, i)
_
(C.18)
The coverage of the cell Θ
H
2
is a 3rd order regression based on the coverage equations
from the model of the system, see (C.19). This regression is also based on the molar
fractions of the reformat gas stream and these are assumed constant based on a
reformer temperature of 500 K (227

C) and a SC-ratio of 1.3. If the reformer or the
SC-ratio is changed the coefficients must be recalculated in EES.
Θ
H
2
(T
s
, i) = A0 + A1 · T
s
+A2 · T
2
+ A3 · T
3
s
+B1 · i + B2 · i
2
+B3 · i
3
+C1 · T
s
· i + C2 · T
s
· i
2
+ C3 · T
2
s
· i +C4 · T
2
s
· i
2
(C.19)
The coverage regression, from (C.19), is derived with respect to the current in order
to calculate the change of the coverage, see (C.20)
∂Θ
H
2
∂i
= B1 + 2 · B2 · i + 3 · B3 · i
2
+ C1 · T
s
+ 2 · C2 · T
s
· i + C3 · T
2
s
+ 2 · C4 · T
2
s
· i (C.20)
The coverage regression of the cell, from (C.19), is derived with respect to the
temperature of the stack, see (C.21)
∂Θ
H
2
∂T
s
= A1 + 2 · A2 · T
s
+ 3 · A3 · T
2
s
+C1 · i
+ C2 · i
2
+ 2C3 · T
s
· i + 2 · C4 · T
s
· i
2
(C.21)
The change of the variable k
eh
is dependent of the temperature and is described by
an Arrhenius-like equation, see (C.22)
k
eh
(T
s
) = k
eh
· e
−E
keh
R·T
s
(C.22)
175
Appendix C
The derivative of k
eh
with respect is calculated, see (C.23)
∂k
eh
∂T
s
=
k
eh
· E
keh
R · T
2
s
· e
−E
keh
R·T
s
(C.23)
when the derivatives have been calculated for the variables the derivative for the
anodic loss can be calculated. The derivative with respect to current density, see
(C.24). This equation refers to the derivative of the cell coverage with respect to
the current density, see (C.20)
∂η
anodic
∂i
=
R
α · F
·
T
s
¸
_
i
2·k
eh
(T
s
)·Θ
H
2
_
2
+ 1
·
2 · k
eh
(T
s
) · Θ
H
2
−i · 2 · k
eh
(T
s
) ·
∂Θ
H
2
∂i
(2 · k
eh
(T
s
) · Θ
H
2
)
2
(C.24)
Linearisation of the anodic loss with respect to the temperature is calculated, see
(C.25). The equation refers to the partial derivative of both the coverage equations
and variable k
eh
with respect to temperature, see (C.21) and (C.23) respectively.
∂η
anodic
∂T
s
=
R
α · F
asinh
_
i
2 · k
eh
(T
s
) · Θ
H
2
_
+
R
α · F
T
s
¸
_
i
2·k
eh
(T
s
)·Θ
H
2
_
2
+ 1
·
−i · 2 ·
∂k
eh
∂T
s
· Θ
H
2
(2 · k
eh
(T
s
) · Θ
H
2
)
2
+
R
α · F
k
eh
(T
s
) ·
∂Θ
H
2
∂T
s
(2 · k
eh
(T
s
) · Θ
H
2
)
2
(C.25)
Both (C.24) and (C.25) contains the functions of (C.19) and (C.22) and these
equation are evaluated in the same point as the derivatives. The anodic loss can
linearized around the working point based on the value of the anodic losses, see
(C.18), evaluated in the working point of the model. Applying the deviations from
the working point of the anodic loss, with respect to the given variables i and T
s
multiplied with their respective derivatives of the anodic losses, see (C.24) and (C.25)
respectively, results in the linear approximation of the anodic loss, see (C.26)
176
C Linearisation
η
a,lin
(T
s
, i) = η
anodic
_
¯
T
s
,
¯
i
_
+
∂η
anodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_
+
∂η
anodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_
(C.26)
C.6 Linear voltage approximation
When inserting the linearized expressions for the different nonlinear parts into (C.5),
an expression for the linearized voltage can be solved.
V
cell,lin
= u
ocv
−η
o,lin
(T
s
, i) −η
c,lin
(T
s
, i) −η
a,lin
(T
s
, i) (C.27)
Summing up the constants of the linearized expressions, from (C.10), (C.17) and
(C.26) resulting in the working point of the voltage. This can be expressed
v
cell
wp
= u
ocv
−η
ohmic
_
¯
T
s
,
¯
i
_
−η
cathodic
_
¯
T
s
,
¯
i
_
−η
anodic
_
¯
T
s
,
¯
i
_
(C.28)
The voltage changes in a general direction based on the working point parameters of
stack temperature and current density. This direction is based on the derivatives of
the nonlinear parts of the voltage. The Taylor series applies only to small changes
in the variables and the difference in the current density results in a change of the
voltage.
V
change
i
(i) = −
∂η
ohmic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_

∂η
cathodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_

∂η
anodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_
= −
_
_
∂η
ohmic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
+
∂η
cathodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
+
∂η
anodic
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
_
_
. ¸¸ .
K
V oltage
di
·
_
i −
¯
i
_
(C.29)
V
change
Ts
(T
s
) = −
∂η
ohmic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_

∂η
cathodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_

∂η
anodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_
= −
_
_
∂η
ohmic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
+
∂η
cathodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
+
∂η
anodic
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
_
_
. ¸¸ .
K
V oltage
dTs
·
_
T
s

¯
T
s
_
(C.30)
177
Appendix C
Expanding equation (C.27) with the constants from (C.29) and (C.30) and
separating the variables
V
cell,linear
= v
cell_wp
+ K
V oltage
di
·
_
i −
¯
i
_
+ K
V oltage
dTs
_
T
s

¯
T
s
_
(C.31)
C.7 Heat generated
In order to calculate the heat generated by the fuel cell (C.32) is used.
˙
Q
heat
= (v
rev
−v
cell
(T
s
, i)) · i · n
cell
· A
cell
(C.32)
By inserting (C.31) in (C.32) and replacing V
cell
with the expression of (C.31) results
in (C.33).
˙
Q
heat
=
_
v
rev

_
V
cell
wp
+ V
change
i
(i) +V
change
Ts
(T
s
)
__
· i · n
cell
· A
cell
(C.33)
the expression of the heat can be expanded by inserting the expressions of (C.29)
and (C.30), results in (C.34)
˙
Q
heat
=
_
v
rev

_
v
cell
wp
+ K
V oltage
di
·
_
i −
¯
i
_
+ K
V oltage
dTs
·
_
T
s

¯
T
s
___
· i · n
cell
· A
cell
(C.34)
The expanded expression can be differentiated with respect to the current density
results in (C.35)

˙
Q
heat
∂i
=
_
v
rev
−v
cell
wp
−2 · K
V oltage
di
· i + K
V oltage
di
·
¯
i −K
V oltage
dTs
·
_
T
s

¯
T
s
__
· n
cell
· A
cell
(C.35)
Differentiating (C.34) with respect to the temperature results in (C.36)

˙
Q
heat
∂T
s
= −K
V oltage
dTs
· i · n
cell
· A
cell
(C.36)
Linearizing (C.34) with a first order Taylor Series results in (3.8)
178
C Linearisation
˙
Q
heat,linear
=
˙
Q
heat
_
¯
T
s
,
¯
i
_
+

˙
Q
heat
∂i
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
i −
¯
i
_
+

˙
Q
heat
∂T
s
¸
¸
¸
¸
¸
¯
T
s
,
¯
i
·
_
T
s

¯
T
s
_
C.7.1 Linearisation of the reformer temperature
In order to control the temperature of the reformer the temperature calculation must
be linearized. The temperature is calculated from an power balance, see (3.14). The
convective part has been linearized in (3.6). The excess hydrogen from the fuel cell
heats up the reformer and this can be related to the current density.
179
Appendix C
180
Labview program D
The system is controlled by a Texas Instruments cRIO 9012. This cRIO has a Real-
Time(RT) module and a Field-Programmable Gate Array(FPGA) module. The
FPGA modules controls the input and output from the module bay, where a various
set of plugin modules are installed.
cRIO 9012
Converter
board:
5v to 24v
Modules
Figure D.1: cRIO 9012 and modules
The controlling system consists of 3 programs combined in a project. A FPGA
program, RT program and a host program. The FPGA module communicates with
the RT module and the RT module communicates with the HOST, see figure D.2
FPGA RT HOST
Figure D.2: Communication between HOST, RT module, and FPGA
The communication between the host program and RT module is with shared
network variables and a list of variables can be seen in table D.1.
181
Appendix D
Variable name Description
Variables from HOST(Boolean) Boolean values from the controlling
host interface
Variables from HOST(Double) Double values from the controlling
HOST interface
Variables from RT(Boolean) Boolean values from the RT module
Variables from RT(Double) Double values from the RT module
Timing constants from HOST(Double) Timing constants for controllers
Datalog (String) Measured data logged to file
Current log file (String) Name of current logging file
Usernotes (String) User notes describing the logged exper-
iment
End notes to log file (String) User notes added to the end of a logging
session
Destination (String) The destination of the file (RT module
storage or USB flash drive)
Table D.1: Shared network variables
D.1 FPGA Program
The FPGA program is designed to read the data from the module bay and output
to a variable the RT module can read. A list of modules can be seen in table D.2
Placement Module Description
Slot 1 AI (NI 9205) Analog input module(32-Ch 16bit +/- 10V)
Slot 2 AO (NI 9263) Analog Output module(4-Ch 16bit +/- 10V)
Slot 3 TC1 (NI9211) Thermocouple input(4-Ch 24bit)
Slot 4 TC2 (NI9211) Thermocouple input(4-Ch 24bit)
Slot 5 TC3 (NI9211) Thermocouple input(4-Ch 24bit)
Slot 6 DIO (NI9401) Digital Input/Output(8-Ch Highspeed TTL)
Slot 7 RTD (NI9217) RTD module(4-Ch 24-bit Analog input)
Table D.2: Plugin modules
As for the Analog input(AI) and Analog output(AO) the program checks if the input
refresh rate is too fast for the FPGA. This is done by comparing the difference in the
tick counter, which should be the same as the user input tick count. This tick count
can be changed from the host program, and if the loop finishes late, it is notified in
the “AI AO Late Counter”. This part of the program can be seen in figure D.7.
The same check is made with the temperature modules (TC1, TC2, TC3). The
default refresh tick rate is 2 for both the AI/AO modules and the TC modules.
182
D Labview program
The fuel pump is driven by a digital output of 24 Volt. This is made by a PWM
module, where the duty cycle is 50%. The frequency of the PWM signal determines
the frequency of the pump. The maximum frequency of the pump is 20 Hz, and this
limit is set in the HOST program. Since the pump runs on 24 V, and the digital
output is 5V, there is a converter board between the DIO module and the pump.
This converter consists of a MOSFET and an Optocoupler, to prevent the board
to damage the DIO module. The program consist of two pwm output in case of a
seperate water and methanol pump, and PWM for the control of the electric heaters
in the evaporator. The DIO part of the FPGA program can be seen from figure D.3.
Figure D.3: PWM output in FPGA
D.2 RT program
The RT module consist of a 400Mhz CPU, and this module handles all of
the calculations done in the program. This includes controllers, data logging,
temperature handling and input/output for the FPGA. The read/write control can
be seen from figure D.4, where the inputs are accessed from the left and output is
accessed from the right. All of the thermo couplers used in this project is of the K
type. The reference signal from the MFC’s is read and the Nl/volt
The inputs AO0-3 are all setpoints for the MFC’s, where AO0-2 are controlling
the air and AO3 are for the hydrogen. The thermo couplers(TC) are read from a
cluster where all information is evaluated and extracted. The reference signals from
the MFC’s are read and added to the AI array. The 4 signals from the MFC’s are
individually read and the signal is multiplied with the specific “Nl/min”. The largest
MFC is a 1300 Nl/min MFC and got an input range of 10V, and this is why the
reference value is multiplied with 130. The FPGA returns checks for stopped loops
and the “tick late count”.
183
Appendix D
Figure D.4: FPGA Read/Write control
These checks are saved into the shared variable “Variables from RT(Boolean)”. The
variable also contains the “datalogging enabled” boolean. The inputs for the Tick
count in AO/AI and TC are set from the HOST program and passed on to the
FPGA, while the inputs for the PWM is calculated by figure D.5.
Figure D.5: PWM calculation for pump 1+2 and electric heaters
184
D Labview program
The input for the PWM blocks are the duty cycle and the duty period. As for the
frequency to change, the period must be changed accordingly. The input frequency
is divided into the tick count for 1 second. This count is 40.000.000 because the
FPGA runs at 40 Mhz. If the frequency input from the user interface is 0, the
output will be left in an enabled state. Because the pump should be left in an
disabled state, the signal is inverted in the FPGA code. The duty cycle for the
pump are set to 50%.
For the electric heaters there is installed a switch to allow the 5V signal to pass
240V to the heaters. The heaters are each 100 watt and the period is set to 2Hz.
This is set low because of the net frequency of 50Hz. The input for the heaters is
set to a value between 0 and 100%.
The regulating PID regulator can be enabled and disabled from the user interface.
By disabling the PID regulator, a manual slider can control the air flow for the
hydrogen. This manual slider is default set to a high value (50l/min), so in case
of an emergency, the default value would be a high flow of air compared to the
hydrogen added. The setpoint is also set from the user interface and is default set
to 350 [

C]. The refresh speed and PI parameters is also available from the user
interface.
Figure D.6: PID control ler
The measured temperature are read and the regulator is set to an output range of
0 to -20. This value is set because of the negative influence the blower has on the
temperature of the controlled system. The measured temperature is compared to
the setpoint and an regulated signal is outputted. This signal is inverted and the
feed forward gain is applied. This feed forward gain is multiplied with the reference
flow of the hydrogen, which gives an minimum airflow for the reaction. This feed
forward signal is added to the regulated output from the PID regulator, and the
new signal is converted to a 16 bit value and send to the AO. The PID input and
output can be seen in figure D.6, and the program can be seen in figure D.8
185
Appendix D
The network shared variable “Variables from RT(Double)” contains the following
Nr. Variable
00 Datalog time
01 Evaporator gas outlet Temperature
02 Reformer gas outlet Temperature
03 Burner Temperature 1
04 Burner Temperature 2
05 WGS Temperature
06 Burner gas outlet temperature
07 Fuel cell gas outlet temperature
08 Burner gas inlet temperature
09 Fuel cell gas inlet temperature
10 Evaporator air input temperature
11 Evaporator temperature
12 Evaporator air output temperature
13 MFC 1 (Cooler)
14 MFC 2 (Burner)
15 MFC 3 (Evaporator)
16 MFC 4 (H2)
17 Pressure feedback
18 AO AI Late Counter
19 TC Late Counter
20 Digital input for methanol pump (Hz)
21 Digital input for Water pump (Hz)
22 Digital input for electric heaters (watt)
23 Feedback from PI regulator (Burner)
Table D.3: Variables from RT(Double)
D.3 Host program
The host program handles the input and output for the user interface. The user
interface consists of input for the PI controller, Mass Flow Controllers(MFC),
Hydrogen usage, electric heaters and datalog information. The output from the
RT consists of logged data i.e. temperatures, air-/h2-flow and pressure.
186
D Labview program
D.4 Figures
Figure D.7: AI and AO in FPGA
187
Appendix D
Figure D.8: PID control with feed forward
188
D Labview program
Figure D.9: Main control
189
Appendix D
Figure D.10: System temperature overview
190
Matlab scripts E
E.1 Fzero coverage
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
3 % Redi ger et t i l udregni ng af H2 coverage l i g ni ng e r af %
% Jes per Kjær Sørensen og Simon Sahl i n %
5 % %
% Or gi nal t de s i gne t af Søren Juhl Andreasen og Thomas Bagger Madsen %
7 % %
% EMSD9, November 2004 %
9 % Model l en har t aget udgangspunkt i varmeveksl ermodel af %
% Mads Pagh Ni el s en %
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
13 % %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
f unct i on [ sys , x0 , s t r , t s ] = Sf unct i on_f zer o ( t , x , u , f l a g )
17
swi tch f l ag ,
19
%%%%%%%%%%%%%%%%%%
21 % I n i t i a l i s e r i n g %
%%%%%%%%%%%%%%%%%%
23 cas e 0 ,
[ sys , x0 , s t r , t s ]= md l I n i t i a l i z e S i z e s ( ) ;
25
%%%%%%%%%%%
27 % Output %
%%%%%%%%%%%
29 cas e 1 ,
[ sys ]=mdl Der i vat i ves ( t , x , u) ;
31
%%%%%%%%%%%
33 % Output %
%%%%%%%%%%%
35 cas e 3 ,
sys=mdlOutputs ( t , x , u) ;
37
%%%%%%%%%%%%%%%%%%%%%%%%
39 % Ikke benyttede f l a g s %
%%%%%%%%%%%%%%%%%%%%%%%%
41 cas e {1 , 2 , 4 , 9 } ,
sys = [ ] ;
43
%%%%%%%%%%%%%%%%%%%%
45 % Uventede f l a g s %
%%%%%%%%%%%%%%%%%%%%
47 ot her wi s e
e r r or ( [ ’ U n h a n d l e d f l a g = ’ , num2str ( f l a g ) ] ) ;
49
end
51 % end swi tch−f unkt i on
53 %==========================================================================
% md l I n i t i a l i z e S i z e s
55 % Funkti onen r e t ur ne r e r the ve kt o r s t ø r r e l s e r , s t a r t be t i nge l s e r , og
% sample−t i de r f or S−f unkt i onen .
57 %==========================================================================
59
f unct i on [ sys , x0 , s t r , t s ]= md l I n i t i a l i z e S i z e s ( )
61
% I nt er ne gr i d poi nt s
63 s i z e s = s i ms i z e s ;
s i z e s . NumContStates = 1; % Ant al l e t af t i l s t a nde
65 s i z e s . NumDiscStates = 0;
s i z e s . NumOutputs = 1; % Antal output
67 s i z e s . NumInputs = 10; % Antal Input
s i z e s . Di rFeedthrough = 1;
69 s i z e s . NumSampleTimes = 1;
71 us =0;
73 sys = s i ms i z e s ( s i z e s ) ;
191
Appendix E
75 x0=0; % Begyndel s es vekt or
77 s t r = [ ] ;
t s = [ 0 0 ] ;
79 %==========================================================================
% mdl Der i vat i ves
81 % Funkti onen r e t ur ne r e r de a f l e dt e t i l s t a nde
%==========================================================================
83
f unct i on [ sys ]=mdl Der i vat i ves ( t , x , u) ;
85
87 sys = [ 0 ] ; % Res ul t at r e t ur ne r e s t i l i nt e gr at or
89 %==========================================================================
% mdlOutputs
91 % Returnerer output af Si mul i nk−bl ok .
%==========================================================================
93
f unct i on sys=mdlOutputs ( t , x , u)
95 k_fh=u( 1) ;
b_fh=u( 2) ;
97 k_fc=u( 3) ;
b_fc=u( 4) ;
99 k_ec=u( 5) ;
k_eh=u( 6) ;
101 p=u( 7) ;
i=u( 8) ;
103 x_co=u( 9) ;
x_h2=u( 10) ;
105 i f x_co>0
y=f z e r o (@(TH2) k_fh∗x_h2∗p∗(1−TH2−(k_fc∗x_co∗p∗(1−TH2) /( k_fc∗x_co+b_fc+( i ∗k_ec /(2∗k_eh∗TH2) ) ) ) )
^2−b_fh∗k_fh∗TH2^2−i , 0 . 2 ) ;
107 e l s e
y=0;
109 end
sys=y ;
192
E Matlab scripts
E.2 Fzero conservation of mass
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % %
% Redi ger et t i l udregni ng af mas s ebevar el s e i r ef or mer i ng %
4 % Jes per Kjær Sørensen og Simon Sahl i n %
% %
6 % Or i gi nal des i gn by Søren Juhl Andreasen og Thomas Bagger Madsen %
% %
8 % EMSD9, November 2004 %
% Model l en har t aget udgangspunkt i varmeveksl ermodel af %
10 % Mads Pagh Ni el s en %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
f unct i on [ sys , x0 , s t r , t s ] = Sf unct i on_f zer o ( t , x , u , f l a g ) ;
14
swi tch f l ag ,
16
%%%%%%%%%%%%%%%%%%
18 % I n i t i a l i s e r i n g %
%%%%%%%%%%%%%%%%%%
20 cas e 0 ,
[ sys , x0 , s t r , t s ]= md l I n i t i a l i z e S i z e s ( ) ;
22
%%%%%%%%%%%%%%%
24 % Af l edt e %
%%%%%%%%%%%%%%%
26 cas e 1 ,
[ sys ]=mdl Der i vat i ves ( t , x , u) ;
28
%%%%%%%%%%%
30 % Output %
%%%%%%%%%%%
32 cas e 3 ,
sys=mdlOutputs ( t , x , u) ;
34
%%%%%%%%%%%%%%%%%%%%%%%%
36 % Ikke benyttede f l a g s %
%%%%%%%%%%%%%%%%%%%%%%%%
38 cas e {1 2 , 4 , 9 } ,
sys = [ ] ;
40
%%%%%%%%%%%%%%%%%%%%
42 % Uventede f l a g s %
%%%%%%%%%%%%%%%%%%%%
44 ot her wi s e
e r r or ( [ ’ U n h a n d l e d f l a g = ’ , num2str ( f l a g ) ] ) ;
46
end
48 % end swi tch−f unkt i on
50 %==========================================================================
% md l I n i t i a l i z e S i z e s
52 % Funkti onen r e t ur ne r e r the ve kt o r s t ø r r e l s e r , s t a r t be t i nge l s e r ,
% og sample−t i de r f or S−f unkt i onen .
54 %==========================================================================
56 f unct i on [ sys , x0 , s t r , t s ]= md l I n i t i a l i z e S i z e s ( ) ;
58 % I nt er ne gr i d poi nt s
s i z e s = s i ms i z e s ;
60 s i z e s . NumContStates = 1; % Ant al l e t af t i l s t a nde
s i z e s . NumDiscStates = 0;
62 s i z e s . NumOutputs = 1; % Antal output
s i z e s . NumInputs = 13; % Antal Input
64 s i z e s . Di rFeedthrough = 1;
s i z e s . NumSampleTimes = 1;
66
us =0;
68
sys = s i ms i z e s ( s i z e s ) ;
70
x0=0; % Begyndel s es vekt or
72
s t r = [ ] ;
74 t s = [ 0 0 ] ;
76 %==========================================================================
% mdl Der i vat i ves
78 % Funkti onen r e t ur ne r e r de a f l e dt e t i l s t a nde
%==========================================================================
80
f unct i on [ sys ]=mdl Der i vat i ves ( t , x , u) ;
82
sys = [ 0 ] ; % Res ul t at r e t ur ne r e s t i l i nt e gr at or
84
%==========================================================================
86 % mdlOutputs
% Returnerer output af Si mul i nk−bl ok .
88 %==========================================================================
193
Appendix E
90 f unct i on sys=mdlOutputs ( t , x , u) ;
n_meoh=u( 1) ;
92 n_h2o=u( 2) ;
m_meoh=u( 3) ;
94 m_co=u( 4) ;
m_co2=u( 5) ;
96 m_h2=u( 6) ;
m_h2o=u( 7) ;
98 n_mix_in=u( 8) ;
x_meoh=u( 9) ;
100 x_co=u( 10) ;
x_co2=u( 11) ;
102 x_h2=u( 12) ;
x_h2o=u( 13) ;
104 i f n_mix_in>0
y=f z e r o (@( nmixout ) n_h2o∗m_h2o+n_meoh∗m_meoh−(x_meoh∗m_meoh∗nmixout+x_co∗m_co∗nmixout+x_co2∗
m_co2∗nmixout+x_h2∗m_h2∗nmixout+x_h2o∗m_h2o∗nmixout ) , 0. 01) ;
106 e l s e
y=0;
108 end
110 sys=y ;
194
E Matlab scripts
E.3 Repeating simulation optimizer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % %
% Repeati ng the s i mul at i on to f i nd a more pr e c i s e val ue of %
4 % a_30 and b_30 %
% %
6 % Jes per Kjær Sørensen og Simon Sahl i n %
% EMSD10, Maj 2009 %
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 %% Constants
c l e a r a l l
12 t i c
%c l f
14 sampl edata . ti me =0;
%Lambda_air =2.5
16 i _s t ar t =0. 01;
i_max=0. 66;
18 T_test =180+273.15;
CO_ppm=1000;
20
22 r epeat =10;
% a_1_start =−0.0001
24 % a_1_slut =−0.0002
% a_1_slut=−5
26 % a_1_delta=(a_1_slut−a_1_start ) / r epeat
opts = s i ms et ( ’ d e b u g ’ , ’ off ’ ) ;
28 n = 1: r epeat ^ 2;
score_sampl e ( n , 1 ) =0;
30
32 a_30_start=3e −1;
a_30_end=6e −1;
34 a_30_delta=(a_30_end−a_30_start ) / r epeat ;
36 b_30_start =2.8e −2;
b_30_end=2.6e −2;
38 b_30_delta=(b_30_end−b_30_start ) / r epeat ;
40 %% Model run
f or a = 1: r epeat
42 a_30=a_30_start+a_30_delta ∗( a−1) ;
f or b = 1: r epeat
44 b_30=b_30_start+b_30_delta ∗(b−1) ;
score_sampl e ( ( b+( r epeat ∗( a−1) ) ) , 2)=a_30 ;
46 score_sampl e ( ( b+( r epeat ∗( a−1) ) ) , 3)=b_30 ;
48
50
%run model
52 sim( ’ f u e l c e l l _ m o d e l _ r e p e a t i n g _ f c _ v o l t a g e . mdl ’ , 100 , opts ) ;
54
56 % Check i f we got the l a r g e s val ue of ti me i nt e r v a l s and save the l a r g e s t
%( f or pl ot t i ng purpose )
58 i f ( s i z e ( si mout . s i g na l s . val ues , 1 ) > s i z e ( sampl edata . time , 1 ) )
sampl edata . ti me=si mout . ti me ( : , 1 ) ;
60 end
62 % ( b+( r epeat ∗( a−1) ) ) ;
64 f or m=1: s i z e ( si mout . s i g na l s . val ues , 1 )
% save data from model
66 sampl edata . val ues (m, ( b+( r epeat ∗( a−1) ) ) )=si mout . s i g na l s . val ues (m, 1 ) ;
sampl edata . si mul ated (m, ( b+( r epeat ∗( a−1) ) ) )=measout . s i g na l s . val ues (m, 1 ) ;
68 sampl edata . c ur r e nt de ns i t y (m, ( b+( r epeat ∗( a−1) ) ) )=cur r ent _dens i t y . s i g na l s . val ues (m, 1 ) ;
% Cal cul at e the di f f e r e nc e between model and meassured data
70 sampl edata . d i f f (m, ( b+( r epeat ∗( a−1) ) ) )=si mout . s i g na l s . val ues (m, 1 )−measout . s i g na l s .
val ues (m, 1 ) ;
72 % Cal cul at e the rms val ue of the di f f e r e nc e
scoreadd_rms = s qr t ( sampl edata . d i f f (m, ( b+( r epeat ∗( a−1) ) ) ) ^2) ;
74
% Add the
76 score_sampl e ( ( b+( r epeat ∗( a−1) ) ) , 1) = score_sampl e ( ( b+( r epeat ∗( a−1) ) ) , 1)+scoreadd_rms
;
end
78 end
end
80
%ti me measured between t i c and toc
82 toc
%% Aftermath
84
% Find l owes t s c or e and the i ndex
86 [ min_score_value , min_score_index ] = min( score_sampl e ( : , 1 ) ) ;
195
Appendix E
88 %% Fi gur es
c l o s e a l l
90 %% Fi gure 1
% Pl ot the di f f e r e nc e every <repeat > number of sampl es
92 z1 = ’ ../ eps / p l o t _ r e p e a t e d _ c o m p a r e d _ d i f f e r e n c e . eps ’ ;
f i g ur e 1 = f i g ur e ( ’ P a p e r S i z e ’ , [ 20. 98 2 9 . 6 8 ] ) ;
94
X1=sampl edata . c ur r e nt de ns i t y ( : , min_score_index ) ;
96 YMatrix1=sampl edata . d i f f ( : , min_score_index ) ;
98 f i g1_ti ck_y1=max(max( YMatrix1 ) )+max(max( YMatrix1 ) ) /10;
fig1_max_y1=max(max( YMatrix1 ) ) +0. 02;
100 fig1_min_y1=min( min( YMatrix1 ) ) −0. 02;
% Create axes
102 axes1 = axes ( ’ P a r e n t ’ , f i gur e 1 , . . .
’ Y G r i d ’ , ’ on ’ , . . .
104 ’ X G r i d ’ , ’ on ’ , . . .
’ L i n e W i d t h ’ , 1) ;
106 % Uncomment the f ol l owi ng l i n e to pr es er ve the X−l i mi t s of the axes
% xl i m ( [ 0 1317] ) ;
108 % Uncomment the f ol l owi ng l i n e to pr es er ve the Y−l i mi t s of the axes
yl i m ( [ fig1_min_y1 fig1_max_y1 ] ) ;
110 box( ’ on ’ ) ;
hol d ( ’ all ’ ) ;
112 % Create mul t i pl e l i n e s usi ng matri x i nput to pl ot
pl ot 1 = pl ot (X1, YMatrix1 , ’ P a r e n t ’ , axes1 ) ;
114 s e t ( pl ot 1 ( 1) , ’ D i s p l a y N a m e ’ , ’ V o l t a g e d i f f e r e n c e ’ ) ;
116 % Create yl abe l
yl abe l ( ’ RMS v o l t a g e d i f f e r e n c e ’ , ’ F o n t S i z e ’ , 10) ;
118
% Create xl abe l
120 xl abe l ( ’ C u r r e n t d e n s i t y ’ , ’ F o n t S i z e ’ , 10) ;
122 % Create l egend
l egend1 = l egend ( axes1 , ’ s h o w ’ ) ;
124 s e t ( l egend1 , ’ E d g e c o l o r ’ , [ 1 1 1] , ’ L o c a t i o n ’ , ’ N o r t h e a s t ’ ) ;
126 pr i nt ( gcf , ’ - d e p s c 2 ’ , ’ - r 6 0 0 ’ , z1 )
di s p ( z1 )
128
%% Fi gure 2
130 %pl ot ( score_sampl e ( : , 1 ) )
z2 = ’ ../ eps / p l o t _ r e p e a t e d _ c o m p a r e d _ s c o r e s . eps ’ ;
132 f i g ur e 2 = f i g ur e ( ’ P a p e r S i z e ’ , [ 20. 98 2 9 . 6 8 ] ) ;
YMatrix1 = score_sampl e ( : , 1 ) ;
134
f i g2_ti ck_y1=max(max( YMatrix1 ) )+max(max( YMatrix1 ) ) /10;
136 fig2_max_y1=max(max( YMatrix1 ) )+max(max( YMatrix1 ) ) ∗ 0 . 1 ;
138 % Create axes
axes1 = axes ( ’ P a r e n t ’ , f i gur e 2 , ’ Y T i c k ’ , ( 0 : 1 : fig2_max_y1 ) , . . .
140 ’ Y G r i d ’ , ’ on ’ , . . .
’ X G r i d ’ , ’ on ’ , . . .
142 ’ L i n e W i d t h ’ , 1) ;
% Uncomment the f ol l owi ng l i n e to pr es er ve the X−l i mi t s of the axes
144 % xl i m ( [ 0 1317] ) ;
% Uncomment the f ol l owi ng l i n e to pr es er ve the Y−l i mi t s of the axes
146 yl i m ( [ 0 fig2_max_y1 ] ) ;
box( ’ on ’ ) ;
148 hol d ( ’ all ’ ) ;
% Create mul t i pl e l i n e s usi ng matri x i nput to pl ot
150 pl ot 2 = pl ot ( YMatrix1 , ’ P a r e n t ’ , axes1 ) ;
s e t ( pl ot 2 ( 1) , ’ D i s p l a y N a m e ’ , ’ V o l t a g e s c o r e ’ ) ;
152
% Create yl abe l
154 yl abe l ( ’ RMS v o l t a g e d i f f e r e n c e ’ , ’ F o n t S i z e ’ , 10) ;
156 % Create xl abe l
xl abe l ( ’ Run s e s s i o n ’ , ’ F o n t S i z e ’ , 10) ;
158
% Create l egend
160 l egend1 = l egend ( axes1 , ’ s h o w ’ ) ;
s e t ( l egend1 , ’ E d g e c o l o r ’ , [ 1 1 1] , ’ L o c a t i o n ’ , ’ N o r t h e a s t ’ ) ;
162
pr i nt ( gcf , ’ - d e p s c ’ , ’ - r 6 0 0 ’ , z2 )
164 di s p ( z2 )
166 %% Fi gure 3
z3 = ’ ../ eps / p l o t _ r e p e a t e d _ p o l a r i s a t i o n _ c u r v e s _ 1 . eps ’ ;
168 X1=sampl edata . c ur r e nt de ns i t y ( : , min_score_index ) ;
170 f i g ur e 3 = f i g ur e ( ’ P a p e r S i z e ’ , [ 20. 98 2 9 . 6 8 ] ) ;
YMatrix1 = [ sampl edata . val ues ( : , min_score_index ) , sampl edata . si mul ated ( : , min_score_index ) ] ;
172
f i g3_ti ck_y1=max(max( YMatrix1 ) )+max(max( YMatrix1 ) ) /10;
174 fig3_max_y1=max(max( YMatrix1 ) )+max(max( YMatrix1 ) ) ∗ 0 . 1 ;
176 % Create axes
axes1 = axes ( ’ P a r e n t ’ , f i gur e 3 , ’ Y T i c k ’ , ( 0 : 0 . 1 : fig3_max_y1 ) , . . .
178 ’ Y G r i d ’ , ’ on ’ , . . .
196
E Matlab scripts
’ X G r i d ’ , ’ on ’ , . . .
180 ’ L i n e W i d t h ’ , 1) ;
% Uncomment the f ol l owi ng l i n e to pr es er ve the X−l i mi t s of the axes
182 % xl i m ( [ 0 1317] ) ;
% Uncomment the f ol l owi ng l i n e to pr es er ve the Y−l i mi t s of the axes
184 yl i m ( [ 0 fig3_max_y1 ] ) ;
box( ’ on ’ ) ;
186 hol d ( ’ all ’ ) ;
% Create mul t i pl e l i n e s usi ng matri x i nput to pl ot
188 pl ot 3 = pl ot (X1, YMatrix1 , ’ P a r e n t ’ , axes1 ) ;
s e t ( pl ot 3 ( 1) , ’ D i s p l a y N a m e ’ , ’ E x p e r i m e n t a l ’ ) ;
190 s e t ( pl ot 3 ( 2) , ’ D i s p l a y N a m e ’ , ’ S i m u l a t e d ’ ) ;
192 % Create yl abe l
yl abe l ( ’ V o l t a g e ’ , ’ F o n t S i z e ’ , 10) ;
194
% Create xl abe l
196 xl abe l ( ’ C u r r e n t d e n s i t y ’ , ’ F o n t S i z e ’ , 10) ;
198 % Create l egend
l egend1 = l egend ( axes1 , ’ s h o w ’ ) ;
200 s e t ( l egend1 , ’ E d g e c o l o r ’ , [ 1 1 1] , ’ L o c a t i o n ’ , ’ N o r t h e a s t ’ ) ;
202 pr i nt ( gcf , ’ - d e p s c ’ , ’ - r 6 0 0 ’ , z3 )
di s p ( z3 )
197
Appendix E
E.4 Controller parameter search
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % Sc r i pt f or s ear chi ng f or c o nt r o l l e r parameters f or %
% a PI−c o nt r o l l e r f or the r ef or mer . %
4 % Created by : Simon Sahl i n and Jes per Kjær Sørensen %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 t =0: 0. 01: 100; %Time vect or f or the s t e pf unc t i on
K_V=37; %Vol tage const ant f or the c o nt r o l l e r
8 k=0; %Counting var i abl e f or the t abl e
%Cl ear the va r i a bl e s f or the s c r i pt
10 c l e a r t abl e
c l e a r sor t edr ows
12 %s e t the timestamp f or the c a l c ul a t i o ns begi nni ng
t i c
14 f or i =1: 125; %I nt e gr at i on const ant Loop f or changi ng the pl acement of the zer o on the negat i ve
axi s
T_i ( i ) =2+0.1∗ i ; %Reci pr ocal val ue of the zer o
16 f or j =1: 125; %Loop f or the gai n of the c l os e d l oop f unct i on .
K_P( j )=2∗ j ; %Gain val ue
18 %numerator of the t r anf e r f unc t i o n
num_parameter=[K_P( j ) ∗K_V∗K_conv_ref_dq 1/T_i ( i ) ∗K_P( j ) . ∗K_V∗K_conv_ref_dq ] ;
20 %denomi nator of the t r a ns f e r f unct i on
den_parameter =[ m_ref ∗ c_ref ( K_conv_ref_dTr+K_cond_ref+K_P( j ) . ∗K_V∗K_conv_ref_dq) 1/T_i ( i
) ∗K_P( j ) . ∗K_V∗K_conv_ref_dq ] ;
22 %Creati ng the t r a ns f e r f unct i on
G_closed=t f ( num_parameter , den_parameter ) ;
24 %Apply the s t ep f unct i on to obtai n the response , usi ng the ti me
%vect or t
26 y=s t ep ( G_closed , t ) ;
%Cal cul at e the over shoot f or the s t e pf unc t i on
28 m=max( y) ;
%Cal cul at e the s e t l i n g ti me wi th 2% devi ance from the i nput of the
30 %s t ep . s i s the f i xe d number of sampl es
s =10001; whi l e y( s ) <1.02 & y( s ) >0. 98; s=s −1; end ;
32 %Convert from sampl es to ti me i n s mul t i pl y wi th the ti me s t ep
s e t l i ngt i me =(s −1) ∗ 0 . 1 ;
34 %Sort the s t ep r es pons es and save the ones that f i t s i ns i de the
%parameters of the demands from the r epor t and <10 second s e t l i n g
36 %ti me
i f m<1.10 && m>1.01 && s e t l i ngt i me <10
38 k=k+1; %Count up the var i abl e f or t abl e .
t abl e ( k , 1 )=K_P( j ) ; %Save the gai n i n 1 s t column
40 t abl e ( k , 2 )=T_i ( i ) ; %Save the i nt e g r a l const ant i n 2nd column
t abl e ( k , 3 )=m; %Save the maximum over shoot i n 3rd column
42 t abl e ( k , 4 )=s e t l i ngt i me ; %Save the s e t l i n g ti me i n the 4th column
end
44 end
end
46 %stop the ti me c a l c ul a t i o n and pl ot i t i n the command window
toc
48 %s or t the t abl e from the s i mul at i ons wi th solumn 3 i n ascendi ng or der
sor t edr ows=s or t r ows ( tabl e , 3 ) ;
50 K_P=sor t edr ows ( : , 1 ) ;
T_i=sor t edr ows ( : , 2 ) ;
52 f =0;
f or j =1: 1: 3;
54 num_parameter=[K_P( j ) ∗K_V∗K_conv_ref_dq 1/T_i ( j ) ∗K_P( j ) . ∗K_V∗K_conv_ref_dq ] ;
den_parameter =[ m_ref ∗ c_ref ( K_conv_ref_dTr+K_cond_ref+K_P( j ) . ∗K_V∗K_conv_ref_dq) 1/T_i ( j ) ∗
K_P( j ) . ∗K_V∗K_conv_ref_dq ] ;
56 G_closed=t f ( num_parameter , den_parameter ) ;
f=f +1;
58 y ( : , f )=s t ep ( G_closed , t ) ;
end ;
60 %Create the l a be l s f or the f i g ur e l egends
l abe l 1 =[ ’ K_P = ’ num2str (K_P( 1) ) ’ and T_i = ’ num2str ( T_i ( 1) ) ] ;
62 l abe l 2 =[ ’ K_P = ’ num2str (K_P( 2) ) ’ and T_i = ’ num2str ( T_i ( 2) ) ] ;
l abe l 3 =[ ’ K_P = ’ num2str (K_P( 3) ) ’ and T_i = ’ num2str ( T_i ( 3) ) ] ;
64 %pl ot the s t epr es pons e f or the r e f e r e nc e c o nt r o l l e r
f i g ur e ( 1)
66 pl ot ( t , y ( : , 1 ) , t , y ( : , 2 ) , t , y ( : , 3 ) )
axi s ( [ 0 1 0. 5 1 . 0 2 ] )
68 l egend ( l abel 1 , l abel 2 , l abel 3 , ’ L o c a t i o n ’ , ’ S o u t h E a s t ’ )
%Pl ot t i ng the s t epr es pons e f or the cur r ent dens i t y c l os e d l oop t r a ns f e r
70 %f unct i on .
f =0;
72 f or j =1: 1: 3;
cl osedl oop_num=conv([ −1 1/60] ∗(K_H2BURN−K_SR−K_ref_ff ∗37∗K_conv_ref_dq) , [ 1 0 ] ) ;
74 cl osedl oop_den=conv ( [ 1 1/60] , [ m_ref ∗ c_ref ( K_cond_ref+K_conv_ref_dTr+K_V∗K_P( j ) ∗
K_conv_ref_dq) 1/T_i ( j ) ∗K_V∗K_P( j ) ∗K_conv_ref_dq ] ) ;
G_closed_i=t f ( closedloop_num , cl osedl oop_den ) ;
76 f=f +1;
y_di sturbance ( : , f )=s t ep ( G_closed_i , t ) ;
78 end ;
80 f i g ur e ( 2)
pl ot ( t , y_di sturbance ( : , 1 ) , t , y_di sturbance ( : , 2 ) , t , y_di sturbance ( : , 3 ) )
82 l egend ( l abel 1 , l abel 2 , l abel 3 , ’ L o c a t i o n ’ , ’ S o u t h E a s t ’ )
198

ii

Title: [Control of methanol fuelled HTPEM fuel cell system] Semester: [10th] The period of work: [02-09-08 to 03-05-09] Supervisor: [Søren Juhl Andreasen] Group: [EMSD10] Supplement: [CD]

SUMMARY:
This project presents a nonlinear model of a methanol fuelled high temperature PEM fuel cell system in a two stage operation. The system contains an evaporator unit, a reformer and burner unit and a fuel cell stack. The nonlinear model simulates a start up and a running mode. The nonlinear model is converted to a linear model and the linear model is used for testing a PI-controller. A fuel estimator is created with the purpose of installing into a running system. The theoretical results showed a reasonable result compared to measured data. The project contains a mathematical parameter search routine for obtaining the controller parameters. The electric efficiency is calculated to about 20% and can be seen in the nonlinear model.

[Simon Lennart Sahlin]

[Jesper Kjær Sørensen]

Prints: [6] pcs. Number of pages: [119] pages Appendix pages: [121 - 198] pages

ii

scripts. The bibliography contains the information about the articles and books used in the project.y and not encapsulated but numbered by the chapter x and a figure number y. The report contains a CD containing the models. appendixes and experimental data presented in the report.2 corresponds to the 2nd figure in the 1st chapter.7) corresponds to the 7th equation in the 6th chapter.e figure 1.Preface This report is a master thesis for two students attending the 10th semester of Electro Mechanical System Design at the university of Aalborg. and thermodynamics in general. The report requires that the reader has a common knowledge about control strategies. Figures marked figure x. The following notations are used in this report. i. i. iii .y) and numbered by the chapter x and the equation number y. In some cases the figures are noted with a letter if the figures are placed next to eachother. A PDF version of the report can be found on the CD. fuel cell systems. Citations are encapsulated in [x] where x is a number. The number corresponds to an entry in the bibliography. Appendices are noted with a capital letter and can be found in the back of the report. Equations are encapsulated in (x.e (6.

iv .

. . 1. . . . . . . . . . . . . . . . 1 3 6 7 11 11 13 13 28 31 34 35 36 . . . . . . . .3 Reformer . . . . . . . . . . . 46 4 Validation of models 47 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Summary . . . . 57 5 Control strategies 5. . . . . . . . .1 General control systems 5. . . . . . . . . . . 2 Nonlinear system model 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 Project scope . . . . . . . . . . . . . . . . 39 3. . . . . . . . 5. . . . . . . . . . . . .1 Fuel cell . . . .2 Types of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v . . . . . 6. . . . . . . . . .1 Experimental setup 6. . . . . . . . . .4 Project goal . . . . . . . . . .5 Summary . . . . . . . . . . . . . . . . . . . . . . . .3 Summary . . . . . . . . . . . . . . . . .3 Evaporator model . . . . . . .2 Reformer model . . . . 5. . . . . 6 Implementation 6. . . . . . 1. . . . . . 47 4. . . . . .2 Summary . . . . . . . . . . . . .6 Summary . . . . . . . . .2 Temperature control . . . . .2 Validation of linear model . . . . . . . . . . . . . . . .4 Simulated run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 59 66 78 85 87 87 89 92 105 109 . . . 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. . . . . . . . . . . . . . . . . 2. . . . . . .1 Fuel cell model . . . . . . . . . .1 Validation of nonlinear model . . . . . . . .1 Linearisation of the temperature models . . . . . . . . . 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Controller design . . . . . . . .Contents 1 Introduction 1. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Components of the system 1. 52 4. . . . . 3 Linear system model 39 3. .4 Fuel estimation . . . . . . . . . . . . . . . . . . .2 Evaporator . . .5 System efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 137 . . . . . . . . C. . . . . . . . . . . . . . . .1 Constants . E. . . . . . . . . . . . . . . . . . . . 137 . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 B Description of model B. . . . 138 . . . . . . . . . . . 123 A. . . . . . . . . . 182 . 187 191 . . . 191 . . . . . . . . . . . . . . . . . . . . . . . . . . . . C. . . . . .4 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 FPGA Program D. . . . . . .3 Experiment with cooler . . . . . .7 Heat generated . . . . . . . . . . . . . . . . . .6 Linear voltage approximation C. . . . . . . . . . D Labview program D.2 Cell voltage . . . . . . . . . . . . . . . . . .2 Fzero conservation of mass . . . .4 Cathode loss . . . . . . . . . . 183 . . . . 195 . .2 Experiments with reformer . . . . . . .4 Controller parameter search . . . . . . . C. . . . . . . . . .5 Anodic loss . . . . . . . . . . 186 . . . . . . . . . . . . . . . . . . .2 Simulink model . . . . . 171 171 172 172 173 175 177 178 C Linearisation C. . . . . . . . . . . . . . . . . . . . . . . . . 163 . B. . .CONTENTS 7 Conclusion 8 Future work 9 Project Summary References Appendices 111 115 117 119 A Experiments 121 A. . . . . . . . . .1 Convective loss . . . C. . . . . . . . . . . D. . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Host program .3 Reformer model . . . . . . . . . . . . . . . . . . . . . . . . . C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Repeating simulation optimizer E. . . . 193 .1 Fzero coverage . . . . . . . . . . . . . E. B.1 Description of system . .5 Evaporator . . . . . . . . . . 181 . . . . .4 Fuel Cell . . . . . . . . 121 A. . . . . . . .3 Nonlinear voltage parts . . . . . . . . . . . . . . . . 150 . . . 142 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi . . . . . . . . . . . . . . . . . . . . . . . . 198 E Matlab scripts E. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D. . . . .2 RT program . . . . . . . . . . . . . . . . . . . . . . . . . . . B. . . . . . B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

s nent [kJ/kg − K] Disturbance signal Electrochemical surface area SC WGS vii .f G(s) GDL h Pump frequency [Hz] Transfer function Gas diffusion layer Enthalpy pr unit [kJ/kmol] Feed back transfer function Exchange current density [A/cm2 ] Constant ration for the mass balance of the reformer Constant of linearisation of the j’th process with the i’th variable Mass of the j’th component [kg] Number of cells in the stack Universal gas constant [J/(mol · K)] System reference signal Diffusion resistance [Ω · cm2 ] Transport lag time constant [s] Cell temperature [K] Nomenclature αc ¯ kj nj ˙ qair ˙ ηact Charge transfer coefficient [−] H(s) io Kcom Kji The k’th working point variable for the j’th component mj Molar flow of j’th gas stream [kmol/s] Volumetric flow rate[l/min] Activation loss [V /cell] ncell R R(s) ηanode Combination of the activation and Rdif f diffusion loss at the anode Tl ηcath Combination of the activation and Tcell diffusion loss at the cathode ηconc ηF C Concentration loss [V /cell] Electric efficiency of the system [−] Tref orm Reformer temperature [K] TStack The stack temperature [K] voc Open circuit voltage [V /cell] ηohmic Ohmic loss[V /cell] λ λH2 ρj C(s) cj D(s) ESA Air stoichiometry ratio [−] Hydrogen stoichiometry ratio [−] Vpump Stroke volume of the pump [l] EES Engineering Equation Solver Empirical constant [V ] Faradays constant [C/mol] Complex variable for the laplace transform Steam to carbon ratio [−] Water Gas Shift reaction Density of the j’th substance [kmol/m3 ] EMP System output signal F Specific heat capacity of the j’th compo.

CONTENTS viii .

Introduction 1 1.3. This project will thereby investigate the use of methanol as fuel in a fuel cell system. For this reason research needs to be done on alternative ways of supplying energy to use for transport and general electric demands.4 1.3 Reformer and Burner Project goal Project scope 1. a few possible choices are presented.3.2 Evaporator 1. which makes the use in automobile applications complicated. the SOFC must operated at high temperatures (above 800 ◦ C). Solid oxide fuel cell(SOFC).1 1. increasing demands for alternative energy sources has emerged. The high temperature causes the startup time to be larger. while the AFC and PEMFC needs to be fed with hydrogen of a high purity. direct methanol fuel cell (DMFC).2MW). DMFC is often discussed as a good choice for automobiles since no reformer is needed. alkaline fuel cell (AFC) and polymer electrolyte membrane fuel cell (PEMFC).5 Fuel cell 1. The cost of components does also have a negative effect on SOFC systems. The DMFC is fed directly with methanol. compared to intermediate temperature fuel cells.1. carbon monoxide. Methanol can be produced from almost any hydrocarbon fuel. All of these types of fuel cells are still being investigated. and with quite high efficiency. Recent studies suggest that global warming is not all caused by natural means alone. currently being developed. A mixture of hydrogen.1) and (1. Using hydrogen gives the fuel cell a good dynamic load resistance and has a non-polluting exhaust. Taking a closer look at the fuel cell types.3 1.1 Fuel cell structure Types of operation Components of the system 1. and carbon dioxide is mixed together as seen in (1. SOFC’s is used in a wide variety of applications.2) 1 . though performance is rather limited because of lower reaction rate. because they all have different advantages. To function properly. [11] Methanol is a low-cost high energy liquid.5.1 Fuel Cell Stack 1. and based on the current infrastructure for gasoline.1 Project Limitation Within the last century. though it is often found in a stationary power generation and with a high power output(300kW . implementation can be adapted fairly easy.2 1. and fossil fuel resources is predicted to deplete in the near future.3.

In the case of hydrogen generation.1 Introduction 2H2 + CO → CH3 OH or 3H2 + CO2 → CH3 OH + H2 O (1. with an efficiency at about 60% and a cost pr Joule similar to the current refined diesel and gasoline prices.1) (1. The LHV of methanol is 19. The HTPEM fuel cell does not require any humidification of the cathode and this is why a fairly simple system can be created. HTPEM fuel cells work at about 160-200◦ C and is suitable for automobile projects. is often up to several percent. the concentration of CO. Further description of the system can be found in section 1. A fuel cell system can be designed in a lot of ways.2. CO2 and H2 O. though prices are about a factor of 3 in favour of the gasoline[11]. This amount is based on the lower heating value (LHV) of the fuel and is the power used to operate the process. If a hydrocarbon fuel is used. By reforming methanol into a high energy reformat gas. since the reaction do not occur unless the conditions are right. The biomass process is estimated to create methanol.93 kJ/kg and corresponds to an efficiency of about 70%. though studies on high temperature PEM fuel cell (HTPEM) has shown a higher tolerance of CO[10]. The complexity of the system is increased if the introduction of another fuel besides pure hydrogen. This excludes the low temperature PEMFC for now. as long as the composition of the gas and temperature is under control. and for estimation of controller parameters.2) These reactions are highly dependent on a suitable catalyst and a fairly high pressure (about 50 bar). Allthough most of the current methanol production is based on natural gas and other fossile fuels.This project will investigate the interaction between a reforming unit and a HTPEM fuel cell stack. CO. Excess hydrogen in the fuel cell exhaust gas is used as fuel for the burner part of the reformer. in the gas. Studies show that the composition of the reformatted gas can cause a highly degrading effect on a low temperature PEM fuel cell. 2 . a unit for converting the DC current into AC current. though the most common is often in its most basic form. Stateof-the-art plants are currently estimated to use about 29 kJ/kg of the supplied fuel. A reforming unit can reform the hydrocarbons into reformat gas containing H2 . a fuel cell stack. the high pressure and catalyst is fortunate. a fan/compressor for supplying the oxidant (Air) and a heat exchanger to extract the heat from the fuel cell exhaust. a reforming unit is needed for some fuel cells. A model will be created to investigate the relation between the different units in the system. in a few years. The system is going to be designed to increase the overall efficiency by utilizing excess heat from the fuel cell stack to evaporate the initial methanol liquid. it can also be producd from renewable biomass.

When fuel and oxidant are present at the two catalyst layers. This surface area is often called the electrochemical surface area (ESA). see figure 1.95V at open circuit. an electrical potential difference is created. The gas and oxidant is diffused through the gas diffusion layer (GDL) to the catalyst layers.1. normally the cells are stacked to create a more applicable potential. which is placed on both sides of the membrane. If higher voltages is needed. Assembling cells in a fuel cell stack has the advantage of increasing the potential. which is key for getting a high reaction rate. The platinum acts as a catalyst by increasing the surface area. hydrogen is the preferred fuel.1 Fuel cell This section describes the basic structure and reactions used in a fuel cell. though this will drop when a current is drawn. 1.1 Introduction 1. The reactions are based on a hydrogen based fuel cell. the performance of the cells is very dependent on temperature. The cathode and anode is considered positive and negative respectively.1. Fuel and oxidant need to be distributed evenly to the individual cells. This potential can be connected to a load and a current can be drawn. The membrane layers are porous carbon layers with dispersed platinum particles. which also demands the cells to be cooled evenly in the stack. but it also complicates matters.1: Structure of a single fuel cell unit The typical voltage of a single HTPEM fuel cell will not exceed 0. 2 1 H2 4 3 5 6 7 1: Anode bipolar plate 2: Anode gas diffusion layer (GDL) 3: Anode catalyst layer I 4: Proton exchange membrane (PEM) 5: Cathode catalyst layer O2 Load 6: Cathode gas diffusion layer 7: Cathode bipolar plate Figure 1. but it often presents volumetric problems because of the low density. Furthermore.1 Fuel cell structure As seen in figure 1. When considering the energy 3 .2. the H2 rich reformat gas and oxidant O2 are distributed through the channels in the bipolar plates on both the anode and cathode side respectively. [8] When working with fuel cells.

and can be used directly in a PEM cell(DMFC).5) 4 . The overall reaction in a fuel cell is shown in reaction (1. The Hydrogen Oxidation Reaction(HOR) and the Oxygen Reduction Reaction (ORR) as shown in reaction (1. By using hydrocarbons as e. hydrogen reacts with oxygen. Since the HTPEM works at temperatures of 160-200 o C.4) (1.1 Introduction Load Electrolyte Anode Cathode Hydrogen Oxygen Figure 1. though with a higher CO concentration in the gas. H2 → 2H + + 2e− 1 O2 + 2H + + 2e− → H2 O 2 (1.3) 1 H 2 + O2 → H 2 O 2 (1.5) respectively.3) shows that. methanol the volumetric problems is lesser.g.2: Simple edge connection of four cells in series density in kW h/m3 .4) and (1. and the product is water. This is why a reforming process is more suitable. there is about 8 times more energy pr volume in methanol compared to hydrogen at 200 bars [2]. This method of using methanol has proven to be with a poor performance and a complicated water management system is needed. This reaction can be divided into two reactions.3) The reaction (1. it has a very high tolerance to CO and is therefore an ideal choice when working with reformer systems[7].

This opens up for other problems like thermal requirements and more system management. A ratio between the amount of methanol and the amount of water in the fuel mixture is called the steam to carbon ratio (SC). The reformation process is an endothermic reaction that combines a hydrogen rich fuel with steam over a catalyst at high temperatures.6).3: Electron flow in a hydrogen fuel cell The HOR reaction occurs at the anode and is often much faster compared to the ORR reaction which happens at the cathode.9) By using a reformation process the storage of hydrogen can be avoided. CH3 OH + H2 O ↔ CO2 + 3H2 (1. and decrease CO.1 Introduction Anode 2H2 1 2 O2 → H+ 2e− + → 2e− Load H2 O H+ ions through electrolyte Cathode + H+ + Figure 1.8) (1. The steam to carbon ratio is an important factor for the steam reforming process. a water gas Shift (WGS) catalyst is utilized. The WGS reaction can be seen from (1. To further increase the H2 . The need for vaporized water to bind with the CO during the reformation process[16].6) with the steam to carbon ratio.7) which is the sum of the methanol decomposition and the water gas shift(WGS): CH3 OH ↔ CO + 2H2 CO + H2 O ↔ CO2 + H2 (1. and this leads to a brief introduction of the different components of a reforming system. The methanol is reformed by a steam reforming process and can be seen in (1.6) The calculation for the water part is performed by multiplying (1. The calculation of the portion of methanol in a mixture of methanol and water can be seen from (1.9). Vmix = VM eOH + VH2 O = VM eOH + SC · VM eOH 1 VM eOH = · Vmix 1 + SC (1.7). 5 .

The anode gas inlet line is connected to a cooler which ensures that the anode gas has the right temperature of 180 ◦ C. startup mode and running mode.4: Schematic of the system design The components will be discussed in detail in section 1. The cooler is connected to a WGS reactor that removes CO gas from the reformat gas. The system is designed to operate in two modes. The gas inlet side of the reformer is connected to the gas outlet side of the evaporator and the evaporator gas inlet side is connected to a fuel pump. The fuel cell stack chathode inlet side is equipped with a blower that supplies air from the surroundings. The WGS-reactor is connected to the gas outlet side of the reformer.1 Introduction The system consists of a HTPEM fuel cell stack with 65 cells and a blower for the anode convection of the stack. 1. While the system is in the startup phase. the running phase. The anode gas outlet line is connected with the burner gas inlet. The pump is connected to a fuel tank. This will be described in the next section. The exit air from the fuel cell is transported to the evaporator for heating purposes. Initially the evaporator is heated up with electric heaters installed in 6 .2 Types of operation The system process is divided into 2 phases which contain the startup phase. This can be seen from the schematic in figure 1.3.4 Air Blower Reformer Burner WGS Cooler Fuel Cell Load A V Blower Evaporator Air Exhaust Air Methanol + H2 O: 20-40o C Air flow: 20o C Methanol + H2 O: 120-250o C Reformate (H2 + H2 O + CO + CO2 ): 500o C Exhaust gas (H2 O + CO2 + H2 ): 400o C Exhaust air flow: 20o C Methanol + H2 O Figure 1. The gas is mixed with air and is forced into the burner with the fuel. the main goal is to raise the temperature of the system components until the different operation temperatures are reached.

The system evaporates and reformats the methanol to H2 . and thereby adding heat to the evaporation process. is led into the burner. The exit of the anode side of the fuel cell. 7 . The startup phase of the system can be see in figure 1. 1. The evaporator vaporizes the methanol and this is fed directly into the burner. The exhaust gas from the burner is lead though the fuel cell stack and like in the normal running system and the exhaust air from the fuel cell is passing over the evaporator.5. thereby reducing the amount of CO and adding H2 in the reformat gas for the Fuel Cell. which is let though a WGS.5: Schematic of the system in the startup phase The system design for a running system is as shown in figure 1.CO and CO2 .1 Introduction the evaporator. where the fuel is mixed with air from a blower. because of the excess hydrogen. This results in a catalytic combustion of the methanol. The reformat gas is passed though a condenser to cool down the gas to a proper temperature to avoid damaging the Fuel Cell. The heat of the exhaust air transferred from the fuel cell is directed into the evaporator.6.3 Components of the system This section has the purpose of describing the different parts of a fuel cell system. Air Blower T T Reformer Burner WGS Cooler Fuel Cell P T P T T T Blower T Evaporator Air T Exhaust Air T T Methanol + H2 O Methanol + H2 O: 20-40o C Air flow: 20o C Methanol + H2 O: 120-250o C Reformate (H2 + H2 O + CO + CO2 ): 500o C Exhaust gas (H2 O + CO2 + H2 ): 400o C Exhaust air flow: 20o C Figure 1. and then out of the system. where the gray lines are not it use.

The combustion of the excess hydrogen is used to add heat to the endothermic reactions happening in the reformer.3. 8 . The cells are connected in a serial connection and the fuel cell stack is insulated with a melamine foam layer with a thickness of 0. The air is heated inside the stack and transfers the heat out of the stack through the exhaust. A typical HTPEM can be seen from figure 1.03m. The stack is initially supplied with 120% of the needed hydrogen in order to have 20% excess hydrogen. Fuel is fed to the fuel cell stack from the reformer and distributed through the gas channels.1 Introduction Air Blower T T Reformer WGS Cooler Fuel Cell Load A T V Burner P T P T T T Blower Evaporator Air Exhaust Air T T T Methanol + H2 O Methanol + H2 O: 20-40o C Air flow: 20o C Methanol + H2 O: 120-250o C Reformate (H2 + H2 O + CO + CO2 ): 500o C Exhaust gas (H2 O + CO2 + H2 ): 400o C Exhaust air flow: 20o C Figure 1.1 Fuel Cell Stack The fuel cell stack contains 65 single fuel cells and each cell has a reactive area of 46. is kept at a given interval. The stack is fed with air at room temperature from an electrical blower. within the stack. The operating temperature of the fuel cell stack has an interval between 433 K (160 ◦ C) and 473 K (200 ◦ C) which is typical for a HTPEM cell.6: Schematic of the system in the running phase 1. where the methanol and watermixture is reformed to be used as fuel for the fuel cell stack.16cm2 . During operation the cells in the stack produce heat and to ensure that the temperature.7.

on the side that is in contact with the top of the heat exchanger.2 Evaporator The evaporator is a heat exchanger made of two aluminum parts. The installed evaporator can be seen in figure 1. The temperature of the 9 .3. and with a total mass of 0.9(b).8 Air input Gas output Methanol input Air input Figure 1. In order to avoid leakage a rubber O-ring is inserted in the assembly of the heat exchanger parts.7: Picture of a HTPEM fuel cell 1. Heat is added to the heat exchanger. for the methanol flow.8: Picture of the evaporator without isolation The two parts of the heat exchanger can be seen from figure 1. see figure 1.9(a) and figure 1. both from the cartridge heaters and from the passing hot exhaust air. The heat exchanger is build into a chamber connected to the exhaust of the fuel cell stack.1 Introduction Figure 1. The methanol enters the flow channels from the pump and is in the fluid phase and at room temperature.5kg. The heat exchanger has 34 fins on each side and the bottom has two mounting slots for the electrical cartridge heaters. The bottom of the heat exchanger has flow channels.9(b).

10(b).1 Introduction (a) Bottom (b) Top Figure 1. into a more useful composition.3 Reformer and Burner The reformer and burner have the function of changing the gas from the evaporator. and a view of the reformer installed can be seen from figure 1. The methanol mixture expands during the vaporization and this expansion moves the vaporized methanol mixture through the evaporator during operation. This step is required by the reformer because the fuel needs to be in gas form for the reformation can happen. (a) Side view (b) Installed view Figure 1.10: Images of reformer 10 .10(a).9: Cad model of the evaporator methanol mixture increases until the boiling point is reached and the methanol mixture starts to vaporize. Steam reforming is the most common way to obtain hydrogen from hydrocarbons in systems.3. 1. The reformer can be seen from figure 1.

If there is a high amount of carbons. from the fuel cell. steam reacts though a catalyst to produce H2 and CO2 . methanol and carbon monoxide. pressure and the molar steam to carbon ratio. the use of the exhaust air.1 Introduction The CO tolerance in fuel cells varies from around 20ppm for low temperature PEM fuel cells to around 3% for high temperature PEM fuel cells[6]. In many systems. Within the project scope is the modeling of the system. To increase the efficiency even further. is used to heat up the evaporator.11) is happening at the same time. both nonlinear and linear. where Steam Reforming is applied.11) In the steam reforming process. as seen in (1. Other parameters in the process is temperature. A PI control strategy will be tested and evaluated. CH3 OH + H2 O → CO2 + 3H2 (1. the reformatted gas contains mostly hydrogen.4 Project goal The overall goal of the project is to investigate different control strategies on a HTPEM based fuel cell system. is endothermic and heat must be supplied. Depending on the operating conditions of the reformer.10) In the reformer a WGS reaction (1. This project will investigate the possibility to use the unused hydrogen from the fuel cell as fuel for a burner. the higher amount of heat is needed to evaporate it. and the optimization issues in HTPEM fuel cells. More specifically the focus is to improve the overall power efficiency by investigating control strategies. This WGS reaction is an exothermic process and it releases heat. An overall model of the system can be seen in figure 1.10). The goal of the models should be to test different control strategies. water. 1.6.5 Project scope This report will focus on the following tasks: 11 . with lesser amounts of carbon dioxide. 1. The overall steam reforming reaction. CO + H2 O ↔ CO2 + H2 (1. there is a need for an extra purifier so the amount of CO is minimized. The heat needed in the process varies much on the amount of the number of carbons.

1 Project Limitation The project does not contain the following tasks: • The control systems implemented in this project is limited focusing on the linear continuous control strategies. • The cells of the fuel cell stack are assumed to behave uniformly and the temperature changes between the cells are neglected. • The internal convection from the gas passing through the reformer is neglected. • The heat loss of the pipeline connections between the components is neglected. • Investigation of the connection between the different parts of the system. 12 . • The temperatures of the gas is assumed to be the correct temperature when entering a component of the system.5. • Investigation of the controlling part of the system. • The moving air is distributed evenly through the components. • The temperature of the reformer is equal to the temperature of the burner.1 Introduction • Creation of a dynamic nonlinear model for the fuel cell system in Matlab Simulink™ • Verification of the fuel cell model by experiments and earlier studies. 1. • Linearisation of the created nonlinear model.

1 Fuel cell model The fuel cell model is divided into two parts.1 The fuel cell voltage 2.1 2.1 The load of the entire system based on the current density. The first part calculates the electric potential of the stack and the second part calculates the stack temperature. The models are solved with an ordinary differential equation solver called ”ode15s”.1. The first section represents the mathematical model of the fuel cell stack.2 Calculating voltage loss 2. The chapter consists of three sections.3 2.5 2.1.2 2.2.1.1 Evaporator temperature Fuel estimation System efficiency Summary This chapter contains a presentation of the mathematical model that represents the system components presented in Chapter 1.6 Fuel cell model 2.1 Reformer temperature 2. The second section is the model of the reformer and the last section contains the model of the evaporator. 13 .Nonlinear system model 2 2. The models are created in Simulink(TM) and a description can be seen in Appendix B. This indicates the power demands from the electrical load.2.3.2 Reformation process Evaporator model 2. The system is subjected to a load pattern that can be seen from figure 2. 2.4 2. connected to the fuel cell.3 Fuel cell temperature Reformer model 2.

1: The current density load pattern 2. the gibbs free energy can be used.1. The voltage equation for the fuel cell is based on a difference between the voltage at thermodynamic equilibrium.1) VStack = ncell · (vrev − ηact − ηohmic − ηconc ) (2.2 0. and the loss involved in the increasing of the current. The Gibbs free energy is defined as: G=H −T ·S 14 (2. When current is drawn from the fuel cell. The reversible cell voltage of most feasible fuel cell reactions varies in the range of 0.8V to 1.5 0. ηact is the activation loss due to reaction kinetics.5V.4 0.2 Nonlinear system model 0. The main difference is that the fuel cell can deliver a voltage for as long as the reactants can be supplied.7 0. ηohmic is the ohmic loss. whereas the battery deteriorates at some point.3 0. The voltage of the stack can be represented by (2. the voltage is decreased in order to keep up the equilibrium. The term reversible voltage vrev is the voltage produced at thermodynamic equilibrium.1) where vrev is the reversible voltage of a single cell. several cells are stacked together in series[8].2 To calculate the theoretical value of the reversible voltage. where no current is applied.6 Current density [A/cm2 ] 0. If a higher voltage is needed from a fuel cell system.1 0 0 5 10 15 x 10 4 Time [s] Figure 2.1 The fuel cell voltage The fuel cell works almost like a battery delivering a voltage based on an electrochemical reaction between the reactants hydrogen and oxygen.2) . ηconc is the concentration loss due to mass transport.[8] The characteristics of these losses can be seen in figure 2.

if ∆G is positive. then work would be to be added to the reacting system to make the reaction go.3) The electrical work done by moving a charge Q [C] through an electrical difference E is Welec = EQ (2.2 Nonlinear system model Reversible Voltage Cell Voltage (V ) Cell Voltage (V ) Activation loss Cell Voltage (V ) Ohmic loss Current density (A/cm2 ) Current density (A/cm2 ) Current density (A/cm2 ) Concentration loss Cell Voltage (V ) Net fuel cell performance Cell Voltage (V ) Current density (A/cm2 ) - = Current density (A/cm2 ) Figure 2. If a system changes from one initial state to another. In contrast.4) The charge Q can be related to the number of electrons that can be moved between an electrical difference Q = nF 15 (2. during a reversible transformation from initial state to the final state. the Gibbs free energy is at its minimum. The relationship between Gibbs free energy and voltage can be seen in the electrical work done calculated from (2. at constant pressure and temperature. When the ∆G is negative it means that the reaction will release energy. When a system reaches equilibrium.5) . the Gibbs free energy ∆G equals the work exchanged by the system with its surroundings.2: Pictorial summary of major factors where G is the Gibbs free energy. T is temperature and S is entropy. The Gibbs free energy is the maximum amount of non-expansion work that can be extracted from a closed system.3) Welec = −∆ˆrxn g (2. H is enthalpy.

The model uses an open circuit voltage of 0.4) and (2.95 V based on [15]. Mass transport of H2 gas to the electrode: (H2(Bulk) → H2(near electrode) ) 2. Transfer of electrons from the chemisorbed hydrogen atoms to the electrode. Absorption of H2 onto the electrode surface. it is found that the voltage is much less than the theoretical values. This is caused by the activation loss is still present at no current density. the number of electrons released is 2. For example. Separation of the H2 molecule into two individually bound hydrogen atoms onto the electrode surface.14V /cell. there is an energy barrier. when operating at a temperature of 200o C. (M · · · H2 + M → 2M · · · H) 4. where M is the electrode: (H2(Near electrode) + M → M · · · H2 ) 3. By combining (2. ∆ˆ = −nF E g ∆ˆ g E = − nF (2. Activation loss Because of the bonds of the atom and the electrode surfaces. This is also called chemisorbed.6) The theoretical open circuit voltage is calculated to about 1. releasing H + ions into the electrolyte: + 2 × M · · · H → (M + e− ) + Hnear electrode 5. dp = 0). Mass transport of the H + ions away from the electrode 16 .3). the overall reaction H2 ⇋ 2H + + 2e− : 1. (2.2 Nonlinear system model where n is the number of moles of electrons transferred and F is Faraday’s constant. However.3) we get an expression for the reversible voltage at a constanttemperature and constant-pressure process (dT. due to the activation loss not being zero when the current density is equal to zero. If the reaction is hydrogen based. when the fuel cell is put to use.

3. in order for reactants to be converted into products. H. Separating the atomic hydrogen from the metal surface destroys this bond. Curve 1 in figure 2. The probability for this to happen. It can be noticed that the H + ion has the highest free-energy when the ion is close 17 Free energy Products H2 O Reaction progress 2 Free energy 1 ∆G+ 1 ∆Grxn ∆G+ 2 Distance from interface Figure 2. determines the rate of which the reaction occurs. it must first make it over the activation hill.4: Free energy compared to distance from interface . thus increasing the free energy.4 depicts the free-energy of the chemisorbed atomic hydrogen. The chemisorption improves the hydrogen stability by partially satisfying the bonding requirements. Now consider curve 2 which describes the free-energy of a H + atom in the electrolyte.2 Nonlinear system model + + 2 × H(near electrode) → H(bulk electrolyte) The overall reaction is limited by the slowest step in the series. which increases with distance from the metal surface. Reactants (H2 + O2 ) ∆Grxn ∆G+ Figure 2. As shown in figure 2.3: Activation barrier (∆G+ ) which needs to be exceeded to convert reactants to products The M · · · H represents a hydrogen atom chemisorbed on the metal surface and the (M + e− ) represents a liberated metal surface site and a free electron in the metal. thus lowering the free energy.

At the same time.4. If the fuel cell is operated on H2 and air. and they can be converted into either products or reactants. products must be removed from the fuel cell to avoid “strangling” of the cell. Reactant depletion or product accumulation at the fuel cell catalyst layer can severely affect the fuel cell performance. and the fact that the reactant at the cathode is not pure O2 . Concentration loss For the fuel cell can produce electricity. only the cathodic overvoltage is important.5 is an illustration on how the diffusion layer influences on the concentration of hydrogen at the electrolyte. The concentration loss in a fuel cell often represent the limit of the current density. 18 . This is caused by the OOR reaction is slower compared to the HOR reaction. there is a possibility of reactant depletion and product accumulation.5: Schematic of diffusion layer The schematic shown in figure 2. The loss in performance is called the “concentration” loss or “mass transport” loss. Consumption of H2 gas in the electrode results in a depletion of H2 . H2 If the current density is set high. The highest point in the figure describes species in the active state that have overcome the free-energy barrier. H2 Flow Electrode H2 H2 H+ H2 Concentration c0 H2 O2 Diffusion layer cH2 Anode Distance Electrolyte Cathode Figure 2. The concentration of H2 gas falls from its maximum value (c0 ) to a lower value (cH2 ) at the catalyst layer.2 Nonlinear system model to the metal surface. a continual supply of fuel and oxidant must be available. The movement of supplying reactants and removing products is often termed “mass transport”. This means that the “easiest” (minimum) energy path for the conversion of chemisorbed hydrogen to H + and (M + e− ) is given by a blue line in figure 2.

1. The forward and backward rate terms are calculated by the inverse hyperbolic sinus function.9). αa is the anode charge transfer coefficient. and assuming a symmetry factor of α = 0. θH2 expresses the surface coverage of hydrogen and keh is the H2 electro oxidation rate.8). This voltage loss is essentially proportional to current density. Ohmic loss Ohmic loss is the resistance in the flow of electrons through the voltage connections.9) where Tcell is the cell temperature. Anode loss and cathode loss. using a numerical solver in MATLAB and return the value for the H2 coverage to the Simulink model. Tc ell is the stack temperature. the anode loss equation is simplified to (2.2 Calculating voltage loss The voltage loss in the fuel cell is split up in three parts: Ohmic loss.2 Nonlinear system model 2.7) where i is the current density [A/cm2 ] and Rohmic is the equivalent ohmic resistance [Ω · cm2 ].8) is verified by [10].7). R · Tcell i · sinh−1 αa · F 2 · keh · θH2 ηanode = (2. The linear nature of the function (2. The equations for both the coverage of H2 and CO can be seen in Appendix B. The cell temperature is assumed to be the same as the stack temperature. and the resistance of the ions through the membrane. 19 .5. Anode loss The anode voltage loss is primarily based on the presence of CO in the syngas for the fuel cell. Rohmic (Ts ) = b1 + a1 · Tcell (2. Each of these are discussed below. This is linear when the temperature is constant and also referred to as resistive loss.2.8) where a1 and b1 are fitting parameters and presented in Appendix B.4. The model for the ohmic resistance is based on the resistance changes with the temperature of the cell and the change can be calculated from (2. ηohmic = i · Rohmic (2. Ohmic loss can be calculated using (2. The modeling approach is solving the equations for the coverage at equilibrium. Assuming Butler-Volmer kinetics applies to the system.

Stack temperature i0 (Ts ) = a2 · e −b2 1 −T 1 Ts limit (2.14 Exchange current density[A/cm2 ] 0. A modeling strategy for the exchange current density i0 from [15] was implemented in the model and the exchange current density increases as a function of the cell temperature Tcell . there is a need to specify a term that indicates the transfer rate at equilibrium.1. and they can be seen from appendix Appendix B. the surface of the electrode is more ’active’ and a current in one particular direction is more likely to flow.1 0. This “exchange current density” i0 is one of the main elements in performance of a fuel cell electrode.10).16 0.06 0. This means that the exchange current density value must be as high as possible. When the “exchange current density” is high. and is often indicated by i0 .10) where Tlimit is 433K(160o C) and the lower limit of the HTPEM’s temperature operating range.6. The exchange current density compared to temperature can be seen from figure 2. This is referred to as the “exchange current density”. see (2. found in earlier experiments[15]. The constants a2 and b2 are fitting parameters.08 0. These constants shape the exchange current density with the change in temperature. 0.04 0.12 0. The cathode loss is a summation of the activation loss and the concentration loss. The activation loss ηact is the voltage required to drive the chemical reactions at 20 .6: Exchange Current Density vs.2 Nonlinear system model Cathode loss Because of the continual backward and forward flow of electrons from and to the electrolyte.02 0 280 300 320 340 360 380 400 420 440 460 480 Fuel cell stack temperature [K] Figure 2. In the modeling of the cathode loss certain changes were made to comply with the HTPEM fuel cell used in the project.

13) is substituted by an empirical constant.14) 21 . Diffusion loss is commonly known as concentration loss and result from a decrease of the available reactant over the length of the fuel cell membrane[11]. R Tcell i ln 2·α·F i0 ηact = (2. Tcell is the cell temperature [K]. R · Tcell i + io · ln 4 · αc · F io ηconc = (2.13) where R is the universal gas constant [J/(mol · K)].11) The constant α is called the “charge transfer coefficient” and is held constant.13) R · Tcell Rdif f · i i + io + · ln 4 · αc · F io λ−1 ηcathode = (2.13) but with the exchange current density of (2.5. αc is the charge transfer coefficient [−]. It is assumed that the air stoichiometry is large enough to avoid concentration loss. For most electrochemical reactions.12). A stoichiometric ratio of 1 means that the amount of reactant is precisely enough for the reaction to occur.11). The modeling of the cathode loss is performed almost like the model mentioned in (2. The concentration losses can be calculated by (2. Activation loss is caused by the slowness of the reactions taking place on the surface of the electrodes. io is the exchange current density [A/cm2 ] and λ is the air stoichiometry ratio [−]. and a stoichiometric ratio higher than 1 results in an excess of reactants after the process has occurred. This loss is nonlinear and have a large impact at low current densities. The stoichiometry is a measure for the amount of reactant present for a given process. The last term of (2. α ranges from about 0. EM P (Ts ) = a30 · e−b30 (Ts −Tlimit ) (2. The activation loss can be calculated as shown in (2.2 to 0.12) The overall cathode loss can be calculated with (2. Rdif f is the diffusion resistance [Ω · cm2 ]. F is Faradays constant [C/mol].10).2 Nonlinear system model the electrodes of the fuel cell. which is commonly used in thermal fuel cell models.

1 0. can be seen from figure 2. Adding the changes from (2.1) and is rewritten to include the cathode and anode loss instead of activation and concentration loss.2 0.2 Nonlinear system model This constant EM P account for various deviations between the experiments and the model.16).3 0.7 0. These parameters have been obtained from simulation of the polarisation curve of the fuel cell. The change of the cathode voltage with the temperature held constant at 453K(180 ◦ C)and the current density changing.4 2 0.25 Voltage [V] 0. Stack voltage The governing stack voltage equation is shown in (2. The reason for the empirical constant is the loss is not linear at higher temperatures and the empirical factor is added[15].1 0.15) The charge transfer coefficient αc (Ts ) can be seen in Appendix B. i) = (2. R · Ts i + EM P (Ts ) · ln 4 · αc (Ts ) · F i0 ηcathode (Ts . see section 4. results in an equation for the cathodic voltage loss.2 0.5 0.05 0 0 0.15 0.7: Cathode voltage loss compared to current density at 180 ◦ C As the three voltage losses is described a stack voltage based on current density can be calculated.10) and (2.14) respectively. 22 .1.3 0.35 0.7 Current density [A/cm ] Figure 2. see (2. The constants a30 and b30 are the fitting parameters and they are presented in Appendix B.6 0.

3 Fuel cell temperature The temperature of the fuel cell stack is used in all of the equations for the voltage and it is a crucial part in modeling the fuel cell. It is assumed that the temperature of the stack is uniform and that all entrance and exhaust effects are neglected. ηcath represents the combination of the activation and diffusion loss at the cathode and ηanode represents the activation and diffusion loss at the anode. QConduction is the heat ˙ Convection is the energy transported lost from the fuel cell stack by conduction.8.2 Nonlinear system model Vstack = ncell · (voc − ηohmic − ηcath − ηanode ) (2. The model for calculating the voltage of the stack has been presented and it can be seen that most of the losses are directly affected by a change in the stack temperature. ηohmic is the ohmic loss. Heat generated inside the fuel cell stack In the model the fuel cell produces heat when in operation and the heat is calculated from (2.16) where Voc is the open circuit voltage. The voltage of the cell is the electric potential that is usable for running electric appliances. Ncell represents the number of cells in the stack. and Q away from the stack by forced convection.1. 23 .17). A schematic of the thermal model is depicted in figure 2. The heat is based on the difference of the reversible voltage vocv and the voltage drawn from the cell vcell .8: Thermal model of the Fuel Cell stack ˙ ˙ where QHeat is the heat generated inside the fuel cell stack. This 2. ˙ QConduction H2 ˙ QHeat Air ˙ QConvection Figure 2.

5 0. When the fuel cell is operating this is the only function in the stack that transfers energy into the system.16).3 0.6) and vcell is the cell voltage from (2.7 Current density [A/cm2 ] Figure 2.4 0. 800 700 Heat produced in fuel cell [W ] 600 500 400 300 200 100 0 0 0.2 0. The reason for the heat being generated is the voltage loss from (2.18) 24 .16) are converted to heat as the chemical reactions happen.9: Heat generated compared to the current density at constant temperature (180◦ C) The heat produced inside the fuel can be seen from figure 2.9 for a constant temperature of 453K (180 ◦ C). (2.8 it can be seen the loss of heat from the fuel cell stack to the surroundings is modeled as conduction. The heat must be transfered away by conduction and convection to keep a steady temperature in the fuel cell. ncell is the number of cells used to convert the cell voltage to stack voltage and Acell is the area of a single cell.2 Nonlinear system model ˙ QHeat = i · (vocv − vcell ) · ncell · Acell [W ] (2. As mentioned earlier it is assumed that the stack has uniform temperature and the conduction model can be seen from (2.6 0.17) where i is the current density and vocv is the open circuit voltage of the cell.1 0. Heat transfer due to conduction from the fuel cell stack From figure 2.

The mathematical model calculates the change in enthalpy of the air between the inlet temperature and the exhaust temperature. The enthalpy is multiplied with the molar flow of air resulting in a heat transfer rate. The thickness of the insulation is represented by the x in (2. a layer of insulation is applied. Ts is the stack temperature.19). It is assumed that the exhaust temperature is equal to the stack temperature. 25 .10. Heat transfer due to convection in the fuel cell stack Since the fuel cell stack needs oxygen to produce a voltage and since it can produce enough heat to create a high stack temperature. see (2.10: Heat transfered from the stack based on conduction For the reactions from (2. from the program Engineering Equation Solver (EES). convection must be applied by an external blower forcing air through the fuel cell stack.18) and k is a coefficient of heat transfer based on the type of the insulation applied to the stack.15) to occur oxygen must be supplied from ambient air and this involves the heat transfer by convection.2 Nonlinear system model (Ts − Tambient ) ˙ [W ] Qconduction = −k · Asurf ace · x (2. To prevent a high heat transfer by conduction. The insulation is melamine foam and it is assumed that the conduction is linear with the temperature. which can be seen from figure 2. The enthalpy is based on regressions for the enthalpy of air. Tambient is the ambien temperature. Asurf ace is the surface areal.18) where k is the thermal conductivity factor [W/m · K]. from the fuel cell stack. 20 18 Heat transfer from conduction [W] 16 14 12 10 8 6 4 2 0 280 300 320 340 360 380 400 420 440 460 Temperature of the fuel cell stack [K] Figure 2.

have been described and the temperature can be calculated in the following section.12 26 .11: Convection plotted against airflow at constant temperature(180o C) Plotting the convection against the airflow of the stack gives a view of the convection heat transfer. The heat transfers (2. The powers involved in the fuel cell stack thermal model can be seen from figure 2.19) are summed up in (2.19) where h(T ) is a regression for the enthalpy in kJ/mol of air as a function of temperature and nair is molar flow of air in mol/s. The heat production and heat transfers. The sign notation is positive for heat being created by the system and negative for heat being transported out of the system. The change in convection when the airflow increases has linear characteristics if the temperature of the stack is 453 K (180 ◦ C). ˙ 900 800 Heat transfer by convection [W] 700 600 500 400 300 200 100 0 0 50 100 150 200 Airflow through the fuel cell stack [L/min] Figure 2.18).20). ˙ ˙ ˙ ˙ Qstack = QHeat − QConduction − QConvection (2. (2.17).20) The difference in the heat lost and heat generated will result in the power applied ˙ to or substracted from the system. used in the model. and (2. depending on the sign of the sum Qstack and this will result in a change in temperature.2 Nonlinear system model ˙ Qconvection = nair · (h(Texhaust ) − h(Tinlet )) [W ] ˙ (2. The temperature of the stack When calculating the temperature of the fuel cell stack the heat transfers.

The convection balances (2. cstack is the ˙ specific heat capacity. 27 . mstack is the mass of the fuel cell stack. The calculation integrates over the power and changes the temperature as the time changes from 0 to a given time t[17]. It may be noted that since the temperature has a direct influence on the electrochemical loss of the fuel cell stack voltage.21) is kept constant.2 Nonlinear system model 1000 800 Powers in the fuel cell stack [W] 600 Heat produced Convection Conduction 400 200 0 −200 −400 −600 0 5 10 15 x 10 4 Time [s] Figure 2. The power generated inside the fuel cell stack is added to the fuel cell and the power from the convection and conduction is subtracted.20) so the temperature calculated in (2. From figure 2. The temperature of the fuel cell stack is modeled from (2.12: Heat transfers in the fuel cell stack ˙ The heat transfers is summed up to represent the heat tranfers of the system Qstack .12 it is shown that the convection has the same characteristics as the energy produced inside the fuel cell.21).21) where Ts is the stack temperature. The interconnection between the thermal model and the voltage model can be seen in Appendix B. 1 · mstack · cstack t 0 Ts = ˙ Qstack dt (2. it is important to keep the temperature at a steady state. and Qstack is the power transfered to or from the system. This concludes the presentation of the nonlinear fuel cell stack model and a presentation of the nonlinear modeling of the reformer can begin.

The modeling of the convection is performed analog to the convection of the fuel cell stack. The respective reactions happening in the reformer are divided into two types of reaction. 2. The reformer is heated by burning the remaining H2 in the cathode exhaust gas stream. The sign notation is positive when transferring energies into the reformer system and negative. The model neglects the convection by the reformat gas because the burner convection. From figure 2.burn Exhaust ˙ QConvection H2. ˙ QConduction M eOHin Gasout ˙ QSR Air ˙ QH2.19). see (2. A diagram of the energies taken into considerations can be seen from figure 2.2 Reformer model The reformer model is divided into two parts.in Figure 2.1 Reformer temperature Since the burner and reformer in the laboratory are integrated into one component the model of the reformer temperature receives the power from the burning of the H2 or CH3 OH depending on the respective mode of the system.13 depicting the energy transfers considered in the thermal model of the reformer. when the energies are consumed in the reformer. and the loss from the reformation process.13: Thermal model of the reformer.2. where air at room temperature is blown into the burner and leaves at the reformer temperature.7) and the enthalpy required to 28 . The steam reforming reaction can be seen from (1.13. The modeling of the temperature for the reformer is based on a summation of the heat transfers.2 Nonlinear system model 2. is assumed to dominate the temperature. The first part calculates of the temperature of the reformer and the second part calculates of the molar fractions of the reformat gas. The reformer temperature is controlled by forced convection from a blower. The heat loss from conduction is taken into account and the conductive power is modeled from (2.18).

This reaction breaks up the methanol into the respective gas components.24) when solving (2. The energies are summed up to balance the energy in the reformer system.24) with respect to the gas flow out of the reformer ngas a ratio ˙ between the fuel gas and the reformat gas can be calculated.23) mref ormer · cref ormer 0 2. This change from fuel gas to reformat gas is used later in the fuel calculation for the system.2. It is assumed that the steam reforming process only needs to break up the methanol part of the incoming fuel.7).2 Reformation process The governing reactions have been presented earlier.14.24) nM eOH · MM eOH + nH2 O · MH2 O = xM eOH · MM eoh · ngas ˙ ˙ ˙ +xCO · MCO · ngas + xCO2 · MCO2 · ngas + ˙ ˙ xH2 · MH2 · ngas + xH2 O · MH2 O · ngas ˙ ˙ (2.22) The temperature can be calculated by integration of the sum of the energy transfers. The change of the fractions compared to the temperature can be seen from figure 2. The mass of the fuel fed to the reformer must be the same as the mass of the reformat gas leaving the reformer. The mass balance can be seen from (2. and regressions have been made based on minimizing the Gibbs free energy and obtaining an equilibrium in the gas. The model of the reformer is bound by the law of conservation of mass and therefor a mass balance must be presented. This ratio is assumed constant with respect to the reformer temperature. The fractions are calculated in the reformer model and sent to the WGS. and of the 6th order.22) ˙ ˙ ˙ ˙ ˙ Qref ormer = Qburn − QConvection + QSR + Qconduction (2. In the model of the reformer it is assumed that the steam to carbon ratio is a constant of 1. see (1.4kJ/mol. The regressions are all linear regressions from EES.23) t 1 ˙ Tref ormer = Qref ormer dt (2.2 Nonlinear system model make the reaction happen is 49. These regressions are based on the steam to carbon ratio and the temperature of the reformer at which the reformation occurs[1]. The change in gas flow is applied with a constant Kcom .5. The fraction of the hydrogen in the gas decrease with higher temperature and the fraction of CO increase with increasing temperature. see (2. since the 29 . The molar flow of the fuel from the evaporator is multiplied with the enthalpy of the steam reforming process to model the power needed to reform the fuel. see (2.

12 over a temperature range of 200K.6 0.8 1.86 is used in the model.78 1.8 0.14: Gascomposition with constant SC-ratio of 1. 30 .82 Kcom [−] 1. and is caused by the change in H2 fraction. The change is neglected and a constant of 1.5 steam to carbon ratio is assumed to be constant.7 Fraction [−] 0.72 250 300 350 400 450 500 550 600 650 Reformer temperature [K] Figure 2.1 0 400 450 500 550 600 650 700 Temperature [K] 750 800 850 MeOH CO CO2 H2 H2O Figure 2. The change of Kcom is 0.5 0. The steam to carbon ratio is 1.84 1.88 1.15: Plot of the change in the ratio between ngas and nmix with respect to ˙ ˙ reformer temperature.76 1.4 0.2 0.5 and a change in temperature from 373K to 873K 1.9 0.74 1.3 0.86 1.2 Nonlinear system model 1 0.

A summation of the energies applied to the evaporator and the calculation of the temperature by integration of the summation. As the stack is warming up the electric heaters will primarily be heating up the fuel. As the required gas into the reformer needs to be at a specific temperature the evaporator is modeled and is shown in the next section. one with methanol and one with distiled water. At the startup operating mode. When in startup mode the evaporator will primarily be heated by the electric heaters incorporated into the evaporator. The first part calculates the power needed to evaporate the flow of methanol. The model of the power needed to evaporate the mixture is divided into two parts.1 Evaporator temperature The temperature of the evaporator is calculated like the temperature of the reformer and the fuel cell stack. the evaporator only evaporates a fuel of pure methanol.3 Evaporator model The evaporator is a heat exchanger that has the purpose of heating the methanolwater mixture to the point of boiling and then super heating the vapors to a temperature of 393 K (120o C). The burner releases heat from the combustion and heat is transfered from the burner to the fuel cell stack. since this is redirected to the burner and combusted. The degradation and possibly destruction of the membranes would be more likely at temperature above the 473K(200o C) which is the top of the HTPEM operation temperature.2 Nonlinear system model The reformer in different operating modes During the startup mode of the system the reformer receives no vapor flow. 31 . The summation of the power and temperature can be seen from (2.3. The hot air heats up the fuel cell stack and when the temperature of the stack reaches 383K(110o C) the running mode can begin. The temperature is critical for the calculation of the power needed to evaporate the mixture and the assumption of uniform temperature applies. The air from the stack will have a temperature of 293K(20o C) and rising. The temperature of the reformer is held constant at 433K(160o C) since the heating of the fuel cell stack is supposed to be none destructive to the stack membranes. The second part is the power needed to evaporate the flow of water. 2. 2. This requires the fuel tank to be split into two separate containers.26).

and this difference in enthalpy is multiplied with the airflow.4 0. see figure 2. The other contribution to the evaporator is two 100W electric heaters. is assumed to be the same as the evaporator.26) Data for the powers that are summed up in (2.3 0.15 0. Modeling the vaporization power The model of the power needed to vaporize the fuel. is based on the first law of thermodynamics. The boiling temperature is calculated with regressions made by [12]. where the fluid is heated from ambient temperature of 293K(20o C) to the evaporation temperature.2 0. The powers are based on the system load. The enthalpy is calculated at the input and output of the air flow.17 32 . The first stage is the preheating of the fluid.2 Nonlinear system model ˙ ˙ ˙ ˙ QEvap = QAir + QElectric − Qvaporize t 1 ˙ TEvap = · QEvap dt mEvap · cEvap 0 (2. This is assumed to be the heat added to the evaporator from the fuel cell exhaust.05 0 0 5 10 15 x 10 4 Time [s] Figure 2.16.25) can be seen from figure 2.16: Comparison of difference energies in the evaporator The temperature of the air.1 ˙ Qair ˙ Qheaters ˙ QM eOH ˙ QH2O 0.1. 0.25 Power [kW] 0.35 0. The model represents the three stages that both methanol and water is in during the vaporization process. The boiling temperature is based on the steam to carbon ratio of the fuel.25) (2. see figure 2. exiting the evaporator.

0 -1.0 3.4 0. A T-s diagram of the process can be seen from figure 2.18: T-s Diagram of the process 33 . The model assumes that the phase changes instantaneously and that all the fluid is vaporized.5◦ C and water boils at 100◦ C.18 where the tree phases are marked.0 -2.0 0.2 Nonlinear system model Estimated boiling Temperature 90 85 Temperature [C] 80 75 70 65 0 2 4 6 Steam−Carbon Ratio 8 10 Figure 2. The model of preheating the methanol is made by calculating the enthalpy when the temperature changes from ambient to the boiling temperature. The required enthalpy for the phase change is the enthalpy of vaporization for the methanol and a regression has been made from the data in EES.0 0. The last stage of the vaporization is the super heating of the methanol vapors.6 0. 300 250 200 150 Stage 1 Methanol Stage 2 Stage 3 T [° C] 100 101 kPa 50 0 -50 -100 -5.2 0.8 -4.0 1.0 -3. The second stage of the vaporization is the phase change of the fluid.17: The boiling temperature in Celcius Methanol has a boiling point of 64.0 s [kJ/kg-K] Figure 2.0 2.

i is the current density. The estimator should be able to be run online in the system.2 Nonlinear system model The process is the same for the water in the mixture and regressions for the enthalpy in the three stages is based on data from EES. The fuel delivered to the fuel cell equals the flow of methanol delivered by the pump and the fraction of hydrogen that the flow is reformed into. Assuming that (2. The composition of the gas changes when the temperature of the reformer changes. the needed amount of fuel can be calculated based on the current drawn from the fuel cell stack. vaporize and superheat the given fluid.28). the hydrogen fraction xhydrogen (Tr ) is also an important factor of the fuel estimation. Acell is the areal of the cell. Since only a fraction of the methanol is reformed into hydrogen. is estimated. and F is Faraday’s constant. see (2. see (2. The calculation of the power needed to evaporate the mixture is calculated from the product of the enthalpy at a given stage and the molar flow of the respective fluid.28) . the power consumption for super heating the fluid is applied to the sum the powers. Since the model is assuming the instantaneous change of phase for the given fluid. otherwise the super heating power is neglected. Equation (2.4 Fuel estimation The reason for developing an estimator is to control the energy supplied to the fuel cell and to achieve a constant hydrogen stoichiometry. Acell · i · ncell · λhydrogen 2 · F · xhydrogen (Tr ) 34 mol s nestimated = ˙ (2. The temperature of the evaporator is compared to the boiling temperature of the fuel. some logics has been implemented in the model.27) can be utilized to calculate the needed fuel based on the current density. which means that the hydrogen fraction and mass convertion. Since this system is running on methanol it is necessary to make a number of modifications for the estimation to apply. When the evaporator temperature is above the boiling point.27). During the operation of the fuel cell. 2. Acell · i · ncell 2·F mol s nH2 = ˙ (2. The powers of the three stages are summed up to represent the power needed to preheat. an estimator can be derived. Kcom .27) where ncell is the number of cells.27) only describes the usage of the hydrogen and is only applicable for estimation of fuel for a system running on pure hydrogen.

This excess hydrogen is also used in fuel cells working on pure hydrogen. but both amounts are of the same mass. from (2. more fuel is needed and when the fraction is increasing the fuel supplied must decrease. The electric efficiency can be calculated by (2. I is the current drawn from the stack.2 Nonlinear system model When the fraction of hydrogen is decreasing. The pump is a fixed volume pump and the volume of the pump stroke Vpump must be applied in the estimator.30) m · HHVM EOH ˙ where U is the electric voltage of the fuel cell stack. 2. The efficiency is based on the higher heating value(HHV) of the methanol due to ηF C = 35 . Pblower is the power needed to drive blowers for the convection of the fuel stack and reformer respectively. The increasing and decreasing of the hydrogen in the reformat gas is coupled with the temperature of which the reforming process is taking place. The amount of gas that enters the reformer is lower compared to the amount of gas leaving the reformer.29) The estimator. where the ideal is the reversible and the real is the practical efficiency. though this is to avoid starvation. the power supplied to the stack is the methanol fuel supplied during running operation. This is accounted for by the factor Kcom which is the ratio between the flow in and out of the reformer.30). The estimator controls the frequency of the fuel pump. The concepts when talking about efficiency is the “ideal” efficiency and “real” efficiency. When calculating the electric efficiency of the fuel cell stack. U · I − Pblower − PEvaporator (2. calculate the amount of hydrogen needed in mol/s/. Pevaporator is the power consumed in the evaporator for the electric heaters.27). The efficiency is the ratio between the energy converted and the energy supplied.est = (2. The estimator must take into account the changes happening to the fuel. Acell · i · ncell · λhydrogen [Hz] 2 · F · xhydrogen · ρM eOH · Kcom (Tr ) · Vpump fpump. This is independent of the temperature as can be seen in figure 2. when the fuel travels from the pump to the fuel cell stack. λhydrogen is the stoichiometric factor for the excess of hydrogen.5 System efficiency Efficiency is a great tool for comparing energy conversion devices. but the pump delivers the flow in liters and therefore the estimator must use the density of the methanol in kmol/m3 to convert between these two units. The estimator also needs to account for the steam reforming action since the law of conservation of mass applies to the steam reforming.15. Since the project uses the exhaust gas of the fuel cell stack cathode a control factor for the amount of hydrogen in the exhaust gas is needed.

6 Summary The nonlinear model is based on calculating the voltage and temperature. and is calculated to be a little below 20%. and the efficiency can be seen in figure 2. The available voltage of the fuel cell is based on an open circuit voltage. anode and 36 .25 0 5 10 15 x 10 4 Time [s] Figure 2.19: Plot of the modelled efficiency. It can be seen from figure 2. The model of the system must be validated against data from experiments and data from articles. The power needed for the evaporator Pevaporator is also a major factor for the efficiency. 2.19 is based directly on the electric heaters in the evaporator.2 0.1 0. The negative part of the efficiency presented in figure 2.19 that the efficiency is negative while the fuel cell stack produces less electric power than the electric heaters provide.1 −0. 0.1.15 0. The efficiency is based on the load pattern applied to the system figure 2.19. Minimizing the need for electric heaters is positive for the efficiency of the entire system.19.2 −0. The calculated efficiency can be seen in figure 2.15 −0. The efficiency for the system is approximately 17% based on the higher heating value. The model of the entire system has been presented and must be validated against experiments and data from articles.05 Efficiency [-] 0 −0. The efficiency of the system is affected directly by the amount of the methanol needed for driving the system. The temperature affects the voltage of the stack and changes in temperature is mapped into the voltage of the stack.05 −0.2 Nonlinear system model the methanol entering the system in fluid phase and the higher heating value is the highest amount of energy that can be converted.

and assumes the temperature of the outlet air is the same as the evaporator temperature. and is controlled by forced convection from a blower. 37 . The temperature of the reformer is based on a catalytic burn of excess hydrogen from the fuel cell. The conduction of the reformer is based on the temperature of the reformer compared to ambient temperature.66 based on the higher heating value. The mass convertion factor is assumed constant. The evaporator is heated by the exhaust air from the fuel cell. The temperature for the fuel cell. The fuel cell is heated by the loss of current in the fuel cell. The conduction of the fuel cell is included and are based on the difference between the fuel cell stack and ambient temperature. The estimation of required fuel is based on used hydrogen in the fuel cell and an excess hydrogen factor λH2 . The efficiency of the system is calculated to approximately 18% at a current density of 0. the heat transfered to the fuel can be calculated. The temperature is controlled by forced convection though the burner side.2 Nonlinear system model cathode losses. and the hydrogen fraction in the gas is estimated on the reformer temerature. By using the change in enthalpy of the inlet and outlet air. reformer and evaporator is calculated.

2 Nonlinear system model 38 .

x2 ) + ¯ ¯ (3. mstack · cstack dTs ˙ ˙ ˙ = −Qconduction (Ts ) − Qconvection (Ts .1). when considering small deviations from the operating point (x1 .1.1 The Stack Temperature The temperature of the stack is based on an energy balance in the dynamic model of the entire system.1 Linearisation of the temperature models 3. The higher ¯ ¯ order terms of the Taylor series.1) where the partial derivatives are evaluated at x1 = x1 and x2 = x2 .2) ˙ dt 39 .1 Linearisation of the temperature models This section presents the linearized temperature of the stack and the presentation of the linearized reformer temperature is performed after the stack temperature. The chapter also presents a transient model of the respective temperatures. x2 )[13] ¯ ¯ 3.Linear system model 3 3.2). x2 ) = f (x1 . The chapter documents the linear models for which the control of the respective temperatures can be applied.1. The linearisation of the temperature models presented in Chapter 2 is performed with a first order Taylor series. from which the controller parameters can be calculated. are neglected. df df (x1 − x1 ) + ¯ (x2 − x2 ) ¯ dx1 dx2 f (x1 . nair ) + Qelectric (i. convection and heat produced inside the fuel cells and balance this to calculate the temperature.1. v(Ts .2 Reformer temperature 3.2 Summary This chapter focus on the linearisation of the fuel cell stack temperature and reformer temperature. see (3. 3.1 The Stack Temperature 3. i)) (3. The model applies conduction. see (3.

The enthalpy is approximated from a linear first order regression of enthalpy data from EES see (3. which is a linear approach to the approximation. Conduction The conductive term is based on the difference between the stack temperature and the ambient temperature multiplied with a constant. nair ) = nair · (h(Ts ) − h(Ta )) ˙ ˙ (3. By rewriting the molar airflow nair to a volumetric airflow qair multiplied ˙ ˙ with a constant results in a more comprehensible equation. which is a linear approximation of the losses due to conduction. k · Astack ˙ Qcond = · (Ts − Ta ) x (3. Convection The convective term is based on the difference in the enthalpy of the air at the inlet and outlet of the fuel cell stack. The convective term is used for the control of the temperature based on controlling the airflow into the stack. Astack is the conductive area of the stack in m2 and x is the thickness of the insulation material in m. These individual terms needs to be linearized.4).3) where k is the thermal conductivity of the insulating material in J/(m · K). The electric term is the heat generated from the cells in the stack and this is dependent on both the current density and the voltage of the cells.4) where h is the enthalpy pr mol of air in J/kmol and nair is the molar flow of air in ˙ kmol/s. ˙ Qconv (Ts . The voltage of the cells is dependent of both current density and the temperature of the stack.3). based on the enthalpy difference of the air at the inlet and outlet of the stack. The convective term of the power balance is a nonlinear approximation that calculates the energy transported away from the system.3 Linear system model The conductive term is based on the temperature of the stack and the ambient temperature and the constant of convection. The rewriting and linearisation can be found in Appendix C and the resulting equation 40 . see (3. and Ta is the ambient temperature in K. The enthalpy regression accounts for the changes of the enthalpy of the air with respect to temperature.

This expression is nonlinear and needs to be linearized. ¯ + ∂Ts Kheatwp KheatT s Kheati ˙ ∂ Qheat ¯ · Ts − Ts + ∂i ¯ i Ts .¯ (3.3) respectively.8) Evaluating the partial derivatives and the working point. This convection is used to control the temperature of the stack and remove some of the heat that is generated inside the stack.6).5) is evaluated in the working point they can be expressed at constants. ˙ ∂ Qconv ¯ ¯ ˙ ˙ ˙ Qconv.q ˙ (3.linear = Kheatwp + KheatT s · Ts − Ts + Kheati · i − ¯ i (3. i)) · i · ncell · Acell (3.8) ˙ ∂ Qheat ¯ i ˙ ˙ Qheat. represented in (3.lin = Qconv Ts .5) Since the derivatives from (3.3 Linear system model can be seen from (3.9). as constants results in (3. ˙ Qheat = (vrev − vcell (Ts .8).9) 41 . Heat generated i fuel cell The fuel cell generates heat when current is drawn from the stack and the heat can be expressed from (3.q ˙ ˙ ∂ Qconv ∂Ts ¯ · Ts − Ts ¯ ¯ Ts .2) and (C. qair + ∂ qair ˙ Kconvwp Kconvq KconvT s ¯ · qair − qair + ˙ ˙ ¯ ¯ Ts .linear = Qheat Ts . ˙ ¯ Qconv.6) The linearisation of the convection is now complete.5).¯ · i −¯ i ¯ i Ts .7) The linearization can be seen in Appendix C and the result can be seen from (3.lin = Kconvwp + Kconvq · q − q + KconvT s · Ts − Ts ˙ ¯ ˙ (3. The equations for the derivatives can be seen from (C. ˙ ¯ Qheat.7). see (3.

The linear temperature model is turned into a transient model by neglecting the stationary contributions.3 Linear system model The linearized fuel cell stack temperature Now the three parts of the stack temperature model has been linearized.3). (3.6) and (3.12) A linear model the stack temperature represented in Simulink™can be seen from figure 3. The governing equation of the stack temperature can be expanded by inserting (3. mstack · cstack dTs k · Astack = − · (Ts − Ta ) dt x − ¯ Kconvwp + KconvT s · Ts − Ts ¯ + Kconvq · qair − qair ˙ ˙ (3.2). This gives (3.11) Applying the Laplace transformation of (3. mstack · cstack · s + · k · Astack + KconvT s − KheatT s x · Ts (s) = k · Astack ¯ · Tamb − Kconvwp + Kheatwp − Kconvq · qair (s) − qair ˙ ˙ x ¯ +Kheati · i(s) − ¯ + (KconvT s − KheatT s ) · Ts i (3.9) in (3.12). mstack · cstack k · Astack dTs + Ts · + KconvT s − KheatT s = dt x k · Astack ¯ · Tamb − Kconvwp − Kconvq · qair − qair ˙ ˙ x ¯ +Kheatwp + Kheati · i − ¯ + (KconvT s − KheatT s ) · Ts i (3. For the purpose of control the investigation of the transients of the linear model is in order.1.11). see (3.11) and summing up the constant parts in one constant results in (3.10) ¯ + Kheatwp + KheatT s · Ts − Ts + Kheati · i − ¯ i Separation and factorization of the variables can be performed in order to ease the Laplace transformation of the temperature model. This changes the output of the model to only provide 42 .11).

13) The model for the transients of the fuel cell model has been presented.1: Linear Model of the stack temperature an amplitude of the change instead of a value for the temperature.1. i) − Qconv (Tr . see (3. QSR is the heat ˙ conv and Qcond are ˙ transfered for the endothermic reformation process in kW . For a reduction of (3. Q 43 .14). From (3.13) it can be seen that the temperature of the stack is dependent of the current density to add heat to the system and the airflow to remove heat from the system. The model is linear and the model can be used for the control of the fuel cell. 3.2 Reformer temperature The reformer temperature is governed by a balance of heat transfers.13). shown by the sign convention. see (3.12) to a transient model. mr · cr · dTr ˙ ˙ ˙ ˙ = QH2burn (Tr .3 Linear system model Temperature Q_ cond Conduction 1 Current density Q_heat Temperature 1 m_s*c_s 1 s Temperature of the stack1 Fuel Cell 1 Temperature Q_ conv Airflow L/ min Convection 1 Figure 3.14) ˙ ˙ where QH2burn is the heat transfer from the burner in kW . i) − QSR (Tr . The model is linearized in a working point and the constants are calculated based on the working point parameters. q) − Qcond (Tr ) ˙ dt (3.      k · Astack   mstack · cstack · s +  +KconvT s − KheatT s  · Ts (s) =    x     Kconds  −Kconvq · qair (s) + Kheati · i(s) ˙ (3.

HSR is the enthalpy required for the steam reforming process.18) (3.15) (3.14) are the modeled the by (3. The applications of convection and conduction in (3.29). KH2burn ˙ QH2burn = ˙ QSR ncell · Acell · HHVhydrogen ·i 2·F = Kestimator · Kpump · Kevaporator · HSR · 1000 ·i Kestimator · Ksystem − KSR (3.17).17) and (2.3) and (3.16) where the constants Ksystem is the changes made to the fuel from being pumped into the system and until the burning process.19). Tr ) · Kpump · Kevaporator · HSR · 1000 (3. In order to simplify the estimation for the calculation and implementation.6) ˙ respectively.16).18) and (3.28) into (3.15) and (3. HHVhydrogen is the higher heating value for the hydrogen being burned. The fuel cell uses some of the hydrogen in the gas during operation and this is modeled with (2. ˙ QH2burn = (fpump (i. The energy lost to the steam reforming process is also based on both the current density and the temperature of the reformer. see (3.17) The change in pump frequency has a linear relationship with the current density and can be summed up into one constant and by inserting both (3. This estimator is nonlinear since it depends on the temperature and the current density.15). the values from (2. Kpump and Kevaporator represents the changes happening to the fuel when it enters the pump and is evaporated. The heat supplied by burning the hydrogen QH2burn is calculated from the current density of the fuel cell stack and the temperature of the reformer. A mathematical relation between the fuel pump frequency and the current density was proposed in (2.29) for the fraction of the hydrogen in the reformat gas is assumed constant. Rewriting of the respective equations for the reformation and burning processes results in (3. Kestimator fpump. see (3. The change of the molar flow inside the reformer due to the reformation process is assumed constant as well. Tr ) · Ksystem − F Cusage (i)) · HHVhydrogen ˙ QSR = fpump (i.27).19) 44 . and the equation for the estimation can be seen from (3.3 Linear system model the heat transfers from convection and conduction respectively.16) respectively.lin = λH2 ncell · Acell · ·i 2·F xH2 · ρM eOH · Kcom · Vpump (3.

The model is transformed into a transient model based only the changing variables using Laplace transform. the constant terms.2.18) and (3.14) results in a linear equation with the dynamics of the temperature for the reformer.g. The various factors are collected with respect to their given variables.21) The transient model of the reformer temperature has been presented and it is a linear model. mr · cr · dTr dt = KH2burn · i − KSR · i ¯ − Kconvwp KconvT r · Tr − Tr − Kconvq · q − q − ˙ ¯ ˙ − kref ormer · Aref ormer (Tr − Ta ) xref ormer Kcondr (3. (mr · cr · s + KconvT r + Kcondr ) · Tr = (KH2burn − KSR ) · i − Kconvq · q (3. This represents the linearized temperature of the reformer with the given variables from the reformer. Reformation and burner reaction Q_H2burn Current density Q_SR Airflow L min / Q_conv Temperature 1 m_ ref*c_ ref 1 s Temperature of the reformer Convection Temperature Q_ cond Conduction Figure 3. see (3.19) into (3.20) The linearized model is presented in Simulink™and the model can be seen from figure 3. are neglected.21). ¯ based on changes in the variables. e.3 Linear system model Inserting (3. terms involving Tr .20).2: Linear model of the reformer temperature from Simulink™ In order to be able to study the transient responses from the reformer temperature. see (3. This model is the base for the calculation of the controller parameters for 45 .

3.2 Summary The models from Chapter 2 have been linearized and the respective temperatures have been presented with the variables that affect the temperature. The models have all been approximated with a first order Taylor series and this approximation will result in deviations from the nonlinear temperatures. The model shows that the temperature is dependent of two variables. 46 . The current density adds heat to the reformer and the airflow removes heat from the reformer as was expected.3 Linear system model the reformer. These models are to be validated against the nonlinear model to see if the linear model is a good approximation. The deviations from the respective linearized parts of the model are dependent of the deviation from the operating point. the current density and the airflow.

2. This can be seen in figure 4. At every change of b30 the model is processed with a changing current density from 0.6] and b30 ∈ [0.2 Reformer temperature 4.66 A/cm2 . First a loop changes a30 to the starting number and the whole interval of b30 is run.1.3 Convection 4. The script routine is changing the coefficients a30 and b30 from chosen intervals. These intervals are spread out over an repeating number. 0.1 Polarisation curve 4. 4.2. The temperature is held constant at 180 [◦ C] and CO is at set at 1000 ppm.1 as the score is compared to the simulated run number.1 and it can be seen that for every change of a30 there is 10 changes in b30 .028] is searched for the best set of fitting parameters. The empirical value used in (2. The models are validated against data from various experiments. This gives a total of 100 simulations and it is evaluated at which index the score is the lowest.2 Reformer conduction model 4. The absolute value of all the time steps are added together and is saved with the parameters a30 and b30 .3. and the repeating number is set to 10. a30 and b30 .1 Validation of nonlinear model Polarisation curve The polarisation curves in the model is validated against experiments in [9].1.1 Fuel cell stack 4.Validation of models 4 4. The range for a30 ∈ [0. The values of a30 and b30 can be seen in B.1.1.1.1 Validation of nonlinear model 4. 47 .01 to 0. This can also be seen from figure 4.2 Validation of linear model 4.1 4.3. 0.3 Summary This chapter contains the validation of the models presented in Chapter 2. A script is made in Matlab™and can be seen in Appendix E.14) is fitted by two parameters.026. This is evaluated against experimental data and a difference at every timestep is calculated.

7 Current density A/cm2 Figure 4.01 Voltage [V] −0.03 −0.02 Voltage difference 0.2: Difference in voltage from experimental data compared to simulated The lowest score is found at run 46 and got the score 0.4 Validation of models Voltage score 5 4 Voltage score 3 2 1 0 0 10 20 30 40 50 60 70 80 90 100 Run session number Figure 4.1924.1: Simulated run sessions 0. The difference in voltage for this operating point can be seen in figure 4.02 −0. The two polarization curves are compared in figure 4.3.01 0 −0.04 −0.1 0.6 0. It is considered precise enough for the simulation to run. The 48 .4 0.05 0 0.5 0.3 0.2 and it shows that the largest difference is present at low current densities. though if other constants needs to be evaluated it is possible to change the a30 and b30 to other constants.2 0.

1 A/cm2 shows very few data points and therefore the uncertainties in this region will be larger.1 A/cm2 . The temperature of the reformer were logged by Labview™ software developed for the project.2 0. The measurements for the experiments in [9] and the measurements at current densities lower than 0.7 0.3 0.1.2 0. 4.8 0. see figure 4.6 0. This may add to the change in the reformer temperature from the 49 .3. but the pipes of the reformer is not insulated. In the experiment the reformer were insulated with a 1 cm thick layer of insulation around the main of the reformer where the temperature is measured.1 0 0 0.3: Polarization curves of the simulated parameters plotted against the experimental data from [9] simulations shows that the deviations from the polarization curve has the largest value at current densities lower than 0.3 0. The change in temperature can be seen from figure 4. and their lacking ability to deliver flows at very low current densities. This may be caused by differences between the model and the experiment.4 0.4.5 0.4 Validation of models Experimental Simulated 0.5 0.1 0. The model of the fuel cell stack is assumed correct for the purpose of control.4 that the convection applied in the model of the system does not return the same drop in temperature as the experiments. The reformer is heated up until a temperature of 350 ◦ C is reached. It can be seen from figure 4. The reformer is heated with hydrogen and the feed of hydrogen is cut off. and convection is stopped.4 0.7 Current density A/cm2 Figure 4.6 Voltage [V] 0.2 Reformer conduction model To validate the model for the heat transfer by conduction for the reformer an experiment is performed. This might be caused by the used mass flow controllers.

The corrected convection can be seen from figure 4.5: Plot of the corrected conduction compared to experimental conduction 50 . The area of which conduction is calculated from may be estimated wrong. 350 Modeled Experimental 300 Temperature [K] 250 200 150 100 0 200 400 600 800 1000 1200 1400 Time [s] Figure 4. The conduction from the model represented by the blue line is only based on the area perpendicular to the surfaces. The reformer had earlier been used for the steam reforming process and it is uncertain if the reformer lost heat due to the endothermic reformation process.5 for the correction is added to the conduction model. and a factor of 6.5.4 Validation of models 350 Modeled Experimental 300 Temperature [K] 250 200 150 100 0 200 400 600 800 1000 1200 1400 Time [s] Figure 4.4: conduction Temperature plot of conduction in model compared to experimental experiment.

but the temperature is measured close to the entrance of the fuel into the reformer and the rapid decrease may partially be caused by the measuring point. It would be impossible to neglect the temperature drop due to the conduction in the experiment and the model must account for the change in temperature due to conduction. Since the conduction and convection is only based on two experiments. Choosing a constant value of 4 presents good coherence with the data from the experiment and the model output can be seen from the figure 4.6 320 Modeled Experimental 300 280 Temperature [K] 260 240 220 200 180 160 140 120 0 50 100 150 200 250 Time [s] Figure 4. The model is build to calculate the temperature based on both the convection of the reformer and the conduction from the reformer.7 51 . In the experiment the stack is heated to a temperature of 308◦ C and the feed of the hydrogen used in the burner is stopped. The uncertainties regarding the convection is difficult to predict.1.3 Convection An experiment is performed in order to calculate the temperature control of the reformer by convection. more extensive experiments must be conducted.6: Temperature plot of refoermer due to convection compared to experimental convection The convection from the model shows a lesser decrease in temperature than the experimental data presented. The airflow is set to a fixed rate of 50 l/min and the temperature is logged.4 Validation of models The tendency of the two temperatures are alike and the constant for the convection model is considered correct. 4. Multiplying the modeled convection with a constant for the correction is in order. The model output is plotted against the temperature logged in the experiment figure 4.

s ˙ ¯ Reformer airflow qair. 4.r ˙ Value 0.1.3 A/cm2 450 K 600 K 10 l/min 8 l/min Table 4.7: Plot of the corrected convection compared to experimental convection The change in temperature in the experiment and the model of the convective changes in temperature exhibits the same tendencies and the amplitude of the changes is approximately the same. Both models are subjected to the same parameters and the results of each model is plotted to show the differences. The linear temperature models is linearized in a working point and the parameters for the working point is presented in table 4.2 Validation of linear model The nonlinear and linear model needs to be compared to see how the linarisation influences the equations.4 Validation of models 350 Modeled Experimental 300 Temperature [K] 250 200 150 100 0 50 100 150 200 250 Time [s] Figure 4. thus the convection is assumed correct.1: Working point parameters for the respective linear models 52 . Variable Current density ¯ i ¯ Stack temperature Ts ¯ Reformer temperature Tr ¯ Stack airflow qair.

350 300 Convective transfer [W] 250 200 150 100 50 Nonlinear Linear 0 0 10 20 30 40 50 60 70 80 90 100 Airflow [L/min] Figure 4.8 it can be seen that the coherence between the linear and nonlinear convection is acceptable. The difference in the linear and nonlinear based on the temperature is very small.2. only models the temperature changes. though is assumed negligible.9. The slope of the lines are the same and they are both in the same region.8. Only the convection and generated heat will be compared because the conduction equation is already linear. The model calculates the convection. that is linearized in section 3. The slope of the convections are approximately the same and they both start in the origin. This concludes the validation on the convection in the linear model and the heat generated inside the fuel cell stack will be covered.9. conduction and heat generated inside the fuel cell stack. see figure 4.8: Convection plotted with a ramp change in airflow from 0 to 100 l/min From figure 4. Convection Both models are subjected to a change in airflow from 0 to 100 l/min and the temperature is held constant at 453K(180◦ C). The linear model has a higher convective power at higher airflows. shows the deviations for the linear convection model. 53 .1 Fuel cell stack The model of the fuel cell stack temperature. The result can be seen from figure 4. see figure 4.4 Validation of models 4. Changing the calculation of the convective term to model a variation in temperature from 433K(160◦ C) to 453K(180◦ C) at a constant airflow.

since the Taylor expansions of the nonlinear equations will result in a loss of precision. that there is a presence of an offset in the linear model. The current density is kept constant at 0. The linear model shows the linear change of the heat generated as expected.10. It can be seen. and the higher heat production in the linear model will result in a higher air flow in the linear model. This can be seen from figure 4. but the change is in the same magnitude. at a given current density and stack temperature.9: temperature Changes in convection with constant airflow (8l/min) and change in Heat generated The heat produced inside the fuel cell stack.6 A/cm2 . The temperature changes the voltage and thereby affects the heat generated inside the fuel cell stack. is investigated. The nonlinear model is subjected to a fixed value for the coverage of the cells. This is most likely caused by the deviation from the operating current density. Plotting the change in the heat produced when changing the current density. From figure 4. which may cause the offset. The linear model changes more than the nonlinear model. from figure 4. of which the heat generation is linearized. The offset may be neglected.11 it can be seen that the model of the heat generated changes sign at very low current densities. based on changes in temperature.3 A/cm2 and the temperature is varied from 433K to 473K. and keeping a constant temperature of 450K. must be validated.11. from 0.4 Validation of models 35 30 Convective transfer [W] 25 20 15 10 Nonlinear Linear 5 0 430 435 440 445 450 455 Temperature [K] Figure 4. First the changes of the heat generated. The linear model changes the heat production faster compared to the nonlinear model and this might be caused by the linearisation process thus leading 54 .01 to 0. which is undesirable.

6 0.1 0. The offset is present in the heat generation.4 Validation of models 600 Nonlinear Linear 500 Heat produced [W] 400 300 200 100 0 430 435 440 445 450 455 460 465 470 475 Temperature [K] Figure 4.2 0.4 0.7 0 Current density [A/cm2 ] Figure 4. The characteristics of the heat generation at high current densities are approximately the same though with a small offset in the favor of the linear model.3 0.11: Change in heat based on current density and at constant temperature at 180◦ C to some degree of uncertainty. This is neglected 55 .5 0.10: Change in the heat generated based on a change in temperature 1000 900 800 700 Heat produced [W] 600 500 400 300 200 100 Nonlinear Linear 0 0. The higher heat production will cause the linear model to apply a higher airflow to control the temperature. based on both the temperature and current density.

is 600K and the temperature in this validation is varied from 500 to 700K. 0.4 Validation of models neglected in the transient model.12. The change of the heat transfer.2 0. see figure 4. Investigating the change in the convection is done by keeping a steady temperature at 600K and changing the airflow from 0. The linear model is assumed valid for the change in heat based on temperature and current density.05 Nonlinear Linear 0 500 520 540 560 580 600 620 640 660 680 700 Temperature [K] Figure 4.2 Reformer temperature The thermal linear model for the reformer must be validated to fit with the parameters from the nonlinear model.13. is lower for the linear model as expected. 56 . This is based on the enthalpy regression.15 0.1 to 100 l/min. with respect to temperature. As in the fuel cell validation.2. This can be seen from figure 4.25 0. The operation point for the convection. the conduction is linear and will not need any linerasation.12: Change in convection at constant airflow and change in temperature The change in the nonlinear heat transfer is higher compared to the change in the linear model. 4. as was the case with the fuel cell stack convection.3 0.35 Energy transfer for the reformer [kW] 0. with the higher temperature.1 0. Convection Plotting the convective heat transfer for the reformer is done at a constant airflow of 30 l/min and the temperature changes from 500 to 700K.

4 Validation of models

3

Energy transfer for the reformer [kW]

2.5

2

1.5

1

0.5

Nonlinear Linear
0 0 10 20 30 40 50 60 70 80 90 100

Airflow [l/min]

Figure 4.13: Change in convection at changing airflow

The convective heat transfer for the linear thermal reformer model is based on the operation point. The chosen operation point shows that the convective powers of the reformer is higher compared to the convective part of the nonlinear model. The differences is evaluated to be small enough to be neglected.

4.3

Summary

The linear model of the stack temperature and reformer temperature both shows good coherence with the nonlinear models, with respect to the convection. The heat generation of the linear fuel cell temperature model shows a constant deviation from the nonlinear model. The current density based heat generation does not start from origin, but the slope of the linear model is equal to the slope of the nonlinear model at higher current densities. The change in temperature for the linear model is higher compared to the nonlinear model, though the change has the same magnitude. The linear model has an approximate constant difference from the nonlinear model. The results is evaluated to be valid and the linear models can still be used for control strategies. As the constants, in the transient model, is neglected control strategies will be valid.

57

4 Validation of models

58

Control strategies

5

5.1

General control systems 5.1.1 Transport lag 5.1.2 The feed forward approach 5.1.3 Antiwindup 5.1.4 Model overview 5.1.5 Controller demands 5.2 Temperature control 5.2.1 Reformer 5.2.2 Fuel cell stack 5.3 Controller design 5.3.1 Reformer temperature controller 5.3.2 Fuel cell stack temperature controller 5.4 Summary

This chapter is divided into three parts. The first part presents the general control of systems and the control approach for the project. The second part presents the models to be controlled and the responses of the models. The third part of the chapter contains the controller design and the responses for the controllers.

5.1

General control systems

Any system can be broken down into an input R(s) and an output C(s) and through measurement the output is fed back and subtracted from the input to represent the error E(s). The system can be seen from figure 5.1. The relation between E(s) and C(s) is the open loop transfer function transfer function G(s). The measurement may be converted by the feedback transfer function H(s). Most open loop transfer functions are stable but may destabilize when the output is fed back and subtracted from the input. To investigate the stability of the system the feedback loop must be closed. The function is called the closed loop transfer function, see (5.1).

59

5 Control strategies

R(s)

+

E(s) Gp (s)

C(s)

B(s)

H(s)

Figure 5.1: The common closed loop configuration

C(s) = Gp (s) · E(s) E(s) = R(s) − B(s) = R(s) − H(s) · C(s) C(s) = Gp (s)[R(s) − H(s) · C(s)] C(s) + Gp (s) · H(s) · C(s) = Gp (s) · R(s) Gp (s) C(s) = R(s) 1 + Gp (s) · H(s)

(5.1)

The closed loop transfer function must be stabilized and the root locus method is a method for analyzing the stability. The poles and zeros of G(s) is obtained and plotted in the imaginary s-plane. The purpose of the root locus method is to investigate the closed loop poles for the plant. The s-plane is defined so the closed loop poles in the negative left half plane are in the stable region and the poles and zeros in the positive right half plane are in the unstable region. The general open loop transfer function (5.2) has m poles and n zeros respectively. The order of m must be higher that n in order to have a realizable system. (s + zn )(s + zn−1 ) ···· ·(s + z1 )(s + z0 ) (s + pm )(s + pm−1 ) ···· ·(s + p1 )(s + p0 )

Gp (s) =

(5.2)

The root locus starts from the poles and travels towards the zeros of the open loop transfer function as the gain K is varied from zero to infinity. The gain is a measure for the amplification that a controller can apply to the controlled variable. The gain is limited by the physical system being investigated and the gain can not amplify the error signal more than is allowed by the boundaries for the controlled variable. The root locus is symmetric about the real axis. The presence of a complex pole, or zero, will also force the presence of the complex conjugate pole, or zero. A zero can cancel out a pole and vice versa. The reason for using root locus plots for control purposes is that the knowledge of the open loop poles and zeros gives a good knowledge about the placement of the closed loop poles. The closed loop pole(s) 60

D(s) R(s) + E(s) U (s)+ Gc (s) + Gp (s) C(s) Figure 5. This is called a minimum phase system. When the poles of the system is placed in the left half plane of the s-plane the error decreases and the response settles on the input. The non-minimum phase systems will become unstable if the closed loop poles are placed in the right half plane.2: A two-degree freedom system in general 61 . depending on the systems working environment. A system that cannot become unstable has all the poles and zeros placed in the left half plane of the s-plane. which may unwanted. which commonly is called a controller or compensator. This type of system can be used to represent many systems and are the most common configuration for control systems. A compensator is multiplied with the open loop transfer function and the result is an altered system with the response wanted. The cancellation of one of the dominant poles by adding a zero and placing another pole will alter the response of a system and this method is called pole/zero placement. since it dominates the response of the system. The controller is most commonly a piece of software or an analog circuit board which receives the feedback signal and alters the control signal in order to make a faster response. the system is called a non-minimum phase systems. The compensator may induce an overshoot or oscillations in the response of the system.5 Control strategies closest to the imaginary axis is called the dominant closed loop pole(s) and are the most important pole to investigate. The cancellation and addition of poles and zeros are summed up in a transfer function. see figure 5. Changing the input from one value to another value instantly with an step function results in a system response. When a pole or zero is placed in the right half plane. This response can be shaped and this is the goal of the control strategies. The system considers only the direct relation between a reference and an output. This may not always be the case since the system may be dependent of two variables.2. The placement of a closed loop pole in the right half plane will make the error increase and thereby the output increase beyond the possible boundaries of the system. After a short introduction to control strategies the explanation of the two degree freedom systems follows.1 is a system with one input and one output. Two-degree-of-freedom systems The system presented in figure 5. If the dominant closed loop pole is placed on the imaginary axis the system will be oscillatory and the error will never decay nor increase. Caution must be exercised when changing the gain K a non-minimum phase system since closed loop poles of the non-minimum phase system moves towards the right half plane.

due to a slow reacting transducer or a chemical reaction happening. The 30 second lag time constant is empirical.1.3) Glag (s) = e−Tl ·s (5. The transport lag has been presented and the presentation of the feed forward approach follows. 1− 1+ Tl ·s 2 Tl ·s 2 e −Tl ·s = + + (Tl ·s)2 8 (Tl ·s)2 8 − + (Tl ·s)3 48 (Tl ·s)3 48 + ··· + ··· (5. The general approach of the approximation is presented in (5.5) can be seen from figure 5.5).4) The approximations creates per definition zeros in the right half plane which can be seen from a first order approximation of a 30 second lag. 62 . This presents an infinite amount of zeros in the right half plane of the s-plane.5) Plotting the root loci for (5. When modeling the lag a transfer function in the continuous control with the (5.1 Transport lag For some reason there may be a delay in a system of some sort. e. The transport lag must be dealt with in the control strategy. This causes no problem since the lag transfer function always is multiplied onto the transfer function that is lagged. This delay can occur i.5 Control strategies The two-degree-of-freedom system is dependent of the reference R(s) and a disturbance D(s). This creates an instability of the system based on the amount of gain that can be applied. 1 −s + 30·2 1 s + 30·2 Glag (s) = (5. After a short introduction to root loci and control systems the discussion of transport lag will continue. The output must be investigated for both the inputs and the system must be stable against disturbances. see (5. The lag transfer function closed loop poles moves from the pole in the left half plane towards negative infinity and from the positive infinity towards the zero in the right half plane.3) Where the lag time constant Tl is the time in seconds and s is the complex variable for the Laplace transfer. The lag from figure 5.4). The control transfer function Gc (s) only changes the controlled variable U (s) based on the error and the controller must be stable against the disturbances.3. 5. Since the lag is dominated by the poles closest to the imaginary axis the lag can be approximated with the Pade approximation.3 presents a zero in the right half plane.

01 Imaginary Axis 0 −0.1 0. see section 6. can be seen from figure 5.02 −0. The approach for the anti-windup applied in the linear model of the reformer.1 0 Real Axis 0.1. 5.2 0.1.3 Figure 5.4 −0. The feed forward transfer function must supply the air for the burner and the controller keeps the temperature at the reference. 63 .3: Root locus for a lag of 30 seconds 5.02 0. These reactions must be fed with the right amount of reactants for the reaction to occur.2 The feed forward approach The reason for using the feed forward technique for thermal chemical systems is the chemical reactions.3.3 −0.01 −0.4. The fuel cell cathode reaction requires a correct amount of oxygen to occur. This is applied since the controller has an upper limit to the voltage that the controller can supply. The feed forward in the systems investigated in this project are based on the reactions in the burner and the fuel cell stack respectively.03 0. The burner part of reformer burns the excess hydrogen from the fuel cell and oxygen is needed for the combustion. From experiments.03 −0. The feed forward functions supply the needed reactant based on the current density. The feed forward is a part of the controllers for the respective temperatures.1.3 Antiwindup A common thing when using the PI-controller is that integral part tend to dominate the calculation.5 Control strategies Root Locus 0. The integral part of the calculation must be limited and this is called integrator anti-windup.2 −0. the air to hydrogen ratio must be at least 5-8 times higher in order to avoid a pyrolytical burn of the hydrogen.

When no saturation appears the anti-windup is neglected. When the controller reaches the limits for the output and the controller calculates a value higher than the top limit of the output.4: Anti-windup scheme for the controller of the air blown into the reformer burner side. The control approach assumes that the temperature can be controlled by controlling the one variable.4 changes sign. marked u(s). The temperatures are controlled by convection from a blower and the blower must be controlled by a control algorithm from a digital controller. calculates the needed change of the controlled variable based on the error. This results in a subtraction for the input for the integral part of the controller. The controller of the system. (5.1. The disturbance has a feed forward function. The rule for the anti-windup constant Taw is that it must be lower than the integral constant Ti . marked Gf f (s) which change the controlled variable according to the disturbance. the sum under the saturation on figure 5.4 Model overview The models of both the reformer and fuel cell stack temperature has been presented and the control of these temperatures can be performed.6).6) 5.2 and adding the feed forward controller based on the disturbance to the system results in figure 5. see (5. marked Gc (s). The general control of the two temperatures can be seen from figure 5. marked d(s). and expecting the other variable to be a disturbance. The actuator in the system investigated is a blower and the voltage 64 . The control algorithm is presented in this section. The saturated variable u∗ (s) is the output from the controller which complies with the controller limits.5.5 Control strategies e(s) KP 1 Ti + 1 1 s + + u(s) + u∗ (s) − + 1 Taw Figure 5. The output of the controller is usually a voltage and drives an actuator. marked e(s). Taw ≤ Ti This antiwindup must be implemented in the controller for the model.

The output of the plant is the temperature gradient and this is integrated in order to obtain the temperature of the system Tout and this is fed back to the error calculation.5: A general control approach is converted to an airflow. The parameters for the reformer are the following • The overshoot must be within 0 to 2% of the reference temperature. The controller can only send air into the model for cooling purposes and not be active when the controller error is negative. It is perhaps more common to change the sign on the error calculation. The disturbance of the system is for the reformer system the change in flow based on the estimator. a set of parameters are needed. The disturbance in the linear fuel cell model is the change in heat produced by the fuel cell stack based on a change in the current density. But since the controller only needs to be active when the reference temperature is reached the controller must be deactivated when the error is negative. the controller cannot require a larger amount of air than the blower can deliver. 65 . This is the general approach to the control of the temperature. The disturbance d(s) is the input of the disturbance transfer function GD (s) and the input to the plant GP (s) is the difference between the controlled variable and the disturbance transfer function output. When the current density changes the flow of the fuel changes. so the error equals the reference minus the measured value. A realizable controller is compatible with the limits of the system. The parameters also include the amount of error allowed by the controller and the "sluggishness" of the controller.5 Controller demands When defining what a good controller is.5 Control strategies D(s) Gf f (s) GD (s) u(s) KV Gcon (s) − Tref − e(s) Gc (s) + + + + Tout Gp (s) Figure 5. • The lag of the controller must be minimal. These parameters are dependent of the given system and must be realizable. 5. • The controller must only react when the temperature is above the reference temperature.g. The controlled variable is the airflow through the stack and the reformer for the respective model.1. e.

To start with the most important one the transfer function for the plant can be seen from (5. 5.21) which controls the dynamics of the temperature. This transfer function is assumed to be inalterable and the response of the temperature must be shaped by using controllers. The open loop transfer functions are calculated in order to investigate the placement and behavior of the closed loop poles.1 Reformer The transient model of the reformer was presented in (3. Oscillations in the temperature is unwanted since these may have unwanted effects on the output of the system.7). i(s) GRf f (s) GD (s) ˙ Qconv (s) KV + + Tref erence − e(s) Gc (s) + + ˙ Qref orm (s) Gpr (s) Tref ormer Gconv (s) − Figure 5. The transfer function transfers the result of the balance of the respective heat transfers into the temperature of the reformer. Overshoot is the allowed temperature difference above the reference temperature and the controller parameters must be adjusted accordingly.2.6: The transient model of the reformer The transfer functions that converts a variable to an power balance input can be represented in a Laplace transform.5 Control strategies The overshoot restriction of the reformer temperature is a restriction on the controller parameters. especially on the stack temperature since the characteristics of the voltage resemble those of the temperature. This transformation is based on the left hand side of (3.21) and the transient model presents only the dynamic of the model and not the changes in actual value of the temperature. 66 . The closed loop transfer functions are calculated in order to obtain the step response.2 Temperature control The control strategy for the respective temperature models is presented in this chapter. The transient model can be seen from figure 5. This is done for both the reformer and the fuel cell stack models. The controller is faster than the system it controls and the controller must be quick to react.6. 5.

The convection transfer function is calculated from (3. GDi (s) = GD (s) − GRf f · KV · Gconv (5. in l/min. see (5. the contribution of convection added by the feed forward transfer function must be included in the disturbance transfer function. and this is multiplied with the air stoichiometry for the burner λH2Burn .7) The transfer function Gconv (s) is the transfer function between the airflow q(s) and ˙ ˙ conv . These can be written in one function which is represents the change of the system based on the change in the current density. The conversion between the molar flow of the volumetric flow is the density of the hydrogen. see (5.10) Looking at figure 5.10).11).21) and contains the factors in front of the variable qair ˙ Gconv (s) = Kconvq (5.8).5 Control strategies Gpr (s) = 1 mr · cr · s + KconvT r + Kcondr (5.9).6 there are two components dependent of the current density. GD (s) = KH2 − KSR (5. can be seen from (5. In order to be able to plot the root loci of the transient model and thereby the reformer. There is no dynamics involved in the transfer function controlled variable Q and the function is only a constant.11) = (KH2 − KSR − Krf f · KV · Kconvq ) 67 .8) The feed forward transfer function GRf f (s) has earlier been mentioned to be the function supplying the air to the reaction. Kestimator · Ksystem − ncell ·Acell 2·F GRf f = · 1000 · 60 · λH2Burn 1000 · ρH2 · KV Krf f ·i (5. which can be seen from (5.9) where KV is the conversion factor from the blower voltage to the airflow in [l/min]. The disturbance transfer function GD (s) transforms the current density into the heat provided from burning the hydrogen and the power needed for the steam reforming process. The transfer function GRf f (s) for the reformer feed forward controller is based on the estimated amount of excess hydrogen from the fuel cell. Summing up the changes based on the current density.

5 Control strategies Since the reformer experiments. when the frequency of the pump changed. 68 . This transport lag is multiplied to the entire disturbance transfer function GDi (s). Tref ormer(s) = Gc (s) · KV · Gcon · GP (s) Tref erence (s) 1 · KV · Kconvq · 1 = mr · cr · s + KconvT r + Kcond (5.13) The open loop transfer function for the disturbance signal.12). from section 6.13). The transport lag is approximated with a first order pade approximation from MATLAB.5). Plotting the root loci of the system requires the open loop functions. presented a lag in the change of the reformer temperature. GDilag = GDi (s) · Glag (s) = (KH2 − KSR − Krf f · KV · Kconvq ) · −s + s+ 1 Tl ·2 1 Tl ·2 (5. see (5. Tref ormer(s) = GDilag · GP (s) i(s) = (KH2 − KSR − Krf f · KV · Kconvq ) · −s + s+ 1 Tl ·2 1 Tl ·2 ·1 · (mr · cr · s + KconvT r + Kcondr ) (5. assuming the controller is unity and that the temperature reference signal is neglected.14). The lag of the function must be multiplied with the entire disturbance transfer function.3. a transport lag must be implemented in the transient model of the disturbance.14) With the given transfer functions presented the control of the system can be initiated. Starting with the open loop function for the temperature reference signal the open loop transfer function can be seen from (5.12) The controller transfer function Gc (s) is neglected for now and assumed to be a gain of unity. see (5.1. This is done since the controller is to be derived from the control strategies later on. can be seen from (5.

To obtain the response of the system the loop must be closed. (5. it can be seen that the root loci should have a zero and two poles. This is caused by the s present in the numerator of (5. see (5. 69 .5 Control strategies Root loci of the reformer system.7 it can be seen that the root locus moves away from the imaginary axis as the gain increases towards infinity. which can be seen from figure 5.13) that the transfer function only has one pole and no zeroes due to the presence of an s in the denominator of the transfer function. From figure 5. Root Locus x 10 4 −5 3 2 Imaginary Axis 1 0 −1 −2 −3 −4 −10 −8 −6 −4 Real Axis −2 0 x 10 2 −4 Figure 5. The poles for the transfer function of open loop convection.5) presents a zero and a pole which is multiplied with the disturbance function and this sets a limit to the amount of gain that can be applied. due to the negative sign in the numerator of (5. Plotting the root locus requires the knowledge of the poles and zeros of a the given function.7. It can be seen from (5.14).7: Root locus plot of the convection part with unity control From figure 5.8 it can be seen that the root locus moves towards the right half plane as the gain increases. Looking at the open loop transfer function for the disturbance signal. This can be changed by adding a more dynamic controller than unity.14).14). Furthermore it can be seen that the zero is placed in the positive right half plane of the s-plane. The reason for the zero in the right half plane is the lag implemented in the modeling. Therefore the root locus must only consist of one pole.

08 0. Closed loop of the reformer system To close the loop of the reformer the closed loop transfer function for the disturbance and the reference respectively must be calculated.15).02 −0. R(s) − E(s) Gp (s) + C(s) B(s) H(s) Figure 5.01 Imaginary Axis 0.9.1) and solving the relationship between C(s) and C(s) gives a new transfer function.1 Figure 5. see (5.06 0.025 −0. Since the controllers only may function when the temperature is above the reference some changes to the general closed loop must be applied.8: Root locus plot of the open loop transfer function between the reformer temperature and the current density.5 Control strategies Root Locus 0.015 0.025 0.02 0.015 −0.02 0 0. The reference is negative and the measured temperature is fed back with a positive feed back. see figure 5.02 0.005 0 −0.01 −0.9: A negative reference system with positive feedback Recalculating the closed loop transfer function from (5.005 −0. 70 .04 Real Axis 0.

14). gives (5.15) The negative signs present in both the numerator and the denominator of the closed loop transfer function. KV · Kconvq Tref ormer (s) = Tref erence (s) mr · cr · s + KV · Kconvq + KconvT r + Kcondr (5.15). This results in an application of (5. see figure 5.15). The reference temperature input of the reformer is neglected and the reformer model can be rearranged. Looking at figure 5. Tref erence Tref ormer Gc (s) + − KV Gconv (s) −1 Gpr (s) Figure 5. When figure 5. Closing the loop of the temperature reference and applying (5.12.5 Control strategies C(s) = Gp (s) · E(s) E(s) = B(s) − R(s) = H(s) · C(s) − R(s) C(s) = Gp (s)[H(s) · C(s) − R(s)] C(s) − Gp (s) · H(s) · C(s) = −Gp (s) · R(s) −Gp (s) C(s) = R(s) 1 − Gp (s) · H(s) (5.17). To calculate the closed loop transfer function for the disturbance is based on the open loop transfer function.10: The altered system approach for the closing of the feedback loop of the system.8) into (5. the step response of the reformer can be achieved.10 using (5.12 the transient model can be recognized as a normal control system with a negative feed back and a feedback function.7) and (5. presented in (5. −Gc (s) · KV · Gcon (s) · (−1) · Gpr (s) Tref ormer (s) = Tref erence (s) 1 − Gc (s) · KV · Gcon (s) · (−1) · Gpr (s) (5.18).1) and the closed loop transferfunction can be derived. Solving the closed loop transfer function of figure 5. 71 . see (5.16) Inserting the respective systems from (5.16) and assuming the controller transfer function Gc (s) is a unity gain.17) With the closed loop transfer function calculated.10. gives (5.16).6 is analyzed with no disturbance the model can be rearranged to figure 5.

5 0.4 0.7 Amplitude 0.7).12) in (5.1 0 0 5 10 15 20 Time (sec) 25 30 35 40 Figure 5.19).19) 72 .8) and (5. Tref ormer (s) = i(s) · KH2 − KSR − Krf f · KV · Kconvq · −s + s+ 1 1 Tl ·2 1 Tl ·2 mr · cr · s + KV · Kconvq + KconvT r + Kcondr (5.11: temperature.5 Control strategies Step Response 1 0. i(s) Step response of the reference with resulting change in reference D(s) + Tref ormer Gpr (s) − GDilag (s) Gconv (s) KV Gc (s) Figure 5.6 0.18) Inserting (5. (5.8 0.14) and assuming the controller is unity gives (5.9 0.3 0.12: The rearranged transient model Gpr (s) Tref ormer (s) = GDilag (s) · i(s) 1 + Gc (s) · KV · Gconc · Gpr (s) (5.2 0.

and the transfer function is presented in (5. which can be seen from (5.13).22) The disturbance transfer function is a constant that relates the current density with the power balance of the stack.21) as a block diagram.20).13: The setup for the control of the stack temperature The transfer function for the stack temperature Gps (s). Gconv (s) = Kconvq (5. The amount of air sent into the fuel cell can be calculated from (5. is based on the left hand side of (3.22) and the air blown into the stack is at room temperature Ta .2 Fuel cell stack Building the transient model and investigating the control issues of the fuel cell stack temperature is also needed in order to control the entire system. 1 ms · cs · s + Kconds + KconvT s − KheatT s Gps (s) = (5.23). or the plant. Like the modeling of (3.21). The transfer function can be derived from (3. i(s) Gsf f (s) GD (s) u(s) KV + + Tref − e(s) Gc (s) + + Tout Gps (s) Gcon (s) − Figure 5. the same approach is applied with (3. 73 .2.13). see (5.5 Control strategies 5. see figure 5.13). 60 ncell · Acell 1 · · 4 · F · xO2 ρair (Ta ) KV Kf fs G sf f = (5.21) The feed forward transfer function can be determined from the amount of air that is needed for the reaction happening inside the fuel cell stack.20) The transfer function for the convection is a constant that changes the convection contribute from the airflow.13.

22) can be summed up with the disturbance transfer function. this is left for future studies. see (5. resulting in (5. since both the respective functions are constants multiplied onto the current density.25).14) a lag was presented. 74 . Since the transport lag time constant for the hydrogen moving through the WGS-reactor and the cooler is undetermined.21) and the voltage constant KV . GDi (s) = GD (s) − Gsf f (s) · KV · Gcon (s) = Kheati − Kf fi · KV · Kconvq (5.23) From figure 5.24). and from (5.5). GDlag (s) = Glag · GDi = −s + s+ 1 Tl ·2 1 Tl ·2 · Kheati − Kf fi · KV · Kconvq (5. neglecting the input from the current density. This must also be implemented in the fuel cell stack temperature control. is applied. The feed forward function Gf fs (s) is multiplied with the convection transfer function from (5. from (5.26). due to the transport time from the pump to the reformer exit. The open loop transfer function for the reference temperature. can be seen from (5. The lag.5 Control strategies GD (s) = Kheati (5.25) Since the transfer functions for the respective parts of the fuel cell stack model has been presented and the respective open loop functions for inputs of the system.27). Ts (s) = Gc (s) · KV · Gconv (s) · Gps (s) Tref (s) = −1 · Gc (s) · KV · Kconvq · 1 ms · cs · s + KconvT s + Kconds − KheatT s (5. from (5.23).26) The open loop transfer function for the input from the current density can be seen from (5. The approach is to lag the current density and force the system to wait for the right amount of hydrogen.13 it can be seen that the feed forward air controller (5.24) One of the things necessary for a change in current density is the presence of a given amount of hydrogen.

in (5. Root loci for the fuel cell stack Plotting the root loci for the open loop transfer function presents a problem. The change of the temperature based on the current density from the open loop transfer function. The root locus is plotted with a gain of unity in the controller. 75 . The root locus can be seen from figure 5.14: Root locus for the reference open loop transfer function From this it can be seen that the closed loop poles moves towards negative infinity as the gain increases towards infinity. is neglected since closing the loop also presents negative signs in both the numerator and the denominator.26). Root Locus x 10 5 4 3 2 Imaginary Axis 1 0 −1 −2 −3 −4 −5 −12 −4 −10 −8 −6 −4 Real Axis −2 0 x 10 2 −3 Figure 5.15.14.27) With the open loop transfer functions calculated the respective root loci can be plotted. The negative sign.5 Control strategies Ts (s) = GDlag (s) · Gps (s) i(s) = Kheati − Kf fi · KV · Kconvq · −s + 1 Tl ·2 1 Tl ·2 (ms · cs · s + KconvT r + Kconds − KheatT r ) · s + (5. see figure 5.27) can be presented. presented in (5.

02 0. The closed loop transfer function can be seen from (5.21) and (5.08 0.29) 76 .5 Control strategies Root Locus 0.(5. With the root loci presented for the linear stack model. KV · Kconvq Tstack (s) = Tref (s) ms · cs · s + Kconds + KconvT s − KheatT s + KV · Kconvq (5. Closed loop for the stack temperature Closing the feedback loops for the respective open loop transfer functions are completely analog to the method in the reformer.25) into (5.28) and assuming that the controller is a gain of unity results in (5.02 −0. This can be calculated from (5.1 Figure 5.03 0.02 0.04 Real Axis 0.20).29). Tstack Tref erence −Gc · KV · Gconv · (−1) · Gps (s) 1 − Gc · KV · Gconv · (−1) · Gps (s) = (5.01 −0.03 −0.28) When inserting the expressions from (5. The relation between the reference temperature Tref and the stack temperature Tstack is a negative reference system with positive unity feedback.02 0 0.01 Imaginary Axis 0 −0.06 0.28).15: Root locus plot of the disturbance open loop function The lag presents the zero in the right half plane as with the reformer disturbance plot.15).

The system is analyzed with the disturbance being positive and the feedback branch contains the convective parts of the model.31) Plotting the step response of the stack temperature based on a step change in the current density is presented in figure 5.30).1 0 0 20 40 60 80 Time (sec) 100 120 140 Figure 5. the loop for (5. Tstack (s) = i(s) · Kheati − Kf f · KV · Kconvq · −s + s+ 1 Tl ·2 1 Tl ·2 1 ms · cs · s + Kconds + KconvT s − KheatT s + KV · Kconvq (5.25) results in (5. which is analog to figure 5.(5.27) must be closed.4 0. The step response can be seen from figure 5.16: Stepresponse of the stack temperature closed loop system When the step response of the reference has been presented.20).7 Amplitude 0.30) Inserting the respective expressions for the systems referred to in (5.6 0.9 0.5 0.12. Tstack (s) Gps (s) = Glag · i(s) 1 + Gps (s) · Gc (s) · Kv · Gcon (s) (5.2 0.30).16.31).8 0. Step Response 1 0.21) and (5. from (5. The transfer function can be seen from (5.3 0.5 Control strategies The step response of the stack is the response to a rapid change in the input which is the temperature reference Tref .17 77 .

The differential part of the controller reacts on small changes of the error and noise will trigger a control. The lag temperature looses heat to conduction and the change results in a decrease of the temperature. 5. To avoid the problem of the noise in signals the PI controller is chosen.5 Control strategies Step Response 12 10 8 6 Amplitude 4 2 0 −2 −4 −6 0 50 100 150 200 250 Time (sec) 300 350 400 450 500 Figure 5. The method for applying the PI-controller is presented in this section but the application of the PID-controller is completely analog. Changing the controller transfer function Gc (s)for the respective reference changes the dynamics of the system.17: Step response of the temperature at a current density step The change in the temperature decreased due to the presence of the lag. This transformation is neglected in this project. Controllers in real time digital control systems are discrete controllers and the controllers are to be discretized.3 Controller design The closed loop responses of the system has been presented and the controllers have been assumed to have a gain of unity. 78 . The reason for changing the dynamic is to get a faster response of the system when a change in the disturbance is applied. but the PID controller can also be applied. in a way so that they are based on the current error and the error from the run before this one. The transformation from the continuous s-plane to the discrete z-plane is called z-transformation. The most common linear controller is the PID-controller and this is analyzed along with the effects of adding the PI-controller to the system. The changes are applied to the open loop transfer function of the respective models.

The PI-controller can be seen from (5. The controller is usually a piece for software in a digital control system. s+ s 1 Ti Gc (s) = KP · (5. Now the closed loop poles can be plotted closer to the imaginary axis of the s-plane. and result in (5.33) It can be seen from the rearranged controller that it adds a zero to the root locus.35).34) Plotting the root locus for the reformer transfer function with the controller and neglecting the negative sign in the numerator of the open loop transfer function can be seen from figure 5.32) Where Kp is the proportional constant and Ti is the integral constant. and the integral constant Ti is set to 0. can be seen from (5. The step response must be generated for the open loop transfer function and therefore the loop must be closed.32). see (5. Rearranging the controller to better apply for the root locus.33). The controller is multiplied with the open loop transfer function of the reformer. or it can be made from operational amplifiers.06.34). It is assumed that the controller only has positive constants.1).18. In both cases the controller makes changes to a voltage of an actuator that tries to correct the error of the system.5 Control strategies 5. The root locus changes when the zero moves towards the poles by changing the integral constant. 1 KP s + Ti KV Kconvq Tref ormer = Tref erence mr cr s2 + KconvT r + Kcondr + KP KV Kconvq s + 1 K K Kconvq Ti p V (5. otherwise the controller would add poles and zeros in the right half plane and that would increase the instability of the system.3.1 Reformer temperature controller The PI-controller is also known as a proportional(P) and integral(I) controller. 1 s + Ti KV · Kconvq Tref ormer (s) = Kp · · Tref erence (s) s mr · cr · s + KV · Kconvq + KconvT r + Kcondr (5. Gc (s) = Kp 1 + 1 Ti · s (5. from (5. using (5.13).35) 79 . The proportional part of the controller ensures a fast response and the integral part ensures that the steady state error is removed. These constants changes the poles for controller and shapes the root locus for the system.

The method set a value for Ti and then runs through the gain KP and tests all the step responses. The table was afterwards sorted in ascending order with regards to the overshoot. The best approximation was the one with the lowest overshoot.8 5 6.19. The temperature controller has an influence on the disturbance closed 80 . The overshoot is calculated for the response and is used as a search parameter. The temperature is assumed to have reached the reference temperature when the temperature output is within 2% and all the sets of parameters have an allowable overshoot. The overshoot was restricted to 2%.06 Calculating the parameters for the controller is dependent of the demands.18: Root Locus plot of the reformer with a PI-comtroller with a Ti=0. KP 100 116 84 Ti 5.5. The step response of the reformer with the controller is basis for the script.1: Sets of variables from the parameter search If the overshoot of the step response fit inside the restriction. A mathematical search method was created to locate for a good set of parameters for the controller. the gain KP and integration constant Ti was saved along with the overshoot.1.9 Overshoot[%] 1 1 1 Table 5. for the controller that were presented in section 5.5 Control strategies Root Locus 20 15 10 Imaginary Axis 5 0 −5 −10 −15 −20 −60 −50 −40 −30 −20 Real Axis −10 0 10 Figure 5.1 and the step response of the variables can be seen from figure 5. Three sets of variables from the search can be seen from table 5.

1 must be inserted in the transfer function and the step response must be obtained. Implementing the controller in the linear model of the reformer temperature and obtaining the temperature response from the change in input from both the temperature reference and the disturbance can be seen from figure 5.9 0.20. The 81 .95 0.21.19: Step response with a change in temperature using a PI controller.7 0. The step response for the tree sets can be seen from figure 5.18).20 it can be seen that the parameters with KP = 116 and Ti = 5 have the fastest response and lowest overshoot when a change in current density occurs. loop transfer function.65 0.55 0.9 0.36).4 0.75 0.36) mr cr s2 + KconvT r + Kcondr + Kp KV Kconvq s + 1 K K Kconvq Ti p V The system must be stable with regards to a step response for both the reference and the current density and the controller parameters from table 5.33) instead of Gc (s) results in (5.6 K =100 and T =5.8 0.66 at T = 5000. These parameters are used in the linear model for the temperature of the reformer.85 Amplitude 0.8 1 Time [s] Figure 5.8 P P i i K =116 and T =5 KP=84 and Ti=6.6 0.2 0. From figure 5. which can be seen from (5.5 Control strategies 1 0. and inserting (5.5 0 0.3 to 0. The reference changes from 400K (125◦ C) to 550K (277◦ C) at T = 3000 s and the current density changes from 0. As it can be seen from the figure that the reformer temperature does not cross the reference of the of the controller and thereby the controller makes no changes. Gci (s) = −s + 1 Tl ·2 · KH2 − KSR − Krf f · KV · Kconvq s+ s 1 Tl ·2 · (5.

which shows to be too low for the reformer. The plot in figure 5.6 and λH2burn of 5 reason for the temperature not following the reference is that the heat input from the current density is too low.21 was performed with a hydrogen stoichiometry λH2 of 1.21: PI-controlled reformer temperature using λH2 at 1.20: Step response for the temperature with the parameters from table 5.8 P P i i K =116 and T =5 KP=84 and Ti=6.6.5 Control strategies 5 x 10 −4 0 Amplitude [-] −5 −10 −15 K =100 and T =5.9 −20 0 20 40 60 80 100 Time[s] Figure 5. 82 .1 550 500 Reformer temperature [K] 450 400 Reference Linear model 350 300 250 0 2000 4000 Time [s] 6000 8000 10000 Figure 5.

5 Control strategies 5. but the difference is negligible.2.3.1 13. The controller has an impact on the disturbance since the PI-controller is placed in the feed back path of the closed loop transfer function.30) and (5.6 9. The step response from figure 5.37) The search method for the controller parameters is extended for the stack controller and the result can be seen from table 5. (5. the step response is plotted for all the parameters to see the response of the system with the given parameters. KP 150 228 156 Ti 13.2 Fuel cell stack temperature controller The controller presented in (5.29) to (5.33) can also be added to the temperature controller for the fuel cell stack and this changes the closed loop transfer functions from (5. from the three given sets in table 5.33).37).21) and (5.5 and the three best sets of results are shown in table 5.2. If the closed loop transfer function for the disturbance is recalculated from (5.2.1 Overshoot[%] 1 1 1 Table 5. shows that the second set of parameters results in the fastest response but has a higher overshoot than the first set of parameter.38).2: Sets of variables from the parameter search In order to select the best parameters.20) is inserted the closed loop transfer function for the disturbance results in (5. Gd (s) = Kheati − Kf f · KV · Kconvq s+ s 1 Tl ·2 −s + 1 Tl ·2 · (5.22. The search for the parameters for the proportional gain KP was varied from 2 to 250 in the search algorithm and the search parameters for the integral constant Ti was varied from 2 to 14.38) ms cs s2 + (Kcond + KconvT s − KheatT s + KP KV Kconvq )s + 83 KP KV Kconvq Ti . The step response can be seen from figure 5.22 of the PI-controller parameter search. G(s) = KP KV Kconvq s + 1 K K Kconvq Ti P V Kp KV Kconvq Ti ms cs s2 + (Kcond + KconvT s − KheatT s + Kp KV Kconvq )s + (5.

04 −0.23: Step response of the disturbance with the PI controller.02 0. using parameters from table 5.6 y 0.23.5 Control strategies 0.03 −0.5 1 x 1.1 K =156 and T =13.07 −0.1 again has the fastest response with a change in the disturbance.6 P P P i i i K =228 and T =9.8 0.1 60 80 100 Figure 5.01 0 −0.1 K =156 and T =13.02 −0.1 0 0 0.4 0.06 −0.22: Step response with a change in temperature 1 0.08 0 20 40 Time [s] K =150 and T =13.2 K =150 and T =13.2 Plotting the step response for the closed loop transfer function can be seen from figure 5.05 −0. Inserting the controller parameters in the linear model for the stack temperature gives the response for the 84 .01 Amplitude −0.6 P P P i i i K =228 and T =9.5 2 Figure 5. It can be seen that the set of parameters where KP = 228 and Ti = 9.

15 to 0. Taking a closer look at the temperature when the reference is changed shows a small overshoot in the temperature which was expected from table 5. The overshoot was expected to be 1% and the model shows that it is lower than expected. The overshoot of 1% does not comply with the thermal system since the change in the temperature is less than 0.5 Control strategies temperature. The model includes the lag from the reformation process and the system response did not change much from the reference.25(b). The reformer temperature model showed that the 85 .1 The temperature responds to the changes in both the reference and the disturbance.24: Temperature response for the linear model of the stack temperature with KP = 228 and Ti = 9.24 460 440 420 Reference Linear model Temperature [K] 400 380 360 340 320 300 280 0 2000 4000 6000 8000 10000 Time [s] Figure 5.4 Summary This chapter has shown that it is possible to control the system with a PI-controller and that the parameters for the controllers can be determined from a parameter search in Matlab™. 5.01K from simulations. The first temperature change is where the temperature is held at 433 and the temperature response can be seen from figure 5. The response from the model can be seen from figure 5.4 when the time reaches 4000 seconds. The change of the temperature at 2000 seconds of the simulation shows the same overshoot. When the current density changes from 0.25(a).4 A/cm2 and the changes in temperature can be seen from figure 5.2. The current density is held at 0.15 and then the current density is stepped up to 0. The temperature is held at 433K (160◦ C) until the time reaches 2000 seconds then the temperature is stepped up to 453K (180◦ C).

98 451.5 453 433 452.5 433.5 Control strategies 433.02 Reference Linear model 454 Reference Linear model Temperature [K] 433.5 452 432. 86 .03 454.01 Temperature [K] 575 453.5 451 545 550 555 560 565 570 3990 4000 4010 4020 4030 4040 4050 4060 4070 4080 Time [s] Time [s] (a) Zoom of the overshoot at the temperature (b) Zoom of the step change in current density of 433K at T=4000 amount of hydrogen in the exhaust gas was too low for the temperature to reach the reference during a step up in reference.99 432.

used to control the system. The amount of H2 is initially set to around 2 l/min and the flow of air into the burner is set to about 10 times the H2 flow. 87 . firstly because the metal cant withstand the temperatures. By applying an PWM signal to the pump at 24 V .3. for comparison of the model and the system.1 Temperature experiments 6. is a fixed displacement pump.3 Experimental setup Evaporator Reformer 6.Implementation 6 6.1. The maximum frequency for the pump is 20 Hz. The program. and the catalyst in the burner would sinter. At the first experiments the WGS is empty and this requires the mass spectrometer to be able to read up to 5-8% CO. As mentioned before. as shown in figure 6.1 6.66. to measure the molar fractions in the reformer gas. A flashback would be noticed by a high temperature rise at the burner inlet. the fuel cell is able to sustain an CO amount of 2-3%. the frequency will not exceed approximately 14 Hz at a current density of 0.4 Simulated run 6.3 Dry gas composition 6.3.5 Summary This chapter investigates the physical system and evaluates on the first estimated system parameters. Some plots in this chapter will show the frequency of the pump.2 6. the pump will transfer 30ml of methanol mix to the evaporator. More plots of the experiments can be seen from Appendix A. though by the mathematical model. the need for a measurement of the available H2 and CO is required. This flashback is quite damaging to the burner.5. This airflow is applied to avoid flashback in the burner. Pure H2 is used to fuel the burner and is manually controlled by the labview program. All experiments are made with a SC ratio of 1.1 Experimental setup Before a fuel cell is attached to the reformer system. The fuel pump mentioned in this system.2 Gas flow in the system 6. The flow of H2 is measured from the MFC.3. is described in Appendix D 6. A mass spectrometer is used. shown in Chapter 2.

1: Running system without a fuel cell Burner outlet H2 for burner WGS Running/starting mode switch Burner air Methanol gas Reformer Cooler Electric air heater Evaporator Methanol inlet Pump Figure 6. evaporator and the cooler.6 Implementation MFC 1300l/min T T Reformer WGS Cooler mass spectrometer Burner MFC P T P T Evaporator H2 T T T MFC 200l/min Heater MFC 100l/min T T T Tank Pump Figure 6. and the maximum available flow is 100 l/min. 200 l/min and 1300 l/min.2: System overview The mass flow controller (MFC) is used to drive the airflow for the burner. The 100 l/min is installed on the burner 88 . The input for the MFC’s are 0-10V.

20 Methanol Evaporator air input Evaporator Evaporator gas outlet Temperature 200 175 15 Fuel pump frequency [Hz] 150 125 10 100 75 5 50 25 0 1000 0 2400 Temperature [C] 1200 1400 1600 Time [s] 1800 2000 2200 Figure 6.1. which simulates the exhaust of the fuel cell. see figure 6. The evaporator is heated by an electric air heater. the 200 l/min is installed on the evaporator. The mixture is led into the evaporator as shown at figure 6.5kg. and the temperature is initially set to about 160◦ C.2 Evaporator As shown in section 1. though some problems is shown in the setup of the system. where the methanol is vaporized. the temperature of the evaporator should be above 120◦ C. Airflow at 60 l/min As shown in figure 6. 6.2 and figure 6. This temperature is decreasing until it reaches the condensing temperature of the fuel mix. the first component in the gas flow is the evaporator and is described below.3 the evaporator contains 34 fins and have a mass of about 0. and converted in the program. The MFC’s has a rated settling time of < 500ms. A thermal image is taken from the evaporator casing and it can be noticed that the evaporator is quite revealed to the outside air.6 Implementation input. As shown in figure 6. to ensure the mix is evaporated. The airflow is varied throughout the experiments.2.3. The delivered flow is measured from the MFC’s as a feedback.3 the evaporator falls in temperature when there is a flow of 5Hz on the methanol pump. though overshoot on the delivered flow is common.2. As mentioned before. The evaporator should be able to evaporate a 5Hz flow from the pump as shown in figure 6. and the 1300 l/min is installed on the cooler.3: Evaporator temperature with 5 Hz methanol flow. There is no isolation at the front side 89 .

is in a pipe with a diameter of about 50 mm. because the difference in temperature would be the largest compared to the inlet air and the methanol mix. This can be seen in figure 6. The redesign should be done with more attention to the way the fuel is passed through the evaporator.4: Images of evaporator Considering the airflow through the evaporator. the model is based on the fact that the output temperature is the same as the evaporator temperature. though it is estimated that the temperature is higher compared to the evaporator temperature. With the same amount of material as the current evaporator the length would be increased. a measurement of the output temperature is not available. from the fuel cell. As the nonlinear model describes. Methanol inlet Electric heater Methanol inlet Air inlet Air outlet (a) Picture of air inlet side (b) Picture of air outlet (c) Thermal image of air inlet side (d) Thermal image of air outlet side Figure 6.4(c) and figure 6. This means that the flow of fuel and the flow of air would be in each direction towards each other. the heat transfer is calculated by 90 . the evaporator width would be about the same.4(d).6 Implementation of the evaporator. so loss of heat due to conduction is higher in this area. As described in [17] the most effective heatexchanger should be designed with a counterflow. Because of physical setup. As the output air.

though the evaporator is only covered partly with a layer of isolation. 91 . The model assumes no loss of heat due to conduction. This ensures the flow of methanol is evaporated when it enters the reformer. and the reformer is described below. If a regression on the output temperature and the airflow. The next step in the gas flow is the input into the reformer.6 Implementation ˙ Q = n (hout − hin ) ˙ (6. This increased temperature of the air inlet is used in the rest of the experiments. the temperature of the evaporator is monitored and if the gas outlet temperature falls below 100◦ C. At the start of the experiment. When a flow of methanol is started. If the mixed methanol and water is not in a vapor phase. the methanol pump is stopped. a more precise calculation on how much heat is transfered to the methanol. the electric air heater is turned up. a pump frequency of 5 Hz caused the evaporator to reduce its temperature to the condensing temperature of the fuel mix. this might cause the gas composition to change rapidly and this is not desirable. As the evaporator is not able to keep up at the given variables.1) The model assumes the enthalpy of the output air is only dependent on the evaporator temperature.

“Burner Temperature 2” is “T2”.3 Reformer The reformer is designed with a burner on the one side and a reformer on the other. The volume of the reformer is 0. “Burner Temperature 1” is shown as “T1”. “Reformer outlet temperature” is “T3” and “Burner gas outlet temperature” is “T4”.5.1 Temperature experiments The placement of the different temperatures sensors can be seen in figure 6. though on the width of the reformer the temperature difference is about 50◦ C. Running/starting mode switch Reformer outlet Burner inlet Reformer inlet Burner outlet Figure 6.6. and is attached with a high temperature resistant glue. compact design and a low thermal mass.7(b). Experiments based on [16] show that the temperature difference can be up to 150 ˆirc C.3. This can be seen from figure 6. As the temperature on the reformer side is about the same as the burner side. good heat transfer.4l and the weight is around 1kg. the burner inlet and outlet can be seen. and this can be seen from figure 6. As shown in [16] the temperature on the length is as high as 150◦ C.6 Implementation 6. The thermal loss due to conduction was a concern. The reformer is located on the far side of the picture.7(a) and figure 6. and can be seen with a reformer inlet and outlet. to decrease the thermal gradient through the reformer.5.5: Reformer image Initially the reformer was covered in the middle with a layer of Rockwool. 6. A thermal picture was taken and c can be seen in figure 6. 92 . the reference temperature is set at the burner side. This is done by adding Rockwool at the ends of the reformer. The advantages of this design is. The temperature sensors used is a K type sensor. so some improvements was made to reduce the thermal conductivity.

the temperature would change rapidly. because of a faster feedback of the temperature is possible. The experiment is shown in figure 6.8 there is no flow of methanol through the reformer part. In figure 6. One at the gas inlet of the burner side (Burner temperature 2) and another about 2 cm down the burner areal (Burner temperature 1). At about 250s. “Burner temperature 1” is chosen as reference temperature.7: Thermal images of reformer without end isolation The desired temperature of the reformer is about 350 ◦ C. The airflow is set to 10 times the flow of the hydrogen and is based on experiments in [3]. This does not seem to happen. (a) (b) Figure 6. The difference between “Burner temperature 1” and “Burner temperature 2” is about 50-100◦ C. though different temperatures is read throughout the reformer length[16]. the feed forward is changed to deliver 9 times the hydrogen flow and at 280s the feed forward is changed to 8.6: Placement of temperature sensors The next experiment is conducted to see how much hydrogen and air that is needed for the reformer to reach the desired temperature. Two temperature sensors is applied to the burner. If there is any indication on flashback in the burner. This means that the loss of temperature in the reformer only depends on the conduction and convection from the airflow.8.6 Implementation MeOH in MeOH out T3 T4 H2 out H2 in T1 T2 Figure 6. thus the reference temperature for “Burner temperature 1” is 350 ◦ C. since the temperature in the outlet gas is 93 .

10 and it takes about 350s.11 where the methanol pump frequency is set to 5Hz. Fittings and tubes at the exit temperature is not isolated in any significant way. The temperature of “Burner gas outlet temperature” is decreasing throughout the experiment. and this might suggest that a larger mass of the reformer should be used. The same experiment is shown later in figure 6. and it is concluded that a gain of 5 is enough for the temperature to be stable. the effects of changing temperatures can be seen in the composition. a change in hydrogen can happen. At 800s the reference temperature reaches 350◦ C and the temperature is kept relatively constant. The experiment continues in figure 6. As for the finished system.9 where a PI regulator is applied. The temperature of the reformer is tested in the same way. the difference in the two temperature measuring points is about 50-100◦ C and the temperature at “Burner temperature 1” is changing faster compared to “Burner temperature 2”. As mentioned before.8: Airflow compared to hydrogen flow in burner almost constant. and will be covered later in this chapter. Ti = 0. So by leaving the PI regulator at a low regulation. though this is leveling out at about 125◦ C. The oscillating change in temperature is not desirable.6 Implementation 40 Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 30 20 10 0 0 50 100 150 200 250 300 Time [s] 350 400 450 500 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 550 Figure 6. 94 Temperature [C] Flow [l/min] . and this could look something like the effect the slow PI regulator is doing. An experiment was carried out to test a starting sequence to see how long it takes to change the temperature from 150 to 350◦ C.01). At about 460s the feed forward gain is changed back to 10 and the hydrogen flow is changed to 2l/min.001. The reference set point is 350◦ C and the gain of the regulator is set at a low level(Kp = 0. This is shown in figure 6.

1). The temperature is measured at about the halfway between the reformer gas outlet and the WGS inlet. As the 95 Temperature [C] Temperature [C] Flow [l/min] . The temperature measured at the WGS can be seen in figure 6. This WGS catalyst is designed to withstand a temperature at around 300◦ C. and is much below the 300◦ C first estimated.9: Controlling temperature of reformer with a low gain controller 70 65 60 55 50 45 Flow [l/min] 40 35 30 25 20 15 10 5 0 500 600 700 800 Time [s] 900 1000 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature Airflow H2 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 1100 Figure 6.11 was also conducted to see the temperature is in the reformatted gas. The next step in the system is to direct the gas though the WGS (as shown in figure 6.11 and is a little below 100◦ C. The temperature in the end of the WGS container is measured.6 Implementation 40 Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 30 20 10 0 650 700 750 800 Time [s] 850 900 950 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure 6.10: Startup from 150◦ C with 2l/min and 8 times the airflow in feed forward gain 6.

12 between the reformer outlet temperature. The temperature of the fuel cell is about 160-180◦ C and the input temperature of the gas flow is measured to around 80◦ C at the cooler outlet.11: Change in methanol flow from 0 to 5 Hz Temperatures is compared in figure 6. The PID regulator in the program can be seen from Appendix D.6 Implementation 20 Methanol Burner Temperature 1 Reformer Outlet temperature Burner gas outlet Temperature WGS Temperature 400 375 350 325 300 250 Temperature [C] Temperature [C] 275 225 200 175 150 125 15 Fuel pump frequency [Hz] 10 5 100 75 50 25 0 1000 1200 1400 1600 Time [s] 1800 2000 2200 0 2400 Figure 6.2.1 is changed. some changes in the PID parameters was conducted. 20 Methanol Reformer Outlet temperature Cooler outlet temperature WGS Temperature 375 350 325 300 15 Fuel pump frequency [Hz] 275 250 225 10 200 175 150 125 5 100 75 50 25 0 1000 1200 1400 1600 Time [s] 1800 2000 2200 0 2400 Figure 6. The change can be seen in figure 6. 96 .12: Temperatures measured after the reformer with a methanol flow of 5Hz As the ripple on the burner is undesirable. WGS temperature and Cooler temperature.13where the parameters from table 6.

Such a combination is often called a PID regulator.3). and this it cannot be realized.6 Implementation Seconds Start 540s 815s 900s P 0. a differential part is added to the regulator. but if there is noise in the reference signal. Differential regulators are known to add stability to the system. you can get a controlling system like (6. though the theoretical PID regulator is not physical installable. 1 Td s + Ti s αTd s + 1 97 Gc (s) = Kp 1 + (6.01 0.13: Changing the controlling variables To avoid temperature fluctuations.1 1 I 0.01 0.1: PI parameters change in figure 6. The theoretical PID regulator can be seen in (6. There is some times a need to combine a PI and a lead-compensator in a regulating system.01 D 0 0 0 10 Table 6.01 0.2).13 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 45 40 35 30 Flow [l/min] 25 20 15 10 5 0 Airflow H2 0 100 200 300 400 500 600 700 Time [s] 800 900 1000 1100 1200 1300 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 1400 Figure 6.3) Temperature [C] .001 0. 1 + τd s) τi s Gc (s) = Kp (1 + (6.2) This theoretical PID-system has two zeros and one pole. the differentiator can reduce stability.01 0. If we modify the differentiator to only being effective under a certain frequency.

This container is empty in this experiment.14(a). Since there is no flow measurements on the system. If the MFC’s are used in future work. As mentioned before the overshoot of the MFC’s is high and because of this the use of MFC’s in this system is not desirable. 98 . This is a transfer function with two zeros and two poles. though there is not the same noticeable change in temperature. 6. there is a lag of about 31s before the temperature change is noticed. This temperature change can be noticed in the reformer gas outlet and also in the WGS container. A noticeable change of temperature in the reformatted gas can be seen at about 1100s into the measurement figure 6. This transport lag is considered to be the same as the flow lag through the reformer and evaporator. Another experiment was conducted at 1 Hz flow instead and this can be seen in Appendix A.14(b).4. so an estimation of the lag can be seen in figure 6.3. When the flow of methanol is started.2 Gas flow in the system When doing these experiments. a lag is measured between the input flow of methanol and the reformatted gas. This system is able to be realized. the need of identifying the transfer function for the MFC is required. During the experiments a few indications was seen on how long this gap is. The change in methanol is zoomed in at the frequency change. This experiment concludes the same.2. and this might cause some variations compared to the theoretical model. The influence of the MFC’s in the system is not included in any way. though an experiment with a flow measurement should be conducted to verify the temperature and flow correlation. another way to see how long the lag is. so this only validates the transport lag time. at least at certain frequency areas. is to look at the temperature change when the methanol flow is turned on.6 Implementation where α < 1.

6 Implementation 20 Methanol Burner Temperature 1 Reformer Outlet temperature Burner gas outlet Temperature 375 350 325 15 Fuel pump frequency [Hz] 300 275 Temperature [C] Temperature [C] 250 225 10 200 175 150 125 5 100 75 50 25 0 0 500 1000 1500 2000 Time [s] 2500 3000 3500 0 (a) Temperatures compared to methanol flow 20 Methanol WGS Temperature Reformer Outlet temperature Cooler outlet temperature 375 350 325 300 15 Fuel pump frequency [Hz] 275 250 225 10 200 175 150 125 5 100 75 50 25 0 1000 1050 31s 1100 Time [s] 1150 1200 0 1250 (b) Zoomed in at the frequency change from 1000s to 1250s Figure 6.14: Influence in temperature at the reformer gas exhaust when the pump frequency changes from 0 to 5 Hz 99 .

15.6 Implementation 6. First measurements was done without any WGS catalyst and at a low methanol flow (1 Hz). calibrated to measure H2 . the measurement of the gas is the dry gas composition.15: Condenser before the mass spectrometer Switching from air to reformat gas can be seen in almost all the experiments. CO2 .4) xgas 1 − (xh2o + xch3oh ) xdrygas = (6. 16% CO2 and 75% H2. CO. at the change in gas composition. The measurement ends up at about 6% CO. The results can be seen in figure 6. The measurement is started at about 50 seconds after the methanol pump is started.1. Condenser Reformat gas measurement Swich for reformat gas Figure 6. This can be seen from figure 6. As the methanol and water is extracted from the gas. and the switch valve is changed to the gas flow at 80 seconds.4) The molar fraction in (6. a switch valve is installed between outside air and the reformatted gas. On the reformer gas outlet.3 Dry gas composition The molar fractions is made with a Pfeiffer Omnistar mass spectrometer.4) describes the relationship between the drygas fraction compared to the real gas composition. This mass spectrometer measures the dry gas composition of the gas placed as shown in figure 6. and CH4 .16 and shows how the composition changes over time. 100 .3. The spectrometer is very sensitive to condensed water which requires the water and methanol is extracted by a condenser before gas is measured. This can be calculated by (6.

18 shows the center temperature of the catalyst to from about 120 to 200 ◦ C. and the temperature is monitored in the next experiments. and figure 6.6 Implementation 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 CO CO2 H2 Burner Temperature 1 WGS Temperature Evaporator Reformer Outlet temperature 450 425 400 375 350 325 275 250 225 200 175 150 125 100 75 50 25 0 200 Temperatures [C] 300 Dry gas [%] 0 20 40 60 80 100 Time [s] 120 140 160 180 Figure 6.16: Sample measurement from mass spectrometer.5x1. Isolation is installed on the WGS container.300 ◦ C. Temperatures above 280 ◦ C should be avoided. though it is considered a vertical position is better. This is a bit under 101 . As the catalyst is installed in 1. Gas input Temperature measurement Gas output Figure 6. Measurement is without a WGS catalyst and 1 Hz methanol pump frequency The container is filled with a WGS catalyst BASF SP-68. though typical operating temperatures are in the range of 230 .17: WGS container The container is placed in a horizontal position.18. The rated operating temperature is about 200 .260 ◦ C. The catalyst is installed in a 8 cm long cylindric container with a diameter at about 3 cm. though peaks can be tolerated up to 320 ◦ C [4].5 mm pellets. The rising WGS temperature is compared to the dry gas fraction and shown in figure 6. the room for installing the catalyst is limited.

19(b). and new measurements is taken. The evaporator temperature decreases rapidly and the WGS temperature changes about the same though in the opposite direction. In the next experiment. though more research into this catalyst has to be made. the CO2 concentrations are rising and the CO concentrations is falling. a change in methanol flow is made to 15 Hz. measurements are taken with changing flow of methanol. though before more isolation is installed.19(a) and methanol flow in figure 6. This measurement is taken about 5400 seconds (about 1:30 hours) and it can be seen that the CO concentrations is stable about 2% CO. In the dry gas concentrations.18: Sample measurement from mass spectrometer.6 Implementation 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 CO CO2 H2 Burner Temperature 1 WGS Temperature Evaporator Reformer Outlet temperature 5400 5500 5600 5700 5800 5900 6000 Time [s] 6100 6200 6300 6400 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 6500 Figure 6. more investigation on the gas inlet temperature is necessary.19 shows the dry fraction compared to the methanol flow and the temperature of the system. Molar fractions compared to temperature can be seen in figure 6. The mass spectrometer is recalibrated.it can be noticed that the CO concentrations i greatly reduced. The experiment shown in figure 6. This can indicate that the reaction rates on the WGS reaction is increasing. Measurement with WGS SP-06 catalyst and the container with the catalyst has been isolated. The pump is set at 5Hz the rated temperature. The flow is manually changed so the temperature of the evaporator is always higher compared to the boiling point of the mixed fuel. This change does inflict on the temperature of the WGS and the evaporator. This temperature changes from 100◦ C to about 200◦ C.As shown in 102 Temperature [C] Dry gas [%] . At about 3500s into the experiment. As the temperature is changed to 400◦ C. At about 4000 seconds into the experiment the reference temperature of the reformer is changed to 400◦ C. The temperature of the WGS catalyst changes by the rate of the flow from the reformer.

21(b).21(a) and figure 6. the temperature of the reformer might be higher and might damage the heat exchanger. the “burner temperature 2” is higher.6 Implementation 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 CO CO2 H2 Burner Temperature 1 WGS Temperature Evaporator Reformer Outlet temperature 500 1000 1500 2000 2500 Time [s] 3000 3500 4000 4500 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 5000 (a) Measurement of WGS temperature and varying methanol pump frequency 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 20 CO CO2 H2 Methanol 18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0 5000 Dry gas [%] 500 1000 1500 2000 2500 Time [s] 3000 3500 4000 4500 (b) Pump frequency compared to dry gas fractions Figure 6.20 the different temperatures are compared to the methanol flow. 103 Temperature [C] Dry gas [%] . The dry gas composition can be seen from figure 6. The startup of the reformer with no methanol flow.19: Measurement from mass spectrometer figure 6. though after the methanol flow is started. As the maximum temperature of the heat exchanger is about 500 degrees. This temperature difference in the reformer can also have an influence in the gas composition. the temperature drops much below the regulated temperature. It can be noticed how the temperature at “burner temperature 2” is changing compared to the regulated “burner temperature 1”.

and it is seen that the concentration of CO is decreasing. This could indicate that the heat lost in the uisolated tubes between the reformer and WGS is lowering the temperature too much. because it is estimated that the temperature is lowered enough by the unisolated tubes between the reformer and WGS. The cooler installed is thereby unnecessary large and the loss in the tubing is estimated to be enough for the gas to enter the fuel cell. The next section investigates the needed amount of hydrogen added to the burner. The output gas from the reformer ( 300◦ C) is not needed to be lowered by any external equipment.21 is about 3% CO. The measured gas composition in figure 6. and is thereby not comparable to the experiments done in [4].20: Temperatures compared to methanol flow. to test the difference between the burner temperature and the reformer surface temperature. 104 Temperature [C] . The temperature sensor is not attached to the reformer.6 Implementation 20 Methanol 15 Fuel pump frequency [Hz] Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Cooler outlet temperature WGS Temperature Burner gas outlet Temperature 10 5 0 0 500 1000 1500 2000 Time [s] 2500 3000 3500 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 4000 Figure 6. at 200 ◦ C. at its highest.21 It can be noticed that the temperature of the WGS is changing from 100 to about 140◦ C. 19% CO2 and 80% H2 at a setpoint of 400◦ C at the burner. Same experiment is compared to dry gas fraction in figure 6. The output gas temperature of the WGS is. A temperature sensor is placed on the surface side of the reformer.

The required temperature of the reformer is 350◦ C and is measured in the exit gas of the reformer.6 Implementation 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 CO CO2 H2 Burner Temperature 1 WGS Temperature Evaporator Reformer Outlet temperature 0 500 1000 1500 2000 Time [s] 2500 3000 3500 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 4000 (a) Measurement with mass spectrometer from 700s to 2400s 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0 CO CO2 H2 Burner Temperature 1 WGS Temperature Evaporator Reformer Outlet temperature 0 500 1000 1500 2000 Time [s] 2500 3000 3500 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 4000 (b) Measurement with mass spectrometer from 2600s to 4000s Figure 6.20 6. The temperature of the reformer was logged and compared to the methanol flow in the reformer.21: Measurements with mass spectrometer with changing methanol flow. a series of experiments was conducted. Temperatures on the surface of the reformer and burner was also logged. As the temperature in the evaporator is not 105 Temperature [C] Dry gas [%] Temperature [C] Dry gas [%] . The methanol flow can be seen from figure 6.4 Simulated run To determine the needed excess hydrogen for the burner.

6 Implementation

able to be held at a acceptable level, at the given flow rates from the model, the temperature of the electric heater is increased.
4.4 4.2 4 3.8 3.6 3.4 3.2 3 2.8 2.6 2.4 2.2 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0
H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

0

500

1000

1500

2000

2500 3000 Time [s]

3500

4000

4500

5000

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(a) Temperature compared to hydrogen flow
20
Methanol Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0

0

500

1000

1500

2000

2500 3000 Time [s]

3500

4000

4500

5000

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(b) Temperature compared to methanol flow

Figure 6.22: First simulated experiment - Temperature of reformer and burner compared to methanol flow

The temperature of the reformer outlet gas is monitored as the flow of hydrogen and methanol is changed, and this can be seen in figure 6.22(a) and figure 6.22(b). Before the methanol flow is started, the reformer is heated to about 400◦ C with 1 l/min hydrogen. The feed forward is set to a gain of 5 times the airflow, and by this ratio the temperature of 300◦ C is reached in about 500 seconds. As the 106

Temperature [C]

Temperature [C]

Flow [l/min]

6 Implementation

temperature at the reformer is lower compared to the 350◦ C goal temperature, the reference temperature is changed to 400◦ C and then 450◦ C. As the temperature drops at the burner and reformer, the hydrogen flow is changed to 2 l/min at about 3400s. This increases the temperature of the reformer again and the flow of methanol is changed to 8 Hz at about 4700s. The temperature of the reformatted gas is stable at about 360◦ C and a second experiment was conducted with these data in mind.
4.4 4.2 4 3.8 3.6 3.4 3.2 3 2.8 2.6 2.4 2.2 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0
H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

0

500

1000 Time [s]

1500

2000

2500

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(a) Temperature compared to hydrogen flow
20
Methanol Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0

0

500

1000 Time [s]

1500

2000

2500

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(b) Temperature compared to methanol flow

Figure 6.23: Second simulation experiment - Temperature of reformer and burner compared to methanol flow

107

Temperature [C]

Temperature [C]

Flow [l/min]

6 Implementation

The second experiment was done with the burner reference temperature of 400◦ C and the flow of hydrogen was changed to 1.6 l/min . This can be seen from figure 6.23(a) and figure 6.23(b). The methanol flow was changed to 8 Hz and the temperature was monitored. This flow was kept for 800s and the temperature of the reformatted gas was stable at about 350◦ C. The methanol flow was changed to 15 Hz, and the temperature was stable for another 500 seconds.
4.4 4.2 4 3.8 3.6 3.4 3.2 3 2.8 2.6 2.4 2.2 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0
H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

0

500

1000 Time [s]

1500

2000

2500

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(a) Temperature compared to hydrogen flow
20
Methanol Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature

18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0

0

500

1000 Time [s]

1500

2000

2500

575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0

(b) Temperature compared to methanol flow

Figure 6.24: Third simulated experiment - Temperature of reformer and burner compared to methanol flow

In the third experiment the flow was set to 1.6 l/min and the methanol flow was set to 15 Hz at about 550s. The temperature of the reformer outlet gas is seen stable at 108

Temperature [C]

Temperature [C]

Flow [l/min]

6 Implementation

about 340◦ C and this is kept for about 1000s. At 1500s the hydrogen flow is changed to 1.4 l/min and the temperature of the gas is decreasing. At about 2400s the flow of hydrogen is changed back to 1.6 l/min and it is concluded that the burner flow at 15Hz methanol flow is about 1.5 l/min . The 15Hz methanol flow is set after a calculation made in the model, where the fuel cell is at its maximum capacity. As the temperature is held constant at a hydrogen flow of 1.5 l/min and the calculated hydrogen usage in the fuel cell is 2 l/min. The estimated λh2 is calculated to 1.75, which means that 175% excess power from the fuel is required.

6.5

Summary

The feed forward gain on the burner side is estimated to be around 5 times the hydrogen flow. This gain must be high enough for the hydrogen is catalytic burned.The evaporator is estimated to be too small for the system with the parameters from the model. Too much power is lost due to conduction and the assumption on the output air, being the same as the evaporator, is questionable. The gas compositions measured does imply that the WGS reaction is temperature dependent, because at higher temperatures, the CO concentrations is lowered. The measured CO concentrations is about 3% CO, 19% CO2 and 80% H2 with a setpoint of 400 ◦ C at the burner. The change in methanol does not seem to have a large impact on the composition of gas, though since the measured gas is made with a mass spectrometer, alternative measurements could be adviceable. The temperature of the burner seems fairly easy to control, though a specific blower might reduce the small deviations from the specified setpoint. Experiments were made with the intent of identifying the needed amount of H2 for the burner, so the temperature of the reformer does not fall in temperature at maximum rated methanol flow. This was estimated to be around 1.5 l/min hydrogen with airflow feed forwarded with a gain of 5. The needed λh2 is estimated to be about 1.75.

109

6 Implementation 110 .

efuel needs for the fuel cell and reformer. though this is assumed valid. The mass flow controllers are known to cause large overshoots at step changes. The approach of using the feed forward airflow controller is good for the system. From a control point of view. The response from the linear model. The linear models are all created with a changeable working point. and the loss from convection and conduction. This means that the equations can be changed quickly according to different operating points. shows that the controllers in theory are faster than the thermal systems that they are controlling. The model has a low simulation time and simulates the system in two modes. since the feed forward function is used to avoid the flashback from the burning of the hydrogen. The model does not apply changes to the hydrogen fraction. This is explained with a combination of low λh2 of 1. The reformer feedforward transfer function shows a high convective heat transfer. Before implementing the parameters from the controlling chapter.The parameter search scripts are based on the linear model of the system. and is highly tuned.5. Changing this ratio will require the user to recalculate the variables for the hydrogen coverage of the cell.75 and this will 111 . i. Start up and running mode. Changes in the linear model will also change the output controller parameters from the script. which may be based on the burner stoichiometry. The responses of the system components are assumed to have reached the reference temperature when the output is within 2%. heating demands for the vaporation. of the fuel cell stack. is assumed to be caused by the mass flow controllers. ordinary blowers should be used. since the change of the hydrogen fraction is small compared to the temperature. compared to the implemented system. The model for the fuel cell stack had no problem changing the reference temperature. From experiments the hydrogen stoichiometry was found to be 1. The nonlinear model has been linearized and acts as the base for the controller parameters calculation. the model describes the bottlenecks in the system. As these parameters can be changed. The feedforward function is part of the controllers for the reformer and fuel cell stack models. or the reformatted gas composition at different temperatures. The model can be used to evaluate a lot of issues ˙ with the system.Conclusion 7 The model is evaluated as being fast and reliable enough for controllers to be tested. The model assumes a constant steam to carbon ratio. A problem was found in the reformer model as the reformer had trouble reaching the reference temperature. All the controller parameters showed a 1% overshoot and a fast response. The difference in controller parameters. the model calculates electric efficiency of the system and effects of the changes can be viewed quickly.

The reformer temperature is controlled and if the reformer temperature is constant. then the available energy transfered from the fuel cell should be sufficient. Lagging the current density showed that a step change of the current density was possible within 30 seconds. the temperature of the air might decrease. The temperature of the output air from the fuel cell might also be lower compared to the fuel cell temperature. Both the linear model and the nonlinear model estimator uses a constant mass conversion factor in the reformer. The linear model uses a constant for the hydrogen fraction. The reformer linear model did not reach the temperature specified. The estimator is inserted into the nonlinear model. the hydrogen fraction must be known. Changing the current density from a higher current density to a lower current density without a lag. and it is seen that the inserted λH2 is the same as the measured hydrogen input for the burner. could force a flashback inside the reformer. in the fuel cell.86. In the nonlinear model the estimator uses the hydrogen fraction from the reformer gas composition regressions.7 Conclusion supply more hydrogen as fuel for the burner. though this may be calculated from a linear regression based on the reformer temperature. This would increase the temperature and decrease the efficiency based on the extra fuel needed. The air for the feed forward controller is also lagged since it is based on the amount of hydrogen at the reformer. If the airflow from the fuel cell is increased. though deviation at changing temperatures and SC ratio is required to be included. and the conversion factor Kcom has to be tested. the electric heaters. In the current system. The model assumes no loss in tubes. can also be lower compared to the experimental amount. that the temperature of the outlet is the same as the evaporated temperature. would still be required. with a value at about 1. If the assumption. 112 . The approach for lagging the current density shows usable results. This is caused by the feedforward controller would react too fast and would decrease the air below the allowable limit. The heat transfered from the fuel cell is set to the same temperature as the heat inserted in the evaporator. used in the evaporator. The evaporator has a problem concerning the available heat transfered from the fuel cell. The calculation that involves the hydrogen consumption. and this might cause some deviations from the model to the physical system. experiments has to be conducted where the airflow compared to the temperature is plotted. though it is not the case. For the model to apply in this area. If this estimator is implemented in a real system. and this should be investigated. Even though the assumption is correct. the hydrogen fraction may also be assumed constant. 200W is used from the electric power generated at the fuel cell. The estimator is designed with an implementation in mind. but the characteristics for the reformer temperature showed that a fast change in the current density was possible.

7 Conclusion The amount of excess fuel λH2 . A newer reformer should be installed and the experiment should be conducted again. If the fuel estimator delivers a higher amount of fuel. in the evaporator.5 was too low. The input fuel. The calculated efficiency from the model is approximately 18%. a good approximation on the hydrogen usage and the reformation hydrogen fraction is crucial. and temperature of the reformer. The electric heaters. compared to the necessary amount.5 which was sufficient. This might have caused λH2 in the experiment to be higher compared to a newer heat exchanger. and λH2 was changed to about 1. The electrical usage for the blowers and evaporator is subtracted from the fuel cell electrical output. methanol flow estimation. is assumed to be about 25% of the electrical output from the fuel cell. was estimated to be around 120% in the initial phase. though if the evaporator could utilize the excess heat. Even though the parameters of the estimator is known. the reformer might decrease in temperature. and the temperature in those experiments was above the limit of the reformer. based on the estimator. and thereby increasing the fan connected to the burner. the need of electric heaters would be lowered. As the input fuel for the system is based on the estimator. This experiment was done on a catalyst that had been used in other experiments as [16]. and the experiment worked only with a λH2 above 1. A significan way to increase the overall efficency would be to utilize the excess heat from the burner. The experiments and the linear model showed that the estimated λH2 of 1. This is why efficiency is highly dependent on the electric heaters in the evaporator. and thereby reducing the need for electrical heaters in the evaporator. is one of the main factors when talking about efficiency. The efficiency of the system is calculated by comparing the input from the fuel to the electrical output. because if the reformer lacks hydrogen. 113 . By removing the electric heaters in the evaporator. since the heaters is run on electricity from the fuel cell. The nonlinear model estimated that his was too low for the reformer to keep its temperature.75. would directly inflict on the efficiency. the need for excess fuel might still be necessary. used in the burner. the input hydrogen for the burner would increase. The system is currently not designed to utilize the excess burner gas.

7 Conclusion 114 .

the methanol vapor would maybe exit the evaporator at a higher temperature. If the entry of the liquid methanol was presented at the colder side. though this has to be tested. This has only been modeled. For the methanol can be inserted directly in the burner. since the estimator is only presented in the model. Investigations on how much the heat is transfered to the evaporator from the fuel cell exhaust air. Stable temperatures in the reformer might cause the reformat gas to be with higher hydrogen concentrations. 115 . To validate the estimation of the fuel. the use of more controlling applications is needed. where the air from the fuel cell has the highest temperature. The flow of methanol enters at the side of the evaporator. the need of two pumps needs to be implemented. The control strategies applied to the system was based on a PI-regulator and changing the control strategies might reveal better response. One with methanol and one with water. If the need for electric heaters in the evaporator is reduced. as the need for the cooler was lesser or none. The fittings used in the system also presents large volumes for the flows and this may reduce the amount of heat for fluid passing through the phases. data for the gas composition and the hydrogen usage in the fuel cell stack must be investigated. The startup mode for the system assumes that the system can heated from burning pure methanol in the burner and the convection can transfer the heat from the burner to the fuel cell stack. though some of the work presented in this report must be investigated in the future. Implementing faster and more reliable blowers for the system might improve the reduce the reformer temperature gradients. and a physical experiment needs to be performed. Investigations for the estimator in a real system should be applied. Some considerations for the reconstruction of the system may be needed. The evaporator shows a dropping temperature when experiments with high fuel flows are performed.Future work 8 The project presents a good base for control strategies.

8 Future work 116 .

is found by varying the flow of hydrogen in the burner. To obtain a good set of controller parameters. The purpose of the project is also to investigate a general control approach for the system. for keeping a constant reformer temperature. The system is modeled with the start up and a running stage. an estimator is presented. until the model has the same amount of excess hydrogen as shown in the experiments. startup mode and running mode. has been presented. in the exhaust gas. Experimental work is presented to obtain knowledge about the hydrogen stoichiometry. The system contains an evaporator unit. 117 .in the nonlinear model. The investigation of a fuel estimator. The nonlinear model is converted to a linear model and is used for testing a PIcontroller. The nonlinear model simulates the start up and the running stage. The electric efficiency for the system is calculated to approximately 18% based on the higher heating value of methanol. The experiments are performed by simulating the fuel cell exhaust using a mass flow controller. The system reformer unit uses the endothermic steam reforming process and is heated directly by the burner. The hydrogen stoichiometry is varied . In the running stage the reformer unit is heated by burning the excess hydrogen from the fuel cell stack exhaust gas. a mathematical parameter search routine is presented in MatLab ™. The hydrogen needed. The feedforward approach is used in the system to feed the reactions happening in both the reformer and fuel cell stack. using a feedforward approach. To obtain a constant stoichiometry for the hydrogen. a reformer and burner unit and a fuel cell stack. The system is created to run in two operation modes. The start up stage uses pure methanol for the burner and convection is used for heating up the respective components of the system. The estimator shows good theoretical results but has not been tested on a physical system. based on the current density.Project Summary 9 This project investigates the efficiency of a methanol fuelled high temperature PEM fuel cell system.

9 Project Summary 118 .

Fuel Cell Handbook. ISBN-13: 978-0-470-84857-9. Ogata. Product Bulletin . Corporation. “Selectra SP 60. Søren K. Perry and D. ECS Transactions.Mar 08-2. 2001. Andreasen. [14] R. [4] BASF. Modelling and evaluation of heating strategies for high temperature polymer electrolyte membrane fuel cell stacks. Perry’s Chemical Engineers’ Handbook. Basf catalyst selectra sp . LLC. Experimental characterization and modeling of commercial polybenzimidazole-based mea performance. [2] Søren Juhl Andreasen and Søren Knudsen Kær. Inc. Handbook of Chemistry & Physics. edition. ISBN: 0-13-043245-8. International Journal of Hydrogen Energy. Journal of Power Sources. Regressions for boiling temperatures of mixed fuel based on [5] and [14]. [11] James Larminie and Andrew Dicks. December 2005. Experimental evaluation of a pt-based heat exchanger methanol reformer for a htpem fuel cell stack. ECS Transactions. John Wiley and Sons. Data are fitted to a PEMEAS MEA operated from 160 to 180 [◦ C]. Korsgaard and Mads Pagh Nielsen. 2009. 2005. Integration of high temperature pem fuel cells with a methanol reformer. ISBN:142006679X. Journal of Power Sources. 119 . EG&G Services Parsons. 5th edition. 2006. Taylor and Francis Group. 2007. Kær. [12] Mads Pagh Nielsen. and Mads P. 5(1):197–207. Nielsen.H. Prentice Hall. [8] Ryan O’Hayre et al.pdf”.60. 89th edition. Mads Bang. Science Applications International [7] Chao Pan et al. 2008. 2008. Fuel Cell System Explained. (Editors) Green.Bibliography [1] Søren J. [9] Anders R. [3] Søren Juhl Andreasen and Søren Knudsen Kær. Mads P. 2000. Modern Control Engineering. Kær.W. John Wiley and Sons. [13] K. [6] Inc. Found on CD. and Søren K. Korsgaard. 33(17):4655 – 4664. 2005. 162(1):239 – 245. ISBN:0-07-142294-3. ISBN: 0-471-74148-5. 2003. Fuel Cell Fundamentals. PBI_FUEL_CELL_MODEL. Research based on [5] and [14]. 12(1):571–578. 400 w high temperature pem fuel cell stack test. Rasmus Refshauge. McGraw-Hill. Found on CD. [10] Anders R. Nielsen.EES. 4. 2008. Inc. pages 392–398. [5] CRCnetBASE. 2007.

HyTec 10th semester Master Thesis. AAU.Appendix [15] P. Kæ r. 2008. Søren K. Investigation of Lifetime Issues in HTPEM Fuel Cell Based CHP Systems: Stack Level Degradation. L. Experimental evaluation of a pt-based heat exchanger methanol reformer for a htpem fuel cell stack. A. Cengel. and Mads P. 1. 2005. [17] R. Nielsen. [16] Søren J. McGraw Hill. 2008. 2 edition. Turner Y. 12(1):571–578. 120 . Andreasen. ECS Transactions. ISBN: 007-123926-x. Rasmussen. edition. H. Fundamentals of thermal-fluid science.

200 l/min and a 1300 l/min. Before isolation a thermal image was taken of the WGS. The MFC is of the type Bürkert 8626 and has a analog input reference at 0-10V. This is done by changing the state of the running/startup switch. evaporator and cooler is install respectively.2(a) and figure A. a mixture of methanol and water is pumped into the evaporator. This can be seen from figure A.2(b). where the burner. The exit gas is sent either into the reformer.Experiments A H2 for burner A. 121 .1: System overview Figure A. The installed MFC’s in the system is a 100 l/min. where the reformatted gas is directed into the WGS container. The outlet of the reformer can be noticed on the far side of the reformer.1 the WGS is isolated. or into the burner. As shown in figure A.1 is a general overview of the system. From below.1 Description of system Burner outlet WGS Running/starting mode switch Burner air Methanol gas Reformer Cooler Electric air heater Evaporator Methanol inlet Pump Figure A.

Appendix A (a) Normal image (b) Thermal image Figure A. 122 . A thermal image was taken of the reformer and this can be seen from figure A.2: WGS container Temperatures are measured to about 150 ◦ C at the inlet. (a) Real picture (b) Thermal picture (c) Real picture (d) Thermal picture Figure A.3(b).3: Reformer images As shown in figure A.1 there is added isolation at the ends of the reformer.

123 . “Burner Temperature 1” is shown as “T1”.4: Placement of temperature sensors “Burner Temperature 1” and “Burner Temperature 2” In figure A.4 the placement of the different temperatures sensors can be seen. and is attached with a high temperature resistant glue. The temperature sensors used is a K type sensor. “Burner Temperature 2” is “T2”.A Experiments A.2.1 Experiments with reformer Experimental setup Figure A.4 is a drawing of the Reformer burner seen from above. MeOH in MeOH out T3 T4 H2 out H2 in T1 T2 Figure A. “Reformer outlet temperature” is “T3” and “Burner gas outlet temperature” is “T4”.2 A.

2 Startup and shutdown of reformer Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 350 325 300 275 25 20 250 225 Temperature [C] Temperature [C] Flow [l/min] 15 200 175 150 10 125 100 5 75 50 25 0 0 1000 2000 3000 Time [s] 4000 5000 6000 0 Figure A.Appendix A A.6: Startup from 150[◦ C] 124 . This experiment is without an isolating cover hence the lower temperatures of the burner 70 65 60 55 50 45 Flow [l/min] 40 35 30 25 20 15 10 5 0 Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 500 600 700 800 Time [s] 900 1000 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 1100 Figure A. Starting up with 1 l/min H2 and a airflow of 10 times the H2 flow.5: Startup and shutdown of reformer.2.

3 Controlling temperature of reformer Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 40 30 Flow [l/min] 20 10 0 0 100 200 300 400 500 Time [s] 600 700 800 900 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.2.7: Controlling temperature with a feed forward and PI regulator 60 450 425 400 375 350 325 275 250 30 225 200 175 20 150 125 100 10 75 50 25 0 0 500 1000 1500 2000 Time [s] 2500 3000 3500 0 Temperature [C] 40 Flow [l/min] 300 Airflow H2 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature 50 125 Temperature [C] .A Experiments A.

4 Experiment with a change in methanol flow to determine the lag 20 Methanol Burner Temperature 1 Reformer Outlet temperature Burner gas outlet Temperature 375 350 325 15 Fuel pump frequency [Hz] 300 275 Temperature [C] Temperature [C] 250 225 10 200 175 150 125 5 100 75 50 25 0 0 500 1000 1500 2000 Time [s] 2500 3000 3500 0 Figure A. Zoomed in at the frequency change from 1000s to 1250s (see figure A.2.8: Phase lag experiment 1 20 Methanol WGS Temperature Reformer Outlet temperature Cooler outlet temperature 375 350 325 300 15 Fuel pump frequency [Hz] 275 250 225 10 200 175 150 125 5 100 75 50 25 0 1000 1050 1100 1150 Time [s] 1200 0 1250 31s Figure A.9: Influence in temperature at the reformer gas exhaust when the pump frequency changes from 0 to 10 Hz.8) 126 .Appendix A A.

10: Phase lag experiment 2 20 Methanol Burner Temperature 1 Reformer Outlet temperature Burner gas outlet Temperature 425 400 375 350 325 300 275 250 225 200 175 150 125 15 Fuel pump frequency [Hz] 10 5 100 75 50 25 660 670 Time [s] 680 690 0 700 32s 0 640 650 Figure A.11: Influence in temperature at the reformer gas exhaust when the pump frequency changes from 0 to 1 Hz. Zoomed in at the frequency change from 640s to 700s (see figure A.A Experiments 20 Methanol 425 Burner Temperature 1 Reformer Outlet temperature Burner gas outlet Temperature 400 375 350 325 300 250 225 200 175 150 125 100 75 50 25 0 Temperatures [C] Temperatures [C] 275 18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0 0 200 400 600 Time [s] 800 1000 Figure A.10) 127 .

2.Appendix A A.12: First experiment 128 .5 Determine the lowest amount of hydrogen needed at maximum pump frequency First experiment 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature WGS Temperature Evaporator gas outlet Temperature [C] 0 500 1000 1500 2000 2500 3000 Time [s] 3500 4000 4500 5000 Figure A.

2 1 0.4 0.4 1.4 3.6 2.6 0.A Experiments 4.4 4.2 2 1.8 1.2 3 2.4 2.14: First experiment 129 Temperature [C] Temperature [C] Flow [l/min] .8 3.2 0 H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 1500 2000 2500 3000 Time [s] 3500 4000 4500 5000 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.6 1.8 0.8 2.6 3.13: First experiment 20 Methanol 18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 1500 2000 2500 3000 Time [s] 3500 4000 4500 5000 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.2 4 3.

15: Second experiment 130 .Appendix A 625 600 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature WGS Temperature Evaporator gas outlet Temperature [C] 0 500 1000 Time [s] 1500 2000 2500 Figure A.

2 0 H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 Time [s] 1500 2000 2500 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.A Experiments 4.6 2.4 0.8 3.4 3.2 3 2.2 4 3.17: Second experiment 131 Temperature [C] Temperature [C] Flow [l/min] .4 2.2 2 1.6 3.4 4.4 1.6 0.16: Second experiment 20 Methanol 18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 Time [s] 1500 2000 2500 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.8 1.6 1.8 2.8 0.2 1 0.

Appendix A 625 600 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Burner Temperature 1 Burner Temperature 2 Reformer Outlet temperature Burner gas outlet Temperature WGS Temperature Evaporator gas outlet Temperature [C] 0 500 1000 Time [s] 1500 2000 2500 Figure A.18: Third experiment 132 .

4 2.19: Third experiment 20 Methanol 18 16 Fuel pump frequency [Hz] 14 12 10 8 6 4 2 0 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 Time [s] 1500 2000 2500 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.2 4 3.22.6 0.21 The purpose of the heatexchanger is to be able to cool the H2 at 300 o C to about 180 o C.4 4. This is done by a counterflow of air at about 20 o C with a flow from 0 to 400 l/min.6 1.6 3.2 2 1. 133 Temperature [C] Temperature [C] Flow [l/min] .4 3.4 0.20: Third experiment A.8 1.2 3 2.8 3.8 2.3 Experiment with cooler This experiment shows the characteristics of the heatexchange which is used as cooler in the overall system.6 2. This can be seen in figure A.4 1.2 1 0.8 0. The experimental setup can be seen in figure A.2 0 H2 Burner Temperature 1 Burner Temperature 2 Reformer surface temperature Reformer Outlet temperature Burner gas outlet Temperature 0 500 1000 Time [s] 1500 2000 2500 575 550 525 500 475 450 425 400 375 350 325 300 275 250 225 200 175 150 125 100 75 50 25 0 Figure A.A Experiments 4.

134 .Appendix A Figure A. though the main goal of the cooler is to ensure the safety of the fuel cell. A blower can be installed by comparing the pressure at a given flow.22: Drawing of heatexchanger The size of the cooler is highly over dimensioned. so a temperature above the fuel cell can be avoided. though a more suitable cooler should be found because of the high conduction of this heat exchanger. This can be seen in figure A.21: The setup of the cooler test T 60 l/min gas inlet MFC Tair outlet 0 − 400 l/min Tgas Heat exchanger outlet Pair MFC inlet Figure A.23 The temperature of the heat exchanger is fully able to keep a stable temperature at 180 [◦ C] at about 80 [l/min].

Flow Characteristic 135 .23: Pressure .29 50 Pressure [kPa] 40 30 20 10 0 0 50 100 150 200 250 Flow [l/min] 300 350 400 450 Figure A.032*x − 0.00027*x + 0.A Experiments 70 2 data 1 quadratic 60 y = 0.

Appendix A 136 .

000820312455 b3 = 0.5 cref ormer = 0.000004079) kny2 = 3.641e − 2 b2 = 6.2 [V ] uocv = 0.15 [K] Tstart = 293.899e5 kcond = 0.3e − 1 b30 = 2.03 kreactor = 0.15 [K] Tlimit = 433.0515e − 11 Desorption bf c = 8.total = 0.15 [K] pamb = 1.267e18 keh = 25607 Adsorption kf c = 94.0035 A2 = 0.2571e − 2 kha3 = −1.9763e − 8 kny3 = 9.143e3 a3 = 0.72e − 2 k1reg = 40.013 [bar] SCratio = 1. Cells = 65 Cellarea = 45.5 [−] Tamb = 293.0134 Astack = 0.95 [V ] Lambdaair = 2.314 kmol·K F = 96485 alf aanod = 0.08912844923 k2reg = 2.8 J cs = 970 kg·K kJ R = 8.0036 A5 = 0.Description of model B B.0099 A4 = 0.02 x2 = 0.5 [−] Dhyd = 0.1 Hsr = 49.4 mref ormer = 1.5 [−] kha1 = 2.023 x1 = 0.16 [cm2 ] Electricpower = 1000 [W ] Urev = 1.357126208929 k4reg = 4.0027 A3 = 0.2845217013023 137 .001 kchannel = 0.9 mheater = 0.000166667 b1 = 0.003343 ms = 2.1 Constants The constants of the ulinear Simulink Model has been presented here.5 cpalu = 0.817e12 bf h = 2.03 A1 = 0.743e24 Ebf c = 127513 Ebf h = 47904 Ekec = 196829 Ekeh = 34777 Ekf c = 19045 Ekf h = 1.228858333 a2 = 4.038e6 Electro Oxidation kec = 3.3 kha2 = 2.430604326 a30 = 4.04467 Hwgs = −41.4286e − 5 kny1 = −1 ∗ (0.9458 a1 = −0.5706646294883 k3reg = 18.08 kf h = 2.000043 Areactor.

2 Simulink model 4.1 H2 in % .667 0.Appendix B B.1: Fuel Cell Model system Temp stack 453 Current density Stack temp Reference Stack temperature Airflow [l/min] Stack Airflow Input Startup mode Input Running mode Output Airflow Stack Flow kmol/s MeOH _flow Temperature of stack T_reformer H 2_exhaust mol /s Controller of system mode 2 Airflow Stack temperature Controller Reformer Airflow Reformer temperature 453 623 Reformer Temp Reference Input Startup mode Output Input Running mode 138 Reformer temp Reference H2 in exhaust mol /s Airflow [l/min] Pump frequency H2 l/min <H2> Controller of system mode 3 Reformer temperature controller Reformer Temperature Plant startup pump frequency 5 Current Density Frequency H2frac Input Startup mode Output Input Running mode Stack temperature Control Variable Mode Global var Stack Temperature Mode Control logics Controller of system mode Frequence <H2> Estimator A/cm2 -> Hz When the temperature rises above the 453 K the plant changes into working mode and the production of electricity starts Efficiency Efficiency calculation Efficiency <H2> 1e2 Gain 2 65 .667 e+004 CO in PPM 4.0000001 Startup Input Startup mode Input Running mode Output 1e6 <CO> 1e2 Transport Delay current _density Current Density to Workspace Current Density CO in % Electric power produced by Fuel Cell Controller of system mode 1 Gas Compositions Current Density Electric Power produced Figure B.

The temperature of the reformer and fuel cell stack can be seen in figure B.5 800 0. This can be seen in figure B.3(b). The estimated power output from the cell can be seen in figure B. The input is the current density and is varying over time.4(a) and figure B. 0.3 400 0.3(a) and figure B.7 1200 0.2: Current density and Power generated by fuel cell 250 300 250 200 Airflow [l/min] Airflow [l/min] 5 10 15 x 10 4 200 150 150 100 100 50 50 0 0 0 0 5 10 15 x 10 4 Time [s] Time [s] (a) Stack airflow (b) Reformer airflow Figure B.2(a).1 200 0 0 0 0 5 10 15 x 10 4 Time [s] Time [s] (a) Current Density (b) Power generated by fuel cell Figure B. The frequency of the fuel pump can be seen in section figure B.6 Current Density [A/cm2 ] 1000 0.2 0. The current density is delayed by 30 seconds for the inputs for the fuel cell and controller because of the delay there is between the flow change in the pump and the gas reaches the fuel cell.1.4 Power [W] 5 10 15 x 10 4 600 0. 139 .5(b).4(b). temperature controller and the estimator.B Description of model The main part of the model is presented in figure B. It consists of controllers and a plant.2(b) The airflow created from the input from the controllers can be seen in figure B.5(a) and the electric efficiency of the system can be seen in figure B.3: Airflow for stack and reformer respectively The current density is input for the plant.

4: Temperature of the controlled parts of the system 18 0.2 16 0. evaporator and fuel cell as shown in figure B.2 −0. The reformer is explained in more detail in B.25 0 14 12 10 y 8 6 4 2 0 5 x 10 15 x 10 4 5 x 10 15 x 10 4 (a) Frequency of pump (b) Electric efficiency Figure B.6.05 −0.Appendix B 650 460 440 420 600 550 Temperature [K] Temperature [K] 5 10 15 x 10 4 400 380 360 340 320 300 280 0 500 450 400 350 300 250 0 5 10 15 x 10 4 Time [s] Time [s] (a) Reformer temperature (b) Stack temperature Figure B.15 −0.3.1 0.5: Electric efficiency and fuel pump frequency The plant in the model consists of a reformer/burner.05 0 y −0. 140 .1 −0.15 0.

6: Fuel Cell Model 5 Fuel Cell Stack Model Reformer model 2 Airflow Stack Temperature of stack 141 Flow kmol /s 3 Exit Heater Temperature [K] Exit Heater Temperature [K] Airflow L /min T_air_in [K] 4 kmol/s kmol/s Fluid flow out kmol /s Pump Hz 4 Pump frequency methanol _flow _kmol Evaporator model kmol/s 1000 Gain B Description of model mol/s H2_exhaust mol /s 6 Input Startup mode Output Input Running mode Controller of system mode .Current Density 1 3 Airflow Airflow [l/min] Reformated gas Flow [mol/s] Reformated Gas inReformated Gas out Reformated Gas in Reformated Gas out Reformate gas H 2_exhaust [l/min] H 2_exhaust [mol/s] Airflow L /min T_stack Current density Electric Power Reformate Gas 2 Electric Power produced Gas Compositions 1 7 H2 l/min Water Gas Shift T_reformer Reformer temperature [K] Molar flow [Kmol/s] Condenser -Cooler Model Figure B.

1859 Dry molar fraction Calculate the flows on molar basis H 2O 0.1164 Display 142 molar fractions molar fractions n_mix kmol/s n_mix Conservation of mass n_mix n_mix Divide Gasdifference kmoldifference Flow [mol /s] 2 3 n_mix Molar flow [Kmol /s] 1 0 Input Startup mode Output Input Running mode Flow [mol/s] Airflow Molar Flow kmol /s T_reformer To Workspace T_reformer Airflow [l/min ] 2 Reformer temperature [K] reformer _temp Goto Temperature calculation Controller of system mode .202 e-005 0.7: Reformer Model H2 -1.4] Molar_fractions Reformer model f(u) SC_ratio x_CH3OH f(u) x_CO f(u) x_CO2 f(u) x_H2 f(u) x_H2O CH 3OH u[2]/(1-(u[1]+u[5])) Dry Gas Component : CO u[3]/(1-(u[1]+u[5])) Dry Gas Component : CO2 u[4]/(1-(u[1]+u[5])) Dry Gas Component : H2 Gas_CO CO Gas_CO2 Gas Components 1 Reformated gas CO2 Molar_fractions Gas_H2 Figure B. 04667 0 .Appendix B B.15 ] K SC=[1.873 .3 T_reformer Regressions from EES that calculates the molar fractions Limit : T=[350 .651 0.

2 0.4 0. The regressions depend on the temperature and the SC ratio of the fuel.1 0 400 450 500 550 600 650 700 Temperature [K] 750 800 850 MeOH CO CO2 H2 H2O Figure B. As the SC ratio is constant it can be displayed as a function of temperature. The first part calculates the reformatted gas fractions.7 Fraction [−] 0.5 The calculation of the gas fractions can be seen in Gas_fractions_plot. As the molar flow of the methanol and the reformatted gas is not the same. 143 .m on the CD.B Description of model The reformer model consists of two parts. and the second part calculates the temperature of the reformer.8: Gas fractions at a SC ratio of 1. 1 0. the model calculates the reformatted gas by applying the rules of conservation of mass.8 0.9 0.3 0.9(b). and this can be seen in figure B. This can be seen in more detail in figure B.3.1 Calculation of molar fractions Regressions are calculated by EES and can be seen in figure B.9(a) and figure B.8.6 0.5 0.10 B. The model calculates both the molar fractions and the dry molar fractions.

2 Calculation of reformer temperature Contributions • Heat is added by burning hydrogen • WGS heat contributions are neglected (CO + H2O -> CO2 + H2) Losses • Steam-reforming (CH3OH + H2O -> H2 + CO + CO2) • Heat loss from conduction The power balance is calculated from the total amount of power that is in the reformer.4 0.2) Convection ˙ Q = n(Hout − Hin ) ˙ 144 (B.6 0.1 0 0 CO CO2 H2 5 10 15 x 10 4 5 10 15 x 10 4 Time [s] Time [s] (a) Molar fractions (b) Molar fractions of the dry gas Figure B.3) .7 0.9 Molar fraction Molar fraction CH3OH CO CO2 H2 H2O 0.4 0.8 0.1) Conduction ˙ Q = k · A · (Tsurf ace − Tamb ) (B. ˙ Temperature change based on Q T = 1 m·c ˙ Qdt (B.3 0.9: Molar fractions from model B.1 0 0 1 0.3 0.3.Appendix B 1 0.5 0.5 0.8 0.2 0.6 0.2 0.7 0.9 0.

01 M_H2 2.04 M _CO 28 . The plot shown in figure B. This ratio is used in the estimator.11.016 M_H2O 18 .02 f(u) Fcn 1 molar fractions Figure B. This is equal to the sum of all molar flows of the reformatted gas. The molar fractions is only dependent on the reformer temperature because of the SC-ratio is constant.01 M_CO2 44 . The temperature at startup is set to 180 [◦ C] to avoid the fuel cell will take any damage. The rate of which the output flow is calculated by applying the rules of conservation of mass.3.11 is a calculation from the model that shows the ratio of the output flow compared to the input flow.5kg aluminum and the specific heat transfer is based on this. It is assumed that the temperature throughout the reformer is the same. B. 145 . the molar flow is different.B Description of model Assumptions: The weight of the reformer is assumed to be about 1. nM eOH · MM eOH + nH2 O · MH2 O = xM eOH · MM eoh · ngas ˙ ˙ ˙ +xCO · MCO · ngas + xCO2 · MCO2 · ngas + ˙ ˙ ˙ ˙ xH2 · MH2 · ngas + xH2 O · MH2 O · ngas (B.4) is the molar flows of methanol and water.4) The input for (B.3 2 kmol/s Calculation of the molar flow out of reformer Methanol fraction 1/(1+SC_ratio )*u(1) methanol fraction methanol fraction water fraction Calculation of H 2 Coverage Sfunction _fzero _massfunction 1 n_mix M_MEOH 32 . This equation is the central equation in the Sfunction_fzero_massfunction block seen in figure B.10: Calculation of molar flow before and after reformation Because the reformation reaction processes methanol.

88 1.5) The conduction is calculated by a heat transfer coefficient multiplied with the total areal of the reformer. convection and conduction.11: Reformer flow rate compared before and after reformation B.4 Reformer temperature The model shown in figure B.5 times higher. Burning gas in the reformer is shown in figure B.78 1.14. This model is based on the fact that there is no forced convection. It involves four different heating models. and this gives the heat transfer from convection. The enthalpy is calculated from the air at ambient temperature and from the temperature of the reformer. The “heat of combustion” (kJ/mol) is selected for both gases and is multiplied with the flow (mol/s). The steam reforming process is calculated by the enthalpy of the reaction multiplied with the molar flow (mol/s) CH3 OH + H2O ↔ CO2 + 3H2 49.13 describes the different heating contributions to the reformer.3. which selects if the gas is methanol or hydrogen.76 1.15. The convection in the reformer is shown in figure B.72 0 5 10 15 x 10 4 Time [s] Figure B. It depends on the mode of the system. steamreforming. This heat transfer coefficient was calculated from the fact that there is a 1cm rockwool.86 1. All this is multiplied with the temperature difference from ambient temperature to the reformer temperature.Appendix B 1. 146 .8 1. The convection is calculated by the difference in enthalpy multiplied with the molar flow of the air. Burning hydrogen.74 1. though later experiments show that the coefficient was about 6.4 kJ mol (B.82 Ratio 1.84 1.

B Description of model though the reformer was placed in a very ventilated room. so the coefficient needs to be verified again when the system is taken in use. The model also assumes that the reformer is totally isolated. so the estimated conduction is expected to be lower than the real conduction. though the area of the fittings and tubes are not. 147 .

5 0.Appendix B Q_dot _out -Q_dot _in (SR-proces +conduction +Convection )-(Burner heat ) Flow [mol /s] 1 Flow [mol/s] Q_dot_Burn [kW ] Burn Heat The reformer has the ambient temperature at startup 1000 1 [P _RF_Burn ] P_RF_Burn Burn Heat Figure B.12: Reformer temperature model Burner Model Reformer Temp Q_dot_Conv [kJ/s] Assumed weight of 1.5kg Assumed C value of aluminum T_reformer 2 Airflow Airflow L /min Conv Conv Conv 1 m _reformer *c_reformer Convection [P _RF_Conv ] 1000 P_RF_Conv 1 1 xo s 1 T_reformer Ambient T_amb 1000 1 H_sr*1000 1 Molar Flow kmol/s Transfer Fcn 1 Ref _sr [P_RF_SR] P _RF_SR T_reformer 148 3 1/(1+SC_ratio )*u(1) T _reformer Ref _cond [P_RF_Cond ] Ref _cond [P_RF_Burn ] [P _RF_Conv ] T_reformer 1000 P _RF_Cond 1 [P_RF_SR] [P_RF_Cond ] Reformer contributions [Watt] k_reactor *A _reactor _total *6.01 T_amb Conduction losses to surroundings .

B Description of model 4500 4000 3500 3000 ˙ Qburn ˙ Qconv ˙ QSR ˙ Qcond Power [watt] 2500 2000 1500 1000 500 0 0 5 10 15 x 10 4 Time [s] Figure B.15: Reformer temperature calculation .T= 273 -873 K Output kJ /kmol f(u) Air density : Range . T= 273 -873 K Output kmol /m ^3 m^3/s Product Product 1 5 1 1 Q_dot _Conv [kJ/s] T_amb 2 Airflow L /min 1 1000 *60 Figure B.14: Burning gas in reformer 1 Reformer Temp f(u) Air Enthalpy : Range .1-44 .13: Different heating contributions to reformer temperature [watt] The heat of combustion is from Handbook of Physics and chemistry 1 Flow [mol /s] Product 1 1 Q_dot _Burn [kW] 726 .204 Heat of combustion CH 3OH kJ/mol 242 Heat of combustion H 2 kJ/mol Input Startup mode Output Input Running mode Controller of system mode Figure B.Convection 149 . T= 273 -873 K Output kJ /kmol f(u) Air Enthalpy : Range .

667 e+004 CO in PPM 4.4 Fuel Cell 4.0000001 Startup Input Startup mode Input Running mode Output 1e6 <CO> 1e2 Transport Delay current _density Current Density to Workspace Current Density CO in % Electric power produced by Fuel Cell Controller of system mode 1 Gas Compositions Current Density Electric Power produced Figure B.1 H2 in % .667 0.16: Fuel Cell Stack Model Temp stack 453 Current density Stack temp Reference Stack temperature Airflow [l/min] Stack Airflow Input Startup mode Input Running mode Output Airflow Stack Flow kmol/s MeOH _flow Temperature of stack T_reformer H 2_exhaust mol /s Controller of system mode 2 Airflow Stack temperature Controller Reformer Airflow Reformer temperature 453 623 Reformer Temp Reference Input Startup mode Output Input Running mode 150 Reformer temp Reference H2 in exhaust mol /s Airflow [l/min] Pump frequency H2 l/min <H2> Controller of system mode 3 Reformer temperature controller Reformer Temperature Plant startup pump frequency 5 Current Density Frequency H2frac Input Startup mode Output Input Running mode Stack temperature Control Variable Mode Global var Stack Temperature Mode Control logics Controller of system mode Frequence <H2> Estimator A/cm2 -> Hz When the temperature rises above the 453 K the plant changes into working mode and the production of electricity starts Efficiency Efficiency calculation Efficiency <H2> 1e2 Gain 2 65 .Appendix B B.

6) 1 H2_frac 1000 *u(1) 2 Molar Flow [kmol/s] Product H2_exhaust H2 in gas vs h 2 used to workspace 1 rate of H 2 in exhaust gas mol /s 0 Constant Controller of system mode Input Startup mode Input Running mode Output Divide stochiometri 3 Current density (Cells *Cell _area *u(1))/(2*F) Hydrogen used in Cell Figure B.16.6 0.17: Hydrogen in exhaust gas [l/min] The hydrogen in the exhaust gas can be seen from figure B.B Description of model There is 3 major parts of the fuel cell stack as shown in figure B.20 Hydrogen usage in cell The calculation on the hydrogen usage is based on H2usage = (cells × cell area) · i 2F (B.8 1.18: Fuel Cell Stack .6 1.4 0. • Calculation of the stack temperature • Calculation of the stack voltage • Calculation of the stack hydrogen usage 1.2 1 0.17 and is calculated in figure B.2 0 5 10 15 x 10 4 Time [s] Figure B.8 0.4 H2 flow [l/min] 1.Calculation of Hydrogen usage 151 .

2 Ratio 1 0.Appendix B The output of figure B.4 1. 2 1.1.2 0 0 5 10 15 x 10 4 Time [s] Figure B.6 0. The about of hydrogen in the syngas compared to the usage in the fuel cell is shown in figure B. The flow of syngas from the reformer is multiplied with the fraction of hydrogen.19: Ratio of hydrogen used vs hydrogen present in fuel cell To compare the molar flow of the gas in an experiment.20.Calculation of hydrogen in exhaust gas [l/min] 152 . This constant is and should be equal to the stoichiometry chosen in Appendix B.19.6 1. 1 H2_exhaust [mol /s] kmol/s Divide 1000 Constant 1 Divide 4 Product 1 2 Stack temperature Add 273 Constant C f(u) 60 Density of H 2 based on temperature [150 .18 is the rate of H2 in exhaust gas. the hydrogen exhaust gas is calculated by figure B.The hydrogen in the exhaust gas is divided by the density of the gas. and the fuel cell usage of hydrogen is subtracted. The density of the gas is calculated from the temperature of the gas at atmospheric pressure by an regression made in EES.20: Fuel Cell Stack .8 0.200 ]C kpa=1 1000 m3 -> l1 minute 1 Divide 3 kmol/m3 kmol/l 1 FC exhaust H 2 [l/min ] Figure B.8 1.4 0.

B Description of model

Current model The total electric power that can be drawn from the fuel cell is calculated by (B.7)

P = U · I = (cell voltage × cells) · (cell area × current density) This equation is displayed in figure B.21
Cell _area 1 Current Density 2 Cell Voltage 1 Electric Power P_electric Goto 2

(B.7)

Cells

Figure B.21: Fuel Cell Stack - Current Model

153

Appendix B

B.4.1 Stack temperature

Assumption : Losses from the fuel are , Forced Convection and Conduction The FC generates heat from the losses . T _stack To Workspace 1 T _stack Conduction in FC stack to Workspace
T_stack Q_dot_cond FC _Cond FC _Cond

Figure B.22: Fuel Cell Stack - Temperature

[FC_cond ] P_FC_Cond

2 T_ambient

T_Ambient

154

Heat loss from conduction [FC_conv ] T _inlet 3 4 q_dot _air
Stack Temparature Inlet temp Airflow Q_dot_conv FC _conv

1 m_s*cp xo T_start

1 s

P_FC_Conv Convection from stack to Workspace

Heat loss from convection [FC_heat ]

1 Current _Density 5 Cell _voltage

i Q_dot_FC U_cell FC _heat

[FC_heat ]
FC _heat

[FC_conv ] P _heat _gen [FC_cond ] Heat generated Heating

Heat generation in FC

B Description of model

1000

800

600
˙ Qheat ˙ Qconv ˙ Qcond

Power [Watt]

400

200

0

−200

−400

−600 0

5

10

15 x 10
4

Time [s]

Figure B.23: Heating contributions for the fuel cell stack

There are 3 parts of the temperature calculation of the fuel cell stack. Heat generated in fuel cell, convection and conduction. The tree calculated contributions can be seen in figure B.23. The convection in this figure is a lot higher compared to the conduction, and this is because of the high airflow in the fuel cell, see figure B.3(a). The total wattage from the heat generated minus convection and conduction is multiplied with the mass and the specific heat transfer coefficient. This gives a temperature difference pr second and this is calculated from the starting temperature T_start.
1 T_stack

k_cond *(A_1+2*A _2) 2 T_Ambient x_1 Inlet conduction x 1 k_cond *(2*A_3) x_2 Inlet conduction x 2 k_cond *A _1 x_1 Outlet conduction x 1 k_cond *(2*A _4+2*A_5) x_2 Outlet conduction x 2 k_cond *2*A _stack x_2 Stack conduction x 2 Conduction : Losses from the area of the FC 1 Q_dot _cond

Figure B.24: Fuel Cell Stack Model - Temperature - Conduction

155

Appendix B

The conduction of the stack is shown in figure B.24 and is based on [3]. The different areas of the fuel cell is multiplied with the difference in temperature from the ambient and the stack temperature.
Air Enthalpy : Range . T = 273 -873 K Output kJ /kmol2 Stack Temparature 1 f(u) Add Airflow 3 Inlet temp 2 f(u) Air density : Range . T= 273 -873 K Output kmol /m3 Air Enthalpy : Range . T= 273 -873 K Output kJ /kmol1 f(u) Product Product 1 omregning 1 1000 *60 m^3/s kmol /s kJ/kmol kJ/s 1000 1 J/s 1 Q_dot _conv

Figure B.25: Fuel Cell Stack - Temperature - Convection

Convection in the stack is calculated as shown in figure B.25. The difference in enthalpy is calculated from the stack temperature and the inlet air temperature. This is multiplied with the airflow in kmol/s and this gives a rate of heat (J/s).
1 i 2 U_cell loss U_rev Cell _area 1 I 1 Q_dot _FC p=u*i total loss

Cells 1

Figure B.26: Fuel Cell Stack - Temperature - Heat generation in fuel cell

The heat generated in the fuel cell is calculated as shown in figure B.26. The total loss is calculated and multiplied with the total current drawn from the stack. This current is calculated by multiplying the cell area with the current density. The total voltage loss in the fuel cell is calculated by taking the reversible voltage u_rev minus the actual cell voltage. This voltage loss is multiplied with the number of cells.

156

4.Voltage 2 1 Cell Voltage [u_cath] losscathode loss cathode Controller of system mode Cathodic loss Fuel Cell Voltage T stack i Anode loss Anode loss thetah2 [u_anode ] Anode loss Current Density 1 Anode loss lossanode 1 loss anode 157 Pressure 3 Molar Fraction H 2 5 4 Molar Fraction CO p yH 2 yCO i Temperature of stack thetah 2 [u_ocv] [u_ohm ] [u_cath ] ThetaH 2 [u_anode ] Voltages B Description of model Coverage equation .B.2 Stack voltage [u_ocv] u_ocv A/cm^2 Constant Temperature of stack ohm /cm^2 b_1+a_1*u(1) R_ohmic i Loss cathode T stack Cath loss Ohmic Loss V Product [u_ohm ] 0 Constant 1 Input Startup mode Output Input Running mode Figure B.27: Fuel Cell Stack .

Appendix B The stack voltage in the fuel cell is dependent on the “open circuit voltage”.28(b) 1.5 1. The fuel cell voltage can be seen in figure B.8) and (B. are based on the temperature of the cell.10) −ActivationEnergy ) R·Ts kij = kij0 · e( (B. in both the equations. The equations for the coverage of the cell is (B. “ohmic losses”. The coefficients (kij and bij ).8) H dt i · kec · ΘCO = 0 (B. The open circuit voltage is constant and calculated from [6].5 0 0 5 10 15 x 10 4 0.6 0.9) are equal to zero and assuming that the H2 -coverage is a second order reaction where n equals 2. 158 . These are based on an equilibrium and this results in both equations are equal to zero. cathode losses and anode losses.10) The constant kij0 used in figure B.9) = kf c · xCO · p(1 − ΘH2 − ΘCO ) − bf c · kf c · ΘCO − 2 · keh · ΘH2 ρ ρ dΘCO dt Since both (B. Ru is the gas constant and Ts is the stack temperature. The different losses and the open circuit voltage can be seen in figure B.2 0 0 5 10 15 x 10 4 Time [s] Time [s] (a) Voltage losses (b) Fuel cell voltage Figure B.4 Vocv Vohm Vcath Vanode 1 1.4 0. see (B.8) and (B. it is possible to calculate a value of the H2 -coverage that satisfies the equations.9) respectively. dΘH2 = kf h · xH2 · p · (1 − ΘH2 − ΘCO )n − bf h · kf h · Θn 2 − i = 0 (B. The pressure p is represented and molar fraction of the respective gasses is denoted with xk .28: Fuel Cell stack voltages Coverage of the Cell In the calculation of the anode voltage loss the coverage of the cell is needed.8 0.2 1 Voltage [V] Voltage [V] 0.10 is equal to kij when the temperature is infinite and this constant called the pre-exponential factor.28(a). These coefficients are modeled with Arrhenius expressions.

9) with respect to ΘCO can be seen from (B.12) keh · xH2 · p · 1 − ΘH2  kf c · xCO · p (1 − ΘH2 )  − bf h · kf h · Θ2 − i = 0 − H2 ec kf c · xCO · p + bf c · kf c + 2·ki·k·ΘH eh 2 (B.9) with respect to ΘCO and inserting the expression in (B. The inputs for the fzero function is shown in figure B.29: Fuel Cell Stack .Voltage .Coverage Equation Anode loss The reactions that take place at the anode when CO is present 159 .29 and the 420 Input Startup mode Constant 5 Temperature of stack Input Running mode Output f(u ) k_fh f(u ) b_fh f(u ) k_fc Calculation of H 2 Coverage Sfunction _fzero 1 thetah 2 Controller of system mode f(u ) b_fc f(u ) k_ec f(u ) k_eh 1 p 4 i 3 x_CO 2 x_H2 Figure B.B Description of model The calculation of the hydrogen coverage is based on solving (B.11) in (B.8) results in an implicit equation thats equal to zero.11) 2 Inserting (B.11) kf c · xCO · p (1 − ΘH2 ) ec kf c · xCO · p + bf c · kf c + 2·ki·k·ΘH eh ΘCO = (B. Solving (B.8) can be seen from (B.12) 2 (B.12) can be solved numerically in MATLAB using the "fzero"-function and a script for the model has been written as an Sfunction.

Ekf c H2 adsorption rate. Ebf h CO electrooxidation rate. where reaction (B. θH2 is calculated from the coverage equations. Ebf c H2 desorption rate.15) (B. 160 .13) and (B. Reaction (B.29.14) defines the absorption process of CO and H2.743e24 127513 47904 196829 34777 19045 1899e5 bar bar A/cm2 A/cm2 A/(cm2 · bar) A/(cm2 · bar) kJ/kmol kJ/kmol kJ/kmol kJ/kmol kJ/kmol kJ/kmol Table B.30.13) and (B. Pre-exponential factors CO desorption rate. bf c0 H2 desorption rate. Ekf h 8.16) H2 + 2M ⇐ = = ⇒ 2(M − H) === (M − H) H2 O + (M − CO) − eh→ − − −− −ec→ k k H + + e− + M M + CO2 + 2H + + 2e− The double arrows used in (B.038e6 3.13) (B. i) = (B.267e18 25607 94. Ekec H2 electrooxidation rate. see figure B. bf h0 CO electrooxidation rate.817e12 2. kf c0 H2 adsorption rate. i R · Ts · sinh−1 αa · F 2 · keh (Ts ) · ΘH2 (Ts .17) where the anode overpotential is related to the current density and the surface coverage of.14) (B. keh0 CO adsorption rate.16) describes the electro oxidation of CO and H2 . kec0 H2 electroexidation rate. i) Vanode (Ts .17) This is modeled as shown in figure B.14) where the top is the reaction rate to the right.08 2.15) and (B. Ekeh CO adsorption rate.1: Values used in Anode loss equation The anode loss is calculated in (B. kf h0 Activation energy values CO desorption rate.Appendix B CO + M ⇐ = = ⇒ (CO − M ) === bf c θCO kf c kf h bf h θCO kf h kf c (B.

b1 Exchange current density constant. i R · Ts + EM P · ln 4 · α(Ts ) · F i0 R 4*F f(u) alpha _cath 1 1 i i Vcathode (Ts .641e-2 6.228858333 4. The calculation is based on (B.32. This regression is based on [9] 161 .2: Values used in Cathode loss equation The cathode loss can be seen in figure B. a2 Exchange current density constant.B Description of model R 1 T stack alfa _anod *F 2 i 3 thetah 2 asinh Anode loss 1 Anode loss 2 Constant k_eh 0*exp(-1*E_keh/(R*u(1))) k_eh Figure B.19).18) and the empirical value can be seen in figure B.30: Fuel Cell Stack .31: Fuel Cell Stack . a1 Ohmic loss constant.31.18) 2 T stack Divide 4 Transfer Fcn 1 ln (u[1]) Fcn1 i0 Stack Temp EMP I_0_PL excudens To Workspace 1 Loss cathode Exchange current density emp _model To Workspace 1 Figure B. b2 Empirical constant. i) = (B. the function can be seen in (B.Voltage .Anode Loss Cathode loss Cathode constants Ohmic loss constant.000166667 0.Cathode loss As alpha is dependent on the fuel cell temperature.143e3 0. b3 -0.000820312455 0.Voltage . a3 Empirical constant.430604326 [-] [-] [-] [-] [-] [-] Table B. This equation is based on the work done in [15].

20) The empirical value can be seen in (B.32: Fuel Cell Stack .33: The Empirical change of the Cathodic loss compared to temperature 1 FiXme: enheder på figur 162 .5 (B.Exchange Current Density 20 18 16 14 12 10 8 6 4 2 0 280 300 320 340 360 380 400 420 440 460 FiXme ! 1 Figure B.52249057E − 3 ∗ u(1)) ∗ 0.19) The current density and the empirical value of the cathode loss is shown in figure B. Tlimit is 433K(160o C) which is the lower limit of the HTPEM’s temperature operating range.33 EM P (Ts ) = a30 · e−b30 (Ts −Tlimit ) (B.Appendix B alpha_cath1 : (−1.32.Cathode loss . The constants used in this model can be seen in (B.21) 1 Stack Temp a_2*exp (-1*b_2*((1/u[1])-(1/T _limit ))) i0_PL 1 i0 Exchange Current density 2 a_30 *exp (-1*b_30 *(u[1]-T_limit )) 2 EMP Exchange Current density 3 Figure B.Voltage .1). i0 (Ts ) = a2 · e −b2 1 −T 1 Ts limit (B.89064783 + 5.21) and is graphed in figure B.

The flow of methanol is used in calculation of the temperature. and the outlet is shown in the left of the picture. and 2 outputs.34: Evaporator seen from the air outlet side The model got 3 inputs. The first output is the temperature of the evaporator and the second is the flow of methanol.5 Evaporator The evaporator is a 1kg heat exchanger made of aluminum.B Description of model B.34. The evaporator is fitted with 200 watt electric heaters.35: Evaporator Model The density of the mixture is based on 163 . As the evaporator is installed on the system. and this can be seen from the red wires in figure B. Air input Gas output Methanol input Air input Figure B. The inlet of the methanol mixture has its inlet from the front side of the evaporator. 1 Airflow L /min 2 T_air _in [K ] SC_ratio Airflow L /min T_air[K] Heater Temperature [K] SC Ratio 1 Exit Heater Temperature [K ] Molar Flow [kmol/s] Calculation of temperature Pump Hz 3 30 e-6*60 *u(1) Pump flow pr hz Mix Flow [L/min] Mix Flow [Kmol/s] Calculation of the flow in Kmol /s 2 Fluid flow out kmol/s Figure B. the evaporator is covered with a layer of Rockwool on the top side. where the airflow from the fuel cell and the temperature of the air is input as well.

B.5. 72192540E − 01 + 8. The flow is converted to a molar flow and is set as output.04 g/cm 3->kmol/m3 SC_ratio Figure B. 24527833E − 04 ∗ T + 2. 00480577E − 06 ∗ T 2 + 2. The different powers can be seen in figure B. The density of the methanol is multiplied with the molar mass and multiplied with the flow. and is calculated by 1/(1 + SC). 77045714E − 01 ∗ xM eOH + 8. The temperature is initially 20 [◦ C].38.1 Temperature of evaporator The temperature is calculated from four contributions and solves the total amount of power added or subtracted from the evaporator block.Calculation of flow in kmol/s ρM eOH = 1/(9. 91428571E − 03 ∗ x2 eOH ) M where xM eOH is the MeOH fraction of the mixture. 164 .39 The air from the fuel cell and the electric heaters all contribute power to the evaporator. and can be seen in figure B.36: Evaporator . and the vaporization of methanol and water is subtracted.70 ]*C u(1)*1000 /32 .Appendix B 1 Mix Flow [L/min ] kmol/l 1 1000 *60 1 Mix Flow [Kmol /s] kmol*l/(m3*min ) -> kmol/s 273 mixture temp T _amb f(u) Methanol mixture density Limit T=[10 .

15 0.2 1 1000 P_HE _MeOH 1 Energy balance Evaporator temperature Power for MeOH kJ /s m_heater *cp_alu m_heater *cp_alu 1 xo s Integrator 1 Heater Temperature [K] 293 4 Molar Flow [kmol /s] 3 SC Ratio Molar flow [kmol/s] T _evap SC Ratio Power for H 2O kJ /s Energies in evaporator Calculation of heating demands P_HE _H2O 1000 1 Figure B. 165 .4 0.3 0.Temperature 0.38: Comparison of difference energies in the evaporator The total power is divided by the mass of the heater and the specific heat capacity and is integrated to output the temperature over time.B Description of model Heater temperature 1 Airflow L /min 2 T _air [K] Airflow L /min T_air[K] Convection Convection 1000 1 1000 1 P_HE _Electric P_HE _elec Goto 1000 1 P _HE_Conv 2x100 W carthridge heaters 0.35 0.05 0 0 5 10 15 x 10 4 Time [s] Figure B.37: Evaporator .1 ˙ Qair ˙ Qheaters ˙ QM eOH ˙ QH2O 0.25 Power [kW] 0.2 0.

166 .Conduction The heat transfer from the fuel cell air exhaust is assumed to reduce its temperature to the evaporator when it is blown though the heat exchanger.Temperature .39: Temperature of evaporator The air from the fuel cell will in the startup phase cool the evaporator down until it reaches a higher temperature compared to the evaporator. This heat is calculated by figure B. T = 273 -873 K Output kJ /kmol1 1 2 Airflow L /min 3 T_air [K] 1000 *60 f(u) Air density : Range . T= 273 -873 K Output kmol /m3 f(u) 1 Heater temperature Q_dot _in -Q_dot _out Air Enthalpy : Range . as shown in (B. From this temperature the enthalpy is calculated and it is subtracted from the enthalpy of the fuel cell air exhaust air. The airflow in m3 /s is multiplied with the density of the exhaust air and this molar flow is multiplied with the difference in enthalpy. Q_dot _in -Q_dot _out f(u) Air Enthalpy : Range .3). T= 273 -873 K Output kJ /kmol 1 Convection Figure B.Appendix B 600 550 500 Temperature [◦ C] 450 400 350 300 250 0 5 10 15 x 10 4 Time [s] Figure B.40: Evaporator .40.

evaporation. and super heating happens instantly. evaporator temperature and the molar flow Figure B.41. The model assumes that the heating.Temperature .41: Evaporator . The inputs are the SC ratio.Heating demands 3 SC Ratio 1/(1+u(1)) f(u) Calculation of boiling temperature [Boiling _of _mix ] Goto [Boiling _of_mix ] f(u) Enthalpy from Heating CH f(u) P_vap _MeOH 3OH P_pre_MeOH Power for MeOH 1 Power for MeOH kJ/s Enthalpy from vaporizing CH f(u) 3OH P_SH_MeOH Enthalpy from Superheating CH 2 Molar flow [kmol /s] 3OH Add 1/(1+SC_ratio )*u(1) Methanol fraction 167 1 Evaporator temperature Water fraction f(u) Enthalpy from Superheating H f(u) Enthalpy from Vaporization of H [Boiling _of _mix ] f(u) Enthalpy from preheating of H 2O 2O 2O P_SH _H 2O P_vap _H 2O 2 Power for H 2O kJ/s B Description of model P_pre_H 2O Add 1 Power for H 2O .The heating demands of the methanol and water mixture is calculated by figure B.

The boiling point of the mix is used in the calculation of the enthalpy for the different stages of the superheating.4 0.5. The evaporator temperature is used in the superheating of both CH3OH and H2O because.3 Power [kW ] 0. both for CH3OH and H2O.2 Power [kW ] 5 10 15 x 10 4 0.25 0.1 0 0 0. and super heat to a temperature of about 120 [◦ C]. This means that the conversion factor on the flow in the reformer is inserted directly into the model.Appendix B of the mixture.05 0. 0. The boiling temperature of the mix are calculated by [12] Tboiling = (99.05 0 5 10 15 x 10 4 Time [s] Time [s] (a) Power needed for evaporating MeOH (b) Enery needed for evaporating H2O Figure B. The enthalpy is multiplied with the molar flow of either the CH3OH fraction or the H2O fraction. These regressions are made with EES and can be seen from Model_heat_vapo. and the outputs are the power needed to superheat a mix of CH3OH and H2O. This can be seen in 168 .35 0. This does only apply when the system is starting up because the temperature of the evaporator always is above the boiling point of the mixture.2 Fuel pump estimator The fuel cell pump frequency estimator is based on an assumption that it needs to be implemented on a real controlling system. and this gives the power needed to preheat. vaporize and superheat can be seen from figure B.3 0.35 0.25 0.586579∗vapor_f rac5 )+ 273 where vapor_f rac is 1/(1 + SC).761078 ∗ vapor_f rac + 432. because of a check if the temperature of the heater is below the boiling point.827122∗vapor_f rac4 −200.6186125 − 148.42(a) and figure B.2 0.15 0.15 0. vaporize. B.42(b).EES on the CD.917965∗vapor_f rac3 +616.651496 ∗ vapor_f rac2 − 734.42: Power needed for evaporating input fuel The power needed to preheat.1 0.

is subtracted from the electric power of the fuel cell. f (u) = 0. and is a constant of about 1. Fuel required is based on the fuel cell hydrogen consumption and this amount is multiplied with the excess value used for the burner. which means 50% more hydrogen compared to the fuel cell consumption. Electric output P _electric P _HE_elec fc _blower _voltage Blower voltage Watt Burner blower power Fuel input methanol _flow _kmol methanol flow watt Divide 1 Efficiency efficiency To Workspace 1 Fuel power Figure B. where the current is calculated from the used blower voltage. This can be seen in figure B.22) . This requires the molar mass of the methanol and this is calculated by dividing with the methanol density.44: Electric efficiency The blower power usage is calculated in figure B. The power for the blower is calculated by P = U · I.5.01201 ∗ u(1) 169 (B.5. The excess hydrogen.45.44.43. Lambdah 2 is set to 1.86.B Description of model figure B.3 Electric efficiency The efficiency is calculated by comparing the electric output to the heating value of the methanol flow. Lambda _h2 1 Current Density (Cells *Cell _area *u(1))/(2*F*30 e-6) Fcn kmol/m3 H_fin Saturation 1 Frequency Methanol density 2 H2frac 1.003081 ∗ u(1)2 + 0. This gives a total electric power output from the system.86 Figure B. The electric power from the electric heaters and the blower in the fuel cell.43: Estimator of frequency B.

This is multiplied with the higher heating value of methanol and the output is kJ/s. The higher heating value is used because the input fuel is in a liquid phase.46: Electric efficiency .Energy from methanol fuel based on HHV The water is subtracted from the methanol fuel mix and is converted to mol/s. This is multiplied with 1000 and the output is watt.45: Electric efficiency .Appendix B 1 Blower voltage f(u) current Product 1 Watt P_blower _stack To Workspace Figure B.46 W 1000 Product 726 . 170 .1 Heat of combustion CH3OH kJ/mol P _provided 1 1 watt 1 methanol flow 1/(1+SC_ratio )*u(1) 1000 Figure B.FC blower power The methanol fuel power is calculated by figure B.

n) = n · (H(Ts ) − H(Ta )) ˙ ˙ Since the molar flow of air is represented in (3. and rewriting the equation to depend of the flow of air q and multiplying ˙ the flow with a constant results in (C. ˙ Qconv (Ts . Assuming that the enthalpy of the air can be modeled by a first order regression of temperature is applied.3) 171 . q) = q · Krho · ((KH1 + KH2 · Ts ) − (KH1 + KH2 · Ta )) Equation (C. C.2) ˙ ∂ Qconv = Krho · ((KH1 + KH2 · Ts ) − (KH1 + KH2 · Ta )) ∂q ˙ (C.1).1) (C. ˙ ˙ ˙ Qconv (Ts . Assuming that the density of the air is constant within the temperature range of the model is a valid assumption.1) with respect to temperature results in (C. The first part of this appendix is the linearisation of the convective part and the second part is the linearisation of the stack voltage.4) which is repeated here.2) Taking the partial derivative of (C.Linearisation C The linearisation of the stack temperature model is needed in order to apply linear control algorithms and the linearisation can be found in this appendix.1 Convective loss The convective losses depend on the temperature of the stack and the air blown into the stack.4)by n but this is a nonintuitive ˙ variable.3) ˙ ∂ Qconv = q · Krho · KH2 ˙ ∂Ts (C.1) can be differentiated with respect to the airflow see (C. The convective losses can be sen from (3.

The working point for the system is ¯ defined by the temperature of the stack in the working point Ts and the current density in the working point ¯ The MATLAB script Temperature_linear. i) − ηanodic (Ts .lin = Qconv Ts . and in order to apply the voltage to the calculation of the current the voltage must be linearized with respect to the stack temperature and current density.5) The three negative parts of the equation is highly nonlinear and needs to be linearized in order to determine the change in voltage from the working point based on a change in either current density or stack temperature.m on the i. C.3 Nonlinear voltage parts The calculation of the linear approximations of the nonlinear equations based on a Taylor series expansion of the equations. i) (C. i) − ηcathodic (Ts . ˙ ∂ Qconv ¯ ¯ ˙ ˙ ˙ Qconv. Vcell (Ts .1) at the working point and add the linear changes from the working point.q ˙ (C.Appendix C Linearizing the convective part of the nonlinear model is done by evaluating (C. a linear equation can be produced from the derivatives by both the temperature and the current density. i) = Uocv − ηohmic (Ts .5) and this represents the nonlinear cell voltage.2 Cell voltage The cell voltage is dependent on the temperature of the stack and the current density.q ˙ ¯ · Ts − Ts ¯ ¯ Ts .lin = Qconv Ts . q + ∂q ˙ ˙ ∂ Qconv · q−q + ˙ ¯ ˙ ∂Ts ¯ ¯ Ts . By neglecting the higher order therms above the first order.5) results in ¯ ¯ ¯ ˙ ˙ ˙ ˙ ¯ ˙ Qconv.4) Since the derivatives are evaluated at the working point parameters these are constant for the given working point and applying this to (3. The parts will be linearized in the order they appear in (C.5). 172 . q + Kconvq · q − q + KconvT s · Ts − Ts C. The cell voltage can be seen from (C. CD in the MATLAB folder contains the calculation of the gradients and the working points.

14) is based on the stack temperature and they need to be linearized in order to obtain a cathodic loss based on the input of the temperature and the current density. ¯ = ¯ i b1 + a1 · Ts · ¯ (C. ¯ i ηohmic Ts .1 The Ohmic Losses The model applies the calculation of the Ohmic voltage losses based on a linear regression for the ohmic resistance inside the fuel cell.C Linearisation C.see (C.7) (C. i) = ηohmic Ts .9).8) (C. C. see (C.12).4 Cathode loss The Cathodic losses are based on highly nonlinear factors and subfunctions based on the stack temperature and can be seen from (C. 173 . and stack temperature. see (C.10) ∂Ts ¯ i In (C. These have been multiplied with the change of the given variables from the working point and they are valid for small changes in the signals.6) When a Taylor series is applied the ohmic losses can be divided into parts containing only current density and temperature respectively. see (C. see (C. i) = i R · Ts + EM P (Ts ) · ln α (Ts ) · 4 · F i0 (Ts ) (C. ¯ + ∂i ∂ηohmic ¯s · Ts − T(C.10) the expressions for the ohmic losses changes with respect to the current density.6) ηohmic (Ts .3. the exchange current density i0 (Ts ).lin (Ts .8). see (C. i) = (b1 + a1 ∗ Ts ) · i (C.11) ηcathodic (Ts .11) The factor α (Ts ).13) and the empirical part.9) · i −¯ + i ¯ Ts ∂ηohmic = a1 · i ∂Ts ∂ηohmic = b1 + a1 · Ts ∂i ∂ηohmic ¯ i ηo.

is added to the linear expression.16) The calculation of the linear contribution from the cathodic losses is based on (C.12). The equations of (C. evaluated at the working point temperature and current density.¯ (C. ¯ + ∂i + ∂ηcathodic ∂Ts i −¯ i ¯ i Ts . with respect to the current density is calculated and evaluated. The equations of (C. with respect to temperature is also calculated in order to obtain the linearized expression of the cathodic losses. The deviation of the temperature multiplied with (C. i) = ηcathodic Ts .13) and (C.13) (C.16). evaluated at the working point temperature and current density. The deviations in the current density multiplied with (C.17) ∂ηcathodic ¯ i ηc.13) and (C.17) The linearized cathodic losses are applied into the linearisation of the cell voltage. ∂ηcathodic k2 b2 R · Ts i i − − = · ln · ln ∂Ts 4 · F · α (Ts ) i0 α (Ts ) α (Ts ) Ts −a30 · b30 · e−b30 ·(Ts −Tl ) (C. The derivation of the cathode loss is performed with Symbolic Toolbox in Matlab.14) are observed as constants since the equations only depend on the temperature.14) −b2 1 − 1 Taking the partial derivative of the cathodic loss. see (C. is added to the linearized expression.15) .14) are observed as functions that also needs to be derived. 174 . see (C.15).11).11) evaluated at the working point temperature and current density.12).16).lin (Ts .¯ ¯ Ts − Ts ¯ i Ts . see (C.15) The partial derivative of the cathodic losses. (C. see (C. see (C. ∂ηcathodic R · Ts 1 = · ∂i α (Ts ) · 4 · F i (C.Appendix C α(Ts ) = (k1 + k2 · Ts ) k3 Ts Tl i0 (Ts ) = a2 · e EM P (Ts ) = a30 · e−b30 (Ts −Tl ) (C.12) (C. (C.11).

18) ηanodic (Ts . If the reformer or the SC-ratio is changed the coefficients must be recalculated in EES.20) ∂ΘH2 ∂i = B1 + 2 · B2 · i + 3 · B3 · i2 + C1 · Ts + 2 · C2 · Ts · i + C3 · Ts2 + 2 · C4 · Ts2 · i (C. ΘH2 (Ts .19) The coverage regression. see (C. see (C. i) = R · Ts i · asinh α·F 2 · keh (Ts ) · Θ (Ts . i) = A0 + A1 · Ts + A2 · T 2 + A3 · Ts3 + B1 · i + B2 · i2 + B3 · i3 +C1 · Ts · i + C2 · Ts · i2 + C3 · Ts2 · i + C4 · Ts2 · i2 (C. from (C.3. i) (C.C Linearisation C.18) The coverage of the cell ΘH2 is a 3rd order regression based on the coverage equations from the model of the system.20) The coverage regression of the cell. see (C. is derived with respect to the temperature of the stack.21) ∂ΘH2 ∂Ts = A1 + 2 · A2 · Ts + 3 · A3 · Ts2 + C1 · i + C2 · i2 + 2C3 · Ts · i + 2 · C4 · Ts · i2 (C.19).22) .19). see (C.19). This regression is also based on the molar fractions of the reformat gas stream and these are assumed constant based on a reformer temperature of 500 K (227◦ C) and a SC-ratio of 1. see (C. from (C. is derived with respect to the current in order to calculate the change of the coverage.21) The change of the variable keh is dependent of the temperature and is described by an Arrhenius-like equation.22) keh (Ts ) = keh · e 175 −Ekeh R·Ts (C.5 Anodic loss The anodic losses are based on equations that both use the stack temperature and the current density and in order to obtain the linear approximation of the voltage the anodic losses need to be differentiated with respect to both variables.

Applying the deviations from the working point of the anodic loss. see (C.22) and these equation are evaluated in the same point as the derivatives.23) when the derivatives have been calculated for the variables the derivative for the anodic loss can be calculated. The derivative with respect to current density.Appendix C The derivative of keh with respect is calculated. see (C. see (C. results in the linear approximation of the anodic loss.24) and (C.25).24) and (C. The anodic loss can linearized around the working point based on the value of the anodic losses. ∂ηanodic R i asinh = ∂Ts α·F 2 · keh (Ts ) · ΘH2 R + α·F Ts i 2·keh (Ts )·ΘH2 ∂ΘH 2 · +1 −i · 2 · ∂keh ∂Ts · ΘH2 (2 · keh (Ts ) · ΘH2 )2 keh (Ts ) · ∂Ts2 R + α · F (2 · keh (Ts ) · ΘH2 )2 (C. see (C. see (C.23) respectively.25) contains the functions of (C. evaluated in the working point of the model.21) and (C.25) Both (C.18).20) ∂ηanodic R = · ∂i α·F Ts i 2·keh (Ts )·ΘH2 2 · +1 ∂ΘH2 ∂i 2 · keh (Ts ) · ΘH2 − i · 2 · keh (Ts ) · (2 · keh (Ts ) · ΘH2 )2 (C.26) 176 .25) respectively. see (C.23) ∂keh keh · Ekeh −Ekeh · e R·Ts = ∂Ts R · Ts2 (C.24).19) and (C. see (C. see (C. with respect to the given variables i and Ts multiplied with their respective derivatives of the anodic losses. This equation refers to the derivative of the cell coverage with respect to the current density.24) Linearisation of the anodic loss with respect to the temperature is calculated. The equation refers to the partial derivative of both the coverage equations and variable keh with respect to temperature.

This can be expressed ¯ i ¯ i ¯ i vcellwp = uocv − ηohmic Ts .lin = uocv − ηo.¯ (C.26) C.lin (Ts .¯ ∂ηohmic = − ∂i ∂ηcathodic + ∂i ¯ i Ts . ¯ + ∂i + ∂ηanodic ∂Ts · i −¯ i ¯ i Ts .¯  · i −¯ i (C.17) and (C.10).5).¯ ∂ηanodic + ∂Ts ¯ i Ts .¯ ∂ηcathodic ∂Ts ¯ · Ts − Ts − ¯ i Ts . i) = ηanodic Ts .27) Summing up the constants of the linearized expressions.¯ ¯ · Ts − Ts ¯ i Ts .¯  KV oltagedT s ¯  · Ts − Ts (C.¯ ∂ηanodic ∂i · i −¯ i ¯ i Ts .¯ KV oltagedi ∂ηanodic + ∂i ¯ i Ts .30) 177 .26) resulting in the working point of the voltage. i) (C. ¯ − ηcathodic Ts . i) − ηc. Vcell.29) VchangeT s (Ts ) = − ∂ηohmic ∂Ts  ¯ · Ts − Ts − ¯ i Ts . This direction is based on the derivatives of the nonlinear parts of the voltage.lin (Ts . The Taylor series applies only to small changes in the variables and the difference in the current density results in a change of the voltage.lin (Ts . (C. i) − ηa.¯ ∂ηohmic = − ∂Ts ∂ηcathodic + ∂Ts ¯ i Ts .¯ ∂ηanodic ∂Ts ¯ · Ts − Ts ¯ i Ts .¯ ¯ i Ts . from (C. an expression for the linearized voltage can be solved.¯ ¯ i Ts .28) The voltage changes in a general direction based on the working point parameters of stack temperature and current density. ¯ − ηanodic Ts .6 Linear voltage approximation When inserting the linearized expressions for the different nonlinear parts into (C.C Linearisation ∂ηanodic ¯ i ηa.¯ ∂ηcathodic ∂i · i −¯ − i ¯ i Ts . Vchangei (i) = − ∂ηohmic ∂i  · i −¯ − i ¯ i Ts . ¯ (C.lin (Ts .

˙ Qheat = vrev − Vcellwp + Vchangei (i) + VchangeT s (Ts ) · i · ncell · Acell (C.7 Heat generated In order to calculate the heat generated by the fuel cell (C.32) and replacing Vcell with the expression of (C.33).30) and separating the variables ¯ Vcell.33) the expression of the heat can be expanded by inserting the expressions of (C. results in (C.35) Differentiating (C.31) C.31) results in (C.linear = vcell_wp + KV oltagedi · i − ¯ + KV oltagedT s Ts − Ts i (C.29) and (C.8) 178 (C.34) ˙ Qheat = · ¯ vrev − vcellwp + KV oltagedi · i − ¯ + KV oltagedT s · Ts − Ts i i · ncell · Acell (C.27) with the constants from (C.32) By inserting (C.29) and (C.34) with a first order Taylor Series results in (3.32) is used.Appendix C Expanding equation (C.36) ˙ ∂ Qheat = −KV oltagedT s · i · ncell · Acell ∂Ts Linearizing (C.36) .31) in (C.30).35) ˙ ∂ Qheat ¯ = vrev − vcellwp − 2 · KV oltagedi · i + KV oltagedi · ¯ − KV oltagedT s · Ts − Ts i ∂i · ncell · Acell (C.34) The expanded expression can be differentiated with respect to the current density results in (C.34) with respect to the temperature results in (C. ˙ Qheat = (vrev − vcell (Ts . i)) · i · ncell · Acell (C.

¯ + ∂i ˙ ∂ Qheat · i −¯ + i ∂Ts ¯ i Ts . The temperature is calculated from an power balance. The convective part has been linearized in (3.14).linear = Qheat Ts .C Linearisation ˙ ∂ Qheat ¯ i ˙ ˙ Qheat.¯ C. 179 . The excess hydrogen from the fuel cell heats up the reformer and this can be related to the current density.6).1 Linearisation of the reformer temperature In order to control the temperature of the reformer the temperature calculation must be linearized. see (3.7.¯ ¯ · Ts − Ts ¯ i Ts .

Appendix C 180 .

The FPGA modules controls the input and output from the module bay. cRIO 9012 Modules Converter board: 5v to 24v Figure D. A FPGA program. RT program and a host program.2 FPGA RT HOST Figure D. RT module. and FPGA The communication between the host program and RT module is with shared network variables and a list of variables can be seen in table D.2: Communication between HOST. This cRIO has a RealTime(RT) module and a Field-Programmable Gate Array(FPGA) module.Labview program D The system is controlled by a Texas Instruments cRIO 9012.1: cRIO 9012 and modules The controlling system consists of 3 programs combined in a project.1. see figure D. The FPGA module communicates with the RT module and the RT module communicates with the HOST. 181 . where a various set of plugin modules are installed.

This is done by comparing the difference in the tick counter. The same check is made with the temperature modules (TC1. and if the loop finishes late.2 Placement Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 Slot 6 Slot 7 Module AI (NI 9205) AO (NI 9263) TC1 (NI9211) TC2 (NI9211) TC3 (NI9211) DIO (NI9401) RTD (NI9217) Description Analog input module(32-Ch 16bit +/. The default refresh tick rate is 2 for both the AI/AO modules and the TC modules. 182 . This part of the program can be seen in figure D.7.1: Shared network variables D.2: Plugin modules As for the Analog input(AI) and Analog output(AO) the program checks if the input refresh rate is too fast for the FPGA. TC2. TC3). A list of modules can be seen in table D.1 FPGA Program The FPGA program is designed to read the data from the module bay and output to a variable the RT module can read.10V) Analog Output module(4-Ch 16bit +/.10V) Thermocouple input(4-Ch 24bit) Thermocouple input(4-Ch 24bit) Thermocouple input(4-Ch 24bit) Digital Input/Output(8-Ch Highspeed TTL) RTD module(4-Ch 24-bit Analog input) Table D.Appendix D Variable name Variables from HOST(Boolean) Variables from HOST(Double) Variables from RT(Boolean) Variables from RT(Double) Timing constants from HOST(Double) Datalog (String) Current log file (String) Usernotes (String) End notes to log file (String) Destination (String) Description Boolean values from the controlling host interface Double values from the controlling HOST interface Boolean values from the RT module Double values from the RT module Timing constants for controllers Measured data logged to file Name of current logging file User notes describing the logged experiment User notes added to the end of a logging session The destination of the file (RT module storage or USB flash drive) Table D. This tick count can be changed from the host program. which should be the same as the user input tick count. it is notified in the “AI AO Late Counter”.

and this module handles all of the calculations done in the program. The DIO part of the FPGA program can be seen from figure D.3. and this limit is set in the HOST program. This includes controllers. temperature handling and input/output for the FPGA.3: PWM output in FPGA D. The read/write control can be seen from figure D. The reference signal from the MFC’s is read and the Nl/volt The inputs AO0-3 are all setpoints for the MFC’s. Since the pump runs on 24 V. The largest MFC is a 1300 Nl/min MFC and got an input range of 10V. where the inputs are accessed from the left and output is accessed from the right. This is made by a PWM module. where AO0-2 are controlling the air and AO3 are for the hydrogen. and PWM for the control of the electric heaters in the evaporator. data logging.2 RT program The RT module consist of a 400Mhz CPU. and the digital output is 5V. Figure D. and this is why the reference value is multiplied with 130. where the duty cycle is 50%. The 4 signals from the MFC’s are individually read and the signal is multiplied with the specific “Nl/min”. 183 . The FPGA returns checks for stopped loops and the “tick late count”. The thermo couplers(TC) are read from a cluster where all information is evaluated and extracted. The maximum frequency of the pump is 20 Hz.4. All of the thermo couplers used in this project is of the K type. The frequency of the PWM signal determines the frequency of the pump. The reference signals from the MFC’s are read and added to the AI array.D Labview program The fuel pump is driven by a digital output of 24 Volt. The program consist of two pwm output in case of a seperate water and methanol pump. to prevent the board to damage the DIO module. there is a converter board between the DIO module and the pump. This converter consists of a MOSFET and an Optocoupler.

4: FPGA Read/Write control These checks are saved into the shared variable “Variables from RT(Boolean)”. The variable also contains the “datalogging enabled” boolean. Figure D.Appendix D Figure D. while the inputs for the PWM is calculated by figure D.5: PWM calculation for pump 1+2 and electric heaters 184 . The inputs for the Tick count in AO/AI and TC are set from the HOST program and passed on to the FPGA.5.

This feed forward gain is multiplied with the reference flow of the hydrogen. This manual slider is default set to a high value (50l/min). and the new signal is converted to a 16 bit value and send to the AO. which gives an minimum airflow for the reaction. By disabling the PID regulator. and the program can be seen in figure D. This feed forward signal is added to the regulated output from the PID regulator. This count is 40. For the electric heaters there is installed a switch to allow the 5V signal to pass 240V to the heaters.8 185 . The heaters are each 100 watt and the period is set to 2Hz.6. The duty cycle for the pump are set to 50%. The refresh speed and PI parameters is also available from the user interface. the output will be left in an enabled state. This signal is inverted and the feed forward gain is applied. a manual slider can control the air flow for the hydrogen. Because the pump should be left in an disabled state. The measured temperature is compared to the setpoint and an regulated signal is outputted. The regulating PID regulator can be enabled and disabled from the user interface. The setpoint is also set from the user interface and is default set to 350 [◦ C].000 because the FPGA runs at 40 Mhz. so in case of an emergency.D Labview program The input for the PWM blocks are the duty cycle and the duty period. Figure D. the period must be changed accordingly.6: PID controller The measured temperature are read and the regulator is set to an output range of 0 to -20. If the frequency input from the user interface is 0. The PID input and output can be seen in figure D. As for the frequency to change. This value is set because of the negative influence the blower has on the temperature of the controlled system. This is set low because of the net frequency of 50Hz. the signal is inverted in the FPGA code.000. the default value would be a high flow of air compared to the hydrogen added. The input frequency is divided into the tick count for 1 second. The input for the heaters is set to a value between 0 and 100%.

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Variable Datalog time Evaporator gas outlet Temperature Reformer gas outlet Temperature Burner Temperature 1 Burner Temperature 2 WGS Temperature Burner gas outlet temperature Fuel cell gas outlet temperature Burner gas inlet temperature Fuel cell gas inlet temperature Evaporator air input temperature Evaporator temperature Evaporator air output temperature MFC 1 (Cooler) MFC 2 (Burner) MFC 3 (Evaporator) MFC 4 (H2) Pressure feedback AO AI Late Counter TC Late Counter Digital input for methanol pump (Hz) Digital input for Water pump (Hz) Digital input for electric heaters (watt) Feedback from PI regulator (Burner) Table D.3 Host program The host program handles the input and output for the user interface.3: Variables from RT(Double) D.Appendix D The network shared variable “Variables from RT(Double)” contains the following Nr. electric heaters and datalog information. The output from the RT consists of logged data i. temperatures. air-/h2-flow and pressure. The user interface consists of input for the PI controller. 186 . Hydrogen usage. Mass Flow Controllers(MFC).e.

7: AI and AO in FPGA 187 .D Labview program D.4 Figures Figure D.

8: PID control with feed forward 188 .Appendix D Figure D.

D Labview program Figure D.9: Main control 189 .

Appendix D Figure D.10: System temperature overview 190 .

sizes = simsizes . November 2004 % % M o d e l l e n h a r t a g e t udgangspunkt i v a r m e v e k s l e r m o d e l a f % % Mads Pagh N i e l s e n % %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % [ s y s .1 1 3 5 7 9 11 13 15 function 17 switch 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 Fzero coverage %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % R e d i g e r e t t i l u d r e g n i n g a f H2 c o v e r a g e l i g n i n g e r a f % % J e s p e r Kjær S ø r e n s e n og Simon S a h l i n % % % % O r g i n a l t d e s i g n e t a f S ø r e n J u h l A n d r e a s e n og Thomas Bagger Madsen % % % % EMSD9. 9 } . s t r . . u ) . %% % % % % % % % % % % Output % %% % % % % % % % % % case 3 . s y s=mdlOutputs ( t . NumInputs = 10. . . [ s y s ]= m d l D e r i v a t i v e s ( t . x0 .Matlab scripts E E. og % sample−t i d e r f o r S−f u n k t i o n e n . % ========================================================================== function 61 [ s y s . x . %% % % % % % % % % % % % % % % % % % Initialisering % %% % % % % % % % % % % % % % % % % case 0 . % Antallet % Antal output % Antal Input tilstande sys = simsizes ( s i z e s ) . . sys = [ ] . u . x0 . t s ]= m d l I n i t i a l i z e S i z e s ( ) . NumContStates = 1 . x .2 . x0 . 4 . num2str ( f l a g ) ] ) . 191 . . . [ s y s . s t r . %% % % % % % % % % % % Output % %% % % % % % % % % % case 1 . t s ]= m d l I n i t i a l i z e S i z e s ( ) % Interne grid af points 63 65 67 69 71 73 sizes sizes sizes sizes sizes sizes u s =0. NumSampleTimes = 1 . s t r . u ) . DirFeedthrough = 1 . t s ] = S f u n c t i o n _ f z e r o ( t . s t a r t b e t i n g e l s e r . end % end s w i t c h −f u n k t i o n % ========================================================================== % mdlInitializeSizes % F u n k t i o n e n r e t u r n e r e r t h e v e k t o r s t ø r r e l s e r . %% % % % % % % % % % % % % % % % % % % % Uventede f l a g s % %% % % % % % % % % % % % % % % % % % % otherwise e r r o r ( [ ’ U n h a n d l e d f l a g = ’ . NumOutputs = 1. NumDiscStates = 0 . f l a g ) flag . x . %% % % % % % % % % % % % % % % % % % % % % % % % Ikke benyttede f l a g s % %% % % % % % % % % % % % % % % % % % % % % % % case {1 .

b_fc=u ( 4 ) . % Begyndelsesvektor str = [ ] . x_h2=u ( 1 0 ) . 0 . x . x . % ========================================================================== % mdlDerivatives % F u n k t i o n e n r e t u r n e r e r de a f l e d t e t i l s t a n d e % ========================================================================== function [ s y s ]= m d l D e r i v a t i v e s ( t . p=u ( 7 ) . u ) . % ========================================================================== 107 109 192 . k_ec=u ( 5 ) . b_fh=u ( 2 ) . sys = [ 0 ] . x_co=u ( 9 ) . 85 87 89 91 93 95 97 99 101 103 105 f u n c t i o n s y s=mdlOutputs ( t . ts = [0 0 ] . 2 ) . k_eh=u ( 6 ) . % Resultat returneres til integrator % ========================================================================== % mdlOutputs % R e t u r n e r e r o u t p u t a f S i m u l i n k −b l o k . end s y s=y . else y =0. k_fc=u ( 3 ) .Appendix E 75 77 79 81 83 x0 =0. u ) k_fh=u ( 1 ) . i f x_co>0 y=f z e r o (@(TH2) k_fh ∗x_h2∗p∗(1−TH2−( k_fc ∗ x_co ∗p∗(1−TH2) / ( k_fc ∗ x_co+b_fc +( i ∗ k_ec / ( 2 ∗ k_eh∗TH2) ) ) ) ) ^2−b_fh ∗ k_fh ∗TH2^2− i . i=u ( 8 ) .

E Matlab scripts

E.2
2 4 6 8 10 12 function 14 switch 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 u s =0; 68 sizes sizes sizes sizes sizes sizes

Fzero conservation of mass

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % Redigeret t i l udregning af massebevarelse i reformering % % J e s p e r Kjær S ø r e n s e n og Simon S a h l i n % % % % O r i g i n a l d e s i g n by S ø r e n J u h l A n d r e a s e n og Thomas Bagger Madsen % % % % EMSD9, November 2004 % % M o d e l l e n h a r t a g e t udgangspunkt i v a r m e v e k s l e r m o d e l a f % % Mads Pagh N i e l s e n % %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % [ s y s , x0 , s t r , t s ] = S f u n c t i o n _ f z e r o ( t , x , u , f l a g ) ;

flag ,

%% % % % % % % % % % % % % % % % % % Initialisering % %% % % % % % % % % % % % % % % % % case 0 , [ s y s , x0 , s t r , t s ]= m d l I n i t i a l i z e S i z e s ( ) ; %% % % % % % % % % % % % % % % Afledte % %% % % % % % % % % % % % % % case 1 , [ s y s ]= m d l D e r i v a t i v e s ( t , x , u ) ; %% % % % % % % % % % % Output % %% % % % % % % % % % case 3 , s y s=mdlOutputs ( t , x , u ) ; %% % % % % % % % % % % % % % % % % % % % % % % % Ikke benyttede f l a g s % %% % % % % % % % % % % % % % % % % % % % % % % c a s e {1 2 , 4 , 9 } , sys = [ ] ; %% % % % % % % % % % % % % % % % % % % % Uventede f l a g s % %% % % % % % % % % % % % % % % % % % % otherwise e r r o r ( [ ’ U n h a n d l e d f l a g = ’ , num2str ( f l a g ) ] ) ; end % end s w i t c h −f u n k t i o n % ========================================================================== % mdlInitializeSizes % Funktionen r e t u r n e r e r the v e k t o r s t ø r r e l s e r , s t a r t b e t i n g e l s e r , % og sample−t i d e r f o r S−f u n k t i o n e n . % ========================================================================== function [ s y s , x0 , s t r , t s ]= m d l I n i t i a l i z e S i z e s ( ) ; % Interne sizes = simsizes ; . NumContStates = 1 ; . NumDiscStates = 0 ; . NumOutputs = 1; . NumInputs = 13; . DirFeedthrough = 1 ; . NumSampleTimes = 1 ; % Antallet grid af points tilstande

% Antal output % Antal Input

sys = simsizes ( s i z e s ) ; 70 x0 =0; 72 74 76 78 80 function 82 sys = [ 0 ] ; 84 86 88 % ========================================================================== % mdlOutputs % R e t u r n e r e r o u t p u t a f S i m u l i n k −b l o k . % ========================================================================== % Resultat returneres til integrator [ s y s ]= m d l D e r i v a t i v e s ( t , x , u ) ; str = [ ] ; ts = [0 0 ] ; % ========================================================================== % mdlDerivatives % F u n k t i o n e n r e t u r n e r e r de a f l e d t e t i l s t a n d e % ========================================================================== % Begyndelsesvektor

193

Appendix E

90 92 94 96 98 100 102 104

106 108 110

f u n c t i o n s y s=mdlOutputs ( t , x , u ) ; n_meoh=u ( 1 ) ; n_h2o=u ( 2 ) ; m_meoh=u ( 3 ) ; m_co=u ( 4 ) ; m_co2=u ( 5 ) ; m_h2=u ( 6 ) ; m_h2o=u ( 7 ) ; n_mix_in=u ( 8 ) ; x_meoh=u ( 9 ) ; x_co=u ( 1 0 ) ; x_co2=u ( 1 1 ) ; x_h2=u ( 1 2 ) ; x_h2o=u ( 1 3 ) ; i f n_mix_in>0 y=f z e r o (@( nmixout ) n_h2o∗m_h2o+n_meoh∗m_meoh−(x_meoh∗m_meoh∗ nmixout+x_co ∗m_co∗ nmixout+x_co2 ∗ m_co2∗ nmixout+x_h2∗m_h2∗ nmixout+x_h2o ∗m_h2o∗ nmixout ) , 0 . 0 1 ) ; else y =0; end s y s=y ;

194

E Matlab scripts

E.3
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76

Repeating simulation optimizer

%% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % R e p e a t i n g t h e s i m u l a t i o n t o f i n d a more p r e c i s e v a l u e o f % % a_30 and b_30 % % % % J e s p e r Kjær S ø r e n s e n og Simon S a h l i n % % EMSD10 , Maj 2009 % %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % Constants % clear all tic %c l f s a m p l e d a t a . t i m e =0; %Lambda_air =2.5 i_start =0.01; i_max = 0 . 6 6 ; T_test = 1 8 0 + 2 7 3 . 1 5 ; CO_ppm=1000;

r e p e a t =10; % a _ 1 _ s t a r t = −0.0001 % a_1_slut = −0.0002 % a_1_slut=−5 % a_1_delta =( a_1_slut−a _ 1 _ s t a r t ) / r e p e a t opts = simset ( ’ debug ’ , ’ off ’ ) ; n = 1: repeat ^2; s c o r e _ s a m p l e ( n , 1 ) =0; a _ 3 0 _ s t a r t=3e −1; a_30_end=6e −1; a_30_delta =(a_30_end−a _ 3 0 _ s t a r t ) / r e p e a t ; b_30_start =2.8 e −2; b_30_end =2.6 e −2; b_30_delta =(b_30_end−b_30_start ) / r e p e a t ; % Model run % for a = 1: repeat a_30=a _ 3 0 _ s t a r t+a_30_delta ∗ ( a −1) ; for b = 1: repeat b_30=b_30_start+b_30_delta ∗ ( b−1) ; s c o r e _ s a m p l e ( ( b+( r e p e a t ∗ ( a −1) ) ) , 2 )=a_30 ; s c o r e _ s a m p l e ( ( b+( r e p e a t ∗ ( a −1) ) ) , 3 )=b_30 ;

%run model sim ( ’ f u e l c e l l _ m o d e l _ r e p e a t i n g _ f c _ v o l t a g e . m d l ’ , 1 0 0 , o p t s ) ;

% Check i f we g o t t h e l a r g e s v a l u e o f t i m e i n t e r v a l s and s a v e t h e l a r g e s t %( f o r p l o t t i n g p u r p o s e ) i f ( s i z e ( s i m o u t . s i g n a l s . v a l u e s , 1 ) > s i z e ( s a m p l e d a t a . time , 1 ) ) s a m p l e d a t a . t i m e=s i m o u t . t i m e ( : , 1 ) ; end % ( b+( r e p e a t ∗ ( a −1) ) ) ; f o r m=1: s i z e ( s i m o u t . s i g n a l s . v a l u e s , 1 ) % s a v e d a t a from model s a m p l e d a t a . v a l u e s (m, ( b+( r e p e a t ∗ ( a −1) ) ) )=s i m o u t . s i g n a l s . v a l u e s (m, 1 ) ; s a m p l e d a t a . s i m u l a t e d (m, ( b+( r e p e a t ∗ ( a −1) ) ) )=measout . s i g n a l s . v a l u e s (m, 1 ) ; s a m p l e d a t a . c u r r e n t d e n s i t y (m, ( b+( r e p e a t ∗ ( a −1) ) ) )=c u r r e n t _ d e n s i t y . s i g n a l s . v a l u e s (m, 1 ) ; % C a l c u l a t e t h e d i f f e r e n c e between model and m e a s s u r e d d a t a s a m p l e d a t a . d i f f (m, ( b+( r e p e a t ∗ ( a −1) ) ) )=s i m o u t . s i g n a l s . v a l u e s (m, 1 )−measout . s i g n a l s . v a l u e s (m, 1 ) ; % C a l c u l a t e t h e rms v a l u e o f t h e d i f f e r e n c e scoreadd_rms = s q r t ( s a m p l e d a t a . d i f f (m, ( b+( r e p e a t ∗ ( a −1) ) ) ) ^ 2 ) ; % Add t h e s c o r e _ s a m p l e ( ( b+( r e p e a t ∗ ( a −1) ) ) , 1 ) = s c o r e _ s a m p l e ( ( b+( r e p e a t ∗ ( a −1) ) ) , 1 )+scoreadd_rms ; end end end

78 80 82 84 86

%t i m e measured between toc % Aftermath %

t i c and t o c

% Find l o w e s t s c o r e and t h e i n d e x [ min_score_value , m i n _ s c o r e _ i n d e x ] = min ( s c o r e _ s a m p l e ( : , 1 ) ) ;

195

Appendix E

88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178

% Figures % close all % Figure 1 % % P l o t t h e d i f f e r e n c e e v e r y <r e p e a t > number o f s a m p l e s z1 = ’ . . / e p s / p l o t _ r e p e a t e d _ c o m p a r e d _ d i f f e r e n c e . e p s ’ ; figure1 = figure ( ’ PaperSize ’ ,[20.98 29.68]) ; X1=s a m p l e d a t a . c u r r e n t d e n s i t y ( : , m i n _ s c o r e _ i n d e x ) ; YMatrix1=s a m p l e d a t a . d i f f ( : , m i n _ s c o r e _ i n d e x ) ; f i g 1 _ t i c k _ y 1=max ( max ( YMatrix1 ) )+max ( max ( YMatrix1 ) ) / 1 0 ; fig1_max_y1=max ( max ( YMatrix1 ) ) + 0 . 0 2 ; fig1_min_y1=min ( min ( YMatrix1 ) ) − 0 . 0 2 ; % Create axes axes1 = axes ( ’ P a r e n t ’ , figure1 , . . . ’ YGrid ’ , ’ on ’ , . . . ’ XGrid ’ , ’ on ’ , . . . ’ LineWidth ’ ,1) ; % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e t h e X i m i t s −l % xlim ( [ 0 1 3 1 7 ] ) ; % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e t h e Y i m i t s −l y l i m ( [ fig1_min_y1 fig1_max_y1 ] ) ; box ( ’ o n ’ ) ; hold ( ’ all ’ ) ; % Create m u l t i p l e l i n e s using matrix input to p l o t p l o t 1 = p l o t ( X1 , YMatrix1 , ’ P a r e n t ’ , a x e s 1 ) ; set ( plot1 (1) , ’ DisplayName ’ , ’ Voltage difference ’) ; % Create y l a b e l ylabel ( ’ RMS voltage % Create x l a b e l xlabel ( ’ Current

of of

the axes the axes

difference ’ , ’ FontSize ’ ,10) ;

density ’ , ’ FontSize ’ ,10) ;

% Create legend legend1 = legend ( axes1 , ’ s h o w ’ ) ; s e t ( legend1 , ’ E d g e c o l o r ’ , [ 1 1 1 ] , ’ L o c a t i o n ’ , ’ N o r t h e a s t ’ ) ; p r i n t ( gcf , ’ - d e p s c 2 ’ , ’ - r 6 0 0 ’ , z1 ) d i s p ( z1 ) % Figure 2 % %p l o t ( s c o r e _ s a m p l e ( : , 1 ) ) z2 = ’ . . / e p s / p l o t _ r e p e a t e d _ c o m p a r e d _ s c o r e s . e p s ’ ; figure2 = figure ( ’ PaperSize ’ ,[20.98 29.68]) ; YMatrix1 = s c o r e _ s a m p l e ( : , 1 ) ; f i g 2 _ t i c k _ y 1=max ( max ( YMatrix1 ) )+max ( max ( YMatrix1 ) ) / 1 0 ; fig2_max_y1=max ( max ( YMatrix1 ) )+max ( max ( YMatrix1 ) ) ∗ 0 . 1 ; % Create axes a x e s 1 = a x e s ( ’ P a r e n t ’ , f i g u r e 2 , ’ Y T i c k ’ , ( 0 : 1 : fig2_max_y1 ) , . . . ’ YGrid ’ , ’ on ’ , . . . ’ XGrid ’ , ’ on ’ , . . . ’ LineWidth ’ ,1) ; % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e t h e X i m i t s o f t h e a x e s −l % xlim ( [ 0 1 3 1 7 ] ) ; % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e t h e Y i m i t s o f t h e a x e s −l y l i m ( [ 0 fig2_max_y1 ] ) ; box ( ’ o n ’ ) ; hold ( ’ all ’ ) ; % Create m u l t i p l e l i n e s using matrix input to p l o t p l o t 2 = p l o t ( YMatrix1 , ’ P a r e n t ’ , a x e s 1 ) ; set ( plot2 (1) , ’ DisplayName ’ , ’ Voltage score ’) ; % Create y l a b e l ylabel ( ’ RMS voltage

difference ’ , ’ FontSize ’ ,10) ;

% Create x l a b e l xlabel ( ’ Run session ’ , ’ FontSize ’ ,10) ; % Create legend legend1 = legend ( axes1 , ’ s h o w ’ ) ; s e t ( legend1 , ’ E d g e c o l o r ’ , [ 1 1 1 ] , ’ L o c a t i o n ’ , ’ N o r t h e a s t ’ ) ; p r i n t ( gcf , ’ - d e p s c ’ , ’ - r 6 0 0 ’ , z2 ) d i s p ( z2 ) % Figure 3 % z3 = ’ . . / e p s / p l o t _ r e p e a t e d _ p o l a r i s a t i o n _ c u r v e s _ 1 . e p s ’ ; X1=s a m p l e d a t a . c u r r e n t d e n s i t y ( : , m i n _ s c o r e _ i n d e x ) ; figure3 = figure ( ’ PaperSize ’ ,[20.98 29.68]) ; YMatrix1 = [ s a m p l e d a t a . v a l u e s ( : , m i n _ s c o r e _ i n d e x ) , s a m p l e d a t a . s i m u l a t e d ( : , m i n _ s c o r e _ i n d e x ) ] ; f i g 3 _ t i c k _ y 1=max ( max ( YMatrix1 ) )+max ( max ( YMatrix1 ) ) / 1 0 ; fig3_max_y1=max ( max ( YMatrix1 ) )+max ( max ( YMatrix1 ) ) ∗ 0 . 1 ; % Create axes a x e s 1 = a x e s ( ’ P a r e n t ’ , f i g u r e 3 , ’ Y T i c k ’ , ( 0 : 0 . 1 : fig3_max_y1 ) , . . . ’ YGrid ’ , ’ on ’ , . . .

196

’ s h o w ’ ) . box ( ’ o n ’ ) . ’ L o c a t i o n ’ . ’ on ’ . z3 ) d i s p ( z3 ) 197 . . ’ DisplayName ’ . set ( plot3 (1) . [ 1 1 1 ] .10) .d e p s c ’ . ’ Experimental ’) set ( plot3 (2) . s e t ( legend1 . ’ P a r e n t ’ . % Create m u l t i p l e l i n e s using matrix input p l o t 3 = p l o t ( X1 . ’ LineWidth ’ .1) . % Create y l a b e l ylabel ( ’ Voltage ’ . ’ FontSize ’ . ’ DisplayName ’ . the X i m i t s −l the Y i m i t s −l of of the axes the axes to . ’ . % Create x l a b e l xlabel ( ’ Current density ’ . . . % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e % xlim ( [ 0 1 3 1 7 ] ) .E Matlab scripts 180 182 184 186 188 190 192 194 196 198 200 202 ’ XGrid ’ . ’ Simulated ’) . a x e s 1 ) . % Uncomment t h e f o l l o w i n g l i n e t o p r e s e r v e y l i m ( [ 0 fig3_max_y1 ] ) . ’ FontSize ’ . p r i n t ( gcf .r 6 0 0 ’ . ’ N o r t h e a s t ’ ) . ’ .10) . plot % Create legend legend1 = legend ( axes1 . hold ( ’ all ’ ) . YMatrix1 . ’ E d g e c o l o r ’ .

∗K_V∗ K_conv_ref_dq ) 1/ T_i ( j ) ∗ K_P( j ) . %Gain v a l u e %n u m e r a t o r o f t h e t r a n f e r f u n c t i o n num_parameter =[K_P( j ) ∗K_V∗ K_conv_ref_dq 1/ T_i ( i ) ∗K_P( j ) . ∗K_V∗ K_conv_ref_dq ] . end . %C o n v e r t from s a m p l e s t o t i m e i n s m u l t i p l y w i t h t h e t i m e s t e p s e t l i n g t i m e =(s −1) ∗ 0 . c l o s e d l o o p _ n u m=conv ([ −1 1 / 6 0 ] ∗ (K_H2BURN −K_SR −K _ r e f _ f f ∗37∗ K_conv_ref_dq ) . f =0. y_disturbance ( : . %Time v e c t o r f o r t h e s t e p f u n c t i o n K_V=37. %Save t h e g a i n i n 1 s t column t a b l e ( k . G_closed_i=t f ( closedloop_num . num_parameter =[K_P( j ) ∗K_V∗ K_conv_ref_dq 1/ T_i ( j ) ∗K_P( j ) . figure (2) plot ( t . den_parameter ) . end .01:100. t a b l e ( k . c l o s e d l o o p _ d e n ) . G_closed=t f ( num_parameter . ∗K_V∗ K_conv_ref_dq ] . K_P o r t e d r o w s ( : .1∗ i . l a b e l 2 =[ ’ K _ P = ’ num2str (K_P( 2 ) ) ’ a n d T _ i = ’ num2str ( T_i ( 2 ) ) ] . ∗K_V∗ K_conv_ref_dq ] . l a b e l 3 =[ ’ K _ P = ’ num2str (K_P( 3 ) ) ’ a n d T _ i = ’ num2str ( T_i ( 3 ) ) ] . ∗K_V∗ K_conv_ref_dq ] . s=s −1. [ 1 0 ] ) . u s i n g t h e t i m e %v e c t o r t y=s t e p ( G_closed . %R e c i p r o c a l v a l u e o f t h e z e r o f o r j =1:125. t . %C r e a t i n g t h e t r a n s f e r f u n c t i o n G_closed=t f ( num_parameter . 2 ) . 3 ) ) legend ( label1 . 1 . ’ Location ’ . %Save t h e maximum o v e r s h o o t i n 3 r d column t a b l e ( k . %C a l c u l a t e t h e s e t l i n g t i m e w i t h 2% d e v i a n c e from t h e i n p u t o f t h e %s t e p . y (: .4 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 Controller parameter search 56 58 60 62 64 66 68 70 72 74 76 78 80 82 %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % S c r i p t f o r searching f o r c o n t r o l l e r parameters f o r % % a PI−c o n t r o l l e r f o r t h e r e f o r m e r . %Save t h e s e t l i n g t i m e i n t h e 4 t h column end end end %s t o p t h e t i m e c a l c u l a t i o n and p l o t i t i n t h e command window toc %s o r t t h e t a b l e from t h e s i m u l a t i o n s w i t h solumn 3 i n a s c e n d i n g o r d e r s o r t e d r o w s=s o r t r o w s ( t a b l e . f=f +1. t . % % C r e a t e d by : Simon S a h l i n and J e s p e r Kjær S ø r e n s e n % %% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % t =0:0. 9 8 . den_parameter ) . den_parameter =[ m_ref ∗ c _ r e f ( K_conv_ref_dTr+K_cond_ref+ K_P( j ) . ’ SouthEast ’ ) 198 . %p l o t t h e s t e p r e s p o n s e f o r t h e r e f e r e n c e c o n t r o l l e r figure (1) plot (t . w h i l e y ( s ) <1. 2 ) . s i s t h e f i x e d number o f s a m p l e s s =10001. %Save t h e i n t e g r a l c o n s t a n t i n 2nd column t a b l e ( k . ’ Location ’ . %C r e a t e t h e l a b e l s f o r t h e f i g u r e l e g e n d s l a b e l 1 =[ ’ K _ P = ’ num2str (K_P( 1 ) ) ’ a n d T _ i = ’ num2str ( T_i ( 1 ) ) ] . %Loop f o r t h e g a i n o f t h e c l o s e d l o o p f u n c t i o n .2) .1) . 1 )= K_P( j ) . 1 ) . ∗K_V∗ K_conv_ref_dq ) 1/ T_i ( i ) ∗K_P( j ) . %V o l t a g e c o n s t a n t f o r t h e c o n t r o l l e r k =0. 2 )=T_i ( i ) .02]) legend ( label1 . %Count up t h e v a r i a b l e f o r t a b l e . [ m_ref ∗ c _ r e f ( K_cond_ref+K_conv_ref_dTr+ K_V∗K_P( j ) ∗ K_conv_ref_dq ) 1/ T_i ( j ) ∗K_V∗K_P( j ) ∗ K_conv_ref_dq ] ) . label2 . %I n t e g r a t i o n c o n s t a n t Loop f o r c h a n g i n g t h e p l a c e m e n t o f t h e z e r o on t h e n e g a t i v e axis T_i ( i ) =2+0. 4 )=s e t l i n g t i m e .3) ) axis ([0 1 0. t ) . 3 ) . =s T_i=s o r t e d r o w s ( : .10 && m>1. t ) . t ) . for j =1:1:3. y_disturbance ( : . y_disturbance ( : .02 & y ( s ) > 0 .Appendix E E. %C a l c u l a t e t h e o v e r s h o o t f o r t h e s t e p f u n c t i o n m =max ( y ) . label3 . K_P( j ) =2∗ j .01 && s e t l i n g t i m e <10 k=k +1. t . end . %d e n o m i n a t o r o f t h e t r a n s f e r f u n c t i o n den_parameter =[ m_ref ∗ c _ r e f ( K_conv_ref_dTr+K_cond_ref+ K_P( j ) . %C o u n t i n g v a r i a b l e f o r t h e t a b l e %C l e a r t h e v a r i a b l e s f o r t h e s c r i p t clear table c l e a r sortedrows %s e t t h e timestamp f o r t h e c a l c u l a t i o n s b e g i n n i n g tic f o r i = 1 : 1 2 5 . label3 . y _ d i s t u r b a n c e ( : . label2 . ’ SouthEast ’ ) %P l o t t i n g t h e s t e p r e s p o n s e f o r t h e c u r r e n t d e n s i t y c l o s e d l o o p t r a n s f e r %f u n c t i o n . c l o s e d l o o p _ d e n=conv ( [ 1 1 / 6 0 ] . y ( : .5 1. %Apply t h e s t e p f u n c t i o n t o o b t a i n t h e r e s p o n s e . f=f +1. 1 ) . f )=s t e p ( G_closed_i . y (: . for j =1:1:3. 3 )= m. f )=s t e p ( G_closed . f =0. t . %S o r t t h e s t e p r e s p o n s e s and s a v e t h e o n e s t h a t f i t s i n s i d e t h e %p a r a m e t e r s o f t h e demands from t h e r e p o r t and <10 s e c o n d s e t l i n g %t i m e i f m<1. y (: .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.