Estimating the cost of heat generation and consumption in district heating systems

The pricing of thermal energy is an important component of the efficient operation of the heat supply system. The article deals with the calculation of the cost of heat for consumers and producers of heat as based on the optimization problem of operation modes of the heat supply system with its further reduction to the conditions of optimality. The latter is to be achieved on the basis of the Lagrange function, with undetermined Lagrange multipliers obtained in the calculation process to be interpreted as nodal (marginal) prices of heat. This approach allows one to determine the pricing at each node. Based on the calculation of nodal prices of heat we determine the cost of heat transportation. Backed by the methodological tools developed, we have performed a demonstration of the calculation of nodal prices of heat and developed an algorithm for calculation of nodal prices of heat generation and consumption and overall technical and economic performance indicators of the heat supply system.


Introduction
Changes in the political and economic structure of Russia since the early 1990s were bound to influence the energy industry.For a decade and a half, institutional changes were taking place in the industry, and the pricing system was undergoing change.The right to regulate tariffs for electricity and heat supplied to consumers in the regions was conferred to the regional authorities that as a result made the financial standing of energy companies dependent on such authorities.As for tariffs, throughout the 1990s and early 2000s, the main objectives of the state economic policy included curbing high inflation.Therefore, electricity and thermal tariffs, as a rule, were understated compared to the economically justified level.
The adoption of the Federal Law "On Heat Supply" was a way out of the situation of the grave crisis in which the Russian heat supply industry found itself.This led to a solution to the problem of the lack of a regulatory framework, which began to govern the relations arising as a result of the production, transmission, and consumption of heat.
By combining all functions related to heat generation, transportation, and sales within the framework of the "Unified Heat Supply Organization" (UHSO), control over heat sources (HS), distribution, main, and district heating networks, reduces economic and technical risks, as well as stabilizes system reliability, thus forming a structure where the UHSO is a monopoly.
At this stage of market operation, financial profitability is achieved by minimizing the cost of meeting consumer demand by the amount of heat generation availa-ble in the free trade sector considering possible consumption projections and heat supply state data while complying with the reliability criteria [1].
The intricacies of the market with regard to pricing are reflected in the concept of "nodal price".It estimates the cost of heat at a particular point in the heat supply system considering the configuration of the network and the constraints encountered in the production and generation of heat.
To calculate the nodal prices, we propose to use the method of Lagrange multipliers based on the steady-state operation mode optimization problem in the heat supply system, which, given balance constraints (the first Kirchhoff law), are construed as nodal prices.
Several approaches to the determination of nodal prices are known [2][3][4].The application of the Lagrange multiplier method is found to be most frequently used to determine nodal prices [5][6][7][8][9][10][11][12][13] in the electric power industry.At the same time, this approach is relatively new in heat supply.Lagrange's method of undetermined multipliers is used as a tool to optimize the operation mode and determine the prices that will serve as an incentive to maintain the optimal operation mode.
The question of the relevance of the transition to nodal prices is based on the fact that in solving the problem by this method one establishes the necessary conditions that allow identifying the optimum points in the problems with constraints [14].In this case, the problem with constraints is transformed into an equivalent problem of unconstrained optimization, which involves some unknown parameters, the so-called Lagrange multipliers.
When modeling the interaction between producers and consumers of heat, it is assumed that the heat market has a nodal structure and lends itself to modeling as a hydraulic circuit consisting of m nodes (vertices) and n branches.The structure of a hydraulic circuit is described by a complete coupling matrix, in which the number of rows coincides with the number of nodes and the number of columns coincides with the number of branches.The paper proposes to use the approach [14] of the Lagrange multipliers properties of the problem of optimization of steady-state operation modes of electric power systems.To this end, we consider the dependence of the nodal price on price bids and parameters of the optimal steady-state operation mode, so as to calculate nodal prices of heat based on the optimization of operation modes of the heat supply system (HSS) with its further reduction to the optimality conditions based on the Lagrange function, while the undetermined Lagrange multipliers, obtained in the calculation process, will be interpreted as nodal (marginal) prices of heat.
Thus, to proceed to the determination of heat nodal prices, it is sufficient to state the problem of finding the optimal operation modes in the HSS with respect to an economic performance criterion, namely that of finding the minimum total costs of generation and transportation of heat in the HSS: where Total j Z -total cost of generation and transportation of heat through the network; ) ( HS HS -the cost of heat production by the jth heat source, rubles; HN Z -the cost of heat transportation, rubles; A -incident matrix (m-1) of linearly independent nodes and n branches; ) ,..., ( In real practice, depending on the available information and the purpose of calculation, the segments resistances can be determined in different ways: 1. Based on testing data; 2. Based on setting the roughness coefficient and detailed consideration of all local resistances (gate valves, compensation devices, etc.); 3. Approximately, using the values of equivalent lengths of local resistances assumed as per reference handbooks; 4. Based on given values of specific resistances for different inner diameters, lengths, and roughness.
When calculating the cost of heat generation and consumption, the determination of the resistance of the segments is carried out on the basis of item 4.
According to [15], the resistances of the heat network segments are determined by the Prandtl-Nikuradse formula: where Specific resistance of the heat network is determined as per formula (5) [16]: where i  -the hydraulic friction factor, p -958.4 kg/m 3 , water density, i d -the pipeline diameter, m.The hydraulic friction factor is determined by formula (6): where i k is roughness, m.Substituting expressions ( 5) and ( 6) into (4), we obtain the initial formula for calculating the resistance of a segment of the HN relative to its technical performance characteristics: Since A is the incidence matrix of the directed graph, then by virtue of the Fredholm theorem [2] the system of linear equations (2) that captures the equality of the total inflows of heat to the total consumption of heat at each node, is solvable if and only if i.e., when the total demand for heat is equal to its total supply.Consequently, the compatibility of condition ( 2) is equivalent to condition (8), and condition ( 8) is equivalent to the following condition: The cost of heat generation by HSs can be expressed as a function of the amount of heat they generate, which includes both variable (fuel) and fixed (maintenance) costs.The derivation of the production cost function by heat sources is non-trivial because each type of installed equipment, available there, has its own characteristics and is described by the corresponding mathematical expressions.As the input information, we take standard characteristics of the main equipment as presented by its manufacturers or the results of testing.
The available experience in processing data on heat sources has shown that the best fit of the cost function to their real-life data can be obtained when it is set in the form of a second-order polynomial [16], rub.: where j α , (EUR(GJ/h) 2 ), j β , (EUR./(GJ/h)), where f = 0.075 -the share of semi-fixed and operating costs for the network; ) ( i i d k -specific capital expenditures for the ith network segment in accordance with the standard value of its diameter i d , as well as conditions and type of laying; i l -length of the ith network segment, э C -electricity price, EUR./kWh; η -pumping unit efficiency, %.The calculated specific capital expenditures for the existing network segments are determined as per the analytical dependence [18]: where i a , i b , i u -approximation coefficients for numerical values of the per-unit cost of laying pipelines of different diameters. The change in the diameter of the pipeline of the heat network when one changes the water flow rate and the value of the head is determined by the Shifrinson formula [17], and is of the following form: (13)   where i χ -the coefficient that depends on the degree of roughness of the inner surface of the pipe; i ω -the share of local losses; i l -the length of the branch, m.
In view of the above, the dependence of the estimated costs of the existing segments of the heat network takes the following .η 7 , 362 The problem (1)-( 3) is a description of the steadystate operation mode in the HSS, given the optimal distribution of the heat transfer fluid in heat networks and the optimal volume of heat generated by heat sources.To reduce the dimensionality of the problem (1)-( 3), it is necessary to substitute the variables by substituting expression (3) into the heat networks cost function (14).Thus, the problem of optimizing operation modes in the HSS is written down as follows:

Algorithm for calculating the cost of heat in the HSS
Let us proceed to the study of the problem (2) -( 4).Let us first write down the necessary conditions of optimality, which in this case are also sufficient conditions.Since the constraints (3) are linear, the problem (2)-( 3) is regular [1, p. 175] and the Lagrange function is of the form: ).The vector of the Lagrange multipliers i  corre- sponds to the equality constraints (12) written in the form of Q Ax  .The optimality conditions consist of the stationarity conditions for the variables Q , λ , : To determine the variables of the total cost of heat generation and transportation, it is necessary to solve the system of equations ( 18)-(20).When solving a system of equations, the variables that are dual with respect to the constraints are also determined.The vector of undetermined Lagrange multipliers T m 1 ) λ ,..., (λ λ  to the constraints (2) on the material balance at the HSS nodes includes equilibrium prices of heat generation by heat sources and equilibrium prices for all heat consumers.The proposed approach is implemented in the form of the corresponding algorithm shown in Figure 1.This approach makes it possible to determine the optimal flow distribution in the heat network, the optimal distribution of loads between heat sources and their corresponding costs as well as nodal prices of heat generation and consumption.It allows modeling heat supply systems of any scale and capacity and take into account different types of heat sources.

Application of the method developed
As an example of the implementation of the methodology developed, we presented a scheme of the heat supply system consisting of 15 segments and 12 nodes.Heat consumers are nodes 2, 3, 4, 5, 7, 8, 9, and 10 nodes with fixed loads, and heat sources are nodes 1, 6, respectively.Modeling of the heat supply system shown in Figure 2 was performed in the "GAMS" (General Algebraic Modeling System) computational environment.The key estimated technical and economic performance indicators are presented in Table 1, and the nodal prices for consumers are given in Figure 2. The total load set at the consumer's side was 5 828 3 GJ/h.The amount of heat generated was divided by 3 009 GJ /h (HS 1) and 2 819,3 GJ /h (HS 2), the prices of heat generation were 2,55 EUR /GJ and 2,51 EUR /GJ for HS 1 and HS 2, respectively.Expenses for generation and transportation of heat amounted to 17 068 EUR, as shown in Table 1.

Conclusion
To estimate the cost of heat in district heating systems, we have proposed an approach derived from the Lagrange multipliers method and based on the problem of optimization of the steady-state operation mode in the heat supply system with respect to the criterion of the minimum total cost of production and transportation of heat, with the balance constraints (the first Kirchhoff law) factored in.We have performed the calculation of nodal heat prices for the heat supply system with two heat sources and ten consumers backed by the methodological research tools developed.As a result, we have determined the optimal flow distribution in the heat network, the optimal distribution of loads between heat sources and their respective costs, and nodal prices of heat generation and consumption.
of heat consumption at the ith branch, t/h; of heat consumption at the jth node, t/h; of pressure losses at the ith branch, meters of water column; ) ( ,...,1 n s s diag  S-a diagonal matrix of hydraulic resistances, mh 2 /t 2 ; of generation and transportation of heat through the network, the objective of the problem (1) -(3) is to cover the demand for heat, taking into account the balance constraints (2) and constitutive relations (3).

Figure 2 -
Figure 2 -Scheme of the heat supply system

Table 1 .
Technical and economic performance indicators of the heat supply system