Multidomain Device-Level Fuel-Cell Modeling and Real-Time Hardware Emulation for Marine Research Vessel Power System

Marine research vessels (MRVs) are redesigned and refurbished to meet higher energy conversion efficiency and modular integration schemes while conforming to stronger environmental regulations. The proton exchange membrane fuel cell (PEMFC) is currently regarded as a potential power source for marine transportation applications due to its advantages of stability, sustainability, and zero emissions. This article proposes a hierarchical scheme for the real-time hardware emulation of the MRV’s power system and a comprehensive multidomain model for PEMFCs. The PEMFC model is presented in the electrochemical, hydration, and thermal domains by ordinary differential equations considering the interactions and dynamics of each domain. Meanwhile, the multidomain PEMFC model considers the implications of the fluctuating supply of the onboard hydrogen circulation system. Moreover, the dynamics of the lithium-ion battery stacks are represented by an equivalent circuit model which considers heat flux phenomena. In the case study, the dc–ac grid of the MRV’s power system and electric propulsion system is configured using extensive electrification technology with an average model. The real-time hardware emulation is conducted on the Xilinx UltraScale+ VCU118 FPGA platform to execute the device-level and system-level behavior transients of the MRV. The results of the real-time hardware emulation have been validated against the full-scale hybrid MRV power system emulation over a wide operating range.


