Modeling of a Hybrid Fuel Cell Powertrain with Power Split Logic for Onboard Energy Management Using a Longitudinal Dynamics Simulation Tool

: This work aims to develop a mathematical model for the simulation of a fuel cell (FC) hybrid powertrain. The work starts from modeling a single cell to obtain information on the entire FC stack. The model obtained was integrated into a simulation tool presented in the literature that simulates the longitudinal dynamics of auxiliary power unit hybrid electric vehicles and fully electric vehicles. Therefore, the integrated model allows the simulation of hybrid vehicles equipped with FC and a battery pack that acts as a peak power source. The tool simulates the mechanical and electrical behavior of the vehicle, introducing an investigation of the power flows relating to the FC and batteries. An appropriate power split logic has been implemented, allowing the correct management of the power distribution between the FC and the batteries. The importance of analyzing FC vehicles’ behavior arises from the recent necessity to find alternative propulsion systems, overcoming the range problems associated with fully electric vehicles. The innovation lies in the versatility and modularity of the model, which is open to modifications and features a low computational burden, making it suitable for testing new solutions by performing first design and sizing calculations.


Introduction
Nowadays, climate change is the main critical issue that citizens and governments face.This has led many countries to sign climate agreements to tackle this problem, such as the Paris agreement [1].It can be seen by analyzing the environmental impacts of different anthropogenic activities that fossil fuel usage is particularly significant for energy production, domestic heating, and the transportation sector [2].
Renewable energy is considered an ideal replacement for these fossil products, and it could also be used to charge EV vehicles [3,4].However, a critical issue of renewable sources is that they are non-controllable sources.Then new forms of energy storage have been introduced (e.g., green hydrogen) to face the dependence of the power from the environmental conditions [5].The use of hydrogen in the transport sector can help to overcome problems related to the uncertainty of renewable energy.Hydrogen has been introduced as a power vector in the transport sector thanks to the introduction of fuel cells (FCs) [6,7].Furthermore, fuel cell vehicles make it possible to solve the demanding problems associated with fully electric vehicles (traction guaranteed by the battery pack alone), that is, the low range and long battery recharging times.A fuel cell is a galvanic cell in which the chemical energy of a fuel is converted into electrical energy through an electrochemical process.The fuel and oxidizing agents are hydrogen and oxygen, while the reaction products are water, electricity, and heat.The chemical reaction in a fuel cell is similar to that in a battery, but, in contrast to a chemical battery, reactants are not stored in the cell.On top of that, energy is produced as long as the fuel supply is maintained, without the need for a charge.
The following steps summarize the operating principle of a hydrogen fuel cell (FC): 1.
The FC is fed with hydrogen coming from a tank and air from the external environment containing the oxygen necessary for the chemical reactions; 2.
Within the FC, chemical reactions take place, which lead to the consumption of hydrogen and oxygen for the production of electricity; 3.
Following the chemical reactions that take place inside the FC, electricity, heat and water are produced by the fuel cell itself.Electricity is the desired product; heat and water are released into the environment, and the heat can possibly be used in a heating system (both for stationary use and for heating the passenger compartment of the vehicle).
The different types of FC are distinguished mainly by the type of electrolyte used, and, among the various types, PEM (polymer electrolyte membrane) fuel cells are preferred for use in road vehicles [8,9] due to their low operating temperature, high power density, long cell life, and ability to respond quickly to variable power needs.Furthermore, compared to an internal combustion engine, they have greater efficiency at partial load, which corresponds to the normal use conditions in a propulsion system.These cells require the membrane to be kept humid in order to operate properly, that is, to conduct ions.Therefore, they need water management, which is one critical issue of this system.Some fuel cell stacks use an external humidifier to supply water by the electrodes.In a fuel cell system, the reactants are stored externally from the cell.Typically, the hydrogen is contained in the gaseous state inside a high-pressure tank, while oxygen is not stored but is obtained from the air outside the vehicle [10].This is why an FC requires some auxiliary systems to feed the cell.They include a compressor, a water pump, a fuel supply pump, and an electrical control unit, all powered by the FC itself.Among these auxiliaries, the compressor is the most demanding in terms of energy.When the FC works at low power, the auxiliaries use up a large share of the FC output power, and the system efficiency is low.FCs are usually coupled with a PPS (peak power source) such as a battery or a supercapacitor [11] under a hybrid layout to overcome the problem stated above.The adoption of a PPS, a battery pack, for example, also makes it possible to recover energy during braking, thus increasing the overall efficiency of the propulsion system.A fuel cell has an optimal operation range, usually within the middle of its possible current range: the FC can therefore exploit its optimum operating point to work at high efficiency, providing traction to the electric motor and using the surplus power to recharge the batteries whenever required.The power demand in fuel-cell hybrid vehicles (FCHEVs) alternates between the FC and the battery, thus requiring a reliable energy management system (EMS), which controls the power flow between FC and battery according to the operation mode or power demand of the vehicle [12,13].Several physics-based, dynamic models of FC have been developed [14,15].
In this paper, a model of FC and battery-based hybrid powertrain is developed as an integration of a longitudinal vehicle dynamics model.A simple EMS logic and an approximation of the FC auxiliary systems to obtain a versatile simulation tool while keeping calculation time under control are usually required for first step design and powertrain sizing.The tool is suitable for first-level design analysis, i.e., selecting the size of the various powertrain components (electric motor units, fuel cell, battery pack, etc.) and estimating fuel consumption and overall efficiency.Some of the authors' previous work was inspirational for the model.For example, a power split logic module aimed at tuning the energy management strategy in an FC hybrid system similarly to [16], while the EMS logic applied to a longitudinal vehicle dynamics model was presented in [17].Such a model can be considered consolidated and validated as it has been widely used in the past few years by our research group (Automotive Engineering Group of the Mechanical and Industrial Engineering Department of the University of Brescia); see [18] as well, for instance.Among the related literature, article [19] describes a hybrid vehicle model powered by FC and battery pack and created in MATLAB/Simulink.This model was created ad hoc for a vehicle, in particular, the Daewoo Tico, unlike the tool proposed in this paper, which can be set for the simulation of various vehicles, from small cars to commercial vehicles to heavy vehicles, by appropriately setting the vehicle data and the various variables of the model through the graphical user interface of the tool itself.
Article [20] also describes a model suitable for simulating an FCHEV.This study focuses more on optimizing the energy management strategy, neglecting vehicle modeling, which is rather simplified.Some aspects are, in fact, overlooked, such as the efficiency of the transmission and the inertia of various components (wheels, rotating parts of the transmission, etc.).The same is true for the study presented in [21].The tool described in the present paper, created with the integration of an FC model and an energy management logic [17], accurately considers the different components of the vehicle driveline, considering the related efficiencies and inertias.
Again, the study presented in [22] describes a power management strategy based on a fuel cell, battery and supercapacitor.The fuel economy analysis starts with the load power data resulting from a driving cycle.At the same time, the model focuses only on the FC, battery and supercapacitor components without simulating the entire vehicle, unlike the work proposed in this paper, which was built from an existing vehicle model allowing for the simulation of the entire powertrain, including the driveline, FC, battery pack and power management strategy.
This paper is organized as follows: • Section 2 describes the model for the FC stack [23,24] and the integration of the FC hybrid system in a longitudinal dynamic simulation tool, the "TEST" model described in [17], which is a model with the same functionality as the one described in article [18].

