Proton Exchange Membrane Electrolyzer Emulator for Power Electronics Testing Applications

: This article aims to develop a proton exchange membrane (PEM) electrolyzer emulator. This emulator is realized through an equivalent electrical scheme. It allows taking into consideration the dynamic operation of PEM electrolyzers, which is generally neglected in the literature. PEM electrolyzer dynamics are reproduced by the use of supercapacitors, due to the high value of the equivalent double ‐ layer capacitance value. Steady ‐ state and dynamics operations are investigated in this work. The design criteria are addressed. The PEM electrolyzer emulator is validated by using a 400 ‐ W commercial PEM electrolyzer. This emulator is conceived to test new DC ‐ DC converters to supply the PEM ELs and their control as well, avoiding the risk to damage a real electrolyzer for experiment purposes. The proposed approach is valid both for a single cell and for the whole stack


Introduction
Over the last decade, hydrogen production through water electrolysis has gained a growing interest to overcome the environmental issues with the use of fossil fuels (e.g., natural gas reforming), and many research projects dealing with hydrogen have been proposed [1,2].The water electrolysis process is carried out by an electrolyzer (EL).The EL is an electrochemical device using electricity to split pure water into oxygen and hydrogen.Currently, ELs can be ranged in size from small, appliance-size equipment (fit from smallscale distributed hydrogen production to large-scale), and central production facilities which could be supplied by renewable energy sources (RES) [2].In any case, the commercially available size of ELs depends on their technology.Indeed, the two main available EL technologies in the market are alkaline, and proton exchange membrane (PEM) [3,4].On one hand, the first technology is the most mature and widespread since it has been used since the mid-1960s.The main advantages are cheap catalysts, high lifetime, and gas purities [4].However, it suffers from operating at low current densities, limiting its development in emerging markets of great potential.From the flexibility point of view, alkaline ELs are not suitable in the load-following operation required by coupling them with RES [5,6].At present, several megawatt ELs are deployed in the industry for largescale hydrogen production [5].
In comparison, PEM technology has been developed since the 1960s to overcome the above-mentioned issues to alkaline technology [3,7].Indeed, this technology can operate at high current densities (around 2 A.cm −2 ) and offers high flexibility when coupling with RES; which are considered as very dynamic sources.As a result, during dynamic operations, PEM ELs can capture the energy from RES [6,8].In this work, PEM technology is considered based on its main advantages.
The main drawback of PEM ELs is mainly related to their high cost since expensive catalyst materials (e.g., iridium, and platinum) are used both at the anode and the cathode [3].It represents a restriction especially for research purposes dealing with supply systems for EL.To cope with this important issue, this work is mainly focused on the realization of a PEM EL emulator to be used for experimental objectives.An emulator of an electrical system, considered as a dipole, is an equivalent system in which voltage and current behave as in the real source such an experimental facility allows to carry out measurements and tests as with the real one.It can be employed for different purposes such as a test tool for new DC-DC converters and their control without using a real EL, which may be damaged during experiments.The proposed emulator has been designed to reproduce the dynamics of the electrolyzer under various operating conditions with a low cost equivalent circuit.
In recent years, research on hydrogen technologies has intensified to meet challenging issues and to make easier their large-scale dissemination and integration for different applications (transportation, energy storage, power-to-gas, and industry) [9][10][11][12].For fuel cell (FC) applications, intensive research has been carried out for control and fault reconstruction purposes such as the enhancement of the maximum FC net power through a sliding mode variable structure control [13], the observation of the system states based on a second-order sliding mode observer [14], the minimization of the hydrogen consumption through a state machine control applied to an FC/supercapacitor hybrid tramway [15], and the optimization of the FC net power and the decrease of oxygen starvation through a model-based robust control [16].In these works, a real-time FC emulation system has been employed to validate the developed control strategies.
Moreover, in the literature, many PEM FCs emulators have been developed over the last decade [17][18][19][20][21] for different purposes such as assessing the performance of DC-DC converters including their control and energy management strategies in DC microgrid.This demonstrates that the development of FC emulators is an important topic for the integration of these hydrogen devices in electric vehicles and distributed power generation systems.It should be underlined that the emulation of an FC remains challenging due to the parameters to be considered such as the air-feed subsystem, the hydrogen supply subsystem, the humidify subsystem, and the cooling subsystem; it has encouraged researchers to develop emulators.Compared to PEM FCs, the development of PEM EL emulators has not gained a lot of attention from researchers since this topic is not representative in the literature.Indeed, a few PEM EL emulators have been reported [22,23].In [22,23], the authors have developed a power electronics-based power-hardware-in-loop emulator.The main difference between both works is the use of the DC-DC converter (either boost converter [22] or buck converter [23]).In both reported works, only static operations of the PEM ELs are considered with the emulator; whereas dynamic operations are crucial when dealing with RES.In addition, both emulators reported are based on two stages: the power electronics stage and the control stage.Firstly, the power electronics stage includes the DC power supply and the DC-DC converter (power switch, inductor, and capacitor).Secondly, the control stage combines the measurement sensors (current and voltage at the input of the emulator), driver boards to drive the DC-DC converter, and control prototyping systems to implement the control laws to ensure the performance of the EL emulator.Both needed stages make the development of EL emulators challenging and expensive due to the use of many components and devices.In any case, to reproduce the EL dynamics, it is necessary a reference model in which the response is not instantaneous but varying according to the dynamics of the EL one wants to emulate.For this reason, even if the EL can be considered as a load from the supply, the use of programmable power load does not allow the correct reproduction of transients unless a dynamic reference model is adopted.Based on this observation, the objective of this work is to design and realize a "physical" PEM EL emulator based on an equivalent electrical circuit developed in previous work [24], minimizing consequently the number of components and devices.The main contribution consists of the use of a linear circuit reproducing the physical model of the EL.The proposed circuit is tested as a load of the EL's supply since the dissipated power can be easily managed.However, the same circuit can deliver the current reference for a given voltage to be used in a programmable load; since it is an expensive solution suitable only for high power, this approach has not been considered.Another advantage of our approach is the absence of parasitic high-frequency signals due to switching elements.Considering that the supply is given by switching converters, it has the advantage to avoid mutual interference with the production of sub-harmonics that are not present in the real system.
The effectiveness of analyzing the transfer function of a power converter loaded by a dynamic equivalent circuit of an electrolyzer has been demonstrated in [25], whereby comparing the transfer function of a stack converter with a simple resistive model and with a dynamic model with constant parameters a different behavior affecting the stability has been retrieved.Since in practical operation, the electrolyzer shows a dynamic behavior, it justifies designing the emulator proposed in this paper.
Furthermore, the developed PEM EL emulator takes into consideration dynamic operations that bring a novelty compared to the current state-of-the-art [22,23].Dynamic operations occur when coupling with RES.Since one of the key issues for PEM EL systems is the design and control of DC-DC converters, the realized emulator could be useful for this purpose.The realized PEM EL emulator is validated both for static and dynamic operations by using a 400-W commercial PEM EL.The obtained results with the developed PEM EL emulator show a good agreement with the real static-dynamic behavior of the real EL.
After this introduction providing the current state-of-the-art of PEM FC and EL emulators, Section 2 deals with the use of emulators in RES exploitation and explains the difference in the design of a PEM EL emulator.Section 3 analyzes the static and dynamic operations of PEM ELs for modeling purposes.Then, in Section 4, based on the experiments, the PEM EL emulator based on an equivalent electrical scheme is introduced and realized.Afterward, in Section 5, an error analysis between the developed emulator and experiments is carried out.Finally, in Section 6, experimental tests are carried out on the emulator prototype to validate it.

