Safe and Efﬁcient Polymer Electrolyte Membrane Fuel Cell Control Using Successive Linearization Based Model Predictive Control Validated on Real Vehicle Data

: In this paper, a polymer electrolyte membrane fuel cell (PEMFC) stack control study is presented. The goal is to track the transient power demand of a real fuel cell (FC) vehicle while ensuring safe and efﬁcient operation. Due to the dynamically changing power demand, fast transients occur in the internal states of the fuel cell (e.g., pressure, humidity, reactant mass) leading to degradation effects (e.g., high/low membrane overpressure, reactants starvation) which are avoided by imposing safety constraints. Efﬁciency is considered in terms of internal voltage losses minimization as well as minimization of the power of the compressor used to pressurize the cathode. For solving the optimization problem of power demand tracking, adhering to safety constraints, and maximizing efﬁciency, model predictive control (MPC) has been chosen. Due to the nonlinearity of the FC system, a successive linearization based MPC (SLMPC) is used to control the FC throughout its operating region. Simulation results show that the power demand can be fulﬁlled while at the same time ensuring safe operation in terms of adhering to constraints and that the minimization of internal voltage losses and compressor power lead to an approximate 9.5% less hydrogen consumption than in the actual reference vehicle.


Introduction
In the ongoing world-scale mission of replacing fossil fuels with clean energy, the technology of hydrogen-powered fuel cells (FC) may come as a promising candidate for supplying power in both stationary and automotive applications [1], the latter being in the focus of this work. Quite a few types of fuel cells exist, but the polymer electrolyte membrane fuel cell (PEMFC) seems to be the technology of choice when it comes to automotive application. This is because PEMFCs have a high power density, high efficiency, and fast start-up ability [1]. Obviously, for the fuel cell technology to compete with combustion engines, it must perform at least as good as them. This requirement poses several challenges in terms of FC stack lifetime and safety restrictions [2]. To increase the lifetime of the stack as well as operate it safely, an appropriate control strategy is of crucial importance. Throughout the last years and even decades, the topic of fuel cell control has inspired the work of many scientists and engineers.
Different approaches can be found in literature dealing with the challenge of fuel cell modeling and control. One can reduce the complex problem and control only one subsystem of the fuel cell (e.g., cathode or anode) [3][4][5][6] or examine the whole system [7,8], depending on the problem that needs to be solved. An important and commonly encountered issue that needs to be addressed in fuel cell control is starvation avoidance, usually formulated as imposing a limit on the stoichiometry of hydrogen and/or oxygen [4]. A common way of controlling the fuel cell system is by setting reference values for the cathode/anode pressure, hydrogen/oxygen stoichiometries, voltage, etc. as seen in [4,9,10].
To increase the practical usability of the fuel cell control test results in an automotive application, it is important to conduct the research on a vehicle drive cycle. Much of the research considering power demand tracking done in the past is not based on a vehicle drive cycle, but instead, on a step reference power trajectory generated to demonstrate a certain effect of the control task (e.g., stoichiometry control, pressure constraints, battery/FC interaction, etc.) [11,12].
In the context of this study, the control of the fuel cell subject to a dynamic drive cycle is of much greater practical relevance. Various test scenarios have recently been reported which rely on the New European Driving Cycle (NEDC) as the validation drive cycle for the control of a fuel cell vehicle [13][14][15]. The Worldwide Harmonised Light Vehicles Test Procedure (WLTP) also developed in 2015 has been used as the validation drive cycle for several studies concerning fuel cell control [16,17].
In this work, the power demand measured from a real fuel cell vehicle (The vehicle has been built by AVL List GmbH as part of the Keytech4EV project (no. 855237) funded by the Austrian Research Promotion Agency (FFG).) has been used for validation of the proposed control concept. A simulation study has been conducted on the measured power demand using a nonlinear mass-driven zero-dimensional transient fuel cell model. The control goal is to track the power demand from the acquired data of the real vehicle while ensuring safe operation in terms of starvation avoidance as well as respecting the cathode and anode pressure safety limits along with the pressure difference across the membrane safety limit. Also, efficiency is to be maximized by minimizing the internal voltage drop due to the activation, ohmic, and concentration losses, as well as the power, needed to run the compressor used to provide air for the cathode. To fulfill the goals of power tracking and efficiency maximization, while adhering to the mentioned constraints, the model predictive control (MPC) approach has been chosen which is quite popular in fuel cell control [18][19][20][21][22], mainly because of its ability to handle constraints. A common approach of using MPC is to linearize the system around a steady-state operating point (OP) and use one of the few simple standard formulations of MPC for linear systems. This method works fine for regions relatively close to the OP around which the model has been linearized, but fails if the system operates in a region too far from the OP. The power demand used in the study ranges from 0 to 60 kW so an MPC developed for the system linearized around a single OP would fail to fulfill all the control goals. To cope with the nonlinearity, a successive linearization based MPC (SLMPC) [23][24][25][26] is used meaning that the system is continuously linearized every time step during the simulation and a linear MPC developed for that particular point in the state-space ensuring the validity of the MPC at all times. However, the linearization point is not a steady-state one and the treatment of this is described in Section 4. In terms of PEMFC vehicle control, to the best of the authors' knowledge, there is no research conducted on a real data drive cycle using successive linearization based model predictive control.
The paper is organized as follows: In Section 2 the zero-dimensional model used for the simulation study is presented. In Section 3 the vehicle description is brought forth while in Section 4 the methodology of the SLMPC is shown. The results consisting of the simulation outcome and its comparison with the data measured from the real vehicle are presented in Section 5. Finally, Section 6 brings the conclusions of this paper along with the direction of future research.

