Energy and economic evaluation of Gas-electric hybrid energy system based on improved genetic algorithm

In the future when there are more and more new energy sources in the grid, the Power-to-Gas(P2G) interconnected operation network will be affected by new external energy sources, resulting in an imbalance between the generated power and the actual power required for the normal operation of the grid. On the one hand, the application of P2G technology can guide the further integration of the power system and the natural gas system. The power-to-gas balance grid based on water electrolysis is a promising solution, which can effectively reduce the uncertainty of the system dispatching plan. On the other hand, the physical properties of natural gas determine that it can provide a method for the consumption of excess electricity. This paper proposes a peak load shifting calculation model based on an improved genetic algorithm, which smoothes the net load curve of the Gas-electric hybrid energy system through the coordination of P2G and gas-fired generators. The test example used in the algorithm adopts the modified IEEE39-node power network and the coupling system of the Belgian 20-node natural gas system to analyze the static load fluctuations of the system operation under various conditions. It is verified that the power-to-gas conversion and the algorithm researched in this paper can effectively smooth the net load fluctuation and improve the system's new energy absorption capacity.


Introduction
The power to gas (P2G) technology developed in recent years provides a way to solve the problem of high-penetration wind power fluctuations in the highly coupled power network and natural gas network and further spread to the natural gas network, threatening the safety of the entire integrated energy system. P2G technology can convert surplus wind power during low power consumption periods into natural gas that can be easily stored on a large scale, and convert the chemical energy of natural gas into electrical energy through gas turbines during peak hours. Compared with traditional storage devices, the power-to-gas storage capacity is large, and the discharge time is long, which can effectively absorb large-scale wind power and realize long-term and large-scale space-time translation of energy. Currently, there are few studies on the impact of power-to-gas related to the integrated energy system. Literature [11][12] introduces the realization and technology of electricity-to-gas conversion, and evaluates the economics. Literature [13][14] studied the impact of power to gas on the operation of the Gas-electric hybrid energy system. Literature [15] uses the conversion of electricity to gas to improve the dispatching capacity of wind power. This paper proposes an improved genetic algorithm and operation strategy to analyse the peakshaving and valley-filling model with P2G technology and the model is verified through the analysis of examples.

Principle introduction
The power-to-gas technology is a way of energy conversion, which refers to the conversion of electrical energy into chemical energy by some means, which is stored in hydrogen or natural gas. Therefore, power-to-gas conversion is divided into two forms, one is electricity-to-hydrogen, and the other is power-to-natural gas. The electrolysis of hydrogen uses the principle of electrolysis of water to produce hydrogen and oxygen. The chemical equation is The hydrogen produced by electrolysis can be directly used for combustion or power generation. However, because hydrogen is difficult to store and transport, the form of electrolysis of natural gas is generally used. A cubic meter of natural gas per unit volume contains more chemical energy than a cubic meter of hydrogen, and natural gas is now the mainstay of the gas transported by the pipeline network. Power-to-natural gas conversion uses another chemical reaction on the basis of electricity-to-hydrogen to realize the conversion of carbon dioxide and hydrogen into methane and water. The chemical equation is The energy conversion efficiency of formula (2) is about 75%~80%, and the comprehensive energy conversion efficiency of the complete chemical reaction of electricity to natural gas is about 45%~60%.
The storage of natural gas is generally in abandoned oil and gas fields, aquifers or salt caverns. The storage space of natural gas determines the capacity for load regulation. The storage capacity of natural gas is huge, up to several hundred trillion cubic meters, which is equivalent to storing electric energy up to TW[h] level. When the electricity load peaks, the natural gas plant converts natural gas into electricity through equipment such as fuel cells and gas turbines to form an electricity-gas-electricity cycle energy storage system.   Figure 1 shows the general working principle of pulsating power sources such as electrolysis systems, gas turbine systems, and wind power plants. As shown in Figure 1, this technology can reduce wind curtailment because it can absorb unpredictable excess production, and conceptually exceeds the grid capacity of installed renewable energy. In addition, another positive impact of P2G technology is to improve the renewable part of gas fuels and correspondingly reduce carbon dioxide emissions from natural gas end-uses. In this paper, through the definition of power to gas, wind power, and gas turbine power, the difference between the above load and the electrical load is defined as the net load, and the 3 best operation mode of the net load curve is realized through the adjustment of each unit. In terms of the targets of regulation, this paper regulates power-to-gas plants and gas turbine plants. The excess wind output from the power-to-gas plants converts wind energy into chemical energy and stores them in natural gas; when the demand for electricity increases, natural gas is exported to gas turbine plants. When the gas turbine has a fast dynamic response, it is suitable for peak and frequency modulation. Figure 2 General principle of integrating a flfluctuating power source with an electrolysis system. Figure 2, one of the most obvious characteristics when wind power is coupled to the grid is the anti-peak shaving feature. When the user's electricity load is low, the wind power output is in the peak period, and wind power will be abandoned at this time because a large amount of wind power is difficult to absorb. We use P2G technology to convert the excess wind energy into chemical energy for storage, which improves the system's consumption of wind power. In addition, the electricity-to-gas plant is regarded as the load side, which plays a role of "filling the valley"; When the electric load peaks, the stored natural gas or hydrogen is sent to the steam turbine factory through the natural gas network, and the gas turbine output is increased to reduce the net load, which plays a role of "peak shaving". The specific realization of peak-shaving and valley-filling is based on the coordinated dispatch of the powerto-gas plant and the gas turbine plant. In a sense, it has realized the temporal and spatial translation of wind power output and made the net load curve smoother.