The Role of Emulators in RES Exploitation
The use of emulators has been successfully assessed for RES exploitation research activities.It is mainly due to the need for repeatable test conditions; this constraint is hardly satisfied since weather conditions are often subjected to abrupt variations.In addition, the use of an emulator is very helpful for laboratory tests since it allows a cheaper test rig to be built.As a matter of fact, in general, an emulator is less expensive and less dangerous compared to the real plant to be emulated; in particular when using EL emulators no hydrogen is produced during test.For this reason, much research related to emulators has been conducted to reduce the overall cost and improve the dynamic response during the last year as it is shown in this section.
The structure of an emulator is composed of a model of the system to be emulated, it gives referencing parameters to a power conversion system whose output is the feedback to the model.The photovoltaic (PV) emulators are active circuits able to reproduce the voltage vs. current characteristic of a PV source [26].Different approaches have been proposed to assess the model that can be based on an equivalent electrical circuit or on an interpolation model [25] or identifying the PV source by test in operating conditions [27].
The aim is to reproduce particular situations as the partial shading [28,29] to test maximum power tracking algorithms and to obtain a good dynamic reproducing the real variation of the plant [28,30].In [31], the PV characteristic is by a linear circuit considering a low power application; anyway to achieve a good efficiency of the power conversion system the switching converters are preferred [28,29,32].Similarly, the FC emulator allows the behavior of FC to be represented including all the auxiliaries of the system and avoiding the waste of hydrogen and the purchase of cells as well as any cell damage [18,33,34].In [17], the authors have proposed an emulator based on an equivalent electrical circuit model.In comparison, in [18][19][20], the developed emulators are based on DC-DC converters; whereas in [21], the emulator is based on a low-cost microcontroller.Similar features are exhibited by battery emulators where a power switching converter is controlled to reproduce the bi-directional flow of energy [35,36].
Many interesting emulators have allowed testing wind plants.The turbine can be emulated by a suitable controlled motor that is coupled to the generator [37,38] by emulating the generator behavior by a suitable controlled three-phase power converter [38,39].Differently, the load emulators exploit the characteristic of a power converter to show a variable impedance that can be used for loading PV sources or FCs as in [40] or as an electric machine to be connected to a grid under various load conditions [41] for microgrid test [42][43][44][45].
The emulation of an EL shows some differences compared to the above-mentioned emulator.The EL represents a load for a power converter which must fit the voltage of the supply to the voltage required by the EL.The use of RES to produce hydrogen has changed the requirement of the model that must be able to reproduce a correct behavior in dynamic conditions.High-power industrial alkaline EL supplied by the grid are usually operated in stationary conditions, hence they can be emulated simply by an equivalent resistance.Differently, PEM ELs are available also for low power and are suitable to be supplied by RES through a converter [46]; on the other hand, a more accurate model is required [47].Even if the EL can be considered as a load, the use of a programmable load, suitable for obtaining static operation, does not reproduce the transients unless a reference model is used.It is preferable to avoid programmable loads based on switching converters to emulate a PEM EL to avoid interference with the converter the supplies that same PEM EL.For this reason, the design of a PEM EL reveals different from the above-described emulators.It is based on an equivalent passive circuit whose components reproduce the physical behavior of the PEM meaning the anode and cathode reaction and the membrane including dynamics.In addition, it adopts a linear circuit to correct the I-V static characteristic and to retrieve the internal voltage.It enables the produced hydrogen to be obtained since it is calculated by multiplying the internal voltage for the current.The static and dynamic characterization procedures of a real PEM EL are described in the following section.