•
Section 3 illustrates the simulation outline, the model's output graphs, and a brief analysis of the results, recalling that the aim of the work is to present software useful for the simulation of FCHEV, not a study of a particular hybrid vehicle equipped with FC.

•
Section 4 presents considerations about the model and future developments.

•
Section 5 gives some concluding remarks.

•
Abbreviations contains the nomenclature and the symbols used in this paper, each with a brief description.

Materials and Methods
A model was developed to study the behavior of an FC-based hybrid powertrain system.In particular, a model simulating a PEMFC (proton exchange membrane fuel cell) was created.This model was then integrated into a powertrain model to be used as the propulsion system in a specific simulation tool for EV vehicles through appropriate logic.The simulation tool, called TEST (Target-speed EV Simulation Tool), was developed by the Automotive Engineering Group of the Mechanical and Industrial Engineering Department of the University of Brescia [17].The PEMFC model is written in MATLAB/Simulink.It consists of a main submodule that simulates the FC stack, integrated into the TEST model with two other submodules: one that simulates power generation by the fuel cell and the second for the power distribution control system.

PEMFC Stack Model
The output voltage from a fuel cell is not constant: it is linked to various operating parameters of the cell itself, such as the current delivered, the temperature of the cell, and the pressure of the reagents.For this reason, the mathematical model computes the link between voltage and current in the cell (polarization curve), as well as the open-circuit voltage and voltage drops as a function of the operating parameters of the cell.The fuel cell stack is composed of several cells in series, so the purpose is to find the output voltage of a single, elementary cell to easily calculate the total voltage of the entire FC pack as the sum of all the voltages of the individual cells, that are supposed to be equal to each other.
The net output voltage of a cell (V cell ) can be calculated as the difference between the open-circuit voltage and the losses in the cell when the current is drowned, as in Equation (1).
where V r is the open-circuit cell voltage, while ν act , ν ohm , and ν conc are the voltage drop due to the activation, ohmic, and concentrations loss, respectively.The reversible opencircuit voltage or Nernst voltage is given by the energy released from the chemical reaction inside the cell and is mathematically calculated applying the Nernst equation [23,25].The standard Nernst voltage is evaluated using the thermodynamic values of the standard state, as shown in [9].If the temperature is different from the standard one (298.15K), the open circuit voltage can be calculated by modifying the equation as shown in (2).
where the Nernst voltage (V r ) is expressed in volts.The value 1.229 is the reference potential expressed in volts, T f c is the temperature (expressed in Kelvin) of the fuel cell, and p H 2 and p O 2 , expressed in atm, are the partial pressure at the anode and at the cathode, respectively.The definition of the three voltage drops depends on different cell operating conditions, such as the temperature, the humidity of the membrane, and the current required.The activation loss (ν act ) results from the chemical reaction occurring in the two electrodes: the break of chemical bonds, the transfer of electrons, and the creation of new bonds.The relation between the activation loss, expressed in volts, and the output current (I f c ) is described in (3), where a series of parametric coefficients (ξ 1 , ξ 2 , ξ 3 , ξ 4 ) is used to explain the Tafel equations [23].
where the output current is expressed in A, and the temperature is expressed in K.
The Ohmic loss (ν ohm ) is related to the internal resistance of the cell due to the resistance of the electric circuit of the cell (R C ) and the resistance in the membrane during the transfer of protons (R M ).The second one is dominant, and it is related to the geometrical parameters of the cell, as shown in (4).
where ν ohm is expressed in volts, R ohm is the total resistance of the cell (in Ohm), while ρ M is the membrane resistivity (Ω • cm), l M is the membrane thickness (cm), and A is the active cell area (cm 2 ).Usually, R C , l M , and A are constant values reported in the dataset of the cell, while resistivity is correlated with the operative parameter of the cell (I f c and T f c ), and it can be expressed as follows in Equation (5).
The parameter λ defines the humidity of the membrane, and it could be considered a constant and expressed in the dataset of the cell.
Lastly, the concentration loss (ν conc ) is a loss of potential due to the inability of the cell to replace the reactants instantaneously in the electrodes, so it is related to the mass transfer.In (6), ν conc is expressed in volts, and it is a function of the fraction between the actual current density (J) and the maximum current density of the cell (J max ), both expressed in (A/cm 2 ).
where β is a parametric coefficient expressed in volts.
The net output voltage range produced from the single cell is usually between 0 and 1 volts (typically 0.7 V).
In this model, pressures at the electrodes are assumed constant, and variation of temperature during the cell cycle is considered negligible, so the temperature is also constant.To obtain the polarization curve, the current required is set as a value that linearly grows between the minimum and maximum values.The model calculates the output voltage of the single cell, and this value is multiplied by the number of cells to obtain the output voltage and the polarization curve of the FC stack.

