An Optimized Balance of Plant for a Medium-Size PEM Electrolyzer: Design, Control and Physical Implementation

: The progressive increase in hydrogen technologies’ role in transport, mobility, electrical microgrids, and even in residential applications, as well as in other sectors is expected. However, to achieve it, it is necessary to focus e ﬀ orts on improving features of hydrogen-based systems, such as e ﬃ ciency, start-up time, lifespan, and operating power range, among others. A key sector in the development of hydrogen technology is its production, renewable if possible, with the objective to obtain increasingly e ﬃ cient, lightweight, and durable electrolyzers. For this, scientiﬁc works are currently being produced on stacks technology improvement (mainly based on two technologies: polymer electrolyte membrane (PEM) and alkaline) and on the balance of plant (BoP) or the industrial plant (its size depends on the power of the electrolyzer) that runs the stack for its best performance. PEM technology o ﬀ ers distinct advantages, apart from the high cost of its components, its durability that is not yet guaranteed and the availability in the MW range. Therefore, there is an open ﬁeld of research for achievements in this technology. The two elements to improve are the stacks and BoP, also bearing in mind that improving BoP will positively a ﬀ ect the stack operation. This paper develops the design, implementation, and practical experimentation of a BoP for a medium-size PEM electrolyzer. It is based on the realization of the optimal design of the BoP, paying special attention to the subsystems that comprise it: the power supply subsystem, water management subsystem, hydrogen production subsystem, cooling subsystem, and control subsystem. Based on this, a control logic has been developed that guarantees e ﬃ cient and safe operation. Experimental results validate the designed control logic in various operating cases, including warning and failure cases. Additionally, the experimental results show the correct operation in the di ﬀ erent states of the plant, analyzing the evolution of the hydrogen ﬂow pressure and temperature. The capacity of the developed PEM electrolysis plant is probed regarding its production rate, wide operating power range, reduced pressurization time, and high e ﬃ ciency.


Introduction
The understanding of energy consumption is changing in a society with demands for more sustainable energy, where energy policies carried out by governments and companies are creating a growing social consciousness. In this sense, renewable energies are a fundamental pillar in the compulsory (i.e., that the Earth cannot wait for) energy transition from fossil fuels to renewable Regarding hydrogen production, various proposals can be found in the recent scientific literature on PEM electrolyzers, specifically when it comes to approaching balance of plant (BoP) design.
In 2011, Balaji et al. proposed an electrolysis plant for portable applications [4]. The result was a low production electrolyzer with 0.08 Nm 3 /h of hydrogen at 382 W of power consumption and an efficiency of 77.48%. Since the objective of this design is its mobility, it has a highly reduced BoP. The water management contains a tank that works as a filling tank as well as an oxygen separator. In the hydrogen production subsystem, there is a drying stage, made up of two silica gel desiccants that are alternated by electro valves, before reaching the storage tank. In terms of BoP, the system lacks a water filtering system, as well as a separation and venting system for the water that can condense along with the hydrogen produced.
A hydrogen-based system with higher capacity is presented in [5] by means an electrolyzer of 1 kWe (the term kWe is referring to consumed electrical power), and 0.3 Nm 3 /h, which focuses its study on the relationship between temperature and flow rate to obtain a system efficiency of 65% at 40 °C. The water subsystem in the BoP has a tank that includes the corresponding cooling system, an injection pump, and flow regulators through manual valves. In the hydrogen production subsystem of the BoP, there is an oxygen separator that returns the water to the system and works as a water inlet tank. The system also includes two gas separator tanks that act as refrigeration and drying system of the produced hydrogen.
An electrolyzer for direct coupling to photovoltaics is studied in [6]. The study focuses on finding the best relationship between the number of cells and control technique on photovoltaic panels, to achieve a hydrogen production rate of 0.48 Nm 3 /h with 11 cells, and power consumption of 2.25 kWe. In the BoP design, the water comes directly from the oxygen separator tank, which has external cooling and an injection pump to the stack. The hydrogen goes into an accumulator as the only component prior to storage, which has its own refrigeration and acts as a pressure separator. The water obtained in the drying process is not injected into the oxygen separator, but is sent to the water tank that acts as refrigeration, and has its own filtering system. Then, water must be taken from Regarding hydrogen production, various proposals can be found in the recent scientific literature on PEM electrolyzers, specifically when it comes to approaching balance of plant (BoP) design.
In 2011, Balaji et al. proposed an electrolysis plant for portable applications [4]. The result was a low production electrolyzer with 0.08 Nm 3 /h of hydrogen at 382 W of power consumption and an efficiency of 77.48%. Since the objective of this design is its mobility, it has a highly reduced BoP. The water management contains a tank that works as a filling tank as well as an oxygen separator. In the hydrogen production subsystem, there is a drying stage, made up of two silica gel desiccants that are alternated by electro valves, before reaching the storage tank. In terms of BoP, the system lacks a water filtering system, as well as a separation and venting system for the water that can condense along with the hydrogen produced.
A hydrogen-based system with higher capacity is presented in [5] by means an electrolyzer of 1 kWe (the term kWe is referring to consumed electrical power), and 0.3 Nm 3 /h, which focuses its study on the relationship between temperature and flow rate to obtain a system efficiency of 65% at 40 • C. The water subsystem in the BoP has a tank that includes the corresponding cooling system, an injection pump, and flow regulators through manual valves. In the hydrogen production subsystem of the BoP, there is an oxygen separator that returns the water to the system and works as a water inlet tank. The system also includes two gas separator tanks that act as refrigeration and drying system of the produced hydrogen.
An electrolyzer for direct coupling to photovoltaics is studied in [6]. The study focuses on finding the best relationship between the number of cells and control technique on photovoltaic panels, to achieve a hydrogen production rate of 0.48 Nm 3 /h with 11 cells, and power consumption of 2.25 kWe. In the BoP design, the water comes directly from the oxygen separator tank, which has external cooling and an injection pump to the stack. The hydrogen goes into an accumulator as the only component prior to storage, which has its own refrigeration and acts as a pressure separator. The water obtained in the drying process is not injected into the oxygen separator, but is sent to the water tank that acts as refrigeration, and has its own filtering system. Then, water must be taken from this refrigeration tank before starting-up the equipment, and there is no way for direct injection. This implies that the water that reaches the stack could be contaminated, as it does not have a deionizer system for the stack inlet water.
Looking for advanced developments with a higher hydrogen production rate, Kosonen et al. provide in [7] a 1 Nm 3 /h electrolyzer that consumes 4.5 kWe, with an efficiency of around 78%. The system has a large number of cells (66 cells) and a fairly simplified BoP. The water comes directly from the local water network, and goes through a deionizer, while the hydrogen production goes through a drying unit that lowers the temperature to −70 • C, since the system stores hydrogen in a Nordic location.
The electrolyzer presented in [8] is made from two stacks with 48 cells each, producing 5 Nm 3 /h, at 27 kWe. The efficiency is estimated theoretically at 99%. Although these two stacks-based designs claim high hydrogen production rates, for the electrolyzer implementation there is required complex and bulky BoP.
An electrolysis plant that offers a hydrogen production rate of tens Nm 3 is presented in [9]. In this case, the stack technology is based on cells similar to PEM electrolyzer proposed in this paper. With an active area of 290 cm 2 , stack made up of 60 cells, it provides 10 Nm 3 /h at 46 kWe. The BoP contains an oxygen separator tank that works as a water filling tank and stack inlet water feed. The water flow is guaranteed by a pump, along with a filtering system. The hydrogen produced passes through a gas separator. A single cooling system provides the heat exchange for the water and the cooling of the hydrogen, with which the humidity is separated, and when it reaches a suitable level it is injected directly into the stack water feed. In the same operating range, Stansberry et al. developed in [10] another 10 Nm 3 /h electrolyzer, at 60 kWe and overall efficiency of 56% due to a heavy BoP implementation (drying units and chiller).
Finally, a larger PEM electrolyzer designed for hydrogen refueling stations and big energy storage systems is discussed in [11]. In this case, the electrolyzer is able to produce up to 500 Nm 3 /h, with a current density of 30 kA/m 2 . According to the analyzed data of the BoPs of the proposals found in the scientific literature, Table 1 shows a qualitatively comparison of the subsystems and their elements. Here it is verified how the developed BoP in this paper contains elements of large-scale and moderate-consumption systems. Therefore, it can be seen that the proposal BoP improves previous solutions by adding elements for better water filtering, such as low pressure separator (LPS), two phase filtering and recirculation filtering, as well as better hydrogen drying, adding LPS, a pressure swing adsorption (PSA) dryer (which does not require consumption like temperature swing adsorption (TSA) dryers), and redesigning the order of the elements by cooling before the high pressure separator (HPS). In addition to this novel proposal, a differentiating feature of this paper is that all the elements are described in detail in next sections, both in technical characteristics and in their exact connection, something that does not occur as precisely in the previous proposals [4][5][6][7][8][9][10].
In order to clearly point out the novelty of this article, Table 2 compares the developed electrolyzers in the analyzed works, from their technical specifications, with the one proposed in our research and presented in this paper (hydrogen production rate of 2.22 Nm 3 /h, at 10 kWe and stack efficiency between 77% and 91%). Table 2 shows that the authors' proposal provides a mid-range production, with a fairly low electrical consumption. This is because the design is based on supplying the stack a high electrical current, up to 900 A; optimizing the relationship between hydrogen production and electricity supply. To achieve this design, cells from larger-scale electrolyzers are used, similar to Reference [6], consisting of a stack of 60 cells of 290 cm 2 . The design proposed by authors only requires 6 cells of 300 cm 2 to provide a 50% higher current density, despite having a similar cell active area. The current density of 3 A/cm 2 also differentiates the proposed design, since typical current density reviewed in the literature ranges from 1 A/cm 2 to 2 A/cm 2 . This depends on the maximum cell current and the active cell area, and it's limited by these factors. Regarding the hydrogen pressure, the developed electrolyzer is capable of supply hydrogen up to 40 bar without the need of a compressor. As can be seen, this capability from the developed electrolyzer optimizes the auxiliary consumption, removing any compressor power requirement, which obviously increases the total efficiency. Additionally, a significant difference between the proposed BoP regarding the literature review lies in the hydrogen cooling being placed just at the stack hydrogen outlet. Therefore, in the authors' proposal, the first gas separator stage, included in all the revised works, receives more condensed water, so the hydrogen drying is more efficient from its first phase.
Therefore, the novelty of the proposed PEM electrolyzer is characterized by its mid-range production at optimized consumption, high current density with a low number of cells, high pressure without the need of compressors, and a BoP that optimizes the hydrogen cooling and drying stages. The complete design of the proposed BoP, as well as the characteristics of the stack and the electrolyzer are detailed in the following sections. Table 1. Qualitative comparison of proposed polymer electrolyte membrane (PEM) electrolyzer with previous scientific works.