Fuel Cell Model
In this section, the FC model used for the control study is presented. The schematics are shown in Figure 1. The focus of the work is not in the model itself, therefore, not all the details will be brought forth, but rather the model structure. For further information on the model equations, the reader is referred to [27].
Modeling assumptions: • The operating temperature is assumed constant at a value of 70°C. • The anode is operated in "dead-end" mode, no recirculation is considered in the present model setup. • Inlet humidities are assumed to be constant. • The effect of liquid water on the voltage is not considered.
The whole system model can be viewed as a collection of submodels describing different parts of the fuel cell: Gas diffusion layer (GDL) on the cathode side • Electrochemical model

Cathode Submodel
The cathode side of the fuel cell is assumed to be a series of 3 interconnected zero-dimensional (0D) volumes meaning that there is no spatial distribution along or across the channel leading to valuable numerical benefits while maintaining a decent level of accuracy. Air supply coming from the compressor enters the first volume referred to as the cathode supply manifold (sm) and its state is described by the cathode supply manifold pressure (p ca sm ) which is modeled using the ideal gas law. The second volume is the cathode main manifold. The flow of air from the supply manifold to the cathode main manifold is described using a linearized nozzle equation. In the second volume, the states describing the system are the masses of oxygen, nitrogen, water vapor, and liquid water (m ca O 2 , m ca N 2 , m ca vap , m ca liq ). Finally, the third volume is the cathode exit manifold (em) described by the corresponding cathode exit manifold pressure (p ca em ) which leads the exhaust air into the atmosphere. At the end of the exit manifold, there is a backpressure valve. On the cathode side, the actuating variables used by the controller during operation are the mass-flow of air entering the supply manifold (W ca in ) and the backpressure valve opening (α ca ).

