Optimal regulation of microgrid considering electro-hydrogen coupling

—Aiming at the problem of large access to renewable energy and insufficient regulation capacity of microgrid systems, this paper introduces electro-hydrogen coupling to improve the flexible regulation capacity of microgrid systems. A mathematical model for power regulation of microgrid including renewable energy equipment and electro-hydrogen coupling equipment is analyzed and established. Based on this, a flexibility margin model for the system is established. Taking the total profit and flexibility margin over the entire life cycle as optimization objectives, a daily optimal scheduling model for microgrid is established. In order to reflect the optimization and adjustment ability of electro-hydrogen coupling, this paper develops a variety of scenarios for comparison, and uses an improved particle optimization algorithm to solve the scheduling plans for different scenarios. The analysis of a numerical example shows that the regulation and optimization ability of the electro-hydrogen coupling is much higher than that of traditional energy storage.


Introduction
In September 2020, China explicitly proposed the goals of "carbon peak" in 2030 and "carbon neutral" in 2060. In recent days, the development of comprehensive energy and hydrogen energy has also received increasing attention from the public. With the rapid growth of the installed capacity of renewable energy, the environmental pollution and energy consumption problems caused by traditional thermal power generation have been improved. However, the expansion of the scale of renewable energy has also led to a decrease in the proportion of conventional power sources, reducing the adjustable resources of the power grid. Currently, energy storage and hydrogen storage are mainly used to balance the flexibility of the power grid [1][2][3].
In order to analyze the impact of wind and solar uncertainty, the currently commonly used method is to probabilistic solve the uncertainty problem, establish a probabilistic model of equipment output, thereby analyzing the uncertainty of wind and solar, and establish a scheduling optimization model. Deng Qiang et al. [4]adopted Beta probability density function and opportunity model to probabilistic uncertainty problems in power systems with wind power and direct power purchase by large users, reflecting the good effect of probabilistic methods in dealing with uncertainty problems. Zhang YC et al. [5]simultaneously consider the dynamic process of gas flow and deal with the uncertainty problem by introducing interval numbers. Yang Ming et al. [6]used constraint methods to solve the model with the goal of minimizing active power loss and voltage stability index. Huang Tao et al. [7]transformed the day-ahead optimal scheduling model into a mixed integer nonlinear programming problem with the goal of minimizing operating costs.
In the field of hydrogen production by electricity, the current research achievements are mainly focused on alkaline electrolyzers and proton exchange membrane electrolyzers. The former has small regulation margin and slow regulation startup speed, but the price is cheap; The latter has large regulation margin and fast regulation startup speed, but the cost of equivalent capacity is 3-5 times that of the former. Lei Zhaoming et al. [8]used the improved Seagull algorithm to analyze alkaline electrolyzers and proton exchange membrane electrolyzers, and to model and analyze the combined use of the two. The main practice is to use proton exchange membrane electrolyzers when there is a large amount of renewable energy access, that is, only use PEM to handle complex energy access situations.
Currently, flexibility research focuses more on issues such as new energy consumption, but there are still some fundamental theoretical issues that do not have reasonable solutions. In terms of basic characteristics, in the face of the five characteristics of power system flexibility: directionality, probability, multiple spatiotemporal scale characteristics, state dependency, and bidirectional transformation characteristics, existing research only conducts analysis and research on some of these characteristics, and relatively few involve probability and multiple spatiotemporal scale characteristics. Due to incomplete discussion of the problem, it is difficult to reflect the complex characteristics of multiple characteristics coupling in flexibility issues [9][10][11][12]. In terms of mathematical models, we not only need to understand the system flexibility margin at a certain moment, but also need to analyze the supply and demand situation of long-term system flexibility. Especially in the process of dealing with flexibility issues involving energy storage, the flexibility situation of the entire system will be changed due to the cross time scheduling ability of energy storage, which requires establishing a unified mathematical framework for probabilistic flexibility evaluation with multiple space-time scales and different scenarios. In terms of evaluation indicators, existing evaluation indicators are generally not based on uncertainty analysis. In the face of the manifestation of the probability distribution of flexibility margin, it is necessary to establish new flexibility indicators.

