# Optimal Control of a PEM Fuel Cell for the Inputs Minimization

Authors: José de Jesús Rubio; Adrian Gustavo Bravo
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The trajectory tracking problem of a proton exchange membrane (PEM) fuel cell is considered. To solve this problem, an optimal controller is proposed. The optimal technique has the objective that the system states should reach the desired trajectories while the inputs are minimized. The proposed controller uses the Hamilton-Jacobi-Bellman method where its Riccati equation is considered as an adaptive function. The effectiveness of the proposed technique is verified by two simulations.


---

## Body

## 1. Introduction

A fuel cell is an electrochemical device that converts chemical energy stored in fuel into electricity. PEM fuel cells have seen a great amount of development in recent years. Fuel cell integrated to renewable energy systems offers many socioeconomic benefits. Understanding the behavior of PEM fuel cell stacks at varying loads is vital for the control of the efficiency.There is some research about controllers applied to PEM fuel cells. In [1], a nonlinear-control strategy for PEM fuel cells by using the exact linearization approach is presented. In [2], a nonlinear controller is designed based on the proposed model to prolong the stack life of the PEM fuel cells. In [3], a higher-order sliding-mode supertwisting algorithm has been designed to control a motor that drives a compressor designed to feed the 33 kW fuel cell with air. Therefore, the controllers design to improve the performance of the PEM fuel cells would be of great importance; and none of the above researches introduces an optimal controller.There are some works about control. Fuzzy controls for nonlinear systems are proposed in [4, 5]. In [6–10], robust controls of nonlinear systems are introduced. The bang-bang optimal control problem associated with hydraulic systems is addressed in [11]. The research of [12] deals with multiobjective optimization techniques for a class of hybrid optimal control problems in mechanical systems. In [13, 14], optimal controls of robotics arms are considered. None of the above studies is applied to PEM fuel cell; thereby, in this study, an optimal controller of a PEM fuel cell is introduced. The proposed controller uses the solution of the Hamilton-Jacobi-Bellman equations where its Riccati equation is considered as an adaptive function; that is, in other papers, the Riccati equation is solved in an inverse form using the final conditions, while in this paper, the Riccati equation is solved in a forward form using the initial conditions.This paper is organized as follows. Section2 presents the modified PEM fuel cell dynamic model which includes an external load. In Section 3, the optimal control of the PEM fuel cell is designed. In Section 4, the optimal method and dual proportional-derivative technique are compared by two simulations. Section 5 presents conclusions and suggests future research directions.


## 2. Modified PEM Fuel Cell Dynamic Model

In this section, the PEM fuel cell dynamic model of [1] is described; it will be used in the following section for the control design. Furthermore, the PEM fuel cell dynamic model is modified to include an external load which makes it more approximated with the real process.The following assumptions are applied to construct the simplified dynamic model for the PEM fuel cell [1]. (
1
) The gases are ideal. (
2
) The water management and the humidification of system are not considered in this paper. (
3
) The oxygen flow rate is determined by the hydrogen-oxygen flow ratio from the reformer. (
4
) The stack temperature is regulated 80°C by using an independent cooling system. (
5
) The Nernst equation is applied.


### 2.1. Modified PEM Fuel Cell Output Voltage Equation