Integration of FC Powertrain into TEST Model
Through the above model, it is possible to define the characteristic curve of the FC stack.These data are then transferred to the TEST model, where they are used to define the dataset of the FC-based powertrain system.As previously mentioned, the TEST model simulates electric vehicles, so it was necessary to integrate new modules able to simulate the behavior of the FC into the original model.However, all the original features of the model are maintained.Thus, it is still possible to simulate full electric vehicles and APU (auxiliary power unit) hybrid electric vehicles.The user can set the presence or absence of the FC through a graphical user interface, and if the FC is not present on the vehicle, the model will follow the same calculation steps described in [17].The schematic illustration of the operations performed in the TEST model is reported in Figure 1, with a focus on the new module added in this study, represented by the blocks in dashed lines.The purpose is also to maintain the characteristics of the TEST model: reliability, calculation speed, and flexibility.The first step is the introduction of a module that manages the power split between FC and PPS.[17].The new modules introduced for the simulation of the FC hybrid powertrain are reported in dashed lines.The arrows indicate the computational flow (not the energy flow): a backward-facing approach is adopted as in [17,26].In the field of vehicle dynamics simulations, a backward-facing approach consists, in fact, of a calculation flow that goes from the target speed profile or, in any case, from the variables (forces, torques, speeds, etc.) associated with the wheels, all the way back to the variables related to the motors and to the system supplying the energy (battery pack and FC).Following the backward-facing approach, the power that the FC is requested to generate is calculated starting from the required motor torque; therefore, once the operating point of the FC has been calculated, it is possible to calculate the hydrogen consumption and the flow from the hydrogen tank.

Power Split Module
Because of the low efficiency of the FC stack at low and high power, due to the high consumption of energy of the auxiliaries, the FC is usually introduced in hybrid vehicles with a series architecture.The power flows between the peak power source (PPS) and FC are controlled by the power management system of the vehicle.According to the power or torque inputs received from the accelerator, the brake pedal, or other operating signals, the vehicle controller splits the energy flow between the fuel cell system and the PPS.The control strategy should ensure that the fuel cell system operating point is within its optimal operating region, which is typically in the middle power range [27].Furthermore, the PPSʹs energy level is always maintained within its optimal region.The possible operating modes of the drivetrain are the following.
1. Hybrid traction mode: if the power required by the electric motor is greater than the maximum power of the FC ( ), the fuel cell system operates at its rated power.Conceptual scheme of the TEST model [17].The new modules introduced for the simulation of the FC hybrid powertrain are reported in dashed lines.The arrows indicate the computational flow (not the energy flow): a backward-facing approach is adopted as in [17,26].In the field of vehicle dynamics simulations, a backward-facing approach consists, in fact, of a calculation flow that goes from the target speed profile or, in any case, from the variables (forces, torques, speeds, etc.) associated with the wheels, all the way back to the variables related to the motors and to the system supplying the energy (battery pack and FC).Following the backward-facing approach, the power that the FC is requested to generate is calculated starting from the required motor torque; therefore, once the operating point of the FC has been calculated, it is possible to calculate the hydrogen consumption and the flow from the hydrogen tank.

Power Split Module
Because of the low efficiency of the FC stack at low and high power, due to the high consumption of energy of the auxiliaries, the FC is usually introduced in hybrid vehicles with a series architecture.The power flows between the peak power source (PPS) and FC are controlled by the power management system of the vehicle.According to the power or torque inputs received from the accelerator, the brake pedal, or other operating signals, the vehicle controller splits the energy flow between the fuel cell system and the PPS.The control strategy should ensure that the fuel cell system operating point is within its optimal operating region, which is typically in the middle power range [27].Furthermore, the PPS's energy level is always maintained within its optimal region.The possible operating modes of the drivetrain are the following.

1.
Hybrid traction mode: if the power required by the electric motor is greater than the maximum power of the FC (P FCmax ), the fuel cell system operates at its rated power.

2.
FC alone traction mode: if the power required is between the minimum (P FCmin ) and maximum (P FCmax ) power of the FC, the traction is guaranteed only by the latter.The battery pack can be recharged by the FC if necessary.

3.
PPS alone traction mode: if the power required is smaller than the preset minimum power (P FCmin ) of the fuel cell system, the fuel cell system can be turned off, or it can charge the batteries if needed.

4.
Charging mode: if the power required is smaller than the maximum power of the fuel cell system and the PPS needs charging, FC charges the batteries.This operating mode can be active both in the case of "FC alone traction mode" and in the case of "PPS alone traction mode".
A power split module input is the traction power required by the electric motor/s (P tot_req ), computed in the power required module as the sum of the front and rear motor power, obtained by means of [17] (Formulas ( 17) and ( 18)).A second input of the module is the battery pack's state of charge (SOC), referred to as the previous instant of the iteration.The power split block includes a series of "if" checks that first verify if the tested vehicle has the fuel cell and, in the case of the FC hybrid powertrain, define the operating modes.In this case, using the logic described before, the module calculates the power required from the battery (P batt_req ) and the power required from the FC (P FC ).In the case of charging mode, it is also necessary to define the fraction of FC power that is used to charge the PPS (P gen_FC_th ).
In the case of "hybrid traction mode", the power required from the batteries is calculated as in Formula ( 7), and P gen_FC_th is set equal to zero.P batt_req = P tot − P FCmax (7) where P tot is the sum of the traction power request (P tot_req ) and the power of the auxiliary systems.
The "PPS alone traction mode" is divided into two cases, according to the battery SOC.If the SOC is less than a set limit value (SOC max ), the FC works at idle and charges the batteries (P gen_FC_th is equal to P FCmin ).Vice versa, the FC is turned off (P gen_FC_th is equal to zero).In both two cases, the battery pack alone guarantees traction (P batt_req is set equal to P tot ).
The "FC alone traction mode" is also divided into two cases, according to the battery SOC.If the SOC is less than a set limit value (SOC min ), which must be less then SOC max , the FC operates at its maximum power, ensuring vehicle traction and supplying the excess power to the batteries.In this case, P gen_FC_th is calculated as the difference between P FCmax and P tot .On the other hand, the FC delivers exactly the power required to ensure traction without recharging the batteries (P gen_FC_th is set equal to zero).In both cases P batt_req is set equal to zero.
Finally, the power of the FC is calculated as in Equation (8).
Lastly, a binary output signal is generated to define which system between the battery pack and FC is the main energy source in an instant.