Anode Submodel
Just like the cathode side, the anode is modeled as a series of three interconnected 0D volumes. The states describing the supply and exit manifold of the anode are analogously the supply and exit manifold pressures (p an sm and p an em ). The anode is supplied by hydrogen coming from a highly pressurized tank. In the main manifold, the states describing the system are the masses of hydrogen, nitrogen, water vapor, and liquid water (m an H 2 , m an N 2 , m an vap , m an liq ). The valve connecting the exit manifold to the ambient is called the purge valve and it is normally closed during operation leading to a so-called "dead-end anode" operating mode. In real systems, the unused hydrogen is usually recirculated and fed back to the anode inlet. In this simulation study, the anode is modeled as dead-end. The actuating variable on the anode side is the hydrogen mass-flow entering the anode supply manifold (W an in ) whereas the opening of the purge valve (α purge ) is considered to be a disturbance.

Gas Diffusion Layer Submodel
In this model, the GDL on the cathode side is viewed as an additional 0D volume containing the masses of oxygen, nitrogen, and water vapor (m GDL O 2 , m GDL N 2 and m GDL vap ). The dynamics of the oxygen mass in the GDL is due to the diffusion of oxygen from the cathode, as well as the consumption of oxygen due to the reaction. The nitrogen mass in the GDL changes because of the nitrogen diffusion from the cathode as well as the permeation of nitrogen through the membrane to the anode side. As for the water vapor mass, there is the diffusion from the cathode, water formation from the reaction, membrane water flux (electroosmotic drag and backdiffusion), and water condensation. On the anode side, the GDL proved to be unnecessary to include in the model as hydrogen is very diffusive so the dynamics of the potential hydrogen mass in the GDL could be neglected.

Electrochemical Model
To couple the thermodynamical part of the model described in the above subsections to the actual output of the system that is of primal interest for this work (voltage and power), an electrochemical model is needed and its implementation is based on [28]. The actuating variable regarding the electrochemical part of the model is the stack current (I).

Power and Efficiency
The power produced by the fuel cell stack P st = V I is defined as the product of the stack voltage V and the stack current I. The net system power is then defined as the difference between the stack power, compressor power P cp , and the power of all the other auxiliary components P aux : As only the compressor power is part of the model and it is the dominant parasitic loss, the power of the other auxiliary components is neglected leading to P aux = 0: This assumption is justified by the fact that the difference between the measured net power and the net power calculated assuming P aux = 0 is small, only 3%. Fuel cell efficiency is defined as the ratio between the power produced by the stack P st and the power of the fuel P H 2 = E 0 N cells I [1]: Energies 2020, 13, 5353

of 16
where E 0 is the open-circuit voltage (see Figure 2) and N cells is the number of cells in the stack. However, as the compressor power must be taken into account, it makes sense to define the system efficiency η sys :

Overview
Combining all of the above-mentioned submodels in which the dynamics of the states are described using first-order differential equations, one obtains a nonlinear state-space model of the form: with x being the state vector, u being the input vector and y being the output vector, as defined below: where a m,d is an additional state describing the dynamic membrane wetting and drying, whereas the outputs of the system are • Net power of the system (P net ) • Pressure difference across the membrane (∆p = p an sm − p ca sm ) • System efficiency (η sys )

Vehicle as Validation Data Generator
In this section, the vehicle from which the validation data for the controller has been obtained is presented. To realize the goal of building an FC car, an already existing hybrid construction has been used. The combustion engine from the vehicle was removed and replaced with the fuel cell system while the battery is kept from the original configuration. For the new architecture, an electric motor from another vehicle was used. The vehicle is powered by a 300 cell fuel cell stack with a maximum power output of 68.4 kW. There are three hydrogen tanks in the vehicle that provide the necessary fuel. The actual vehicle is shown in Figure 3a

