Optimal Control of a PEM Fuel Cell for the Inputs Minimization

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.


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][7][8][9][10], robust controls of nonlinear systems are introduced.The bangbang 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.Section 2 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.

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.

Modified PEM Fuel Cell Output Voltage Equation.
The output stack voltage  defined as a function of the stack current, reactant partial pressures, fuel cell temperature, and membrane humidity, is as follows [1,2,15,16]: where is the thermodynamic potential of the cell or reversible voltage based on the Nernst equation,  is the number of cells in the stack,   is the cell-open-circuit voltage,  is the operating temperature, H 2 , O 2 , and H 2 O  are the partial pressures of hydrogen, oxygen, and water gas inside the cell, respectively,  is the gas constant (8.3144J/mol 0 K),  is the Faraday constant (96439 C/mol),  std is the standard pressure (101325 Pa), and  activation is the voltage loss due to the reactions of the electrodes surface. ohmic is the ohmic voltage drop from the resistances of proton flow in the electrolyte. 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]: where  = /2,  is the output current density,   is the internal current density related to the internal current losses,  0 is the exchange current density related to activation losses,  is a charge transfer coefficient,  is the area-specific resistance related to resistive losses, and  and  are constants in the mass transfer voltage.In this study, the output stack voltage  of ( 1) is modified with the consideration of an external load as can be seen in Figure 1.
It is described as follows: where  activation ,  ohmic , and  concentration are defined in (2), (3), and (4), respectively,  load =    is the load voltage,  is the output current density, and   is the load resistance.

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: Cathode: 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] where in , and  3 =  and the output as  =  give the following state space system: The nonlinear system ( 9) is rewritten as follows: where  = [ Remark 1.The dynamic model is proposed by [1].Notwithstanding, the PEM fuel cell with an external load is proposed in this study.

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: where   = [ ,1 ,  ,2 ,  ,3 ]  is the desired reference and  is defined in (10).Subtracting ( 11) from (10), the closed-loop system is obtained as follows: where x =  −   is the tracking error and , , and  are defined in (10).
The following theorem presents the optimal control applied to the PEM fuel cell.(10).Therefore, there exists an optimal controller to follow a desired behavior given as follows:
Remark 3. First, the process starts with the initial conditions of x and ; the adaptive equation ( 14) is solved at a time to find Ṡ ; then, the optimal control function ( 13) is solved at a time to find ; later, the fuel cell dynamic model ( 10) is solved to find ẋ .Then, the process starts again.The above-described process is directly solved using the software Simulink of MATLAB.  is free in the numerical simulations because it can take different values without the requirement to remake additional calculus.

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  1 ,  2 , and  3 of (10) should reach the desired trajectories  ,1 ,  ,2 , and  ,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]: where 3 is the tracking error and  2 =  2 1 +  2  2 +  2 3 is the control function.The parameters of the PEM fuel cell are given in Table 1 [1,2].
Figures 2, 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.
From Figure 2, 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.Optimal is given by ( 13), (14) with parameters  = diag(1) ∈ R 3 × 3 ,  = diag(0.1)∈ R 3 × 3 ,  0 = diag( ,, ) ∈ R 3 × 3 ,  1, = 1.2 × 10 −3 ,  2, = 2.5 × 10 −3 , and  3, = 2.5;  0 is the initial condition of .
Figures 5, 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.
From Figure 5, 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.

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

Figure 2 :
Figure 2: Trajectory tracking of the states.
c is the cell active area,  is defined in (2)-(4),  op is the operating pressure,   is the anode volume,   is the cathode volume,  and  are defined in (1), H 2,in , O 2,in , and H 2 O ,in are the inlet flow rates of the hydrogen, oxygen, and water of the cathode, respectively, and H 2 , O 2 , and H 2 O  are the partial pressures of hydrogen, oxygen, and water inside the cell, respectively.

Table 1 :
Parameters of a PEM fuel cell.

Table 2 :
Results for states and controls.