**2. The Energy Management Unit of the Fuel Cell Hybrid Power System**

The diagram of the FCHPS Energy Management Unit (EMU) is presented in Figure 1. The setting block will select one of the RTO strategies proposed in the literature [17,29,38,44,56–59] (see the right side of the Figure 1 and Table 1, where the references are mentioned in the last column) in order to evaluate the fuel economy under the same load profile.


**Table 1.** Real-Time Optimization (RTO) strategies.

The performance under constant load could be measured by different indicators, such as the generated FC net power (*PFCnet*) or the fuel consumption efficiency (*Fueleff* - *PFCnet*/ *FuelFr*), which are both important to be optimized. Thus, the optimization function used in this study will linearly mix these performance indicators as below:

$$f(\mathbf{x}, A\text{ir}Fr, \text{Fuel}Fr, p\_{\text{load}}) = P\_{\text{FCnet}} + k\_{\text{fuel}} \cdot \text{Fuel}\_{eff} \tag{1}$$

where *x* is the state vector, *pload* the disturbance, and the fuel flow rate (*FuelFr*) and the air flow rate (*AirFr*) are the control variables of the FC power. Also, note that another way to control the generated FC power on the DC bus is via the boost DC–DC converter, which is usually used as an interface for the FC system to the DC bus. So, three input control variables of the FC system will be considered in this study to control the FC net power generated on the DC bus.

The objective is to maximize the optimization function (1). The weighting coefficient *kfuel* [liters per minute (lpm)/W] will be adjusted to explore the best fuel savings obtained for all RTO strategies using constant load and variable profile for the load.

The dynamics of the FCHPS is set by the smooth function *g*:

$$\dot{\mathbf{x}} = \mathbf{g}(\mathbf{x}, A \dot{\mathbf{r}} F r, \mathbf{F} \text{uel} F r, p\_{\text{Load}}), \mathbf{x} \in \mathcal{X} \tag{2}$$

where the time constants of the 6 kW/45 V FC system and the 100 Ah/200 V batteries' stack were set to 0.2 s and 10 s, and the equivalent series resistor of the 100 F ultracapacitors' stack to 0.01 Ω. The DC voltage reference is set to 200 V, the ultracapacitors' stack has 100 V initial voltage and 10 kΩ parallel resistor (being connected via a bidirectional DC–DC to the DC bus and controlled to regulate the DC voltage), and the batteries' stack has an 80% initial State-of-Charge (SOC) (being connected directly to the 200 V DC bus).

The losses in the FC system are mainly given by the air compressor, so the FC net power is:

$$P\_{\rm FCnet} \cong P\_{\rm FC} - P\_{\rm cm} \tag{3}$$

where *PRES* is the FC power, the *Pcm* is the air compressor power [60]:

$$P\_{cm} = I\_{cm} \cdot V\_{cm} = \left(a\_2 \cdot AirFr^2 + a\_1 \cdot AirFr + a\_0\right) \cdot \left(b\_1 \cdot I\_{FC} + b\_0\right)$$

and the coefficients are [60,61]: *a*<sup>0</sup> = 0.6 *a*<sup>1</sup> = 0.04 *a*<sup>2</sup> = −0.00003231 *b*<sup>0</sup> = 0.9987, and *b*<sup>1</sup> = 46.02. The dynamics of the air compressor is modeled through a second order system with 100 Hz natural frequency and 0.7 damping ratio [60].

Note that in a Renewable FCHPS the variable profile from the available Renewable Energy Sources (*PRES*) can also be considered as disturbance as well. But both variable power profiles can be considered together by using a single disturbance, referred to as the power requested on the DC bus (*PDCreq* = *Pload* − *PRES* > 0). When *PDCreq* = *Pload* − *PRES* < 0, an excess of RES power is available on the DC bus, which, for example, can be used to supply an electrolyzer in order to generate hydrogen and then store it in tanks. So, during the excess of power on the DC bus (*PRES* > *Pload*), the FC system will operate in standby mode, but during a lack of power on the DC bus (*PRES* < *Pload*) then the FC system must compensate the power flow balance on the DC bus by generating on average (AV) the FC net power, *PFCnet*(*AV*), instead of taking this power (*PDCreq*(*AV*)) from the batteries' stack, where:

$$P\_{\rm FCnet(AV)} = \ I\_{\rm FC(AV)} V\_{\rm FCnet(AV)} \cong \frac{P\_{\rm DCreq(AV)}}{\eta\_{\rm boost}} \tag{4}$$

Consequently, based on the power flow balance on the DC bus (5):

$$\mathcal{L}\_{\text{DC}}\mu\_{\text{DC}}\frac{d\mu\_{\text{DC}}}{dt} = \eta\_{\text{boost}}p\_{\text{FCnet}} + p\_{\text{ESS}} - p\_{\text{DCreq}}\tag{5}$$

the average of the *pESS* power is zero (*PESS*(*AV*) - 0), where *pESS* is the output power of the hybrid battery/ultracapacitors ESS.

So, the size of the batteries stack can be further reduced or even be eliminated, with only the ultracapacitors' stack remaining to dynamically compensate the lack or excess of power on the DC bus, due to load pulses or sharp variation in the load demand or the RES power. Note that the capacitor *CDC* connected on DC bus is used only to filter the ripple of the DC voltage (*udc*). The regulation of the DC voltage to 200 V is easily done by controlling the bidirectional DC–DC converter of the ultracapacitors' stack.

So, summarizing the above presented RTO strategy, *PESS*(*AV*) - 0 if the FC system is to be operated in the RPF-control mode using the reference current *Ire f*(*RPF*) to control the FC power (as much as necessary to comply the power flow balance on the DC bus), then:

$$I\_{ref(RPF)} \cong I\_{FC(AV)} = \frac{P\_{DCRq(AV)}}{\eta\_{\text{boost}} V\_{FCnet(AV)}} \tag{6}$$

Note that promising results have been achieved for the Renewable FCHPSs using the RPF- control mode on the FC system [55,61]. For a clear comparison of the RTO strategies but without losing the generality of this study, the proposed RPF-control mode of the FC system will be analyzed for a FCHPS without variable RES power (*PRES* = 0). So, as explained before, the disturbance in the FCHPS will be represented by the load power (*PDCreq* = *Pload*).

The RPF-control mode for the FC system can be obtained by controlling the boost DC–DC converter (*Ire f*(*RPF*) = *Ire f*(*boost*)), the *AirFr* regulator (*Ire f*(*RPF*) = *Ire f*(*Air*)), or the *FuelFr* regulator (*Ire f*(*RPF*) = *Ire f*(*Fuel*)).

*Energies* **2019**, *12*, 1889

For example, controlling the boost DC–DC converter, the 0.1 A hysteretic controller of the boost converter will ensure *Ire f*(*RPF*) = *Ire f*(*boost*) - *IFC*, so the FC system will be operated in the RPF-control mode based on (6).

The other two control variables, *FuelFr* and *AirFr*, will be set based on (7) [56]:

$$FuelFr = \frac{60000 \cdot R \cdot (273 + \theta) \cdot N\_{\odot} \cdot I\_{ref(Fuel)}}{2F \cdot (101325 \cdot P\_{f(H2)}) \cdot (\mathcal{U}\_{f(H2)}/100) \cdot (\mathbf{x}\_{H2}/100)}\tag{7a}$$

$$AirFr = \frac{60000 \cdot R \cdot (273 + \theta) \cdot N\_{\mathbb{C}} \cdot I\_{ref(Air)}}{4F \cdot (101325 \cdot P\_{f(O2)}) \cdot (\mathcal{U}\_{f(O2)} / 100) \cdot (y\_{O2} / 100)}\tag{7b}$$

where the signals *Ire f*(*Fuel*) and *Ire f*(*Air*) are the references used to optimize the FCHPS.

The FC parameters (*NC*, θ, *Uf*(*H*2), *Uf*(*O*2), *Pf*(*H*2), *Pf*(*O*2), *xH*2, *yO*2*)* are set to default values of the 6 kW/45 V FC system, and *R* = 8.3145 J/(mol K) and *F* = 96,485 As/mol are two well-known constants [62].