I. INTRODUCTION
T HE international marine organization continues to dedicate itself to the global fight against greenhouse gas emission in support of the sustainable development goals [1], [2], [3].This strategy aims to reduce emissions per transport work in international shipping by at least 40% by 2030 and a target of 70% by 2050.In addition, the strategy aims to decrease the total annual emissions by more than 50% in The authors are with the Department of Electrical and Computer Engineering, University of Alberta, Edmonton, AB T6G 2V4, Canada (e-mail: clyu1@ualberta.ca;dinavahi@ualberta.ca).
Digital Object Identifier 10.1109/TTE.2023.32734652050 compared with the levels in 2008 [4], [5], [6].In particular, it is crucial to modify conventional power supply to reduce the dependence on fossil fuels since marine research vessels (MRVs) are intended to complete scientific duties in harsh environments, such as the Arctic seas.In this case, energy storage and electric propulsion systems bring a promising solution for the modern MRV with an environmentally friendly power supply.In recent research, onboard electricity generation systems have gained more attention and transformed the way energy and power are generated, stored, and utilized in transportation electrification [7], [8].
Thanks to the rapid development of large-scale modular technologies, sustainable energy storage devices have made it possible for transportation systems to reliably and cost-effectively store and access renewable energy [9], [10].Currently, proton exchange membrane fuel cells (PEMFCs) are one of the most attractive power source solutions for MRVs due to their three key benefits [11].At first, they are environmentally friendly, as gaseous hydrogen is commonly used as the fuel source for PEMFCs, and the chemical reaction produces water as the primary byproduct, making it harmless [12].Second, they offer stable performance, providing consistent and steady operating voltage and current, unlike batteries and supercapacitors, which require inner power converters to address voltage and energy imbalances between cells [13], [14].Third, PEMFCs offer high efficiency, with an energy conversion efficiency of 60%, while the whole fuel-cell systems have an efficiency of 45%-55%.
There are three standard PEMFC models: equivalent-circuitbased, physic-based, and machine learning models.In [12], a dynamic PEMFC model is presented for the PEMFC layer level in order to reveal electrical behavior and thermal performance.Based on the equivalent circuit, this model is modified for several improvements in terms of the heat component and the spatial effects for a single cell in the stack separately.In [15], by altering reactant flow transport between the cathode and anode channel, the fluid model is developed to show the geometric aspects of serpentine channels.In [16], the resistance and capacitance are combined for the equivalent circuit model to reflect the fuel-cell degradation.In [17], a computation model for the fuel-cell energy storage system is presented for the analysis of electrical behavior in the steady-state under different operating conditions.The physics-based model is one of the electromagnetic transient modeling methods that can explain the physical phenomenon in both steady-state and transients [18], [19], [20].In [18], the ohmic, activation, and concentration voltage drops are represented by physics-based models composed of a number of differential equations; the model also considers the charging phenomenon of the double layer and variations.Furthermore, higher dimensional physics models are also investigated in [19] and [21], where a 2-D physics model is proposed for fuel cells with the thermal performance description.A 3-D coupled multiphysics model is proposed in [20] in order to reveal electrical ionic conductivity, as well as hydration and thermal behavior.
As the rapid development and implementation of machine learning algorithms, the feed-forward neural network is utilized to model the operating voltage and current in the PEMFC [22].For a predictive control for PEMFC energy systems, a nonlinear autoregressive neural network modeling approach with is developed and validated in [23].The exogenous input and nonlinear output error structures are utilized to build the autoregressive model.However, these models do not consider the onboard gaseous hydrogen fuel supply variation during the MRV operation.
Despite PEMFC stacks having reliable electrical performance, the lithium-ion battery stacks are still necessary for energy buffering to withstand the harsh environment of MRV's operating conditions [24], [25], [26].The battery stacks used in MRV's energy storage system are designed to balance between energy and power densities over a wide range of operating temperatures.Meanwhile, the battery stacks have capable of improving energy efficiency by absorbing energy during active regenerative braking.Equivalent circuit models and nonlinear filters are widely used to obtain the battery's state-of-charge (SoC).In [27], a dual Kalman filter is utilized in a 1-D battery model to estimate SoC and inner temperature.Furthermore, for SoC prediction in [28], machine learning algorithms such as recurrent neural networks with global feedback theorem are also implemented in SoC estimation.
Fig. 1(a) illustrates a concept hybrid electric and diesel MRV design proposed by Glosten in collaboration with Sandia National Laboratories, as a replacement for an existing Robert Gordon Sproul [5].The entire MRV's electric propulsion system, as shown in Fig. 1(b), consists of numerous components, including power converters, diesel generators, thrusters, and auxiliaries, such as a navigation system, lighting, and various communication systems.PEMFC stacks, in particular, are outfitted with onboard hydrogen circulation systems, including fuel tanks, fuel filters, and fuel pumps.In addition, the cooling system with coolers, seawater pumps, and seawater strainers and strainers are also required for energy storage systems [3].MRV's massive electrification and the corresponding rise in energy storage device integration imply the requirement for effective supervision of the entire electric systems using realtime hardware-in-the-loop (HIL) simulation.One intriguing alternative for real-time emulation is the field-programmable gate array (FPGA) technology and the related hardware description language.
The FPGA platform allows for the development of digital simulators for electric drive systems, power converters, and energy storage systems, enabling unified control and management of the electric system [29].The platform is built using a modular strategy, enabling simple integration of various components, and creating unique control schemes.The platform also offers communication interfaces with the outside world, enabling the integration of extraneous sensors and actuators for HIL testing.The creation of the suggested platform will have several advantages, including increased MRV electric system operation efficiency, increased safety and dependability, and decreased development costs for control and energy management solutions.In addition, the HIL platform will enable the integration of new components and technologies into MRV's electric systems, further improving their performance.
This article presents the hierarchical scheme of real-time hardware emulation as an effective tool for designing and testing MRV's power system.The comprehensive dynamic models for the PEMFC and battery hybrid energy storage system are developed to represent device-level behavioral transients during the operation.The significant contributions are summarized as follows.
1) The multidomain PEMFC model explicitly represents the dynamic behavioral transients by ordinary differential equations in terms of electrochemical, hydration, and thermal domains.The interaction between the three domains is mathematically coupled during the solution process.The impact of variable hydrogen fuel supply on PEMFC performance is considered by incorporating the mathematical modeling of the onboard hydrogen fuel circulation system into the multidomain PEMFC model.2) The proposed hierarchical hardware emulation scheme can provide MRV system-level features of the energy storage system and electric propulsion system.Meanwhile, device-level steady-state and dynamic characteristics can be explicitly presented in real-time by detailed models for PEMFC and battery stacks.The ac-dc grid of the energy storage system and electric propulsion system is represented by the average modeling technique.Moreover, the device-level models and the subsystem models can be mathematically separated and solved in parallel, which can accelerate hardware emulation speed.3) Real-time hardware emulation is implemented on the Xilinx1 UltraScale+ VCU118 FPGA platform in hardware description language.The FPGA platform takes advantage of faster response and high extensibility, which allows the developer to customize components and systems.The system-level emulation can be delivered at a 10 ms execution time interval and device-level emulation is updated every 1 ms, which makes the proposed scheme a potential candidate for a model-based control design or an HIL application for testing the MRV power system.The R/V Robert Gordon Sproul MRV is adopted as the case study in this article, and the powertrain configuration is collected from [5].The multidomain PEMFC model is validated against the empirical model in [30] during a wide operating range and shows excellent agreement between these two models.The hardware emulation is conducted on the Xilinx 1 VCU118 board with an XCVU9P FPGA.The system-level and device-level emulation result shows that the proposed hardware emulation scheme can accurately reveal MRV's behavioral transients in real-time.
This article is organized as follows.The multidomain PEMFC stack model from the perspectives of electrochemical, hydration, and thermal domains is proposed in Section II.The battery stack model is developed in Section III.The MRV's power system including the hydrogen fuel circulation system and electric propulsion system is analyzed and modeled in Section IV.The real-time hardware emulation and device-level model validation are provided and analyzed in Section V, and Section VI provides conclusions.

II. MULTIDOMAIN PROTON EXCHANGE MEMBRANE
FUEL-CELL STACK MODELING The general structure of PEMFC cell is shown in Fig. 2(a), including anode, cathode, diffusion layer, and proton exchange membrane.The coupled multidomain PEMFC stack model is presented in terms of electrochemical, hydration, and thermal behavior since the PEMFC generates electricity and heat due to the hydration chemical reaction.This proposed model consists of the electrochemical, hydration, and thermal domains.The electrochemical domain briefly describes the electrical dynamic behavior and characteristics including the electromotive force, output voltage, and current.The hydration domain describes the hydrogen and oxygen gas flows and analyzes the effect on the hydration reactions.Meanwhile, the thermal domain represents the heat distribution and transmission and the effect on gas flow pressure and the temperature during the electrochemical reaction and ion transport.

