Methods and models of optimal managing of district heating systems with prosumers

The paper presents a statement of the problem on load distribution in the district heating systems with prosumers. The research suggests a bi-level model for solving this problem to determine an optimal balance between the load of district heat sources and prosumer-owned heat sources. The case study results obtained by using the developed methodology are presented. The potential economic effect of the prosumer adoption under specified conditions is demonstrated. The conclusions and directions for further research are formulated.


Introduction
Intensive development of energy and information technologies affected greatly the theory of energy system design.The key principles of this theory are integration of different generators, transition to intelligent systems (i.e.capability of a system to generate and implement decisions based on the forecast and analysis in combination with self-learning), and an increase in the participant of the consumer in energy supply.
The latter principle is implemented within the prosumer (producer-consumer) concept.The functions of prosumers are regulation and optimization of their demand to enhance the efficiency and reliability of both the consumer itself and the entire energy system.Prosumers have their sources and energy storage devices that allow them based on the balance between their needs and capabilities to vary the amount and properties (reliability, losses, quality, etc.) of the power received from the system.
Theoretical and practical studies on the prosumer are conducted by researchers in many countries.The investigations to be emphasized are presented in [1][2][3][4][5][6][7].They are focused on various aspects of prosumer operation and control within power supply systems.In [8,9] the authors consider some issues of prosumer operation in the district heating systems (DHS).
Based on the analysis of publications on the prosumer topic, which is part of a more general theory of the establishment of intelligent and integrated energy systems (Smart Grid), we can conclude that almost all these investigations concern electric power systems.At the same time, these technologies are also relevant for DHS which are the largest fuel consumers, especially in Russia, where fuel consumption for heating needs exceeds 45% of the total fossil fuel consumed in the country.
One of the main goals of involving the prosumer (hereinafter we mean heat prosumer) in the DHS is to enhance the efficiency and cost-effectiveness of system operation by managing optimal distribution of sources supplying heat loads.The methodological problems which need to be solved to achieve this goal are various and traditional for energy systems on the whole and DHS in particular.The involvement of prosumer in the DHS, however, brings about new aspects in these problems and calls for new methodological approaches to solve them.The development of these methods is a subject of the presented paper.

