# Wiener structures for modeling and nonlinear predictive control of proton exchange membrane fuel cell

- 392 Downloads

## Abstract

The proton exchange membrane (PEM) fuel cell is a nonlinear dynamic system which cannot be precisely described and controlled using a linear model. This work has two objectives: (a) it discusses model selection for the PEM and (b) it develops two nonlinear computationally efficient model predictive control (MPC) algorithms for the PEM. Three Wiener model types of different orders of dynamics and complexity of the nonlinear steady-state block are compared. The model consisting of three dynamic blocks and a neural network with five hidden nodes is chosen. To obtain simple MPC quadratic optimization problems, a linear approximation of the model or a linear approximation of the predicted trajectory is repeatedly found. The first MPC scheme gives very good control accuracy, whereas the second MPC scheme leads to the same trajectories as those possible in the “ideal” MPC scheme with full online nonlinear optimization.

## Keywords

Proton exchange membrane fuel cell Model predictive control Wiener models Neural networks## 1 Introduction

Currently, the transport sector relies on the combustion engine which uses fossil fuels. Alas, it results in emission of greenhouse gases, which leads to serious environmental problems, i.e., air pollution, global warming, climate changes and destruction of the ozone layer. Zero-emission electric vehicles are available, and their popularity grows. The majority of electric vehicles use batteries for energy storage. An interesting alternative is to use a fuel cell for energy generation. Fuel cells are electrochemical devices that convert chemical energy stored in hydrocarbon fuels (usually hydrogen) directly into electrical energy [1]. They have many important advantages: high electrical efficiency, very low emission and quiet operation. Moreover, since fuel cells do not have moving parts, their life cycle is very long. Fuel cells may be produced in different scales: from microwatts to megawatts, which makes them useful in numerous applications. Lastly, hydrogen necessary for fuel cells may be easily produced from different sources (i.e., biomass, coal or natural gas) so dependence on imported oil may be significantly reduced.

Among existing types of fuel cells [1], the proton exchange membrane (PEM) fuel cells are preferred not only for mobile and vehicle applications, including cars, scooters, bicycles, boats and underwater vessels [2, 3], but also for stationary ones. This is because of low operation temperature (usually between 60 and 80 \(^\circ {\mathrm {C}}\)) which gives a fast start-up, simple and compact design as well as reliable operation. Since solid electrolyte is used, no electrolyte leakage is possible. The PEM fuel cells are considered to be very promising power sources, and they are expected to become sound alternatives to conventional power generation methods.

- 1.
The fully fledged nonlinear MPC (for prediction a nonlinear model is used) which requires solving a nonlinear optimization problem at each sampling instant online [18, 19, 20, 21]. Such an approach may be very computationally demanding, and its practical application may be impossible.

- 2.
The classical MPC algorithm based on a fixed (parameter constant) linear model [22, 23]. In this approach, online calculations in MPC are not demanding (quadratic optimization is used), but the resulting control quality may be not satisfactory because the process is nonlinear and the linear model used in MPC is only a very rough approximation of the process.

- 1.
Two nonlinear MPC algorithms for the PEM fuel cell are described. In contrast to the algorithms presented in [18, 19, 20, 21], in both algorithms computationally simple quadratic optimization is used, and full nonlinear optimization is not necessary. It is possible because a linear approximation of the model or a linear approximation of the predicted trajectory is found online. The discussed algorithms are compared to the MPC scheme with nonlinear optimization in terms of control accuracy and computational time, and inefficiency of the linear MPC scheme is shown.

- 2.
Both described MPC algorithms use Wiener models of the PEM process, and effectiveness of three structures is compared. The choice of the Wiener model, composed of a linear dynamic block connected in series with a nonlinear steady-state one [24], is motivated by two factors. Firstly, the Wiener model is a natural representation of the PEM process. Secondly, the Wiener model is used in a simple way in the described MPC algorithms; the first of them is motivated by the serial structure of the Wiener model.

This paper is structured as follows. Section 2 describes the PEM process and its fundamental model. Next, in Sect. 3 three Wiener structures are characterized. Section 4 details two nonlinear MPC algorithms for the PEM process. Section 5 discusses identification of different types of models and MPC of the PEM process. Section 6 concludes the paper.

## 2 Proton exchange membrane fuel cell

In the general case, the model of the PEM fuel cell is quite complicated [4]. Hence, the tendency is to use simpler model for development of a control system [34, 35, 36, 37, 38, 39].

### 2.1 PEM fuel cell system description

In this work, the PEM fuel cell model introduced in [39] and further discussed in [40, 41, 42] is considered. The PEM process has one manipulated variable (the input of the process) which is the input methanol flow rate *q* (\({\mathrm {mol \ s^{-1}}}\)), one disturbance (the uncontrolled input) *I* which is the external current load (A) and one controlled variable (the output of the process) which is the stack output voltage *V* (V). The partial pressures of hydrogen, oxygen and water are denoted by \(p_{{\mathrm {H}}_{2}}\), \(p_{{\mathrm {O}}_{2}}\) and \(p_{{\mathrm {H}}_{2}{\mathrm {O}}}\), respectively (atm). The input hydrogen flow, the hydrogen reacted flow and the oxygen input flow are denoted by \(q_{{\mathrm {H}}_{2}}^{{\mathrm {in}}}\), \(q_{{\mathrm {H}}_{2}}^{{\mathrm {r}}}\) and \(q_{{\mathrm {O}}_{2}}^{{\mathrm {in}}}\), respectively (\(\mathrm {mol \ s^{-1}}\)).

### 2.2 PEM fuel cell continuous-time fundamental model

*q*is the methane flow rate,

*CV*, \(\tau _1\) and \(\tau _2\) are constants. Hence, from Eqs. (1) and (2), the pressure of hydrogen is

Parameters of the fundamental continuous-time model of the PEM system

Parameter | Value | Unit | Description |
---|---|---|---|

| 0.04777 | \(1 \ {\mathrm {A}}^{-1}\) | Activation voltage constant |

| 0.0136 | \({\mathrm {V}}\) | Activation voltage constant |

| 2 | − | Conversion factor |

\(E_0\) | 0.6 | \({\mathrm {V}}\) | No-load voltage |