A. Electrochemical Domain
The electrochemical domain is presented mainly by the Nernst equation and voltage loss functions [15], [16], [17], [31].There are three assumptions made in the electrochemical domain: 1) on the anode side, the voltage drop driven on by activation losses is insignificant; 2) only the membrane's ohm losses are taken into account; and 3) PEMFC gas diffusion in the membrane, catalyst layers, and diffusion layers on both cathode and anode sides is considered as the steady-state.
The electromotive force of PEMFC E FC at the temperature by the Nernst equation as follows: where E FC,sp is the ideal standard potential at the reference conditions of standard atmosphere pressure and 303.15 K, T C stands for the temperature on the catalyst layer of the cathode side, P O 2 is the oxygen pressure, and P H 2 is the hydrogen fuel pressure.
In addition, P sat and (T ) are two dynamic functions related to the layer temperature in kelvin.P sat is sensitive to cathode catalyst layer temperature T C can be expressed in the series expansion format as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
is the linear coefficient function reflecting the relationship with the temperature of the specific layer as follows: where R is the ideal gas constant, F is the Faraday constant, and i ∈ {C, GDL} for the proposed PEMFC model.In particular, the hydrogen pressure is determined by the hydrogen supply circulation system, which will be further explained in Section IV.
There are three inevitable and irreversible losses, which are ohmic, activation, and diffusive transport losses, that affect the PEMFC output voltage.First, the ohmic loss is calculated in the electrochemical domain.The equivalent electrical resistance in the membrane is the key reason for the PEMFC's ohmic losses, which can be expressed as follows: where I FC is the PEMFC stack current, and R M is the electrical resistance of the PEMFC's membrane, which can be obtained by where A M is the PEMFC membrane active area, T M is the membrane temperature, and T amb is ambient environment temperature.Note that ϕ(σ ) is a parameter related to water vapor activity, which can be obtained in the hydration domain model.
The Tafel equation is adopted to describe the losses due to PEMFC activation behavior, which occurs on anode and cathode catalyst layers [31] as follows: where S C is the active area in the catalyst layer, κ 4 is the friction parameter, n is the number of electric charges during the hydration reaction, in addition, j 0 is current at zero over-potential and without net electrolysis.Furthermore, the activation loss is then obtained by an empirical function where ε 1 , ε 2 , ε 3 , and ε 4 are four parameters that are available from the PEMFC static polarization curve in [17] and listed in the Appendix.The voltage loss, because of the convection and diffusion encountered during the electrochemical reaction in the PEMFC, then can be obtained as the following equation: where GDL is a linear coefficient function related to the gas diffusion layer's temperature, and Ī FC,max is the PEMFC cathode limit current.Note that the PEMFC operating current is not allowed to be over Ī max and the over-discharge scenario is not considered in this article.
Eventually, the PEMFC's output voltage in the steady-state can be expressed by where V FC is the output voltage of PEMFC.

B. Hydration Domain
PEMFC can convert the chemical energy of gaseous hydrogen fuel into electricity directly because of the hydration reaction with oxygen.The gaseous hydrogen pressure loss results from physical pressure drop when the hydrogen fuel cross through the straight catalyst channel.In addition, the hydrogen and oxygen flow into the gas diffusion layer also causes the pressure drop during the hydration reaction.In this case, there are three hypotheses made for the hydration domain [13]: 1) the pressure drop of the vapor and oxygen gas flow is ignored; 2) the back-diffusion phenomenon is neglected for both cathode and anode sides; and 3) the pressure loss due to physical channel inflection is negligible.
The water vapor activity is noted as σ , then ϕ(σ ) can be calculated as follows: where σ stands for the proportion of the water partial pressure to the vapor saturation pressure where where τ 1 , τ 2 , τ 3 , and τ 4 are four empirical parameters listed in the Appendix.The pressure loss of gaseous hydrogen fuel and oxygen occurs both in the cathode and anode diffusion layers, respectively, which can be obtained by where σ is the friction parameter, L M is the length of the channel, D pip is the diameter of the hydrogen fuel circulating pipes, and v s is the mean speed in the layers.Moreover, gas diffusion is regarded as the main phenomenon that occurs in the gas diffusion layer on both cathode and anode sides, which can be expressed by where δ i and S i are the width and section of gas diffusion layers, respectively.Pr i is the mean total pressure in two diffusion layers, and m i and m j are the gas mass, which is hydrogen and oxygen gas.Moreover, D i j is the interspecies diffusion coefficient between i and j.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
Since the back-diffusion phenomenon is not considered in this case, the water mass flow during the hydration reaction can be obtained by where m H 2 O is the water molar mass.Thus, the hydrogen and oxygen pressure during the hydration reaction is available according to the above analysis.Furthermore, during each iterative solution process, the pressure affects the PEMFC's electrical behavior, i.e., potential, open circuit voltage (OCV), as well as output voltage.There are two main hypothesizes made in the thermal domain [31]: 1) the hydration reaction occurs on the cathode side, and thus, the internal heat generated because of the activation losses can be negligible in the anode catalyst layer and 2) the extra heat diffused between the mechanical layer and the hydrogen fuel flow are negligible.

