Open Access
This article is

- freely available
- re-usable

*Energies*
**2018**,
*11*(8),
2157;
doi:10.3390/en11082157

Article

Experimental Study on the Performance of Controllers for the Hydrogen Gas Production Demanded by an Internal Combustion Engine

^{1}

Posgrado del Tecnológico Nacional de México/Centro Nacional de Investigación y Desarrollo Tecnológico. Int. Internado Palmira S/N, Palmira C.P.62490, Cuernavaca, Morelos 62324, Mexico

^{2}

Tecnológico Nacional de México/Centro Nacional de Investigación y Desarrollo Tecnológico. Int. Internado Palmira S/N, Palmira C.P.62490, Cuernavaca, Morelos 62324, Mexico

^{3}

CONACyT-Tecnológico Nacional de México/CENIDET. Interior Internado Palmira S/N, Col. Palmira C.P.62490, Cuernavaca, Morelos 63324, Mexico

^{*}

Authors to whom correspondence should be addressed.

Received: 16 July 2018 / Accepted: 9 August 2018 / Published: 18 August 2018

## Abstract

**:**

This work presents the design and application of two control techniques—a model predictive control (MPC) and a proportional integral derivative control (PID), both in combination with a multilayer perceptron neural network—to produce hydrogen gas on-demand, in order to use it as an additive in a spark ignition internal combustion engine. For the design of the controllers, a control-oriented model, identified with the Hammerstein technique, was used. For the implementation of both controllers, only 1% of the overall air entering through the throttle valve reacted with hydrogen gas, allowing maintenance of the hydrogen–air stoichiometric ratio at 34.3 and the air–gasoline ratio at 14.6. Experimental results showed that the average settling time of the MPC controller was 1 s faster than the settling time of the PID controller. Additionally, MPC presented better reference tracking, error rates and standard deviation of $1.03\times {10}^{-7}$ and $1.06\times {10}^{-14}$, and had a greater insensitivity to measurement noise, resulting in greater robustness to disturbances. Finally, with the use of hydrogen as an additive to gasoline, there was an improvement in thermal and combustion efficiency of 4% and 0.6%, respectively, and an increase in power of 545 W, translating into a reduction of fossil fuel use.

Keywords:

hydrogen production control; digital PID; model predictive control## 1. Introduction

Hydrogen is an abundant gas in the universe. However, hydrogen is generally combined with other elements or organic compounds. A traditional technique for obtaining hydrogen gas from water is through electrolysis. The use of hydrogen as a gasoline additive to feed an internal combustion engine is an interesting approach to get economic savings, as well as fewer pollutant gases [1,2,3]. Compared to gasoline, hydrogen as a fuel extends the service life of the engine and reduces maintenance, since it does not accumulate carbon in the combustion chamber or spark plugs, the resulting gases are cleaner, have a higher explosion power than gasoline, and water vapor is obtained as a result of its combustion. However, the main disadvantage is that hydrogen is not a primary fuel, but is combined with other elements in nature. Additionally, hydrogen is lighter than air and disperses rapidly. Because hydrogen molecules are small, it takes a large amount of energy to compress them. Hydrogen gas escapes easily from deposits. Even using the best tank, there are leaks, as the ${H}_{2}$ evaporates at a rate of $3\%$ daily [4]. The implementation of a system to produce hydrogen gas on-demand can solve this drawback.

Some studies have reported vehicle onboard hydrogen production [2,3]. However, all of them produce a constant amount of hydrogen which is experimentally determined, and is only valid for one operating point of the engine. Different research on a mathematical model of an alkaline water electrolyzer is presented in [5,6,7,8]. The models presented in those works are based on thermodynamic fundamentals, as well as electrochemical and electrodynamic relationships. They are also static models, so they are not suitable for application to control techniques. In the research presented by the authors in [5,9,10], the electrolyzer is considered as a part of a more extensive system (i.e., solar renewable energy systems, wind energy). In these works, the authors proposed control strategies in which they use a static model to determine hydrogen production.

An exhaustive investigation of the existing models for the low-temperature electrolysis systems was carried out in [8]. In this work, two main modeling approaches stand out: the static approach, which is a mathematical description of the polarization curve of electrolysis cells; and the dynamic approach, which allows the linking of internal phenomena (double layer capacitance, diffusion process, etc.). The author concluded that there are no control-oriented models for the electrolysis process.

Model predictive control (MPC), after proportional integral derivative (PID) control, is one of the most commonly used control methods in different industries. The main advantage of the MPC controller over other control methods is its capability of controlling a wide variety of processes, from the simplest to the most complex.

Aguilar et al., (2016) [11] presented the design and application of predictive control for the water discharge that enters an irrigation channel. In this work, it was reported that predictive control had a better performance than a PID. A predictive control algorithm based on a static mathematical model of an electrolyzer was reported by [12]. The objective of the control algorithm is to maximize the production of hydrogen by electrolysis, taking into account the limitations of available power and the operational constraints of the system. The results confirm a high hydrogen production obtained from the available power of renewable energy sources and a reduced number of on/off cycles.