| 96485 | \({\mathrm {C}} \ {\mathrm {mol}}^{-1}\) | Faraday’s constant |

\(K_{{{\mathrm {H}}}_2}\) | \(4.22\times 10^{-3} \) | \({\mathrm {mol}} \ {\mathrm {s}}^{-1} \ {\mathrm {atm}}^{-1}\) | Hydrogen valve constant |

\(K_{{{\mathrm {H}}}_2{\mathrm {O}}}\) | \(7.716\times 10^{-3} \) | \({\mathrm {mol}} \ {\mathrm {s}}^{-1} \ {\mathrm {atm}}^{-1}\) | Water time constant |

\(K_{{\mathrm {r}}}=N_0/4F_0\) | \(2.2802\times 10^{-3}\) | \({\mathrm {mol}} \ {\mathrm {s}}^{-1} \ {\mathrm {A}}^{-1}\) | Constant |

\(K_{{{\mathrm {O}}}_2}\) | \(2.11\times 10^{-2} \) | \({\mathrm {mol}} \ {\mathrm {s}}^{-1} \ {\mathrm {atm}}^{-1}\) | Oxygen time constant |

\(N_0\) | 88 | − | Number of cells |

\(R_0\) | 8.314 | \({\mathrm {J}} \ {\mathrm {mol}}^{-1} \ {\mathrm {K}}^{-1}\) | Universal gas constant |

\(R^{{{\mathrm {int}}}}\) | 0.00303 | \(\Omega \) | Internal resistance |

\(T_0\) | 343 | K | Absolute temperature |

\(\tau _1=\tau _1\) | 2 | \({\mathrm {s}}\) | Reformer time constants |

\(\tau _{{{\mathrm {H}}}_2}\) | 3.37 | \({\mathrm {s}}\) | Hydrogen time constant |

\(\tau _{{{\mathrm {H}}}-{{\mathrm {O}}}}\) | 1.168 | − | Hydrogen–oxygen flow ratio |

\(\tau _{{{\mathrm {H}}}_2{\mathrm {O}}}\) | 18.418 | \({\mathrm {s}}\) | Water time constant |

\(\tau _{{{\mathrm {O}}}_2}\) | 6.74 | \({\mathrm {s}}\) | Oxygen time constant |

*B*and

*C*are constants. The ohmic losses are

Values of process variables for the initial operating point

Variable | Value | Unit |
---|---|---|

| 100 | \({\mathrm {A}}\) |

| 0.5 | \({\mathrm {mol \ s^{-1}}}\) |

\(p_{{\mathrm {H}}_{2}}\) | 5.9102 | \({\mathrm {atm}}\) |

\(p_{{\mathrm {O}}_{2}}\) | 39.4959 | \({\mathrm {atm}}\) |

\(p_{{\mathrm {H}}_{2}{\mathrm {O}}}\) | 22.6160 | \({\mathrm {atm}}\) |

| 56.6179 | \({\mathrm {V}}\) |

## 3 Wiener models of PEM fuel cell

It can be noted that the continuous-time fundamental model of the discussed PEM fuel cell is characterized by linear dynamic transfer functions (Eqs. 3, 6, 9), but the stack voltage is defined by the nonlinear steady-state Nernst’s equation (11). This means that the outputs of the linear dynamic part of the model are inputs of the nonlinear steady-state one. Hence, it is straightforward to use the Wiener structure as an empirical model of the considered PEM fuel cell.

*q*, the disturbance,

*I*, and the output,

*V*, are scaled

### 3.1 Wiener model: structure A

*u*,

*h*) and one output,

*v*, which is an auxiliary variable. The linear block is characterized by the equation

*v*(

*k*) depends directly on the signal

*h*(

*k*) since the current,

*I*, has an immediate impact on the voltage,

*V*. The output signal of the linear dynamic block is taken as the input of the steady-state one. The nonlinear steady-state part of the model is described by the general equation

*K*units and one output is used [25]. The model output is

*y*(

*k*) denote the model output and the training data, respectively, \(n_{{\mathrm {samples}}}\) denotes the number of data samples. Since the model is nonlinear, optimization of the model parameters is a nonlinear optimization task which is solved off-line. For this purpose, the sequential quadratic programming (SQP) algorithm is used [43], which makes it possible to take into account constraints during optimization. To enforce stability of the Wiener model, the poles of linear dynamic block are optimized subject to stability constraints. (All poles must belong to the unit circle.) Next, from the optimized poles the model coefficients \(a_i\) (Eq. 17) are calculated. The values of \(b_i^j\), \(w_{l,m}^{1}\) and \(w_{l}^{2}\) are directly calculated (optimized) with no constraints.

### 3.2 Wiener model: structure B

*h*(

*k*) since the current,

*I*, has an immediate impact on the voltage,

*V*. The nonlinear steady-state block is described by the general equation

*K*units and one output is used. The model output is

### 3.3 Wiener model: structure C

*h*, measured at the current sampling instant,

*k*. The nonlinear steady-state block is described by the general equation

*K*units and one output is used. The model output is

## 4 Nonlinear model predictive control algorithms of PEM fuel cell

### 4.1 MPC problem formulation

MPC is an advanced control technique in which a dynamic model is used repeatedly online to predict the future behavior of the controlled process and an optimization procedure finds the best possible control policy [15, 16, 17]. The MPC approach has important advantages: It offers good control quality and takes into account all existing constraints imposed on process variables. As a result, MPC algorithms have been applied to numerous technological processes, mainly in industrial process control [44], e.g., chemical reactors [45], but also for control: computer networks [46], unmanned vehicles [28], antilock brake systems in automobiles [47], unmanned helicopters [27], tractor–trailer vehicles [48], overhead cranes [49], underwater vehicles [50], active steering systems in cars [29] and even chaotic systems [51].

*u*denote the scaled input (manipulated) variable of the process and

*y*denote the scaled output (controlled) variable (Eq. 16). In MPC algorithms [15, 16, 17] at each consecutive sampling instant

*k*, a future control policy for a control horizon, \(N_{{\mathrm {u}}}\), is calculated. Typically, increments of the manipulated variable are found

*N*

