Development of Fuzzy-Adaptive Control Based Energy Management Strategy for PEM Fuel Cell Hybrid Tramway System

: Currently, the implementation of hybrid proton-exchange membrane fuel cell (PEMFC)-battery-supercapacitor systems for hybrid tramways to replace conventional internal combustion engines and reduce greenhouse gas emissions has triggered an upward trend in developing energy management strategies (EMSs) to effectively deploy this integration. For this purpose, this paper in-troduces a comprehensive EMS consisting of high-level and low-level controls to achieve appropriate power distribution and stabilize the operating voltage of the powertrain. In the high-level control, a fuzzy logic technique and adaptive control loop are proposed to determine the reference power for energy sources under different working conditions. Meanwhile, the low-level control aims to generate a pulse-width-modulation (PWM) signal for DC/DC converter, associated with each electric source, to regulate the device’s output performance and guarantee the DC bus voltage. Comparisons between the proposed strategy with available approaches are conducted to verify the effectiveness of the proposed EMS through MATLAB/Simulink environment. The simulation results conﬁrm that the proposed EMS not only sufﬁciently ensures powers distribution even when the abrupt changes of load or high peak power, but also enhance the efﬁciency of the PEMFC, in which the PEMFC stack efﬁciency can be exhibited up to 53% with hydrogen consumption less than 21.4%. Moreover, the DC bus voltage can be regulated with a small ripple of around 1%.


Introduction
Nowadays, environmental pollution becomes an urgent issue that undoubtedly influences the health of humans and other creatures living in the world. This situation has spurred more studies to come up with renewable energy sources as a long-term solution for human survival. According to research by the International Energy Agency (IEA), from 1990 to 2018, renewable electricity generation rose rapidly with wind, solar photovoltaic (PV), and hydrogen resources. In which, the growth of hydrogen energy increased 97.3% and was forecast to remain the world's largest source of green energy [1]. It can be seen that hydrogen is one of the essential elements in the energy structure as well as has great potential to be widely used in the 21st century.
As the most proper and effective system using hydrogen, the PEMFC has been attracted as a potential candidate to combine with conventional energy devices such as a battery (BAT) or a supercapacitor (SC) [2] in hybrid systems. The lower operating temperatures and higher energy conversion are the leading properties of the PEMFC in comparison with other types of fuel cells [3]. However, slow dynamic response and incapability of recovering exceeded energy have become the key obstacles for widespread applications that use the PEMFC as a standalone energy source because the variation of load demand may result in fuel starvation, membrane drying issues, blooding; thus, causing the degradation lifespan for a renewable hybrid system. Ahmadi et al. constructed a fuzzy-based EMS with a genetic algorithm for a PEMFC integrated with BATs-SCs to improve the hybrid vehicle behaviors [25]. The feasibility of the FLC methods for the PEMFC hybrid systembased transportation applications was investigated in some papers [26][27][28][29][30][31][32]. For the hybrid tramway systems, the use of FLC was first recommended by Qi Li et al. [33]. In this work, the multi-level Haar-Wavelet transform was incorporated into the structure of the 2-FLC approach to separate the high-and low-frequency features of the power demand. The results indicated that the proposed strategy achieved high efficiency without compromising the stack efficiency of the PEMFC and coordinated the power demand to each power source appropriately. In [34], Zhang et al. designed a fuzzy controller for a locomotive system with input variables of load power demand and BAT SOC and output variable of the PEMFC required power. The study indicated that using this controller could not only keep the dynamic response of the PEMFC in the optimal region but also satisfy the dynamic requirements of the hybrid system. Besides, it also maintained the BAT SOC between 0.6 and 0.8 during the various operating conditions or quick changes of load. To guarantee an ideal BAT power in an FC-BAT-SC tramway system, Piraino et al. [35] applied the FLC to find out the suitable factor of the BAT. In this strategy, the BAT power, BAT SOC, and SC SOC were input variables while the BAT corrective factor was the output variable. The simulation was implemented with a real driving cycle and the results proved that the suggested strategy not only made a sufficient BAT power to meet sudden and unexpected demand variations but also avoided critical SOC levels of the BAT and SC. Based on the advantages of FLC, Fragiacomo et al. [36] combined this technique and equivalent consumption minimization strategy (ECMS) to design an EMS for the hybrid locomotive. Based on detailed evaluations of stochastic uncertainties in tramway operation, a suboptimal real-time power-sharing technique was proposed to deal with operation uncertainties, enhance fuel efficiency, and guarantee system durability. In this work, the FLC was conducted to coordinate the power flows of energy sources that could adapt to the requirement of load power. In [37], Peng et al. established a fuzzy logic-based differential power compensation module to balance the performance deterioration of the PEMFC and BAT for a hybrid tramway system. In the aforementioned studies, the requirements of power distribution between the PEMFC and ESDs are effectively implemented by using fuzzy logic techniques. Nevertheless, the voltage control scheme of the DC bus was not considered to design, so the output voltage could not be maintained at the desired value. This thing can cause instability and decrease the working performance of the hybrid system.
Based on the literature, although there are more challenges in the design procedure to achieve high efficiency, the fuzzy logic approach is still a good solution to construct an EMS for a hybrid PEMFC-BAT-SC system. This technique can handle most situations of operating behavior and mutual impacts of the charging and discharging process of ESDs to keep the high performance of all energy sources. Motivated from the above analyses and building on our previous work in [38], this paper proposes an EMS to improve the energy efficiency and fuel economy of a hybrid tramway system by using two levels of control. High-level control includes fuzzy logic rules and a bus voltage control loop to define the reference power of PEMFC and BAT. Then, low-level control is utilized to determine the appropriate control signal for converters of PEMFC and BAT. Accordingly, the main contributions of this research can be summarized as follows: Firstly, a new fuzzy logic strategy is designed to determine the sufficient power of the PEMFC based on the status of the BAT SOC and the required power of load under different working scenarios. Then, an adaptive proportional-integral-derivative (PID) control is employed to maintain the DC bus voltage at a steady state by using the BAT. Furthermore, the SOC regulator is constructed to maintain the SOC of BAT within the desired range to protect the BAT from the depth of charge or discharge and prolong the lifespan of the component. Finally, the proposed strategy is conducted and compared to the other completed strategies to verify the effectiveness.
The rest of this paper is organized as follows. The configuration of the hybrid tramway is dedicatedly described in Section 2, and then Section 3 analyzes the proposed energy management strategy comprehensively with high-and low-level control to guarantee the system qualification. Based on the presented strategies, comparative simulations with other approaches are given in Section 4 to validate the effectiveness of the proposed strategy. Finally, Section 5 presents conclusions as well as merits for further developments.