For the design of model-based control systems, dynamic mathematical models are required to describe the dynamic relationships between process variables. In general, an electrolyzer is modeled using static, electrochemical, and empirical equations. As indicated in the literature analysis presented above, there is a lack of dynamic models for the control of electrolytic systems for the production of hydrogen gas on-demand. Therefore, the novelty of this work lies in its proposal of the design of controllers based on an identification system that involves the dynamic and static parts of the electrochemical system, with the purpose of producing hydrogen gas according to the sudden demands required by the internal combustion engine. In this work, a linear predictive control scheme and a discrete time PID controller are presented and implemented in an alkaline water electrolysis system based on a model identified using the Hammerstein identification technique.

## 2. Materials and Method

For this research, an alkaline water electrolyzer and a NISSAN internal combustion (IC) engine were used, located at the Centro Nacional de Investigación y Desarrollo Tecnológico (CENIDET) in Cuernavaca, Morelos, México. The electrolyzer was composed of 12 cells connected in series, with a distance between the electrodes of 0.8 cm. The area of each electrode was 289 cm${}^{2}$, the electrolyte used was $30\%$ wt potassium hydroxide. The details of the internal combustion engine are listed in Table 1. A schematic diagram of the experiment is shown in Figure 1.

#### 2.1. Instrumentation, Sensors and Acquisition System

To measure the mass hydrogen flow produced by the electrolyzer, an Omega FMA-A2310 (0–15 SLM gas mass flowmeter) was used. For controlling the current fed to the electrolyzer, a PWM (20 kHz) control was developed. The data acquisition system was composed of the NI cRIO-9074 chassis and different data acquisition modules. The NI-9205 module was used to acquire the analogical signals, and the NI-9474 module was used to generate the PWM signal. An NI-9474 data acquisition module was used to implement the controller. A CSLA1CF ratiometric linear Hall effect sensor was used to measure the current fed to the electrolyzer. To measure the pressure inside the electrolyzer, a MPX 5500 monolithic silicon pressure sensor was used. A RTD pt100 temperature sensor was used to measure the electrolyte temperature in the electrolyzer. A MOSFET IRF3205 power transistor was used to develop the power system.

The mass air flow rate entering the internal combustion engine was measured by a Bosch 0280-218-019 sensor, the pressure in the intake manifold was measured by a Piab (0107729) vacustat, the air–fuel ratio was measured by a UEGO 30-4110 sensor, the engine speed was determined by using a rotor plate, and the temperature was measured using an RTD pt100.

#### 2.2. Nonlinear Identification Hammerstein Models

System identification is the procedure by which a mathematical model is generated based on experimentally-obtained system data. The Hammerstein model is a cascade block system used to model a system from the knowledge of the input and output variables [13]. The first block of the Hammerstein model consists of a multilayer perceptron neural network, which represents the static non-linearity of the plant. The second block of the Hammerstein model contains an autoregressive with exogenous variables (ARX), which characterizes the dynamic effects. Figure 2 shows the schematic representation of an implemented Hammerstein model.

#### 2.3. Model Predictive Control Law

For the formulation of the predictive control, it is considered that the plant model is linear time-invariant, the cost function is quadratic, and the constraints are in the form of linear inequalities. The complete development of the control law can be found at [14]. Based on the state space model, future state variables are sequentially calculated using the set of future control parameters Equation (1).

$$x({k}_{i}+{H}_{p}\mid {k}_{i})={A}^{{H}_{p}}x\left({k}_{i}\right)+{A}^{{H}_{p}-1}B\Delta u\left({k}_{i}\right)+{A}^{{H}_{p}-2}B\Delta u({k}_{i}+1)+{A}^{{H}_{p}-{H}_{c}}B\Delta u({k}_{i}+{H}_{c}-1)$$

The output predictions are given by the Equation (2):
since
where

$$\begin{array}{c}y({k}_{i}+{H}_{p}\mid {k}_{i})=C{A}^{{H}_{p}}x\left({k}_{i}\right)+C{A}^{{H}_{p}-1}B\Delta u\left({k}_{i}\right)+C{A}^{{H}_{p}-2}B\Delta u({k}_{i}+1)+\dots +\\ C{A}^{{H}_{p}-{H}_{c}}B\Delta u({k}_{i}+{H}_{c}-1)\end{array}$$

$$Y=\kappa x\left({k}_{i}\right)+\mu \Delta U$$

$$\kappa =\left[\begin{array}{c}CA\\ C{A}^{2}\\ C{A}^{3}\\ \vdots \\ C{A}^{{H}_{p}}\end{array}\right];\phantom{\rule{4.pt}{0ex}}\mu =\left[\begin{array}{ccccc}CB& 0& 0& \dots & 0\\ CAB& CB& 0& \cdots & 0\\ C{A}^{2B}& CAB& CB& \cdots & 0\\ \vdots \\ C{A}^{{H}_{p}-1}& C{A}^{{H}_{p}-2}B& C{A}^{{H}_{p}-3}B& \cdots & C{A}^{{H}_{p}-{H}_{c}}\end{array}\right]$$

