1 Introduction

A fuel cell, which converts chemical energy of a fuel directly to electricity continuously with a electrochemical reaction is considered as a clean and efficient power source. Among all types of fuel cells, proton exchange membrane fuel cell (PEMFC) is most promising to be used in the engine of an electric vehicle, with advantages of low operation temperature, high efficiency, low noise, and zero pollution [13].

A fuel cell system consists of a stack and various ancillary equipments including air compressors, cooling water circulation, humidifier, pumps, and electrical control equipment. Among all the ancillary equipments, the power consumption of air compressor is the greatest, typically accounting for up to 80 % power of the overall ancillary equipments and 15 %–20 % of the fuel cell system [2, 4]. For a fuel cell stack, air flowrate must be greater than the amount needed by the electrochemical reaction, and the oxygen excess ratio (OER), which is the ratio between the flowrate of oxygen provided and reacted, is critical to ensure the system stability and reliability. If the OER is too low, even though higher than 1, it is likely to cause “oxygen starvation” [5, 6] and results in cell reversal, which is harmful to the stack. On the other hand, a higher OER will lower the concentration difference in cathode flow field and improve the fuel cell performance, while greater air flow results in higher power consumption for the air compressor and lower system efficiency, which is called “oxygen saturation.” In addition, the air pressure in cathode flow field of the fuel cell stack and the pressure difference between both sides of proton exchange membrane must be maintained in a certain range during operation. Air flow control is important to maintaining the reliability and efficiency of the system, and different air flow control techniques have been provided by researchers [710].

OER was first proposed by Pukrushpan et al. [11] in linear-quadratic-Gaussian (LQG) techniques to control air supply subsystem, where it was simplified to be a constant. Based on Pukrushpan’s model, Chang et al. [7] analyzed the variation of a fuel cell system’s net power with different stack temperatures and membrane water contents, and discovered that the optimal value of OER changes with different system parameters. They put forward a real-time extremum seeking control method. This control method is simple, and can achieve maximum power over the entire operating range. But the periodic perturbation in the method may produce unacceptable oscillations in output power, and its complicated penalty function will lead to long convergence time. Arce et al. [12] proposed two control objectives aimed at satisfying the oxygen starvation avoidance criterion and the maximum efficiency criterion, and analyzed two OER values in “oxygen starvation” state and “maximum efficiency” state on 1.2 kW fuel cells test bench, and a control architecture for a fixed OER was designed. An explicit model predictive control method combined with proportional integral (PI) control was adopted for controlling air flow to prevent oxygen starvation and guarantee the optimal transient response of the system, but the control algorithm does not maximize the net power of the fuel cell.

In this paper, based on the fuel cell system model built in [8], optimal OERs under different stack currents and temperatures were analyzed. In order to ensure the maximum net power output, a control strategy by combination of feed forward control and fuzzy feedback control was proposed. A reference value for the air flow of compressor was acquired by the optimal OER regulator, and then the compressor’s air flow was adjusted by the fuzzy controller according to the reference value. The simulation results show that the control method can make the fuel cell system work with an optimal OER.

2 Fuel cell system for vehicle

A fuel cell system for vehicles is composed of four subsystems, as shown in Fig. 1: (i) air flow supply system to the cathode, (ii) hydrogen flow supply system to the anode, (iii) cooling system, and (iv) humidification system. The air flow supply subsystem includes a compressor, a cooler, a water separator, a back pressure valve, connecting pipes, etc., and is used to provide requisite air flow into the stack cathode. Hydrogen flow supply subsystem includes hydrogen tank, a solid valve, a recirculation pump, a purge valve, connecting pipes, etc. It is used to provide sufficient hydrogen flow into the stack anode.

Fig. 1
figure 1

Fuel cell system for vehicle

Air temperature will elevate during compressing, so an air cooler is needed to cool the air before it enters the stack. A humidifier is used to add moisture into the air flow to hydrate the proton exchange membrane for higher proton conductivity. On the cathode side of the stack, the electrochemical reaction occurs between oxygen and protons to form water, together with heat released. In order to keep the stack temperature, coolant must be pumped into the stack and take the heat out and then released into circumstance with a radiator. The water separator is used to recover the water in the exhaust air. The back pressure valve is used to keep a suitable air flow pressure in the stack.