Hybrid Tramway Description
In this work, the hybrid tramway configuration is composed of the PEMFC, the BAT, the SC, the unidirectional DC/DC converter, the bidirectional DC/DC converter, the DC/AC inverter, the traction motor drives, the auxiliary services module, the braking resistor, and the power management controller as described in Figure 1. In this system, the PEMFC serves as a primary energy source and is connected to a unidirectional DC/DC converter to boost the low voltage of the PEMFC to the required voltage of the DC bus. Meanwhile, rechargeable BAT and SC are utilized as ESDs to supplement the insufficient power of PEMFC during the acceleration and cruise processes and absorb the regenerative energy during the braking process. Moreover, the SC is equipped to compensate or consume the peak power of the traction load that the PEMFC and BAT cannot accommodate in a short time owing to its characteristic of fast dynamic response. The PEMFC and BAT are interconnected to the DC bus through unidirectional and bidirectional DC/DC converters, respectively, for energy delivery to the load power demand and recovery tasks to the BAT. The auxiliary devices such as fans, lighting, air conditioning system, etc. are described as the auxiliary services module of the hybrid tramway system. Besides, the braking resistor is also installed to dissipate the energy during regenerative braking if necessary. In order to distribute the power demand, the power management controller is designed to coordinate the power of energy sources by regulating DC/DC converters with charge/discharge mechanisms. The dynamic model of each component in the hybrid tramway system is defined to simulate the system behavior and evaluate the effectiveness of the proposed EMS. The following subsections outline the specific features of energy sources, DC/DC converters, auxiliary services module, braking resistor, and traction load. The dynamic model of each component in the hybrid tramway system is defined to simulate the system behavior and evaluate the effectiveness of the proposed EMS. The following subsections outline the specific features of energy sources, DC/DC converters, auxiliary services module, braking resistor, and traction load.