The output stack voltageV defined as a function of the stack current, reactant partial pressures, fuel cell temperature, and membrane humidity, is as follows [1, 2, 15, 16]:
(1)
V
=
E
-
V
activation
-
V
ohmic
-
V
concentration
,
where E
=
N
(
E
o
+
(
R
T
/
2
F
)
ln
⁡
{
p
H
2
(
p
O
2
/
P
std
)
1
/
2
/
p
H
2
O
C
}
) is the thermodynamic potential of the cell or reversible voltage based on the Nernst equation, N is the number of cells in the stack, E
o is the cell-open-circuit voltage, T is the operating temperature, p
H
2, p
O
2, and p
H
2
O
C are the partial pressures of hydrogen, oxygen, and water gas inside the cell, respectively, R is the gas constant (8.3144 J/mol
0K), F is the Faraday constant (96439 C/mol), P
std is the standard pressure (101325 Pa), and V
activation is the voltage loss due to the reactions of the electrodes surface. V
ohmic is the ohmic voltage drop from the resistances of proton flow in the electrolyte. V
concentration is the voltage loss from the reduction of concentration gases or the transport of a mass of oxygen and hydrogen. The equations are given as follows [2, 15, 16]:
(2)
V
activation
=
N
R
T
2
α
F
ln
⁡
(
i
+
i
n
i
0
)
=
N
C
ln
⁡
(
i
+
i
n
i
0
)
,
(3)
V
ohmic
=
N
r
i
,
(4)
V
concentration
=
N
m
e
n
i
,
where C
=
R
T
/
2
α
F, i is the output current density, i
n is the internal current density related to the internal current losses, i
0 is the exchange current density related to activation losses, α is a charge transfer coefficient, r is the area-specific resistance related to resistive losses, and m and n are constants in the mass transfer voltage.In this study, the output stack voltageV of (1) is modified with the consideration of an external load as can be seen in Figure 1.Figure 1
PEM fuel cell.It is described as follows:(5)
V
=
E
-
V
activation
-
V
ohmic
-
V
concentration
-
V
load
,
where V
activation, V
ohmic, and V
concentration are defined in (2), (3), and (4), respectively, V
load
=
R
l
i is the load voltage, i is the output current density, and R
l is the load resistance.


### 2.2. State Equations

The partial pressures of hydrogen, oxygen, and water on the cathode side are defined as the state variables of the system, and the relationship between the inlet and the outlet gases is as follows [1]:Anode:(6)
H
2
,
in
+
H
2
O
A
,
in
=
H
2
,
out
+
H
2
O
A
,
out
.Cathode:(7)
N
2
,
in
+
O
2
,
in
+
H
2
O
C
,
in
=
N
2
,
out
+
O
2
,
out
+
H
2
O
C
,
out
.From the ideal gas law, it is known that the partial pressure of each gas is proportional to the amount of gas in the cell, to which there are three relevant contributions depending on the gas inlet flow rate, gas consumption, and gas outlet flow rate. Thus, the state equations are [1]
(8)
d
p
H
2
d
t
=
R
T
V
A
[
H
2
,
in
-
2
K
r
A
c
i
-
(
H
2
,
in
-
2
K
r
A
c
i
)
p
H
2
p
op
]
,
d
p
O
2
d
t
=
R
T
V
C
[
O
2
,
in
-
K
r
A
c
i
-
(
O
2
,
in
-
K
r
A
c
i
)
p
O
2
p
op
]
,
d
p
H
2
O
C
d
t
=
R
T
V
C
[
H
2
O
C
,
in
+
2
K
r
A
c
i
-
(
O
2
,
in
+
2
K
r
A
c
i
)
p
H
2
O
C
p
op
]
,
where K
r
=
N
/
4
F, A
c is the cell active area, i is defined in (2)–(4), P
op is the operating pressure, V
Ais the anode volume, V
C is the cathode volume, R and T are defined in (1), H
2
,
in, O
2
,
in, and H
2
O
C
,
in are the inlet flow rates of the hydrogen, oxygen, and water of the cathode, respectively, and p
H
2, p
O
2, and p
H
2
O
C are the partial pressures of hydrogen, oxygen, and water inside the cell, respectively.


### 2.3. The Final System

