Techno-Economic Assessment of Hydrogen Usage in a Smart Grid, Employing a Staggered Optimization Algorithm

. A sustainable energy economy implies high shares of volatile renewable energy sources and requires the use of energy storage technologies. Hydrogen is a very flexible energy carrier and can be employed as a large-scale energy storage in electric grids. This paper focuses on the integration of hydrogen production, conversion and storage options in a smart grid environment. A process current source (PCS) that functions as a rectifier for an alkaline electrolysis system and is compared to a conventional rectifier structure that is not specifically designed for dynamic operation. All components of the smart grid are scaled using a staggered algorithm that combines a pattern search algorithm and a genetic algorithm. This smart optimization tool shows high flexibility, accuracy and low computing times. The required computing time has been reduced by 56% in contrast to genetic algorithms without the pattern search method. Furthermore, the energy system optimization reduced the alkaline electrolysis below 30% of the initial scale in order to yield lower costs. Therefore, the difference in rectifier performance was reduced to a minor contribution.


Introduction
The current carbon-based energy system is changing towards a smart energy network with clean energy generation and smart energy management technologies. This trend is driven by concerns regarding the sustainability, longevity and security of centralized energy supply. The transition from finite fossil fuels towards renewables generated by wind turbines and photovoltaic systems (PV) requires large-scale energy storage systems with the capability of seasonal energy balance. A possible energy carrier for the future is hydrogen, generated by water electrolysis with electricity from renewable energy sources. There are multiple electrolyzer and fuel cell technologies already under development. Todays mature systems are mainly alkaline electrolysis (AEL) and proton exchange membrane electrolyzers or fuel cell (PEMFC). However, their grid integration holds several challenges, including the dynamic operation and efficiency. Although, the use of hydrogen in energy systems has the potential to enable a complete carbon neutral energy system.

State of the Art
There are multiple studies on the combination of electrolysis systems and renewable energy sources. Here, the major research areas are the control of specific system components and the power quality. Doumbia et al. [1] investigated a detailed renewable energy system simulation over the timespan of one week. Their focus lies on the implementation of boost and buck converters for voltage control in combination with an electrolyzer and PEMFC. Similar studies focused on even shorter periods but could show the feasibility of a PEMFC as a backup system [2]. Lajnef et al. [3] investigated the effectiveness of a hybrid system consisting of electrolyzer and fuel cell with hydrogen as a storage option. Another major research field is the power or energy balancing of different systems over time. Most technoeconomic studies deal with small-scale applications for specific building types [4]. There is an optimization approach for residential home application of power systems in the north-west pacific [5]. However, the scope of this study is limited since it only used basic optimization algorithms that are not fast and accurate enough for more complex scenarios e.g., a smart grid with multiple components. Furthermore, none of these papers investigated the influence of different rectifier systems on the electrolyzer in dynamic operation. Due to the fluctuating energy input of wind and solar power, the energy conversion has to be flexible and work in conditions contrary to constant full load operation. This paper deals with a smart simulation approach that uses a combination of pattern-and genetic search algorithms, in order to optimize the scaling of all smart grid components for highest economic benefits. Additionally, two different rectifier topologies are regarded. On the one hand, a new flexible process current source and on the other hand, a conventional six-pulse bridge rectifier.

Technical Modelling
The simulation model is realized in the Matlab-Simulink environment and is based on real data sets from lab-based experiments.

Smart Grid Design
Solar and wind energy sources feed the proposed smart grid. Most energy is directly used for self-consumption, whereas the remaining surplus is fed to an AEL. The produced hydrogen can be compressed and stored, or directly be reconverted to electricity via a PEMFC. Additionally, a battery storage is employed for short-term energy storage because of its high Faraday efficiency. Figure 1 displays the simulation system overview and the connection between the different devices.