Power Converter Module
The power converter block, shown in Figure 1, defines the power bus voltage of the hybrid FC and PPS system as a function of the binary value calculated in the power split module.If the FC is off, the bus voltage is imposed equal to the battery voltage, obtained in output from the data sheet battery block of the Simulink Library Browser [17].Otherwise, the bus voltage is set equal to FC voltage, calculated as the ratio of P FC and the FC current.The latter is estimated thanks to the lookup table containing the information regarding the characteristic curve of the FC (power vs. current) obtained from the PEMFC stack model.

Adjustment to the Electrical Part
As shown in Figure 1, the battery power required (P batt_req ) is sent to the battery limitation module, which verifies if the input and output power limits to the battery pack are respected and defines the effective power of the battery.Within this block, the equations in [17] (Formulas ( 21) and ( 22)) that compute the case of battery discharge or charge are replaced with ( 9) and (10), which are introduced in the inequalities of the power generated by the fuel cell (P gen_FC_th ), calculated in the previous section.
Discharge of battery pack: Charge of battery pack: P acc is the total power consumed by the vehicle auxiliaries, and P gen_th is the power supplied by generators, imposed to zero in the case of the FC hybrid powertrain.
The power generated by the fuel cell and sent to the battery pack is also introduced into the equation to calculate the power available from the battery.In case of discharge, the available power (P aνailable ), which can be taken from the battery pack, is defined in [17] (Formulas ( 23) and ( 24)).These equations are rewritten with Formulas ( 11) and (12).
If the discharge limit of the battery pack is supplied as a limit current (positive, I dischrg_limit ): If the discharge limit of the battery pack is supplied as a limit power (positive, P dischrg_limit ): P aνailable = P dischrg_limit − P bu f f er − P battI2R + P gen_th + P gen_FC (12) V is the battery voltage, P bu f f er is a constant power that defines a tolerance, and P battI2R is the power dissipated by the Joule effect.In this case, the input power supplied by the fuel cell does not have to be limited, so usually, there is no limitation on FC power, and the FC power that is given to the battery charge (P gen_FC ) is equal to P gen_FC_th .In case of a discharge of the battery pack, if there are no limitations, the total power that the motors absorb (P mot_tot ) is calculated using Formula (13).
P mot_tot = P batt_req + P FC − P gen_FC (13) In case of limitations due to the battery state, if the available power of the batteries is sufficient to power the auxiliaries, part of this power will be delivered to them, and the remaining part will be used to power the motors in addition to the power that the FC sends to the motors.The last modification relating to this case, in the presence of FC, is to use the bus voltage to calculate the motor torques.In paper [17] (Formulas (25) and ( 27)), the voltage V of the battery pack is replaced by the bus voltage.
Whenever the battery charge is active, the following inequality is checked to verify if the battery pack can absorb all the input power: Equation ( 14) replaces the inequality in [17] (Formula (32)).
P absorbable + P gen_th + P gen_FC_th − P tot_req ≤ 0 (14) where P absorbable is the maximum power that the battery pack can absorb at that instant.It is therefore observed that the addition of the power generated by the fuel cell, in this case, is more limiting.Where there are limitations in the charging phase, the original model turns off (or partializes) the generators.In this case, where the generators are replaced by the FC, this FC is turned off.This is managed through switches that recognize the presence of the fuel cell through a parameter, which is set equal to one if the fuel cell is not present; otherwise, it is equal to zero.Even in the case of charging, if there is a limitation of the motors, in the presence of FC, the motor torque computation is based on the bus voltage instead of the battery pack voltage.
In paper [17] (Formulas (35) and (37)), the voltage V of the battery pack is replaced by the bus voltage.In the output of the battery limitation block, the effective FC charging power absorbed by the batteries (P gen_FC ) is also added with respect to the model described in [17].The effective FC charging power value is equal to P gen_FC_th in case there are no limitations, and it is sent to the fuel cell block.

Fuel Cell Module
Once the power required from the fuel cell has been calculated, it is possible to define its operative working point.This operation is carried out within the fuel cell block.In this module, the hydrogen consumption is also calculated, which is useful to define the autonomy range of the vehicle.Inputs to this block are the FC power required (P FC ), the theoretical charging power (P gen_FC_th ), and the effective power absorbed by the battery (P gen_FC ).The first operation in this module is to verify the operative condition of the FC: if the power required is zero, the FC is off, and the FC voltage and current are set to zero.If the power is higher than zero, the effective FC output power (P FC_e f f ) is calculated, considering the effective charging power sent to the battery, using Equation (15).
From the effective power, it is possible to know the operative voltage (V f c ) and current (I f c ) of the cell through the array obtained by the module's FC stack.The output current is then used to calculate the consumption of hydrogen mass flow ( .m H 2 ), expressed in g/s, using Equation (16). .
where W H 2 is the molar mass of hydrogen (2.016 kg/mol), n is the number of FC cells, and F is the Faraday number.By subtracting the integration of .m H 2 over time from the mass of hydrogen present in the tank at the start of the simulation, the quantity of hydrogen in the tank during the cycle is estimated.