Up to now, a number of fuel cell models have been built for different purposes [4, 13], among which the models reported in [8, 1114] belong to the control-oriented model. The fuel cell system model in this paper is a theoretical model developed from [8, 11], and adopts a twin screw compressor. Compared with the centrifugal compressor, a twin screw compressor has the following advantages: (1) its nominal rotation speed is almost an order of magnitude lower than a centrifugal compressor, which makes the system more reliable; (2) its flow curve in compressing map is almost a straight line at a constant speed, and is impacted by pressure far less than a centrifugal compressor, which makes the system control easier; (3) a twin screw compressor does not have “surge” phenomenon, which makes control system simpler. The twin screw compressor modeling and the compressor map are developed from [15].

The twin screw compressor model is separated into two parts, as shown in Fig. 2. The first part is the static compressor map which determines the air flow rate through compressor and compressor power. The second part is adjustment. Typically, the operation environment of a compressor is different from the test environment, so its air flow and power must be modified according to the thermodynamic equation.

Fig. 2
figure 2

Compressor block diagram

The inputs to the model include downstream pressure psm, rotation speed Ncp, air pressure patm, temperature Tatm, pressure p0 (1.013 bar), and temperature T0 (293.15 K) in Map test circumstances. The rotation speed is determined by compressor motor torque and torque required. The compressor is connected to supply manifold, and its downstream pressure is equal to the pressure in supply manifold, which is computed by its downstream cathode flow field.

The compressor power Pcp could be indexed from the compressor power map according to the rotation speed of the compressor. The air flow rate Wcp is determined by the compressure ratio and rotation speed from the compressor flow map. Then the revised air flow rate Wcp_re is calculated by

$$ W_{{{\text{cp\_re}}}} = \frac{{T_{\text{amb}} }}{{T_{0} }} \cdot \frac{{p_{0} }}{{p_{\text{amb}} }}W_{\text{cp}} $$
(1)

The temperature of the air leaving the compressor Tcp is calculated with equations listed in Ref. [11].

The main parameters used in the model are given in Table 1. Fuel cell stack type is BALLARD Mark 902 (85 kW).

Table 1 Fuel cell system model specification [16]

3 OER performance and air flow control

Since the air compressor takes majority part of the auxiliary equipment’s power consumption, other auxiliary equipment’s power can be ignored, and the net power of the fuel cell system, Pnet, could be calculated as

$$ P_{\text{net}} \, = \,V_{\text{st}} I_{\text{st}} \, - \,P_{\text{cp}} . $$
(2)

where Vst and Ist are voltage and current of fuel cell stack, respectively; Pcp is power of the compressor.

OER \( \lambda_{{{\text{O}}_{2} }} \) is often used to indicate the air flow condition, which is defined as

$$ \lambda_{{{\text{O}}_{2} }} = \frac{{W_{{{\text{O}}_{ 2} , {\text{ca}}}} }}{{W_{\text{rec}} }}, $$
(3)

where \( W_{{{\text{O}}_{ 2} , {\text{ca}}}} \) is the oxygen flow rate into the stack cathode, and Wrec is oxygen flow rate participated in electrochemical reaction in stack cathode.

If \( \lambda_{{{\text{O}}_{2} }} \) <1, i.e., oxygen flow rate in the stack is less than the amount required for a given current value, then the fuel cell system is in the state of oxygen starvation. If \( \lambda_{{{\text{O}}_{2} }} \) ≫1, i.e., oxygen flow rate in the stack is much larger than the amount required for a given current value, then the fuel cell system is in the state of oxygen saturation. High \( \lambda_{{{\text{O}}_{2} }} \) corresponds to more oxygen supplied to the cathode, which improves the power generated by the stack. However, if \( \lambda_{{{\text{O}}_{2} }} \) is too large, the net power Pnet will decrease due to the excessive power demanded by the compressor, as shown by (2), which makes the fuel cell system in the “oxygen saturation” state. As a result, there exists an optimal \( \lambda_{{{\text{O}}_{2} }} \) value that maximizes Pnet by trading off stack power production and compressor power consumption.

3.1 OER performance

The relation between the net power and OER for various stack current is called OER performance. On a given stack current, there is an OER performance curve (Fig. 3). As shown in Fig. 3, there is a maximum net power point, where the corresponding OER value is defined as the optimal OER for each current density value. The optimal OER points are signed with asterisk * and all the points are in [1.990, 2.608]. The optimal value decreases as stack current increases in the interval [50, 80 A], then increases roughly in the interval [90, 200 A], and decreases again in the interval [210, 300 A].

