Keywords

1 Introduction

With the gradual maturity of hydrogen energy utilization technologies such as fuel cells, hydrogen energy, ammonia energy, heat energy and electric energy will realize flexible conversion and coupling development. Hydrogen energy and ammonia energy have clean and low-carbon properties and potential for cross-border applications. They can be widely used in transportation, industry and other fields. By widely promoting the application of hydrogen energy in energy terminals, greenhouse gas emissions will be effectively reduced. The concept of comprehensive demand response is evolved from the traditional demand response. It guides users to participate in the system regulation at a deeper level through the energy market price signal, calms the load fluctuation on the user side, realizes resource coordination and optimization, and reduces costs and increases efficiency [1,2,3,4]. Document [5] has built a cost evaluation system of power balance with demand response, which provides a new way to solve the balance of power supply and demand. Literature [6] divides users participating in demand response into rigid load and price-sensitive load from load, indicating that demand response can effectively reduce the comprehensive cost of system operation. Literature [7] establishes an economic dispatch model considering thermal and electrical comfort and thermal power demand response, adjusts the thermal power load within the user’s comfort range, eases energy consumption tension and reduces the system operation cost. Literature [8] uses the coupling and complementarity of multiple energy sources to change the user’s energy use type but not the user’s energy use plan, defines it as comprehensive demand response, and studies the direct transaction strategy between Micro Energy Grid (MEG) and suppliers, and verifies the advantages of integrated demand response (IDR). IDR can promote the cascade utilization of energy in the process of consumption and improve the efficiency of energy utilization [9]. According to the flexible and coupling characteristics of electricity, gas and heat loads, the document [10] establishes an optimal scheduling model considering the comprehensive demand response of electricity, gas and heat loads. Literature [11] optimizes the configuration of the energy storage system of the micro-energy network with coupled demand response of electricity, gas and heat, aiming at the minimum economic cost. The results show that the application of coupled demand response can improve the economy of the system.

In the above documents, while using the electricity-to-gas technology to promote the coupling between the power grid and the gas grid and the absorption of renewable energy such as wind and light, the pre-reaction of electricity-to-natural gas is not considered, and the benefits of electricity-to-hydrogen in the two-stage operation process are not considered. However, there are still some technical difficulties and safety problems in large-scale hydrogen storage and transportation, and ammonia has begun to receive attention. The molecular structure of ammonia is composed of one nitrogen atom and three hydrogen atoms, containing more hydrogen atoms. It is a natural hydrogen storage medium. Under normal pressure, it can be liquefied at −33 ℃, which is convenient for safe transportation. To sum up, this paper comprehensively analyzes the process of converting electricity to hydrogen and hydrogen to natural gas, and uses fuel cells to produce heat and electricity to improve the energy utilization rate on the basis of considering the comprehensive demand response of the user side and the optimal operation strategy of the carbon trading mechanism; Because hydrogen energy is difficult to store and transport, it is proposed to introduce ammonia energy and replace the electric to gas equipment with electric to ammonia technology. Combined with an example, the two optimization operation strategies are verified and discussed in terms of minimum total operation cost and minimum carbon emissions.

1.1 MEG Structure

The MEG system established in this paper includes three types of energy: heat, electricity and gas. Its structure is shown in Fig. 1. The energy equipment in-cluded in the system mainly includes wind turbine (WT), photovoltaic (PV), gas turbine (GT) and gas boiler (GB); The energy storage system includes energy storage (ES), heat storage (HS) and gas storage (GS); Energy conversion equipment includes waste heat boiler (WHB), electric boiler (EB), power to gas (P2G), etc.

Fig. 1.
figure 1

Schematic diagram of micro-energy network structure.

Figure 1 shows that the micro energy grid integrates energy production, energy conversion, and energy consumption, and can operate independently or in parallel. Input electric energy and gas energy on the supply side to meet the load demands of electricity, gas, and heat on the load side.

The energy flow structure within the micro energy network is represented by a matrix:

$$ \left[ {\begin{array}{*{20}c} {P_{{{\text{load}},t}} } \\ {H_{{{\text{load}},t}} } \\ {G_{{{\text{load}},t}} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 & {0} & {\eta_{{{\text{GT}}}} } \\ {\eta_{{{\text{EB}}}} } & 1 & {\eta_{{{\text{GB}}}} } \\ {\eta_{{{\text{p2g}}}} } & 0 & 1 \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {P_{{{\text{P}},t}} } \\ {P_{{{\text{H}},t}} } \\ {P_{{{\text{G}},t}} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} { - P_{{{\text{chr}},t}} + P_{{{\text{dis}},t}} } \\ { - H_{{{\text{chr}},t}} + H_{{{\text{dis}},t}} } \\ { - G_{{{\text{chr}},t}} + G_{{{\text{dis}},t}} } \\ \end{array} } \right] $$
(1)

In the formula, Pload, t, Hload, t, Gload, t are the electricity, gas, and heat load requirements within the micro energy network at time t; PP, t, PH, t, PG, t are the electric energy, thermal energy, and gas energy consumed by the micro energy network at time t; Pchr, t, Pdis, t, Hchr, t, Hdis, t, Gchr, t, Gdis, t are the charging and discharging power of the electric storage equipment, heat storage equipment, and gas storage equipment in the micro energy network at time t.

2 Refined Models for Electrogas and Electroammonia Conversion

Most of the existing studies, when modeling electric to gas equipment, generally only consider the electric to methane process, without considering the electric hydrogen production process [12]. Hydrogen energy is a highly efficient energy source that does not generate carbon emissions. It has great application potential in the fields of chemical engineering, thermal power production, transportation, and other fields. The two-stage operation process of electricity to gas is shown in Fig. 2. Consider refining the MEG structure of the electro-gas con-version process as shown in Fig. 3, and the MEG structure of the electro-ammonia conversion process as shown in Fig. 4.

Fig. 2.
figure 2

Schematic diagram of micro-energy network structure.

Fig. 3.
figure 3

MEG structure diagram considering electric to gas conversion.

Fig. 4.
figure 4

MEG structure diagram considering electro-ammonia conversion.

2.1 MEG Structure

Methane Reactor (MR) uses hydrogen to reduce a certain amount of CO2 to produce methane. The entire process is pollution-free and can consume a certain amount of CO2. The flow chart is shown in Fig. 5. Methane can be supplied to system users and equipment.

Fig. 5.
figure 5

Hydrogen to methane process.

This process is an exothermic process with low efficiency, and its model can be expressed as:

$$ \left\{ \begin{gathered} MR_{{\text{g}}} (t) = \eta_{{{\text{MR}}}} P_{{{\text{MR}},{\text{H}}_{{2}} }} (t) \hfill \\ P_{{{\text{MR}},{\text{H}}_{{2}} {\text{,min}}}} \le P_{{{\text{MR}},{\text{H}}_{{2}} }} (t) \le P_{{{\text{MR}},{\text{H}}_{{2}} {\text{,max}}}} \hfill \\ \Delta P_{{{\text{MR}},{\text{H}}_{{2}} {\text{,min}}}} \le P_{{{\text{MR}},{\text{H}}_{{2}} }} (t + 1) - P_{{{\text{MR}},{\text{H}}_{{2}} }} (t) \le \Delta P_{{{\text{MR}},{\text{H}}_{{2}} {\text{,max}}}} \hfill \\ \end{gathered} \right. $$
(2)

In the formula, PMR, H2 (t) is the hydrogen energy consumed by MR during the t period; MRg (t) is the natural gas power produced by MR during period t; ηMR is the conversion efficiency of MR; PMR, H2, min are the upper and lower limits of hydrogen energy consumption by MR; Δ PMR,H2,max, ΔPMR, H2, min are the upper and lower limits of the MR output ramp.

2.2 Electroammonia Conversion Model

The process of producing ammonia from hydrogen is to synthesize nitrogen and hydrogen into ammonia through a Haber ammonia synthesis reactor. The flow chart is shown in Fig. 3. The process model can be expressed as:

$$ E_{{{\text{H}}_{2} }} (t + 1) = E_{{{\text{H}}_{2} }} (t) + \eta_{{{\text{H}}_{2} ,{\text{chr}}}} P_{{{\text{H}}_{2} ,{\text{chr}}}} (t + 1) - \frac{{P_{{{\text{H}}_{2} ,{\text{dis}}}} (t + 1)}}{{\eta_{{{\text{H}}_{2} ,{\text{dis}}}} }} $$
(3)
$$ \begin{gathered} P_{{{\text{H}}_{2} ,{\text{chr}},\min }} \le P_{{{\text{H}}_{2} ,{\text{chr}}}} (t) \le P_{{{\text{H}}_{2} ,{\text{chr,}}\max }} \hfill \\ P_{{{\text{H}}_{2} ,{\text{dis}},\min }} \le P_{{{\text{H}}_{2} ,{\text{dis}}}} (t) \le P_{{{\text{H}}_{2} ,{\text{dis}}\max }} \hfill \\ \end{gathered} $$
(4)
$$ E_{{{\text{H}}_{2} ,\min }} \le E_{{{\text{H}}_{2} }} (t) \le E_{{{\text{H}}_{2} ,\max }} $$
(5)
$$ U_{{{\text{H}}_{2} ,dis}} (t) + U_{{{\text{H}}_{2} ,chr}} (t) \le 1 $$
(6)

In the formula, EH2 (t) is the capacity of the hydrogen storage tank at time t; PH2, chr (t), PH2, dis (t) are the input and output power of the hydrogen storage tank at time t, respectively; ηH2,chr, ηH2, dis: storage and discharge efficiency of hydrogen storage tanks; EH2, max, EH2, min are the upper and lower limits of the hydrogen storage tank capacity; UH2, chr (t), UH2, dis (t) are respectively the charging and discharging states of the battery at time t, 0 represents the stop state, and 1 represents the operation state.

The ammonia storage tank model is similar to the hydrogen storage tank model and will not be described again.

3 Solution of Electric Heating Integrated Energy System

3.1 Objective Function

In order to analyze the economy and carbon emissions of the multi-energy coupled micro energy grid model established in this article, the objective function is to minimize the total operating cost of the system, including system energy purchase cost, equipment operation and maintenance cost, and carbon trading cost, while meeting the requirements for electricity, gas, and heat loads within the system and equipment constraints, namely:

$$ F = \min (F_{{{\text{grid}}}} + F_{{{\text{gas}}}} + F_{{{\text{op}}}} + F_{{{\text{MEG}}}} ) $$
(7)

In the formula, Fgrid—MEG power purchase cost; Fgas—MEG gas purchase cost; Fop—MEG operation and maintenance cost; FMEG—MEG carbon transaction cost.

  1. (1)

    Grid interaction costs

    $$ F_{{{\text{grid}}}} = \sum\limits_{t = 1}^{24} {(v_{{{\text{grid}},{\text{b}}}} (t)P_{{{\text{buy}}}} (t) + } v_{{{\text{grid}},{\text{s}}}} (t)P_{{{\text{sell}}}} (t)) $$
    (8)

In the formula, vgrid, b (t)—the electricity purchase price at time t; vgrid, s (t)—the electricity selling price at the time of t; Pbuy (t)—purchasing power at t time; Psell (t)—Power sold at time t.

  1. (2)

    Gas purchase cost

    $$ F_{{{\text{gas}}}} = \sum\limits_{t = 1}^{24} {v_{{{\text{gas}}}} (t) \cdot G_{{{\text{net}}}} (t)/LHV_{{{\text{gas}}}} } $$
    (9)

In the formula, vgas(t)—the purchase price of gas at time t; Gnet(t)—gas purchasing power at time t; LHVgas—Low calorific value of natural gas, taken as 9.78 kWh/m3.

  1. (3)

    Equipment operation and maintenance costs

    $$ F_{{{\text{op}}}} = \sum\limits_{n} {K_{n} } P_{n} (t) $$
    (10)

In the formula, Kn refers to the unit operation and maintenance cost of equipment n (including gas turbine, battery, heat storage tank, gas storage tank, photovoltaic unit, wind turbine unit, gas boiler, waste heat boiler, methane reactor, fuel cell, hydrogen storage tank, ammonia storage tank, etc.); Pn (t)—The input power of the device n operating at time t.

3.2 Constraint Condition

On the basis of fully considering the operating characteristics of the respective subsystems of the electricity ammonia conversion model and the micro energy grid, the following constraints are selected:

  1. (1)

    The electrical power balance constraint

    $$ \begin{gathered} P_{{{\text{WT}}}} (t) + P_{{{\text{PV}}}} (t) + P_{{{\text{GT}}}} (t) + P_{{{\text{grid}}}} (t) - P_{{{\text{bt}},{\text{chr}}}} (t) + \hfill \\ P_{{{\text{bt}},{\text{dis}}}} (t) - P_{{{\text{eb}}}} (t) - P_{{{\text{EL}}}} (t) + FC_{{{\text{NH}}_{{3}} {,}e}} (t) = Load_{{{\text{ele}}}} (t) \hfill \\ \end{gathered} $$
    (11)
  1. (2)

    Heat power balance constraints

    $$ \begin{gathered} H_{{{\text{GB}}}} (t) + H_{{{\text{WHB}}}} (t) - H_{{{\text{tst}},{\text{chr}}}} (t) + H_{{{\text{tst}},{\text{dis}}}} (t) \hfill \\ + H_{{{\text{eb}}}} (t) + FC_{{{\text{NH}}_{{3}} {\text{,h}}}} (t) = Load_{{{\text{heat}}}} (t) \hfill \\ \end{gathered} $$
    (12)
  1. (3)

    Ammonia power constraint

    $$ {\text{sum}}(NR_{{\text{g}}} ) = {\text{sum}}(P_{{{\text{FC}},{\text{NH}}_{3} }} ) $$
    (13)

In the formula, PFC, NH3—ammonia energy input to the fuel cell. That is, the amount of electric ammonia conversion within an operating cycle is equal to the amount consumed by the fuel cell.

3.3 Solution Method

The research on optimal operation of micro energy networks includes two basic processes: modeling and solving. The methods for solving optimization problems include: (1) mathematical programming; (2) Heuristic optimization method.

The optimal operation of the micro energy network solved in this paper is a mixed integer linear programming problem, which constructs a comprehensive electric heating energy system model considering the carbon trading mechanism and user demand response; Fully consider the chemical characteristics between electric to gas and electric to ammonia conversion, establish a mathematical model, and incorporate it into the electrothermal comprehensive energy system model; Under the conditions of satisfying the output constraints of each module of the system and the energy balance of the power system, the Cplex solver is invoked on the Matlab platform using the Yalmip toolbox to solve the model.

4 Example Analysis

In order to verify the effectiveness of the model proposed in this article, the optimized operation model built in document [1] refined the electric to gas conversion process, adding fuel cells, hydrogen storage tanks, fuel cells, ammonia storage tanks, and other equipment. The parameters are shown in Table 1.

Table 1. Equipment parameters.

To verify the effectiveness of the proposed model, this article intends to conduct a comparative analysis of the following two scenarios.

  • Scenario 1: Consider switching electricity to gas.

  • Scenario 2: Consider electricity ammonia conversion.

The actual carbon emissions and total cost under each working condition are shown in the Table 2. According to Table 2, compared to electric hydrogen conversion, using electric ammonia conversion in micro energy networks can effectively reduce system carbon emissions by 7.88% and total operating costs by 5.36%.

Table 2. Running cost.
  1. (1)

    The optimized scheduling results for electricity, gas, and heat in Scenario 1 are shown in Figs. 5, 6, and 7.

Fig. 6.
figure 6

Power dispatching results.

Figure 5 shows that during periods when users have less demand for electricity load (nighttime periods), due to the relatively rich output of wind power generation, electrolytic cell equipment converts it into hydrogen energy for storage, charging batteries, or heating through electric boilers; During peak hours of user electricity load, due to high electricity prices, the difference in electricity load demand is supplemented by fuel cells, reducing the purchase of electricity from the large grid, and relying on the efficiency and cleanliness of hydrogen energy to reduce the carbon emissions of the system.

Fig. 7.
figure 7

Gas scheduling results.

Figure 6 shows that since hydrogen energy is produced from natural gas through a methane reactor and then heated and powered by GB and GT, there is a significant capacity loss during the energy conversion process, while fuel cells have a high efficiency in cogeneration, so fuel cells are preferred for producing electricity and heat.

Fig. 8.
figure 8

Heat scheduling results.

Figure 7 shows that during the peak period of electrical load, due to the combined heat and power generation effect of fuel cells, while meeting the electrical load, a large amount of heat energy is also produced, reducing the output of gas fired boilers at this time and reducing the consumption of natural gas.

  1. (2)

    The optimized scheduling results for electricity, gas, and heat in Scenario 2 are shown in Figs. 8, 9, and 10.

Fig. 9.
figure 9

Power dispatching results.

Figure 8 shows that during the low demand period for electricity load of users, due to the high output of wind power generation, electric ammonia production equipment is used to convert it into ammonia energy for storage or to charge the battery; The difference between the user’s electricity load and the electricity load during peak electricity prices is supplemented by fuel cells to reduce the purchase of electricity from the large power grid. As ammonia is a carbon free fuel and is converted from clean energy, it can reduce the system’s operating costs and reduce the system’s carbon emissions.

Fig. 10.
figure 10

Gas scheduling results.

Figure 9 shows that in this section, electric ammonia production equipment is used instead of traditional electric gas conversion equipment, and the conversion efficiency is high. Therefore, there is no conversion of electric energy to natural gas, but natural gas is relatively clean, so natural gas is still the main source of energy in the micro energy grid. Based on time-sharing gas prices, achieve low storage and high production.

Fig. 11.
figure 11

Heat scheduling results.

Figure 10 shows that during the peak period of electrical load, due to the combined heat and power generation effect of fuel cells, while meeting the electrical load, a large amount of heat energy is also produced, reducing the output of gas fired boilers at this time, reducing the consumption of natural gas, thereby reducing the system operating costs and carbon emissions (Fig. 11).

5 Conclusion

This article first introduces the advantages of hydrogen and ammonia energy sources, expounds the production processes of electric conversion of methane and ammonia, and then selects equipment based on the types and characteristics of electrolytic cells, fuel cells, and hydrogen/ammonia storage tanks in combination with MEG requirements, and establishes corresponding mathematical models. Consider the impact of refining the electric to gas process and replacing traditional electric to gas equipment with electric to ammonia on the operation of the micro energy grid.

  1. (1)

    Based on the optimization model of demand response, further consider refining the electro-gas conversion process, consider the advantages of high hydrogen energy density and high conversion efficiency, and reduce energy waste in the hydrogen to methane process. With the minimum operating cost and carbon emissions as the objective functions, establish a MEG optimization operation model, and use a Cplex solver to solve. Simulation results show that the optimized operation model can improve the utilization efficiency of renewable energy, reduce the use of fossil energy, and further reduce the carbon emissions of the system.

  2. (2)

    The advantages of ammonia energy in the energy field are explained. Due to its carbon free, easy to obtain, easy to store and transport, and the bulk energy density of liquid ammonia far exceeds that of liquid hydrogen and hydrogen, it is proposed to use electric ammonia conversion equipment to replace traditional electric gas conversion equipment. On the premise of meeting the user’s load requirements, with the minimum operating cost and carbon emissions as the objective function, a MEG optimization operation model is established and solved using a Cplex solver. The results of an example show that the optimization model can improve energy utilization efficiency, reduce system carbon emissions, and provide a new idea for the consumption of renewable energy in remote and transportation inconvenient areas on the basis of minimum operating costs.