Validation of the FC Stack Model
The model of the FC stack was validated using the information collected in [24] on the PEMFC stack model BCS 500W (American Company BCS Technologies, North Sydney, Australia).For the validation of the PEMFC model, reference was made to paper [24] as it describes the same FC in a very exhaustive way, and it is complete with all the necessary data, reported here in Table 1.[24] (Table 4).The range of output current required was set between 0.5 A and 30 A.

Parameter
Value Unit The model outputs are compared with the experimental values measured from the cell.The results are displayed in Figure 2 and reveal a good estimation of PEMFC output power and a little overestimation of output voltage.
Energies 2022, 15, x FOR PEER REVIEW 10 of 19 Table 2 reports the optimized parameters extracted in the study; these values are obtained with the MAEO optimization algorithm [24] (Table 4).The range of output current required was set between 0.5 A and 30 A.

Simulation Data
This section presents a simulation carried out with the model described above.The simulation parameters are presented first, related to the specific vehicle and the FC adopted in particular.The vehicle and fuel cell under consideration were chosen mainly due to data availability.In any case, what is important to show here is not the numerical results and the input parameters chosen for the simulation but the type of results that can be obtained from the model, i.e., the quantities that are obtained and the trend of quantities shown in the graphs of the following section, useful in particular to understand the power split logic and therefore the interaction between FC and PPS.
The model was tested on a low-power vehicle, particularly a prototype of a full-electric waste collection vehicle, which was converted to a hybrid hydrogen vehicle.The data of this vehicle are taken from [17], where it is used for the validation of the original tool, and are collected in Table 3.For this test, a study for the sizing of the batteries was not performed; therefore, the original batteries [17] were maintained as a peak power source,

Simulation Data
This section presents a simulation carried out with the model described above.The simulation parameters are presented first, related to the specific vehicle and the FC adopted in particular.The vehicle and fuel cell under consideration were chosen mainly due to data availability.In any case, what is important to show here is not the numerical results and the input parameters chosen for the simulation but the type of results that can be obtained from the model, i.e., the quantities that are obtained and the trend of quantities shown in the graphs of the following section, useful in particular to understand the power split logic and therefore the interaction between FC and PPS.
The model was tested on a low-power vehicle, particularly a prototype of a full-electric waste collection vehicle, which was converted to a hybrid hydrogen vehicle.The data of this vehicle are taken from [17], where it is used for the validation of the original tool, and are collected in Table 3.For this test, a study for the sizing of the batteries was not performed; therefore, the original batteries [17] were maintained as a peak power source, a fuel cell was added as the primary power device, and a high-pressure hydrogen tank has also been added.The weight of the vehicle does not change from the original case.This is due to the assumption that the increase in weight caused by the addition of the FC is balanced with a reduction of the maximum load of the waste collected.The FC Ballard Mark 700, produced by Ballard Power Systems, Burnaby, Canada, (used in the model Ford P2000) is chosen for this vehicle.The data of this cell are collected in [15] and reported in Table 4 in the section "Specifications of the Studied PEMFC Stacks".From this case study, the polarization curve of the single cell was also taken to calculate the corrective parameters described in Section 2.1, which are obtained experimentally starting from the allowable range values of PEMFC parameters described in [24] (Table 1).The results are reported in Table 4, section "Optimized Parameters".The design of the FC was chosen according to the maximum power (40 kW) of the traction motor during a typical driving cycle of the vehicle in an urban environment.The peak power of this FC is 50 kW; thus, the current working range for the fuel cell is limited to a lower range, from 15A to 150A, which corresponds to a minimum power of 5 kW and a maximum of 40.8 kW, so as not to overestimate the work of the FC during the cycle.These are, however, only general, base-level considerations.For a thorough powertrain design of the vehicle under consideration, real-world data of FC, PPS, and hydrogen tanks would be required.The capacity and pressure of the hydrogen tank were set equal to the data available for the Ford P2000: the tank features a capacity of 1.4 kg of hydrogen at the pressure of 24.8 MPa [10].These values were chosen in agreement with the FC in the exam [15].Passenger cars in Europe, however, can store hydrogen up to a maximum pressure of 700bar.It is, therefore, possible to consider an increased storage pressure with the consequent effects on the maximum flow rate from the tank.The latter is an input to the model and can be modified through a graphical user interface.
In the end, the power management system parameters were set; the SOC limit values adopted in the logic were defined: SOC min was set equal to 40%, and the SOC max was set to 90%.These values were chosen to preserve the FC's correct operating working conditions and avoid numerous FC shutdowns during braking.They could be modified for a different type of vehicle and driving cycle.For the simulation, the initial SOC of the battery pack was chosen to be equal to 92% to analyze different FC working modes.

Results
The target speed profile simulated in this work is a WLTC for Class 1 vehicles [28,29], shown in Figure 3.The vehicle studied in this work is aimed at waste collection, so its typical driving cycle features many stop-and-go cycles and short travelling distances at low speed through an urban route.Its typical mission profile is similar to this type of driving cycle [30].
to a lower range, from 15A to 150A, which to a minimum power of 5 kW and a maximum of 40.8 kW, so as not to overestimate the work of the FC during the cycle.These are, however, only general, base-level considerations.For a thorough powertrain design of the vehicle under consideration, real-world data of FC, PPS, and hydrogen tanks would be required.The capacity and pressure of the hydrogen tank were set equal to the data available for the Ford P2000: the tank features a capacity of 1.4 kg of hydrogen at the pressure of 24.8 MPa [10].These values were chosen in agreement with the FC in the exam [15].Passenger cars in Europe, however, can store hydrogen up to a maximum pressure of 700bar.It is, therefore, possible to consider an increased storage pressure with the consequent effects on the maximum flow rate from the tank.The latter is an input to the model and can be modified through a graphical user interface.
In the end, the power management system parameters were set; the SOC limit values adopted in the logic were defined:  was set equal to 40%, and the  was set to 90%.These values were chosen to preserve the FCʹs correct operating working conditions and avoid numerous FC shutdowns during braking.They could be modified for a different type of vehicle and driving cycle.For the simulation, the initial SOC of the battery pack was chosen to be equal to 92% to analyze different FC working modes.