Fig. 3
figure 3

OER performance of the fuel cell system for vehicle. Stack current changes from 50 to 300 A with a 10 A step length

The OER performance of this model is different from that of [7], where the optimal value decreases roughly as stack current increases. The reason is that different types of compressor are used in the two models. In the case of constant rotation speed, the air flow rate through the twin screw compressor is affected little by compressure ratio (in range 1.5–3) [15]. If the effect is ignored, the air flow rate is only determined by rotation speed. The higher the rotation speed, the greater the air flow rate. Yet the air flow rate through the centrifugal compressor is determined by both rotation speed and compressure ratio [9].

Stack voltage is affected by stack temperature. According to (2), the net power is also affected by stack temperature. The relationship between net power and stack temperature is shown in Fig. 4, where stack current Ist is equal to 180 A. Table 2 lists the optimal OER value \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \) and maximum net power Pnet_max at different stack temperatures Tst.

Fig. 4
figure 4

Net power at different stack temperatures

Table 2 Optimal OER and maximum net power at different temperatures

As shown in Fig. 4, for a constant stack current, the higher the stack temperature, the greater the net power. Higher stack temperature can improve the system performance, because the electrochemical reaction is more active. Seen from Table 2, the optimal value \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \) decreases a little bit between 2.6 and 2.7 with the rising of temperature. According to further analysis, we can see that if OER changes from 2.6 to 2.7 at the same temperature, the change of net power does not exceed 30 W, which is about 0.068 % of the maximum net power. It is clear that \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \) is affected weakly by the stack temperature.

3.2 Air flow control

The primary objective of air flow control is to avoid “oxygen starvation” and “oxygen saturation” and assure safe OER and rapid transient response. In order to realize the maximum net power, OER should be adjusted near the optimal value by changing the air flow into cathode. Figure 3 demonstrates that once OER exceeds the optimal value, the parasitic power consumption increases greatly, which deteriorates the fuel cell system. The greater the stack current, the more prominent this feature. The fuel cell system for vehicle should work near the optimal OER to obtain good performance.

The above analysis shows that the stack temperature has a weak effect on the optimal OER. For the sake of control convenience, temperature influence is ignored so that in the case of the constant temperature, we can obtain the corresponding relation between the optimal OER and the stack current. The control method is shown in Fig. 5. The optimal OER regulator includes a lookup model and a computation model. The lookup model is a relationship table between optimal OER and stack current. It is used to obtain the optimal OER \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \) according to the stack current Ist. The computation model computes the reference value of the air flow of the compressor \( W_{\text{cp}}^{ *} \) with the known stack current Ist and optimal OER \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \). The fuzzy controller (FC) controls the compressor motor voltage Vcm to adjust the air flow through the compressor.

Fig. 5
figure 5

Control block diagram

In the computation model, the reference value of the air flow \( W_{\text{cp}}^{ *} \) is calculated as in [6]:

$$ W_{\text{cp}}^{ *} = \left[1 + \frac{{M_{\text{v}} }}{{M_{\text{a}}^{\text{atm}} }}\frac{{\phi_{\text{atm}} p_{\text{sat}}^{\text{atm}} }}{{(p_{\text{atm}} - \phi_{\text{atm}} p_{\text{sat}}^{\text{atm}} )}} \right]\frac{1}{{y_{{{\text{O}}_{ 2} }} }}\lambda_{\text{best}} M_{{{\text{O}}_{ 2} }} \frac{{nI_{\text{st}} }}{4F} , $$
(4)

where ϕatm is air relative humidity; \( p_{\text{sat}}^{\text{atm}} \) is the vapor saturation pressure with relative humidity ϕatm; patm is atmospheric pressure; Mv is the molar mass of vapor; \( M_{\text{a}}^{\text{atm}} \) is the air molar mass with relative humidity ϕatm; \( M_{{{\text{O}}_{ 2} }} \) is oxygen molar mass; n is the number of single fuel cell; F is Faraday’s constant; and, \( y_{{{\text{O}}_{ 2} }} \) is oxygen mass fraction in the air and is calculated by

$$ y_{{{\text{O}}_{ 2} }} = 0. 2 1M_{{{\text{O}}_{ 2} }} /M_{\text{a}}^{\text{atm}} . $$
(5)

