Prosumers strategy for DHC energy flow optimization

This article introduces the proposal of discrete model of district heating and cooling system (DHC) for energy flow optimization. The aim is to achieve the best solution of the objective function, usually determined by minimizing the production and distribution costs and providing meets the needs of energy consumers. The model also introduces the idea of general prosumers strategy, where all active elements within the modern DHC system are representing by prosumers object. The prosumers are perceived as objects able to actively participate in the planning of production and consumption of energy. It is assumed that the general behaviour of the object in DHC is the same, no matter how they differ in sizes and designs. Thus, all the objects are defined by two characteristics the ability to produce and consume. The model based on this basic principle, of course, with the most accurate information about the particular values at a time, object properties and other, should provide tools for simulation and control of modern DHC, possibly superior units as Smart Energy Grids understood as a system integrating Smart Grids (electricity) and Smart Thermal Grids (heat a cool).


Introduction
At present, the primary goal of sustainability and efficiency in the field of energetics is to lower consumption of primary energy. The main obstacles to these goals are mainly technical capabilities and the economic performances of individual countries [2]. However, if the countries want to behave ecologically and foresight into the future, they must seek these goals.
An effort to saving also means the introduction of new technologies and principles. In the area of district heating and cooling variety of producers grows, smaller and usually more ecological sources are involved, for example geothermal, solar, wind sources, industrial waste heat recovery, etc. [10][11][12]. Also role of consumers is more important, because only mutual cooperation of all DHC elements can bring the expected benefits [4,8]. These upgraded and improved technologies require support from new and intelligent approaches in control. However, the modern concept of control cannot be understood only as an algorithm implemented in a specific object, but the entire hierarchy in which objects collaborate to achieve common goals. On the other hand, such a large and often disparate systems as DHC is not appropriate to centralize. It seems better to distribute the competence and ensure cooperation.

The requirements of the energy sector
The interest in all modern countries in the field of energetics is to behave ecologically and use its resources as effectively as possible.

European Union's energy policies
The European Union's energy policies are driven by three main objectives: x secure energy supplies to ensure the reliable provision of energy whenever and wherever needed, x ensure that energy providers operate in a competitive environment that ensures affordable prices for homes, businesses, and industries, x energy consumption to be sustainable, through the lowering of greenhouse gas emissions, pollution, and fossil fuel dependence EU has formulated targets for 2020, 2030, and 2050.Each target quantify the environmental benefits and the expectations are not small, for example, the EU aims to achieve an 80% to 95% reduction in greenhouse gasses compared to 1990 levels by 2050 [2].

Energy efficiency
By using energy more efficiently, Europeans can lower their energy bills, reduce their reliance on external suppliers of oil and gas and help protect the environment. Energy efficiency has to be increased at all stages of the energy chain from generation to final consumption. At the same time, the benefits of energy efficiency must outweigh the costs, for instance those involved in renovations [2].
Energy efficiency has a fundamental role to play in the transition towards a more competitive, secure and sustainable energy system with an internal energy market at its core. While energy powers our societies and economies, future growth must be driven with less energy and lower costs.

District heating and cooling
Fill stated targets means to promote and implement many changes at all levels of management of energy, however this article primarily focuses on the area of heat and cold supply, therefore it is necessary to mention a DHC area -District heating and cooling systems need to be more efficient, intelligent and cheaper. It is necessary to develop and deploy intelligent systems using smart metering and control solutions for optimization and consumer empowerment and exploiting multiple energy resources, including waste heat recovery, heat pumps, thermal storage, cogeneration and renewable energy integration, and to roll-out solutions for the integration of intelligent thermal network with smart electricity grids [2, 6,7]. Achieving these goals requires a fresh new look at the way the production, distribution and consumption. This involves expand and improve existing concepts. It is necessary to move into the next generation of understanding of district heating. This generally means to shift into the 4th generation of District Heating.

3.1The 4th Generation District Heating
The 4th Generation District Heating (4GDH) system is defined as a coherent technological and institutional concept, which by means of smart thermal grids assists the appropriate development of sustainable energy systems [4]. 4GDH systems provide the heat supply of low-energy buildings with low grid losses in a way in which the use of low-temperature heat sources is integrated with the operation of smart energy systems. See figure1. The concept involves the development of an institutional and organizational framework to facilitate suitable cost and motivation structures [1].
In the context of the 4th generations, we can also talk about Smart Thermal Grids or in combination with electric power is also used term Smart Energy Grid.