For safety reasons in the FC system operation, the slope of the signals *Iref(Fuel)* and *Iref(Air)* have been limited to 100 A/s. This will limit the response time of the FC system to generate the requested DC power set by (4) in order to compensate the power flow balance on the DC. For example, if the FC system operates in a stationary regime generating 5 kW at about 50 V, and it must pass in 8 kW generating regime due to step-up in load demand, then the transitory regime will be of about 0.6 s (3000 W/50 V = 60 A and 60 A/100 A/s = 0.6 s). In this case, the response time of the FC system is limited by the 100 A/s slope, not by the 0.2 s FC constant time. So, the ESS must be appropriately designed to ensure such transitory regimes, which could arise in driving the FC vehicles. But if this design is performed considering all potential cases, then the FCHPS will operate properly under an unknown profile of load demand and then the optimization problem can be approached in real-time based on Global Extremum Seeking (GES) control.

For example, in the RTO7 strategy, both control variables, *FuelFr* and *AirFr*, are used to optimize the FCHPS, considering the GES references *Ire f*(*GES*1) and *Ire f*(*GES*2) generated by the two GES controllers. The searching signals *Ire f*(*Fuel*) and *Ire f*(*Air*) will be given by *Ire f*(*Fuel*) = *Ire f*(*GES*2) + *IFC* and *Ire f*(*Air*) = *Ire f*(*GES*1) + *IFC*. The optimum on the optimization surface is close to the operating point of the FCHPS using the reference strategy, which is usually implemented in FC systems and is referred to in the literature as the Static Feed-Forward (sFF) strategy [56]. Thus, the searching area is limited around the FC current set by the RPF-control mode (*IFC* - *Ire f*(*RPF*)) in order to speed up the searching process. So, in less than 10 dither's periods, the optimum will be found, which means up to 100 milliseconds for 100 Hz sinusoidal dither. The searching time is, therefore, in the order of the FC time constant and the FC system reacting to changes in both inputs control variables, *FuelFr* and *AirFr*.

Instead, only one control variable is used by the strategies RTO1 and RTO2 in search of the optimum, as follows: *Ire f*(*Fuel*) = *Ire f*(*GES*2) + *IFC* and *Ire f*(*Air*) = *Ire f*(*GES*1) + *IFC*. The other control variable is set to *IFC* -*Ire f*(*RPF*) in order to speed up the searching process.

The RPF-control mode of the FC system is obtained by setting *Ire f*(*Air*) = *Ire f*(*RPF*) - *IFC* for the strategies RTO3 and RTO5. In the same manner for the strategies RTO4 and RTO6, the RPF-control mode of the FC system is obtained by setting *Ire f*(*Fuel*) = *Ire f*(*RPF*) - *IFC*. Only the boost controller is used in search of the optimum by the RTO3 strategy and the RTO4 strategy, so *Ire f*(*boost*) = *Ire f*(*GES*1) - *IFC* and *Ire f*(*boost*) = *Ire f*(*GES*2) - *IFC* due to low value of the hysteresis band of 0.1 A. The other control variable in the RTO3 strategy and the RTO4 strategy, which is *Ire f*(*Fuel*) and *Ire f*(*Air*), respectively, is set to *IFC* - *Ire f*(*RPF*) in order to speed up the searching process. So, the searching for the optimum is performed on the optimization curve, which is a multimodal function to the FC current.

On the other hand, the strategies RTO5 and RTO6 use a second control variable in searching for the optimum (which is *Ire f*(*Fuel*) = *Ire f*(*GES*2) + *IFC* and *Ire f*(*Air*) = *Ire f*(*GES*1) + *IFC*), besides the control variable *Ire f*(*boost*). So, in this case, the searching for the optimum is performed on the multimodal optimization surface.

Thus, seven possible RTO strategies will be analyzed in this study, compared to sFF strategy as a reference. All RTO strategies use the GES control scheme proposed in [20] to find the optimum of the optimization function in case of *k f uel* set to 0, 25, and 50 [lpm/W].

The interested reader can search the following references [17,29,38,44,56–59] for the hybrid system configuration, the control block diagrams, and the setting used for each strategy analyzed in this study.

The GES control has been implemented based on [20]. The interested reader, in the design of the GES control, can find design examples in [63,64]. In this study, the following values are used for the GES parameters: *k*<sup>1</sup> = 1, *k*<sup>2</sup> = 2, *kNp* = 20, *kNy* = 1/1000, *fd*<sup>1</sup> = 100 Hz and *fd*<sup>2</sup> = 200 Hz, and *bh* = 0.1 and *bl* = 1.5 for the cut-off frequencies (*bh fd* and *bl fd*) of the band-pass filter.