The cost function with constraints is proposed by Equation (4):
subject to the following inequality constraints:
where the data matrices are defined by Equation (6):

$$J={\left({R}_{s}-\kappa x\left({k}_{i}\right)\right)}^{T}\left({R}_{s}-\kappa x\left({k}_{i}\right)\right)-2\Delta {U}^{T}{\mu}^{T}\left({R}_{s}-\kappa x\left({k}_{i}\right)\right)+\Delta {U}^{T}\left({\mu}^{T}\mu +\overline{R}\right)\Delta U$$

$$\left[\begin{array}{c}{C}_{{u}_{1}}\\ {C}_{{u}_{2}}\end{array}\right]\Delta U\le \left[\begin{array}{c}{D}_{{u}_{1}}\\ {D}_{{u}_{2}}\end{array}\right]$$

$$\begin{array}{cc}{C}_{{u}_{1}}=\left[\begin{array}{c}-{O}_{2}\\ {O}_{2}\end{array}\right];& {D}_{{u}_{1}}=\left[\begin{array}{c}-{U}^{\mathrm{min}}+{O}_{1}u\left({k}_{i}-1\right)\\ {U}^{\mathrm{max}}-{O}_{1}u\left({k}_{i}-1\right)\end{array}\right];\\ {C}_{{u}_{2}}=\left[\begin{array}{c}-I\\ I\end{array}\right];& {D}_{{u}_{2}}=\left[\begin{array}{c}-\Delta {U}^{\mathrm{min}}\\ \Delta {U}^{\mathrm{max}}\end{array}\right].\end{array}$$

The control law is determined by $u\left({k}_{i}\right)=\Delta u\left({k}_{i}\right)+u({k}_{i}-1)$.

#### 2.4. Proportional Integral Derivative Control Law

The incremental discrete PID control law is developed by starting with the continuous algorithm given by Equation (7):
where $u\left(t\right)$ is the input of the control system, ${k}_{p}$ are proportionality constant, ${T}_{i}$ is the integral constant, ${k}_{d}$ is the derivative constant, and $e\left(t\right)$ is the error. To implement the PID controller, the continuous PID Equation (7) has to be discretized. To solve the integral component, the trapezoidal integration method was used. Equation (8) is given as:
where: ${p}_{0}={k}_{p}\left[1+\frac{T}{2{T}_{i}}+\frac{{k}_{d}}{T}\right]$, ${p}_{1}={k}_{p}\left[-1+\frac{T}{2{T}_{i}}-\frac{2{k}_{d}}{T}\right]$, ${p}_{2}={k}_{p}\left[\frac{{k}_{d}}{T}\right]$

$$u\left(t\right)={k}_{p}\left[e\left(t\right)+\frac{1}{{T}_{i}}\int e\left(t\right)dt+{k}_{d}\frac{de\left(t\right)}{dt}\right]$$

$$u\left(k\right)=u\left(k-1\right)+e\left(k\right){p}_{0}+e\left(k-1\right){p}_{1}+e\left(k-2\right){p}_{2}$$

#### PID Tuning

The procedure used for tuning PID controllers consists of locating the closed-loop poles in a specific position—a procedure known as the Persson [15] pole-location method, popularized by Åström and Hägglund [16].

The parameters required by the controller are obtained using the methodology presented in [16].
where ${\tau}_{1}$ and ${\tau}_{2}$ are the transfer function parameters.

$$\begin{array}{ccc}\hfill kp& =& \frac{{\tau}_{1}{\tau}_{2}{\omega}_{n}^{2}\left(1+2\alpha \zeta \right)-1}{k}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill Ti& =& \frac{{\tau}_{1}{\tau}_{2}{\omega}_{n}^{2}\left(1+2\alpha \zeta \right)-1}{{\tau}_{1}{\tau}_{2}\alpha {\omega}_{n}^{3}}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill kd& =& \frac{{\tau}_{1}{\tau}_{2}{\omega}_{n}\left(\alpha +2\zeta \right)-{\tau}_{1}-{\tau}_{2}}{{\tau}_{1}{\tau}_{2}{\omega}_{n}^{2}\left(1+2\alpha \zeta \right)-1}\hfill \end{array}$$

#### 2.5. Engine Efficiencies

Thermal efficiency indicates what percentage of the fuel energy is used to drive and overcome pump losses and engine friction. According to [17], the thermal efficiency can be calculated from four variables: crankshaft speed, intake manifold pressure, spark advance, and air-fuel ratio. The parameters used are adjusted experimentally according to the engine used. The polynomials are presented in Equations (12)–(16). For more details on obtaining the parameters, consult [17].
where ${\eta}_{x}$, ${\eta}_{y}$, ${\eta}_{z}$, ${a}_{0}$, ${a}_{1}$, ${a}_{2}$, ${b}_{0}$, ${b}_{1}$, ${b}_{2}$, ${b}_{3}$, ${c}_{0}$, ${c}_{1}$, ${c}_{2}$, ${c}_{3}$ are the constants of the polynomials and ${P}_{m}$, $\lambda $, n and $\beta $ represent intake manifold pressure, air-fuel ratio, crankshaft speed and crankshaft angle respectively.