Experimental Foundation
The electrolyzer data used for the simulation model is gathered from a custom-made alkaline electrolyzer set-up and the newly developed process current source [6,7]. All mentioned components have been investigated in detail but for the smart grid modelling, the most important experiments are the varying efficiencies of different rectifier/electrolysis systems in dynamic operation. Additionally, there is the increased operational range of the PCS that results from the modified direct current profiles provided to the electrolyzer [8]. The electrolyzer operates under atmospheric pressure with an operating temperature of T = 80°C and with 30%-wt. potassium hydroxide solution as electrolyte. At nominal operation the direct current for the AEL is In = 10 A, leading to a current density j of 88.5 mA/cm2 for the electrode surface area of 113 cm2. Multiple measurements resulted in an energy efficiency of about 60% for the whole range of operation. Additionally, the use of the PCS, which provides the electrolyzer system with pulsed current profiles [7], increases the range of operation to 110.4% of the nominal load and has a high efficiency throughout the entire operational range.

Energy Sources
The smart grid system is designed to be powered by PV and wind energy because these are the main renewable energy sources in current electric grids. Furthermore, the provision of energy from wind and PV show significant fluctuations depending on site location, seasons and daytime and are therefore, more difficult to control as e.g. biomass. The employed PV data is derived from five STM 200FW modules, each with a 200 W rated power, connected in series. All modules are located in Stuttgart, Germany and the collected data is from the year 2017. Furthermore, the measuring point is located behind the inverter and thus, the inverter losses are already included. There is no wind turbine located close to the location of the PV modules. Therefore, the energy input of a digital wind turbine is calculated from wind speed measurements at a hub height of 70 m for the local wind speed profile of the year 2017.

Conversion Technologies
Power-to-gas (PtG) as seasonal storage option requires additional technical equipment in order to convert electricity to hydrogen and vice versa. As already mentioned, the production of hydrogen is modelled with different rectifiers in combination with the AEL unit. Previous studies showed the relation between the quality of rectification, the so-called Ripple Factor and the electrolysis performance [9]. A high quality direct current results in higher electrolysis efficiency and current pulses can be used to increase the operational range of the AEL [7]. This paper focuses on assessing the impact of using a PCS compared to the most basic rectifier in today's energy system, the controlled six-pulse bridge rectifier (B6C). The reconversion of the hydrogen to electricity is realized by a PEMFC. This fuel cell has the advantage of flexible operation over the full load range and can be express by the voltage as a function of the current density j as Here, U 0 is the reversible cell voltage, b is the Tafel parameter for oxygen reduction, m as well as n are parameters for mass transport limitations, R Ω is the ohmic resistance of the proton exchange membrane, charge transfer and electric resistance. Table 1 lists the operation parameters and the respective polarization curve values for the PEMFC in the simulation model [10].

Energy Storages
Two different kind of storage options are required for the proposed system: A large-scale option for the seasonal storage of hydrogen and a smaller option in form of a battery to support the hydrogen system and minimize the storage capacity of the hydrogen tank and thus, the system cost. The hydrogen is stored as pressurized gas at 200 bar including the energy required for the compression process of 0.0736 Whel/WhH 2 . The stationary battery is assumed to be a Li-Ion battery with a round trip efficiency of 90% with no additional parameters as such an abstract implementation of batteries without consideration of C-rates or the detailed electrochemical processes is common and suitable for energy system simulations [11,12].

Simulation Procedure
The simulation operates as a decision matrix, the model decides how to handle an electricity surplus or deficit for each time step. All simulations and optimizations are conducted on a 15-minute basis due to the energy data steps. Figure 3 displays the electricity handling flow-chart. The energy balance is achieved by subtracting the power and energy values of the load and the renewable energy sources at every time step, creating a net load profile that only contains surplus or deficit values. In an energy surplus situation, the electrolyzer is addressed first in order to ensure the optimal operation mode of the AEL and the generated hydrogen is filled to a storage tank. Remaining surplus energy is passed to the battery, depending on their state-of-charges. In an energy deficit situation, stored energy is first drawn from the battery because of its higher efficiency. Only if the battery system is low on charge, the hydrogen is re-electrified via the PEMFC. In simulations over the period of a whole year, sometimes situations occur where both storage options are not able to fully cover the energy deficit. The resulting amount of energy deficit is summarized for the entire simulation period and results in a price penalty. This energy curtailment and the respective price penalties are investigated in detail in the automatic system optimization (cf. section 3.1)