Water Subsystem
Hydrogen Subsystem

Cooling Subsystem
Control System Advantages Weaknesses

Authors Proposal
Oxygen separator tank, water tank, injection pump, recirculation pump, deionizer two phase filter, recirculation filter.
Water and hydrogen heat exchangers with dry cooler. Portable design.
Water is not filtered. No pressure separator. [5] Oxygen separator tank, water tank, refilling pump, water pump.
Water electric heater.
Compact design.
Water, oxygen and hydrogen heat exchangers.
Water is not filtered and has no direct injection. Lack of automated process control.
Nordic conditions. It depends on the local water network purity. [8] Oxygen separator tank, water recirculation filtering, recirculation pump.
Water refrigeration.
High production.
Only one drying stage for high production. [10] Oxygen separator tank, water tank, injection pump, circulation pump.
Water and hydrogen heat exchangers.
-High production. Controller integrated with renewable sources.
Auxiliaries in BoP with high power consumption involves low efficiency. This paper continues and considerably expands previously developed research [12] and contributes to hydrogen technology implantation into the energy industrial sector, with the design, experimentation and real implementation of a medium-size proton exchange membrane (PEM) electrolyzer for hydrogen production. After the design of the BoP, an exhaustive control system is developed to test the working conditions that will allow the PEM electrolyzer to produce hydrogen in a safe and efficient way. The aim of this research is to find an equilibrated solution between minimal BoP and correct performance, always into safety conditions of hydrogen generation. Additionally, although previous studies have been conducted in the simulation and experimental testing of PEM electrolyzers as power-hardware-in-loop (PHIL) simulators [13], dSPACE Hardware-in-the-Loop simulators [14], multiphysics simulators [15], dynamic simulators based on MATLAB [16] and mathematical dynamic Simulink simulators [17], this development is oriented to the use of software tools based on totally integrated automation logic. Therefore, it includes the logic control design, necessary for the safe and effective performance of the plant, with the experimental tests to evaluate operation parameters, a monitoring environment, and quality testing.
The paper is organized as follow: Section 2 explains material and methods used to develop the research, including a description of PEM electrolysis technology: main features and highlights. Next, a detailed description of the design, the developed control logic and implementation is offered in Section 3. Section 4 brings together the experimental results, discussed below in Section 5. Finally, the overall conclusions are reflected in Section 6.

PEM Electrolysis Technology
PEM technology replaces the liquid electrolyte, typical from the alkaline electrolysis, by a solid polymer electrolyte, which selectively conducts positive ions such as protons. This technology improves current density, energy efficiency, and dynamic operation [18]. The protons participate in the water-splitting reaction instead of hydroxide, creating a locally acidic environment in the cell [19]. In PEM electrolysis (Figure 2), electrodes are in contact with the solid polymer electrolyte, usually Nafion. Bipolar plates are also typically added between the solid electrolyte and the electrodes, made of platinum for the cathode and iridium for the anode, with the aim of adding resistance to corrosion [20], produced during the uncontrolled polarity of the cells and fluctuating charges. PEM electrolyzers can normally reach a current density up to 2 A/cm 2 , the polymer electrolyte membrane guarantees a low gas crossover, allowing the PEM electrolyzers to work under a lower partial load range (0-10%), and it can have a compact design. This allows the obtaining of high enough operating pressures (30-40 bar), as an effect of the electrochemical compression in PEM technology, [21], to directly fill the pressure hydrogen storage tanks [19]. produced during the uncontrolled polarity of the cells and fluctuating charges. PEM electrolyzers can normally reach a current density up to 2 A/cm 2 , the polymer electrolyte membrane guarantees a low gas crossover, allowing the PEM electrolyzers to work under a lower partial load range (0%-10%), and it can have a compact design. This allows the obtaining of high enough operating pressures (30-40 bar), as an effect of the electrochemical compression in PEM technology, [21], to directly fill the pressure hydrogen storage tanks [19]. Additionally, in terms of corrosion, although it is not critical in PEM technology, poisoning by foreign ions appears and thus it has to be highly considered. The water can be easily contaminated by the impurities it contains, as well as by the corrosion produced in the metallic components of the system, such as the water pipes or even the stack components themselves. This poisoning will result in an increase in the cell cathodic overvoltage and a reduction in operating performance [22], in addition to affecting the membrane in a reduction of its proton conductivity. These are the reasons why an exhaustive design and control of the BoP (involving water management, conductivity, and purity) is important to make PEM electrolysis technology become a competitive hydrogen production option [23].