C. Thermal Domain
The PEMFC's main internal resistance results from the equivalent membrane resistance.The PEMFC membrane resistance causes an irreversible energy loss when a current flows across it, which is determined using Joule's law where Q FC,mem is the heat source in the membrane layer, and R M can be found from (5).The process of generating power from electrochemical reactions in the PEMFC also produces heat.In the cathode catalyst layer, the heat is mainly generated by the entropy changes and the activation phenomenon during the hydration reaction.The heat in the catalyst layer can be expressed as follows: where S is the entropy changes, and V FC,act is available in (7).
According to Fourier's law, the PEMFC solid material layers transmit heat through conduction, which is obtained as follows: where λ M is the membrane's material thermal conductivity, A M,C is the contact area between the membrane and catalyst of the cathode side, and d M is the material thickness where f cr is the heat transfer coefficient that is used for the description of the convection and radiation scenarios, and S ext is the section of the graphite plate.Finally, the total heat flow variation can be obtained by TABLE I MULTIDOMAIN PEMFC STACK PARAMETERS [5] The thermal performance can be represented by a differential equation as follows: where ρ M is the mean gaseous hydrogen and vapor density in the polymer electrolyte layer, and S M and h M are the membrane's section and height, respectively.In addition, C p,M is the mean thermal capacity of gaseous hydrogen and air in the layer.

D. Proton Exchange Membrane Fuel-Cell Stack Modeling
The stack model is based on the electrochemical reactions occurring inside the cells and the equilibrium of current and voltage between them.In general, the several fuel cells are stacked to meet the requirements in terms of voltage, energy, and power by connecting them in parallel and series.As one of the most stable electrochemical energy conversion devices, there is no extra power converter or device required for each individual fuel cell to regulate the voltage and current, because there is no significant voltage gap between fuel cells.
In this article, the individual cell and stacks utilized the same modeling technique.The stack model also takes into account pressure, temperature, and reactant flow rate under various operating conditions.

III. BATTERY PACK MODELING
Due to the limited PEMFC's electrical respond, it is necessary to implement the lithium-ion battery as energy buffering to improve the energy and power density of the entire onboard energy storage system.The battery stack can compensate for the instant power ripple to protect PEMFC stacks.Thus, the battery stack model is also required for the MRV emulation.

A. Battery Stack Dynamic Electrical Model
Fig. 3 illustrates the basic equivalent circuit model for both the electrical behavior and thermal performance of a battery.The model incorporates several resistances and capacitances in order to reflect the relationship between the potential and OCV.Meanwhile, the self-discharge, activation, concentration gradient, and diffusion phenomena will be represented by the model.
The potential generated by the sophisticated chemical reactions inside the batteries can be obtained according to the modified Nernst equation as follows: where E bt,sp is the ideal standard potential at the reference conditions, and bt is a variable related to T bt as shown in (3).In this article, the SoC is defined as follows: where SoC max is the maximum capacity of the battery stack, and η bt is noted as the instantaneous efficiency, which is influenced by the self-discharge phenomenon and can be calculated as where R bt,dif stands for diffusion scenario.R bt,sh is the shunt resistance during the self-discharge process.
First, the terminal voltage of the battery stack can be calculated as follows: where V bt,ohm , V bt, act , and V bt, con represent the ohmic loss, activation energy of the electrochemical reactions, and concentration gradient loss, respectively.Furthermore, the ohmic losses are defined as Then, the concentration gradient between the electrolyte and solid components during the battery operation procedure is calculated using the following equation: where R bt, con and C bt, con branches are associated the over-potential caused by concentration gradient.Finally, the activation energy generated by the complex chemical reactions occurring inside batteries is then handled by R bt, act and C bt, act branches and is described by the following: Furthermore, the self-discharge phenomenon is too small for a single battery cell so that may be ignored in some cases.However, the battery stack reaches 100 kW in the MRV applications.Note that, in this article, there are SoC constraints considering the MRV's practical operation, where the SoC range is between 0.2 and 0.9.In addition, battery stack current I bt is positive when charged and negative when discharged.

B. Battery Pack Thermal Model
The entire temperature distribution and thermal performance of the battery stack are represented by the second-order Cauer thermal network.The electrolyte's temperature is raised by the heat generated by electrochemical reactions.Then, the electrolyte and electrode switched places before dispersing into the ambient environment.First, total energy lost during the battery stack operation is defined as where Q bt,r is the dissipated energy generated due to ohmic resistance, Q bt,em represents the heat generated by activation energy during the electrochemical reaction, and Q bt,dch represents energy loss during self-discharge.Then, the abovementioned heat resources should be modeled mathematically.Three resistances are used to represent the ohmic resistance, which causes the battery to heat up as current flows through them where R bt,ohm , R bt,con , and R bt,act are equivalent resistances representing ohm, concentration gradient, and activation losses, respectively, where S bt,r is molar reaction entropy of battery chemical reactions.
The diffusion and shunt processes will also generate heat, which can be calculated by where two resistances R bt,dif and R bt,sh are used to simulate the diffusion and shunt processes, respectively.The relationship between exchange heat and total generated heat can therefore be determined by where R bt,ech , R bt,st , and C bt,st are components of the heat transfer and battery stack thermal model.The temperature difference between the battery and the environment can also be defined as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.where R bt,ech and R bt,amb are represented by the resistance of heat flow across the heat exchanger and environment.C bt,ech is capacitance of exchanger.