SLMPC Design
In this section, the controller design will be presented, however, a few key-points are to be mentioned before presenting the mathematical formalism of the SLMPC.
It is important to clearly visualize the end goal of this study which is: • Fulfill the power demand trajectory from the real vehicle shown in Figure 3a • Safe operation • Efficient operation Each of these points is explained as follows: Fulfill the power demand In a fuel cell-battery hybrid configuration, there always exists a so-called energy management system (EMS) which splits the power demand between the battery and the fuel cell stack always following certain rules (e.g., respecting the limit on the state of charge (SoC) of the battery, etc.). The power demand for each of the components gets forwarded to their respective low-level controllers which then generate the signal for the actuators such as the inlet mass-flows of air and hydrogen or the position of the backpressure valves. The measured power demand for the fuel cell coming from the EMS of the vehicle is used to validate the control concept shown in this paper.

Safe operation
There is a number of conditions that degrade and/or destroy the fuel cell system. In this paper, some of them are directly considered: • Cathode/Anode absolute pressure-During operation, the pressures might rise or drop to a value which would, in a real setup, cause irreversible damage. If the pressure in either channel is too high, the components experience mechanical stress which can lead to fuel cell destruction. On the other hand, if the pressure is too low, starvation may occur, which is described in more detail below. Naturally, the controller must "know" that it cannot allow the system to operate outside the safe pressure range. • Starvation-Power is mainly provided by drawing a certain amount of current from the fuel cell stack. Current is generated by the reaction of hydrogen and oxygen, the basic principle of how does a fuel cell work. The higher the current, the faster the reactants get consumed. The task of the controller becomes obvious-a sufficient amount of reactant mass must be supplied at all times. If that would not be the case, the electrons which create the current would then come from the platinum in the catalyst layer or the carbon from the gas diffusion layer. Because of starvation, the catalyst or the GDL can be consumed in a matter of seconds destroying the fuel cell [30]. In our setup, a minimum amount of oxygen/hydrogen mass is required to always be present to avoid starvation. • Pressure difference across the membrane-Similar to the problem of absolute pressures, it is crucial to control the pressure difference between the anode and cathode at all times. Too big of a pressure difference causes stress on the membrane and if the pressure difference becomes negative i.e., the pressure on the cathode side becomes greater than on the anode side, other unfavorable effects can occur, such as pushing the water (generated on the cathode side) over to the anode. • Purging-As there is air on the cathode side instead of pure oxygen, the effect of nitrogen which does not participate in the reaction must be taken into account. It diffuses through the membrane to the anode side, accumulating and effectively lowering the availability of hydrogen for the reaction potentially causing local starvation. If, in turn, the controller would want to keep a sufficient reserve of hydrogen, it would pump in more and more hydrogen, potentially violating the pressure restriction. Therefore, the necessity of clearing (purging) the anode of nitrogen is obvious. Purging is done by opening the purge valve for a short period of time and then closing it again to not waste hydrogen into the environment. The opening is commonly triggered by a Coulomb counting strategy.

Efficient operation
Two effects should be minimized to achieve efficient operation: voltage losses and compressor power.

•
Voltage losses-Due to the reaction kinetics, there are inevitable voltage losses in fuel cell operation [1]. To increase efficiency, these voltage losses should be minimized which suggests operating at higher voltages as it is obvious from Equation (3) and Figure 2. • Compressor power-To supply the air needed for the operation, a compressor is used which uses the power generated by the fuel cell. One of the goals of the controller is to minimize the usage of the compressor which would increase system efficiency as is visible from Equation (4).

Summary
Control engineering-wise, the above restrictions on the system are formulated as state constraints for the SLMPC. The fact that having constraints provides safe operation is one of the reasons for choosing an MPC approach since coping with constraints is one of the strong points of the model predictive control concept in general. The purge signal is considered to be a disturbance sent to the MPC.
Since the fuel cell system summarized in Equation (7) is nonlinear, a simple linear method would not be sufficient to successfully control it, thus, in this work, a successive linearization based model predictive control approach is used. The advantage of the SLMPC over nonlinear MPC is in the guaranteed existence and uniqueness of a global minimum since the cost function is quadratic. The basic idea is to linearize and discretize the system every sample and develop a linear MPC for that particular instantaneously linearized system. That way, the linear model represents the nonlinear system well throughout the prediction horizon provided that the predicted sequence of optimal control moves does not take the system too far from the linearization point. However, the mentioned problem was not observed in this research. The steps of developing the SLMPC can be found in detail in [23] and here we bring forth the most important components of the algorithm.