Results
The target speed profile simulated in this work is a WLTC for Class 1 vehicles [28,29], shown in Figure 3.The vehicle studied in this work is aimed at waste collection, so its typical driving cycle features many stop-and-go cycles and short travelling distances at low speed through an urban route.Its typical mission profile is similar to this type of driving cycle [30].In addition to the charts featured by the original model [17], showing trends associated with the vehicleʹs mechanical and electrical systems, a chart with the FC operating parameters is added to the output graphs, as shown in Figure 4.This chart reports the electric parameters of the FC (power, current, voltage), the bus domain settings (a binary parameter equal to 1 if the PPS is the primary power source, equal to 0 if the FC is the primary power source), the input voltage to the electric motor, and the mass of hydrogen in the fuel tank.In addition to the charts featured by the original model [17], showing trends associated with the vehicle's mechanical and electrical systems, a chart with the FC operating parameters is added to the output graphs, as shown in Figure 4.This chart reports the electric parameters of the FC (power, current, voltage), the bus domain settings (a binary parameter equal to 1 if the PPS is the primary power source, equal to 0 if the FC is the primary power source), the input voltage to the electric motor, and the mass of hydrogen in the fuel tank.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.The first result that is analyzed is the behavior of the EMS, illustrated by the binary output of the power split module represented in Figure 5. Due to the several stop-and-go cycles and frequent decelerations, the output of Figure 5 is a square signal, and both the power sources come into play during the cycle.In the design and dimensioning phase, this situation of frequent on/off of the FC should be avoided.In Figure 6, it is possible to see the output power of the FC during the simulation: the FC works at idle or is inactive whenever the battery is the primary power source, in other words, when the BUS voltage regulator is equal to one.The first result that is analyzed is the behavior of the EMS, illustrated by the binary output of the power split module represented in Figure 5.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.The first result that is analyzed is the behavior of the EMS, illustrated by the binary output of the power split module represented in Figure 5. Due to the several stop-and-go cycles and frequent decelerations, the output of Figure 5 is a square signal, and both the power sources come into play during the cycle.In the design and dimensioning phase, this situation of frequent on/off of the FC should be avoided.In Figure 6, it is possible to see the output power of the FC during the simulation: the FC works at idle or is inactive whenever the battery is the primary power source, in other words, when the BUS voltage regulator is equal to one.Due to the several stop-and-go cycles and frequent decelerations, the output of Figure 5 is a square signal, and both the power sources come into play during the cycle.In the design and dimensioning phase, this situation of frequent on/off of the FC should be avoided.In Figure 6, it is possible to see the output power of the FC during the simulation: the FC works at idle or is inactive whenever the battery is the primary power source, in other words, when the BUS voltage regulator is equal to one.Figure 6 also shows that sometimes the FC is switched off because of limitations due to the maximum power absorbable to the battery.In fact, in some time intervals with low power demand, the FC cannot work at idle by recharging the batteries with the surplus power as the latter exceeds the maximum charging power accepted by the battery pack (for example, because the latter is already at a high state of charge).In Figure 7, the intervention of the FC limitation due to the battery is shown.In these short intervals, the vehicle is braking, and the charging power in input to the battery is too high, so the EMS suspends the FC charging mode to preserve the PPS.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.
During the cycle, many limitations occur, and this is due to the logic implemented in the hybrid system, but in particular, it is due to the parameters of the simulation (PPS size, FC).The system should therefore be correctly sized to avoid this.The last parameter of the FC system is the mass of hydrogen in the tank, shown in Figure 8, which is useful for estimating the vehicleʹs range.During this simulation, the vehicle consumed approximately 0.13 kg of hydrogen.The system will therefore also be sized in such a way as to minimize hydrogen consumption, thus making the system more efficient and increasing the range of the vehicle, or vice versa, reducing the volume and weight of the tank within the same vehicle range.The suitable range will be selected based on the typical mission profile for the vehicle.Figure 6 also shows that sometimes the FC is switched off because of limitations due to the maximum power absorbable to the battery.In fact, in some time intervals with low power demand, the FC cannot work at idle by recharging the batteries with the surplus power as the latter exceeds the maximum charging power accepted by the battery pack (for example, because the latter is already at a high state of charge).In Figure 7, the intervention of the FC limitation due to the battery is shown.In these short intervals, the vehicle is braking, and the charging power in input to the battery is too high, so the EMS suspends the FC charging mode to preserve the PPS. Figure 6 also shows that sometimes the FC is switched off because of limitations due to the maximum power absorbable to the battery.In fact, in some time intervals with low power demand, the FC cannot work at idle by recharging the batteries with the surplus power as the latter exceeds the maximum charging power accepted by the battery pack (for example, because the latter is already at a high state of charge).In Figure 7, the intervention of the FC limitation due to the battery is shown.In these short intervals, the vehicle is braking, and the charging power in input to the battery is too high, so the EMS suspends the FC charging mode to preserve the PPS.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.
During the cycle, many limitations occur, and this is due to the logic implemented in the hybrid system, but in particular, it is due to the parameters of the simulation (PPS size, FC).The system should therefore be correctly sized to avoid this.The last parameter of the FC system is the mass of hydrogen in the tank, shown in Figure 8, which is useful for estimating the vehicleʹs range.During this simulation, the vehicle consumed approximately 0.13 kg of hydrogen.The system will therefore also be sized in such a way as to minimize hydrogen consumption, thus making the system more efficient and increasing the range of the vehicle, or vice versa, reducing the volume and weight of the tank within the same vehicle range.The suitable range will be selected based on the typical mission profile for the vehicle.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.
During the cycle, many limitations occur, and this is due to the logic implemented in the hybrid system, but in particular, it is due to the parameters of the simulation (PPS size, FC).The system should therefore be correctly sized to avoid this.The last parameter of the FC system is the mass of hydrogen in the tank, shown in Figure 8, which is useful for estimating the vehicle's range.During this simulation, the vehicle consumed approximately 0.13 kg of hydrogen.The system will therefore also be sized in such a way as to minimize hydrogen consumption, thus making the system more efficient and increasing the range of the vehicle, or vice versa, reducing the volume and weight of the tank within the same vehicle range.The suitable range will be selected based on the typical mission profile for the vehicle.Lastly, it is interesting to analyze the state of charge of the battery pack during the cycle, as illustrated in Figure 9.The logic improvement guarantees that the SOC decreases during the cycle staying in its optimal range.This situation is to be pursued during the design phase, taking into account the optimal range of the battery pack chosen for the project, which may vary according to the type of battery.

