## 2 Materials and Methods
Considering (4) and (5), the PFC reference (\(I_{ref(PFC)}\)) is given by (7):  
\[V_{FC}\cdot I_{FC}\cong P_{FC(MV)}\cong\Big{(}P_{Load(MV)}-P_{RES(MV)}\Big{)}/ \eta_{boost}\Rightarrow I_{FC}\cong I_{ref(PFC)}=\Big{(}P_{Load(MV)}-P_{RES(MV)} \Big{)}/\big{(}V_{FC(MV)}\cdot\eta_{boost}\big{)} \tag{7}\]  
A PFC-based strategy of FC net power can be implemented through the boost controller, the air regulator, and the fuel regulator, using the strategy settings block to set an \(I_{ref(PFC)}\) reference to one of their references, \(I_{ref(Boost)}\), \(I_{ref(Air)}\), or \(I_{ref(Fuel)}\), respectively (see the EMS unit in Figure 1). The fuel economy-based strategy can be implemented through optimal control based on the global extremum seeking (GES) controller [41; 42; 43] (see Figure 1) that generates the \(I_{ref(GES)}\) reference by maximizing the multicriteria optimization function (8) that mixes the FC net power (\(P_{FCnet}\)) and the fuel consumption efficiency (\(Fuel_{\textit{eff}}=P_{FCnd}\)/\(FuelFr\)):  
\[f(x,Airr,FuelFr,P_{Load},P_{RES})=0.5\cdot P_{FCnet}+k_{fuel}Fuel_{eff} \tag{8}\]  
where vector \(x\) represents the FC state variables [44; 45]; and GES variables \(v_{1}=Airr\) and \(v_{2}=FuelFr\) are the air flow rate (\(Airr\)) and the fuel flow rate (\(FuelFr\)), respectively, given by (9) [46]:  
Figure 1:0 Figure 1:1  
where \(N_{C},\theta,U_{f(H2)},U_{f(O2)},\ P_{f(H2)},P_{f(O2)},x_{H2},y_{O2}\) are default parameters [47]. \(P_{Load}\) and \(P_{RES}\) act as a perturbation during the GES-based search of the optimal point, depending on the weighting parameter \(k_{fuel}\), which can be set at zero to maximize \(P_{FCnet}\)[48] or at 25 (lpm/W) to reduce the fuel consumption, i.e., \(Fuel_{T}=\int FuelFr(t)dt\)[49; 50]. In this study, the DC-DC boost converter was optimally controlled to improve fuel economy, and the PFC-based strategy of the FC net power was implemented through the air regulator or the fuel regulator using the strategies air-PFC or fuel-PFC, respectively, or by both fueling regulators in the switching (SW) strategy (called air/fuel-PFC) that switches the \(I_{ref(PFC)}\) reference to the air regulator or the fuel regulator using a power threshold of 5.5 kW for the power requested on the DC bus (\(P_{DCreq}=P_{Load}-P_{RES}>0\)). Thus, the strategies air-PFC, fuel-PFC, and air/fuel-PFC are set by (10a), (10b), and (10c) respectively:  
Figure 1:2 Figure 1:3  
\[I_{ref(Fuel)}=\left\{ \begin{array}{l}I_{ref(PFC)},\ if\ P_{DCreq}\leq P_{ ref}\\ I_{FC},\ if\ P_{DCreq}>P_{ref}\end{array} \right.\ I_{ref(Air)}=\left\{ \begin{array}{l}I_{ FC},\ if\ P_{DCreq}\leq P_{ref}\\ I_{ref(PFC)},\ if\ P_{DCreq}>P_{ref}\end{array} \right.\ I_{ref(Basot)}=I_{ref(GES)} \tag{10c}\]  
The diagram of FC/ESS renewable HPS using the strategies air-PFC, fuel-PFC, and air/fuel-PFC is presented in Figure 3, and \(k_{RES}\) sets the level of RES power on the DC bus. If \(k_{RES}\) is zero (\(P_{RES}=0\)), then the case of the FC system will be analyzed. If \(k_{RES}\) is different to zero, then the case of the FC/renewable HPS will be analyzed. In the last case, if \(P_{RES}>P_{Load}\), then the excess of power (\(P_{RES}-P_{Load}>0\)) will supply an electrolyzer to produce hydrogen. The performance and safe operation of FC/renewable HPS using the strategies air-PFC, fuel-PFC, and air/fuel-PFC is highlighted and compared to the static feed-forward (sFF) control sets by (11) [43]:  
\[I_{ref(Fuel)}=I_{FC},\ I_{ref(Air)}=I_{FC},\ I_{ref(boost)}=I_{ref(PFC)} \tag{11}\]  
where \(I_{FC}\) is the FC current. Figure 3: The FC/renewable HPS using power-following control (PFC) strategies air-PFC, fuel-PFC, and air/fuel-PFC [34]. The command of the DC-DC boost converter (the signal SW command in Figure 1) is obtained using a 0.1 A hysteresis controller with inputs \(I_{FC}\) and \(I_{ref(boost)}\).