Objective function
The mathematical model is mainly based on the electricity-to-gas integrated energy system model for modeling and simulation. The goal is to improve the stability of the system, the reliability of the system, and the economy of system operation. The objective function can be divided into two parts, one is the peak shaving part and the other is the operating cost part. The peak shaving and valley filling target uses the smallest sum of squares of the net load change rate of all adjacent time periods to characterize. Due to the different dimensions of the peak-shaving and valley-filling target and the operating cost target, the economic conversion coefficient ω is introduced to project the peak-shaving and valley-filling target to the economic latitude, which together with the system operating cost constitutes the lowest comprehensive cost target, so that this target can be optimized and completed the overall optimization of load peak shaving and valley filling and the overall system operating cost. The components of the operating cost in the objective function include gas turbine operation and maintenance costs, hydrogen and natural gas transportation costs, power-to-gas plant operation and maintenance costs, natural gas consumption, gas storage costs, and wind curtailment costs. The objective function can be written as (3): is the generation cost function of thermal power unit r at time t, which is adopted the unit cost consumption curve ,expressed as:

Restrictions
In the following section 3.2, the limited range of each variable of the objective function and its function range (ie objective function constraint) are given to give the applicable scope of the mathematical model. Constraints mainly include: power network constraints, natural gas network constraints, and coupling constraints between the power network and the natural gas system.

Power network constraints
Conventional constraints are used for power network constraints, including power balance constraints, balanced node phase angle constraints, generator set output constraints, node voltage constraints, line power constraints, and generator set climbing constraints, in the form of rectangular coordinates, which will not be repeated here, but the expression is as follows (1) Constraint on active power output of thermal power generating units: In the formula: max , , G r t P and min , , G r t P respectively represent the upper and lower limits of the output of the thermal power generating set.
(2) Wind turbine operating constraints In the formula: ( , ) V t  , in V , r V , out V and P respectively represent the average wind speed, cut-in wind speed, rated wind speed, cut-out wind speed and rated power; they represent the maximum output power of the wind turbine at time.
In the formula: max ( ) In the formula: Pi,t, Qi,t are the active and reactive power of node i at time t; QG, i, t is the reactive power of generator set i at time t; QL, i, t is the reactive load of node i at time t; (5) Node voltage constraint In the formula: ei, t and fi, t are the real and imaginary parts of the voltage at node i at time t, respectively. Vi, max, Vi, min are respectively the upper and lower limits of the voltage amplitude of node i; (6) Line power constraint The line power constraint is expressed by equation (14).
In the formula: Pij, t and Qij, t are the active and reactive power of line ij at time t, respectively.
In the formula: θbal, t is the phase angle of the balance node voltage at time t; In the formula: RU,i and RD,i are the upper limit of climbing up and down of generator set i respectively.