The water inputH
2
O
C
,
in is not considered in the state equations because it is not an input of the process in most of the applications. Defining the states as x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, the inputs as u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i and the output as y
=
V give the following state space system:
(9)
x
˙
1
=
R
T
V
A
(
-
u
1
p
op
+
2
K
r
A
c
u
3
p
op
)
x
1
+
R
T
V
A
u
1
-
R
T
V
A
2
K
r
A
c
u
3
,
x
˙
2
=
R
T
V
C
(
-
u
2
p
op
+
K
r
A
c
u
3
p
op
)
x
2
+
R
T
V
C
u
2
-
R
T
V
C
K
r
A
c
u
3
,
x
˙
3
=
R
T
V
C
(
-
u
2
p
op
-
2
K
r
A
c
u
3
p
op
)
x
3
+
R
T
V
C
2
K
r
A
c
u
3
,
y
=
N
(
E
o
+
R
T
2
F
ln
⁡
{
x
1
(
x
2
/
P
std
)
1
/
2
x
3
}
)
-
N
C
ln
⁡
(
u
3
+
i
n
i
0
)
-
N
r
u
3
-
N
m
e
n
u
3
-
R
l
u
3
.
The nonlinear system (9) is rewritten as follows:
(10)
x
˙
=
A
x
+
B
u
=
f
(
x
,
u
)
,
y
=
q
(
x
,
u
)
,
where A
=
[
a
1
0
0
0
a
2
0
0
0
a
3
]
∈
ℜ
3
×
3,  a
1
=
(
R
T
/
V
A
)
(
-
u
1
/
p
op
+
2
K
r
A
c
(
u
3
/
p
op
)
), a
2
=
(
R
T
/
V
C
)
(
-
u
2
/
p
op
+
K
r
A
c
(
u
3
/
p
op
)
), a
3
=
(
R
T
/
V
C
)
(
-
u
2
/
p
op
-
2
K
r
A
c
(
u
3
/
p
op
)
), B
=
[
b
11
0
b
13
0
b
22
b
23
0
0
b
33
]
∈
ℜ
3
×
3, b
11
=
R
T
/
V
A, b
13
=
-
(
R
T
/
V
A
)
2
K
r
A
c, b
22
=
R
T
/
V
C, b
23
=
-
(
R
T
/
V
C
)
K
r
A
c, b
33
=
(
R
T
/
V
C
)
2
K
r
A
c, x
=
[
x
1
,
x
2
,
x
3
]
T, u
=
[
u
1
,
u
2
,
u
3
]
T, q
(
x
,
u
)
=
N
(
E
o
+
(
R
T
/
2
F
)
ln
⁡
{
x
1
(
x
2
/
P
std
)
1
/
2
/
x
3
}
)
-
N
C
ln
⁡
(
(
u
3
+
i
n
)
/
i
0
)
-
N
r
u
3
-
N
m
e
n
u
3
-
R
l
u
3.Remark 1.
The dynamic model is proposed by [1]. Notwithstanding, the PEM fuel cell with an external load is proposed in this study.


## 2.1. Modified PEM Fuel Cell Output Voltage Equation

The output stack voltageV defined as a function of the stack current, reactant partial pressures, fuel cell temperature, and membrane humidity, is as follows [1, 2, 15, 16]:
(1)
V
=
E
-
V
activation
-
V
ohmic
-
V
concentration
,
where E
=
N
(
E
o
+
(
R
T
/
2
F
)
ln
⁡
{
p
H
2
(
p
O
2
/
P
std
)
1
/
2
/
p
H
2
O
C
}
) is the thermodynamic potential of the cell or reversible voltage based on the Nernst equation, N is the number of cells in the stack, E
o is the cell-open-circuit voltage, T is the operating temperature, p
H
2, p
O
2, and p
H
2
O
C are the partial pressures of hydrogen, oxygen, and water gas inside the cell, respectively, R is the gas constant (8.3144 J/mol
0K), F is the Faraday constant (96439 C/mol), P
std is the standard pressure (101325 Pa), and V
activation is the voltage loss due to the reactions of the electrodes surface. V
ohmic is the ohmic voltage drop from the resistances of proton flow in the electrolyte. V
concentration is the voltage loss from the reduction of concentration gases or the transport of a mass of oxygen and hydrogen. The equations are given as follows [2, 15, 16]:
(2)
V
activation
=
N
R
T
2
α
F
ln
⁡
(
i
+
i
n
i
0
)
=
N
C
ln
⁡
(
i
+
i
n
i
0
)
,
(3)
V
ohmic
=
N
r
i
,
(4)
V
concentration
=
N
m
e
n
i
,
where C
=
R
T
/
2
α
F, i is the output current density, i
n is the internal current density related to the internal current losses, i
0 is the exchange current density related to activation losses, α is a charge transfer coefficient, r is the area-specific resistance related to resistive losses, and m and n are constants in the mass transfer voltage.In this study, the output stack voltageV of (1) is modified with the consideration of an external load as can be seen in Figure 1.Figure 1
PEM fuel cell.It is described as follows:(5)
V
=
E
-
V
activation
-
V
ohmic
-
V
concentration
-
V
load
,
where V
activation, V
ohmic, and V
concentration are defined in (2), (3), and (4), respectively, V
load
=
R
l
i is the load voltage, i is the output current density, and R
l is the load resistance.