*N*are: \(\varvec{y}^{\min }=\left[ y^{\min }\ldots y^{\min }\right] ^{{\mathrm {T}}}\), \(\varvec{y}^{\max }=\left[ y^{\max }\ldots y^{\max }\right] ^{{\mathrm {T}}}\). The matrix \(\varvec{\Lambda }={\mathrm {diag}}(\lambda ,\ldots ,\lambda )\) and the lower ones matrix \(\varvec{J}\) (its diagonal and below diagonal entries are equal to 1, and the entries over the diagonal are equal to 0) are of dimensionality \(N_{{\mathrm {u}}}\times N_{{\mathrm {u}}}\).

The Wiener models of the PEM fuel cell are nonlinear, so the predicted values of the controlled variable are nonlinear functions of the currently calculated sequence of increments of the manipulated variable, Eq. (30). Hence, the general MPC optimization problem (32) becomes a nonlinear task which must be solved at each sampling instant online. To reduce the computational complexity, two alternatives are discussed in the following part of the article.

### 4.2 Nonlinear MPC algorithm with nonlinear prediction and simplified model linearization (MPC-NPSL)

In the first approach regarding computationally efficient MPC of the PEM fuel cell, a linear approximation of the Wiener model is successively calculated online at each sampling instant *k* and next used for finding the predicted trajectory of the process output [26]. The model is linearized for the current operating conditions. During linearization, the serial structure of the Wiener model is used. Although all three model types may be used, the MPC-NPSL algorithm for the most complex Wiener structure C shown in Fig. 3 is detailed. The algorithm for structures A and B may be easily derived from the given description.

*y*channels (\(i=1,2,3\)) of the nonlinear block can be obtained as

*N*)

*u*, influences only the first two intermediate model variables, \(v_1\) and \(v_2\). Hence, only the channels \(u-v_1-y\) and \(u-v_2-y\) are considered in the forced trajectory. The constant matrices of dimensionality \(N\times N_{{\mathrm {u}}}\)

*h*.

*d*(

*k*), used in the free trajectory (Eq. 42), is calculated as difference between the value of the output signal measured at the current sampling instant,

*y*(

*k*), and process output estimated from the model. Using Eq. (29), one obtains

### 4.3 Nonlinear MPC algorithm with nonlinear prediction and linearization along the trajectory(MPC-NPLT)

In the second approach to computationally efficient MPC of the PEM fuel cell, a linear approximation of the predicted trajectory of the process output is directly calculated online, at each sampling instant *k* [26]. It should be noted that in the MPC-NPSL algorithm a linear approximation of the model is successively found online and next used for calculation of the predicted trajectory of the controlled variable. This approach uses a constant linearized model over the whole prediction horizon, which is a disadvantage.

*p*and

*r*.

## 5 Simulation results

### 5.1 Model identification of PEM fuel cell

The objective of this subsection is to find precise black box models of the PEM fuel cell. A linear model and three discussed Wiener structures (A, B and C) are considered. All models are assessed in terms of the SSE error (Eq. 20) and the number of model parameters. During model identification two data sets are used: the training data set and the validation one. The first of them is used only to find parameters of models, whereas the second one is used only to assess generalization ability of models, i.e., how the model reacts when it is excited by a different data set than that used for identification. To obtain those two sets of data, the continuous-time fundamental model of the PEM process (defined by Eqs. 2, 3, 6, 8–13) is simulated. The model system of differential equations is solved by Runge–Kutta method of order 45. As the process input and disturbance signals random sequences from the range characterized by Eqs. (14) and (15) are used. The process signals (i.e., the manipulated variable, *q*, the disturbance, *I*, and the controlled variable, *V*) are sampled with the sampling period equal to 1 s. The training and validation data sets are shown in Fig. 4, both sets consist of 3000 samples of the process manipulated variable, the disturbance and the output. Since identification of nonlinear Wiener models is a nonlinear optimization problem, training is repeated as many as 10 times for each model configuration and the results presented next are the best obtained.

Training error, \(E_{{\mathrm {train}}}\), and the validation error, \(E_{{\mathrm {val}}}\), for the linear model; the errors of the chosen model are emphasized

Model order | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) |
---|---|---|

First order | \(1.4509\times 10^{3}\) | \(8.1537\times 10^{2}\) |

Second order | \(1.4482\times 10^{3}\) | \(8.4352\times 10^{2}\) |

Third order | \(\mathbf 1.0560\times 10^{3}\) | \(\mathbf 5.4921\times 10^{2}\) |

Fourth order | \(9.5139\times 10^{2}\) | \(4.9939\times 10^{2}\) |

Training error, \(E_{{\mathrm {train}}}\), and the validation error, \(E_{{\mathrm {val}}}\), for structure A of the Wiener model; *K* is the number of hidden nodes of the neural steady-state block; the errors of the chosen model are emphasized

| First order | Second order | Third order | Fourth order | ||||
---|---|---|---|---|---|---|---|---|