IV. MARINE RESEARCH VESSEL SUBSYSTEMS
The MRV is a comprehensive electrical and mechanical system that comprises power systems, electric propulsion systems, hydrogen circulation systems, and energy storage systems.The PEMFC stacks are the majority energy source for the MRV; meanwhile, the battery stacks are serving as the energy buffering.The dc-dc converters are utilized to connect the PEMFC and battery stacks to the dc bus in parallel.The dc-ac inverters are then required to drive the electric machines, which are the MRV's electric thrusters.

A. Onboard Hydrogen Fuel Circulation System
The hydrogen fuel is pressurized and liquefied and then stored at around −253 • C, while the PEMFC is fed by the cryogenic gaseous hydrogen from the onboard gaseous hydrogen circulation system.Fig. 4 illustrates the gaseous hydrogen circulation system including the hydrogen fuel tank, the evaporator, and the gas supply vaporizer.The onboard gaseous hydrogen circulation system can operate remotely with the isolation valve, the moment liquid piping is connected to the hydrogen fuel tank at the bunker station.The valves for the bunker piping are oriented to the hydrogen fuel tank once the pipes have been cleared of air and chilled, and liquid gas is then refilled.Pressure in the hydrogen fuel tank is managed by the bars in the fuel gas storage tank.
The evaporator is utilized to increase the hydrogen fuel pressure.The evaporator absorbs a small amount of liquid hydrogen fuel, which is vaporized and then piped back to the hydrogen fuel tank via the three-gate valve.The pressure inside the tank is boosted by the gaseous hydrogen from the top cushion.
The liquefied hydrogen is supposed to be evaporated to hydrogen vapor and warmed to a temperature of approximately 0 • C, in order to feed the PEMFC stack with gaseous hydrogen.The supply vaporizer can warm the hydrogen fuel with seawater.The hydrogen vapor is further pressurized by the gas supply unit and feeds the PEMFC stacks.The hydrogen fuel supply can be expressed by where ρ H 2 is the mean density of gaseous hydrogen fuel, g the acceleration due to gravity, A hs is the cross-sectional area section, and q H 2 can be calculated according to where v H 2 is the flow speed of hydrogen fuel through pipes after pressurized.Thus, the gaseous hydrogen fuel pressure (P H 2 ) can be controlled by changing the flow speed; hence, the fuel gas circulation can affect the electrical behavior by the varying hydrogen pressure in (1).

B. MRV Electric Propulsion System
The MRV's electric propulsion system is the only core that converts the hydrogen and diesel fuel into electricity and then drives the vessels.The dc-dc converters are required for PEMFC and battery stacks to maintain the stable dc bus voltage.The electric thrusters, i.e., induction motors, are supposed to be fed by the three-phase ac supply so that the two-level dc-ac inverter is necessary to transform the dc output of the energy storage systems into a nominal ac power supply.The dc-dc converter is required to regulate the PEMFC and battery stacks' output voltage.
1) DC-DC Converter: The dc bus voltage for MRV's energy storage system is 800 V in the case study, while the single PEMFC stack operating parameters are as listed in Table I.Thus, the boost converter is adopted for the marine vessel's energy storage units.The typical proportional-integral controller is employed for the boost converter to maintain a stable voltage level.In addition, since the efficiency of PEMFCs varies with operating voltage and current, it is more fuel-saving for the MRV to operate the PEMFC stack at peak efficiency, which is around 56%.In this case, the controller is modified with efficiency consideration, which is regarded as a constraint.
The power distribution voltage in the MRV is established considering the overall power generation and consumption of all the subsystems.The water pumps and air compressor to the PEMFC energy storage system and other auxiliaries are operated under the condition of 400-V voltage so that a buck converter is also required to be connected with those loads.
2) Two-Level DC-AC Inverter: Fig. 5 shows the simplified circuit diagram for a three-phase two-level inverter, which is implemented for MRV to feed ac loads with the dc voltage source.The two-level inverter has a straightforward control system since it only uses two insulated-gate bipolar transistors (IGBTs) and two free-wheeling diodes coupled in parallel with IGBTs in each phase.The voltage range is not excessively high, allowing for a tolerable amount of power stress on each IGBT and diode.The inverter modeling in this article's case study uses ideal models for IGBTs and power diodes.The control algorithm takes into account a blanking interval during which both switches are off since the upper and lower bridge arms of each phase of the inverter cannot be turned on at the same time.
3) Electric Thrusters: There are starboard, bow, port, and backup thrusters employed in the MRV.The bow thruster is considered as the main electrical load of the MRV in this article.In the forward portion of the MRV, a 150-kW bow thruster is able to provide enough maneuvering and dynamic positioning ability for science experiments.In addition, the bow thrusters are implemented to meet the heavy equipment demands when the MRV is on station [5].The majority of thrusters have dynamic controls and deliver the required power either to port or starboard as long as they are engaged.
In the case study, all these thrusters are based on induction motors.A conventional d-q-axis model is adopted for the induction motors.The electromagnetic torque for a four-pole induction motor is calculated as follows: where T e is electromagnetic torque, and L m is the magnetizing reactance.i sq , i sd , i rq , and i rd are stator and rotor current in d-q domain.In addition, the rotor speed ω r can be obtained by dω r dt = where J ET is the rotor inertia, and B ET is friction coefficient.