Linearization of the Nonlinear System
At each sample, the model is linearized around the current point (x k , u k ). The current sample instant is denoted by the index k. The linearization is carried out by evaluating the Jacobian matrix of the function f defined as at every point. With an equivalent notation, we define B c = ∂ f ∂u , C c = ∂h ∂x and D c = ∂h ∂u and arrive at the definition of the linearized system: Since the linearization point is not a steady-state one, the expression f (x k , u k ) is different from zero. By introducing the following definition: the linearized system can be written as follows:

Discretization of the Linearized System
After the system has been linearized, it is discretized using zero-order hold discretization as holds with T s being the sampling time and I being the identity matrix of appropriate size. Here, also holds. By appropriately extracting the system matrices A d , B d , C d , and D d as well as the equilibrium offset terms K x d and K y d , one obtains the system: for which the system matrices A d , B d ,C d and D d obtained at every sample instant k are assumed constant throughout the prediction. Here the index i is used to denote the prediction steps. It ranges from 1 to N p with N p being the prediction horizon. By taking a difference operation on both sides of Equation (19), one obtains By defining ∆x i = x i − x i−1 and ∆u i = u i − u i−1 , then Equation (21) becomes: It has to be noted that the affine term K x d vanishes when the difference operator is applied since the linearized model used for prediction is unchanged throughout the prediction. Standard procedure for linear MPC is now applied and after the control move ∆u has been calculated, the process of linearization, discretization, and linear MPC formulation is reiterated. This formulation is not bound to the system configuration at hand and can be generally applied.

Control Goals
The goal is to track the power demand from the vehicle while ensuring safe and efficient operation. Outputs to be controlled: Reference values: • The reference value for the power is actually the power demand acquired from the vehicle. • The membrane pressure difference is, if possible, kept at 200 mbar. • The efficiency is maximized, having a reference value of 1.
In the SLMPC formulation, the controller minimizes the cost function: with Q y and R being the output and input weighting matrices, respectively. N c is the control horizon, y(k + i) is the output prediction.

Constraints
To ensure safe operation, the following state constraints are applied m an H2 ≥ 0.5 g 1 bar ≤p ca ≤ 2.4 bar (27) 1 bar ≤p an ≤ 2.4 bar (28) 100 mbar ≤∆p ≤ 300 mbar (29) Because of physical limitations, constraints on the actuating variables have to be imposed as well: The vector of control moves is the solution of the optimization Following the receding horizon principle, only the first step ∆u k+1 is applied to the system.

