The Optimal Control Algorithm of the Integrated Energy System Based on Demand Response

As an important embodiment of energy diversification demand, comprehensive energy has been widely used. Aiming at the problem of system optimization for the dynamic characteristics of multi-energy networks in the integrated energy system, this paper established the integrated energy system optimization control model. It optimized the next-day system load curve based on the integrated demand response and verified the effectiveness of the algorithm in this paper. The results show that the algorithm model in this paper can improve the flexibility and economy of the system operation. It can ensure the safety of the integrated energy system operation. It can also effectively improve the economy of the system and reduce the system operation cost and promote the consumption of clean energy, which shows the effectiveness of the optimization control algorithm in this paper.


Introduction
Efficient and clean energy utilization technology is the key to the energy revolution and the objective requirement of sustainable development of the world.An integrated energy system is an integrated system of energy production, supply, and sale by optimizing and coordinating the production, transmission and distribution, storage, and consumption of various energy sources [1].A comprehensive energy system focuses on providing different types of energy services, including cold, heat, electricity, gas, etc., which can meet diversified energy demands [2].As one of the core technologies for efficient and clean energy utilization, comprehensive energy system has attracted wide attention from scholars around the world [3].
The research on integrated energy systems mainly focuses on network modeling and operation optimization [4].In [5][6][7][8], a comprehensive demand response strategy based on multi-energy complementarities was proposed, but it is limited to combined heat and power scheduling; the coupling and conversion among electricity, heat, and gas are rarely considered.At present, most research on integrated energy system focus on the coupling system of two networks, and most of the existing research focus on the single analysis of the network characteristics or the study of the source load characteristics.There are few studies on the coupling analysis of the dynamic characteristics of the integrated energy system.In addition, the research on the multi-type load and its demand response capability is still to be explored.Based on this, this paper takes into account the dynamic characteristics of the gas network and the heat network in the integrated energy system and considers the effects of price load and alternative load on the dispatching results.Based on the integrated demand response, the optimization control model of the integrated energy system was established, and the effectiveness of the model was verified.

Integrated energy system model
In the electric thermal energy system, various types of energy have realized coupling and interaction in production, transmission, distribution, and consumption.On the transmission and distribution side of the network, electrical, thermal, and gas networks are coupled with many types of energy conversion equipment, among which the CHP unit can couple the three energy networks together.The transmission speed of the power grid is relatively fast, which can be considered instantaneous, while the transmission speed of the gas network and heat networks is relatively slow.Its transmission inertia can be likened to the energy storage of the system, which can be used to effectively increase the adjustment flexibility of the system.Therefore, it is necessary to conduct a unified modeling of the system to explore the coupling characteristics between the three networks.On the other hand, there are also electric hot gas loads that can be converted into each other on the load side.Therefore, if the load side can flexibly adjust the energy demand according to its own demand and play the role of substitution of different types of energy, it can be combined with the multi-energy flow coupling network side to jointly improve the flexibility of the system operation.

Gas storage characteristics of gas network
In the case of demand fluctuations and slow changes caused by natural gas injection, it is assumed that natural gas isothermal flow is efficient.Therefore, it can be assumed that the temperature of natural gas is the same as that of its surrounding environment, and the mass conservation equation and momentum conservation equation are: where ߨ ,௧ and ߨ ,௧ are the pressure of node m and n respectively; ǻt is unit time length; ܵ is the flow direction of pipeline mn.If the natural flow flows from m to n, then ܵ =1; if the natural flow flows from n to m, then ܵ = -1; ݂ ˆ,௧ is the average natural airflow flowing through a pipe mn, and it can be used to represent the entry and exit airflow average; ݈ is the length of pipe mn.ߨ ,௧ and ݂ ,௧ are respectively the average pressure of pipeline mn at time t and the mass flow of natural gas through the pipeline.C1,m,n and C2,m,n are constants related to pipe length, diameter, and other parameters.
The storage natural gas pipeline can be used as a storage unit to alleviate the imbalance of natural gas production and use.It has the characteristics of dynamic change, and the change mechanism of pipeline storage can play a role in cushioning the load change of natural gas.‫ܯ‬ ,௧ represents the pipe storage of pipe mn at time t.The expression of management is:

Heat storage characteristics of heat network
For the hydraulic model, the dynamic characteristics refer to the transmission delay.The transmission delay from the heat source to the heat user makes the heat network pipeline have natural heat storage characteristics.For the thermodynamic model, the dynamic characteristic refers to the temperature loss in the process of water transmission [9].The outlet temperature of the pipeline should be corrected as: and ܶ ୍,୩୮,௧ିఛ ౡ౦, is the temperature of pipeline outlet and inlet; Dkp and Lkp are the diameter and length of the pipeline respectively; ȡ is water flow density; ݉ ୩୮,௧ is the pipeline flow rate at time t.

Integrated demand response
In an integrated energy system, the load can be divided into fixed, price, and replacement loads.For the price load, users can adjust their energy use behavior by changing the time-sharing energy price [10].For the alternative load, different forms of energy can be selected to provide the same energy demand for users.
where ‫ܮ‬ ,௧ is the electricity/gas/heat load demand of the user; k is an energy type, kę{e, g, h}, where e represents electricity, g represents gas, and h represents heat.‫ܮ‬ ୱ,,௧ is fixed load; ‫ܮ‬ ୮,,௧ is price load; ‫ܮ‬ ୡ,,௧ is replacement loads.

Price-based demand response
Since gas and heat prices are generally fixed prices, we only need to consider the price demand response of electrical load.Users generally have a multi-period response to the electricity price, that is, users will adjust their electricity consumption plan according to the electricity price of different periods.In general, the fluctuation of electricity load within a day is basically consistent with the peak and valley of TOU.Therefore, the TOU price can be adjusted reasonably, so as to guide users to change the energy consumption curve.The electric load Lƍp,e, after the price type electric load participates in the demand response, are: Lƍp,e=Lp,e+ Eǻpe. (7)

Alternative demand response
Part of the electricity, heat, and gas load on the user side can also be flexibly converted into use, and the same energy demand of users can be replaced by different energy sources.Therefore, it can flexibly play the role of replaceable load to optimize the matching of the load curve and energy curve.The load L 'c, k, t after the replacement load participates in the demand response is: where ȟ‫ܮ‬ ୡ,ୣ,௧ , ȟ‫ܮ‬ ୡ,,௧ , and ‫ܮ‬ ୡ,୦,௧ are the electrical, gas, and thermal loads participating in the alternative type demand response, which also need to meet the exchange limit constraints.ߞ ୣ୦ and ߞ ୣ are conversion coefficients of electric load and heat and gas load respectively.

User satisfaction constraint
Since substitution-type demand response does not fundamentally change users' energy demand and has no substantial impact on users, while price-type demand response changes users' energy consumption curve, it is necessary to consider users' energy consumption satisfaction.Here, user satisfaction is indirectly reflected through the change of the user's electricity price type load Sc and the change of the user's energy expenditure expense Sp.The expression is as follows.
where ‫ܮ‬ ,௧ and ‫ܮ‬ ,௧ ᇱ are respectively the electric/heat/gas load before and after the response; ‫‬ ,௧ and ‫‬ ,௧ ᇱ are the electricity/heat/gas prices before and after the response respectively.Sc and Sp also need to meet the minimum satisfaction constraint, that is, Sc Scmin, Sp Spmin.Scmin and Spmin are respectively the minimum satisfaction values of the user's load change and the minimum satisfaction values of the user's energy expenditure change.In this paper, Scmin =0.9, Spmin =1.05.

Example analysis
The example simulation system is an IEEE6-node power grid, 6-node gas network, and 6-node heat network.The power grid, heat network, and gas network are coupled through three CHP units.The gas purchase price of the gas source is 1 USD /kcf (1kcf=28.317m 3 ), the wind abandon penalty price is 50 USD/(MW•h), the electricity load reduction penalty price and gas load reduction penalty price are 100 USD/(MW•h) and 5 USD/kcf respectively, and the gas purchase price of the user is 1.8 USD /kcf.The purchase price is $20/(MW•h).In this paper, one day is taken as the cycle, the time of scheduling is 1 h, and the initial pipe storage of the gas network is set as 1000 kcf for each pipe.Five scenarios are set according to whether flexible constraints of thermal load, pipe network dynamic characteristics, and comprehensive demand response are considered, as shown in Table 1.
Table 1.Scene setting