Prosumer definition
Generally the term prosumer encapsulates the meaning of words proactive producer and consumer. The originator of the phrase "prosumers" is considered futurist Alvin Toffler who coined this phrase in his 1980 book, The Third Wave. The original meaning was "people who blurred the line between consuming and producing by actively collaborating to improve or design the goods and services of the marketplace, transforming it and their roles as consumers" [9].
A deeper look of this definition shows that it describes well the role of the prosumer in Smart Energy (Thermal) Grids and DHC, where the prosumer can be generally characterized as unit able to produce thermal energy, but also consume (hence the term producerconsumer). An example might be modern buildings (active or zero), which in bad weather conditions consume energy from external sources (behave as consumers), but most of the time the energy they produce, are themselves unable to consume and may offer it to other network elements. Their active collaboration improves functioning and increases efficiency of the entire energy network.

Consider DHC in which distribution network interconnect N elements -prosumers.
To analysis processes in the production, distribution and consumption of thermal energy in such DHC, which can be characterized as dynamic, rather complex and complicated system, are preferably used modelling techniques. This article is devoted to the formulation of one of the possible models, in the form of a mathematical model applicable for the description and examining behaviour of such DHC system. This model is designed and built in order to optimize production and distribution of heat in accordance with the desired demand (consumption). The model is designed in accordance with the modelled system as a distributed and discretized. Distributed approach will be implemented in holonic structure.

Distributed -holonic system
As already mentioned, the model as well as real DHC system is understood as distributed. For controlling of such systems is useful to use also distributed manner, for example holonic approach. In general comprehension, it can be understood as a form of multi-agent control, but it is necessary to respect some of its specifics [3,5].
Holon, in this context, could be defined as an autonomous and co-operative building block of the system for transforming, transporting, storing and/or validating information and physical objects. The holon consists of an information processing part and often a physical processing part. A holon can be part of another holon. It is also possible to see it as a model of a particular element, i.e. part of the model of the entire system. In this sense is holon used in this article.
The internal structure of holons can be made up of a group of other holons, which can be described as "subholons". Any such subholon is, of course, full holon. This allows a very flexible way to define entire holonic system. The most important features of holon are autonomy and co-operation. Autonomy is characterized by its ability of self-regulation, i.e. the capability to apply the flexible strategy which allows holon to respond differently to changes in its relevant environment [5].

Prosumers concept
For the purpose of modelling processes in DHC in the production, distribution and consumption of heat presented in this article can be as prosumer identified also element that can be used either just as a source of thermal energy or only as an consumer (without production). Such kind of elements are usually termed by other names -on the one hand local sources or even heating plant, formerly acting as a central source of heat, on the other hand classic heated buildings -residential, office buildings and others.
When a certain (higher) level of abstraction is applied prosumer tag may be given also to other DHC elementto thermal energy storage (accumulator). This is because at a certain time it acts as a consumer -receives and stores heat, at another time it acts as a source -stored heat can deliver to the grid. From the above follows that the characteristics of the processes of production and the heat consumption in various types of prosumer may vary considerably or their proactive role may not be obvious. However, this is not a significant problem in the proposed holonic model, where the individual prosumers will be modelled by different types of holons.

Formulation of the distributed model of DHC
This chapter describes the two fundamental components of the proposed model of DHC -set of prosumer and distribution network. For all the elements are described their characteristic attributes which further specify their properties relevant for the modelling and analysis of DHC behaviour. Proposed description of the modelled system was shown in figure2 and will be explained in detail in the following paragraphs.

Prosumers role
Mark as PRSMi each prosumer in the system, where i = 1, 2, ... N. Each PRSMi is characterized in relation to the analysed processes of production, distribution and consumption of heat with a number of attributes that can be divided into two groups -producer attributes and consumer attributes.
Most of these attributes are function of time. First should be declared one general remark regarding this fact. Discretization of the model over time is achieved by providing the necessary data for example in the form of a table of values for a suitably selected time interval TI. These values then in TI remain constant or can be interpolated using linear function (complex interpolation function is also applicable, but due to the accuracy of the entire model inadequate) 1. Producer attributes -for PRSM i it is necessary to know the following: a. Performance data for each source as a function of time t and any other parameters, referred to as a vector PP (production parameters). They are specific for the process of heat production in a given source and affect produced quantities -for example the intensity of sunlight at the solar source, the intensity of the wind for wind turbines, etc.
x P min (t, PP) -minimal supplied power x P opt1 (t, PP) -lower limit of the optimal power supplied range x P opt2 (t, PP) -upper limit of the optimal power supplied range x P max (t, PP) -maximal supplied power b. Price data of the supplied energy for each source, again as a function of time t and any other parameters referred to as a vector PP x c min (t, PP) -price in the range of supplied power <P min , P opt1 > per unit of energy supplied x c opt (t, PP) -price in the range of supplied power < P opt1 , P opt2 > per unit of energy supplied x c max (t, PP) -price in the range of supplied power < P opt2 , P max > per unit of energy supplied