SLMPC Numerical Values
The sampling time for the SLMPC was T s = 20 ms and the prediction horizon was N p = 50 (1 s). The control horizon was N c = 25. The output weighting matrix has been brought in Equation (36).
The weighting matrix shows that the controller tries to follow the power demand and to keep the pressure difference at 200 mbar as well as operate efficiently. To solve the optimization problem (Equation (35)

Results and Discussion
In this section, the vehicle power demand tracking while ensuring safe and efficient operation is presented.

Power Demand Tracking
In Figure 4a the tracking of the system power demand is shown along with the actual net power measured from the vehicle. The part of the drive cycle before 400 s is omitted because the vehicle was not in its normal operating state during that time, but rather, it experienced a few emergency shut-down events which are not representable by the model at this point. From the presented drive cycle fraction, it is obvious that the controller can fulfill the power demand as shown in Figure 4a. In Figure 4c a detail of the power demand tracking is brought for demonstration purposes.

Safe Operation
The controller shows its capability of ensuring safe operation in various aspects. Firstly, it cankeep the pressure difference across the membrane between its bounds Equation (29) as shown in Figure 4b. Examining the segment of the drive cycle shown in Figure 4d, a few key points should be mentioned. The power demand during the shown segment is the highest (60 kW) so purging events happen more often than at other instances. The SLMPC can react and keep the pressure difference within the safety limits due to the knowledge of the upcoming purging event and thus proving to be a promising concept for fuel cell dynamic control. The conventional control procedure in the vehicle was not able to maintain the pressure difference value within the safety range. Secondly, the controller can keep the system from operating in starvation conditions by always having a reserve of reactant mass as shown in Figure 4e,f. It is worth noting that the oxygen and hydrogen masses shown in Figure 4e,f are not measured, but are the internal states of the fuel cell given by the model. In future work, if the model is validated and proven to represent reality accurately, the knowledge of internal states can be of great importance, as shown in this work.
No results were shown regarding the absolute pressure safety limits (Equations (27) and (28)) as they were not at risk of being violated throughout the simulation.

Efficient Operation
The system efficiency comparison between the proposed control concept and the actual vehicle operation is shown in Figure 5a. The SLMPC operates usually at higher efficiencies, except during the periods of high power demand where both cannot be achieved. The authors acknowledge that the reason for higher efficiency in most of the drive cycle is partly due to the predictive capability of the controller which is not available in real life as the future power trajectory is generally not known. Further investigation considering that fact is currently underway.
Examining Equation (4), one can deduce that increasing efficiency implies operation at lower currents as well as higher voltages. In addition, the compressor power should be as small as possible. As already mentioned, except for the high power demand periods, i.e., from 565 s to 590 s, the current ( Figure 5b) and compressor power (Figure 5c) are lower and the voltage (Figure 5d) is higher, as it should be. The temperature is not controlled in this simulation study and is assumed constant with a value of 70°C. The measured stack temperature in the vehicle has been observed to be between 60°C and 75°C as seen in Figure 5e. The voltage of the fuel cell is increased when the ohmic losses are decreased. The ohmic resistance is inversely proportional to the protonic conductivity σ: which increases with the membrane water content λ m : The values of e 0 , e 1 , and e 2 are parameters taken from the literature and through fitting. The effect of the membrane water content is included in the electrochemical model, thus, the SLMPC "knows" that efficiency is high under conditions of higher humidity and acts accordingly. Even though humidity is not actively manipulated, it is controlled with the available control inputs presented in Equation (7). To increase the membrane water content and by extension, the efficiency, the controller can, for example, close the cathode backpressure valve and/or reduce the air inflow to keep the water vapor from flowing out, preventing membrane dryout. The explained implicit consideration of the membrane water content is exactly what happens as seen in Figure 5f, keeping the membrane hydrated. The problem of flooding is currently not included in the model, but research in that respect is underway. However, as visible from the measured voltage in Figure 5d, no serious breakdown happened which could be attributed to the effects of liquid water. The authors have also been informed by the vehicle manufacturers that draining events happen quite often, thus, the quantity of liquid water present during operation is minimized.

Hydrogen saving
The rate of hydrogen consumptionṁ H 2 is given by Faraday's law: with I being the stack current, F the Faraday constant, N cells the total number of cells, and M H 2 the hydrogen molar mass. As already described above, from the equation alone is obvious that saving hydrogen implies operation at lower currents as is exactly the case as shown in Figure 5b. To calculate the actual consumed hydrogen, it is necessary to integrate Equation (39) over time. The results are shown in Table 1: The results indicate potential hydrogen savings of 9.54%.

Conclusions
In this paper, a simulation study using successive linearization based model predictive control has been presented. The proposed control concept was able to track the power demand of a hydrogen-powered fuel cell vehicle while ensuring safe and efficient operation. Comparison with the actual vehicle controlled by a set of PI controllers showed that the SLMPC approach is a promising one in the future of control of fuel cells in automotive applications.