Monte Carlo simulation
Monte Carlo method is also known as random simulation method or statistical experiment method. Its main idea is to randomly sample a group of component states based on the probability distribution characteristics of components to simulate a group of actual samples, estimate each corresponding component state, obtain a group of component samples, and then conduct statistical analysis and inference on the component samples to obtain the overall rule characteristics. This article uses a non sequential simulation method.
Monte Carlo evaluation process: Step 1: Take the historical data of electric hydrogen coupling equipment, renewable energy units, and loads in 1h as the input data sample.
Step 2: For input data samples, the flexibility evaluation method based on Monte Carlo simulation proposed in this article is used to obtain the flexibility margin distribution from the output, and the output is calculated to obtain an output data sample consisting of the flexibility deficiency probability, flexibility margin expectation, and wind and electricity abandonment.
Step 3: Carry out memory training on the obtained data, and cycle to obtain the optimal solution, finally obtaining the flexibility index of the system.
Step 4: Adjust relevant equipment capacity and other parameters, analyze their impact on system flexibility, and summarize the flexible adjustment characteristics of the microgrid that takes into account electrical and hydrogen coupling.

Flexibility margin model for electrohydrogen coupling
In the process of electrolytic cell hydrogen production, the flexibility margin of renewable energy absorption is mainly affected by factors such as input power, adjustable range of power, etc. A flexibility margin model can be established based on the equipment model of the electrolytic cell in the previous chapter.
is flexibility margin for energy absorption in electrolytic cells, P dj i is electrolyser load, ∆P dj i is electrolytic cell climbing capacity, is climbing rate,P i is rated load of electrolytic cell As a power storage device, the flexibility margin of a battery is different from that of an electrolytic cell, and is mainly affected by the real-time power state.
During the power generation process of hydrogen power generation equipment, the flexible regulation margin is mainly affected by the amount of fuel and battery voltage.

Example Parameter Settings
In order to verify the feasibility of the micro grid scheduling method proposed in this paper, a multi energy micro grid system considering electricity and hydrogen coupling was constructed for simulation verification in a northern park as a research case. Set a time scale of 1h and a time period of 8760h for a target year. Build a 10MW distributed photovoltaic and four 5MW wind turbines in the park. The average level of online supply of renewable energy is 5MW, with a maximum load demand of 8.7MW. When there is a surplus in renewable energy supply, the excess energy is consumed by a 5MW alkaline electrolytic tank and a 5MW lead-acid battery, and the generated hydrogen is transported to a hydrogen storage tank with a capacity of 1000, When the supply of renewable energy is insufficient, it is supplied by an 8MW fuel cell and an external power grid. When there is an external demand for hydrogen, it is supplied according to the real-time storage status of the hydrogen storage tank. The waste heat from the electrolytic tank and fuel cell is recovered and supplied to the heat grid. The heat load is balanced through the heat storage tank, and the insufficient heat load is supplied by an electric boiler. The specific operation process is shown in the flowchart in Figure 1. Scenario 2: Alkaline electrolyzers and batteries jointly participate in balancing the micro grid, and fuel cells assist in power supply.

Simulation analysis
From the previous section, it can be concluded that when renewable energy is sufficient, Scenario 2 is far superior to Scenario 1 in terms of energy efficiency and regulatory flexibility. This section conducts long-term adjustment optimization based on a one-year time scale.
After optimization in Scenario 1, the battery is 6MW. After optimization in Scenario 2, the alkaline electrolytic cell is 7.5MW, the battery is 2MW, and the fuel cell is 6.5MW.The flexibility margin distribution for the two scenarios is shown in the following:

Fig.2 Flexibility margin distribution for Scenario 1 and Scenario 2
To explore the issue of flexibility on a long-term scale, it is necessary to fully consider the randomness of renewable energy and load. Therefore, in order to quantitatively analyze the flexibility of microgrids, it is necessary to probabilistic the issue of flexibility. Therefore, it is necessary to use the Monte Carlo method to process a large amount of historical data, use the method of non sequential production, predict the probability of fluctuations at various levels of wind, photovoltaic, and load in the target year, and add the three in a volume sum manner, Output the flexibility requirement margin of the microgrid in the form of probability. Similarly, the same method is used for output flexibility supply. The output probability distribution of the electro-hydrogen coupling equipment is output, and the output of each equipment is rolled up in a sum method to obtain the flexibility supply probability distribution. Finally, the flexibility demand and supply are rolled up to obtain the flexibility margin probability distribution shown in the above figure.
The flexibility indicators for the two scenarios are detailed in Table 1 below： capacity of electricity hydrogen coupling is far stronger than traditional power storage. The probability of insufficient flexibility in Scenario 1 is 47.57%, and the expected flexibility margin is -9.74 MW; The probability of insufficient flexibility in Scenario 2 is 5.98%, and the expected flexibility margin is 15.28 MW, which corresponds to a flexibility optimization capability of 15.28 -(-9.74)=25.02 MW for electro-hydrogen coupling. The optimization effect is significant.
The comparison of economic data between the two scenarios is detailed in Table 2  2 According to the data in the table above, the total lifetime profit of Scenario 2 is much larger than Scenario 1. When the input of renewable energy is large, the battery will be in a frequent state of charge and discharge. In order to improve the renewable absorption capacity, it is necessary to appropriately increase the capacity, which leads to high costs for the battery during its 15 year life cycle. The electric hydrogen coupling in Scenario 2 can both sell electricity to the power grid and use residual heat to heat the heating grid. Throughout the year, the use of hydrogen is still relatively tight, so when hydrogen is insufficient, it is still necessary to purchase electricity from the external power grid.

Conclusion
With the development of renewable energy, there will be more and more renewable energy connected to the multi energy micro grid in the future. The massive use and development of renewable energy has become a major trend in the future development of power systems. Hydrogen energy has the characteristics of zero carbon, clean, storable, and bidirectional conversion with electricity. Therefore, it has excellent performance as a controllable load for stabilizing power grids, increasing grid flexibility, and absorbing new energy. Therefore, from studying the flexible adjustment margin of electro-hydrogen coupling technology, a multi-energy microgrid model that takes into account electro-hydrogen coupling is established, aiming to improve the flexible adjustment amount of multi-energy microgrids, improve the stability of microgrids, and enhance the absorption capacity of renewable energy.
Based on the modeling of renewable energy and electric hydrogen coupling in the micro energy grid, flexibility margin analysis is conducted, and a flexibility margin model is established to set flexibility margin indicators. Finally, an optimization and adjustment model with the goal of system lifetime profit and flexibility margin is constructed, and an improved particle optimization algorithm is used to solve the model.
Through setting two scenarios with and without the participation of electric and hydrogen coupling for adjustment and optimization, it is known through analysis that the expected annual flexibility margin of the multi energy micro grid considering electric and hydrogen coupling is 15.28 MW, the wind and electricity discarding capacity is 3201 MW, and the total life cycle profit is 67.592 million, which is superior to the multi energy micro grid containing traditional electric energy storage.
In order to respond to fluctuations in the regulatory requirements of microgrids and improve flexibility, the electro-hydrogen coupling used in this article effectively improves the stability and economy of microgrids through the rational use of flexible regulatory resources, greatly improving the flexible regulatory ability of microgrids. It has reference significance in the research on the rational allocation and utilization of renewable energy sources and flexible resources in microgrids. At the same time, further research is needed on how to further deepen the utilization of hydrogen energy and improve the economic efficiency of microgrid regulation and operation, taking into account the coupling of electricity and hydrogen.