Discussion
This paper describes a tool suitable for carrying out analysis, sizing, base level design calculations, and energy or hydrogen consumption estimates for hybrid vehicles powered by fuel cells and a PPS, which in the current state of the Simulink model is represented by a battery pack.As shown in the "Results" section, the model outputs are the trend of various quantities, suitable for selecting the correct size of the hybrid powertrain and for testing the power split logic aimed at managing the interaction between FC and PPS.In particular, by monitoring the state of the FC, it is possible to choose appropriate settings for the power split logic, taking into account the optimal operating range of the batteries, and to correctly size the power of the FC and the nominal capacity of the battery pack.The FC powertrain system described in this paper is developed to integrate the TEST model with a hydrogen power source while preserving its main attributes: high calculation speed, robustness, and flexibility.The necessity of conserving a light model structure and reasonably short calculation times resulted in the introduction of several approximations.The main approximation is the omission of the compressor consumption in the computation of the FC auxiliary power required.This results in an overestimation of the FC Lastly, it is interesting to analyze the state of charge of the battery pack during the cycle, as illustrated in Figure 9.The logic improvement guarantees that the SOC decreases during the cycle staying in its optimal range.This situation is to be pursued during the design phase, taking into account the optimal range of the battery pack chosen for the project, which may vary according to the type of battery.Lastly, it is interesting to analyze the state of charge of the battery pack during the cycle, as illustrated in Figure 9.The logic improvement guarantees that the SOC decreases during the cycle staying in its optimal range.This situation is to be pursued during the design phase, taking into account the optimal range of the battery pack chosen for the project, which may vary according to the type of battery.

Discussion
This paper describes a tool suitable for carrying out analysis, sizing, base level design calculations, and energy or hydrogen consumption estimates for hybrid vehicles powered by fuel cells and a PPS, which in the current state of the Simulink model is represented by a battery pack.As shown in the "Results" section, the model outputs are the trend of various quantities, suitable for selecting the correct size of the hybrid powertrain and for testing the power split logic aimed at managing the interaction between FC and PPS.In particular, by monitoring the state of the FC, it is possible to choose appropriate settings for the power split logic, taking into account the optimal operating range of the batteries, and to correctly size the power of the FC and the nominal capacity of the battery pack.The FC powertrain system described in this paper is developed to integrate the TEST model with a hydrogen power source while preserving its main attributes: high calculation speed, robustness, and flexibility.The necessity of conserving a light model structure and reasonably short calculation times resulted in the introduction of several approximations.The main approximation is the omission of the compressor consumption in the computation of the FC auxiliary power required.This results in an overestimation of the FC

Discussion
This paper describes a tool suitable for carrying out analysis, sizing, base level design calculations, and energy or hydrogen consumption estimates for hybrid vehicles powered by fuel cells and a PPS, which in the current state of the Simulink model is represented by a battery pack.As shown in the "Results" section, the model outputs are the trend of various quantities, suitable for selecting the correct size of the hybrid powertrain and for testing the power split logic aimed at managing the interaction between FC and PPS.In particular, by monitoring the state of the FC, it is possible to choose appropriate settings for the power split logic, taking into account the optimal operating range of the batteries, and to correctly size the power of the FC and the nominal capacity of the battery pack.The FC powertrain system described in this paper is developed to integrate the TEST model with a hydrogen power source while preserving its main attributes: high calculation speed, robustness, and flexibility.The necessity of conserving a light model structure and reasonably short calculation times resulted in the introduction of several approximations.The main approximation is the omission of the compressor consumption in the computation of the FC auxiliary power required.This results in an overestimation of the FC system efficiency.Flexibility and the modular structure are maintained.For these reasons, the model is open to simple modification from the user; on top of that, it can switch between different powertrain architectures.Thanks to this modularity, for example, in the future, it will be possible to add a supercapacitor model as PPS in the case of FCHEV simulation.
Another potential future development could involve the introduction of a model that simulates the compressor of the FC, necessary to maintain high flow pressure at the cathode.The compressor can strongly influence the efficiency of the FC system.A further step could involve the introduction of a dynamic and/or thermal FC stack model, considering possible variations in partial pressure and/or temperature inside the FC during the simulation cycle.Finally, the sizing of the FC and battery pack for the waste collection vehicle object of this paper could be reported in a future paper.
In summary, the high flexibility of the model makes it very easy to introduce changes and future developments to this simulation tool, as done in this study, starting from the model of paper [17].