$$\begin{array}{ccc}\hfill {\eta}_{ter}\left(\beta ,\lambda ,n,{P}_{m}\right)& =& \eta \left(\beta ,n\right)\eta \left(\lambda ,n\right)\eta \left(n\right)\eta \left({P}_{m}\right)\hfill \end{array}$$

$$\begin{array}{ccc}\hfill \eta \left(n\right)& =& {\eta}_{y}+{\eta}_{x}{e}^{\frac{n}{{n}_{z}}}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill \eta \left({P}_{m}\right)& =& {a}_{0}+{a}_{1}{P}_{m}+{a}_{2}{P}_{m}^{2}\hfill \end{array}$$

$$\begin{array}{ccc}\hfill \eta \left(\lambda ,n\right)& =& {b}_{0}+{b}_{1}\lambda +{b}_{2}{\lambda}^{2}+{b}_{3}n\hfill \end{array}$$

$$\begin{array}{ccc}\hfill \eta \left(\beta ,n\right)& =& {c}_{0}+{c}_{1}{\left(\beta -\left[{c}_{2}n+{c}_{3}\right]\right)}^{2}\hfill \end{array}$$

The combustion efficiency is determined from Equation (17), proposed in [18]. When using pure gasoline, the term ${A}_{burn}$ expresses all the elements of combustion which cannot be explained by a simple analysis and which are not related to fuel quality, such as incomplete fuel oxidation which occurs even in optimal circumstances and acquires a value between 0.85 and 0.9.

$${\eta}_{c}={A}_{burn}{\eta}_{ac}\left(\lambda \right){\eta}_{nv}\left({\eta}_{vol}\right)$$

The relative combustion efficiency dependent on the lambda factor is used to consider reactions outside of complete combustion:

$${\eta}_{ac}\left(\lambda \right)=-1.6082+4.6509\lambda -2.0746{\lambda}^{2}$$

According to [18] higher volumetric efficiency has a positive influence on improving combustion efficiency.

$${\eta}_{vol}={d}_{5}{n}^{5}+{d}_{4}{n}^{4}+{d}_{3}{n}^{3}+{d}_{2}{n}^{2}+{d}_{1}n+{d}_{0}$$

$${\eta}_{nv}\left({\eta}_{vol}\right)=-12.5+70.10{\eta}_{vol}-135.67{\eta}_{vol}^{2}+114.77{\eta}_{vol}^{3}-35.54{\eta}_{vol}^{4}$$

However, to account for the influence of hydrogen and to consider what is reported in [19], the polynomial (21) is proposed, where $Hm$ is the mass fraction of hydrogen added to gasoline:

$$\begin{array}{c}{\eta}_{{H}_{2}}=3.04\times {10}^{-5}H{m}^{5}-4.39\times {10}^{-4}H{m}^{4}+1.84\times {10}^{-3}H{m}^{3}-6.80\times {10}^{-4}H{m}^{2}+\\ 1.85\times {10}^{-5}Hm+1\end{array}$$

Finally, to determine the combustion efficiency considering the addition of hydrogen, Equation (22) is used.

$${\eta}_{c}={A}_{burn}{\eta}_{ac}\left(\lambda \right){\eta}_{nv}\left({\eta}_{vol}\right){\eta}_{{H}_{2}}$$

#### 2.6. Control Strategy

The control strategy consists of using the mathematical model of the electrolyzer. The nonlinear static block is identified with a multilayer neuronal perception network that has two hidden layers, with four neurons each. The inputs are: feed current, temperature, and pressure of the electrolyzer, and the output is the flow of hydrogen gas produced. To reduce the effects of the system nonlinearities, the inverse of the neural network was placed before the system input. In this way, the controller is be able to regulate with a better performance.

The network output can be given by Equation (23):
where the subscripts have the following meanings: j is the number of neurons in hidden layer 1, p is the number of neurons in hidden layer 2, k is the number of neurons in the input layer, and i is the number of neurons in the output layer. f is the sigmoid function used in the hidden layer, and ${f}_{o}$ is a linear transfer function which is used in the output layer. $Wi$, $Wl$, $Wo$, and ${b}_{j}$, ${b}_{p}$, ${b}_{i}$ are the weights and biases of the input, output, and hidden layer, respectively. Table 2 shows the parameters of the artificial neural network (ANN) ($Wi,Wl,Wo$).

$${y}_{an{n}_{i}}={f}_{o}\left[\sum _{p=1}^{p}W{o}_{pi}f\left(\sum _{j=1}^{j}W{l}_{jp}f\left(\sum _{k=1}^{k}\left(W{i}_{kj}{x}_{k}+{b}_{j}\right)\right)+{b}_{p}\right)+{b}_{i}\right]$$

The model obtained from the linear dynamic block is:

$$H\left(z\right)=\frac{0.01822{z}^{-1}+0.01587{z}^{-2}}{1-1.627{z}^{-1}+0.6604{z}^{-2}}$$