4) MRV Powertrain Configuration:
The topology of the PEMFC and battery hybrid powertrain is schematically shown in Fig. 1(b).The main energy storage devices are four PEMFC stacks; meanwhile, the battery pack has the role of energy buffering to play.The powertrain configuration, including MRV mechanical, PEMFC, and battery stack parameters, are listed in Table II.The MRV's mechanical modeling is extensively described in [32] and is briefly summarized in the following section.In the case study, the powertrain only operates in the all-electric mode where PEMFC and battery stacks serve as the only power sources, and the backup diesel engine is disconnected from the grid during the operation.The MRV is supposed to maintain a cruise speed during scientific research activities; however, acceleration and braking operations are also investigated in this work to validate the device-level modeling.[5], [32] Fig. 6.Real-time hardware emulation platform setup.Fig. 7.
Hierarchical system-level and device-level hardware emulation structure.

V. REAL-TIME HARDWARE EMULATION RESULTS
AND VALIDATION The real-time hardware emulation of the multidomain PEMFC stack model and the MRV electric propulsion is carried out on the VCU118 platform.The coupled system-level and device-level emulation is conducted with different time intervals.The system-level emulation results are regarded as the input information for the device-level model.

A. Field-Programmable Gate Array Platforms
The Xilinx 1 VCU118 board with an XCVU9P FPGA consists of 2.586 million system logic cells, 6840 digital Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.signal processor (DSP) slices, 345.9 MB of 80-bit component memory, and 1.18 million look-up tables (LUTs).
The Vivado 1 high-level synthesis (HLS) is adopted to construct the hardware modules.After being written, the C/C++ functions are transformed into hardware modules via the HLS tool.After importing the modules, the top-level design is made in Vivado using the hardware description language.Each and every component of the system is created as a standalone C/C++ function and then implemented as a hardware description language in HLS.
Board-level interconnects for various features, including four QSFP28 ports for high-speed networking and storage, are present on the board, along with the required power supplies, clocking, and configuration devices.Fig. 6 illustrates the real-time hardware platform setup, where the oscilloscope is required to illustrate and capture the emulation results.The board also has multiple expansion connectors, as well as a number of input and output connectors, the results can be collected and shown in the oscilloscope.

B. Hardware Resources Utilization
All system-level converter, inverter, and induction motors emulation are executed first, then the PEMFC and battery stacks models are solved according to the required voltage, current, and power consumptions on FPGA.Fig. 7 demonstrates the flowchart of system-level and device-level emulation structure.Each component is regarded as a subfunction.Table III shows the FPGA's hardware resources utilization for each subfunction.Each PEMFC stack model is solved by 120 BRAM, 871 DSP slices, and 11.45% LUTs.Battery stack requires 4032 DSP slices and 3.72% LUTs.The total latency is 117 clock cycles T clk since these PEMFC stack models are able to be solved at the same time.

C. Real-Time System-Level Hardware Emulation Validation
The hardware emulation is executed at both the system level and the device level.Fig. 8 illustrates the real-time emulation results of MRV's subsystems including three-phases Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.The time interval of the system-level emulation is 10 ms in this article.In general, the zero-emissions endurance of the MRV is above 2 h at ten knots cruise speed, which is about 18 km/h, when only electric propulsion feeds the load and the diesel generators do not operate.Fig. 8(a) shows the relationship between the MRV power consumption and cruise speed.The dashed line shows the MRV's total consumption while the solid line shows the electric propulsion only, where the normal power consumption is around 250 kW.
The MRV speed profile is shown in Fig. 8(b) and (c) shows the electric thruster speed, where the startup procedure is between 0 and 2 s.The sharp acceleration, braking, and cruse scenarios are arranged to validate the proposed hardware emulation scheme and the multidomain model.The three modes have the following features.
1) Acceleration: The rapid acceleration starts at 4.5 s from six knots to ten knots, which is the rated cruise speed.
In addition, the relatively moderate acceleration occurs between 16 and 20 s with an increasing speed of six knots.2) Slow-Down: There are three slow-down scenarios arranged in the case study, where the power consumption reaches the lowest value (85 kW) at around 13 s.3) Cruise: During 5-10 s, the MRV operates in the cruise mode, during which the power consumption is around 300 kW and its speed maintains at ten knots.Fig. 8(d)-(f) demonstrates the voltage profile during the MRV's operation, where the nominal dc bus voltage is 800 V and boost converter output voltage is supposed to maintain at 400 V.There are four PEMFC stacks connected to the dc bus in serial.Thus each boost converter of the PEMFC stack provides a 200-V dc output voltage.Initially, the overshoot Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.The zoomed-in current curve of the three-phase inverter is shown in Fig. 8(g), where the frequency is 50 Hz and the IGBT switching frequency is 20 kHz.Fig. 8(h) shows the phase A current during the entire experimental procedure.The amplitude varies with the induction motor's rotor speed when the MRV operating condition changes.The inverter current increases more significantly during rapid acceleration compared to a slow acceleration between 16 and 19 s.Fig. 8(i) shows the boost output current, which will be used as the input for the device-level emulation.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