Previous Design Considerations
The goal of this research is to develop a PEM electrolyzer capable of producing more than 2 Nm 3 /h with a maximum operating pressure of 40 bar, and that consumes a maximum power of 10 kWe. For this purpose, the cell used for the electrolyzer stack is a 300 cm 2 -cell from GINER ® (Newton, MA, USA). Additionally, in terms of corrosion, although it is not critical in PEM technology, poisoning by foreign ions appears and thus it has to be highly considered. The water can be easily contaminated by the impurities it contains, as well as by the corrosion produced in the metallic components of the system, such as the water pipes or even the stack components themselves. This poisoning will result in an increase in the cell cathodic overvoltage and a reduction in operating performance [22], in addition to affecting the membrane in a reduction of its proton conductivity. These are the reasons why an exhaustive design and control of the BoP (involving water management, conductivity, and purity) is important to make PEM electrolysis technology become a competitive hydrogen production option [23].

Previous Design Considerations
The goal of this research is to develop a PEM electrolyzer capable of producing more than 2 Nm 3 /h with a maximum operating pressure of 40 bar, and that consumes a maximum power of 10 kWe. For this purpose, the cell used for the electrolyzer stack is a 300 cm 2 -cell from GINER ® (Newton, MA, USA).
The cells provide a maximum hydrogen production of 0.37 Nm 3 /h, then the design will require N cells = 6, Equation (1):

N cells =
Stack hydrogen production rate Cell hydrogen production rate (1) where:

N cells is the stack cells number
Cell hydrogen production rate is 0.37 Nm 3 /h Stack hydrogen production rate is 2.22 Nm 3 /h From the electrolysis reaction, Equation (2), it is possible to calculate the mass balance, Equation (3), and the volume of hydrogen and oxygen produced with 1 L of water, Equation (4). As the electrolyzer design has to provide a hydrogen production of 2.22 Nm 3/h, Equation (5) shows that 1.79 L/h of water will be consumed by the proposed stack in the electrolysis process: The stack power consumption can be calculated from Equation (6), resulting in P stack = 10.47 kWe

Equipment Selection
From the previous design consideration, Table 3 summarizes the selection criteria and the main technical characteristics of the equipment selected for the implementation of the BoP for the PEM electrolyzer. All the elements have been selected after a careful market sounding, looking for tested equipment from warranty companies. The selection criteria and other considered models are also shown in Table 3. (1) Beginning of life; (2) end of life; (3) deionized; (4) high pressure separator; (5) low pressure separator; (6) atmosphere explosive (devices intended for use in explosive atmospheres); (7) pressure swing adsorption. Figure 3 shows a block diagram describing the PEM electrolysis process of the developed electrolyzer. The elements in the photos are the ones actually implemented. Deionized (DI) water is fed to the electrolyzer stack from a DI water handling unit. When power is supplied to the electrolyzer stack, hydrogen and oxygen gases are generated in it. Oxygen is passed through an O 2 -phase separator where it is separated and the water is returned to the DI handling unit. From here, using a low-pressure water pump (or a high-pressure water pump for balanced pressure applications), DI water is injected into the stack. Regarding the hydrogen line, it is passed through a hydrogen gas-phase separator. The H 2 gas-phase separator removes water that is electro-osmotically transported through the PEM stack during the electrolysis process. The hydrogen is then passed through a hydrogen dryer. Throughout all the hydrogen line, the wastewater is collected and reused. Finally, the produced H 2 usually goes to a storage tank. Regarding the produced O 2 , it can be vented through the vent unit (as in this case) or it can be used to any application.
Electronics 2020, 9, x FOR PEER REVIEW 9 of 27 the produced H2 usually goes to a storage tank. Regarding the produced O2, it can be vented through the vent unit (as in this case) or it can be used to any application. Following Figure 3, the PEM electrolysis process is completed with the two primary elements, DI water on the one hand and electricity through a DC power supply on the other.
Regarding general operation, when power is applied to the stack, the water supply through it must be guaranteed at all times; the lack of water will damage the stack. The water flow rate must be set well above the stoichiometric rate at all times as it also serves to remove excess heat from the stack. Additionally, during operation, hydrogen (cathode) pressure should be above that of the water (anode) pressure (see Figure 2). The stack must operate at a hydrogen pressure of at least a 0.068 bar above the water pressure. This is to ensure that hydrogen can be detected in the water/oxygen outlet in the event a membrane is breached (membrane failure). This will normally happen in the case of correct performance, because the pressure of the water hardly requires a value of between 1 bar and 2 bar, while the hydrogen will quickly increase its pressure to reach high pressure in a few minutes, as shown in the experimental results.
Then, according to operation description, it can be deduced that in PEM electrolysis it is very important to ensure specific water conditions as well as safe hydrogen production conditions. Therefore, the correct design of the BoP is crucial to achieve a reliable implementation and an optimal electrolyzer operation [24].
To ensure a correct performance, a sophisticated control subsystem is also required. This includes sensors, actuators, and the controller. Table 4 describes the technical characteristics of the main actuators (electrovalves) and transmitters, such as of transducers level, temperature, conductivity, flow and pressure, as well as voltage and current sensors used for the implementation of the PEM electrolysis plant. Table 5 describes the main characteristics of the electrolyzer controller. The chosen controller has been the well-known Siemens ® S7-1200 PLC (Munich, Germany) because it is an industrial tested platform, robust and very suitable for this application.  Following Figure 3, the PEM electrolysis process is completed with the two primary elements, DI water on the one hand and electricity through a DC power supply on the other.
Regarding general operation, when power is applied to the stack, the water supply through it must be guaranteed at all times; the lack of water will damage the stack. The water flow rate must be set well above the stoichiometric rate at all times as it also serves to remove excess heat from the stack. Additionally, during operation, hydrogen (cathode) pressure should be above that of the water (anode) pressure (see Figure 2). The stack must operate at a hydrogen pressure of at least a 0.068 bar above the water pressure. This is to ensure that hydrogen can be detected in the water/oxygen outlet in the event a membrane is breached (membrane failure). This will normally happen in the case of correct performance, because the pressure of the water hardly requires a value of between 1 bar and 2 bar, while the hydrogen will quickly increase its pressure to reach high pressure in a few minutes, as shown in the experimental results.
Then, according to operation description, it can be deduced that in PEM electrolysis it is very important to ensure specific water conditions as well as safe hydrogen production conditions. Therefore, the correct design of the BoP is crucial to achieve a reliable implementation and an optimal electrolyzer operation [24].
To ensure a correct performance, a sophisticated control subsystem is also required. This includes sensors, actuators, and the controller. Table 4 describes the technical characteristics of the main actuators (electrovalves) and transmitters, such as of transducers level, temperature, conductivity, flow and pressure, as well as voltage and current sensors used for the implementation of the PEM electrolysis plant. Table 5 describes the main characteristics of the electrolyzer controller. The chosen controller has been the well-known Siemens ® S7-1200 PLC (Munich, Germany) because it is an industrial tested platform, robust and very suitable for this application.
Finally, with respect to automation software, those presents in the Siemens ® TIA Portal have been used both in PLC programming and in SCADA (supervisory control and data acquisition) software implementation.

Design and Implementation of the BoP
Going into the blocks of Figure 3, the five subsystems that makes up the BoP and their key parts are the following: • Stack power supply subsystem: AC/DC rectifier, DC voltage transducer and DC current transducer. • Water management subsystem: deionized water circulation system (two phase filter and recirculation filter), inlet water tank, oxygen separator tank, injection pump, recirculation pump, piping, valves and instrumentation. • Hydrogen production subsystem: hydrogen processing: PSA dryers, high pressure separator (HPS), low pressure separator (LPS) tubing, and valves, and instrumentation.

•
Control subsystem: receives information from sensors and defines operation mode over actuators according to optimal operation and safety requirements.
Next, a solution for the design, implementation, and control of the BoP of the proposed PEM electrolyzer in the research is developed.