For model predictive control formulation, the model obtained from the identified linear dynamic block is used. The constraints are determined from experimental tests and previous knowledge of the system [14]. The parameters of the PID controller are obtained by the pole placement method.

Due to the system nonlinearities and the fact that both control strategies were designed using only the linear dynamic block so that nonlinearities do not affect the controllers. To reduce the effects of the nonlinearities, the inverse of the ANN (23) is used.

The ANN is a multilayer perceptron. Its input and output are the flow of hydrogen and the current feed to the electrolyzer, respectively. The network has two hidden layers with five neurons in the first hidden layer and four neurons in the second hidden layer. Table 2 shows the obtained parameters $(Wi,Wl,Wo).$

The control scheme implemented in this research is shown in Figure 3.

Figure 3 shows the scheme for determining and controlling the hydrogen production, demanded by the internal combustion engine. Using the MAF (mass air flow) sensor, the air flow through the throttle valve is measured. The total air measured is considered as 1% of the air and divided by 34.33 to determine the amount of hydrogen required by the engine (set-point). The error generated between the hydrogen produced and the demanded hydrogen enters the PID or MPC control, the control action calculates the hydrogen to be produced, and the controller’s output enters a neural network that determines the current to be supplied to the electrolyzer. The current applied to the electrolyzer is controlled by the duty cycle of a PWM operating at a frequency of 20 kHz. The gasoline injection is controlled by the engine control unit (ECU). The air flow sent to the ECU is multiplied by 0.99 to prevent more gasoline from being supplied, because the remaining 1% of the air to react with hydrogen is used.

The system’s monitored variables were the temperature and pressure. The controlled variable was the hydrogen flow. The manipulated variable was current feed to the IC engine.

For the design of the MPC controller, the prediction horizon and the control horizon were ${H}_{p}=50$ and ${H}_{c}=1$, respectively. The constraints of the control variables $u\left(k\right)$ and $\Delta u$ were as follows:

$$\begin{array}{ccc}\hfill 10& \le & u\left(k\right)\le 70\hfill \\ \hfill -0.3& \le & \Delta U\le 0.3\hfill \end{array}$$

For the design of the PID control the gains are defined as follows: ${k}_{p}=2.83$, ${T}_{i}=7.55$, ${k}_{d}=1.94$. The pole placement method was used for obtaining the controller gains.

## 3. Results

#### Experimental Tests

This paper presents a comparison of the performance of the two controllers. The following figures show the results of experimental tests of the implementation of an MPC controller and a PID controller in an alkaline water electrolysis system. The purpose of the controllers is to control the production of hydrogen of the electrolyzer to power an unloaded internal combustion engine. It is important to mention that the power supply of the electrolyzer was independent of the electrical system of the engine. For experimental tests, it was considered that 1% of the total air entering the internal combustion engine reacted with hydrogen. The measured amount of air corresponding to 1% of the full air was divided by 34.33 to obtain the hydrogen gas demand required by the engine.

In Figure 4, the mass flow of air induced into the internal combustion engine is shown. The variation of the crankshaft speed during the test was between 900 and 2400 rpm.

Figure 5 shows the hydrogen demand, the continuous line represents the hydrogen demand estimated by the mass air flow entering into the internal combustion engine. The variation in the hydrogen demand is due to internal combustion engine speed changes. The dashed line is the hydrogen production controlled by the controllers. At the top of the figure the system response using the MPC controller is shown, the error rate and the standard deviation are $RMSE=1.03\times {10}^{-7}$, and $SD=1.06\times {10}^{-14}$, respectively. At the bottom of the figure, the PID controller response is shown. The error rate and the standard deviation are $RMSE=1.06\times {10}^{-7}$ and $SD=1.14\times {10}^{-14}$, respectively, this indicates that the MPC controller has better reference tracking.

Table 3 shows the establishment time it takes for the controllers to reach the reference for each setpoint change. The average establishment time of the MPC controller is 5.8 s, while the average establishment time of the PID controller is 6.8 s.

Figure 6 shows the controller’s establishment time for each reference change. The red bar corresponds to the MPC controller, and the green bar corresponds to the PID controller. The last two bars represent the average establishment time of each controller. As can be observed, the MPC had a shorter time, which shows that the MPC controller had a faster response time compared to the PID controller.

Figure 7 shows the current supplied to the electrolyzer (or control current) to produce the required hydrogen. During the internal combustion engine speed changes, there were no overcurrents. This indicates that the energy was used efficiently. However, at idling speed, it required a minimum current of between 27 and 30 A, and at speeds of 2400 rpm, a current of between 58 and 60 A was required. To supply the current to the electrolyzer, an energy source independent of the internal combustion engine’s electrical system was used.

Figure 8 shows the error between the demanded hydrogen and the controlled hydrogen production. For both controllers, the error estimation overshoots were due to the IC engine speed changes. However, once the hydrogen production was stabilized, the error tended to be zero, indicating that the controller was always searching to minimize the error between the hydrogen demanded and hydrogen produced.