Consumer attributes
Data on the required consumption of each consumer as a function of time t and any other parameters CP (consumption parameters) x D min (t, CP) -minimal required energy x D opt (t, CP) -optimal required energy x D max (t, CP) -maximal consumed energy

Distribution network
Another important part of DHC and therefore its model is distribution network. It connects individual prosumers and allows the transfer of thermal energy between them in a desired direction and time varying quantities. The distribution network is characterized by a topology which is generally very stable and varies, if at all, only in very specific points in time -the physical reconstruction of the network, connecting or disconnecting certain prosumer etc.
The data required to model the distribution network are stored in the following structures: x Sections of the distribution network. The entire distribution network is divided into individual sections -the set of the K sections U k , k = 1, 2, ..., K. For each section is determined its "distribution capacity", i.e. the amount of the thermal power PU k , which is the given section able to transmit. In general it is contemplated that the size of the transmitted power PU k is dependent on the time t and any other parameters specified in vector DP (distribution parameters), so PU k (t, DP). In practical conditions the value PU k will be constant in most cases.

Optimization of energy flow in DHC
Model specified in the previous section is used to find the optimal distribution of energy flows between the individual prosumers to satisfy their consumption demands and apply the most efficient use of production capacity of each prosumer (as produced). There should be highlighted that the solutions are being sought for dynamic system, i.e. these energy flows are changing over time. Result (solution) is captured in the matrix X(t) = {x ij (t)}, which has a similar structure as the matrix R. The value of x ij (t) is the amount of energy transmitted from the supplier to the consumer j (at time t) (x ij (t)>= 0). The solution will satisfy the condition of minimum objective function. That is, in this case the value of the total cost CF which is calculated as sum of cost CP to produce and the cost CT to transfer whole needed amount of heat energy between prosumers for the entire time period of heating, thus If the time interval TI is divided into M particular time intervals identified as ‫ݐ∆‬ = ‫ݐ‬ ାଵ − ‫ݐ‬ , ݇ = 1, 2, … , ‫,ܯ‬ the equation for the production costs is here c i (t) are costs (the cost of one unit of heat energy producing in source (prosumer) i in the corresponding time interval Δt k .
Similarly, for transportation (distribution) is obtained equation where cd l (t) are the cost of the transport of energy unit through route l -their tag (index) is stored in matrix R.
Obtained solutions X must fulfil the following conditions: x Producers must not exceed its maximal performance, i.e.
for each ݅ and ‫ݐ‬ in whole ‫ܫܶ‬ x The produced power should vary inside of the optimal area, i.e.
for each ݅ and ‫ݐ‬ in ‫ܫܶ‬ x Customer requirements must be met, i.e.
for each j and ‫ݐ‬ in ‫ܫܶ‬ x Consumable energy of consuming prosumer must not be exceeded, i.e.
for each j and ‫ݐ‬ in ‫ܫܶ‬ x Power consumption should be close to optimal, i.e.
for each j and t in TI x The energy flow through each section of distribution net must be lower as its "distribution capacity". If the energy flow for route l is where ߜ = 1 ‫ݎݎ݂‬ = ݈ܽ݊݀ߜ = 0 ‫ݎݎ݂‬ ≠ ݈ ≤ ܷܲ ݇ for ݇ = 1, 2, … ‫ܭ‬ (10) An example of the solution matrix for the sample topology presented in Figure 3 is shown below.
Note: Diagonal matrix elements indicate prosumer part of production to cover its own needs. If there is higher production, the surpluses are offered to others. Nonexistent connections are indicated by zero. .

Proposal for the solution of the scheduling of energy flow
The purpose of the proposed model is its use for solving the optimal allocation of energy flows in modern conceived DHC systems. As shown in chap. 5 and 6 of this paper, proposed model represents the relatively complicated mathematical structure whose solution using analytical techniques would be very difficult, if not impossible. Moreover, it should be noted that, as already mentioned, it is a dynamic system in which the processes are running in real time. Also the relevant environment of DHC and its influence is constantly changing. It is therefore expected that the used computational algorithms must be simple enough to allow repeat the calculations in a sufficiently short time period. The issues defined in previous equations belongs into the category of tasks that are generally involved in the planning of production or services with a limited set of constrained resources (employees, assets, time and money). Usually the aim is to optimize such planning to do more business with less resources. This is known as Constraint Satisfaction Programming (which is part of the Operations Research discipline).
An example might be a job shop scheduling in manufacturing system, where can be used as optimize goals minimum manufacturing costs, minimal work in process (WIP) or maximum machine utilization. In the production can be used only limited manufacturing resources (employees, machines, manipulators etc.) and a number of constraints must be respected (length of work shifts, succession of scheduled operations, etc.) This type of task falls into the class of so-called NPcomplete or Harder problems. NP-complete problem means: • It's easy to verify a given solution to a problem in reasonable time.
• There is no silver bullet to find the optimal solution of a problem in reasonable time.
To solve such tasks usually means to define a function (target or purpose function). Very often this function is defined in economic terms as a cost function that calculates the necessary cost for given solution. A solution is determined by set of, mostly integer, parameters which characterize the process. If the values of parameters are such, that the restrictive conditions come true, the solution is defined as feasible solution. It is usually possible to find it by a heuristic method. However, very difficult is to find the optimal solution. Such solution is characterized in that the selected target function for it acquires its most extreme, usually minimum value.
Theoretically, it is easy to find the optimal solution by calculating all the possible variants and determine if it is a feasible solution. For feasible solution calculate the value of the target function and choose the one in which reaches the target function extreme value -it is so called the Brute Force algorithm. It is clear, however for the larger scheduling task the amount of possible variants is huge and this method is not due time requirements practically applicable.
In our case, when the parameters (transferred thermal power or amount of heat energy) are not integer values, the situation is more complicated becausethe number of possible variants can grow beyond all bounds. Thereafter the only possible way is to find a suitable procedure based on the heuristic methods and tries to find in reasonable time the solution, which is good enough, because there is in general unfortunately not guarantee finding the optimal one.

Methods
Searching the best variant of scheduling energy flows will be designed as a suitable procedure based on the set of heuristic methods. Methods will be developed to explore feasible solution. Such methods may vary either by using different algorithms, or, in case that the used algorithms are parametrized, only vary the values of those parameters. The search process then proceed in a way that successively, by a suitable mechanism, will individual heuristics methods propose their solutions and the best result will be sought -evaluation will be performed using the chosen target function. The mechanism to prepare sequence of used methods can be established on the basis of the results obtained previously and of course, it can interfere with human -the dispatcher. The search progress will be stopped after a predetermined time and selected the best of the calculated variants.
The first heuristic method is designed as parameterized method "to satisfy the demands according to the volume (quantity)" -Highest Demand First (HDF) HDF has two parameters: x red, percentage reduction of demand D j of heat supply for consumer j . For this reduced demand is looking for suppliers in one step of algorithm. x D min , minimum demand, which will be not more reduced The algorithm of the scheduling method involves the following steps: x Step 1: Find the customer with the largest heat supply volume demand D j . If the requested size D j > D min , a reduced amount of this request is determined D jact = D j * red, which will be satisfied in this step, otherwise D jact = D j x Step 2: Find the suppliers who are able to meet this demand by their production P i . This means that the requirement D jact splits into increment corresponding values of the solution x ij . The order of selection of suppliers is carried out by their costs of production and distribution of heat c ij . However, of course conditions (4), (5), (9) and (10) must be met. x Step 3: The demand D j is decreased by the size of the satisfied amount D jact . If there is any unsatisfied D j , means D j > 0, finding process continues by returning to the step 1. If all D j = 0, scheduling process is completed. It is likely that the choice of different values of the above parameters can find a variety of feasible solutions. Search for the solution, which is good enough and which may replace the optimal solutions using this method so makes sense. Similarly, it is possible to define further heuristics -Lower Demand First (LDF), Highest Production First (HPF) or Lowest Production First (LPF).

Conclusions
This paper presents a method for modelling and optimizing the flow of energy in DHC system. New trends in the field of heating and cooling systems were analysed, built the mathematical description of the problem and on that basis prepared the first version of the model. Also was shown the process for flow optimization based on heuristic methodsHowever, the ideas presented in this paper is still under development and will be further improved and tested with real data to verify the proposed methods and principles.