Static and Dynamic Characterization of the Electrolyzer
In this part, static and dynamic characterizations have been carried out on a commercial PEM EL for modeling purposes.The specifications of the commercial PEM EL NMH2 1000 from HELIOCENTRIS company used for the experiments are given in Table 1.Static characterization consists of collecting experimental data (current, voltage) during static conditions (set pressure and temperature) to obtain the static voltage-current curve of the studied PEM EL.By comparison, the dynamic characterization is carried out by supplying the EL with dynamic current profiles (simulating the coupling of PEM EL with RES) and then, to observe the voltage response of the studied PEM EL, highlighting its dynamics.Dynamic characterization is crucial to better understand the dynamics of the PEM EL and to lead up to its modeling by an equivalent electrical circuit.
Despite so many contributions that have been reported in the literature regarding the development of PEM EL models [24,48], dynamic operations are generally not taken into consideration in modeling the EL.Like PEM FCs, ELs are electrochemical devices requiring time to respond to dynamic operations due to the move of charge into the EL.A first analysis of the PEM EL responses according to dynamic input energy has been reported in previous work [24].By taking into consideration their dynamics, it enables enhancing the accuracy of the model.The development of accurate PEM EL models is very useful to simulate hydrogen production systems based on RES and to develop efficient controllers for power electronics.Dealing with RES for hydrogen production, the dynamics of both two systems must be considered.In fact, the speed of the variation of the energy produced by a RES is usually different from the speed of the energy that can be absorbed by the EL.This phenomenon can be reproduced only by considering the dynamics of the EL.Particularly, when the energy delivered by the RES varies abruptly, the EL requires more time to vary its operating point; in the meantime, there is a need that the intermediate DC-bus of the converter must be properly designed (or provided by an auxiliary storage system) to avoid overvoltages.A simple static model of the EL is not suitable since it receives all the energy variations instantaneously; it does not correspond to the real practice.For this reason, this article focuses the attention on this aspect.In [25], it has been shown that the dynamic behavior of the electrolyzer significantly changes the transfer function of a power converter loaded by the same electrolyzer.In this section, the responses of a commercial PEM EL are investigated based on dynamic current profiles, both rise and fall current.

Static Operation
First of all, the static voltage-curve of the studied PEM EL has been experimentally retrieved, it is shown in Figure 1.It can be noted that the PEM stack voltage increases when increasing the current supplying the EL.However, from a current value approximately equal to 7 A (i.e., 0.14 A.cm −2 ), the stack voltage remains constant.Usually, a constant voltage region does not exist for a proper electrolyzer.Despite this observation has not yet been reported in the literature, some explanations can be given from the author's point of view.The investigated PEM EL was equipped at the beginning of its use in the laboratory with a power switching converter providing an excessive current ripple.This operation modified the EL characteristic introducing the saturation of the voltage.The operation of the emulator has been limited to the linear part of the I-V curve before saturation.During tests proposed in this article, the identification of the static and dynamic curve of the experimental points has been retrieved by a pure current source.As concerns the static characterization, the current source is programmed by the virtual control panel to supply current in a suitable range; for each point, the voltage is measured obtaining the static characteristic as shown in Figure 1.For this test, only the stack of the PEM EL is used and directly connected to a DC power supply.It should be remarked that, even if the U-I static curve is not theoretically correct, it represents our case study, consequently, the emulator has been conceived to reproduce the constant voltage region as well.It will be obtained by an additional circuit whose operation does not affect the normal operation region and can be removed for emulating an electrolyzer without saturation.

Dynamic Operation and Analysis
The dynamic characterization plays a crucial role in the emulation; as a matter of fact, differently from high power Alkaline ELs, the PEM EL shows a different behavior varying the frequency.In practice, power electronics converters for PEM EL supplied by the grid are based on a single-phase diode rectifier and a DC-DC buck converter.The rectifier is mandatory to convert an AC voltage to a DC voltage, but it used alone does not meet the low DC voltage required by the PEM EL since the DC voltage generated from the rectifier is quite high.Hence, a DC-DC buck converter is needed to supply the EL.On one hand, it is important to note that the use of power electronics produces low and high-frequency current ripple.Generally, low-frequency current ripple is generated by the rectifier (equal twice the frequency of the power grid; in our case, 100 Hz); while the high-frequency current ripple is produced by the DC-DC buck converter (due to the high switching frequency; in our case, 20 kHz).By using a commercial power converter the output voltage is affected both by low and high-frequency ripple; it influences the current that suffers from the same distortion.Many works have been reported in the literature to investigate the effects of low and high-frequency current ripples on PEM FC stack [49][50][51][52], and more recently on alkaline EL [53,54].In these relevant works, it has been demonstrated that low and high-frequency current ripple may affect the lifetime and performance of FC and EL during their operation.The PEM EL can be characterized in the frequency domain by measuring the frequency response in a suitable range or in the time domain by the step response.
Since the purpose of our emulator is focused on the behavior with RES subjected to abrupt variations, the time domain characterization based on the step current response has been performed.
Several dynamic tests have been performed; particularly, the tests showing the operation with the current step from 2 to 7 A and vice-versa are shown in this article since they are very challenging for the wide span of the current to supply the EL.All tests performed with small current variations have shown lower errors as shown in the section devoted to results.Therefore, it implies that the equivalent electrical model proposed in Section 4 to realize the emulator is quite accurate.On the other hand, since the equivalent capacitances of the model depend on the current, as shown in [55], the choice of constant values capacitors with values available on the market imposes a trade-off.It implies that, for example, the bubbles' possible formation should modify the dynamic response making inappropriate the equivalent capacitor of the model.As a consequence, the maximum error is expected for abrupt transients.In particular, the steps from 2 A to 8 A and vice versa represent the worst case.Finally, the adoption of the supercapacitor is chosen only for practical purposes to avoid the connection of multiple parallels of the traditional capacitor.Obviously, it does not mean that the internal behavior can be assumed as a double-layer capacitor.
The objective of this subsection is to analyze the response of the EL when supplying it with a rise or fall current.The obtained results are reported in Figures 2 and 3. A high time scale for both tests (i.e., 5 s.div −1 ) has been chosen to emphasize the dynamics of the PEM EL and the steady-state operation as well.
As can be observed, the PEM EL responds quickly as a result of a step current (i.e., rise or fall).It is one of the most important features required for ELs when coupling with RES since their operations are characterized by very fast dynamics.As a result of a step current to supply the PEM EL, an immediate rise in PEM EL stack voltage, and after a slow final rise before reaching its steady-state value can be noticed.The immediate voltage rise is linked to the membrane operation since only the protons can go through it; whereas the slow voltage rise highlights the dynamics of the EL both at the anode and the cathode.Based on previously reported works, this slow voltage rise is assimilated to the activation overvoltage.In the first test (i.e., Figure 2), the final steady-state value (around 8 V) is reached approximately in 37 s; while for the second test (i.e., Figure 3), the final steadystate value is reached in 33 s.The slight difference between the curves obtained with the rising and falling of the current are well expected since the impedance seen by the EL is different during the step-up and the step-down of the supplied current.Moreover, during the step-up of the current, the EL current is forced by the power converter, during the step-down the EL must remove the excess charge to decrease the voltage at its terminals; this is done by varying the production of hydrogen.Of course, by our emulator with fixed parameters, it is not possible to reproduce both curves and a trade-off is required.