Figure 9 shows the thermal efficiency of the hydrogen-enriched gasoline (dashed line), and of the pure gasoline (continuous line). As shown in the figure, when the hydrogen-enriched gasoline blend was used, there was a 4% increase in thermal efficiency. This is consistent with the results reported in [20], due to the physicochemical properties of hydrogen. The calorific power of hydrogen is 120 kJ/kg, and it is 44 kJ/kg for gasoline. Furthermore, the hydrogen has a higher flame rate. Therefore, the combustion time is shorter, which reduces heat losses by cooling [17].

Figure 10 shows the estimated combustion efficiency of the internal combustion engine when hydrogen-enriched gasoline (dashed line) and pure gasoline (continuous line) were used. As shown in Figure 10, when the hydrogen-enriched gasoline blend was used, there was an increment of 0.6% in combustion efficiency. This indicates that there was an improvement of efficiency in the fuel burning, which was achieved due to the hydrogen’s high diffusibility and burning speed within the combustion chamber [19]. Hydrogen’s burning speed is approximately six times higher than that of gasoline.

Figure 11 shows the engine brake power. The range of engine brake power when hydrogen-enriched gasoline was used was 2.3–6.2 kW, and the range of engine brake power when pure gasoline was used was 2–5 kW, depending on the operating conditions of the internal combustion engine. On average, there was an increase in the brake power by 0.54 kW when hydrogen was used.

If the internal combustion engine used pure gasoline as fuel, the fuel did not burn completely, reducing the engine output power. However, if the internal combustion engine ran using hydrogen-enriched gasoline, there was a slight increase in the fuel burning efficiency and better use of energy overall, thus achieving an increase in power.

## 4. Conclusions

In this work, two controllers (MPC and PID) were designed and implemented to evaluate their performance in controlling the on-demand production of hydrogen by using an alkaline water electrolyzer to power an internal combustion engine that was assessed without load. To implement the addition of hydrogen, it was not necessary to make mechanical modifications to the engine. However, it was essential to modify the electrical signal of the MAF sensor that reaches the ECU to avoid a more substantial injection of gasoline fuel. Hammerstein identification was used for the development of the controllers. The results showed that the MPC controller was slightly better than the PID controller, as it had a shorter set-up time, lower error rates, and lower sensitivity to measurement noise. Producing hydrogen on-demand is an exciting challenge because hydrogen cannot be produced instantaneously. The production time is on average 5.8 s, although we consider that this time can be improved to obtain a better performance in the burning of fuel and achieve a better use of energy. Finally, by adding hydrogen to the internal combustion engine and controlling the stoichiometric ratios of fuels (air–hydrogen and air–gasoline), the thermal and combustion efficiencies increased by $4\%$ and $0.6\%$, respectively, and the output power of the engine increased by 545 W. It is necessary to consider that installing this type of system is still expensive, due to the amount of current required to supply the electrolyzer, so it would be necessary to implement some kind of energy recovery system in the vehicles to feed the electrolyzer.

## Author Contributions

These authors contributed equally to this work.

## Funding

“This research was funded by Tecnológico Nacional de México grant number 6370.18-P.”

## Acknowledgments

Marisol Cervantes Bobadilla would like to thank CONACYT (Consejo Nacional de Ciencia y Tecnología de México) for the support given during the development their Ph.D. thesis, as well as Jaime Arau Roffiel, Carlos Astorga Zaragoza, Carlos Daniel García Beltrán, José Alfredo Hernández Pérez and Alberto Alvarez Gallegos for their invaluable comments. The authors would like to thank Tecnológico Nacional de México, Dirección General Educación Superior Universitaria (PRODEP) and CENIDET for the support to develop this work. José Francisco Gómez Aguilar acknowledges the support provided by CONACyT: cátedras CONACyT para jóvenes investigadores 2014.

## Conflicts of Interest

The authors declare no conflict of interest.

## Nomenclature

Acronyms | |

$AFR$ | Air/Fuel Ratio |

$AF{R}_{e}$ | Stoichiometric Air/Fuel Ratio |

ANN | Artificial Neural Network |

$ARX$ | Auto Regressive with eXogenous inputs |

MPC | Model Predictive Control |

PID | Proportional Integral Derivative |

PWM | Pulse-Width Modulation |

SD | Standard deviation |

SLM | Standard Litre per Minute |

$RMSE$ | Root mean square error |

RTD | Resistance Temperature Detector |

Symbols | |

$\alpha $ | Factor for determining the third pole |

$(A,B,C,D)$ | State-space realization |

$\Delta $u | Future input change |

$\u03f5$ | Damping factor |

J | Performance index for optimization CMPC |

$\kappa ,\mu $ | Pair of matrices used in the prediction equation $Y=\kappa x\left({k}_{i}\right)+\mu \Delta U$ |

$\lambda $ | Factor indicating whether the mixture is rich or lean $\lambda =AFR/AF{R}_{e}$ |

${\eta}_{c}$ | Combustion efficiency |

${\eta}_{ter}$ | Thermal efficiency |

${\eta}_{vol}$ | Volumetric efficiency |

${\omega}_{n}$ | Natural frequency |