PEMFC Model
The PEMFC model is the combination of a stack module as a core of the fuel cell system and auxiliary subsystems such as hydrogen delivery, air supplying, humidification, and water-cooling circulation. To construct the dynamic model of PEMFC, the proposed approach in [39] is applied via the MATLAB/Simulink Simscape toolbox, where the effect of reactant flow inside the electrode is neglected to simplify the modeling. In this model, system parameters can be easily set up from the datasheet or by using the simple polarization curve of the testing process.
Considering the PEMFC model in [40] and the evaluation results in [41], the output voltage of each cell is obtained as follows: where V cell is the cell output voltage (V), V oc is the open-circuit voltage (V), V act is the activation voltage loss (V), and V oh denotes the resistive and diffusion voltage loss (V). The open-circuit voltage can be calculated by: where K c is the voltage constant at the nominal condition of operation (V) and E n is the Nernst voltage (V). The value of activation voltage loss can be defined through [40]: where A is the Tafel slope (V), i 0 is the exchange current (A), i FC is the PEMFC output current (A), and T d is the cell settling time to a current step (s). Based on the internal resistance of the electrolyte membrane, the resistive and diffusion losses voltage of PEMFC is expressed as follows: where R ohm is the internal resistance (Ω). The output voltage of the PEMFC stack is derived according to the number of cells as the following equation: where V FC is the output voltage of the PEMFC stack (V) and N is the total number of cells. The output power of the PEMFC stack is obtained by [27]: where P stack is the supplied power of the PEMFC stack (W) and η represents the efficiency of the PEMFC stack. Based on input parameters of the PEMFC model, simulated polarization curves of stack voltage-current (U-I) and stack power-current (P-I) are obtained, as shown in Figure 2.
where stack P is the supplied power of the PEMFC stack (W) and η represents the efficiency of the PEMFC stack.
Based on input parameters of the PEMFC model, simulated polarization curves of stack voltage-current (U-I) and stack power-current (P-I) are obtained, as shown in Figure  2.

Battery Model
In the hybrid system, the BAT, with high energy density, more efficient, and faster dynamic response than the PEMFC, is utilized to not only compensate for the excess power that PEMFC cannot deliver but also accumulate the regenerative energy from traction load. The behavior of the BAT model is constructed by using the SimPowerSystems of MATLAB/Simulink with the Shepherd curve-fitting model employed [42]. Depending on the charge mode or discharge mode, the charge model or discharge model is respectively operated to keep the BAT's capacity in a reasonable operating performance range.
In the discharge model, the term polarization voltage is added to the discharge voltage formulation to describe the influence of BAT SOC on power efficiency. Besides, the polarization resistance is also considered to ensure the stability of the simulation model. Thus, the BAT voltage is calculated as follows [42]:  In the hybrid system, the BAT, with high energy density, more efficient, and faster dynamic response than the PEMFC, is utilized to not only compensate for the excess power that PEMFC cannot deliver but also accumulate the regenerative energy from traction load. The behavior of the BAT model is constructed by using the SimPowerSystems of MATLAB/Simulink with the Shepherd curve-fitting model employed [42]. Depending on the charge mode or discharge mode, the charge model or discharge model is respectively operated to keep the BAT's capacity in a reasonable operating performance range.
In the discharge model, the term polarization voltage is added to the discharge voltage formulation to describe the influence of BAT SOC on power efficiency. Besides, the polarization resistance is also considered to ensure the stability of the simulation model. Thus, the BAT voltage is calculated as follows [42]: where V BAT is the BAT voltage (V), V 0,BAT is the BAT constant voltage (V), K is the polarization constant (V/Ah), Q is the maximum BAT capacity (Ah), i BAT is the BAT output current (A), i * BAT is the low-frequency current dynamics (A), A b is the exponential zone amplitude (V), B is the exponential zone time constant inverse (Ah −1 ), and R int is the BAT internal resistance (Ω). In addition, the term K(Q/(Q − i BAT dt)) i BAT dt indicates polarization voltage and K(Q/(Q − i BAT dt)) is the polarization resistance.
For the charging model, the polarization resistance term is adjusted to illustrate the behavior at the end of the charging process because the BAT voltage increases rapidly. In this case, the BAT voltage is represented as follows [42]: On the other hand, the SOC level of the BAT must be kept in a limited range of capacity to achieve high working efficiency. This SOC can be calculated by the relationship of the current charge and the maximum capacity as [42] SOC BAT where SOC BAT is the SOC of the BAT (%), t is the instant time, and t 0 is the initial time.
From input parameters, nominal current discharge curves of the used BAT model are obtained as depicted in Figure 3.
is the SOC of the BAT (%), t is the instant time, and 0 t is the initial time.
From input parameters, nominal current discharge curves of the used BAT model are obtained as depicted in Figure 3.

Supercapacitor Model
The SC is an electric component that can store and release fast power due to its high capacitance. In the hybrid system, SC is used to supply the peak during the load surge. The SC voltage can be given by [41]:

Supercapacitor Model
The SC is an electric component that can store and release fast power due to its high capacitance. In the hybrid system, SC is used to supply the peak during the load surge. The SC voltage can be given by [41]: where V SC is the voltage of SC (V), i SC denotes the SC current (A), R SC is the SC resistance (Ω), C T represents the total capacitance (F), and Q T is the total electric charge (C). In this work, the Stern model [43] is applied to build the SC model by using the Simscape toolbox. The total capacitance with an SC bank of cells is defined as follows: where N SC is the total number of SC cells and C is the capacitance (F) of a cell that can be expressed as [43] where C H and C GC are the Helmholtz and Gouy-Chapman capacitance (F), respectively. Next, the total electric charge is formulated by: Furthermore, the SOC of the SC is estimated via the current and the maximum capacity. This SOC value is computed as [43]: where SOC SC denotes the SOC of SC (%) and Q SC represents the maximum SC capacity (Ah), t is the instant time, and t 0 is the initial time.