Bi-level model of DHS managing with prosumer
Management of DHS with prosumer implies distribution of heat load among system district heat sources (HS) and local HS that belong to prosumers, according to some criteria providing the required (anticipated) parameters of system operation.The inclusion of prosumers with their HS into the DHS changes the organizational model of the system operation.Thus, the need arises to consider the control at two levels: from the viewpoint of district DHS (system level) and from the standpoint of the prosumer with their generation (prosumer level).
Mathematically, the problem of the management of DHS with the prosumer is solved by the bi-level programming methods [10][11][12].
The management structure of DHS with the prosumer is based on the hierarchical two-level approach and is as follows.At the first level, we solve the problem of cost minimization for the prosumer.This problem represents a sum of heat purchase costs and heat production costs of the prosumer-owned HS.The second level of management corresponds to the system for which the problem of profit maximization is posed.The profit is defined as a revenue from selling the heat produced at district HS less its production costs.
The DHS and prosumer interact as follows: 1) The prosumer submits a bid for the amount of heat it needs; 2) The system submits a price offer obtained according to its purpose of profit maximization; 3) The prosumer chooses an optimal distribution of loads for their supply from the system (by district HS) and by its own HS according to its purpose of cost minimization and makes a bid for the load again.
In this cycle, an equilibrium that satisfies both participants of the interaction is determined.
The bi-level optimization model of managing the DHS with the prosumer is formulated as follows: 1) The objective functions are: 2) Load curve of the consumer is: 3) The flow distribution model is: ; , T h x SX (6) 4) Energy flow balances are: ; , 0 o T q q J j j I i i (7) ; , , sys o T J j q q q j j j (8) 5) Constraints on variables and parameters are: ; , , 0 max T J j q q j j (10) ; , , max min T I i q q q i i i (11) ., , max τ min T J j p p p j j j (12) Here: j -heat consumer; J -set of heat consumers (including prosumers); i -district HS; I -is a set of district HS; -time instant corresponding to the number of hours with a specified load of consumers, h; T -set of time instants corresponding to the number of hours with a specified load; -part of heat load of consumer j , supplied from the system (by district HS) at time instant , GJ/h (only for prosumer); j q -part of heat load of consumer j , supplied by their own HS (only for prosumer) at time instant , GJ/h; j , j , j -coefficients of cost function of the HS prosumer j ; i q -performance of i -th district HS at time instant , GJ/h; i , i , i -coefficient of cost functions of the i -th district HS; j q o , j q o -design (maximum) heat load and the heat load of consumer j that corresponds to time instant , GJ/h; j j , -heat load irregularity factors of consumer j ; A -incidence matrix of linearly independent nodes of heat network (HN); т A -complete transpose of node-branch incidence matrix for HN; x -vector of heat carrier flow rates in the branches of the HN at time instant , t/h; q -vector of flow rates at network nodes at time instant , t/h; p -vector of nodal pressure of HN at time instant , mm wc; h -vector of head losses in the network branches at time instant , mm wc; H -vector of operating heads at the sources at time instant , mm wc; X S, -diagonal matrices of coefficients of hydraulic resistances of branches, m/(h 2 t 2 ), and absolute values of flow rates in them, t/h, at time instant ; max min , i i q q minimum and maximum value of the i -th district HS capacity, GJ/h; max j q -maximum value of the HS capacity of consumer j (for prosumer), GJ/h; max min , j j p p -minimum and maximum value of the heat carrier pressure at consumer nodes j , mm wc.Expression (3) is used to specify the load of consumer at each instant of the considered period (a heating season) based on the Rossander equation [13].Expressions (4)-( 6) represent a model of flow distribution in HN written in a matrix nodal form which is traditional for the theory of hydraulic circuits [14].Parts of expressions in (1) and ( 2) that define the heat production costs at HS are presented as quadratic dependences derived by approximating the actual data on heat production and fossil HS costs corresponding to it, by using the method of least squares.
With the methods presented in [15][16][17], the considered problem (1)-( 12) can be transformed as follows:  Thus, after the transformations, the management problem of DHS with the prosumer ( 13)-(23) represents, unlike the initial form ( 1)-( 12), a traditional problem of mathematical programming.Fig. 1 demonstrates a graphical illustration of the computational process of search for an optimal solution to the management problem of DHS with the prosumer.Fig. 1.A graphical illustration of a computational process of search for an optimal solution to the management problem of DHS with the prosumer: 1) the objective function form in a three-dimensional system of coordinates; 2) a projection of the objective function plot to the plane of coordinates of heat loadings of sources and the solution search procedure.
The spatial view of the objective function is presented in Fig. 1-1 and its projection on the system of coordinates of heat loads of the sources -in Fig. 1-2.Elliptic lines in this diagram are isocost lines, i.e. the lines of equal costs, the dotted line A-B-C-D-E-* q corresponds to a step-by-step procedure of search for a solution.The formulated problem is solved by the coordinate descent method with a simple iteration within the cycle to reduce the multidimensional optimization problem to one-dimensional one with a step-by-step procedure for improvement in solutions according to the heat production output by all the sources.