${y}_{h}$ | Model Hammerstein Output |

${y}_{an{n}_{i}}$ | Model articial neural network |

Constants | |

${H}_{c}$ | Control horizon ${H}_{c}=1$ |

${H}_{p}$ | Prediction horizon ${H}_{p}=50$ |

## References

- Ji, C.; Wang, S. Combustion and emissions performance of a hybrid hydrogen–gasoline engine at idle and lean conditions. Int. J. Hydrogen Energy
**2010**, 35, 346–355. [Google Scholar] [CrossRef] - Al-Rousan, A.A. Reduction of fuel consumption in gasoline engines by introducing HHO gas into intake manifold. Int. J. Hydrogen Energy
**2010**, 35, 12930–12935. [Google Scholar] [CrossRef] - Karagöz, Y.; Orak, E.; Yüksek, L.; Sandalcı, T. Effect of hydrogen addition on exhaust emissions and performance of a spark ignition engine. Environ. Eng. Manag. J.
**2015**, 14, 665–672. [Google Scholar] [CrossRef] - Tzimas, E.; Filiou, C.; Peteves, S.D.; Veyret, J.B. Hydrogen Storage: State-of-the-Art and Future Perspective; EUR-Scientific and Technical Research Reports; EU Commission, JRC Petten, EUR 20995EN: Petten, The Netherlands, 2003. [Google Scholar]
- Dahbi, S.; Aboutni, R.; Aziz, A.; Benazzi, N.; Elhafyani, M.; Kassmi, K. Optimised hydrogen production by a photovoltaic-electrolysis system DC/DC converter and water flow controller. Int. J. Hydrogen Energy
**2016**, 41, 20858–20866. [Google Scholar] [CrossRef] - Sandeep, K.C.; Kamath, S.; Mistry, K.; Kumar, A.; Bhattacharya, S.K.; Bhanja, K.; Mohan, S. Experimental studies and modeling of advanced alkaline water electrolyser with porous nickel electrodes for hydrogen production. Int. J. Hydrogen Energy
**2017**, 42, 12094–12103. [Google Scholar] [CrossRef] - Haug, P.; Kreitz, B.; Koj, M.; Turek, T. Process modelling of an alkaline water electrolyzer. Int. J. Hydrogen Energy
**2017**, 42, 15689–15707. [Google Scholar] [CrossRef] - Olivier, P.; Bourasseau, C.; Bouamama, P.B. Low-temperature electrolysis system modelling: A review. Renew. Sustain. Energ. Rev.
**2017**, 78, 280–300. [Google Scholar] [CrossRef] - Dixon, C.; Reynolds, S.; Rodley, D. Micro/small wind turbine power control for electrolysis applications. Renew. Energy
**2016**, 87, 182–192. [Google Scholar] [CrossRef] - Bhattacharyya, R.; Misra, A.; Sandeep, K.C. Photovoltaic solar energy conversion for hydrogen production by alkaline water electrolysis: conceptual design and analysis. Energy Convers. Manag.
**2017**, 133, 1–13. [Google Scholar] [CrossRef] - Aguilar, J.V.; Langarita, P.; Rodellar, J.; Linares, L.; Horváth, K. Predictive control of irrigation canals-robust design and real-time implementation. Water Resour. Manag.
**2016**, 11, 3829–3843. [Google Scholar] [CrossRef] - Serna, Á.; Yahyaoui, I.; Normey-Rico, J.E.; de Prada, C.; Tadeo, F. Predictive control for hydrogen production by electrolysis in an offshore platform using renewable energies. Int. J. Hydrogen Energy
**2017**, 42, 12865–12876. [Google Scholar] [CrossRef] - Eskinat, E.; Johnson, S.H.; Luyben, W.L. Use of hammerstein models in identification of nonlinear systems. AIChE J.
**1991**, 37, 255–268. [Google Scholar] [CrossRef] - Wang, L. Model Predictive Control System Design and Implementation Using MATLAB; Springer: London, UK, 2009. [Google Scholar]
- Persson, P.; Åström, K.J. PID control revisited. IFAC Proc. Vol.
**1993**, 26, 451–454. [Google Scholar] [CrossRef] - Åström, K.J.; Hägglund, T. PID Controllers: Theory, Design, and Tuning; International Society of Automation: Research Triangle Park, NC, USA, 1995. [Google Scholar]
- Hendricks, E.; Sorenson, S.C. Mean value modelling of spark ignition engines. J. Egines
**1990**, 99, 1359–1373. [Google Scholar] - Blair, G.P. Design and Simulation of Two-Stroke Engines; Society of Automotive Engineers: Warrendale, PA, USA, 1996. [Google Scholar]
- Hacohen, Y.; Sher, E. Fuel consumption and emission of SI engine fueled with H/sub 2/-enriched gasoline. In Proceedings of the 24th Intersociety Energy Conversion Engineering Conference, Washington, DC, USA, 6–11 August 1989. [Google Scholar]
- Amrouche, A.; Erickson, P.A.; Varnhagen, S.; Park, J.W. An experimental study of a hydrogen-enriched ethanol fueled Wankel rotary engine at ultra lean and full load conditions. Energy Convers. Manag.
**2016**, 123, 174–184. [Google Scholar] [CrossRef]