Discussion
As reported in the previous subsection, the two tests are characterized by different dynamics.Indeed, for the first test, the steady-state stack voltage is reached slowly; while for the second test, the dynamics are a little faster than the first test.Between the two tests, the required time to stabilize a steady-state operation is long.For the first test, the reactions inside the EL are slower than the second test since the expected steady-state value is equal to the rated stack voltage (i.e., around 8 V).If the expected steady-state value was lower than the rated stack voltage, the required time to reach the steady-state value would be shorter.These slow dynamics are particularly noticeable for a current range included between 4 and 7 A. In comparison, for the second test, the needed time to stabilize the EL to its steady-state voltage value is also long due to the slowness of the movement of the electrons inside the EL.In both cases, two dynamics can be emphasized, one faster corresponding to the cathode reaction, and the last one slower corresponding to the anode reaction based on a previous work reported in [24].According to the input energy supplying the EL, the dynamics can be mainly dominated by the anode reaction (i.e., slower) or the cathode reaction (i.e., faster) [24].
Finally, based on performed experiments, the dynamics are particularly noticeable up to a current range up to 8 A. This is linked with the obtained static voltage-curve in Figure 1 where the stack voltage remains constant above 7 A despite the rated current of the EL is equal to 50 A. Some comments have been provided in Section 3.2 to explain this important issue.
Based on this analysis of the results, the main objective of the next section is to provide the proposed PEM EL emulator and the guidelines to realize the emulator.

Equivalent Electrical Scheme
As shown in the previous section, the studied PEM EL features a slow and fast dynamic behavior, commonly known as the "charge double-layer" effect, as reported for PEM FCs [56].Basically, between the electrode and the electrolyte, there is a layer of charge, which can store electrical charge, and as a result, energy.This "charge doublelayer" behaves like a capacitor.On one hand, the accumulation of charges produces an electrical voltage, which corresponds to the activation overvoltage both at the anode and the cathode.Therefore, when the current suddenly changes, the activation overvoltages both at the anode and the cathode take some time before following the change in current.On the other hand, the ohmic overvoltage responds immediately as a result of a change in the current, as can be observed in Figures 2 and 3. Hence, an equivalent electrical scheme can be developed and enables separating the activation overvoltage at the anode and the cathode.The proposed equivalent electrical circuit is reported in Figure 4.In Figure 4, the electrical model is composed of two RC cells (Ra, Ca, and Rc, Cc) modeling the dynamics of the reactions respectively at the cathode and the anode.The voltage Erev models the power converted into hydrogen (i.e., cathode side); while the resistor Rm represents the ohmic losses.
Power losses occur into the anode, into the cathode, when charges pass through the membrane, in the end-plates, contacts, and interconnect resistors.This last set of losses is known as ohmic losses.Losses into anode and cathode are modeled by Ra and Rc respectively, and losses into the membrane by Rm.Losses into end-plates, contacts, and interconnects resistors can be minimized by a suitable layout, for this reason, they can be neglected as suggested by [57]; differently, since their contribution is mainly ohmic like the membrane, it can be included in Rm.
Finally, since the two capacitances (Ca and Cc) are considered equal, the values of the two resistors (R1 and R2) differ due to the different energy required to perform the cathode and the anode reaction, highlighting two different dynamics (e.g., slow and fast).The resistor Ra models the Gibbs energy and losses at the anode; whereas the resistor Rc models losses at the cathode [18].The hypothesis to consider equal the two capacitances is an approximation since a variation in the anode capacitance depending on the current is noticeable.Anyway, since it can be considered a second-order effect and an emulator including this variation would have made the circuit complex and expensive, the equality has been maintained.
In summary, when the emulator is supplied by a step current, the behavior (activation and ohmic effects) of the real EL can be replicated.
Based on Figure 4, the stack voltage of the EL is given by the following expression (valid for the normal operation as shown in Figure 1): The dynamic activation overvoltage at the anode and cathode can be written as  , The time constants which govern the dynamics both at the anode and cathode are given by the following expressions: The ohmic overvoltage vm is expressed by the following equation: The energy efficiency (i.e., ratio between the power converted into hydrogen and the electrical power) can be expressed based on the equivalent electrical circuit [24]: Finally, the hydrogen flow rate (mol.s−1 ) is expressed as follows [58]: where F = Faraday's efficiency resulting in the ratio between the measured hydrogen flow rate and the theoretical hydrogen flow rate which could be produced according to the input energy.Based on experiments, F = 0.96.nc = number of cells of the EL.iel = EL current (A).z = number of electrons exchanged during the reaction.For H2, z = 2. F = Faraday's constant, 96,485 (C.mol −1 ).