\(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | |

1 | \(6.6838\times 10^{2}\) | \(4.5577\times 10^{2}\) | \(5.0341\times 10^{2}\) | \(4.2012\times 10^{2}\) | \(6.6000\times 10^{2}\) | \(4.5332\times 10^{2}\) | \(5.4235\times 10^{2}\) | \(4.6676\times 10^{2}\) |

5 | \(5.1987\times 10^{2}\) | \(3.9975\times 10^{2}\) | \(4.4502\times 10^{2}\) | \(4.2231\times 10^{2}\) | \(\mathbf 3.9532\times 10^{2}\) | \(\mathbf 4.0533\times 10^{2}\) | \(4.0093\times 10^{2}\) | \(3.9105\times 10^{2}\) |

10 | \(5.3683\times 10^{2}\) | \(3.9015\times 10^{2}\) | \(4.6211\times 10^{2}\) | \(4.2378\times 10^{2}\) | \(4.0344\times 10^{2}\) | \(4.0245\times 10^{2}\) | \(3.8761\times 10^{2}\) | \(3.9924\times 10^{2}\) |

15 | \(4.9882\times 10^{1}\) | \(4.0700\times 10^{2}\) | \(4.3372\times 10^{2}\) | \(4.2657\times 10^{2}\) | \(3.7396\times 10^{2}\) | \(3.8778\times 10^{2}\) | \(5.2775\times 10^{2}\) | \(3.5779\times 10^{2}\) |

20 | \(5.0761\times 10^{2}\) | \(3.9746\times 10^{2}\) | \(4.7123\times 10^{2}\) | \(3.9891\times 10^{2}\) | \(4.6384\times 10^{2}\) | \(3.9448\times 10^{2}\) | \(3.7140\times 10^{2}\) | \(3.7399\times 10^{2}\) |

Training error, \(E_{{\mathrm {train}}}\), and the validation error, \(E_{{\mathrm {val}}}\), for structure B of the Wiener model; *K* is the number of hidden nodes of the neural steady-state block; the errors of the chosen model are emphasized

| First order | Second order | Third order | Fourth order | ||||
---|---|---|---|---|---|---|---|---|

\(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | |

1 | \(5.8138\times 10^{2}\) | \(4.8800\times 10^{2}\) | \(5.4311\times 10^{2}\) | \(4.6994\times 10^{2}\) | \(5.4305\times 10^{2}\) | \(4.7308\times 10^{2}\) | \(5.4290\times 10^{2}\) | \(4.7271\times 10^{2}\) |

5 | \(9.7195\times 10^{1}\) | \(7.5512\times 10^{1}\) | \(1.2616\times 10^{1}\) | \(1.1287\times 10^{1}\) | \(\mathbf 1.1623\times 10^{1}\) | \(\mathbf 1.1491\times 10^{1}\) | \(1.1399\times 10^{1}\) | \(1.0650\times 10^{1}\) |

10 | \(9.6519\times 10^{1}\) | \(7.5056\times 10^{1}\) | \(1.4029\times 10^{1}\) | \(1.2614\times 10^{1}\) | \(1.0858\times 10^{1}\) | \(1.0808\times 10^{1}\) | \(9.7289\times 10^{0}\) | \(1.0733\times 10^{1}\) |

15 | \(8.8093\times 10^{1}\) | \(8.7314\times 10^{1}\) | \(1.0710\times 10^{1}\) | \(1.1261\times 10^{1}\) | \(1.1962\times 10^{1}\) | \(1.1709\times 10^{1}\) | \(1.0402\times 10^{1}\) | \(1.0221\times 10^{1}\) |

20 | \(8.6768\times 10^{1}\) | \(9.1449\times 10^{1}\) | \(1.3866\times 10^{1}\) | \(1.2104\times 10^{1}\) | \(1.1185\times 10^{1}\) | \(1.1996\times 10^{1}\) | \(9.1614\times 10^{0}\) | \(1.0818\times 10^{1}\) |

Training error, \(E_{{\mathrm {train}}}\), and the validation error, \(E_{{\mathrm {val}}}\), for structure C of the Wiener model; *K* is the number of hidden nodes of the neural steady-state block; the errors of the chosen model are emphasized

| First order | Second order | Third order | Fourth order | ||||
---|---|---|---|---|---|---|---|---|

\(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | \(E_{{\mathrm {train}}}\) | \(E_{{\mathrm {val}}}\) | |

1 | \(6.8804\times 10^{2}\) | \(4.8451\times 10^{2}\) | \(5.4451\times 10^{2}\) | \(4.6874\times 10^{2}\) | \(5.4365\times 10^{2}\) | \(4.5806\times 10^{2}\) | \(5.8198\times 10^{2}\) | \(4.7912\times 10^{2}\) |

2 | \(2.8987\times 10^{2}\) | \(1.7401\times 10^{2}\) | \(6.2320\times 10^{1}\) | \(4.6059\times 10^{1}\) | \(5.1074\times 10^{1}\) | \(4.0937\times 10^{1}\) | \(5.5591\times 10^{1}\) | \(4.2298\times 10^{1}\) |

3 | \(2.7854\times 10^{2}\) | \(1.4884\times 10^{2}\) | \(2.1169\times 10^{1}\) | \(1.0964\times 10^{1}\) | \(6.3563\times 10^{0}\) | \(5.2184\times 10^{0}\) | \(6.4498\times 10^{0}\) | \(5.2912\times 10^{0}\) |

4 | \(2.9195\times 10^{2}\) | \(1.4232\times 10^{2}\) | \(1.7371\times 10^{1}\) | \(7.9965\times 10^{0}\) | \(1.7434\times 10^{0}\) | \(1.8839\times 10^{0}\) | \(1.7913\times 10^{0}\) | \(1.8252\times 10^{0}\) |

5 | \(2.9557\times 10^{2}\) | \(1.4212\times 10^{2}\) | \(1.6731\times 10^{1}\) | \(7.1024\times 10^{0}\) | \(\mathbf 7.0345\times 10^{-1}\) | \(\mathbf 1.0348\times 10^{0}\) | \(7.0913\times 10^{-1}\) | \(1.1003\times 10^{0}\) |

6 | \(2.9577\times 10^{2}\) | \(1.4142\times 10^{2}\) | \(1.6480\times 10^{1}\) | \(6.9003\times 10^{0}\) | \(2.3153\times 10^{-1}\) | \(2.7509\times 10^{-1}\) | \(2.2592\times 10^{-1}\) | \(2.6913\times 10^{-1}\) |

7 | \(2.9541\times 10^{2}\) | \(1.4120\times 10^{2}\) | \(1.6201\times 10^{1}\) | \(6.4680\times 10^{0}\) | \(1.1082\times 10^{-1}\) | \(1.7223\times 10^{-1}\) | \(1.2672\times 10^{-1}\) | \(1.7559\times 10^{-1}\) |

8 | \(3.0817\times 10^{2}\) | \(1.4282\times 10^{2}\) | \(1.6223\times 10^{1}\) | \(6.6127\times 10^{0}\) | \(7.9624\times 10^{-2}\) | \(1.5681\times 10^{-1}\) | \(8.0613\times 10^{-2}\) | \(1.6129\times 10^{-1}\) |

9 | \(3.2279\times 10^{2}\) | \(1.4431\times 10^{2}\) | \(1.6425\times 10^{1}\) | \(6.3947\times 10^{0}\) | \(6.5134\times 10^{-2}\) | \(1.1477\times 10^{-1}\) | \(6.5002\times 10^{-2}\) | \(1.1701\times 10^{-1}\) |

10 | \(3.2980\times 10^{2}\) | \(1.4455\times 10^{2}\) | \(1.6866\times 10^{1}\) | \(6.4134\times 10^{0}\) | \(1.2087\times 10^{-2}\) | \(2.1544\times 10^{-2}\) | \(1.1920\times 10^{-2}\) | \(2.1791\times 10^{-2}\) |

15 | \(3.2881\times 10^{2}\) | \(1.4465\times 10^{2}\) | \(1.6962\times 10^{1}\) | \(6.5556\times 10^{0}\) | \(2.2084\times 10^{-3}\) | \(1.5153\times 10^{-2}\) | \(2.2302\times 10^{-3}\) | \(1.5902\times 10^{-2}\) |

20 | \(3.2618\times 10^{2}\) | \(1.4466\times 10^{2}\) | \(1.7744\times 10^{1}\) | \(7.1142\times 10^{0}\) | \(1.6085\times 10^{-3}\) | \(1.1335\times 10^{-2}\) | \(1.6482\times 10^{-3}\) | \(1.1742\times 10^{-2}\) |

Next, Wiener structure A is considered. Table 4 presents training and validation errors for models of different orders (the order is defined as an integer number \(n_{\mathrm {B}}^1=n_{\mathrm {B}}^2=n_{\mathrm {A}}\)) and different numbers of hidden nodes, *K*. All compared models are of very low quality, only slightly better than the linear models (Table 3). Model complexity (defined by the order of dynamics and the number of hidden nodes) has practically no influence on model accuracy. For further comparison, the third-order model containing five hidden nodes is chosen. The top part of Fig. 6 compares the validation data set versus the output of Wiener model A. Slightly better results in comparison with the linear structure (Fig. 5) can be obtained, but still significant differences between model output and data are present.

The training and validation errors of Wiener structure B are given in Table 5 for models of different orders (the order is defined as an integer number \(n_{\mathrm {B}}^1=n_{\mathrm {B}}^2=n_{\mathrm {A}}^1=n_{\mathrm {A}}^2\)) and different numbers of hidden nodes, *K*. In comparison with the linear model (Table 3) and Wiener structure A (Table 4), Wiener structure B has significantly lower errors. For further comparisons, the third-order model containing five hidden nodes is chosen. The middle part of Fig. 6 compares the validation data set versus the output of Wiener model B. Unlike structure A, the model output signal is similar to that of the validation data, the differences are small.

Finally, Wiener structure C is considered. Training and validation errors of the model are given in Table 6 for models of different orders (where the order is defined as an integer number \(n_{\mathrm {B}}^{ij}=n_{\mathrm {A}}^i=n_{\mathrm {B}}^{3}=n_{\mathrm {A}}^{3}\) for \(i=1,2\), \(j=1,2\)) and different numbers of hidden nodes, *K*. In comparison with Wiener structures A and B (Tables 4, 5), structure C has significantly lower errors. Furthermore, there is a direct influence of the number of hidden nodes on model accuracy (the more hidden nodes, the lower the errors). It is interesting to notice that the third-order models are characterized by very similar errors as the fourth-order ones, whereas the first- and second-order structures are significantly worse. As a compromise between accuracy and complexity the third-order model containing five hidden nodes is chosen. The bottom part of Fig. 6 compares the validation data set versus the output of Wiener model C. It can be checked that in this case it is practically impossible to seen any differences between the validation data and the model output (which are present in the case of structures A and B).

### 5.2 Model predictive control of PEM fuel cell

- 1.
The classical generalized predictive control (GPC) MPC algorithm [52]. The third-order linear model is used for prediction.

- 2.
The fully fledged MPC-NO algorithm with nonlinear optimization repeated at each sampling instant. The Wiener models (A, B and C) are used for prediction.

- 3.
The computationally efficient MPC schemes: the MPC-NPSL algorithm with simplified linearization and the MPC-NPLT one with trajectory linearization. Wiener model C is used in both MPC approaches. Both algorithms need solving online a quadratic optimization problem at each sampling instant.

*V*, is close to the constant set point \(V^{{\mathrm {sp}}}=\bar{V}\) irrespective of the changes of the disturbance,

*I*. The scenario of disturbance changes is

At first, the GPC algorithm based on the linear model is considered. Simulation results for different values of the penalty factor \(\lambda \) are depicted in Fig. 8. Unfortunately, for the smallest value of that coefficient, i.e., for \(\lambda =1\), there are very strong oscillations of the process input and output variables. When the penalty coefficient is increased, for \(\lambda =25\) and \(\lambda =50\), the oscillations are damped, but the trajectory of the process output is slow. When \(\lambda =100\), no oscillations combined with a long rise time are observed. It means that the GPC algorithm is unable to compensate fast for changes of the disturbance.

Due to the underlying linear model, the GPC algorithm gives poor control results when applied for prediction. It seems to be straightforward to consider a nonlinear model in MPC. At first, Wiener structure A is used in the fully fledged MPC-NO algorithm. Although the MPC-NO algorithm is computationally too demanding to be used in practice, in simulations it shows whether or not the model may be used for long-range prediction in MPC. Figure 9 depicts simulation results of the MPC-NO algorithm based on Wiener model A for different values of the penalty factor \(\lambda \). (The same values are used as in the case of the GPC algorithm.) Since Wiener model A is imprecise (Table 4 and Fig. 6), the obtained control quality is poor. For the smallest value \(\lambda =1\), there are some damped oscillations which may be eliminated when the penalty coefficient is increased. Unfortunately, it results in very slow trajectories, as those in the case of the GPC strategy. One may conclude that Wiener model A is not precise enough to be used in MPC.

Taking into account simulation results presented in Figs. 8, 9 and 10, it can be concluded that Wiener model C results in strongly improved control quality when used in the MPC-NO algorithm. It should be noted that the MPC-NO algorithm requires solving a nonlinear optimization problem at each sampling instant online. In order to reduce computational complexity, two alternatives are considered: the MPC-NPLT algorithm with trajectory linearization and the MPC-NPSL algorithm with simplified linearization. Both algorithms result in quadratic optimization problems; nonlinear optimization is not necessary. Figure 11 compares trajectories of the MPC-NO algorithm with those obtained in the MPC-NPLT and MPC-NPSL strategies. Two observations may be discussed. Firstly, the MPC-NPLT algorithm with trajectory linearization gives practically the same process trajectories as the “ideal” MPC-NO strategy; it is impossible to see any differences. It is a beneficial feature of the MPC-NPLT algorithm, since it is significantly less computationally demanding, but leads to the same control performance as the MPC-NO strategy. Secondly, the MPC-NPSL algorithm is stable, and it only gives slightly larger overshoot than the MPC-NO and MPC-NPLT algorithms. It should be noted that the MPC-NPSL algorithm uses for prediction a linear approximation of the model which is obtained in a simple way, and quite complicated trajectory linearization is not necessary.

Figure 12 depicts simulation results of the three compared nonlinear MPC algorithms based on Wiener model C (MPC-NO, MPC-NPLT and MPC-NPSL), but now the increments of the manipulated variable are constrained, \(\triangle u^{\max }=0.1\). Due to the additional constraints, the manipulated variable does not change as quickly as in Fig. 11, but the trajectories of the process output are slower. In this case, the observations of algorithms’ performance are the same as before, i.e., the MPC-NPLT algorithm gives the trajectories practically the same as the MPC-NO one, whereas the MPC-NPSL algorithm gives only slightly larger overshoot.

*V*(

*k*), for the whole simulation horizon. The second one

*V*(

*k*). The obtained numerical values of the performance indices \(E_1\) and \(E_2\) are given in Table 7. In general, the values of \(E_1\) for the MPC-NO and MPC-NPLT algorithms are the same, which indicates that the measure \(E_2\) for the MPC-NPLT algorithm is low, close to 0. When the MPC-NO algorithm is compared with the MPC-NPSL one, there are much noticeable differences, but still leading to control accuracy very similar to that possible when the MPC-NO and MPC-NPLT strategies are used. Two cases are considered (corresponding to Figs. 11, 12): when the rate of change of the manipulated variable is constrained or not. When the rate constraints are present, all trajectories (of the process input and output) are slower. Table 7 additionally specifies calculation time (scaled) of the MPC algorithms. Two general observations may be made. Firstly, the MPC-NPSL and MPC-NPLT algorithms are many times computationally efficient in comparison with the MPC-NO one. The MPC-NPSL scheme is somehow less demanding than the MPC-NPLT one, but this difference is not big since computational complexity is mostly influenced by the quadratic optimization subroutine. Secondly, introduction of the additional constraints imposed on the rate of change of the manipulated variable “helps” the optimization routine to slightly faster find the solution.

Comparison of control performance criteria, \(E_1\) and \(E_2\), as well as calculation time for MPC-NPSL, MPC-NPLT and MPC-NO algorithms based on Wiener model *C*; \(\lambda =1\)

Algorithm | \(\triangle u^{\max }\) | \(E_1\) | \(E_2\) | Calculation time (%) |
---|---|---|---|---|

MPC-NPSL | No | \(1.6561 \times 10^{0}\) | \(2.8791 \times 10^{-2}\) | 7.84 |

MPC-NPLT | No | \(1.5779 \times 10^{0}\) | \(2.6979 \times 10^{-10}\) | 9.13 |

MPC-NO | No | \(1.5779 \times 10^{0}\) | 0 | 100.00 |

MPC-NPSL | Yes | \(2.7934 \times 10^{0}\) | \(2.5633 \times 10^{-2}\) | 7.36 |

MPC-NPLT | Yes | \(2.6894 \times 10^{0}\) | \(6.7151 \times 10^{-11}\) | 8.44 |

MPC-NO | Yes | \(2.6894 \times 10^{0}\) | 0 | 97.89 |

## 6 Conclusions

The PEM fuel cell is a nonlinear dynamic system. A linear model cannot describe process behavior precisely. Moreover, when such a model is used in MPC, obtained control accuracy is not acceptable.

In this work, effectiveness of three Wiener models of the PEM fuel cell is discussed. In all models, the nonlinear steady-state block is represented by a neural network, whereas the linear dynamic part is different. The model consisting of three dynamic blocks and a neural network with five hidden nodes is chosen for control.

The second contribution of this work is the development of two computationally efficient MPC algorithms for the PEM process. In both MPC algorithms, computationally not complicated quadratic optimization is used online, and nonlinear optimization is not necessary. In the first MPC algorithm, a time-varying linear approximation of the model is used for prediction, whereas in the second one a linear approximation of the predicted process trajectory is calculated repeatedly online. The MPC-NPSL algorithm with online simple model linearization gives very good results, very similar to those possible in the complex algorithm using trajectory linearization and computationally demanding MPC with online nonlinear optimization. It is important to note the fact that model linearization in MPC is performed online in a simple way, which is possible because of the specialized serial structure of the Wiener model. Moreover, as a nonlinear block a neural network is used which leads to good approximation accuracy and easiness of model utilization in MPC. The MPC-NPLT algorithm with trajectory linearization gives practically the same control accuracy as that possible in the MPC-NO approach with nonlinear optimization, but requires more demanding calculations. (Trajectory linearization is more demanding than model linearization.)

Although the Wiener models and the MPC algorithms are developed for a particular type of the PEM, one may consider alternative ones, e.g., [4, 34, 35, 36, 37, 38]. The described MPC algorithms may be used in complex power management optimization systems for the PEM fuel cell [53].

## Notes

### Compliance with ethical standards

### Conflict of interest

The authors declare that they have no conflict of interest.

## References

- 1.Larminie, J., Dicks, A.: Fuel Cell Systems Explained. Wiley, Hoboken (2000)Google Scholar
- 2.Barbir, F.: PEM Fuel Cells: Theory and Practice. Academic Press, London (2013)Google Scholar
- 3.Özbek, M.: Modeling, Simulation, and Concept Studies of a Fuel Cell Hybrid Electric Vehicle Powertrain. Ph.D. Thesis, University of Duisburg-Essen, Duisburg (2010)Google Scholar
- 4.Pukrushpan, J.T., Stefanopoulou, A.G., Peng, H.: Control of Fuel Cell Power Systems: Principles, Modeling. Analysis and Feedback Design. Springer, London (2004)CrossRefzbMATHGoogle Scholar
- 5.Kunusch, C., Puleston, P., Mayosky, M.: Sliding-Mode Control of PEM Fuel Cells. Springer, London (2012)CrossRefGoogle Scholar
- 6.Baroud, Z., Benmiloud, M., Benalia, A., Ocampo-Martinez, C.: Novel hybrid fuzzy-PID control scheme for air supply in PEM fuel-cell-based systems. Int. J. Hydrogen Energy
**42**, 10435–10447 (2017)CrossRefGoogle Scholar - 7.Ou, K., Wang, Y.-X., Li, Z.-Z., Shen, Y.-D., Xuan, D.-J.: Feedforward fuzzy-PID control for air flow regulation of PEM fuel cell system. Int. J. Hydrogen Energy
**40**, 11686–11695 (2015)CrossRefGoogle Scholar - 8.Damoura, C., Benne, M., Lebreton, C., Deseure, J., Grondin-Perez, B.: Real-time implementation of a neural model-based self-tuning PID strategy for oxygen stoichiometry control in PEM fuel cell. Int. J. Hydrogen Energy
**39**, 12819–12825 (2014)CrossRefGoogle Scholar - 9.Beirami, H., Shabestari, A.Z., Zerafat, M.M.: Optimal PID plus fuzzy controller design for a PEM fuel cell air feed system using the self-adaptive differential evolution algorithm. Int. J. Hydrogen Energy
**40**, 9422–9434 (2015)CrossRefGoogle Scholar - 10.Hong, L., Chen, J., Liu, Z., Huang, L., Wu, Z.: A nonlinear control strategy for fuel delivery in PEM fuel cells considering nitrogen permeation. Int. J. Hydrogen Energy
**42**, 1565–1576 (2017)CrossRefGoogle Scholar - 11.Meidanshahi, V., Karimi, G.: Dynamic modeling, optimization and control of power density in a PEM fuel cell. Appl. Energy
**93**, 98–105 (2012)CrossRefGoogle Scholar - 12.Özbek, M., Wang, S., Marx, M., Söffker, D.: Modeling and control of a PEM fuel cell system: a practical study based on experimental defined component behavior. J. Process Control
**23**, 282–293 (2013)CrossRefGoogle Scholar - 13.Shahiri, M., Ranjbar, A., Karami, M.R., Ghaderi, R.: New tuning design schemes of fractional complex-order PI controller. Nonlinear Dyn.
**84**, 1813–1835 (2016)MathSciNetCrossRefzbMATHGoogle Scholar - 14.Shahiri, M., Ranjbar, A., Karami, M.R., Ghaderi, R.: Robust control of nonlinear PEMFC against uncertainty using fractional complex order control. Nonlinear Dyn.
**80**, 1785–1800 (2015)CrossRefGoogle Scholar - 15.Camacho, E.F., Bordons, C.: Model Predictive Control. Springer, London (1999)CrossRefzbMATHGoogle Scholar
- 16.Maciejowski, J.M.: Predictive Control with Constraints. Prentice Hall, Englewood Cliffs (2002)zbMATHGoogle Scholar
- 17.Tatjewski, P.: Advanced Control of Industrial Processes, Structures and Algorithms. Springer, London (2007)zbMATHGoogle Scholar
- 18.Hähnel, C., Aul, V., Horn, J.: Power control for efficient operation of a PEM fuel cell system by nonlinear model predictive control. IFAC-PapersOnLine
**48**, 174–179 (2015)CrossRefGoogle Scholar - 19.Rosanas-Boeta, N., Ocampo-Martinez, C., Kunusch, C.: On the anode pressure and humidity regulation in PEM fuel cells: a nonlinear predictive control approach. IFAC-PapersOnLine
**48**, 434–439 (2015)CrossRefGoogle Scholar - 20.Schultze, M., Horn, J.: Modeling, state estimation and nonlinear model predictive control of cathode exhaust gas mass flow for PEM fuel cells. Control Eng. Pract.
**43**, 76–86 (2016)CrossRefGoogle Scholar - 21.Ziogou, C., Papadopoulou, S., Georgiadis, M.C., Voutetakis, S.: On-line nonlinear model predictive control of a PEM fuel cell system. J. Process Control
**23**, 483–492 (2013)CrossRefGoogle Scholar - 22.Barzegari, M.M., Alizadeh, E., Pahnabi, A.H.: Grey-box modeling and model predictive control for cascade-type PEMFC. Energy
**127**, 611–622 (2017)CrossRefGoogle Scholar - 23.Panos, C., Kouramas, K.I., Georgiadis, M.C., Pistikopoulos, E.N.: Modelling and explicit model predictive control for PEM fuel cell systems. Chem. Eng. Sci.
**67**, 15–25 (2012)CrossRefGoogle Scholar - 24.Janczak, A.: Identification of Nonlinear Systems Using Neural Networks and Polynomial Models. A Block-Oriented Approach. Lecture Notes in Control and Information Sciences, vol. 310. Springer, Berlin (2004)zbMATHGoogle Scholar
- 25.Haykin, S.: Neural Networks-A Comprehensive Foundation. Prentice Hall, Upper Saddle River (2008)zbMATHGoogle Scholar
- 26.Ławryńczuk, M.: Computationally Efficient Model Predictive Control Algorithms: A Neural Network Approach. Studies in Systems, Decision and Control, vol. 3. Springer, Cham (2014)zbMATHGoogle Scholar
- 27.Zhu, B.: Nonlinear adaptive neural network control for a model-scaled unmanned helicopter. Nonlinear Dyn.
**78**, 1695–1708 (2014)MathSciNetCrossRefzbMATHGoogle Scholar - 28.Guo, J., Luo, Y., Li, K.: Adaptive neural-network sliding mode cascade architecture of longitudinal tracking control for unmanned vehicles. Nonlinear Dyn.
**87**, 2497–2510 (2017)CrossRefzbMATHGoogle Scholar - 29.Eski, İ., Temürlenk, A.: Design of neural network-based control systems for active steering system. Nonlinear Dyn.
**73**, 1443–1454 (2013)MathSciNetCrossRefGoogle Scholar - 30.Chen, D., Zhang, Y., Li, S.: Tracking control of robot manipulators with unknown models: a Jacobian-matrix-adaption method. IEEE Trans. Ind. Inform.
**14**, 3044–3053 (2018)CrossRefGoogle Scholar - 31.Chen, D., Zhang, Y.: Robust zeroing neural-dynamics and its time-varying disturbances suppression model applied to mobile robot manipulators. IEEE Trans. Neural Netw. Learing Syst.
**29**, 4385–4397 (2018)CrossRefGoogle Scholar - 32.Zhang, Y., Chen, K., Tan, H.-Z.: Performance analysis of gradient neural network exploited for online time-varying matrix inversion. IEEE Trans. Autom. Control
**54**, 1940–1945 (2009)MathSciNetCrossRefzbMATHGoogle Scholar - 33.Yan, Z., Wang, J.: Nonlinear model predictive control based on collective neurodynamic optimization. IEEE Trans. Neural Netw. Learing Syst.
**26**, 840–850 (2015)MathSciNetCrossRefGoogle Scholar - 34.Benchouia, N.E., Derghal, A., Mahmah, B., Madi, B., Khochemane, L., Aoul, L.H.: An adaptive fuzzy logic controller (AFLC) for PEMFC fuel cell. Int. J. Hydrog. Energy
**40**, 13806–13819 (2015)CrossRefGoogle Scholar - 35.Barzegari, M.M., Dardel, M., Alizadeh, E., Ramiar, A.: Reduced-order model of cascade-type PEM fuel cell stack with integrated humidifiers and water separators. Energy
**113**, 683–692 (2016)CrossRefGoogle Scholar - 36.Hatziadoniu, C.J., Lobo, A.A., Pourboghrat, F., Daneshdoost, M.: A simplified dynamic model of grid-connected fuel-cell generators. IEEE Trans. Power Deliv.
**17**, 467–473 (2002)CrossRefGoogle Scholar - 37.Suh, K.W.: Modeling, Analysis and control of fuel cell hybrid power systems. Ph.D. Thesis, University of Michigan, Ann Arbor (2016)Google Scholar
- 38.Talj, R.J., Hissel, D., Ortega, R., Becherif, M., Hilairet, M.: Experimental validation of a PEM fuel-cell reduced-order model and a moto-compressor higher order sliding-mode control. IEEE Trans. Ind. Electron.
**57**, 1906–1913 (2010)CrossRefGoogle Scholar - 39.Uzunoglu, M., Alam, M.S.: Dynamic modeling, design and simulation of a combined PEM fuel cell and ultracapacitor system for stand-alone residential applications. IEEE Trans. Energy Conv.
**21**, 767–775 (2006)CrossRefGoogle Scholar - 40.Uzunoglu, M., Alam, M.S.: Dynamic modeling, design and simulation of a PEM fuel cell/ultra-capacitor hybrid system for vehicular applications. Energy Conv. Manag.
**48**, 1544–1553 (2009)CrossRefGoogle Scholar - 41.Erdinc, O., Vural, B., Uzunoglu, M., Ates, Y.: Modeling and analysis of an FC/UC hybrid vehicular power system using a wavelet-fuzzy logic based load sharing and control algorithm. Int. J. Hydrog. Energy
**34**, 5223–5233 (2009)CrossRefGoogle Scholar - 42.Kisacikoglu, M.C., Uzunoglu, M., Alam, M.S.: Load sharing using fuzzy logic control in a fuel cell/ultracapacitor hybrid vehicle. Int. J. Hydrog. Energy
**34**, 1497–1507 (2009)CrossRefGoogle Scholar - 43.Nocedal, J., Wright, S.J.: Numerical Optimization. Springer, Berlin (2006)zbMATHGoogle Scholar
- 44.Qin, S.J., Badgwell, T.A.: A survey of industrial model predictive control technology. Control Eng. Pract.
**11**, 733–764 (2003)CrossRefGoogle Scholar - 45.Zhang, J., Chin, K.-S., Ławryńczuk, M.: Nonlinear model predictive control based on piecewise linear Hammerstein models. Nonlinear Dyn.
**92**, 1001–1021 (2018)CrossRefzbMATHGoogle Scholar - 46.Marami, B., Haeri, M.: Implementation of MPC as an AQM controller. Comput. Commun.
**33**, 227–239 (2010)CrossRefGoogle Scholar - 47.Sardarmehni, T., Rahmani, R., Menhaj, M.B.: Robust control of wheel slip in anti-lock brake system of automobiles. Nonlinear Dyn.
**76**, 125–138 (2014)CrossRefGoogle Scholar - 48.Yue, M., Hou, X., Gao, R., Chen, J.: Trajectory tracking control for tractor-trailer vehicles: a coordinated control approach. Nonlinear Dyn.
**91**, 1061–1074 (2018)CrossRefGoogle Scholar - 49.Wu, Z., Xia, X., Zhu, B.: Model predictive control for improving operational efficiency of overhead cranes. Nonlinear Dyn.
**79**, 2639–2657 (2015)CrossRefGoogle Scholar - 50.Gao, J., Puguo, W., Li, T., Proctor, A.: Optimization-based model reference adaptive control for dynamic positioning of a fully actuated underwater vehicle. Nonlinear Dyn.
**87**, 2611–2623 (2017)CrossRefzbMATHGoogle Scholar - 51.Longge, Z., Xiangjie, L.: The synchronization between two discrete-time chaotic systems using active robust model predictive control. Nonlinear Dyn.
**74**, 905–910 (2013)MathSciNetCrossRefzbMATHGoogle Scholar - 52.Clarke, D.W., Mohtadi, C.: Properties of generalized predictive control. Automatica
**25**, 859–875 (1989)MathSciNetCrossRefzbMATHGoogle Scholar - 53.Moulik, B., Söffker, D.: Optimal rule-based power management for online, real-time applications in HEVs with multiple sources and objectives: a review. Energies
**8**, 9049–9063 (2015)CrossRefGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.