Case study and an analysis of results
Consideration is given to DHS scheme presented in Fig. 2-1.The scheme consists of two district HS (HS1 and HS2), seven consumers (nodes 1-7) and a looped HN consisting of 18 sections.One of the consumers is a prosumer (P6) with a load of 400 GJ/h, and a HS with a capacity of 200 GJ/h.The technical characteristics of the HN components, loads of consumers and capacities of HS are presented in Table 1.
HS1 supplies heat to P6 according to the hydraulic calculation of the system.Therefore, the problem of optimal management of heat source load distribution is solved at the level of interaction between these entities.Fig. 2-2 demonstrates a scheme of their interaction.Fig. 2. Test study of the heating system: 1) an aggregate scheme of the heating system; 2) a two-level scheme of interaction between the prosumer (P6) and heat source 1 (HS1).
According to the management model presented in the methodological part of the research, search for an optimal (corresponding to the minimum costs) choice of the sources supplying heat to the node P6 is performed for each time instant within the heating period that lasts h 6000 T .The HS of prosumer P6 is assumed to operate on fossil fuel.For this HS, we specify a quadratic cost function which is part of the objective function (1)  Table 2 presents the optimal loads of HS in the considered DHS scheme for prosumer P6 during the entire heating period with a step of 1000 h.These data are illustrated in Fig. 3 where diagram 1 shows the heat load curves of P6 with highlighted amounts of heat generated by HS1 and HS of P6.Diagram 2 presents the graph of costs of heat supply to P6, that are calculated for the cases with and without involving the HS of P6 in its heat supply.According to Fig. 3-1 and Table 2, the HS of P6 operates during the time of consumer peak loads and supplies heat in the amount of about 180,6 GJ/h (which corresponds to the maximum load of the consumer).
Further, its load is reduced, and by the time corresponding to 2000 h, becomes equal to zero.The total heat consumption of P6 during the heating period is 1026.5 thousand GJ, including 890,7 thousand GJ (86,8%) from the district HS1, and 135.9 thousand GJ (13,2%) -from its own HS.Fig. 3. Solution to the load management problem for the test scheme of heating system with prosumer: 1) optimal load of P6-owned HS and HS 1 during the heating period, 2) a graph of heat production costs for P6.
The economic effect due to the operation of P6 HS can be seen in Fig. 3-2.Its value corresponds to the area of a figure limited by two graphs of heat supply costs of prosumer P6: 1) -disregarding its heat source (heat is fully supplied from HS1), and 2) -considering it.Thus, the total costs over the heating period without the HS of P6 made up 283.5 million rub, and with it -262 million rub.Therefore, the economic effect due to the use of the prosumer HS made up 21.6 million rub or 7.6%.

Conclusion
The relevance of studies on heat prosumer is explained by the objective problems in heat supply, that are related to low cost-effectiveness of operating DHS, insufficient quality and reliability of heat supply to consumers, particularly now when the technologies develop and loads increase.
This research states the load management problem of DHS with prosumer.Solving this problem is aimed at cost-effective distribution of HS to supply heat to consumers both from district HS and from prosumerowned HS.A mathematical tool of bi-level programing is used to solve this problem because it defines most E3S Web of Conferences 25, 02008 (2017) accurately the organizational model of interaction between the system and prosumer.Additionally, the methods of the theory of hydraulic circuits were applied.
The results obtained in the calculation of DHS scheme show the operability of the developed mathematical model and possibility of gaining the economic effect owing to the use of a prosumer-owned HS.The case study demonstrates that the application of the prosumer-owned HS is most effective during peak demand.The economic effect obtained in the test calculations is not final to substantiate the prosumer involvement in the operation of the existing DHS.Further research in this area will provide a more informed assessment of the effectiveness of prosumer adoption in district heating.
The research was performed at Melentiev Energy Systems Institute SB RAS under the support of Russian Science Foundation (Grant №17-19-01209).
of the second level (system), rub; h j c τ -heat price for consumer j at time instant , rub/GJ; sys τ j q

F
-objective function of the first level, determined at time instant , rub/h; h i c τ -price of heat generated at the i -th district HS at time instant , rub/GJ.

Table 1 .
Technical characteristics of components of considered heating system scheme (corresponding to scheme on Fig.1)

Table 2 .
Optimal distribution of sources to supply heat to P6 during heating period