D. Device-Level Multidomain Model Validation
Fig. 9(a)-(e) shows electrical characteristics of the proposed multidomain model for a single PEMFC cell, which are compared with the empirical model in [30] for validation.Parameters for the electrical domain of PEMFC are listed in Table IV, which are collected from [30] and [31].Fig. 9(a) and (b) demonstrates the curves of a single PEMFC cell's output voltage and power versus current density, which is regarded as the fundamental characteristic of the fuel cell.The validation is conducted at the ambient temperatures of 25 • C and 80 • C. The ambient temperature significantly affects the output voltage and power due to its impact on the cathode catalyst layer and proton exchange membrane.In addition, the equivalent resistances of activation, convection, and diffusion process increase as thermal volume increases.
The hydrogen fuel variation impact on the coupled multidomain PEMFC output voltage is shown in Fig. 9(c), where the PEMFC cell's output voltage drops when the hydrogen fuel pressure increases.The initial hydrogen fuel pressure is 2.2 bar and increases by 1.8 at 1 s, so more hydrogen fuel is supplied to the PEMFC via the onboard hydrogen fuel circulation system.When the hydrogen fuel supply exceeds the threshold value for the required voltage, the higher the hydrogen fuel pressure, the higher the voltage losses due to its convection and diffusion.Moreover, Fig. 9(d)-(f) illustrates single PEMFC cell total power, power loss due to self voltage losses, and efficiency.As shown in Fig. 9(d) and (e), both output power and power loss increases when the hydrogen fuel pressure increase from 2.2 to 4 bar because the additional hydrogen fuel increases the output voltage by increasing the hydration reaction; meanwhile, the load current is unchanged.In this case, the PEMFC efficiency decreases since the power loss increases.Furthermore, the PEMFC's efficiency drops from 58% to 53% due to the increasing hydrogen supply.
The battery model validation results are compared with the existing model in [27] as shown in Fig. 9(g)-(i), at the ambient temperature of 25 • C. Fig. 9(g) shows the battery OCV versus SoC and Fig. 9(h) shows the output voltage and capacity curve.The voltage significantly drops when SoC or capacity decreases, so the battery stack OCV also falls during the MRV operation.The errors of the proposed method and empirical model are less than 1.2%.Fig. 9(i) shows the battery temperature curve during the 2 A constant-current discharge process.The maximum temperature error is less than 0.3 K.

E. Comprehensive Device-Level Hardware Emulation Validation
The real-time device-level hardware emulation is shown in Fig. 10, which includes the dynamic multidomain behavior of onboard PEMFC stack and battery stacks.The time interval for the device-level emulation is 1 ms.Moreover, the ambient temperature is constant at 25 • C, and the cooling system is not considered for the energy storage system.Fig. 10(a) illustrates the PEMFC stack operating current curves, which are determined by the boost converter's required output current.Fig. 10(b) shows the zoomed-in operating current between 8 and 10 s.The relative average errors of operating current from the two methods are less than 5%.
As shown in Fig. 10(d) and (e), the PEMFC operating voltage can be obtained in real-time using the current operating profile.
As shown in Fig. 10(g), the proposed multidomain model has a more significant ripple in the hydrogen fuel consumption curve due to the more flexible hydrogen fuel supply.Fig. 10(h) shows the PEMFC stack efficiency regardless of the power loss on the switches of the dc converter.The PEMFC stack efficiency from the proposed multidomain model is a little bit lower than the empirical model because the required hydrogen fuel consumption is more than that from the empirical model.Moreover, the relative errors of the multidomain model are always less than 3% with the procedure of the hydrogen circulation system operation.Fig. 10(j) and (k) demonstrates real-time thermal volume in the proton exchange membrane layer and the cathode catalyst layer.Both layers' temperature increases during the procedure since there is no external cooling system considered in the case study.The maximum error occurs when the operating current ripples most at 5 s which is less than 4%.Fig. 10(c), (f), (i), and (l) illustrates the real-time battery stack operating voltage, current, SoC, and temperature curves.As shown in Fig. 10(c), the operating currents of battery stacks using the proposed model have larger operating currents with more ripple due to the PEMFC current being lower than that of the empirical model so that the battery stack compensates the required current from the MRV load.
Furthermore, the battery stack voltage curve is more stable with less ripple compared with the battery current curve.Because batteries have a significantly flatter discharge curve, the voltage at the battery terminals changes relatively slightly throughout a broad operating range.The battery model has a more significant current ripple compared with the empirical model.The battery stack voltage error is around 1%.Moreover, the PEMFC stack voltage ripple at 20 s also affects the battery stack output voltage.Fig. 10(i) shows the SoC curve where the battery stack remaining capacity keeps decreasing from the initial value of 80%.As shown in Fig. 10(l), the temperature error between the two models is less than 1.2%.