BoP Design
The subsystems and their elements making up the BoP are outlined in Figure 4: the stack power supply in green, water subsystem in blue, hydrogen subsystem in red, cooling subsystem in orange and control subsystem in grey.
Electronics 2020, 9, x FOR PEER REVIEW 11 of 27 Next, a solution for the design, implementation, and control of the BoP of the proposed PEM electrolyzer in the research is developed.

BoP Design
The subsystems and their elements making up the BoP are outlined in Figure 4: the stack power supply in green, water subsystem in blue, hydrogen subsystem in red, cooling subsystem in orange and control subsystem in grey.

Stack Power Supply Subsystem
The stack power supply subsystem (in green) is responsible for providing the necessary direct current for trigger the electrolysis process that produces the hydrogen. Since the electrolyzer is operated at high power, and with very high-value currents (up to 900 A), current (A) and voltage (V) sensors are needed to continuously monitor the electrical supply to the stack. In addition, a power contactor (PC1) is incorporated, to guarantee safe operation, both in production situations and in the event of an emergency stop.

Water Management Subsystem
The water management subsystem (in blue) starts acquiring water from a DI water tank, which is convenient to have low conductivity and to ensure a longer stack lifespan. Once the water has been introduced into the system, an injection pump (P-001) is used to ensure an adequate input flow into the system. After passing through the injection pump, the water is circulated through a two-phase filter to give it a low conductivity. Otherwise, the PEM stack could be critically impaired. In the first phase, it is obtained a Type II conductivity (ASTM Standards for Laboratory Reagent Water (ASTM D1193-91)) (<1 µScm −1 ) and, in the second phase, the conductivity level drops to the Type I value (<0.056 µScm −1 ).
After the filtering stage, the water is introduced into an oxygen separator tank that has a triple function: (1) to be a buffer with the aim to adjust the water flow inside the circuit, (2) to act as a sink that collects all the wastewaters, and (3) to separate the oxygen from the water. From the oxygen separator tank, the water continues its flow to the water-control and recirculation phase. The recirculation pump (P-002) regulates the water flow after the oxygen separator tank, and the sensors'

Stack Power Supply Subsystem
The stack power supply subsystem (in green) is responsible for providing the necessary direct current for trigger the electrolysis process that produces the hydrogen. Since the electrolyzer is operated at high power, and with very high-value currents (up to 900 A), current (A) and voltage (V) sensors are needed to continuously monitor the electrical supply to the stack. In addition, a power contactor (PC1) is incorporated, to guarantee safe operation, both in production situations and in the event of an emergency stop.

Water Management Subsystem
The water management subsystem (in blue) starts acquiring water from a DI water tank, which is convenient to have low conductivity and to ensure a longer stack lifespan. Once the water has been introduced into the system, an injection pump (P-001) is used to ensure an adequate input flow into the system. After passing through the injection pump, the water is circulated through a two-phase filter to give it a low conductivity. Otherwise, the PEM stack could be critically impaired. In the first phase, it is obtained a Type II conductivity (ASTM Standards for Laboratory Reagent Water (ASTM D1193-91)) (<1 µScm −1 ) and, in the second phase, the conductivity level drops to the Type I value (<0.056 µScm −1 ).
After the filtering stage, the water is introduced into an oxygen separator tank that has a triple function: (1) to be a buffer with the aim to adjust the water flow inside the circuit, (2) to act as a sink that collects all the wastewaters, and (3) to separate the oxygen from the water. From the oxygen separator tank, the water continues its flow to the water-control and recirculation phase. The recirculation pump (P-002) regulates the water flow after the oxygen separator tank, and the sensors' line is used by the controller to have information of all critical water parameters, such as temperature (T), pressure (P), flow (F) and conductivity (C) before being injected into the PEM stack.
The recirculation line is proposed as a means to correct the conductivity of the water; in case it is not within the allowed range.

Hydrogen Production Subsystem
The hydrogen production subsystem (in red) must be carefully designed to guarantee all the safety parameters, as well as the correct hydrogen drying, eliminating the humidity that it may contain, sending the extracted water to the oxygen separator tank. For this purpose, it can be seen in Figure 4 that the PEM stack output is connected to the HPS. Once a high humidity gradient is reached in the HPS, this allows the wet hydrogen to flow (dirty hydrogen) into the LPS. Here, the hydrogen that can be mixed into the atmosphere is released, and the wastewater is sent to the oxygen separator tank. By contrast, the dry hydrogen (clean hydrogen) from the high-pressure separator, continues to the drying stage. The drying stage is based on pressure swing adsorption (PSA), a cyclic process that uses beds of solid adsorbent to remove impurities from the gas. The released water is sent to the LPS, following the same process previously described. The set of separators takes advantage of the pressure difference in the water contained in the form of moisture to dry the hydrogen. Throughout the process of hydrogen production, several sensors are placed; they are used to control the pressure (P) and temperature (T) parameters of hydrogen flow in the production and drying stages, prior to final storage. The inertization process makes use of the elements of the hydrogen subsystem; in order to bring it out in Figure 4, a nitrogen inlet is included in the stack.

Cooling Subsystem
Inside the electrolyzer, the cooling subsystem (in orange) consists of two heat exchangers used in the water management subsystem and the hydrogen production subsystem. The circulation circuit is controlled by two electrovalves (TCV106 and TCV113, respectively), one for each subsystem. The water for the heat exchangers is cooled by an external air cooler, which has its own pump to guarantee water flow and pressure in the cooling line.

Control Subsystem
The control subsystem processes all the information received from sensors and, based on the user-defined parameters and the control logic defied, it automatically acts over actuators to put the system working at the proper operating state. All the above subsystems are controlled through the control subsystem.