## 2.2. State Equations

The partial pressures of hydrogen, oxygen, and water on the cathode side are defined as the state variables of the system, and the relationship between the inlet and the outlet gases is as follows [1]:Anode:(6)
H
2
,
in
+
H
2
O
A
,
in
=
H
2
,
out
+
H
2
O
A
,
out
.Cathode:(7)
N
2
,
in
+
O
2
,
in
+
H
2
O
C
,
in
=
N
2
,
out
+
O
2
,
out
+
H
2
O
C
,
out
.From the ideal gas law, it is known that the partial pressure of each gas is proportional to the amount of gas in the cell, to which there are three relevant contributions depending on the gas inlet flow rate, gas consumption, and gas outlet flow rate. Thus, the state equations are [1]
(8)
d
p
H
2
d
t
=
R
T
V
A
[
H
2
,
in
-
2
K
r
A
c
i
-
(
H
2
,
in
-
2
K
r
A
c
i
)
p
H
2
p
op
]
,
d
p
O
2
d
t
=
R
T
V
C
[
O
2
,
in
-
K
r
A
c
i
-
(
O
2
,
in
-
K
r
A
c
i
)
p
O
2
p
op
]
,
d
p
H
2
O
C
d
t
=
R
T
V
C
[
H
2
O
C
,
in
+
2
K
r
A
c
i
-
(
O
2
,
in
+
2
K
r
A
c
i
)
p
H
2
O
C
p
op
]
,
where K
r
=
N
/
4
F, A
c is the cell active area, i is defined in (2)–(4), P
op is the operating pressure, V
Ais the anode volume, V
C is the cathode volume, R and T are defined in (1), H
2
,
in, O
2
,
in, and H
2
O
C
,
in are the inlet flow rates of the hydrogen, oxygen, and water of the cathode, respectively, and p
H
2, p
O
2, and p
H
2
O
C are the partial pressures of hydrogen, oxygen, and water inside the cell, respectively.


## 2.3. The Final System

The water inputH
2
O
C
,
in is not considered in the state equations because it is not an input of the process in most of the applications. Defining the states as x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, the inputs as u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i and the output as y
=
V give the following state space system:
(9)
x
˙
1
=
R
T
V
A
(
-
u
1
p
op
+
2
K
r
A
c
u
3
p
op
)
x
1
+
R
T
V
A
u
1
-
R
T
V
A
2
K
r
A
c
u
3
,
x
˙
2
=
R
T
V
C
(
-
u
2
p
op
+
K
r
A
c
u
3
p
op
)
x
2
+
R
T
V
C
u
2
-
R
T
V
C
K
r
A
c
u
3
,
x
˙
3
=
R
T
V
C
(
-
u
2
p
op
-
2
K
r
A
c
u
3
p
op
)
x
3
+
R
T
V
C
2
K
r
A
c
u
3
,
y
=
N
(
E
o
+
R
T
2
F
ln
⁡
{
x
1
(
x
2
/
P
std
)
1
/
2
x
3
}
)
-
N
C
ln
⁡
(
u
3
+
i
n
i
0
)
-
N
r
u
3
-
N
m
e
n
u
3
-
R
l
u
3
.
The nonlinear system (9) is rewritten as follows:
(10)
x
˙
=
A
x
+
B
u
=
f
(
x
,
u
)
,
y
=
q
(
x
,
u
)
,
where A
=
[
a
1
0
0
0
a
2
0
0
0
a
3
]
∈
ℜ
3
×
3,  a
1
=
(
R
T
/
V
A
)
(
-
u
1
/
p
op
+
2
K
r
A
c
(
u
3
/
p
op
)
), a
2
=
(
R
T
/
V
C
)
(
-
u
2
/
p
op
+
K
r
A
c
(
u
3
/
p
op
)
), a
3
=
(
R
T
/
V
C
)
(
-
u
2
/
p
op
-
2
K
r
A
c
(
u
3
/
p
op
)
), B
=
[
b
11
0
b
13
0
b
22
b
23
0
0
b
33
]
∈
ℜ
3
×
3, b
11
=
R
T
/
V
A, b
13
=
-
(
R
T
/
V
A
)
2
K
r
A
c, b
22
=
R
T
/
V
C, b
23
=
-
(
R
T
/
V
C
)
K
r
A
c, b
33
=
(
R
T
/
V
C
)
2
K
r
A
c, x
=
[
x
1
,
x
2
,
x
3
]
T, u
=
[
u
1
,
u
2
,
u
3
]
T, q
(
x
,
u
)
=
N
(
E
o
+
(
R
T
/
2
F
)
ln
⁡
{
x
1
(
x
2
/
P
std
)
1
/
2
/
x
3
}
)
-
N
C
ln
⁡
(
(
u
3
+
i
n
)
/
i
0
)
-
N
r
u
3
-
N
m
e
n
u
3
-
R
l
u
3.Remark 1.
The dynamic model is proposed by [1]. Notwithstanding, the PEM fuel cell with an external load is proposed in this study.