DC/DC Converters Model
In the hybrid system, the voltage of energy sources alters depending on their required currents or SOC levels. In this case, a DC/DC converter is needed to control the output current that powers the traction load and maintain the DC bus at a constant voltage. Based on the load power demand, the boost or buck mode of the converter is activated. The boost mode is employed to convert the lower voltage on the energy source side to the higher voltage on the DC bus side and buck mode is vice versa. For ESDs such as the BAT and SC, the bidirectional mode is utilized to transform the voltage in two directions between energy sources and the DC bus with the boost mode for discharging operation and the buck mode for charging operation.
In terms of system modeling, the switching model and average-value model are two types of DC/DC converter models that are usually used for simulation purposes. In the first model, it requires low sampling time to recognize switching actions; thus, consuming more time in the simulation process. Besides, switching harmonics and losses of switching components must be concerned to guarantee the stability of the converter. On the contrary, the average-value model uses controlled voltage/current sources to create switching models that replace switching components. The advantage of this model is that it ignores switching harmonics and spends less time simulating the hybrid system, but all the converter characteristics are still retained. In this paper, the average-value model of the DC/DC converter is selected to generate the desired voltage and current for the switching model. The structures of DC/DC converters based on the average-value model are shown in Figure 4 [41,44].

Breaking Resistor
During the braking process, most of the regenerative energy is stored in the ESDs to provide for traction load requirements. However, when the ESDs are unable to absorb all of the regenerative braking energy, a portion of it must be burned throughout the braking resistor. In the fact that the control system decides the activation of this resistor to dissipate the power if the ESDs achieve their maximum charge power.

Tramway Loads
In this hybrid system, auxiliary services and traction power demand are considered as tramway loads. Because the goal of this research is to assess the effectiveness of the proposed control method for the tramway's EMS, in which the required current is determined through the power consumption and DC bus voltage. The power demand of traction load, obtained from the driving cycle in five minutes recorded under different working conditions [19,20,33,45], is presented in Figure 5. Where D is the duty cycle (%), L is the inductance (H), ϕ is the positive gain, C L and C H are the capacitance at the low side and high side of the converter (F), respectively; V L and V H are the voltage at the low side and high side of the converter (V), respectively; I L and I H are the current at the low side and high side of the converter (A), respectively.

Breaking Resistor
During the braking process, most of the regenerative energy is stored in the ESDs to provide for traction load requirements. However, when the ESDs are unable to absorb all of the regenerative braking energy, a portion of it must be burned throughout the braking resistor. In the fact that the control system decides the activation of this resistor to dissipate the power if the ESDs achieve their maximum charge power.

Tramway Loads
In this hybrid system, auxiliary services and traction power demand are considered as tramway loads. Because the goal of this research is to assess the effectiveness of the proposed control method for the tramway's EMS, in which the required current is determined through the power consumption and DC bus voltage. The power demand of traction load, obtained from the driving cycle in five minutes recorded under different working conditions [19,20,33,45], is presented in Figure 5.

Tramway Loads
In this hybrid system, auxiliary services and traction power demand are considered as tramway loads. Because the goal of this research is to assess the effectiveness of the proposed control method for the tramway's EMS, in which the required current is determined through the power consumption and DC bus voltage. The power demand of traction load, obtained from the driving cycle in five minutes recorded under different working conditions [19,20,33,45], is presented in Figure 5.

Previous EMSs
In the work presented in [18], the RB-EMS was designed based on an operation mode control (OMC) and cascade control loops to generate a reference PEMFC power, guarantee the power demand of the load traction motor, maintain the BAT SOC at the desired value, and keep DC bus voltage at the rated value. This OMC was separated into three operation modes depending on the BAT SOC: discharge mode (high SOC), charge mode (normal SOC), and fast charge mode (low SOC). Two hysteresis cycles were considered to make changes between these modes. Besides, the PI controllers were applied to produce the duty cycles of the converters that regulated the power of energy sources in accordance with the reference powers defined by the EMS. However, this EMS has simple logical rules that can not consider the system's operating states completely, especially in the case of abrupt changes of load power. In addition, the challenges of fuel economy are not recognized.