Equivalent Electrical Scheme
First of all, before realizing the emulator prototype, the different parameters of the equivalent electrical model appearing in Figure 4 have to be assessed.In summary, there are six parameters to determine: the reversible voltage Erev, the resistors Ra, Rc, and Rm respectively of the anode, cathode, and membrane, and finally, the two capacitors Ca and Cc for the anode and cathode.Based on the work reported in [24], the reversible voltage Erev and the membrane resistor Rm can be determined from a static model identification; whereas the remaining four parameters (i.e., Ra, Rc, Ca, Cc) can be assessed by using a dynamic model identification.This identification consists of analyzing the transient operation as shown in Figures 2 and 3. A least-squares regression algorithm has been used to estimate the time constant of the transient operation, then the parameters of the activation resistors and double-layer capacitor [24].It has to be noted that the equivalent doublelayer capacitor estimated for this study is approximately equal to 37 F; while the values reported for PEM FCs are of the order of a few Farads [56].These values are too high to be reproduced in a circuit by the classic electrolytic capacitors.For this reason, supercapacitors have been adopted.In addition, based on the experiments reported in Figures 2  and 3, the dynamics of the PEM EL may change according to the operating conditions (i.e., input current supplying the EL).As a result, the estimated parameters in [24] are not optimal for any operating condition but present a good agreement with the real dynamic behavior of the EL.For this reason, these parameters have been considered to realize a PEM EL emulator prototype.The proposed approach can be extended to different PEM ELs by performing the identification of the parameters of the model as explained in [24].The values of the estimated parameters for the model are provided in Table 2.It has to be noted that the PEM EL prototype has been developed for a current range of up 20 A. For this reason, all the resistors (i.e., Ra, Rc, and Rm) have been chosen so that they can dissipate the power up to 20 A. The reversible voltage Erev is obtained by a voltage generator that has been sized and designed to meet a value close to that desired.The circuit to reproduce Erev starts operating as soon as the electrolyzer is supplied.It is based on the voltage generated by the voltage regulator (obtained by the voltage divider R1 and R2) that corresponds to Erev.In this case, the MOSFET behaves like a current sink meaning that it allows the current supplies to the electrolyzer to flow through it maintaining a constant voltage.We chose this configuration because it is more accurate compared to a simple resistance (whose voltage depends on the current) and a series connection of diodes (whose drop voltage depends on the temperature and cannot be imposed).The principle of the voltage generator is shown in Figure 5.The voltage generator is composed of a power MOSFET IRFP064 and a silicon-based diode 1N4148 from Vishay Siliconix Company.Furthermore, a resistor of 1 kΩ is connected between the source and gate of MOSFET; whereas the above-mentioned diode is connected between the drain (anode part of the diode) and gate (cathode part of the diode) of MOSFET.The choice of the power MOSFET IRFP064 and silicon-based diode 1N4148 has been motivated by the fact that the gate-source threshold voltage of the IRFP064 is equal to 4 V; while the diode 1N4148 has a forward voltage including between 0.6 and 1 V depending on the forward continuous current.As a result, the sum of both voltages enables obtaining the reversible voltage of the studied PEM EL.A resistor of 1 kΩ has been chosen so that the current flowing through the diode be small to not destruct it.In addition, this small current enables obtaining a forward voltage close to 0.6 V.
To regulate the voltage Erev, a linear voltage regulator LM317 from Texas Instruments Company has been selected.The voltage regulator configuration is shown in Figure 6.The input voltage Vin is equal to 12 V, obtained by using a single-phase transformer and bridge rectifier with a capacitive filter to suppress the ripple.Concerning the values of resistors R1 and R2, the following equation enables to calculate them: where  1.25  By using ( 9), the following values of resistors have been determined: R1 = 220 Ω and R2 = 550 Ω.Then, to realize the resistor modeling the ohmic overvoltage and losses, three resistors of 0.27 Ω connected in parallel have been used.Every resistor can dissipate 25 W.As the emulator is designed to be supplied up to 20 A, the maximum power to dissipate is equal to 35.2 W. In the same way, to model the overvoltage at the anode and cathode, and losses as well, three resistors of 1 Ω (i.e., anode) or 0.1 Ω (i.e., cathode) connected in parallel have been used.Like for the ohmic resistor, anode and cathode resistors have to dissipate power linked to the maximum current.Every anode resistor can dissipate 50 W; while the cathode resistor 10 W. In our case for 20 A, the maximum power to dissipate is 127.2W and 14 W, respectively for the anode and cathode.In addition, an additional resistor Raux has been connected in parallel for each part (i.e., anode, membrane, and cathode) to compensate for tolerances.This resistor is equal to 10 Ω.All these resistors appear in Figure 7 showing the realized PEM EL emulator.In addition, all the resistors have been put down on a heatsink to enable heat to be dissipated.
As it has been mentioned in this subsection, the obtained value of the double-layer capacitor is quite high (i.e., 37 F).For this reason, supercapacitors have been used to model the dynamics of the PEM EL, combined with anode and cathode resistors.Particularly, we chose 100 F capacitors model EECHL0E107, a 30 F capacitor model EECHW0D306, and a 3.3 F capacitor model EECHZ0E335 (all available from Panasonic).Even if the two equivalent capacitances of cathode and anode are equal in the emulator, we arranged them in different configurations so that that the maximum working voltage cannot be exceeded.Since the voltage at the terminals of the supercapacitor at the anode side is higher than the rated voltage of the capacitances (around 6.36 V), three supercapacitors of 100 F (with rated voltage of 2.7 V per supercapacitor) series-connected have been employed.A resistance of 10 kΩ parallel connected to each supercapacitor assures equal partitioning of voltages.Differently, since the maximum voltage at the terminals of the cathode side is smaller (around 0.7 V) compared to the anode side, one supercapacitor of 3.3 F (with a rated voltage of 2.5 V) has been connected in parallel with one supercapacitor of 30 F (with a rated voltage of 2.3 V).Furthermore, two fans are included in the prototype to cool the heatsink.In Table 3, the comparison between the estimated and real values of the PEM EL emulator is provided.It can be noted that the real values of the emulator are close to those estimated.However, slight differences between the values may lead to errors in the results obtained with the emulator.7b shows a side view showing supercapacitors to emulate dynamic behavior.In addition, based on Figure 1 and the analysis reported in Section 3.1, the operation at a constant stack voltage (i.e., 8 V) has been taken into consideration when realizing the PEM EL emulator prototype.To reproduce such behavior, the voltage cannot exceed 8 V.The circuit reproducing the saturation is a voltage clamp based on the power MOSFET IRFP064.The operation can be described as follows: when the voltage between Drain and Source is lower than 8 V, the zener diode acts as a reverse-biased diode, no current can flow through it, the voltage applied between the gate and the source of the MOSFET is null and the device remains in blocking zone representing an open circuit with high impedance; as a consequence, it does not influence the operation of the parallel-connected circuit representing the emulator in linear operation (which shows a low impedance).Differently, when the voltage applied to the emulator tries to overcome 8 V, the zener diode goes in zener zone and behaves as a voltage generator, a zener current of 5 mA flowing through imposes a voltage between the gate and the source of the MOSFET so that it is biased to exhibit a voltage between Drain and Source of 8 V.We chose these values to approximate at the best the "knee" shown by the static U-I curve avoiding an edge due to abrupt transitions, from linear to saturation, as well as in the real circuit.It could be underlined that this circuit does not require an external activation since it starts operating automatically when the voltage of the electrolyzer approaches 8 V.The power MOSFET IRFP064 and the Zener diode TZX3V9B have been chosen given that the gate-source threshold voltage of the IRFP064 is equal to 4 V; whereas the TZX3V9B has a max Zener voltage equal to 4 V. Thus, the sum of both voltages allows obtaining the rated stack voltage of the studied PEM EL.The power MOSFET IRFP064 and Zener diode TZX3V9B are shown in Figure 7a (see dotted box C).The circuits adopted for reproducing the reversible voltage and the stack saturation allow the emulator to be fitted for different ELs.In fact, the reversible voltage is based on a reference voltage that can be chosen according to the desired value.It could also be varied depending on the current with a suitable linear driver.The stack saturation circuit allows the voltage to remain constant when the current increases over a threshold that can be set based on the EL behavior.These design considerations make the proposed circuit more general.Finally, it has to be underlined that, being a passive circuit the power to be dissipated, can be cheaply managed up to few kW, above this limit, the use of the different solution for the emulator has to be considered.For example, the proposed circuit can be used to calculate the current reference to be amplified by a programmable load.