Design of the Electrolyzer Control Logic
The control system to be implemented into the PEM electrolyzer should be able to have information and act accordingly into the rest of subsystems that made up the BoP: stack power supply subsystem, water management subsystem, hydrogen production subsystem and cooling subsystem. Additionally, it must include the whole sequence of the operating states and the management of the warnings and alarms generated during the electrolyzer operation.
To follow the development of the control logic in an easy way, all the elements that govern the electrolyzer operation are named with a number in parentheses that coincide with their numbering in Figure 4. For the stack power subsystem the control logic receives the information from two main variables in the controller as shown in Figure 5. Firstly, the operating state of the electrolyzer is considered. If it is a state where electric current is required to carry out the electrolysis process, then the power contactor (PC1) will close, allowing the physical connection between stack and the power supply, and right after that the power supply is activated. Secondly, stack voltage (V) and current (A) are measured. If their values are not within the adequate range of the stack operation (1.5 V < Cell Voltage < 2.4 V and 90 A < Stack Current < 900 A), the system is shutdown, which also stops supplying electricity to the stack. Electronics 2020, 9, x FOR PEER REVIEW 13 of 27 On the other hand, the water management subsystem control is shown in Figure 6. It includes three main parts: water tank level control, water conductivity control and the control of the rest of the water physicochemical variables. Regarding the first part, the activation of the level sensor (L) in the oxygen separator tank activates the injection pump (P-001). When the level is high enough, the pump is deactivated. In case of lowering the level too much, at a low level, the PEM electrolyzer stops. Concerning the conductivity control part, the water conductivity is regulated by acting over the electrovalve (CCV104B) to put in work the recirculation line. When the conductivity is low, the water is supplied directly to the stack without the need to subject the water to more purification treatment ((CCV104B) closed and (CCV104A) open). If, before production, the conductivity is medium (Type I < conductivity < Type II), the recirculation circuit (P-002) will be open to recirculate the water back to the purification filter ((CCV104B) open and (CCV104A) closed). If this occurs during production, a warning is activated. Finally, if the conductivity rises above Type II, the electrolyzer will be kept stopped, an alarm will be triggered, and through a process of disconnection and inertization (this will be explained later in this section), and an alarm will be triggered.
The third branch of Figure 6 concerns the rest of the water physic-chemical parameters like flow, temperature, and pressure, which are measured with the aim to guarantee that the system parameters are within its operating specifications; otherwise the system stops.
For the hydrogen subsystem control, Figure 7, it is necessary to take into account the water level both in the HPS and the LPS. When a mid-level is detected in the HPS, the electrovalve (LCV115) will be open to letting the accumulated water pass towards the LPS. When the level drops, the valve will be closed again. In the case of a high level being detected, the electrolyzer stops. Water level control in the LPS works in a similar way, allowing the water to pass to the oxygen separator tank (by means of (LCV116) when there is enough water accumulated, as long as the electrovalve (LCV115) is closed. In an electrolysis process, it is crucial to avoid direct contact between the water and hydrogen lines. If the level in LPS is low, the valve (LCV115) closes since there is not enough water to transport. On the other hand, the water management subsystem control is shown in Figure 6. It includes three main parts: water tank level control, water conductivity control and the control of the rest of the water physicochemical variables. Regarding the first part, the activation of the level sensor (L) in the oxygen separator tank activates the injection pump (P-001). When the level is high enough, the pump is deactivated. In case of lowering the level too much, at a low level, the PEM electrolyzer stops. On the other hand, the water management subsystem control is shown in Figure 6. It includes three main parts: water tank level control, water conductivity control and the control of the rest of the water physicochemical variables. Regarding the first part, the activation of the level sensor (L) in the oxygen separator tank activates the injection pump (P-001). When the level is high enough, the pump is deactivated. In case of lowering the level too much, at a low level, the PEM electrolyzer stops. Concerning the conductivity control part, the water conductivity is regulated by acting over the electrovalve (CCV104B) to put in work the recirculation line. When the conductivity is low, the water is supplied directly to the stack without the need to subject the water to more purification treatment ((CCV104B) closed and (CCV104A) open). If, before production, the conductivity is medium (Type I < conductivity < Type II), the recirculation circuit (P-002) will be open to recirculate the water back to the purification filter ((CCV104B) open and (CCV104A) closed). If this occurs during production, a warning is activated. Finally, if the conductivity rises above Type II, the electrolyzer will be kept stopped, an alarm will be triggered, and through a process of disconnection and inertization (this will be explained later in this section), and an alarm will be triggered.
The third branch of Figure 6 concerns the rest of the water physic-chemical parameters like flow, temperature, and pressure, which are measured with the aim to guarantee that the system parameters are within its operating specifications; otherwise the system stops.
For the hydrogen subsystem control, Figure 7, it is necessary to take into account the water level both in the HPS and the LPS. When a mid-level is detected in the HPS, the electrovalve (LCV115) will be open to letting the accumulated water pass towards the LPS. When the level drops, the valve will be closed again. In the case of a high level being detected, the electrolyzer stops. Water level control in the LPS works in a similar way, allowing the water to pass to the oxygen separator tank (by means of (LCV116) when there is enough water accumulated, as long as the electrovalve (LCV115) is closed. In an electrolysis process, it is crucial to avoid direct contact between the water and hydrogen lines. If the level in LPS is low, the valve (LCV115) closes since there is not enough water to transport. Concerning the conductivity control part, the water conductivity is regulated by acting over the electrovalve (CCV104B) to put in work the recirculation line. When the conductivity is low, the water is supplied directly to the stack without the need to subject the water to more purification treatment ((CCV104B) closed and (CCV104A) open). If, before production, the conductivity is medium (Type I < conductivity < Type II), the recirculation circuit (P-002) will be open to recirculate the water back to the purification filter ((CCV104B) open and (CCV104A) closed). If this occurs during production, a warning is activated. Finally, if the conductivity rises above Type II, the electrolyzer will be kept stopped, an alarm will be triggered, and through a process of disconnection and inertization (this will be explained later in this section), and an alarm will be triggered.
The third branch of Figure 6 concerns the rest of the water physic-chemical parameters like flow, temperature, and pressure, which are measured with the aim to guarantee that the system parameters are within its operating specifications; otherwise the system stops.
For the hydrogen subsystem control, Figure 7, it is necessary to take into account the water level both in the HPS and the LPS. When a mid-level is detected in the HPS, the electrovalve (LCV115) will be open to letting the accumulated water pass towards the LPS. When the level drops, the valve will be closed again. In the case of a high level being detected, the electrolyzer stops. Water level control in the LPS works in a similar way, allowing the water to pass to the oxygen separator tank (by means of (LCV116) when there is enough water accumulated, as long as the electrovalve (LCV115) is closed. In an electrolysis process, it is crucial to avoid direct contact between the water and hydrogen lines. If the level in LPS is low, the valve (LCV115) closes since there is not enough water to transport. After the LPS and HPS stages, the PSA drying stage follows a conventional three-phase cyclic process during production. This is defined temporarily with the opening and closing of electrovalves (CV118 and CV119) that allow the hydrogen flow to the final storage, the water accumulation and further purge through the LPS. During all the process, temperature and pressure are controlled, entering the system in stop if they are outside the established range.
In a similar way, the cooling subsystem control logic is defined by the temperature of water and of hydrogen, Figure 8. When they reach a maximum value, (water temperature < 68 °C) and hydrogen temperature < 72 °C), cooling electrovalves (TCV106 for water temperature control and TCV113 for hydrogen temperature control) will close and let the cooling water flow through the plate exchange heaters. Once the control logic diagrams of the BoP subsystems have been described, the whole sequence that gathers these individual control logics into the operating states of the electrolyzer is illustrated in Figure 9. After the LPS and HPS stages, the PSA drying stage follows a conventional three-phase cyclic process during production. This is defined temporarily with the opening and closing of electrovalves (CV118 and CV119) that allow the hydrogen flow to the final storage, the water accumulation and further purge through the LPS. During all the process, temperature and pressure are controlled, entering the system in stop if they are outside the established range.
In a similar way, the cooling subsystem control logic is defined by the temperature of water and of hydrogen, Figure 8. When they reach a maximum value, (water temperature < 68 • C) and hydrogen temperature < 72 • C), cooling electrovalves (TCV106 for water temperature control and TCV113 for hydrogen temperature control) will close and let the cooling water flow through the plate exchange heaters. After the LPS and HPS stages, the PSA drying stage follows a conventional three-phase cyclic process during production. This is defined temporarily with the opening and closing of electrovalves (CV118 and CV119) that allow the hydrogen flow to the final storage, the water accumulation and further purge through the LPS. During all the process, temperature and pressure are controlled, entering the system in stop if they are outside the established range.
In a similar way, the cooling subsystem control logic is defined by the temperature of water and of hydrogen, Figure 8. When they reach a maximum value, (water temperature < 68 °C) and hydrogen temperature < 72 °C), cooling electrovalves (TCV106 for water temperature control and TCV113 for hydrogen temperature control) will close and let the cooling water flow through the plate exchange heaters. Once the control logic diagrams of the BoP subsystems have been described, the whole sequence that gathers these individual control logics into the operating states of the electrolyzer is illustrated in Figure 9. Once the control logic diagrams of the BoP subsystems have been described, the whole sequence that gathers these individual control logics into the operating states of the electrolyzer is illustrated in Figure 9.
According to the whole sequence, when the plant is turned on and the user is logged correctly, the electrolyzer starts in Initiate state. In this state, the system is kept waiting for the user to manually activate the Inertization state. It consists of injecting, for a 2 min duration, nitrogen into the pipelines, which, as an inert gas, cleans the remaining hydrogen conduits, air or any other gas. If any fault occurs during inertization, it will return to the Initiate state, otherwise it goes to Standby state. In this state, the system is ready to start the production process under the user's manual order. In case of remaining in the Standby state for more than 6 h, the system will return to the Initiate state. On the other hand, when in the Standby state, if the user activates the inertization button again, the electrolyzer comes back to it.
When the user activates the production button, the system goes to the Pre-production state. In it, the water line parameters values are verified: conductivity, flow, temperature, and pressure. If they are in range, the plant goes to the Purge state; on the contrary the corresponding alarms return the system to the Standby state. The system can also return to this state if the user presses the standby button. Electronics 2020, 9,   According to the whole sequence, when the plant is turned on and the user is logged correctly, the electrolyzer starts in Initiate state. In this state, the system is kept waiting for the user to manually activate the Inertization state. It consists of injecting, for a 2 min duration, nitrogen into the pipelines, which, as an inert gas, cleans the remaining hydrogen conduits, air or any other gas. If any fault occurs during inertization, it will return to the Initiate state, otherwise it goes to Standby state. In this state, the system is ready to start the production process under the user's manual order. In case of remaining in the Standby state for more than 6 h, the system will return to the Initiate state. On the other hand, when in the Standby state, if the user activates the inertization button again, the electrolyzer comes back to it.
When the user activates the production button, the system goes to the Pre-production state. In it, the water line parameters values are verified: conductivity, flow, temperature, and pressure. If they are in range, the plant goes to the Purge state; on the contrary the corresponding alarms return the system to the Standby state. The system can also return to this state if the user presses the standby button.
Having arrived at this point where the operation conductions are verified, the Purge state begins. In this state, the first hydrogen production is carried out, which serves to purge the pipelines of Having arrived at this point where the operation conductions are verified, the Purge state begins. In this state, the first hydrogen production is carried out, which serves to purge the pipelines of nitrogen previously used during the Inertization stage. Obviously, this hydrogen is not yet used to be stored, so that it is purged to the atmosphere. This is a temporary process that lasts 2 min, where the hydrogen line is purged to expel all the nitrogen from the equipment. If the user presses the standby button, the system returns to the Inertization state.
Once all the previous states have been successfully completed, the Production state is reached, where the hydrogen produced can be stored at the electrolyzer output. Several cases can occur from the Production state. Thus, the user can push pause button to goes to Pause state, where the plant is limited to a minimum production of hydrogen using a minimum DC current. Additionally, as a security measure, if the hydrogen production flow reaches the maximum allowable pressure, the systems finishes production and moves to the Pause state. Additionally, the user can stop the process completely by means of the standby button, with which after performing the Inertization, the Standby state will be reached. This can also happen automatically if at any time the controller detects an alarm in the plant.
In the Pause state, it is possible to recover the Production state just by pushing the production button. Additionally, after staying at the Pause state more than 30 min, the system returns to the Inertization state. Finally, in all previous cases, from Pre-production to Pause states, if the standby button is pressed or an alarm is noticed, the system returns to the Inertization state.