**Figure 1.**Schematic diagram of the experimental set-up composed of a power circuit (1) to feed the alkaline water electrolysis system (2). The hydrogen produced passes through a bubbler (3) and a flash arrestor (11) to introduce it into the internal combustion engine through the intake manifold. Sensors (4–7) are monitored by the acquisition system (8), and actuators (9) and (10) are controlled by the engine control unit (ECU).

**Figure 2.**Hammerstein structure. The non-linear static block was identified using a multilayer perceptron artificial neural network, and the linear dynamic block was identified using the second-order Auto Regressive with eXogenous inputs (ARX) structure.

**Figure 4.**The mass flow rate of air entering the IC motor according to the motor speed (rpm): 900, 2200, 2000, 900, 2400, 1000, 1200, 2250, 1000.

**Figure 5.**(

**top**) Control system response using an MPC controller. (

**bottom**) Control system response using a PID controller.

**Figure 7.**Current supplied to the electrolyzer by the MPC and PID controllers to produce the hydrogen gas required.

**Figure 8.**The error between the hydrogen demanded (set-point) and the hydrogen produced using the MPC (top) and PID (bottom) controller.

**Figure 9.**Thermal efficiency of the IC engine, using gasoline as fuel and hydrogen enriched gasoline as fuel for each controller.

IC Engine Characteristic | Value |
---|---|

Number of cylinders | 4 |

Cylinder displacement volumetric | 1.595 l |

Ratio of cylinder bore to piston stroke | 0.863 |

Compression ratio | 9.5:1 |

Maximum power | 78 kW/6000 rpm |

Maximum torque | 138 Nm/4000 rpm |

Minimum regime | 625 rpm |

Maximum regime | 6000 rpm |

Valves | 4 valves/cylinder |

Throttle radio | 50 mm |

Manifold volume | 0.00148 m${}^{3}$ |

ANN Model | Wi | 0.6125 | 0.3984 | 1.2064 | −0.0551 | |

(k,j) | (1,1) | (1,2) | (1,3) | (1,4) | ||

0.8307 | 0.5240 | 0.1781 | 0.4856 | |||

(2,1) | (2,2) | (2,3) | (2,4) | |||

0.3771 | 0.4739 | 0.1599 | 0.2283 | |||

(3,1) | (3,2) | (3,3) | (3,4) | |||

Wl | 0.6006 | −0.5282 | 0.5764 | 0.1417 | ||

(j,p) | (1,1) | (1,2) | (1,3) | (1,4) | ||

0.5839 | 0.5730 | 0.2632 | 0.4318 | |||

(2,1) | (2,2) | (2,3) | (2,4) | |||

0.6206 | −1.8939 | 1.1354 | 0.1056 | |||

(3,1) | (3,2) | (3,3) | (3,4) | |||

0.4143 | 1.3315 | −0.3020 | 0.3203 | |||

(4,1) | (4,2) | (4,3) | (4,4) | |||

Wo | 1.3432 | −4.1812 | 2.0479 | 0.3280 | ||

(p,i) | (1,1) | (2,1) | (3,1) | (4,1) | ||

ANN Model of the Inverse Block | Wi | 0.5808 | −0.4829 | 1.0060 | 0.1710 | 1.0027 |

(k,j) | (1,1) | (1,2) | (1,3) | (1,4) | (1,5) | |

Wl | 0.0960 | 0.1391 | 0.3053 | 0.1893 | ||

(j,p) | (1,1) | (1,2) | (1,3) | (1,4) | ||

−0.4767 | 0.0118 | −0.9156 | 1.9820 | |||

(2,1) | (2,2) | (2,3) | (2,4) | |||

1.0418 | 0.6608 | 0.9554 | −1.3087 | |||

(3,1) | (3,2) | (3,3) | (3,4) | |||

−0.1652 | 0.3466 | 0.0727 | 0.7675 | |||

(4,1) | (4,2) | (4,3) | (4,4) | |||

0.8474 | 0.6595 | 0.7353 | −1.0418 | |||

(5,1) | (5,2) | (5,3) | (5,4) | |||

Wo | 1.4605 | 0.6381 | 1.5800 | −3.2777 | ||

(p,i) | (1,1) | (2,1) | (3,1) | (4,1) |

Setpoint MPC–PID ($1\times {10}^{-6}$ kg/s) | Establishment Time MPC (s) | Establishment Time PID (s) |
---|---|---|

2.20–2.66 | 5.8 | 8.1 |

2.08–2.03 | 5.5 | 5.8 |

1.18–1.26 | 5.8 | 6.9 |

2.82–2.81 | 6.1 | 7.0 |

1.23–1.27 | 6.2 | 7.1 |

1.51–1.47 | 4.8 | 4.6 |

2.71–2.66 | 5.3 | 8.3 |

1.44–1.35 | 7.4 | 7.1 |

Average | 5.8 | 6.8 |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).