Natural gas network constraints
For solving the mathematical problem of a large-scale Gas-electric hybrid energy system, the nonlinear problem will obviously increase the difficulty of solving it. In order to improve the efficiency of the algorithm, it is worthwhile to transform the nonlinear problem of natural gas network into a linear model at the expense of the accuracy of the algorithm. In this paper, the mathematical model of natural gas network is linearized. (2) Reservoir output flow restrictions max , , , In the formula: (3) Flow balance Similar to the node power balance in the power network, according to the law of flow conservation, the flow balance equation of each node in the natural gas network can be obtained as follows:

Coupling constraints of power network and natural gas system
The Gas-electric hybrid energy system can form a closed-loop system with bidirectional energy flow through natural gas generating units and p2g power station, and its constraint conditions can be shown in equation (21) In the formula: ϕP2G,j is the conversion efficiency of electricity to gas j; Hg is the calorific value of natural gas, taking 39MJ [m 3 ] .

Example illustration
Based on the above objective functions and constraints, the mathematical model of collaborative planning for the Gas-electric hybrid energy system can be summarized as equation (22) x is the continuous variable vector in the decision variable.
Formula (22) describes a continuous mixed integer linear programming problem. In this paper, an improved genetic algorithm based on real coding, tournament selection, discrete recombination crossover and real value mutation is designed. In addition, in order to further improve the speed and efficiency of genetic algorithm, we use catastrophe, elite selection, adaptive crossover, mutation and catastrophe probability strategy to improve it. The specific solution process is shown in the figure below. Based on the above analysis, in order to solve the peak-shaving and valley-filling model of the Gaselectric hybrid energy system, the dispatch center first obtains the system's electric load, gas load and the predicted output curve of the wind farm; then inputs the data into the model and solves it; finally, according to the calculation results The next day's wind power grid-connected power plan, P2G conversion power plan, gas turbine unit output plan, and thermal power unit output plan are formulated to smooth the net load fluctuations and ensure the economy of system operation. At the same time, this paper chooses the IEEE39-node power system and the Belgian 20-node natural gas system to construct the test case shown in Figure 4 through the coupling of electricity to gas and gas turbine. Figure 4 the Gas-electric hybrid energy system The IEEE39 node system has 10 generator sets, 46 transmission lines, and a total installed capacity of 7367MW, reducing the electrical load and line power upper limit to 75% of the original. Set the generator sets G1, G7 and G8 as gas turbines, which are connected to the natural gas network nodes 5, 14 and 2 respectively. Node 32 and node 33 are respectively connected to a wind farm cluster with a rated output of 900MW, and the cost of wind curtailment is 1000$/MW⋅h. In order to maximize the absorption of wind power and avoid the blockage of the natural gas network, the input end of the electricity-to-gas network is also connected to the power network node 32 and node 33, and the output end is connected to the natural gas network storage tank node 8 and node 14, respectively. The maximum conversion power is 500MW. The cost is 20$/MW. The 20-node natural gas system in Belgium includes 21 gas transmission pipelines, 2 pressurization stations, 2 gas source points W1, W2, and 4 gas storage tanks S1~S4. The specific parameters can be found in literature [13].
This article takes 1 hour as the time step to dynamically optimize the scheduling of the system 24 hours a day. The electric load, gas load of the system and the predicted output curve of wind farm are shown in Fig. 5.

Scene description
In order to study the impact of electricity to gas on the operation of the Gas-electric hybrid energy system, three scenarios were set up for comparative analysis, as follows: (1) Taking into account the power-to-gas model, but not taking into account the peak shaving and valley filling model, the objective function is only the economic cost objective.
(2) Does not take into account the power-to-gas, but the objective function comprehensively takes into account the economic cost target and the peak shaving and valley filling targets. (3) Taking into account the power-to-gas and peak-shaving and valley-filling models, the objective function comprehensively considers the economic cost target and the peak-shaving and valley filling target.