Analysis of scene comparison results
By comparing the scheduling schemes under five scenarios, Table 2 shows the system operation costs under different scenarios.From Table 2, the operation scheduling cost of Scenarios 2, 3, and 4 are reduced by 5.45%, 15.3%, and 32.23%, respectively, compared with that of steady-state Scenario 1.It is proved that pipe network energy storage can improve the system economy effectively, and the introduction of comprehensive demand response on this basis can further reduce the total operating cost.

Analysis of pipe network dynamic characteristics 4.2.1. Analysis of dynamic characteristics of gas network
In Scenarios 1 and 3, the gas load is directly provided by the gas source, and the two sides of the source load meet the real-time balance.Due to the limited capacity of the gas source, it is easy to have an insufficient gas supply at the peak of the gas load.Scenarios 2 and 4 consider the dynamic pipe storage of the gas network.The gas network can transfer the peak gas load through pipe storage, that is, natural gas is stored in the low gas load period and released in the peak gas load period so that there will not be a large reduction of natural gas.Figure 1 shows the air source reduction for Scenarios 1 and 3.As can be seen from the figure, the natural gas reduction in Scenario 3 considering the heat network dynamic is even higher than that in the steady-state scenario.This is because Scenario 3 takes into account the dynamic characteristics of the heat network and decouples the electrical output and thermal output of the CHP unit.Compared with Scenario 1, the CHP unit only needs to meet the heat load demand in real-time.In Scenario 1, the CHP unit can generate electricity to supply the power load to the maximum extent during the peak load period.As a result, more natural gas is consumed at the source side, resulting in greater natural gas load reduction.
Figure 1.Comparison of gas load reduction.

Analysis of dynamic characteristics of heat network
Scenarios 3 and 4 consider the heat network dynamic characteristics, as shown in Figure 2. Due to the time-delay characteristic, the heat energy can be buffered in the pipeline for a certain time.The heat energy can be stored at night and released during the day.To a certain extent, the hard constraint of "fixing power by heat" of the CHP unit can be lifted, the translation of the energy supply curve can be realized, and the system operation flexibility and the wind power absorption ability can be improved.According to the above analysis, a comprehensive consideration of the dynamic characteristics of the two networks can effectively improve the flexibility and reliability of the electric thermal energy comprehensive system.

Comprehensive demand response effect analysis
A comparative analysis of Scenarios 4 and 5 shows that the total cost decreases by 12.37%, which proves the effectiveness of comprehensive demand response in reducing the total cost of system operation.The system tends to increase the price of electricity in the peak period of load and reduce the price of electricity in the low period of load.However, due to the mutual elasticity coefficient in the elastic matrix of electricity, demand and price are not simple single-period correlations.Therefore, simply reducing the trough price and increasing the peak price cannot achieve the purpose of optimizing the system operation.A reasonable increase of part of the off-peak electricity price can drive users to use energy in the lower off-peak hours in the adjacent periods, while a reasonable reduction of part of the peak electricity price can drive users to transfer the more peak energy demand in the adjacent periods.

Conclusion
Aiming at the day-ahead optimization problem of dynamic characteristics in the integrated energy system, this paper considers the coupling characteristics of electricity, heat, and gas.It carries out dynamic modeling for the integrated energy system.It proposes the day-ahead collaborative optimization model of integrated energy and draws the following conclusions.(1) Considering the dynamic characteristics of the gas and heat network in the algorithm, the flexibility and economy of the system can be better improved.(2) Collaborative optimization of the comprehensive energy system can more accurately reflect the operating conditions of the system and ensure the safety of the system operation.(3) The comprehensive demand response can effectively improve the economy of the system, indicating that the optimization model can effectively reduce the system operating costs and promote the consumption of clean energy.

Table 2 .
System operating cost