Implementation of the PEM Electrolysis Plant
Once the BoP of the PEM electrolyzer has been designed and the control logic is defined, the physical implementation of the electrolysis plant has been carried out. Figure 10a shows the water management subsystem, as the location of the inlet water tank, oxygen separator tank, injection and recirculation pumps, the different filtering equipment, as well as all the sensors and actuators that control the effective and safe operation of this subsystem, including electrovalves, conductivity sensors, pressure, flow, level, and temperature. Figure 10b shows the hydrogen production subsystem; there can be found the stack, together with the varied equipment of the hydrogen subsystem. In this area are the high and low-pressure separators (HPS and LPS), the PSA dryer, as well as the different connection sockets to the hydrogen storage tank and purging. Finally, the physical implementation includes the power supply and control subsystems, Figure 10c. In this part, it is located the DC power supply that provides the DC current to the stack in a controlled manner. It also houses the controller module (PLC Siemens S7-1200), where all the control logic defined previously has been programmed and simulated, as well as serving as a platform for the experimental tests shown in the next section. As can be appreciated, the plate heat exchanger for water and hydrogen, as part of the cooling subsystem are also shown in Figure 10a

Experimental Results
In this section, there will be presented the results that show the proper operation of the plant following the sequence established by the developed control logic. The plant operation is monitored by the developed SCADA software. To experimentally verify the achievement of the design objectives, the I-V characteristic and the hydrogen production vs. power consumption of the stack will be obtained through measurements. With the aim to show the whole sequence that the system follows according to the developed control logic, results obtained from a start-stop operation cycle will be presented. Figure 11Figure 11 shows the interface screen that reflects the stack power supply subsystem and stack operation. Electrical parameters like cell voltage, stack voltage and current, and power

Experimental Results
In this section, there will be presented the results that show the proper operation of the plant following the sequence established by the developed control logic. The plant operation is monitored by the developed SCADA software. To experimentally verify the achievement of the design objectives, the I-V characteristic and the hydrogen production vs. power consumption of the stack will be obtained through measurements. With the aim to show the whole sequence that the system follows according to the developed control logic, results obtained from a start-stop operation cycle will be presented. Figure 11 shows the interface screen that reflects the stack power supply subsystem and stack operation. Electrical parameters like cell voltage, stack voltage and current, and power curve can be shown in Figure 11a, while the hydrogen drying process by PSA is shown in Figure 11b. following the sequence established by the developed control logic. The plant operation is monitored by the developed SCADA software. To experimentally verify the achievement of the design objectives, the I-V characteristic and the hydrogen production vs. power consumption of the stack will be obtained through measurements. With the aim to show the whole sequence that the system follows according to the developed control logic, results obtained from a start-stop operation cycle will be presented. Figure 11Figure 11 shows the interface screen that reflects the stack power supply subsystem and stack operation. Electrical parameters like cell voltage, stack voltage and current, and power curve can be shown in Figure 11a, while the hydrogen drying process by PSA is shown in Figure 11b. Regarding the water management subsystem, Figure 12 shows its monitoring interface. Figure 12a shows that the system has started from a low level of water at the oxygen separator tank (WT-O2), therefore, the controller has activated the injection pump (P-001). In normal operation the injection Regarding the water management subsystem, Figure 12 shows its monitoring interface. Figure 12a shows that the system has started from a low level of water at the oxygen separator tank (WT-O2), therefore, the controller has activated the injection pump (P-001). In normal operation the injection pump is deactivated and the water level begins to decrease. In case the level decreases below the lowest allowable, the controller stops the electrolyzer and warns of this by an audible and visual alarm (in red in the screen), Figure 12b. The water management subsystem monitoring interface has more screens; for example, Figure 13a shows the measurements of the water physic-chemical parameters during production. Figure 13b shows that the controller has stopped the electrolyzer (Inertization state) because the water conductivity is Type II, and it activates the recirculation pump (P-002) and an audible and visual alarm (in red in the screen) warns about this failure. The water management subsystem monitoring interface has more screens; for example, Figure 13a shows the measurements of the water physic-chemical parameters during production. Figure 13b shows that the controller has stopped the electrolyzer (Inertization state) because the water conductivity is Type II, and it activates the recirculation pump (P-002) and an audible and visual alarm (in red in the screen) warns about this failure.