Simulation result analysis
This paper takes the target economic conversion coefficient ω of peak shaving and valley filling as 0.1, and simulate the above three scenarios respectively. Changes in net load, gas turbine output, wind farm actual output, and power-to-gas conversion power in different scenarios are shown in Figure 6-8. It can be seen from these figures that this algorithm effectively converges to the algorithm fitness in the three scenarios. This proves that when the improved genetic algorithm takes into account the peak-shaving and valley-filling model, the individual selection and optimization performance of the algorithm for the analysis of the impact of power-to-gas technology on the operation of the Gas-electric hybrid energy system is good. After algorithm analysis, the system wind volume, cost, and net load fluctuations in different scenarios are shown in Table 1.  Analyzing and comparing Table 1 and Figures 5-8, it can be found that there is no wind abandonment in the first scenario that takes into account the power-to-gas conversion; the wind abandonment volume in the third scenario that takes into account the power-to-gas conversion is reduced by 82.1% compared with the second scenario. It has been fully verified that the conversion of power to gas can greatly improve the wind power absorption capacity of the Gas-electric hybrid energy system. The conversion of power to gas can improve the capacity of wind power absorption because it can convert the remaining wind power into a large amount of natural gas storage, which effectively reduces the rate of wind abandonment and the cost of wind abandonment, thereby reducing the economic cost of the system. The economic cost of Scenario 3 is 65.37% lower than Scenario 2. In addition, the net load variance and net load peak-to-valley difference of Scenario 1 and Scenario 3 are respectively reduced compared to Scenario 2, which shows that electricity to gas has a certain effect on smoothing system net load fluctuations. Because during the low electricity load period, it happens to be the peak period of wind power output, as shown in Fig. 5 at 4-7h and 15-18h, a large amount of wind power is difficult to absorb, and the remaining wind power is converted into natural gas by converting electricity to gas. Therefore, the power from power to gas in Figure 6 and Figure 8 is the largest in these two periods. It can be seen that the electricity to gas increases the net load when the electric load is low, and plays a role in "filling the valley" of the net load, so it can slow down the fluctuation of the net load.
Due to the intermittent nature of wind power and the characteristics of reverse peak regulation, the peak-to-valley difference of the system's electrical load is indirectly enlarged. For example, in scenario 1, when the peak shaving and valley filling model is not taken into account, the net load variance and net load peak-valley difference are 32.381 and 18.201, respectively. Scenario 2 takes into account the peak-shaving and valley-filling model. Compared with scenario 1, the net load volatility is greatly improved. The net load variance is reduced to 10.370, and the net load peak-to-valley difference is reduced to 9.963; Similarly, the net load variance and net load peak-to-valley difference of scenario 3 considering the peak-shaving and valley-filling model are significantly reduced compared with scenario 1, by 82.54% and 62.67% respectively. This fully verifies that the peak-shaving and valley-filling model proposed in this paper can greatly improve the net load volatility of the Gas-electric hybrid energy system. Because the peak-shaving and valley-filling model converts wind power that is difficult to absorb into natural gas during the low period of electric load, the net load is increased to achieve the effect of "valley filling"; while during the peak period of electric load, the net load is reduced by gas turbine power generation. For the "peak cutting" effect, the gas turbine has the highest output in the two periods of 10~13h and 21~24h. In this way, the coordinated action of the power-to-gas and the gas turbine makes the system net load curve smooth. However, in order to stabilize the fluctuation of net load, the peak-shaving and valley-filling model will increase the amount of wind curtailment and increase the economic cost. Because Scenario 3 has the largest amount of calculation and number of iterations, this paper only uses the fitness convergence curve of Scenario 3 to illustrate the performance of this algorithm. As shown in Figure 9, the improved genetic algorithm has faster convergence speed and better optimization performance.

Conclusions
Based on the energy conversion and space-time translation characteristics of power-to-gas, this paper proposes an improved genetic algorithm to analyze the peak-shaving and valley-filling model of the Gas-electric hybrid energy system, using the "valley-filling" effect of power-to-gas and the "peakshaving" of gas turbines to achieve the goal of smoothing the net load curve of the system, the conclusions are as follows (1) The P2G technology has greatly improved the wind power absorption capacity of the system, and at the same time can effectively slow down the fluctuation of the net load during the low electricity load and the peak wind power output.
(2) The peak-shaving and valley-filling model proposed in this paper harmonizes the power and load sides of the system through P2G technology and gas turbines, which effectively improves the system net load volatility and system reliability, but it also increases the economic cost of the system.
(3) It can be seen from the fitness curve that the improved genetic algorithm proposed in this paper has a faster convergence speed and good optimization performance.