## 3. Optimal Control Applied to PEM Fuel Cell

In this section, the optimal control of the PEM fuel cell is designed.Define the reference model as follows:(11)
x
˙
d
=
A
x
d
,
where x
d
=
[
x
d
,
1
,
x
d
,
2
,
x
d
,
3
]
T is the desired reference and A is defined in (10). Subtracting (11) from (10), the closed-loop system is obtained as follows:
(12)
x
~
˙
=
A
x
~
+
B
u
=
f
(
x
~
,
u
)
,
where x
~
=
x
-
x
d is the tracking error and u, A, and B are defined in (10).The following theorem presents the optimal control applied to the PEM fuel cell.Theorem 2.
Consider the PEM fuel cell (10). Therefore, there exists an optimal controller to follow a desired behavior given as follows:
(13)
u
=
-
P
-
1
[
(
∂
A
x
~
∂
u
)
T
S
x
~
+
B
T
S
x
~
]
,
where ∂
A
x
~
/
∂
u
=
[
∂
a
11
∂
a
12
∂
a
13
∂
a
21
∂
a
22
∂
a
23
∂
a
31
∂
a
32
∂
a
33
]
∈
ℜ
3
×
3,∂
a
11
=
(
R
T
/
V
A
)
(
-
x
~
1
/
p
op
), ∂
a
12
=
0, ∂
a
13
=
(
R
T
/
V
A
)
(
2
K
r
A
c
(
x
~
1
/
p
op
)
), ∂
a
21
=
0, ∂
a
22
=
(
R
T
/
V
C
)
(
-
x
~
2
/
p
op
), ∂
a
23
=
(
R
T
/
V
C
)
(
K
r
A
c
(
x
~
2
/
p
op
)
), ∂
a
31
=
0, ∂
a
32
=
(
R
T
/
V
C
)
(
-
x
~
3
/
p
op
), ∂
a
33
=
(
R
T
/
V
C
)
(
-
2
K
r
A
c
(
x
~
3
/
p
op
)
), P
∈
ℜ
3
×
3 is a constant and positive definite matrix, x
~ is the system tracking error defined in (12), S
=
diag
(
s
i
)
∈
ℜ
3
×
3 is a positive definite matrix,s
1, s
2, and s
3 are positive scalar varying with time parameters, and an adaptive equation is given as follows:
(14)
S
˙
=
-
S
A
-
A
T
S
-
Q
+
S
B
P
-
1
B
T
S
+
S
B
P
-
1
(
∂
A
x
~
∂
u
)
T
S
.Proof.
According to the optimal control technique [17, 18], a quadratic performance index is defined as
(15)
J
=
1
2
H
(
x
f
)
+
1
2
∫
t
o
t
f
g
(
x
,
u
)
d
t
,
where g
(
x
,
u
) is the average function and H
(
x
f
) is a function of the final time. The Hamiltonian is defined as follows [17, 18]:
(16)
h
(
x
,
u
,
λ
)
=
g
(
x
,
u
)
+
λ
T
f
(
x
,
u
)
,
where λ
=
[
λ
1
,
λ
2
,
λ
3
]
T. The equations to obtain the optimal control with the Hamilton-Jacobi-Bellman method are as follows [17, 18]:
(17)
0
=
∂
h
(
x
,
u
,
λ
)
∂
u
,
λ
˙
=
-
∂
h
(
x
,
u
,
λ
)
∂
x
.
Define the following quadratic performance index for the Hamilton-Jacobi-Bellman of this system [17, 18]:
(18)
J
=
1
2
x
f
~
T
H
x
f
~
+
1
2
∫
t
o
t
f
(
x
~
T
Q
x
~
+
u
T
P
u
)
d
t
,
where 0
≤
H
∈
ℜ
3
×
3, 0
<
Q
∈
ℜ
3
×
3, u is the system input defined in (10), and x
f
~ is the final tracking error. Using (12) and (18), the Hamiltonian is
(19)
h
(
x
~
,
u
,
λ
)
=
1
2
x
~
T
Q
x
~
+
u
T
P
u
+
λ
T
[
A
x
~
+
B
u
]
,
where A and B are defined in (10). Applying the first equation of (17) to the Hamiltonian (19), it gives the following optimal control function:
(20)
u
=
-
P
-
1
[
(
∂
A
x
~
∂
u
)
T
λ
+
B
T
λ
]
,
where λ is obtained by applying the second equation of (17) to the Hamiltonian (19) given as follows:
(21)
λ
˙
=
-
Q
x
~
-
A
T
λ
.
Define λ as follows:
(22)
λ
=
S
x
~
.
Substituting (22) into (20), it gives the optimal control function (13). Substituting (22) and (13) into (21) and considering λ
˙
=
S
˙
x
~
+
S
x
~
˙ and (12), it gives the adaptive equation (14).Remark 3.
First, the process starts with the initial conditions ofx
~ and S; the adaptive equation (14) is solved at a time to find S
˙; then, the optimal control function (13) is solved at a time to find u; later, the fuel cell dynamic model (10) is solved to find x
˙. Then, the process starts again. The above-described process is directly solved using the software Simulink of MATLAB. t
f is free in the numerical simulations because it can take different values without the requirement to remake additional calculus.