Economic Assessment
The description of economic performance of technical systems can be expressed in multiple ways. In the field of energy technology, a common performance assessment strategy is the method of levelized cost. Here, the levelized cost of a technology per annum is related to the specific energy consumption. Simplified, it can be stated that the cost per energy unit (2) is the cost of the respective technology recurring every year in regard to the quantity of energy handled by this technology. The cost per annum, also called the annuity, includes several partial costs. The major part is the redistributed initial investment of the technology, also called capital expenditure (capex). In this case, redistribution means that the investment of the technology is not made at once but is financed over a certain period. The cost per energy unit (LCOE) can be expressed as (3) where crf is the capital recovery factor describing the annuity, opex are the fixed and variable operating costs of the technology and E Tp,a is the energy/electricity throughput per year. The substitution of the energy throughput with the annually discharge electricity enables the calculation of the levelized cost of storage (LCOS). For the levelized cost of hydrogen (LCOH) the energy amount refers to the require electricity to produce the hydrogen via the entire electrolysis energy chain. Here, the units are €/kWh if the hydrogen is re-electrified or €/kg for further gas storage.

System Optimization
When designing a smart grid environment, it is necessary to scale all components with regard to each other in order to achieve high performance. On the one hand, bottlenecks can limit the efficiency of the energy chains. On the other hand, it is not economic viable to over dimension the components. A major optimization challenge is the balancing of complex algorithms with high accuracy against fast calculation with low computational demands. This section deals with the developed system optimization, consisting of two combined methods. At first, a pattern search algorithm and secondly, a genetic approach. The principle of the pattern search algorithm is based on a mesh of individual variables. By varying the values of the problem individually, the solution space is searched for a new optimum solution. Figure 3 highlights the pattern search optimization process. Step by step procedure (a to h) of the pattern search algorithm of an exemplary two-dimensional problem. With variation of the variables, a new optimum is searched. If one is found, the mesh size, indicated by the length of the crosses, is reduced to find a more detailed optimum [13].
In case the solution space includes large gradients, the advantage of this method is that a new optimum is found very fast, and the impact on solution improvement is rather high. Nevertheless, it is likely that a local minimum is calculated instead of the global minimum. This is a problem, especially for very complex tasks, where several local minima can occur. Therefore, this method is only suitable for a fast estimation of possible minima. Genetic algorithms are inspired by biology and use the principle of evolution. The basic principles of evolution are inheriting and mutations. If two individuals, which are well adapted to their environment cross genes, the child, containing both good gene patterns may be even better adapted, resulting in a higher chance of survival. In a rare share of children, mutations occur. These mutations may cause either an advantage or a disadvantage for survival. Figure4 shows possible evolutions from a generation to the next. Every generation consists of a set of individuals, which is called a population. Finding the best solution is conducted by crossovers and mutations of the parents' and children' genes. A set of genes forms the individuals of parents and children. In the context of system optimization, the genes represent the system specifications and the term of survival is equal to the minimum of the objective function. The advantages of genetic algorithms is their accuracy of finding the best possible solution. It is capable of finding the global minimum instead of local minima. However, the disadvantage is the requirement of a large diversity for every generation. For unconstrained problems with a wide solution space, this leads to very long computation times, as the initial generation is created randomly. In addition, if the gradient of the solution space is small, it also requires a significant computation time to find the appropriate minimum.

Simulation Scenarios
This paper compares two different rectifiers. On the one hand, a newly developed flexible process current source and on the other hand, a simply structured six-pulse bridge rectifier. The influence of the rectifier systems on the cost of energy consumption and hydrogen generation is investigated in detail. Additionally, the size of all smart grid components is calculated by a staggered optimization tool and the economic benefits are presented for the next 30 years, as this is the maximum component lifetime.

Results and Discussion
The simulation results for the three different scenarios will be highlighted in this section. A staggered optimization algorithm calculates the scaling of different components with the aim to increase the economic viability.