Errors Analysis
The components adopted to build the emulator available on the market exhibit slight differences compared to the design value; it could cause a discrepancy between theoretical and experimental values.For this reason, in this section, the error is analyzed by error theory considering the power losses as a function of the electrolyzer's parameters.
The emulator has to reproduce (a) the losses into the EL, (b) the produced hydrogen, and (c) the transient due to a fast current variation.The first two constraints are tied to steady-state behavior, the latter to the dynamics of the emulator.
In steady-state conditions the two capacitances can be neglected, the losses are given by      (10) Assuming that the current is not affected by the error, since it is imposed by the laboratory source, the error on the losses is given by This error depends only on the tolerances of the resistances and can be further lowered by parallel connection of more resistances; as a matter of fact by connecting in parallel n resistances of the same values the error is divided by n.In our case the resistances have been chosen with a tolerance R = 5%, besides, three resistances in parallel have been adopted for the anode, cathode, and internal resistance.The error on losses evaluation is given by The produced hydrogen is given by and the error depends on Erev The voltage Erev is assured by the voltage regulator LM317, which features a load regulation accuracy of 1.5% Finally, the error on the transient due to a step current depends mainly on the cathode behavior since the anode voltage remains constant at the beginning due to the high time constant.To evaluate the error during transients, the equivalent scheme shown in Figure 4 is used but the RC branch at the anode is replaced by a voltage generator (Vanode).
The voltage after a step current solicitation is given by Immediately after the current variation, meaning for t = 0 + , the error on voltage depends only on the internal resistance Hence a small error is expected; differently during the transient, the cathode contribution must be considered: The two coefficients multiplied by Rc and Cc respectively are shown in Figure 8 versus time.It can be noted that despite the coefficient due to the capacitance is influenced by the high tolerance of supercapacitor (80% in the worst case), it is lower than the error due to the cathode resistance.An increase of the error is expected after about 10 s after that the step occurs; it will be slightly increased by the non-linearity of the supercapacitor.