## 4. Simulations

In this study, the dual proportional derivative control with nonlinear compensation of [19] called PD and the optimal control called Optimal are compared by two simulations. The objective is that the plant states reach a desired trajectory; that is, the states x
1, x
2, and x
3 of (10) should reach the desired trajectories x
d
,
1, x
d
,
2, and x
d
,
3. The dual PD control is used because it yields good results for both continuous and noncontinuous set points [19].The root mean square error (RMSE) is used for the controllers comparison; it is given as follows [13, 14, 20]:
(23)
RMSE
=
(
1
T
∫
0
T
e
2
d
τ
)
1
/
2
,
where e
2
=
x
~
1
2
+
x
~
2
2
+
x
~
3
2 is the tracking error and e
2
=
u
1
2
+
u
2
2
+
u
3
2 is the control function.The parameters of the PEM fuel cell are given in Table1 [1, 2].Table 1
Parameters of a PEM fuel cell.
Parameter
Value
V
A
6.495 cm2
A
C
136.7 cm2
V
C
12.96 cm2
N
35
P
op
101
×
10
3 Pa
T
353°K
E
o
1.3 V
R
8.3144 J/mol°K
F
96485 C/mol
P
std
101325 PaThe other parameters areα
=
0.58, i
0
=
1
×
1
0
-
4 mA/cm2, i
n
=
1
×
1
0
-
4 mA/cm2, r
=
3.85
×
1
0
-
4 kΩcm2, m
=
3
×
1
0
-
6 V, and n
=
8
×
1
0
-
3 cm2/mA.


### 4.1. Example  1