Equivalent Consumption Minimization Strategy (ECMS)
Based on the powertrain configuration in [44], a simplified ECMS was employed to define the optimal PEMFC power by finding an optimal solution x = (P FC , α, P BAT ) with the cost function as follows: F = (P FC + αP BAT )∆T (15) where F is the cost function, α is the penalty coefficient, ∆T is the sampling time (s), P FC and P BAT are the PEMFC power and BAT power (W), respectively. Equality constraints were given by: with boundary conditions as P FC,min ≤ P FC ≤ P FC,max P BAT,min ≤ P BAT ≤ P BAT,max 0 ≤ α ≤ 100 where P load was the load power demand (W), µ was a constant (<0.6) to handle the BAT SOC range, SOC BAT_min and SOC BAT_max were the minimum and maximum BAT SOC level (%), respectively; P FC,min and P FC,max were the minimum and maximum PEMFC power (W), respectively; P BAT,min and P BAT,max were the minimum and maximum BAT power (W), respectively.
This approach illustrates high energy management efficiency during the overall driving cycle and minimizes hydrogen consumption. However, the unknown operation points of the PEMFC and BAT lead to challenges in determining the equivalent values of fuel consumption as well as consuming more computing time, resulting in an unstable system under abrupt changes in operating modes.

Proposed EMS
In the PEMFC hybrid system, designing an algorithm to achieve optimal performance of the PEMFC is realistically regarded as the major requirement. In this work, the proposed algorithm is developed to enhance the PEMFC efficiency, minimize hydrogen consumption, and maintain the BAT SOC (SOC BAT ) in the range of 0.6 ∼ 0.9 as a way to prolong the lifespan of the energy device. The overall proposed control strategy is described in Figure 6. : as a way to prolong the lifespan of the energy device. The overall proposed control strategy is described in Figure 6. In Figure 6, the proposed EMS consists of two parts: high-level control and low-level control. In the high-level control, the obtained power of the driving cycle is a positive value when the system operates in the acceleration mode or normal mode, whereas this power is a negative value if the system works in regenerative mode. Based on the load power demand ( load P ) and the BAT SOC , fuzzy logic rules (FLRs) are applied to generate the reference PEMFC power ( The FLRs are inherited from previous our study in [38], which are composed of two input variables (  In Figure 6, the proposed EMS consists of two parts: high-level control and low-level control. In the high-level control, the obtained power of the driving cycle is a positive value when the system operates in the acceleration mode or normal mode, whereas this power is a negative value if the system works in regenerative mode. Based on the load power demand (P load ) and the SOC BAT , fuzzy logic rules (FLRs) are applied to generate the reference PEMFC power (P FC_ref ), which not only provides power for the traction load but also maintains the SOC level of BAT within a certain range. Additionally, the DC bus voltage is also regulated at 750 V by using an adaptive PID controller that determines the battery power P BAT2 . The term P BAT1 is calculated as the difference between the expected load power and the PEMFC reference power. As a result, the reference BAT power (P BAT_ref ) is defined by the total of P BAT2 and P BAT1 . For the low-level control, the duty cycle of each DC/DC converter is decided by a PI controller that depends on the obtained reference powers.

High-Level Control
In the proposed strategy, FLRs are realized by the following parts: fuzzification interface, reasoning machine, rule base, and defuzzification interface with the fuzzy module provided by Matlab/Simulink. The FLR's objectives are to increase the PEMFC efficiency and minimize hydrogen consumption as well as maintain SOC BAT within the desired range of 0.6~0.9.
The FLRs are inherited from previous our study in [38], which are composed of two input variables (P load , SOC BAT ) and one output variable (P FC_ref ). The input linguistic P load has seven membership functions (MFs) including NH (Negative High), NM (Negative    During the operation, the proposed EMS appropriately distributes the required power to each energy source to not only sufficiently satisfy the workload demand but also maintain the SOC supplement. These parameters should be properly determined to avoid the state of overcharging or deep discharging. For the charging process, if the BAT has high SOC, the injected power is lower and vice versa. Meanwhile, in the discharging process, if the BAT SOC is at a high level, the BAT will release more output power and vice versa. Furthermore, if the SOC capacity of the BAT reaches the upper bound or lower bound, the disconnected action is executed and this device will wait for the next discharging or charging process, respectively.
Besides the power distribution requirements, DC bus voltage control is also a critical challenge for maintaining the system's stability because of voltage fluctuation in the DC bus when load power increases or decreases abruptly. Thus, an adaptive PID controller is designed to control the bus output voltage, as shown in Figure 8 [38].  During the operation, the proposed EMS appropriately distributes the required power to each energy source to not only sufficiently satisfy the workload demand but also maintain the SOC supplement. These parameters should be properly determined to avoid the state of overcharging or deep discharging. For the charging process, if the BAT has high SOC, the injected power is lower and vice versa. Meanwhile, in the discharging process, if the SOC BAT is at a high level, the BAT will release more output power and vice versa. Furthermore, if the SOC capacity of the BAT reaches the upper bound or lower bound, the disconnected action is executed and this device will wait for the next discharging or charging process, respectively.
Besides the power distribution requirements, DC bus voltage control is also a critical challenge for maintaining the system's stability because of voltage fluctuation in the DC bus when load power increases or decreases abruptly. Thus, an adaptive PID controller is designed to control the bus output voltage, as shown in Figure 8 [38]. Appl P . The formulations of this controller are given by [38]: where e is the differential value, ˆP K and ˆI K denote estimated adaptive gains, P η and I η are tunable positive gains, δ is an arbitrarily small positive constant to avoid singularity, and γ is an arbitrary constraint to regulate the DC bus voltage to the vicinity of the reference. It is noteworthy that ˆP K and ˆI K are bounded by the predetermined upper positive constant * P K and * I K , respectively, to avoid an over-estimated problem.

Low-Level Control
From the determined PEMFC reference power in the high-level control, the corresponding PEMFC reference current FC _ ref (I ) can be systematically deduced for lowlevel control implementation. As the PEMFC characteristic of slow dynamic, a slope constraint must be applied to regulate the changing rate of this command signal. For instance, the PEMFC takes less than 2 s to increase its output from 10% to 90% of the power rating [18]; hence, the slope constraint is considered to practically realize the PEMFC behavior. For the BAT behavior, the reference current is defined based on the reference power obtained in the high-level control and a SOC regulator scheme that is installed to maintain the SOC level of BAT within the desired range ( , as presented in Figure 6. Because the tramway systems usually operate under high power for a long period, BAT conditions should be handled to deal with the SOC variation or prevent the degradation of BAT capacity. Hence, the reference BAT current is calculated based on the SOC status as follows [46]: Herein, the deviation between a reference DC bus voltage (V DC_ref ) and the measured DC output voltage (V DC ) is used as an input value of the adaptive PID controller to generate the BAT power P BAT2 . The formulations of this controller are given by [38]: (18) . .
where e is the differential value,K P andK I denote estimated adaptive gains, η P and η i are tunable positive gains, δ is an arbitrarily small positive constant to avoid singularity, and γ is an arbitrary constraint to regulate the DC bus voltage to the vicinity of the reference. It is noteworthy thatK P andK I are bounded by the predetermined upper positive constant K * P and K * I , respectively, to avoid an over-estimated problem.

Low-Level Control
From the determined PEMFC reference power in the high-level control, the corresponding PEMFC reference current (I FC_ref ) can be systematically deduced for low-level control implementation. As the PEMFC characteristic of slow dynamic, a slope constraint must be applied to regulate the changing rate of this command signal. For instance, the PEMFC takes less than 2 s to increase its output from 10% to 90% of the power rating [18]; hence, the slope constraint is considered to practically realize the PEMFC behavior. For the BAT behavior, the reference current is defined based on the reference power obtained in the high-level control and a SOC regulator scheme that is installed to maintain the SOC level of BAT within the desired range (SOC BAT_min < SOC BAT < SOC BAT_max ), as presented in Figure 6. Because the tramway systems usually operate under high power for a long period, BAT conditions should be handled to deal with the SOC variation or prevent the degradation of BAT capacity. Hence, the reference BAT current is calculated based on the SOC status as follows [46]: where I BAT_ref is the reference BAT current (A), P BAT_ref denotes the reference BAT power (W), V BAT depicts the measured BAT voltage (V), SOC BAT is the SOC level of the BAT (%), α and β are the tuning parameters, SOC BAT_min and SOC BAT_max are the minimum and maximum allowable SOC of the BAT (%), respectively.
Based on the SOC level of the BAT, the above tuning parameters are described as [38] where κ and ε are positive constants depending on charging or discharging characteristics of the BAT. Duty cycles of the DC/DC converters are generated by using the PI controllers as in Figure 6. In detail, the PI-1 controller produces the duty cycle D1 to control the DC/DC converter of the PEMFC source. Similarly, the PI-2 controller is employed to generate duty cycles for the bidirectional DC/DC converter of the BAT source, in which duty cycle D2 handles the buck mode and duty cycle D3 realizes the boost mode operation.

Simulation Results
In this section, a comparative simulation between the proposed strategy and previous methods is conducted to evaluate the strategy's effectiveness for the hybrid PEMFC-BAT-SC tramway system under different operating conditions. In detail, the proposed fuzzy EMS (F-EMS) was implemented and compared with the two other strategies: an RB-EMS in [18], and an ECMS in [44].
To comprehensively investigate EMS approaches with various operating situations, the load profile as in Figure 5 was considered with several load levels such as acceleration, deceleration, and regeneration in practical working conditions. In addition, the modeling of the hybrid tramway was deployed in Matlab/Simulink 2019b environment with a sampling time for displaying simulation results at 0.1 ms. By reasonably selecting components, characteristics of energy sources and parameters of the proposed EMS are listed in Tables 2-5.  The system qualification is described in Figures 9-13. Firstly, simulation results of load power adaptation by using three EMSs are shown in Figure 9 in which a continuous black line represents the required power of load, a continuous red line depicts the output power of the proposed F-EMS, the power of RB-EMS is shown by a dashed-dot blue line, and the power of ECMS is described as a dashed-dot green line. As can be seen in Figure 9a, the required power of the proposed F-EMS satisfies load requirements better than the RB-EMS and ECMS at each time of transient peak power. Although the PEMFC, with the lowest dynamics, cannot instantly react to the load change, the load tracking effort can still be ensured due to the compensation from the BAT and SC during various working modes. In Figure 9b, the ECMS takes an insufficient power in the range of (−1.2 → 3.8) kW, while the RB-EMS obtains a smaller error approximated (−2.1 → 2.3) kW, and the proposed F-EMS achieves the highest distributed accuracy within (−1.7 → 2.5) kW. Furthermore, the proposed F-EMS has the lowest average inadequate power on the driving cycle of the hybrid system. This reveals that the suggested methodology is able to guarantee the load power demand under different operating conditions. Power distributions of the PEMFC, BAT, and SC under three comparative EMSs are presented in Figure 10. As expressed in Figure 10a, the PEMFC powers of the RB-EMS and ECMS have a high power level that can diminish the aging and performance of the PEMFC system. Meanwhile, the proposed F-EMS provides a better performance indicator with a suitable change rate of PEMFC power and smaller power fluctuation, which can improve the fuel economy and durability of the PEMFC system. The power capability of the BAT under three EMSs is depicted in Figure 10b. It can be seen that the BAT power of the proposed strategy is higher than those of both the RB-EMS and ECMS during the period of acceleration. This is because the output power of the PEMFC when using the proposed F-EMS is lower than the other methods, thus the BAT power must be more discharged to compensate for the lacking power from the fuel cell source to match the load power demand. However, in the regenerative mode, the proposed F-EMS can      The comparison of DC bus voltage corresponding to the load power demand is shown in Figure 11. By using the proposed F-EMS, the DC bus voltage is steadily maintained at around 750 V with a smaller fluctuation than using the RB-EMS and ECMS. In the change interval of the load, the DC bus peak voltage is in the range of ( ) → 746 753 V, approximated by a 1% voltage ripple, by using the proposed F-EMS. This result is better Simulation results of both BAT and SC SOC are shown in Figure 12, which de the charge and discharge status at each timeline when the load changes. In Figure 1 suggested F-EMS can maintain the increasing range of BAT SOC lower than the R and ECMS. For the SC, Figure 12b shows that the SOC level varies around 85%. H the proposed approach achieves a SOC varying range within ( . . ) → 84 65 85 2 % lower than the ECMS with the range of ( .   Simulation results of both BAT and SC SOC are shown in Figure 12, which describes the charge and discharge status at each timeline when the load changes. In Figure 12a, the suggested F-EMS can maintain the increasing range of BAT SOC lower than the RB-EMS and ECMS. For the SC, Figure 12b shows that the SOC level varies around 85%. Herein, the proposed approach achieves a SOC varying range within ( . . ) → 84 65 85 2 % that is lower than the ECMS with the range of ( .  Power distributions of the PEMFC, BAT, and SC under three comparative EMSs are presented in Figure 10. As expressed in Figure 10a, the PEMFC powers of the RB-EMS and ECMS have a high power level that can diminish the aging and performance of the PEMFC system. Meanwhile, the proposed F-EMS provides a better performance indicator with a suitable change rate of PEMFC power and smaller power fluctuation, which can improve the fuel economy and durability of the PEMFC system. The power capability of the BAT under three EMSs is depicted in Figure 10b. It can be seen that the BAT power of the proposed strategy is higher than those of both the RB-EMS and ECMS during the period of acceleration. This is because the output power of the PEMFC when using the proposed F-EMS is lower than the other methods, thus the BAT power must be more discharged to compensate for the lacking power from the fuel cell source to match the load power demand. However, in the regenerative mode, the proposed F-EMS can provide a smooth power response to charge the redundant power from the DC bus to the BAT. The comparative result of the SC power distribution is illustrated in Figure 10c. Due to the fast power response, the SC is employed to supplement the slow power response of the PEMFC and BAT to power the load. As a result, the proposed algorithm regulates the SC power in a suitable range that can accommodate abrupt power of load and reduce power fluctuation of the PEMFC and BAT despite the rapid load change. Appl. Sci. 2022, 12,  The hydrogen consumption and the PEMFC stack efficiency of three EMSs are described in Figure 13. As a result, the proposed F-EMS consumes lower hydrogen fuel than the RB-EMS and ECMS as presented in Figure 13a. In the case of the proposed strategy, the average amount of hydrogen consumption is 0.275 kg during the time of the driving cycle, whereas the total fuel consumption of the RB-EMS and ECMS reaches 0.35 kg in the same working conditions. It proves that the proposed approach gives better fuel economy with the hydrogen consuming less than 21.4% in comparison with other approaches. Furthermore, with the same driving cycle, the PEMFC stack efficiency of three EMSs is evaluated as well. As shown in Figure 13b, the PEMFC stack achieves an efficiency from 53% to nearly 60% by conducting with proposed F-EMS, while this efficiency is in the range of ( . . ) → 50 5 59 5 % if using the RB-EMS and ECMS. The aforementioned results show that the proposed F-EMS is a better effective strategy than other strategies for saving fuel consumption and enhancing efficiency for the PEMFC stack.

Conclusions
In this paper, a comprehensive power-sharing strategy was proposed to properly coordinate the energy from the load power demand to the PEMFC, BAT, and SC. The proposed methodology was constructed based on hierarchical techniques with high-and low-level control systems. In the high-level control, the FLRs were applied to determine the reference PEMFC power based on the status of the BAT SOC and the required power of load under different operating scenarios. To regulate the energy sources to match these The comparison of DC bus voltage corresponding to the load power demand is shown in Figure 11. By using the proposed F-EMS, the DC bus voltage is steadily maintained at around 750 V with a smaller fluctuation than using the RB-EMS and ECMS. In the change interval of the load, the DC bus peak voltage is in the range of (746 → 753) V, approximated by a 1% voltage ripple, by using the proposed F-EMS. This result is better than the ones under the RB-EMS with the range of (743 → 755) V and ECMS with the range of (741 → 757) V.
Simulation results of both BAT and SC SOC are shown in Figure 12, which describes the charge and discharge status at each timeline when the load changes. In Figure 12a, the suggested F-EMS can maintain the increasing range of BAT SOC lower than the RB-EMS and ECMS. For the SC, Figure 12b shows that the SOC level varies around 85%. Herein, the proposed approach achieves a SOC varying range within (84.65 → 85.2) % that is lower than the ECMS with the range of (84.35 → 85.3) %, while RB-EMS has a large fluctuation in (84.3 → 85.5) %.
The hydrogen consumption and the PEMFC stack efficiency of three EMSs are described in Figure 13. As a result, the proposed F-EMS consumes lower hydrogen fuel than the RB-EMS and ECMS as presented in Figure 13a. In the case of the proposed strategy, the average amount of hydrogen consumption is 0.275 kg during the time of the driving cycle, whereas the total fuel consumption of the RB-EMS and ECMS reaches 0.35 kg in the same working conditions. It proves that the proposed approach gives better fuel economy with the hydrogen consuming less than 21.4% in comparison with other approaches. Furthermore, with the same driving cycle, the PEMFC stack efficiency of three EMSs is evaluated as well. As shown in Figure 13b, the PEMFC stack achieves an efficiency from 53% to nearly 60% by conducting with proposed F-EMS, while this efficiency is in the range of (50.5 → 59.5) % if using the RB-EMS and ECMS. The aforementioned results show that the proposed F-EMS is a better effective strategy than other strategies for saving fuel consumption and enhancing efficiency for the PEMFC stack.

Conclusions
In this paper, a comprehensive power-sharing strategy was proposed to properly coordinate the energy from the load power demand to the PEMFC, BAT, and SC. The proposed methodology was constructed based on hierarchical techniques with high-and low-level control systems. In the high-level control, the FLRs were applied to determine the reference PEMFC power based on the status of the BAT SOC and the required power of load under different operating scenarios. To regulate the energy sources to match these references, low-level control with DC/DC converters dynamics and regulators were systematically analyzed based on each device's characteristics as the necessary criterion. To guarantee the stability of the DC bus voltage, and thus for the whole system qualification, the adaptive PID controller was employed to maintain the bus voltage around the desired value regardless of the load change. Simulation results displayed that the proposed method could match the load requirements, keep the stability of the DC bus with a smaller voltage ripple, and achieve higher working performance for the hybrid tramway system rather than the other approaches. Moreover, the achievements in this study not only guarantee the power supply efficiency but also reduce hydrogen consumption and prolong the lifespan of energy sources. However, the challenges of optimal fuel economy and improving the PEMFC efficiency were not comprehensively addressed in this study, which should be explored in depth. Furthermore, the advanced configuration with a bidirectional converter should be installed to control the power flow of SC, which can enhance the system performance, rapidly compensate for the high peak power, and prolong the lifetime of energy devices. Consequently, this study serves as a premise to develop advanced EMSs for hybrid PEMFC applications in the future.

Conflicts of Interest:
The authors declare no conflict of interest.