Staggered Optimization Algorithm
The optimization of the presented smart grid components has to be fast and accurate. Therefore, the fast pattern search and the highly accurate genetic algorithm are combined. Figure 5 presents the structure of the combined, staggered optimization algorithm. A set of randomly created individuals is fed to the pattern search algorithm to calculate the first solutions. Those solutions are then passed to the genetic algorithm as a part of the initial population. To maintain the diversity of solutions and not to restrain the genetic algorithm too much, the solutions of the pattern search make up 100 individuals, which equals 50% of the initial population. The genetic algorithm itself creates the other 50%. The genes of the genetic algorithm relate to a set or a vector of parameters. In the presented smart grid system, the variable vector contains the rated capacities of the system components which have to be optimized. In this case, P PV is the photovoltaics power, P W is the wind power, Cap Bat and Cap ST are the battery and hydrogen storage capacities, E EL and E FC are the energy values for the electrolysis and fuel cell system. Every capacity represents a gene of every solution and the solution vector solV matches the variable vector varV. The aim of the optimization process is to find the set of genes that minimize the levelized cost of energy consumption LCOE in the smart grid setup.
The computation time can be further increased if lower and upper boundaries are defined for all genes. After the optimization is completed, the system is investigated regarding electricity supply shares of the technologies. Furthermore, the process current source is compared to a controlled six-pulse bridge rectifier that represents the lower performance end of conventional systems. Figure 6 shows the levelized costs of electricity and hydrogen for different energy conversion chains over 30 years, as this is the maximum component lifetime. The electricity costs are grouped based on their respective energy conversion chains. In the first case, the grey bars show the expenses for direct self-consumption, the red bars equal the energy cost from the battery and the blue bars the entire conversion from electricity to hydrogen and back to electricity via fuel cell. For each bar plot, the lighter colors show the shares for the PCS and the darker color the costs with a B6C rectifier. The sum of all bars per rectifier equal the total energy costs. Prices of consumed energy are approximately 262 €/MWh in 2020 and decline over the time to 217 €/MWh in 2030, to 178 €/MWh in 2040 and finally to 158 €/MWh in 2050. The largest share are the costs for the total power-to-power conversion chain that employs the PEMFC. However, the expenses are reduced over the years. Furthermore, there is no clear indication of the superiority of the PCS over the B6C rectifier, mainly because the automated optimization algorithm scaled the electrolyzer down to an insignificant power rating. Therefore, it can be noted that with the current energy prices and system efficiencies, the battery storage with only a small seasonal hydrogen storage is the most cost effective solution for the investigated smart grid. This extreme downscaling of the electrolyzer and PEMFC leads to a significant reduction of the LCOE compared to the non-optimized smart grid variant. The energy consumption costs are 37% lower on average. However, these two systems are not comparable in every aspect anymore because the goal of hydrogen generation and seasonal storage is merely present in the automatically optimized grid. In this case, simulation boundaries could be implemented in order to prevent the cost efficient avoidance of the hydrogen systems. This would especially matter in smart grids with sector coupling. For example, the steel industry requires hydrogen for several process and thus, the hydrogen would not be re-electrified. The levelized costs of hydrogen decline over time as well.
Here, the generation costs are lower for the PCS up to the year 2040. After this point of time, the battery takes over more of the energy storing demands and reduces the operational time of the fuel cell and thus, increasing the total hydrogen costs. In comparison to the non-optimized system with fixed component sizes, the hydrogen generation costs of the optimized smart grid system is 24% lower on average. The extension of the genetic algorithm with the preceding pattern search algorithm drastically reduces the required computing time. The combined optimization approach took 56% less time to optimize the given smart grid components over the period of one year, while reaching the same results. Additionally, the setting of lower boundaries for the electrolyzer and fuel cell size accelerated the calculation by 3-5%, depending on the limitation values.

Conclusion
The combination of a fast pattern search algorithm with a complex genetic algorithm enabled the optimization of smart grid components. In this case, the required computing time has been reduced by 56% in contrast to genetic algorithms without the pattern search method. Setting minimum boundaries for all components of the hydrogen conversion chain lowered the run time by additional 3-5%, depending on the limitation values. The staggered algorithm reduced the electrolyzer and fuel cell to below 30% of their original power ratings. Therefore, the influence of two different rectifier systems was reduced to a minimum. For the optimized system results, there is no clear advantage of the more flexible process current source compared to the conventional rectifier. However, the energy costs of the optimized smart grid are 37% lower on average than the fix components simulation. Future work should use lower boundary limitations and thus, enhance the focus on hydrogen generation and usage as long-term energy storage.