The dynamic model for the PEM fuel cell is given by (10) with N
=
35, R
l
=
1
Ω, states x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, inputs u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i, and output y
=
V, x
1,0
=
x
2,0
=
x
3,0
=
1 Pa being the initial conditions for the states; x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
2
+
0.5
sin
(
π
t
) Pa from 0 s to 4 s are the desired references.The gains of the PD technique areK
p
=
diag
⁡
(
k
p
,
j
), k
p
,
1
=
2
×
1
0
-
1, k
p
,
2
=
2
×
1
0
-
1, k
p
,
3
=
5, K
d
=
diag
⁡
(
k
d
,
j
), k
d
,
1
=
2
×
1
0
-
3, k
d
,
2
=
4
×
1
0
-
3, and k
p
,
3
=
5
×
1
0
-
2.Optimal is given by (13), (14) with parameters P
=
diag
⁡
(
1
)
∈
ℜ
3
×
3, Q
=
diag
⁡
(
0.1
)
∈
ℜ
3
×
3, S
0
=
diag
⁡
(
s
,
j
,
o
)
∈
ℜ
3
×
3, s
1
,
o
=
1.2
×
1
0
-
3, s
2
,
o
=
2.5
×
1
0
-
3, and s
3
,
o
=
2.5; S
0 is the initial condition of S.Figures2, 3, and 4 show the trajectory tracking, control function, and output for Optimal and PD techniques applied to the PEM fuel cell, respectively. Table 2 shows the RMSE for the tracking error and control function.Table 2
Results for states and controls.
Methods
RMSE for states
RMSE for controls
Optimal
0.0479
0.1395
PD
0.0932
0.2603Trajectory tracking of the states.
(a)
(b)
(c)Control functions.
(a)
(b)
(c)Figure 4
Outputs.From Figure2, it can be seen that Optimal achieves better accuracy when compared with PD because the signals for the first follow better the reference signals than for the other. From Figures 3 and 4, it can be seen that Optimal is better than PD because the first reaches smaller inputs than the other. From Table 2, it can be observed that Optimal achieves better accuracy when compared with PD because the RMSE is smaller for the first than for the other.


### 4.2. Example  2

The dynamic model for the PEM fuel cell is given by (10) with N
=
35, R
l
=
1
Ω, states x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, inputs u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i, and output y
=
V, x
1,0
=
x
2,0
=
x
3,0
=
2 Pa being the initial conditions for the states; x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
4 Pa from 0 s to 1 s, x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
5 Pa from 1 s to 2 s, x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
3 Pa from 2 s to 3 s, and x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
2 Pa from 3 s to 4 s are the desired references.The gains of the PD technique areK
p
=
diag
⁡
(
k
p
,
j
), k
p
,
1
=
2
×
1
0
-
1, k
p
,
2
=
2
×
1
0
-
1, k
p
,
3
=
5, K
d
=
diag
⁡
(
k
d
,
j
), k
d
,
1
=
2
×
1
0
-
3, k
d
,
2
=
2
×
1
0
-
3, and k
p
,
3
=
5
×
1
0
-
2.Optimal is given by (13), (14) with parameters P
=
diag
⁡
(
1
)
∈
ℜ
3
×
3, Q
=
diag
⁡
(
0.1
)
∈
ℜ
3
×
3, S
0
=
diag
⁡
(
s
,
j
,
o
)
∈
ℜ
3
×
3, s
1
,
o
=
1.2
×
1
0
-
3, s
2
,
o
=
2.5
×
1
0
-
3, and s
3
,
o
=
2.5; S
0 is the initial condition of S.Figures5, 6, and 7 show the trajectory tracking, control function, and output for Optimal and PD techniques applied to the PEM fuel cell, respectively. Table 3 shows the RMSE for the tracking error and control function.Table 3
Results for states and controls.
Methods
RMSE for states
RMSE for controls
Optimal
0.3103
2.3623
PD
0.4804
3.6732Trajectory tracking of the states.
(a)
(b)
(c)Control functions.
(a)
(b)
(c)Figure 7
Outputs.From Figure5, it can be seen that Optimal achieves better accuracy when compared with PD because the signals for the first follow better the reference signals than for the other. From Figures 6 and 7, it can be seen that Optimal is better than PD because the first reaches smaller inputs than the other. From Table 3, it can be observed that Optimal achieves better accuracy when compared with PD because the RMSE is smaller for the first than for the other.


## 4.1. Example  1