Description of the Experimental Test Bench
After designing and realizing the PEM EL emulator, the objective of this section is to assess the effectiveness of the emulator in replicating the static-dynamic behavior of a real PEM EL.Hence, a suitable experimental test bench has been realized in the laboratory as shown in Figure 9.The experimental test bench is composed of the following elements: (1) a laptop with a virtual control panel controlling the DC power supply, (2) a dSPACE control desk, (3) a 4-channel oscilloscope, (4) a DS1104 controller board, (5) a DC power supply, (6) a measurement board, (7) the realized PEM EL emulator, (8) the real PEM EL stack, and (9) a transformer 230 V/9 V 50 Hz.The Equations ( 7) and ( 8) have been implemented into a dSPACE DS1104 controller board by using Matlab/Simulink software.These equations allow obtaining in real-time the hydrogen flow rate and the energy efficiency of the EL through the measurement of the electrolyzer current.Furthermore, the electrical power Pel of the electrolyzer is calculated through the electrolyzer voltage and current.A schematic representation of this implementation is shown in Figure 10a,b.In particular, Figure 10a shows the test rig configuration to acquire data by the real electrolyzer; it is supplied by the current source, the dSPACE™ board is used to control the supply and to acquire data plotted by the oscilloscope and stored for the comparison with the emulator.Figure 10b shows the test rig configuration to test the emulator; the dSPACE™ board controls the same power supply and acquires voltage and current by the emulator.Other parameters are calculated by Matlab™ in which Equations ( 7) and ( 8) are implemented.Finally, the dSPACE™ board gives output signals to be visualized.All the data related to the PEM EL emulator or the real EL (i.e., current, voltage, power, hydrogen flow rate, and energy efficiency) can be monitored through the dSPACE™ control desk interface.In addition, the current and voltage of the PEM EL emulator are acquired by a measurement board (6).It contains a current and voltage sensor combined with a low-pass filter.The transformer 230 V/9 V 50 Hz is connected to a single-phase diode rectifier (as mentioned in the third section) to supply the linear voltage regulator LM317 with a DC voltage of 12 V.Finally, the DC power supply is controlled through a control panel on a laptop to supply the PEM EL emulator with different current profiles.

Experimental Results
First of all, experimental tests have been performed to analyze the response of the PEM EL emulator as a result of a step current from 2 to 8 A. In addition, the obtained hydrogen flow rate and energy efficiency from the DS1104 controller board have been considered also in the experiments.The first results are shown in Figure 11. Figure 11 shows the voltage response as a result of a step current from 2 up to 8 A. A high time scale (i.e., 5 s) has been chosen to emphasize the dynamics of the EL and steady-state operation.It can be noted from Figure 11 that the PEM EL emulator can reproduce the immediate rise voltage modeling the ohmic part, and the slow and fast dynamics related to the activation part.Therefore, the steady-state voltage at the end of the test is equal to 8 V in Figure 10.The steady-state operation is reached in 16 s.It can be seen that the voltage of the PEM EL emulator is limited to the threshold voltage (i.e., 8 V) as highlighted in Section 3 with the obtained static voltage-current curve.Based on Equations ( 7) and ( 8), when increasing the current, the hydrogen flow rate increases; whereas when increasing the voltage, the energy efficiency decreases since it is inversely proportional to the voltage.For this reason, energy efficiency follows the opposite response of the voltage.
Then, the static characteristic obtained either with the developed emulator or the real EL has been compared as shown in Figure 12.It can be noted that the reproduced static characteristic of the developed emulator is similar to that of the real EL.In addition, when designing the PEM EL emulator (reported in Section 4), the operation at a constant stack voltage (i.e., 8 V) over 7 A has been taken into account.From Figure 12, it can be observed that the voltage of the PEM EL emulator is limited to 8 V for currents higher than 7 A. In summary, the designed PEM EL emulator can reproduce the static characteristic accurately and considering the operation at a constant stack voltage.The percentage error case ranges from 5% to 10% (that is the worst case).It cannot be considered a small error in an absolute sense but it is reasonable for the purpose for which the emulator has been conceived, meaning a tool to test power converters designed for supplying electrolyzers since the voltage delivered by a switching converter is affected by the ripple of few percent due to the switching.Finally, the comparison for dynamic operations between the data obtained with the emulator and the real EL are reported in Figures 13 and 14.The same current steps have been considered in the previous paragraph.For both figures, to assess the effectiveness of the emulator, the error ε between the obtained voltage with the emulator and real EL has been computed and reported.In Figure 13, for an increase in current, the emulator allows reproducing the real voltage response of the EL despite some errors that can be noticed.The voltage errors lower than 1 V (around 7.5% of the steady-state value, 8 V) are particularly noticeable during the transient state.On the other side, the initial and steady-state voltage fit perfectly the stack voltage of the real EL.In comparison, the obtained voltage response with the emulator for a decrease in the current (Figure 14) provides a good accuracy compared to the real voltage response.Indeed, the maximum error lower than 0.5 V (around 4% of the steady-state value, 8 V) is noticeable in transient conditions and steady-state operations.These additional errors may be explained since the direct (i.e., when increasing the current) and inverse dynamics (i.e., when decreasing the current) are different as reported in Figures 2 and 3. Anyway, for testing DC/DC converters to supply an EL, the direct dynamics are more important since one of the targets of the test is to avoid voltage overshoots without degrading the dynamic of the converter.These tests are among the most dangerous for a real EL.For further investigation, it would be interested to investigate the direct and inverse dynamics of different PEM ELs models to conclude about the modeling of dynamics.In any case, this emulator allows replicating with accuracy the real voltage response of the EL by minimizing the errors (the maximum percentage error is equal to 8.75%).
As expected, the maximum error occurs during transient for t = 10 s after the step current.It is coherent with the adoption of constant capacitances and with error analysis shown in Figure 8 where the maximum error occurs in the proximity of t = 10 s.
As concerns the difference exhibited from the voltage during the step-up and the step-down of the current, it should be underlined that they depend both on the different behavior of the electrolyzer and the different impedance of the power current supply.By adopting a constant parameter emulator, as in this paper, as a load for testing power converters, this behavior does not affect the stability.Indeed, the assumption of the same dynamic profiles is sufficient to study the transfer function of a power converter loaded by an emulator [25].
The percentage maximum error has been calculated for different tests performed with a step current of 1A.Furthermore, the Root-mean-square-error normalized as nRMSE (Equation ( 18)) and the CV(RMSE) (Equation ( 19)) are given since used they measure the differences between values (sample or population values) predicted by a model or an estimator and the values observed.
In ( 18) and (19), Yi is the voltage obtained by the emulator (corresponding to the predicted time series) and  is the voltage obtained by the electrolyzer.
The comparison among errors between voltage profiles obtained by the emulator and by the electrolyzer is provided in Table 4.It can be noted that compared to the worst-case meaning the step-up of the current from 2 A to 8 A the maximum percentage error is always lower than 8.75%, ranging from 2.2% to 4.3%.The variations of the percentage error in the other cases are due to the fixed equivalent capacitance implying a different trend just after about 10 s the current step is applied.Both nRMSE and CV(RMSE) show that the worst result is given by the step down from 5 A to 4 A whereas the other cases show minor deviations.With the chosen values of the components, it is the best trade-off that can be obtained.As concerns the error minimization, it should be considered that the power supply is a current-controlled current source based on a switching converter, consequently, the voltage is affected by switching noise and it is difficult to further lower the error under a few percent (as for example on a voltage of 7.66 V a ripple of 0.4 V is observed).Finally, the obtained errors are much lower compared to the adoption of a circuit without any dynamics as shown in [24].
Given that the cost of the PEM EL stack is quite high and to avoid the degradation of the EL stack, this emulator could be helpful to test new DC-DC converters and their control.Indeed, the design and control of DC-DC converters are currently key issues to spread PEM EL technology at a large scale.
It should be remarked that the proposed approach can be adopted both to emulate a single cell and the full stack PEM.In the first case, the equivalent model represents the cell's physical behavior; otherwise, it gives an equivalent circuit representation of the stack.The auxiliary circuit parallel connected to the equivalent model can be removed if the saturation of the characteristic is absent in the considered range of currents.

