This is a self-archived – parallel published version of this article in the publication archive of the University of Vaasa. It might differ from the original. A Market-Based Mechanism for Local Energy Trading in Integrated Electricity-Heat Networks Author(s): Haghifam, Sara; Laaksonen, Hannu; Shafie-khah, Miadreza Title: A Market-Based Mechanism for Local Energy Trading in Integrated Electricity-Heat Networks Year: 2023 Version: Accepted manuscript Copyright Β©2023 Springer. This is a post-peer-review, pre-copyedit version of an article published in Trading in Local Energy Markets and Energy Communities: Concepts, Structures and Technologies. The final authenticated version is available online at: http://dx.doi.org/10.1007/978-3-031-21402-8_9 Please cite the original version: Haghifam, S., Laaksonen, H. & Shafie-khah, M. (2023). A Market- Based Mechanism for Local Energy Trading in Integrated Electricity- Heat Networks. In: Shafie-khah, M. & Gazafroudi, A. S. (eds.) Trading in Local Energy Markets and Energy Communities: Concepts, Structures and Technologies, 241–261. Lecturne Notes in Energy, vol. 93. Cham: Springer. https://doi.org/10.1007/978-3-031-21402-8_9 1 A Market-based Mechanism for Local Energy Trading in Integrated Electricity-Heat Networks Sara Haghifam, Hannu Laaksonen, Miadreza Shafie-khah sara.haghifam@uwasa.fi , hannu.laaksonen@uwasa.fi , miadreza.shafiekhah@uwasa.fi School of Technology and Innovations, Flexible Energy Resources, University of Vaasa, Vaasa, Finland Abstract Due to the proliferation of power-to-X-to-power (P2X2P) conversion technologies across various energy systems, the sector-integration concept has gained considerable attention in recent years. In this context, to facilitate the integration of local energy systems at the distribution level and take advantage of their provided privileges, the development of an efficient and pragmatic market-based mechanism is required. Hence, the present chapter focuses on modeling a local energy market (LEM) framework that enables the integration of electrical distribution systems (EDSs) as well as district heating systems (DHSs) via power-to-heat (P2H) conversion technologies. The suggested LEM platform is based on a centralized one-sided auction-based energy trading process which is settled by the distribution system operator (DSO) with the objective of social welfare maximization. In the end, the raised LEM clearing model is applied on an integrated electricity-heat network (IEHN) in the presence of technical constraints of both EDS and DHS. Keywords: Local Energy Market; Integrated Electricity-Heat Network; Electrical Distribution System; District Heating System; Social Welfare. Nomenclature Acronyms CHP Combined Heat and Power DG Dispatchable Generator DHS District Heating System DSO Distribution System Operator EB Electric Boiler ED Electric Demand EDS Electrical Distribution System HD Heat Demand HES Heat Exchanger Station HS Heat Station IEHN Integrated Electricity-Heat Network LEM Local Energy Market Power-to-Heat P2H Power-to-X-to-Power P2X2P PV Photovoltaic System WT Wind Turbine Sets and Indices π‘β„Ž CHP indices 𝑑𝑔 DG indices 𝑒𝑏 EB indices 𝑒𝑑 ED indices mailto:sara.haghifam@uwasa.fi mailto:hannu.laaksonen@uwasa.fi mailto:miadreza.shafiekhah@uwasa.fi 2 β„Žπ‘‘ HD indices 𝑖, 𝑗 Set of nodes in EDS 𝑖𝑗 Indices of lines in EDS 𝑛 Set of nodes in DHS π‘›π‘š Indices of pipelines in DHS 𝑝𝑣 PV indices 𝑑 Time indices 𝑀𝑑 WT indices Ω𝐢𝐻𝑃 Set of CHPs connected to set of nodes Ω𝐷𝐺 Set of DGs connected to set of nodes Ω𝐸𝐡 Set of EBs connected to set of nodes Ω𝐸𝐷 Set of EDs connected to set of nodes Ω𝐻𝐷 Set of HDs connected to set of nodes Ω𝐻𝐸𝑆 Set of HESs connected to set of nodes Ω𝐻𝑆 Set of HSs connected to set of nodes Ω𝑃𝑉 Set of PVs connected to set of nodes Ξ©β„Žπ‘… , Ξ©β„Žπ‘† Set of return / supply pipelines in DHS Ξ©β„Žπ‘…βˆ’π΅ 𝑛 , Ξ©β„Žπ‘…βˆ’πΈ 𝑛 Set of return pipelines beginning / ending at node n Ξ©β„Žπ‘†βˆ’π΅ 𝑛 , Ξ©β„Žπ‘†βˆ’πΈ 𝑛 Set of supply pipelines beginning / ending at node n Ξ©π‘Šπ‘‡ Set of WTs connected to set of nodes Ω𝑒 Set of lines in EDS Parameters 𝑏𝑖𝑗 , 𝑔𝑖𝑗 Susceptance / conductance of line 𝑖𝑗 in EDS (ohm-1) πΆπ‘Š Specific heat capacity of water (J/g oC) 𝐻𝐻𝐷 Heat demand of DHS (kW) 𝐻𝑃𝑅 Heat-to-power ratio of CHPs π»π‘‰π‘”π‘Žπ‘  Heat value of natural gas (kWh/m3) πΏπ‘›π‘š length of pipelines in DHS (km) π‘š Mass flow rate of nodes in DHS (kg/s) π‘šπ‘…, π‘šπ‘† Mass flow rate of return / supply pipelines in DHS (kg/s) 𝑃𝐢𝐻𝑃 π‘šπ‘Žπ‘₯ , 𝑃𝐢𝐻𝑃 π‘šπ‘–π‘› Maximum / minimum generated power of CHPs (kW) 𝑃𝐸𝐡 π‘šπ‘Žπ‘₯ , 𝑃𝐸𝐡 π‘šπ‘–π‘› Maximum / minimum generated power of EBs (kW) 𝑃𝐸𝐷 Electric demand of EDS (kW) 𝑃𝑖𝑗 π‘šπ‘Žπ‘₯ Maximum capacity of line 𝑖𝑗 in EDS (kW) 𝑄𝐷𝐺 , 𝑄𝑃𝑉 , π‘„π‘Šπ‘‡ Maximum quantity offers of DGs / PVs / WTs in LEM (kW) π‘‡π΄π‘šπ‘ Ambient temperature (oC) 𝑇𝑅 π‘šπ‘Žπ‘₯ , 𝑇𝑅 π‘šπ‘–π‘› Maximum / minimum temperature of return pipelines in DHS (oC) 𝑇𝑆 π‘šπ‘Žπ‘₯ , 𝑇𝑆 π‘šπ‘–π‘› Maximum / minimum temperature of supply pipelines in DHS (oC) π‘‰π‘›π‘œπ‘š Nominal voltage (V) πœ†π·πΊ , πœ†π‘ƒπ‘‰ , πœ†π‘Šπ‘‡ Offer prices of DGs / PVs / WTs in LEM (€/kWh) πœ†π‘”π‘Žπ‘  Natural gas price (€/m3) πœ†π‘” Locational marginal price of PCC (€/kWh) πœ‚πΆπ»π‘ƒβˆ’πΈ , πœ‚πΆπ»π‘ƒβˆ’π» Electricity / heat efficiency of CHPs (%) πœ‚πΈπ΅βˆ’π» Heat efficiency of EBs (%) πœ— Maximum voltage variation (%) πœ… Heat transfer coefficient of pipelines in DHS (W/cm oC) Variables 𝐺𝐢𝐻𝑃 Gas flow to CHPs (m3) 𝐻𝐢𝐻𝑃 Output heat of CHPs (kW) 𝐻𝐸𝐡 Output heat of EBs (kW) 𝑃𝐢𝐻𝑃 Output power of CHPs (kW) 𝑃𝐷𝐺 Offer of DGs in LEM (kW) 𝑃𝐸𝐡 Output power of EBs (kW) 𝑃𝑔 Imported electricity from upstream grid (kW) 𝑃𝑃𝑉 Offer of PVs in LEM (kW) π‘ƒπ‘Šπ‘‡ Offer of WTs in LEM (kW) 𝑇𝑅 , 𝑇𝑆 Return / supply temperature of nodes in DHS (oC) 𝑇𝑅,𝑖𝑛 , 𝑇𝑆,𝑖𝑛 Return / supply temperature at inlet of pipelines in DHS (oC) 3 𝑇𝑅,π‘œπ‘’π‘‘ , 𝑇𝑆,π‘œπ‘’π‘‘ Return / supply temperature at outlet of pipelines in DHS (oC) 𝑉 Voltage magnitude (V) π›₯𝑉 Voltage deviation (V) 𝛼, 𝛽 Dual Variables or shadow prices (€/kWh) πœƒ Voltage angle (rad) 1. Introduction In recent years, a lack of fossil fuel sources and their irreversible environmental damages have led to a marked increase in the exploitation of renewable energy resources in power distribution systems [1]. Although the high penetration of renewable energies can overcome the above-mentioned challenges, the stochastic and intermittent nature of these units drives the need for flexibility in the electricity sector [2]. As one of the pragmatic and new solutions for flexibility provision at the distribution level, the coupling of different energy sectors, including the EDSs and DHSs, in the form of IEHNs has attracted more attention in the past few years [3]. To establish an IEHN via the sector- coupling concept, the presence of P2X2P, more specifically P2H, conversion technologies in the energy systems is required [4], [5]. Combined heat and power (CHP) plants [6], electric boilers (EBs) [7], and electric heat pumps (EHPs) [8] are the most prevalent P2H elements in IEHNs. In general, P2H solutions require techno-economic interactions with two local energy sectors, namely power and heat. Nevertheless, these kinds of interactions add new challenges to the optimal operation of IEHNs due to the lack of a suitable coordination platform [9]. To cope with this issue and implement sector-coupling at the distribution level, proposing an appropriate market-based framework is of great importance. Accordingly, local market-based solutions for sector-coupling have received widespread attention over the last few years. The following literature review highlights some important studies in this area: A decentralized optimization method has been raised in [10] to model a LEM for the coordinated operation of the EDS and DHS in the form of an IEHN. In the suggested framework, EDS and DHS are able to be operated independently by solving optimal power and thermal flows, respectively. A LEM has been designed in [11] to investigate the energy trading within an IEHN and in the presence of multiple strategic players. In the provided framework, locational marginal prices of electricity and heat achieved from optimal power and thermal flows have been exploited to settle the considered market. A bi-level optimization model has been presented in [12] for clearing a LEM and modeling its interaction with the wholesale electricity market. Accordingly, at the upper level, the DSO settles the LEM and determines locational marginal prices, while at the lower level, the wholesale market clearing, as well as the DSO’s interaction with this market, are specified. A linear optimization-based approach has been developed in [13] to model a LEM enabling the integration of the EDS and DHS at the distribution level. The market-clearing process has been conducted from a 4 central operator’s perspective to maximize consumers and producers’ surplus. A novel market-based platform has been introduced in [14] to couple the EDS and DHS and facilitate the utilization of P2H and storage technologies at the local level. The primary goal of this research work is to develop innovative market orders that respect energy system integration. A LEM mechanism has been suggested in [15] to provide the possibility of peer-to-peer power and heat energy trading and investigate the cooperative behaviors among peers. In this study, each peer is able to promote its own profit by determining the joined coalition and its role as a seller or buyer of heat and electricity within this coalition. In the end, a fully decentralized market-based framework has been employed in [16] that supports peer-to-peer energy trading among several price-maker agents at the distribution level. To determine the optimal strategy of participated agents in the designed LEM and improve their net profit, a linear optimization model has been utilized in this study. Due to the importance of establishing an efficient market-based environment for coupling of electricity and heat sectors at the local level, this chapter tends to model a LEM that enables the integration of EDSs and DHSs through CHPs and EBs, as fundamental P2H conversion technologies. The design of the considered LEM is based on a centralized one-sided auction-based energy trading process which is settled by the DSO with the objective of social welfare maximization. To this end, the schematic structure of the designed LEM, as well as the mathematical model for the market clearing process, are expressed in more detail in section 2. The implementation of a case study and its discussions are provided in section 3. Finally, the work is concluded in section 4. 2. Methodology As briefly mentioned in the previous section, the main purpose of the current chapter is to design a LEM for facilitating energy trading within integrated energy networks. Before delving into the mathematical model of the proposed market-based framework, its overall structure and regulations are described. In this work, the considered LEM is designed based on a centralized one-sided auction format. In this case, it is assumed that a central operator is responsible for the operation of the IEHN at a specific time through the complete exchange of energy and information among two electricity and heat sectors. Hence, in order to identify the market settlement point, all participants are required to submit their bids/offers to the LEM operator. Furthermore, it is presumed that the clearing mechanism of the LEM is according to the one-sided auction method, in which only production offers are considered in the negotiation procedure [17]. As a result, since multiple energy carriers are traded simultaneously in the presented market-based platform, each offer contains specific information, including the type of energy, quantity as well as valuation of the offer, the delivery time, and location 5 of the injected energy to the network. On the other hand, the pricing system of the LEM is uniform, in which all players are paid at the same market clearing price regardless of their submitted offers. This clearing price is set at the offer price of the most expensive supplier chosen for providing the service [18]. The schematic structure of the presented LEM platform for the integration of the EDS and DHS is illustrated in Figure 1. According to the figure, the DSO as a central operator is responsible for the LEM clearing and meeting the IEHN’s demands in the presence of both networks’ technical constraints. To this end, the DSO firstly collects offers from the existing market participants like dispatchable generators (DGs), wind turbines (WTs), and photovoltaic systems (PVs). Then, considering the locational marginal price of the PCC, as well as the operational condition of the available CHPs and EBs, this entity attempts to settle the market and determine accepted offers as well as distribution locational marginal prices for the optimal scheduling of the IEHN. The electric demand (ED) of the system is procured from DGs, WTs, PVs, CHPs, and the upstream grid, while the heat demand (HD) is procured from CHPs and EBs. Figure 1: Schematic structure of the proposed LEM framework. As stated above, the DSO as the market operator clears the suggested LEM platform with the objective of social welfare maximization [19], which is equal to the total energy cost minimization in this study. The mathematical formulation of the mentioned objective function is expressed by Eq (1). In this equation, the first term is related to the cost of imported electricity from the upstream grid. The second, third, and fourth terms are related to the marginal costs of the LEM participants. In the end, the fifth term is related to the operating cost of the CHP units. Electrical Distribution System District Heating System Local Energy Market Power Flow Heat Flow Information Flow DSO DGs WTs PVs CHPs EBs 6 𝑀𝑖𝑛 βˆ‘ {𝑃𝑔(𝑑)πœ†π‘”(𝑑) 𝑑 + βˆ‘ 𝑃𝐷𝐺(𝑑𝑔, 𝑑)πœ†π·πΊ(𝑑𝑔, 𝑑) 𝑑𝑔 + βˆ‘ π‘ƒπ‘Šπ‘‡(𝑀𝑑, 𝑑)πœ†π‘Šπ‘‡(𝑀𝑑, 𝑑) 𝑀𝑑 + βˆ‘ 𝑃𝑃𝑉(𝑝𝑣, 𝑑)πœ†π‘ƒπ‘‰(𝑝𝑣, 𝑑) + βˆ‘ 𝐺𝐢𝐻𝑃(π‘β„Ž, 𝑑)πœ†π‘”π‘Žπ‘ (𝑑) π‘β„Žπ‘π‘£ } (1) The considered objective function is subject to a set of linear technical as well as operational constraints, as follows: 𝑃𝑔(𝑑) = βˆ‘ {π‘‰π‘›π‘œπ‘š[π›₯𝑉(𝑖, 𝑑) βˆ’ π›₯𝑉(𝑗, 𝑑)]𝑔𝑖𝑗 βˆ’ π‘‰π‘›π‘œπ‘š 2 [πœƒ (𝑖, 𝑑) βˆ’ πœƒ(𝑗, 𝑑)]𝑏𝑖𝑗} 𝑗:(𝑖,𝑗) ∈ Ω𝑒 , 𝛼(𝑖, 𝑑) βˆ€π‘– = 1, 𝑑 (2) βˆ‘ 𝑃𝐷𝐺(𝑑𝑔, 𝑑) + 𝑑𝑔:(𝑑𝑔,𝑖) ∈ Ω𝐷𝐺 βˆ‘ π‘ƒπ‘Šπ‘‡(𝑀𝑑, 𝑑) 𝑀𝑑:(𝑀𝑑,𝑖) ∈ Ξ©π‘Šπ‘‡ + βˆ‘ 𝑃𝑃𝑉(𝑝𝑣, 𝑑) + βˆ‘ 𝑃𝐢𝐻𝑃(π‘β„Ž, 𝑑) π‘β„Ž:(π‘β„Ž,𝑖) ∈ Ω𝐢𝐻𝑃𝑝𝑣:(𝑝𝑣,𝑖) ∈ Ω𝑃𝑉 βˆ’ βˆ‘ 𝑃𝐸𝐡(𝑒𝑏, 𝑑) βˆ’ βˆ‘ 𝑃𝐸𝐷(𝑒𝑑, 𝑑) 𝑒𝑑:(𝑒𝑑,𝑖) ∈ Ω𝐸𝐷𝑒𝑏:(𝑒𝑏,𝑖) ∈ Ω𝐸𝐡 = βˆ‘ {π‘‰π‘›π‘œπ‘š[π›₯𝑉(𝑖, 𝑑) βˆ’ π›₯𝑉(𝑗, 𝑑)]𝑔𝑖𝑗 βˆ’ π‘‰π‘›π‘œπ‘š 2 [πœƒ(𝑖, 𝑑) βˆ’ πœƒ(𝑗, 𝑑)]𝑏𝑖𝑗}, 𝑗:(𝑖,𝑗) ∈ Ω𝑒 𝛼(𝑖, 𝑑) βˆ€π‘– β‰  1, 𝑑 (3) βˆ’π‘ƒπ‘–π‘— π‘šπ‘Žπ‘₯ ≀ {π‘‰π‘›π‘œπ‘š[π›₯𝑉(𝑖, 𝑑) βˆ’ π›₯𝑉(𝑗, 𝑑)]𝑔𝑖𝑗 βˆ’ π‘‰π‘›π‘œπ‘š 2 [πœƒ(𝑖, 𝑑) βˆ’ πœƒ(𝑗, 𝑑)]𝑏𝑖𝑗} ≀ 𝑃𝑖𝑗 π‘šπ‘Žπ‘₯, βˆ€(𝑖𝑗) ∈ Ω𝑒 , 𝑑 (4) βˆ’πœ—π‘‰π‘›π‘œπ‘š ≀ π›₯𝑉(𝑖, 𝑑) ≀ πœ—π‘‰π‘›π‘œπ‘š, βˆ€π‘–, 𝑑 (5) 𝑉(𝑖, 𝑑) = π‘‰π‘›π‘œπ‘š + π›₯𝑉(𝑖, 𝑑), βˆ€π‘–, 𝑑 (6) βˆ’πœ‹ ≀ πœƒ(𝑖, 𝑑) ≀ πœ‹, βˆ€π‘–, 𝑑 (7) Eqs (2) to (7) demonstrate technical constraints of the EDS that model the linear AC power flow in this work [20]. Accordingly, the power balance of the electricity sector is expressed by Eqs (2) and (3), and their dual variables or shadow prices are specified after the colon. The LEM clearing price or distribution locational marginal price of electricity is achieved from the shadow prices of the power balance constraints [21]. Moreover, the power flow in distribution lines, as well as voltage deviation of nodes, are limited by Eqs (4) and (5), respectively. Also, Eq (6) represents the voltage magnitude of nodes. Finally, the voltage angle of each node is restricted by Eq (7). 7 0 ≀ 𝑃𝐷𝐺(𝑑𝑔, 𝑑) ≀ 𝑄𝐷𝐺(𝑑𝑔, 𝑑), βˆ€π‘‘π‘”, 𝑑 (8) 0 ≀ π‘ƒπ‘Šπ‘‡(𝑀𝑑, 𝑑) ≀ π‘„π‘Šπ‘‡(𝑀𝑑, 𝑑), βˆ€π‘€π‘‘, 𝑑 (9) 0 ≀ 𝑃𝑃𝑉(𝑝𝑣, 𝑑) ≀ 𝑄𝑃𝑉(𝑝𝑣, 𝑑), βˆ€π‘π‘£, 𝑑 (10) 𝐺𝐢𝐻𝑃(π‘β„Ž, 𝑑) = 𝑃𝐢𝐻𝑃(π‘β„Ž, 𝑑) π»π‘‰π‘”π‘Žπ‘ πœ‚πΆπ»π‘ƒβˆ’πΈ(π‘β„Ž)⁄ , βˆ€π‘β„Ž, 𝑑 (11) 𝐻𝐢𝐻𝑃(π‘β„Ž, 𝑑) ≀ 𝑃𝐢𝐻𝑃(π‘β„Ž, 𝑑)𝐻𝑃𝑅(π‘β„Ž)πœ‚πΆπ»π‘ƒβˆ’π»(π‘β„Ž), βˆ€π‘β„Ž, 𝑑 (12) 𝑃𝐢𝐻𝑃 π‘šπ‘–π‘›(π‘β„Ž) ≀ 𝑃𝐢𝐻𝑃(π‘β„Ž, 𝑑) ≀ 𝑃𝐢𝐻𝑃 π‘šπ‘Žπ‘₯(π‘β„Ž), βˆ€π‘β„Ž, 𝑑 (13) 𝑃𝐸𝐡 π‘šπ‘–π‘›(𝑒𝑏) ≀ 𝑃𝐸𝐡(𝑒𝑏, 𝑑) ≀ 𝑃𝐸𝐡 π‘šπ‘Žπ‘₯(𝑒𝑏), βˆ€π‘’π‘, 𝑑 (14) 𝐻𝐸𝐡(𝑒𝑏, 𝑑) = 𝑃𝐸𝐡(𝑒𝑏, 𝑑)πœ‚πΈπ΅βˆ’π»(𝑒𝑏), βˆ€π‘’π‘, 𝑑 (15) On the other hand, Eqs (8) to (15) display operational constraints of the existing energy resources in the IEHN. In this regard, inequalities (8), (9), and (10) restrict DGs, WTs, and PVs’ offers in the LEM to their maximum quantity offers, respectively. The relation between the gas flows to the CHP units and their output powers is determined by Eq (11). Furthermore, the relation between the output heat and the output power of CHPs is defined by Eq (12). Ultimately, the CHPs’ output powers are confined to their minimum and maximum values by Eq (13) [22]. As stated, EBs are P2H elements that consume electricity to produce thermal energy. In this context, the power consumption of these units is limited by Eq (14), and their generated heat is displayed by Eq (15) [23]. DHSs contain supply pipelines that transfer hot water from heat sources to HDs, and return pipelines that return back cold water from HDs to heat sources [24]. Normally, these networks are controlled in four different modes, including constant-flow-constant-temperature, constant-flow- variable-temperature, variable-flow-constant-temperature, and variable-flow-variable-temperature. Eqs (16) to (25) depict technical constraints of the DHS that model the constant-flow-variable- temperature strategy in this work [25]. Notably, as non-linear hydraulic terms are eliminated in the considered model, the ultimate thermal model is linear. βˆ‘ 𝐻𝐢𝐻𝑃(π‘β„Ž, 𝑑) + βˆ‘ 𝐻𝐸𝐡(𝑒𝑏, 𝑑) 𝑒𝑏:(𝑒𝑏,𝑛) ∈ Ξ©πΈπ΅π‘β„Ž:(π‘β„Ž,𝑛) ∈ Ω𝐢𝐻𝑃 = πΆπ‘Šπ‘š(𝑛, 𝑑){𝑇𝑆(𝑛, 𝑑) βˆ’ 𝑇𝑅(𝑛, 𝑑)}, βˆ€π‘› ∈ Ω𝐻𝑆, 𝑑 (16) βˆ‘ 𝐻𝐻𝐷(β„Žπ‘‘, 𝑑) β„Žπ‘‘:(β„Žπ‘‘,𝑛) ∈ Ω𝐻𝐷 = πΆπ‘Šπ‘š(𝑛, 𝑑){𝑇𝑆(𝑛, 𝑑) βˆ’ 𝑇𝑅(𝑛, 𝑑)}, 𝛽(𝑛, 𝑑) βˆ€π‘› ∈ Ω𝐻𝐸𝑆, 𝑑 (17) 𝑇𝑆,π‘œπ‘’π‘‘(π‘›π‘š, 𝑑) βˆ’ π‘‡π΄π‘šπ‘(𝑑) = {𝑇𝑆,𝑖𝑛(π‘›π‘š, 𝑑) βˆ’ π‘‡π΄π‘šπ‘(𝑑)}𝑒 βˆ’πœ…πΏπ‘›π‘š πΆπ‘€π‘šπ‘†(π‘›π‘š,𝑑), βˆ€π‘›π‘š ∈ Ξ©β„Žπ‘†, 𝑑 (18) 8 𝑇𝑅,π‘œπ‘’π‘‘(π‘›π‘š, 𝑑) βˆ’ π‘‡π΄π‘šπ‘(𝑑) = {𝑇𝑅,𝑖𝑛(π‘›π‘š, 𝑑) βˆ’ π‘‡π΄π‘šπ‘(𝑑)}𝑒 βˆ’πœ…πΏπ‘›π‘š πΆπ‘€π‘šπ‘…(π‘›π‘š,𝑑), βˆ€π‘›π‘š ∈ Ξ©β„Žπ‘… , 𝑑 (19) 𝑇𝑆 π‘šπ‘–π‘› ≀ 𝑇𝑆(𝑛, 𝑑) ≀ 𝑇𝑆 π‘šπ‘Žπ‘₯, βˆ€π‘›, 𝑑 (20) 𝑇𝑅 π‘šπ‘–π‘› ≀ 𝑇𝑅(𝑛, 𝑑) ≀ 𝑇𝑅 π‘šπ‘Žπ‘₯, βˆ€π‘›, 𝑑 (21) 𝑇𝑆,𝑖𝑛(π‘›π‘š, 𝑑) = 𝑇𝑆(𝑛, 𝑑), βˆ€π‘›π‘š ∈ Ξ©β„Žπ‘†βˆ’π΅ 𝑛 , 𝑛, 𝑑 (22) 𝑇𝑅,𝑖𝑛(π‘›π‘š, 𝑑) = 𝑇𝑅(𝑛, 𝑑), βˆ€π‘›π‘š ∈ Ξ©β„Žπ‘…βˆ’π΅ 𝑛 , 𝑛, 𝑑 (23) βˆ‘ {π‘šπ‘†(π‘›π‘š, 𝑑)𝑇𝑆,π‘œπ‘’π‘‘(π‘›π‘š, 𝑑)} = 𝑇𝑆(𝑛, 𝑑) βˆ‘ π‘šπ‘†(π‘›π‘š, 𝑑) π‘›π‘š ∈ Ξ©β„Žπ‘†βˆ’π΅ π‘›π‘›π‘š ∈ Ξ©β„Žπ‘†βˆ’πΈ 𝑛 , βˆ€π‘›, 𝑑 (24) βˆ‘ {π‘šπ‘…(π‘›π‘š, 𝑑)𝑇𝑅,π‘œπ‘’π‘‘(π‘›π‘š, 𝑑)} = 𝑇𝑅(𝑛, 𝑑) βˆ‘ π‘šπ‘…(π‘›π‘š, 𝑑) π‘›π‘š ∈ Ξ©β„Žπ‘…βˆ’π΅ π‘›π‘›π‘š ∈ Ξ©β„Žπ‘…βˆ’πΈ 𝑛 , βˆ€π‘›, 𝑑 (25) Accordingly, Eqs (16) and (17) show the heat balance of the system in heat stations (HSs) that are equipped with heat sources and heat exchanger stations (HESs) that are modeled as HDs, respectively [26]. The dual variable or shadow price of Eq (17) is presented after the colon that specifies the LEM clearing price or distribution locational marginal price of heat. The temperature drop caused by heat loss in supply and return pipelines is represented by Eqs (18) and (19), respectively. Inequalities (20) and (21) restrict the temperature of nodes in supply and return pipelines. Eqs (22) and (23) ensure that the inlet temperature of supply and return pipelines is equal to the nodes’ temperature. Finally, according to Eqs (24) and (25), the nodes’ temperature is computed as the mixture temperature of mass flows entering the nodes. 3. Case Study In this section, the LEM clearing model is applied to an IEHN, including a 13-node EDS [27] and a 4-node DHS. The single-line diagram of this integrated system is depicted in Figure 2. Figure 2: Studied IEHN. i1 HS PCC i2 i3 i4 i5 i6 ED2 ED3 ED4 ED5 ED6 i13 ED13 DG2 i7 i11 ED11i12 ED12 WT ED7 i8 i10 ED10 DG1 i9 ED9ED8 PV CHP EB n1 HD1 n2 HD2 HD3 n3 n4 9 Accordingly, the EDS contains two DGs, one WT, and one PV at nodes 10, 13, 12, and 9, respectively. The EDS nodes 6 and 8 are connected to the HS of the DHS, which is equipped with one CHP and one EB. The maximum quantity offers of the LEM participants as well as technical specifications of the existing P2H elements are provided in Tables 1 and 2, respectively. Table 1: Maximum offers of LEM participants. # Unit Maximum Quantity Offers (kW) DG 1 3000 DG 2 2000 WT 2000 PV 1500 Table 2: Characteristics of P2H units. # Unit Minimum Power (kW) Maximum Power (kW) Heat Efficiency (%) Electricity Efficiency (%) Heat-to-Power Ratio CHP 200 2000 55 45 1 EB 0 500 80 ΜΆ ΜΆ Offer prices of the available market participants, as well as locational marginal prices of PCC, are illustrated in Figure 3. The electric and heat demand profiles of the studied IEHN are displayed in Figure 4. Furthermore, the peak demand of the system in each node is expressed in Table 3. On the other hand, it is assumed that the temperature of supply pipelines in the DHS varies between 60 oC and 100 oC, while the temperature of its return pipelines varies between 20 oC and 60 oC. In addition, the ambient temperature is 10 oC, specific heat capacity of water is 4.182 J/g oC, and heat transfer coefficient of pipelines is 0.00455 W/cm oC [28]. In the end, the natural gas price is considered a three-tariff price, and the heat value of natural gas is presumed to be 11.7 kWh/m3. Figure 3: Prices in the LEM clearing process. 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 P ri ce ( € /k W h ) Time (h) Offer price of DG 1 Offer price of DG 2Offer price of WT Offer price of PVLocational marginal price of PCC 10 Figure 4: Demand profiles of the IEHN. Table 3: Peak demand of the IEHN. # Node 1 2 3 4 5 6 7 8 9 10 11 12 13 Electric Demand (kW) 0 890 628 1112 636 474 1342 920 766 662 690 1292 1124 Heat Demand (kW) 0 450 400 450 ΜΆ ΜΆ ΜΆ ΜΆ ΜΆ ΜΆ ΜΆ ΜΆ ΜΆ Accepted offers of the LEM participants, namely DGs, WT, and PV, as well as the output power of P2H elements, namely CHP and EB, are demonstrated in Figure 5. In this figure, the DSO’s imported electricity from the upstream grid is displayed as well. Notably, the line graph shows the system’s whole ED during the studied day. Figure 5: Optimal operating points of power resources in the LEM. As shown, the entire produced and imported powers have procured the required powers of the EB and ED. On the other hand, based on Figures 3 and 5, since the offer prices of WT and PV are 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Pro file (PU ) Time (h) Electric Heat -2000 0 2000 4000 6000 8000 10000 12000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Pow er (k W) Time (h) PED PgPDG 1 PDG 2PWT PPVPCHP PEB 11 lower than the offer prices of DGs and locational marginal prices of PCC in most hours of the day, their maximum quantity offers have been accepted in the LEM clearing process. The output heat of P2H elements, i.e., CHP and EB, are depicted in Figure 6. Similarly, the line graph shows the system’s whole HD during the studied day. Figure 6: Optimal operating points of heat resources in the LEM. Based on the DHS modeling in the previous section and Figure 6, it is observed that the generated heat at each hour has procured not only the HD but also heat loss in supply and return pipelines. Also, since the electricity price is low in the early hours of the day, the DSO has preferred to transform the power to heat by the available EB and satisfy the peak HD of the system. The amount of gas consumption by the available CHP unit in the IEHN, as well as the three- tariff natural gas price, are depicted in Figure 7. Clearly, during the peak of electric and heat demands, the considered CHP has consumed the highest amount of gas. Figure 7: CHP’s gas consumption and natural gas price. 0 200 400 600 800 1000 1200 1400 1600 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Hea t (k W) Time (h) HD HCHP HEB 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 200 220 240 260 280 300 320 340 360 380 400 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 G as P ri ce ( € /m 3 ) Gas (m3 ) Time (h) GCHP Gas price 12 Temporal and spatial variation of distribution locational marginal price of electricity in the LEM clearing procedure is presented in Figure 8. Figure 8: Variation of distribution locational marginal price of electricity. The generic temporal analysis shows that by increasing the ED, the distribution locational marginal price is increased as well. On the other hand, according to the spatial analysis, the increase in the ED during peak hours leads to congestion in the EDS, which changes the LEM clearing price at different nodes. To better investigate the spatial level, distribution locational marginal prices of the EDS nodes at hours 12 and 21 are represented in Figure 9. Figure 9: Distribution locational marginal prices at hours 12 and 21. Based on Figure 9, at hours 12, distribution locational marginal prices at nodes 1 to 4 are equal to locational marginal prices of PCC. Due to the congestion in line 4-5, the rest of the nodes’ marginal 1 5 9 13 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Bus Nu mbe r L o ca ti o n al M ar g in al P ri ce ( € /k W h ) Time (h) 0-0.01 0.01-0.020.02-0.03 0.03-0.040.04-0.05 0.05-0.060.06-0.07 0.03 0.035 0.04 0.045 0.05 0.055 0.06 0.065 0.07 1 2 3 4 5 6 7 8 9 10 11 12 13 L o ca ti o n al M ar g in al P ri ce ( € /k W h ) Bus Number Hour 12 Hour 21 13 prices have been affected by the offer prices of the LEM participants. In this context, PV as a marginal producer has determined distribution locational marginal prices at nodes 5 to 9 and 11 to 13. The marginal price of node 10 has resulted from offer price of DG 1, which is located at this node. The important point here is that while the offer price of DG 1 is lower than the offer price of PV, this unit has not been able to affect other nodes’ marginal prices due to the congestion in line 8-10. Similarly, at hour 21, distribution locational marginal prices at nodes 1 to 4 are equal to locational marginal prices of PCC. Because of the congestion in line 4-5, distribution locational marginal prices at nodes 5 to 9 and 11 to 13 have been determined by DG 2 as a marginal producer. Also, because of congestion in line 8-10, DG 1 has only been able to impact the marginal price of node 10. 4. Conclusion The high penetration of renewable energies has increased the need for flexibility in power distribution systems. Recently, the coupling of EDSs and DHSs in the form of IEHNs has been raised as one of the promising solutions for flexibility provision. Nonetheless, establishing IEHNs and optimally operating them requires the development of an appropriate and practical market-based mechanism. In this context, this chapter modeled a LEM for the integration of the EDS and DHS at the distribution level. The considered LEM was cleared by the DSO using a centralized one-sided auction to maximize social welfare. Then, the suggested LEM clearing model was applied to an IEHN under the technical constraints of both EDS and DHS. Output results specified that distribution locational marginal prices are affected by a set of factors, including the topology as well as demands of the network. Acknowledgment Sara Haghifam would like to acknowledge the Fortum and Neste Foundation that supports research, education, and development in natural, technical, and economical sciences within the energy industry. References [1] M. Zhang, Q. Wu, J. Wen, Z. Lin, F. Fang, and Q. Chen, β€œOptimal operation of integrated electricity and heat system: A review of modeling and solution methods,” Renew. Sustain. Energy Rev., vol. 135, p. 110098, 2021. [2] C. Bernath, G. Deac, and F. Sensfuß, β€œImpact of sector coupling on the market value of renewable energies–A model-based scenario analysis,” Appl. Energy, vol. 281, p. 115985, 2021. [3] M. Zhang, Q. Wu, J. Wen, B. Pan, and S. Qi, β€œTwo-stage stochastic optimal operation of integrated electricity and heat system considering reserve of flexible devices and spatial-temporal correlation of wind power,” Appl. Energy, vol. 275, p. 115357, 2020. [4] I. R. Skov, N. Schneider, G. Schweiger, J.-P. SchΓΆggl, and A. Posch, β€œPower-to-X in Denmark: An Analysis of Strengths, Weaknesses, Opportunities and Threats,” Energies, vol. 14, no. 4, p. 913, 2021. [5] J. G. Kirkerud, T. F. BolkesjΓΈ, and E. TrΓΈmborg, β€œPower-to-heat as a flexibility measure for integration of 14 renewable energy,” Energy, vol. 128, pp. 776–784, 2017. [6] H. Ahn, W. Miller, P. Sheaffer, V. Tutterow, and V. Rapp, β€œOpportunities for installed combined heat and power (CHP) to increase grid flexibility in the US,” Energy Policy, vol. 157, p. 112485, 2021. [7] X. Du, X. Ma, J. Liu, S. Wu, and P. Wang, β€œOperation optimization of auxiliary electric boiler system in HTR-PM nuclear power plant,” Nucl. Eng. Technol., 2022. [8] A. David, B. V. Mathiesen, H. Averfalk, S. Werner, and H. Lund, β€œHeat roadmap Europe: large-scale electric heat pumps in district heating systems,” Energies, vol. 10, no. 4, p. 578, 2017. [9] A. Bloess, W.-P. Schill, and A. Zerrahn, β€œPower-to-heat for renewable energy integration: A review of technologies, modeling approaches, and flexibility potentials,” Appl. Energy, vol. 212, pp. 1611–1626, 2018. [10] Y. Cao, W. Wei, L. Wu, S. Mei, M. Shahidehpour, and Z. Li, β€œDecentralized Operation of Interdependent Power Distribution Network and District Heating Network: A Market-Driven Approach,” IEEE Trans. Smart Grid, vol. 10, no. 5, pp. 5374–5385, 2019, doi: 10.1109/TSG.2018.2880909. [11] Y. Chen, W. Wei, F. Liu, E. E. Sauma, and S. Mei, β€œEnergy Trading and Market Equilibrium in Integrated Heat- Power Distribution Systems,” in 2019 IEEE Power & Energy Society General Meeting (PESGM), 2019, p. 1, doi: 10.1109/PESGM40551.2019.8973984. [12] H. Chen et al., β€œLocal energy market clearing of integrated ADN and district heating network coordinated with transmission system,” Int. J. Electr. Power Energy Syst., vol. 125, p. 106522, 2021, doi: https://doi.org/10.1016/j.ijepes.2020.106522. [13] M. Brolin and H. Pihl, β€œDesign of a local energy market with multiple energy carriers,” Int. J. Electr. Power Energy Syst., vol. 118, p. 105739, 2020, doi: https://doi.org/10.1016/j.ijepes.2019.105739. [14] T. Huynh, F. Schmidt, S. Thiem, M. Kautz, F. Steinke, and S. Niessen, β€œLocal energy markets for thermal-electric energy systems considering energy carrier dependency and energy storage systems,” Smart Energy, vol. 6, p. 100065, 2022, doi: https://doi.org/10.1016/j.segy.2022.100065. [15] N. Wang, Z. Liu, P. Heijnen, and M. Warnier, β€œA peer-to-peer market mechanism incorporating multi-energy coupling and cooperative behaviors,” Appl. Energy, vol. 311, p. 118572, 2022, doi: https://doi.org/10.1016/j.apenergy.2022.118572. [16] M. Davoudi and M. Moeini‐Aghtaie, β€œLocal energy markets design for integrated distribution energy systems based on the concept of transactive peer‐to‐peer market,” IET Gener. Transm. Distrib., vol. 16, no. 1, pp. 41–56, 2022. [17] M. Khorasany, Y. Mishra, and G. Ledwich, β€œMarket framework for local energy trading: A review of potential designs and market clearing approaches,” IET Gener. Transm. Distrib., vol. 12, no. 22, pp. 5899–5908, 2018. [18] A. E. Kahn, P. C. Cramton, R. H. Porter, and R. D. Tabors, β€œUniform pricing or pay-as-bid pricing: a dilemma for California and beyond,” Electr. J., vol. 14, no. 6, pp. 70–79, 2001. [19] S. Haghifam, M. Dadashi, H. Laaksonen, K. Zare, and M. Shafie‐khah, β€œA two‐stage stochastic bilevel programming approach for offering strategy of DER aggregators in local and wholesale electricity markets,” IET Renew. Power Gener., 2022. [20] S. F. Santos, D. Z. Fitiwi, M. Shafie-Khah, A. W. Bizuayehu, and J. P. S. CatalΓ£o, β€œOptimal sizing and placement of smart-grid-enabling technologies for maximizing renewable integration,” in Smart Energy Grid Engineering, Elsevier, 2017, pp. 47–81. [21] R. P. O’Neill, P. M. Sotkiewicz, B. F. Hobbs, M. H. Rothkopf, and W. R. Stewart Jr, β€œEfficient market-clearing 15 prices in markets with nonconvexities,” Eur. J. Oper. Res., vol. 164, no. 1, pp. 269–285, 2005. [22] Y. Li, J. Wang, Y. Zhang, and Y. Han, β€œDay-ahead scheduling strategy for integrated heating and power system with high wind power penetration and integrated demand response: A hybrid stochastic/interval approach,” Energy, vol. 253, p. 124189, 2022. [23] Q. Wu, J. Tan, M. Zhang, X. Jin, and A. Turk, β€œChapter 6 - Adaptive robust energy and reserve co-optimization of an integrated electricity and heating system considering wind uncertainty,” Q. Wu, J. Tan, X. Jin, M. Zhang, and A. B. T.-O. O. of I. M.-E. S. U. U. Turk, Eds. Elsevier, 2022, pp. 145–170. [24] J. Tan, Q. Wu, and M. Zhang, β€œStrategic investment for district heating systems participating in energy and reserve markets using heat flexibility,” Int. J. Electr. Power Energy Syst., vol. 137, p. 107819, 2022. [25] Z. Pan, Q. Guo, and H. Sun, β€œFeasible region method based integrated heat and electricity dispatch considering building thermal inertia,” Appl. Energy, vol. 192, pp. 395–407, 2017. [26] Z. Li, W. Wu, M. Shahidehpour, J. Wang, and B. Zhang, β€œCombined heat and power dispatch considering pipeline energy storage of district heating network,” IEEE Trans. Sustain. Energy, vol. 7, no. 1, pp. 12–22, 2015. [27] A. Ali, D. Mohsen, R. Farzad, and D. Majid, β€œOptimal DG placement in distribution networks using intelligent systems,” Energy Power Eng., vol. 2012, 2012. [28] A. Shabanpour-Haghighi and A. R. Seifi, β€œEffects of district heating networks on optimal energy flow of multi- carrier systems,” Renew. Sustain. Energy Rev., vol. 59, pp. 379–387, 2016.