The dynamic model for the PEM fuel cell is given by (10) with N
=
35, R
l
=
1
Ω, states x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, inputs u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i, and output y
=
V, x
1,0
=
x
2,0
=
x
3,0
=
1 Pa being the initial conditions for the states; x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
2
+
0.5
sin
(
π
t
) Pa from 0 s to 4 s are the desired references.The gains of the PD technique areK
p
=
diag
⁡
(
k
p
,
j
), k
p
,
1
=
2
×
1
0
-
1, k
p
,
2
=
2
×
1
0
-
1, k
p
,
3
=
5, K
d
=
diag
⁡
(
k
d
,
j
), k
d
,
1
=
2
×
1
0
-
3, k
d
,
2
=
4
×
1
0
-
3, and k
p
,
3
=
5
×
1
0
-
2.Optimal is given by (13), (14) with parameters P
=
diag
⁡
(
1
)
∈
ℜ
3
×
3, Q
=
diag
⁡
(
0.1
)
∈
ℜ
3
×
3, S
0
=
diag
⁡
(
s
,
j
,
o
)
∈
ℜ
3
×
3, s
1
,
o
=
1.2
×
1
0
-
3, s
2
,
o
=
2.5
×
1
0
-
3, and s
3
,
o
=
2.5; S
0 is the initial condition of S.Figures2, 3, and 4 show the trajectory tracking, control function, and output for Optimal and PD techniques applied to the PEM fuel cell, respectively. Table 2 shows the RMSE for the tracking error and control function.Table 2
Results for states and controls.
Methods
RMSE for states
RMSE for controls
Optimal
0.0479
0.1395
PD
0.0932
0.2603Trajectory tracking of the states.
(a)
(b)
(c)Control functions.
(a)
(b)
(c)Figure 4
Outputs.From Figure2, it can be seen that Optimal achieves better accuracy when compared with PD because the signals for the first follow better the reference signals than for the other. From Figures 3 and 4, it can be seen that Optimal is better than PD because the first reaches smaller inputs than the other. From Table 2, it can be observed that Optimal achieves better accuracy when compared with PD because the RMSE is smaller for the first than for the other.


## 4.2. Example  2

The dynamic model for the PEM fuel cell is given by (10) with N
=
35, R
l
=
1
Ω, states x
1
=
p
H
2, x
2
=
p
O
2, and x
3
=
p
H
2
O
C, inputs u
1
=
H
2
,
in, u
2
=
O
2
,
in, and u
3
=
i, and output y
=
V, x
1,0
=
x
2,0
=
x
3,0
=
2 Pa being the initial conditions for the states; x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
4 Pa from 0 s to 1 s, x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
5 Pa from 1 s to 2 s, x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
3 Pa from 2 s to 3 s, and x
d
,
1
=
x
d
,
2
=
x
d
,
3
=
2 Pa from 3 s to 4 s are the desired references.The gains of the PD technique areK
p
=
diag
⁡
(
k
p
,
j
), k
p
,
1
=
2
×
1
0
-
1, k
p
,
2
=
2
×
1
0
-
1, k
p
,
3
=
5, K
d
=
diag
⁡
(
k
d
,
j
), k
d
,
1
=
2
×
1
0
-
3, k
d
,
2
=
2
×
1
0
-
3, and k
p
,
3
=
5
×
1
0
-
2.Optimal is given by (13), (14) with parameters P
=
diag
⁡
(
1
)
∈
ℜ
3
×
3, Q
=
diag
⁡
(
0.1
)
∈
ℜ
3
×
3, S
0
=
diag
⁡
(
s
,
j
,
o
)
∈
ℜ
3
×
3, s
1
,
o
=
1.2
×
1
0
-
3, s
2
,
o
=
2.5
×
1
0
-
3, and s
3
,
o
=
2.5; S
0 is the initial condition of S.Figures5, 6, and 7 show the trajectory tracking, control function, and output for Optimal and PD techniques applied to the PEM fuel cell, respectively. Table 3 shows the RMSE for the tracking error and control function.Table 3
Results for states and controls.
Methods
RMSE for states
RMSE for controls
Optimal
0.3103
2.3623
PD
0.4804
3.6732Trajectory tracking of the states.
(a)
(b)
(c)Control functions.
(a)
(b)
(c)Figure 7
Outputs.From Figure5, it can be seen that Optimal achieves better accuracy when compared with PD because the signals for the first follow better the reference signals than for the other. From Figures 6 and 7, it can be seen that Optimal is better than PD because the first reaches smaller inputs than the other. From Table 3, it can be observed that Optimal achieves better accuracy when compared with PD because the RMSE is smaller for the first than for the other.


## 5. Conclusion

In this paper, the optimal controller applied to the PEM fuel cell was presented. The simulations showed that the optimal controller achieves better performance when compared with dual proportional-derivative technique for the trajectory tracking and inputs minimization. As a future work, some parameters in the controller will be approximated using the intelligent systems [21–26].



---

*Source: 698250-2014-03-19.xml*