A typical fuzzy controller is selected, whose block diagram is shown in Fig. 6, where error signal e is input, compressor motor voltage vcm is output, ke and kec are quantity coefficients of error and error change rate, respectively, and ku is proportion coefficient. Different parameters and their relations will affect the control characters of the fuzzy controller, especially dynamic characters. In order to attenuate the steady-state error, the incremental mode of output is adopted in the fuzzy controller.

Fig. 6
figure 6

Fuzzy controller block diagram

4 Simulation results and analysis

Simulations were performed to analyze the proposed OER control method for the fuel cell system. The stack temperature was set to 80 °C, and membrane water content to 14. Three parameters of the fuzzy controller are fixed using the optimization method, namely:

$$ k_{\text{e}} = 1 4. 9 7 6 4, \quad k_{\text{ec}} = 0. 1 9 7 2,\;\;\;{\text{and}}\quad k_{\text{u}} = 0. 5 5 3 2. $$

When stack current Ist is 180 A, the optimal value \( \lambda_{{{\text{O}}_{2} {\text{\_}}{\text{op}}}} \) is obtained to be 2.608 in the lookup table. According to Formula (4), the reference value of air flow rate through the compressor is calculated to be 74.27 g/s. Setting the stack current to be a step function from 30 to 180 A at t = 0, the simulation result is shown in Fig. 7. It is seen that the rise time of the air flow rate is less than 0.8 s with no overshoot, and the stable air flow rate Wcp (Fig. 7a) is 74.24 g/s with a small error 0.02 g/s. The air pressure (Fig. 7b) and oxygen partial pressure (Fig. 7c) in the stack gradually increase to 1.6821 and 0.17062 bar, respectively, at about t = 0.9 s. In the stack, oxygen flow rate increases with air flow rate gradually, and the required oxygen flow rate does not change under constant stack current, so the OER value \( \lambda_{{{\text{O}}_{2} }} \) (Fig. 7d) increases gradually. The stable value of \( \lambda_{{{\text{O}}_{2} }} \) is 2.617, the optimal value is 2.608, and the error is −0.009. One can see that the OER value \( \lambda_{{{\text{O}}_{2} }} \) promptly changes from oxygen starvation state to hyperoxic state in the initial stage, and it takes only 0.8 s for OER to reach its stability.

Fig. 7
figure 7

The step response of stack current. a air flow rate. b cathode pressure. c partial oxygen pressure. d OER

The stack current is a series of step functions (Fig. 8a). When the stack current varies, the optimal OER (the dotted line in Fig. 8c) and the reference value of the air flow through compressor (Fig. 8b) change, which are counted by the optimal OER regulator. On the basis of the reference value (the dashed line in Fig. 8b), the FC adjusts the motor voltage (Fig. 8d) to regulate the air flow through the compressor (the solid line in Fig. 8b). When current steps up (at 4, 8, 16, and 28 s), the oxygen amount required suddenly rise, and the FC adjusts the motor voltage (Fig. 8d) according to the air flow rate and its change rate, to change the air flow through the compressor. Different from the quick response of the stack current, the air flow rate increases laggardly (Fig. 8b) because of the hysteresis effect of the compressor response, causing instantaneous drops of OER (solid line in Fig. 8c). Simultaneously, a sudden decrease of oxygen partial pressure in the stack cathode causes a sag of the stack voltage (Fig. 8e). When current steps down (at 12 and 22 s), the situation is just the opposite. The net power of system (Fig. 8f) changes according to the transient responses of the stack current and voltage.

Fig. 8
figure 8

The response for a series of step stack current. a stack current. b air flow rate. c OER. d motor voltage. e stack voltage. f net power

5 Conclusions

Air flow control is very important to a fuel cell system for vehicles. Based on a fuel cell model for vehicles, the relation between OER and net power under various stack currents, and the relation between OER and stack temperature were analyzed. The results show that for a fixed stack current, stack temperature has weak influence on the optimal OER, which could be ignored for the simplification of controller design. In order to ensure the fuel cell system to work at the optimal OER, a control strategy with an optimal OER regulator and air flow feedback control (fuzzy control) was proposed. When stack current changes, the optimal OER regulator can promptly compute the reference value of air flow rate corresponding to the optimal OER, and the FC controller controls the compressor motor voltage to change air flow in time. Simulation results show that the control strategy could make fuel cell system work at the optimal OER whether for a given load or for a variable load. In addition, the designed controller for fuel cell system has good dynamic and steady-state characteristics.