VI. CONCLUSION
This article proposed a hierarchical real-time hardware emulation scheme for MRVs with the multidomain model of PEMFC stacks.The steady-state and dynamic behavior in terms of the electrochemical, hydration, and thermal domains are represented by the coupled PEMFC model by ordinary differential equations, where the interaction between these domains is assembled in the iterative solution process.Particularly, the impact on the onboard hydrogen fuel circulation system is considered in the multidomain PEMFC model.The energy storage system of the MRV utilizes a battery stack represented by electromagnetic transient modeling techniques that use numerical integration to predict the voltage, current, and power characteristics.For the system-level emulation, the converters and inverters are also considered with the ideal IGBT model.In addition, the average model technique is adopted to represent the electric propulsion system and power converters to accomplish the system-level hardware emulation.Xilinx 1 UltraScale+ VCU118 board is utilized for  [30], [32] the hardware emulation.The FPGA platform allows solving the multidomain models in parallel, so that time intervals at the system-level and device-level are 10 and 1 ms, respectively.The PEMFC and battery models are compared with empirical models, and the hardware emulation of the full-scale hybrid MRV power system is carried out over a wide operating range.The emulation results demonstrate that the proposed model can accurately show the multidomain behavior of PEMFC stacks and their interaction with the MRV subsystems.In addition, the suggested hierarchical emulation technique is a powerful tool for developing, testing, and commissioning fully zeroemission MRVs.

Manuscript received 5
January 2023; revised 21 March 2023; accepted 26 April 2023.Date of publication 22 May 2023; date of current version 16 March 2024.This work was supported by the Natural Sciences and Engineering Research Council of Canada (NSERC).The work of Chengzhang Lyu was supported by the China Scholarship Council.(Corresponding author: Chengzhang Lyu.)

Fig. 2 (
Fig. 2(b) shows the thermal network model for PEMFC.There are two main hypothesizes made in the thermal domain[31]: 1) the hydration reaction occurs on the cathode side, and thus, the internal heat generated because of the activation losses can be negligible in the anode catalyst layer and 2) the extra heat diffused between the mechanical layer and the hydrogen fuel flow are negligible.The PEMFC's main internal resistance results from the equivalent membrane resistance.The PEMFC membrane resistance causes an irreversible energy loss when a current flows across it, which is determined using Joule's law

Fig. 4 .
Fig. 4. Schematic of hydrogen fuel circulation system in the MRV.

Fig. 5 .
Fig. 5. Electric propulsion system including a three-phase two-level inverter and the induction motor.

Fig. 8 .
Fig. 8. System-level emulation results of three-phases inverter, boost converter, and induction motor.(a) Relationship between the MRV power consumption and cruise speed.(b) MRV speed profile for the hardware scenario.(c) Rotor speed the (d) output voltage.(e) Output voltage of the boost converter connected with PEMFC stacks.(f) Output voltage of the boost converter connected with PEMFC stacks.(g) Zoomed-in inverter output current.(h) Inverter's phase A output current.(i) Output current of the boost converter connected with a PEMFC stack.

Fig. 9 .
Fig. 9. Multidomain device-level model validation.(a) PEMFC voltage and current density relationship at 25 • C and 80 • C. (b) PEMFC output power versus current density at 25 • C and 80 • C. (c) PEMFC voltage curve under variable hydrogen fuel pressure.(d) PEMFC output power under variable hydrogen fuel pressure.(e) PEMFC output power loss under variable hydrogen fuel pressure.(f) PEMFC efficiency.(g) Battery cell OCV and SoC curve.(h) Battery output voltage and capacity relationship.(i) Battery cell temperature.

Fig. 10 .
Fig. 10.Device-level multidomain hardware emulation results.(a) PEMFC stack output current.(b) Zoomed-in PEMFC stack output current.(c) Battery stack output current.(d) PEMFC stack operating voltage.(e) Zoomed-in PEMFC stack operating voltage.(f) Battery stack operating voltage.(g) Hydrogen fuel consumption.(h) PEMFC stack efficiency.(i) Battery stack SoC.(j) Proton exchange membrane temperature.(k) PEMFC cathode catalyst temperature.(l) Battery temperature. of dc voltage is over 200 V.A rapid braking operation of MRV occurs around 4 s, and then there is an acceleration lasting 0.1 s around 10 s, as shown in Fig 8(b).The single converter voltage suddenly increases to 205 V and then decreases to 196 V during MRV's rapid braking.Notably, the converter output voltage suddenly increases to 218 V at 20 s due to the PEMFC stack output voltage ripple caused by variable gaseous hydrogen fuel pressure.Then, it takes about 0.5 s for the converter controller to maintain the nominal voltage.

TABLE II MRV
POWERTRAIN PARAMETERS