Supervisory Control and Data Acquisition (SCADA) Interface
The hydrogen production subsystem is monitored by the interface in Figure 14. Figure 14a shows that when the level of condensates in HPS, reaches the medium level, the controller opens the valve (LCV115) to LPS. After this, the condensates start their passage towards LPS, until reaching the high level of LPS. At this moment, it is necessary to wait for the level to drop in HPS, and with this the valve of the step to LPS, so that the opening of the LPS outlet valve (LCV116) is allowed, Figure 14b.
The water management subsystem monitoring interface has more screens; for example, Figure 13a shows the measurements of the water physic-chemical parameters during production. Figure 13b shows that the controller has stopped the electrolyzer (Inertization state) because the water conductivity is Type II, and it activates the recirculation pump (P-002) and an audible and visual alarm (in red in the screen) warns about this failure. The hydrogen production subsystem is monitored by the interface in Figure 14. Figure 14a shows that when the level of condensates in HPS, reaches the medium level, the controller opens the valve (LCV115) to LPS. After this, the condensates start their passage towards LPS, until reaching the high level of LPS. At this moment, it is necessary to wait for the level to drop in HPS, and with this the valve of the step to LPS, so that the opening of the LPS outlet valve (LCV116) is allowed, Figure  14b.  Figure 15 shows the cooling subsystem monitoring interface. In case the temperature of the water flow to the stack (Figure 15a) or the temperature of the hydrogen flow from the stack (Figure 15b) increases above the higher allowed value (68 °C for water and 72 °C for hydrogen), a warning visual alarm (in yellow) is activated and the respective heat exchanger is put into operation by valves (TCV106) and (TCV113) respectively. Once the control logic is validated through the SCADA system, the next step is about operating the developed PEM electrolyzer, monitoring its operation during the different phases of the process.  Figure 15 shows the cooling subsystem monitoring interface. In case the temperature of the water flow to the stack (Figure 15a) or the temperature of the hydrogen flow from the stack (Figure 15b) increases above the higher allowed value (68 • C for water and 72 • C for hydrogen), a warning visual alarm (in yellow) is activated and the respective heat exchanger is put into operation by valves (TCV106) and (TCV113) respectively.  Once the control logic is validated through the SCADA system, the next step is about operating the developed PEM electrolyzer, monitoring its operation during the different phases of the process. Once the control logic is validated through the SCADA system, the next step is about operating the developed PEM electrolyzer, monitoring its operation during the different phases of the process. Figure 16 shows the cell voltage and current during stack operation up to the maximum allowable current applied by the power supply. The maximum applied current is verified to be safe below 900 A. The cell electrolysis voltage is experimentally obtained with a value of 1.6 V. The relationship between the stack power consumption and hydrogen production rate is shown in Figure 17. A maximum production rate of 2.2 Nm 3 /h is verified with a maximum power consumption of 11.8 kW, still around the 10 kW design consideration.

Start-Stop Operating Cycle. Experimental Test
In this second part, the PEM electrolyzer is subjected to a start-stop operating cycle with the aim to show the complete sequence of states described in Figure 9. Figure 18 shows the response of hydrogen pressure at two different point of the hydrogen line. The first is the pressure obtained directly at the stack output, (please see the pressure transducer (PT112) at stack output in Figure 4)  Hydrogen production rate (Nm3/h)

Stack power (kW)
Power-production characteristic The relationship between the stack power consumption and hydrogen production rate is shown in Figure 17. A maximum production rate of 2.2 Nm 3 /h is verified with a maximum power consumption of 11.8 kW, still around the 10 kW design consideration. The relationship between the stack power consumption and hydrogen production rate is shown in Figure 17. A maximum production rate of 2.2 Nm 3 /h is verified with a maximum power consumption of 11.8 kW, still around the 10 kW design consideration.

Start-Stop Operating Cycle. Experimental Test
In this second part, the PEM electrolyzer is subjected to a start-stop operating cycle with the aim to show the complete sequence of states described in Figure 9. Figure 18 shows the response of hydrogen pressure at two different point of the hydrogen line. The first is the pressure obtained directly at the stack output, (please see the pressure transducer (PT112) at stack output in Figure 4)  Hydrogen production rate (Nm3/h)

Stack power (kW)
Power-production characteristic Figure 17. Experimental results. Relationship between stack power consumption and hydrogen production rate.

Start-Stop Operating Cycle. Experimental Test
In this second part, the PEM electrolyzer is subjected to a start-stop operating cycle with the aim to show the complete sequence of states described in Figure 9. Figure 18 shows the response of hydrogen pressure at two different point of the hydrogen line. The first is the pressure obtained directly at the stack output, (please see the pressure transducer (PT112) at stack output in Figure 4) and the second refers to the pressure obtained at the end of the hydrogen output line (see the pressure transducer (PT120) at the hydrogen output line in Figure 4).
Electronics 2020, 9, x FOR PEER REVIEW 21 of 27 and the second refers to the pressure obtained at the end of the hydrogen output line (see the pressure transducer (PT120) at the hydrogen output line in Figure 4). Additionally, the temperature has been measured in the inflow of water into the stack (see the temperature transducer (TT105) at stack input in Figure 4), the temperature of hydrogen flow leaving the stack (temperature transducer (TT121) at stack input in Figure 4) and the temperature of hydrogen flow after the cooling phase, prior to the HPS (see temperature transducer (TT113) in Figure 4). The results are showed in Figure 19.  Additionally, the temperature has been measured in the inflow of water into the stack (see the temperature transducer (TT105) at stack input in Figure 4), the temperature of hydrogen flow leaving the stack (temperature transducer (TT121) at stack input in Figure 4) and the temperature of hydrogen flow after the cooling phase, prior to the HPS (see temperature transducer (TT113) in Figure 4). The results are showed in Figure 19.
Electronics 2020, 9, x FOR PEER REVIEW 21 of 27 and the second refers to the pressure obtained at the end of the hydrogen output line (see the pressure transducer (PT120) at the hydrogen output line in Figure 4). Additionally, the temperature has been measured in the inflow of water into the stack (see the temperature transducer (TT105) at stack input in Figure 4), the temperature of hydrogen flow leaving the stack (temperature transducer (TT121) at stack input in Figure 4) and the temperature of hydrogen flow after the cooling phase, prior to the HPS (see temperature transducer (TT113) in Figure 4). The results are showed in Figure 19.  Finally, based on experimental results it is possible to calculate the real stack efficiency by applying Equation (7), where: η stack is the stack efficiency P H2 is the power produced in form of hydrogen (W) P elec is the electrical power consumed by electrolyzer (W) The power produced in form of hydrogen, P H2 , can be expressed as Equation (8): where: where: F is the Faraday constant (96485 A·s/mol) I stack is the stack current (A) N cells is the stack cells number (6) On the other hand, the electrical power consumed by the stack, P elec , can be expressed as Equation (11): where: And the stack voltage, V stack , is the addition of the cell voltage, Equation (12), where: N cell is the cells number that make up the stack V cell is the cell voltage (V) Therefore, taking into account expressions (8)- (12) in expression (7), the stack efficiency results in Equation (13): To obtain the numerical value of efficiency, the stack operating point at maximum production during experimental tests and hydrogen properties are: HHV H2 (hydrogen higher heating value) = 141.86·10 6 J/kg LHV H2 (hydrogen lower heating value) = 120.86·10 6 J/kg V cell = 1.6 V (experimental value) Therefore, the PEM electrolysis stack efficiency rises up to 91% in the best case (HHV H2 ) and it is not below 77% in the worst case (LHV H2 ).
To also obtain the real system efficiency, the power generated in the form of hydrogen, P H2 (theoretically given by (8)) and the electrical power consumed by the stack, P elec (theoretically given by (11)) are obtained using experimental data. Taking into account that the auxiliary power consumption is 1.25 kW, P Aux , the system efficiency can be calculated using Equation (14), as shown in Figure 20.
Electronics 2020, 9, x FOR PEER REVIEW 23 of 27 Therefore, the PEM electrolysis stack efficiency rises up to 91% in the best case ( ) and it is not below 77% in the worst case ( ). To also obtain the real system efficiency, the power generated in the form of hydrogen, (theoretically given by (8)) and the electrical power consumed by the stack, (theoretically given by (11)) are obtained using experimental data. Taking into account that the auxiliary power consumption is 1.25 kW, , the system efficiency can be calculated using Equation (14), as shown in Figure 20.  Figure 20 shows that the system efficiency rises up to 61% in the best case ( ) and it is not below 52% in the worst case ( ).