Conclusions
The main objective of this work was to design and realize a PEM electrolyzer emulator prototype, including the dynamic behavior, to avoid the use of a real PEM electrolyzer, which could be damaged during experiments.The PEM electrolyzer emulator is based on an equivalent electrical model allowing modeling the dynamics of the electrolyzer as a result of step current.The comparison between the voltage response obtained with the emulator and the real electrolyzer has shown a satisfactorily agreement; despite non-negligible errors on the voltage that have been noticed during the transient state, the proposed circuit, used as a load, improves the accuracy of the behavior of a power converter supplying an electrolyzer.The voltage error is higher when decreasing the current since the dynamics of the electrolyzer are very specific and complex to model.Furthermore, by using a DS1104 controller board, the hydrogen flow rate and energy efficiency of the electrolyzer can be assessed in real-time.The realized emulator is very helpful to carry out experiments.Indeed, it can be used for different purposes such as experimenting with new DC-DC converters and their control.Design and control of DC-DC converters are currently challenging issues so that the PEM electrolyzer can access a larger market.The main advantages of this PEM electrolyzer emulator are its simplicity and cheap cost (since it adopts components normally available on the market), compared to the reported PEM electrolyzer emulators mainly based on power electronics.These emulators are more complex to the practical realization due to the design and sizing of the DC-DC converter including its control.On the other hand, a trade-off is necessary to reproduce transients in different operating conditions to minimize the error between the real system and the emulator, since the emulator reproduces in the same way both step up and step down transients.From the perspective of this work, it would be interested to enhance the effectiveness of the emulator in reproducing accurately the inverse dynamics when decreasing the current.In addition, the proposed approach can be used both for emulating a single cell or the whole stack.

Figure 2 .
Figure 2. Response of the PEM electrolyzer as a result of a rise current.

Figure 3 .
Figure 3. Response of the PEM electrolyzer as a result of a fall current.

Figure 5 .
Figure 5. Principle of the voltage generator and stack voltage saturation.

Figure 7 .
Figure 7. (a) Top view of the PEM electrolyzer emulator.(b) Side view of the PEM electrolyzer emulator where supercapacitors are visible.

Figure 8 .
Figure 8. Error due to the cathode resistance (a) and due to the cathode capacitance (b).

Figure 9 .
Figure 9. Realized experimental test bench to validate the PEM electrolyzer emulator.

Figure 10 .
Figure 10.(a).Block diagram of the test rig to acquire data by the electrolyzer.(b).Block diagram of the test rig to test the emulator.

Figure 11 .
Figure 11.Voltage response as a result of a step current from 2 up to 8 A.

Figure 12 .
Figure 12.Comparison of the static characteristic between the developed emulator and real electrolyzer.

Figure 13 .
Figure 13.Comparison between the developed emulator and real electrolyzer for a step current from 2 up to 8 A.

Figure 14 .
Figure 14.Comparison between the developed emulator and real electrolyzer for a step current drop from 8 down to 2 A.

Table 1 .
Specifications of the proton exchange membrane (PEM) electrolyzer.

Table 2 .
Values of the estimated parameters for the PEM electrolyzer emulator.

Table 3 .
Comparison between the estimated and real values of the PEM electrolyzer emulator.Finally, the circuit board to generate the reversible voltage Erev is shown in Figure7a(see dotted box B) and the power MOSFET IRFP064 and silicon-based diode 1N4148 are shown in the same figure (see dotted box A). Figure

Table 4 .
Comparison among errors between voltage profiles obtained by the emulator and by the electrolyzer.