Conclusions
This study describes a MATLAB and Simulink model of a PEMFC system integrated into a vehicle's EV dynamic powertrain system.The first step of the process is creating a model for the single FC chemical reaction, evaluating the net output voltage of the FC stack.Subsequently, it is necessary to develop a correct control strategy to governate the power flux into the hybrid system, in which the FC should operate within its optimal range while the battery pack acts as a peak power source.The option of battery recharging from the power grid is not currently provided in the model.The main goals of the control logic here are preventing several shutdown cycles of the FC and avoiding battery charging above the maximum SOC.
The model is suitable for analyzing the behavior of different powertrain layouts (EVs, APU hybrid electric vehicles and, particularly, FC/PPS hybrid vehicles).It can therefore be used as a tool for estimating the design parameters at the design and prototyping stage, sizing the system components, defining the power flow control strategy, and estimating energy and hydrogen consumption.
In summary, starting from a tool for the simulation of fully electric and hybrid APU vehicles created by the authors in previous work, a new tool was created for the analysis and study of hybrid vehicles equipped with FC and battery pack with peak power source function.The modularity of the model means that with appropriate modifications and integrations, it is possible to simulate and study other configurations; for example, hybrid vehicles with FC and supercapacitors as PPS, or vehicles in which the FC acts only as a generator for recharging the battery pack as the only source for tractive power.It is also possible to integrate models of other types of fuel cells [31] or FCs powered using different fuels such as methane or biomethane.Thanks again to the modularity, it is also possible to make the tool more precise by adding models suitable for the simulation of components that have been approximated or neglected, such as the fuel cell compressor.

Figure 1 .
Figure 1.Conceptual scheme of the TEST model[17].The new modules introduced for the simulation of the FC hybrid powertrain are reported in dashed lines.The arrows indicate the computational flow (not the energy flow): a backward-facing approach is adopted as in[17,26].In the field of vehicle dynamics simulations, a backward-facing approach consists, in fact, of a calculation flow that goes from the target speed profile or, in any case, from the variables (forces, torques, speeds, etc.) associated with the wheels, all the way back to the variables related to the motors and to the system supplying the energy (battery pack and FC).Following the backward-facing approach, the power that the FC is requested to generate is calculated starting from the required motor torque; therefore, once the operating point of the FC has been calculated, it is possible to calculate the hydrogen consumption and the flow from the hydrogen tank.

Figure 1 .
Figure 1.Conceptual scheme of the TEST model[17].The new modules introduced for the simulation of the FC hybrid powertrain are reported in dashed lines.The arrows indicate the computational flow (not the energy flow): a backward-facing approach is adopted as in[17,26].In the field of vehicle dynamics simulations, a backward-facing approach consists, in fact, of a calculation flow that goes from the target speed profile or, in any case, from the variables (forces, torques, speeds, etc.) associated with the wheels, all the way back to the variables related to the motors and to the system supplying the energy (battery pack and FC).Following the backward-facing approach, the power that the FC is requested to generate is calculated starting from the required motor torque; therefore, once the operating point of the FC has been calculated, it is possible to calculate the hydrogen consumption and the flow from the hydrogen tank.

Figure 4 .
Figure 4. Overview of the model results.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.Bottom left: fuel cell power.Top right: fuel cell current.Middle right: fuel cell voltage.Bottom right: mass of hydrogen in the tank.
Figure 4. Overview of the model results.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.Bottom left: fuel cell power.Top right: fuel cell current.Middle right: fuel cell voltage.Bottom right: mass of hydrogen in the tank.

Figure 5 .
Figure 5.The binary output of the power split module for the control of power flux.The binary value is equal to 1 if the FC is off and 0 if the FC is active.

Figure 4 .
Figure 4. Overview of the model results.In abscissa, the time is expressed in seconds.(Top left): the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.(Middle left): "BUSVolt", the input voltage to the electric motor.(Bottom left): fuel cell power.(Top right): fuel cell current.(Middle right): fuel cell voltage.Bottom right: mass of hydrogen in the tank.

Figure 4 .
Figure 4. Overview of the model results.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.Bottom left: fuel cell power.Top right: fuel cell current.Middle right: fuel cell voltage.Bottom right: mass of hydrogen in the tank.
Figure 4. Overview of the model results.In abscissa, the time is expressed in seconds.Top left: the "Bus Voltage Regulation" that is the binary parameter equal to 1 if the FC is off or at idle (when the PPS is the primary power source), or equal to 0 if the FC is on and it is the primary power source of the propulsion system.Middle left: "BUSVolt", the input voltage to the electric motor.Bottom left: fuel cell power.Top right: fuel cell current.Middle right: fuel cell voltage.Bottom right: mass of hydrogen in the tank.

Figure 5 .
Figure 5.The binary output of the power split module for the control of power flux.The binary value is equal to 1 if the FC is off and 0 if the FC is active.

Figure 5 .
Figure 5.The binary output of the power split module for the control of power flux.The binary value is equal to 1 if the FC is off and 0 if the FC is active.

Figure 6 .
Figure 6.Output power of the fuel cell stack.

Figure 7 .
Figure 7.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.

Figure 6 .
Figure 6.Output power of the fuel cell stack.

Energies 2022 , 19 Figure 6 .
Figure 6.Output power of the fuel cell stack.

Figure 7 .
Figure 7.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.

Figure 7 .
Figure 7.The battery limitation binary parameters.The binary value of "Battery limitations" is equal to 1 if any battery limitations occur; it is equal to 0 if vice versa."Battery limitations" means that the battery pack cannot be recharged with the power that the EMS logic would provide by the FC.Therefore, the system is limited, and the EMS logic causes the FC to stop power flow towards the PPS.

Figure 8 .
Figure 8. Mass of hydrogen contained in the tank.Useful for monitoring the consumption of hydrogen and the vehicleʹs remaining range.

Figure 9 .
Figure 9. Battery pack state of charge.

Figure 8 .
Figure 8. Mass of hydrogen contained in the tank.Useful for monitoring the consumption of hydrogen and the vehicle's remaining range.

Energies 2022 , 19 Figure 8 .
Figure 8. Mass of hydrogen contained in the tank.Useful for monitoring the consumption of hydrogen and the vehicleʹs remaining range.

Figure 9 .
Figure 9. Battery pack state of charge.

Figure 9 .
Figure 9. Battery pack state of charge.

Table 2
reports the optimized parameters extracted in the study; these values are obtained with the MAEO optimization algorithm