Discussion
Based on the results obtained from the SCADA interface, Figures 11-15 show the proper operation of the four subsystems that make up the BoP of the developed PEM electrolyzer. Regarding the water management subsystem, the developed control logic is guaranteed by means of the injection pump (P-001), the recirculation pump (P-002) and the water level at the oxygen separator tank is inside the allowed range (Figure 12), as well as the water flow, temperature, pressure and conductivity ( Figure 13) during the production process.
On the other hand, in relation to the hydrogen production subsystem, the controller tracks the levels in the pressure separators (HPS and LPS) (Figure 14), acting over the electrovalves (LCV115 and LCV116) that communicates with both separators and the oxygen separator. Additionally, the  Figure 20 shows that the system efficiency rises up to 61% in the best case (HHV H2 ) and it is not below 52% in the worst case (LHV H2 ).

Discussion
Based on the results obtained from the SCADA interface, Figures 11-15 show the proper operation of the four subsystems that make up the BoP of the developed PEM electrolyzer. Regarding the water management subsystem, the developed control logic is guaranteed by means of the injection pump (P-001), the recirculation pump (P-002) and the water level at the oxygen separator tank is inside the allowed range (Figure 12), as well as the water flow, temperature, pressure and conductivity ( Figure 13) during the production process.
On the other hand, in relation to the hydrogen production subsystem, the controller tracks the levels in the pressure separators (HPS and LPS) (Figure 14), acting over the electrovalves (LCV115 and LCV116) that communicates with both separators and the oxygen separator. Additionally, the monitoring interface shows the cooling subsystem operation. Then, when water or hydrogen flows achieve the highest allowable temperature values, the cooling subsystem is activated (Figure 15).
The I-V curve, Figure 16 verifies that the system works within the range of current indicated for the cells, and through it, the electrolysis voltage is obtained to perform the stack efficiency calculations. In the curve that relates to the stack power and the hydrogen production rate (Figure 17), the maximum production of the design is verified as well as a maximum consumption, which is close to the expected.
In the second part of the experimental test, Figure 18 shows the processes the system goes through during a start-stop cycle. At the first phase of the Initiate state, the pressure values are around 1 bar. When the user presses the inertization button and the Inertization state begins (Figure 18, coordinate (00:30). When the system completes a successful Inertization (Figure 18, coordinate (02:30, 1)), it passes to the Standby state.
When the production button is pressed, the equipment goes quickly through the Pre-production stage ( Figure 18, coordinate (03:10, 3), as the adequate conditions in the water subsystem are quickly reached to start the electrolysis process. This takes a few seconds, and in time 03:30, the Purge state is reached. At this state, the hydrogen pressure at the stack output starts to rise until 9 bar ( Figure 18, coordinate (08:20, 4)). At this time the system enters into Production state and the hydrogen flows to the drying stage. Due to the opening of the electrovalves (CV118 and CV119) that communicate HPS with PSA dryers, a small pressure drop peak occurs at the hydrogen flow leaving the stack. During the Production stage, both pressures are equalized ( Figure 18, time 09:40) and their values coincide during the entire production process. Once the maximum established pressure of 20 bar is reached ( Figure 18, coordinate (13:30, 4), the hydrogen is ready to be delivered and stored in an external storage tank. It can be deduced that the pressurization time is 10 min (13:30-03:30), from Purge to Production state. During the production process it is possible to observe small occasional pressure drops, which are the ones that occur due to the operation PSA drying stage. The dryers accumulate the humidity of the hydrogen in its final phase, and periodically purge it to the outside. Because it is a pressure process, without the use of thermal elements, a small portion (1.6 bar) of the pressure of the production hydrogen is used to purge the humidity, which is the reason why instantaneous pressure drops occur. To carry out the controlled shutdown of the plant, the user presses the standby button and it stops in the Inertization state ( Figure 18, coordinate (18:25, 5)), to purge hydrogen from the pipelines with the use of nitrogen. This process has two phases, firstly the pressure is purged from stack output and secondly the pressure is purged from the hydrogen output line. After Inertization is complete, the PEM electrolyzer keeps at Standby state ( Figure 18, coordinate (20:20, 1)), with hydrogen depressurized and ready to re-start the process or on the contrary, to be disconnected.
In a similar way to the hydrogen flow pressure, Figure 19 allows the tracking of the water and hydrogen flow temperature. The initial temperature in the Initiate state is 22 • C, corresponding to the ambient temperature. In the Inertization state it is observed how there is a small drop in cooled hydrogen temperature ( Figure 19, coordinate (01:50, 1)), this is due to the operation of the cooling subsystem. Since the hydrogen flow temperature at the stack output is inside the allowed range, the cooling is deactivated and the temperature value is stabilized again. During the Purge state, water and hydrogen temperature values go up smoothly until the Production state ( Figure 19, coordinate (08:20, 4)), where the temperature curve slopes start to increase. At time 10:50, the controller is warned that the hydrogen flows temperature needs to be cooled, and it activates the cooling subsystem. Then, the temperature of the hydrogen flow after the cooling phase decreases until it is stabilized to 15 • C. From this moment, the developed control logic guarantees that the cooling subsystem maintains the hydrogen temperature at 15 • C during for the entire duration of the Production state. When the user presses the standby button, the Production state finishes (Figure 19, coordinate (18:25, 4)), and the systems enters into the Inertization state. As a consequence to turning off the system, the water and hydrogen flow temperatures are established to ambient temperature and the cooling subsystem is deactivated.
Finally, Table 6 shows a summary of the main characteristics of the developed PEM electrolyzer.

Conclusions
This paper has described the design, implementation, and practical experimentation of a medium-size PEM electrolyzer for the production of pressurized hydrogen, from water and electric power (renewable if possible, as in our case). From a commercial stack, the key to achieving its best performance has been the optimal design of the BoP, paying special attention to the subsystems that comprise it: the stack power supply subsystem, water management subsystem, hydrogen production subsystem, cooling subsystem and control subsystem. Based on this, the control logic has been developed under the criteria of guaranteeing efficient and safe operation. For this purpose, each subsystem has required its own control logic according to plant technical specification. Additionally, the control logic of the four subsystems has been integrated into the operating states sequence that governs the electrolyzer performance.
The obtained experimental results validate the control logic in various operating cases, including warning and failure cases. Additionally, experimental results show correct operation in all the plant states. To check them, the evolution of the hydrogen flow pressure and temperature as well as water temperature have been analyzed. Comparing the developed electrolyzer with those found in the scientific literature, the first is characterized by its high stack efficiency (>77%) and low pressurization time (10 min) without an external compressor. This feature increases the global efficiency, reducing the consumption from auxiliaries. On the other hand, the current density of 3 A/cm 2 also differentiates the proposed design, since the typical current density reviewed in the literature ranges from 1 to 2 A/cm 2 ; this allows the achievement of high hydrogen production rates at low cell voltage. The last improvement of the proposed BoP regarding the literature review is the hydrogen cooling, placed at the stack hydrogen outlet. Therefore, the first gas separator stage (HPS) receives more condensed water, so the hydrogen drying is more efficient from its first phase.
In conclusion, the capacity of the developed PEM electrolysis plant regarding its production rate, wide operating power range, reduced pressurization time and high efficiency has been proved. Funding: This research was funded by "Configuration and management of micro-grid based on renewable energy and hydrogen technology (H2SMART-µGRID)" Spanish Government, grant Ref: DPI2017-85540-R,", and "G2GH2-Going to Green Hydrogen. High efficiency and low degradation system for hydrogen production" by FEDER 2014/20, grant Ref: UHU-1259316.

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