Peer-to-Peer Energy Trading Among Heat-LED Energy Hubs: Economic Optimization and Emissions Reduction Under a Community-Level CO$_2$ Cap
Abstract:
Energy hubs (EHs) often run their combined heat and power (CHP) units to follow heat demand, so one building may export surplus electricity at a low price while a neighboring building buys power from the grid. This study examines how bilateral peer-to-peer (P2P) electricity exchange among such hubs changes the cost and emissions of meeting a community CO$_2$ cap. Three heterogeneous EHs in Turin, Italy, each equipped with a CHP unit, a gas boiler, a heat pump, photovoltaic (PV) panels and electrical and thermal storage, were scheduled hourly for a representative winter day. Operating cost was minimized under successively tighter emission caps with the $\epsilon$-constraint method, once with independent operation and once with capacity-limited transfers between the hubs. Under a common cap of about 18 t CO$_2$/day, exchange reduced the daily operating cost from about €5,310 to €5,140 (3.2%) and grid purchases from about 4,200 kWh to less than 380 kWh, while more than 4.1 MWh was traded between the hubs. The hub with the largest heat demand supplied 3,763 kWh to its neighbors and bought none. At the minimum-cost solutions (ECOs), exchange also cut emissions by 948 kg CO$_2$/day, but both minimum-emission solutions (ENV) reached about 16.80 t CO$_2$/day. The results indicate that, on a winter day, P2P exchange mainly lowers the cost of reaching a given emission level, whereas the lowest attainable level appears to be set by gas-fired heat supply. Comparing the two cases at a common emission cap separates the value of exchange from a shift along the cost–emission trade-off.
1. Introduction
Buildings and districts increasingly meet their electricity and heat demand with a combination of cogeneration, heat pumps, boilers, photovoltaic (PV) panels and storage. The energy hub (EH) concept describes such a site as a set of conversion and storage devices that link the energy carriers entering the site to the services it delivers, and it has become a common basis for the operational optimization of multi-energy systems [1]. Its usefulness lies in the coupling it captures: a decision on how to supply heat changes how much electricity the site produces or consumes, and vice versa.
This coupling produces a recurring mismatch when neighboring EHs are operated separately. A building with a large heating load may keep its combined heat and power (CHP) unit running for most of the day, even when its electricity demand is low, and sell the surplus to the grid at the export price. In the same hours, a neighboring building with a smaller heat demand may be buying electricity at the retail tariff. Each building is scheduled sensibly on its own terms, yet the community as a whole sells electricity cheaply and buys it back at a higher price. Energy communities and local trading schemes have been proposed to reduce this loss and to keep locally generated electricity within the community [2]. In Italy, renewable energy communities now provide a legal framework for such sharing, and case studies indicate that their benefits depend strongly on how well generation and consumption profiles match within the community [3].
Whether a transfer between two EHs pays off depends first on the tariffs, since any price between the export price and the retail price leaves both parties better off than trading with the grid. Its effect on emissions is less direct. It depends on whether the CHP unit would have run anyway, on how much grid electricity the transfer displaces and how carbon-intensive that electricity is, and on how the EHs would otherwise have covered their heat demand [4]. The settlement between EHs can also redistribute income without any change in the equipment schedules, whereas a change in community emissions has to be traced to changes in grid purchases and fuel use [5], [6]. Cost and emission effects of local exchange therefore have to be assessed together; neither can be inferred from the other.
Coordination among interconnected EHs and multi-energy microgrids has been studied with a range of methods. Li et al. [7] built a digital twin of several EHs with peer-to-peer (P2P) energy sharing, and Azimi et al. [8] coordinated interconnected EHs through a distributed consensus scheme to address scalability. Cui et al. [9] and Mirzapour-Kamanaj et al. [10] used multi-agent deep reinforcement learning to schedule P2P trading among multi-energy microgrids and multi-carrier buildings, respectively, while Ying et al. [11] managed a building cluster through decentralized transactive trading. Other work has dealt with transaction settlement through blockchain [12], day-ahead sharing that exploits storage and flexible loads [13], and real-time trading in networked multi-energy systems with hybrid storage [14]. Tariq and Amin [15] reviewed this body of work on P2P multi-energy trading, and Sun et al. [16] showed how electrical and district-heating network constraints limit the volumes that can be exchanged.
A second group of studies concerns the physical and environmental limits of trading. Tarashandeh and Karimi [17] cleared P2P trades among prosumers subject to distribution network constraints, and Hoque et al. [18] assigned network-secure import and export limits to each prosumer of a 78-node low-voltage network. Ullah and Park [19] included bilateral power losses in network-constrained market clearing, and Liu et al. [20] combined P2P trading with carbon signals in an unbalanced distribution network. On the emission side, Wu et al. [21] added a cap-and-trade scheme to community trading, and Ma et al. [5] linked electricity and emission-right trading through carbon-coupled network charges. Most of these studies treat the participants as electricity prosumers, so the trade-off between heat supply and electricity production inside each participant is not represented.
Studies that include heat show that this trade-off can change the outcome. Hutty and Brown [6] found that trading heat alongside electricity reduced grid purchases and largely removed resistive heating. Fu et al. [22] cleared electricity and heat in a coupled double auction, Zhang et al. [23] scheduled electricity and hydrogen trades among integrated energy systems under uncertainty, and Hua et al. [24] combined a dynamic interactive price with aggregated demand response, reducing the energy purchase cost of the interconnected systems by 1.48%. Rowe et al. [25] optimized the siting, sizing and operation of multi-energy systems in an electricity–gas–heat network with P2P trading, and Wu et al. [26] proposed a decarbonization-oriented strategy for multi-district integrated energy systems with fair P2P trading. Among multi-objective studies, Darvishi et al. [27] minimized cost, emissions and consumer dissatisfaction for a single EH with the $\epsilon$-constraint method, Bian et al. [28] allocated shared storage among microgrids while minimizing carbon emissions, Dukovska et al. [29] included user preferences in stochastic multi-objective P2P trading, and Ren et al. [30] examined multi-objective cooperation among interconnected building multi-energy systems.
Two modeling choices recur across these studies and shape how the benefit of exchange is reported. The first is the price rule. Bill sharing, the supply–demand ratio and the mid-market rate are the most common rules, and they divide the gain from a trade differently between buyer and seller [31]. Alfaverh et al. [32] showed that a dynamic P2P price combined with price-based demand response changes both the traded volume and the bills of community members. A midpoint rule guarantees each party a better price than the grid whenever the retail price exceeds the export price, but it does not reflect the scarcity of local supply. The second choice is the emission factor applied to grid electricity. Time-varying average and marginal factors can lead to different conclusions for the same building [33], and dynamic grid factors can reveal substantial operational emissions in buildings that appear balanced on an annual energy basis [34]. Both choices enter the present model, so their influence on the results is discussed explicitly in Section 4.
Two questions remain open in this literature. First, when exchange is compared with independent operation, the comparison is usually made between minimum-cost schedules or between compromise solutions chosen separately for each case. These schedules generally have different emissions, so the comparison mixes the effect of exchange with a movement along the cost–emission trade-off. Second, studies that report lower emissions from local trading rarely trace the reduction to its physical source, namely the grid electricity displaced and the additional fuel burned by the units that supply the traded energy. For a community in which heat-led CHP is the main source of tradable electricity, the relevant question is how much exchange reduces the cost of meeting a given emission limit, and where the saving comes from.
This paper addresses that question for three heterogeneous EHs that share a low-voltage feeder. We formulate an hourly day-ahead scheduling model in which bilateral electricity transfers enter each EH’s electricity balance and settlement records the corresponding payments, alongside CHP units, boilers, heat pumps, PV generation, electrical and thermal storage and demand response. Cost–emission Pareto frontiers are then computed with the $\epsilon$-constraint method for independent and coordinated operation, and the two cases are compared at a common community emission cap as well as at their characteristic points. Finally, the saving and the drop in grid purchases are traced to the heat-led CHP operation of the exporting EH, and we state the conditions under which exchange also lowers emissions. Transfers and grid connections are limited by capacity; voltages, power flows and line losses are not modeled, and the effect of this simplification is discussed with the results.
2. Methodology
The three EHs, EH1–EH3, share a low-voltage feeder and are scheduled over 24-hourly intervals. Each has a CHP unit, boiler, air-source heat pump, PV panels, battery and thermal store. EH3 accounts for about 74% of community heat demand but only 39% of electricity demand (Table 1). The model schedules equipment output, storage, demand response and grid transactions at each EH. In coordinated operation it also schedules electricity transfers between EHs.
| Demand | EH3 | EH1 + EH2 | Community | Unit |
|---|---|---|---|---|
| Peak electricity | 518 | 828 | 1,139 | kW |
| Peak heat | 4,055 | 1,303 | 5,102 | kW |
| Daily electricity | 7.43 | 11.73 | 19.16 | MWh |
| Daily heat | 43.34 | 15.14 | 58.49 | MWh |
Figure 1 outlines the comparison. Under independent operation, each EH trades electricity only with the grid. Bilateral exchange also allows transfers between EHs, subject to link capacity. Minimizing daily cost at successive emission caps gives the cost–emission frontier for each operating mode.

3. Mathematical Modeling
Figure 2 shows the energy flows within one EH. Natural gas supplies the CHP unit and the boiler. Electricity from the grid, the PV panels, the CHP unit, the battery and the other EHs supplies the building load and the heat pump, and the thermal storage shifts heat between hours. Only electricity is exchanged between EHs; heat is produced and consumed within each EH.

The boiler, heat pump, storage and demand-response formulations follow [35]. The equations below describe community cost and emissions, transfers between EHs, financial settlement and CHP conversion.
The economic objective is the total daily operating cost of the community, Eq. (1). It comprises the net cost of grid transactions, the cost of natural gas, variable operation and maintenance, penalties for load and PV curtailment, the cost of demand-response activation, the transaction fee on shared electricity and a penalty on balance slack, defined in Eqs. (2)–(8). Detailed definitions of the variables appearing in Eqs. (1)–(40) are given in Table A1.
where the individual cost terms are defined as follows.
The net electricity cost associated with grid imports and exports is:
The fuel cost associated with CHP and boiler operation is:
The variable operation and maintenance cost is given by:
The penalties associated with electrical load curtailment and PV curtailment are:
The demand-response activation cost is represented as:
The cost associated with P2P electricity exchange is modeled through a transaction or network fee applied to shared electricity volumes:
Eq. (8) penalizes residuals in hourly heat and electricity balances. Scheduled load curtailment is accounted for separately in Eq. (5).
The environmental objective is the daily CO$_2$ emission of the community. It includes the emissions associated with grid purchases and with the gas burned in the CHP units and boilers:
where, EF$_\text{grid}$ (kg$\cdot$CO$_2$/kWh) is the emission factor of grid electricity and EF$_\text{gas}$ (kg$\cdot$CO$_2$/kWh) the emission factor of natural gas referred to its lower heating value (LHV). Eq. (9) assigns no avoided-emissions credit to exports. The two objectives are combined with the $\epsilon$-constraint method. Cost is minimized while emissions are kept below a cap $\epsilon_k$:
The caps span the range between the minimum-emission and minimum-cost schedules. The selected intermediate point on each frontier is identified as the knee point (KNEE) in Section 4.
P2P coordination among EHs is modeled as a physical electricity exchange layer superimposed on the standard EH–grid interaction [36], [37]. The exchange is represented through directed power transfer variables $P_\text{share}^{i,j,t}$ (kW), defined for each pair of EHs $i$, $j$ and each hour $t$. The adopted convention is that $P_\text{share}^{i,j,t}$ denotes the electrical power sent from EH $i$ to EH $j$, so that EH $i$ acts as seller and EH $j$ as buyer.
Eq. (11) limits each directed transfer to the capacity of the link between the two EHs:
Eq. (12) excludes self-trades, and Eq. (13) gives the net electricity received by an EH as its incoming minus its outgoing transfers. In the electricity balance, incoming transfers act as an additional supply and outgoing transfers as an additional demand. Transfer prices follow a simple rule. Each EH has a reference price obtained by applying an EH-specific discount to the common market price, subject to a floor (Eq. (14)), and the price of a transfer is the midpoint of the reference prices of the two EHs (Eq. (16)). Eqs. (15), (17) and (18) keep this price below the discounted retail price and above both the export price and the floor. Because these bounds involve only parameters, they only check the consistency of the price data and do not restrict the dispatch. Eqs. (19) and (20) give the purchase expenditure and the sales revenue of each EH, Eq. (21) its net settlement, which is positive for a net payment, and Eq. (22) the fee charged on all transferred energy. Every payment made by a buyer is received by a seller, so settlements cancel at community level and only determine how the saving is divided among the EHs.
The CHP unit is modeled with constant electrical and thermal efficiencies:
Eqs. (23) and (24) give the electricity and useful heat produced from the gas input, using the LHV of natural gas and the electrical and thermal efficiencies. Their ratio, Eq. (25), fixes the heat-to-power ratio at any positive output, so the unit cannot raise its heat output without producing more electricity. This fixed ratio is what creates surplus electricity in an EH with a high heat demand. Eq. (26) bounds the gas input, and Eqs. (27) and (28) are the corresponding output limits. Part-load efficiency changes and minimum-load limits are not represented, although off-design operation can affect both the cost and the emissions of CHP-based systems [38].
Eq. (29) is the hourly electricity balance of each EH. Transfers received from other EHs appear on the supply side and transfers sent to other EHs on the demand side, so they cancel when the balances of the three EHs are added. The heat balance has the same structure, with CHP heat, boiler output, heat-pump output and thermal storage discharge as supply, and heat demand and storage charging as demand; heat is not exchanged between EHs.
where, $P_\text{g}^{i,t}$ is the net grid exchange, assumed positive in import mode and negative in export mode, $P_\text{pv,use}^{i,t}$ is the PV power used locally, $P_\text{e,chp}^{i,t}$ is CHP electricity production, $P_\text{es,d}^{i,t}$ and $P_\text{es,c}^{i,t}$ are battery discharging and charging power, $P_\text{e,up}^{i,t}$ and $P_\text{e,down}^{i,t}$ denote the upward and downward electrical demand-response adjustments, $P_\text{curt}^{i,t}$ is the curtailed electrical load, and $P_\text{e,hp}^{i,t}$ is the electrical input of the heat pump.
Eqs. (30)–(38) give a reference formulation for interpreting the component schedules, following [35]. The boiler converts gas to heat with a constant efficiency $\eta_\text{b}$, and the heat pump converts electricity to heat with a constant coefficient of performance (COP):
Eqs. (32)–(34) express the storage balances and operating limits in the reference formulation. Hourly charging and discharging profiles alone do not identify the storage ratings or terminal conditions.
where, $E_\text{es}$ and $E_\text{hs}$ are the energy contents of the battery and the thermal store. Demand response shifts load in time without changing the daily total; Eq. (36) illustrates a proportional bound with coefficient $\alpha$ applied to hourly demand:
The hourly heat balance of each EH, Eq. (37), mirrors the electricity balance of Eq. (29), except that heat is not exchanged between EHs. Grid purchases and exports are limited by the connection capacity, Eq. (38).
In the reported schedules, the heat pumps supplied 3.5 kWh of heat per kWh of electricity consumed. The CHP units supplied about 1.29 kWh of heat per kWh of electricity generated. At this fixed heat-to-power ratio (Eq. (25)), producing 1 MWh of heat also yields about 0.78 MWh of electricity.
The price rule and the emission accounting set simple conditions under which a transfer is worthwhile. Consider one kilowatt-hour that an EH would otherwise export at $P_\text{sell}$ and that a neighbor would otherwise import at $P_\text{buy}$. At transfer price $p_\text{P2P}$, the buyer saves $P_\text{buy}-p_\text{P2P}$, the seller gains $p_\text{P2P}-P_\text{sell}$, and the fee of Eq. (22) is paid on the transferred energy. The community gain per kilowatt-hour is therefore:
For this one-for-one substitution, equipment output stays fixed and internal payments cancel. The transfer saves money when the retail–export price spread exceeds the fee. If the seller increases CHP output, the calculation must also include additional fuel and maintenance expenses and any boiler fuel saved by heat recovery.
The emission effect has the same structure. If the surplus would otherwise have been exported, the transfer leaves fuel use unchanged and, because Eq. (9) assigns no credit to exports, reduces community emissions by EFgrid per kilowatt-hour. If the transfer calls for additional CHP output and the recovered heat displaces boiler heat, the additional electricity carries an effective emission rate of:
and the transfer lowers emissions only if EFgrid exceeds eeff. Table 2 evaluates Eq. (40) for the heat-to-power ratio of 1.29 found in the schedules and for a range of electrical and boiler efficiencies. The effective rate lies between about 1.1 and 2.0 times the emission factor of natural gas: the more efficient the CHP unit and the less efficient the boiler it replaces, the lower the rate. Additional CHP generation therefore reduces emissions only where grid electricity is clearly more carbon-intensive than burning gas for heat, whereas trading an existing surplus reduces emissions under any positive grid emission factor.
| CHP Electrical Efficiency | $\boldsymbol{\eta_\text{b}=0.9}$ | $\boldsymbol{\eta_\text{b}=0.95}$ |
|---|---|---|
| 0.30 | 1.90 | 1.98 |
| 0.35 | 1.43 | 1.50 |
| 0.40 | 1.07 | 1.15 |
The winter case uses hourly electricity and heat demands for Turin, Italy. PV output follows the Photovoltaic Geographical Information System (PVGIS) profile [39], and market prices are drawn from the Transparency Platform of the European Network of Transmission System Operators for Electricity (ENTSO-E) [40].
For each case, three points of the Pareto frontier are reported: the minimum-cost solution (ECO), KNEE and the minimum-emission solution (ENV). Because KNEE of each frontier is selected separately, the two KNEEs do not have the same emissions, and a comparison between them combines the effect of exchange with a shift along the trade-off. The two cases are therefore also compared under a common emission cap (Section 4.3).
Under independent operation, each EH meets its electricity and heat demand with its equipment and its grid connection. Surplus electricity can only be exported at the export price, even when a neighboring EH is importing in the same hour.
Table 3 and Figure 3 show the independent-operation frontier. Moving from ECO to KNEE costs an additional €61/day and reduces emissions by 982 kg/day, an average abatement cost of about €0.06/kg CO$_2$. Beyond the knee the frontier becomes much steeper: reaching ENV costs a further €542/day for a reduction of 1,201 kg/day, or about €0.45/kg CO$_2$. Most of the inexpensive abatement is therefore already obtained at the knee.
Solution | Operating Cost (€/day) | CO$\boldsymbol{_2}$ Emissions (kg/day) | Approach |
|---|---|---|---|
ECO | 5,251 | 18,980 | Min-cost solution |
KNEE | 5,312 | 17,998 | Selected solution |
ENV | 5,854 | 16,797 | Min-emission solution |
Figure 4 shows the electricity and heat balances of EH3 under independent operation. On the electricity side (Figure 4a), the CHP unit supplies most of the load throughout the day, with its output rising to about 570 kW in the evening. Grid purchases are limited to the first hour, and PV contributes only a few tens of kilowatts around midday. The heat pump adds up to about 120 kW of electrical load during the day.
On the heat side (Figure 4b), the boiler supplies the bulk of the heat during the day and reaches about 3,200 kW in the morning peak, while the CHP unit provides a steady base of roughly 100–730 kW and the heat pump up to about 400 kW. The large boiler share suggests that the CHP unit of EH3 has room to supply more heat, but under independent operation the electricity produced with that heat could only be exported at the export price. Once transfers are allowed, this electricity can be sold to the other EHs instead.


With bilateral exchange, the three EHs can also transfer electricity to one another within the capacity of their links; all other data are the same as under independent operation. Setting every transfer to zero reproduces an independent schedule, so at any emission cap the minimum cost under bilateral exchange cannot exceed that under independent operation, provided the remaining constraints are identical. An improvement of the frontier is therefore expected by construction. The following results quantify this improvement and identify the changes in dispatch that produce it.
Figure 5 and Table 4 show the bilateral-exchange frontier. ECO cost €5,129/day and emitted 18,032 kg CO$_2$/day. Moving to KNEE added €76/day and lowered emissions by 186 kg/day, and ENV cost €5,796/day at 16,797 kg/day.

Solution | Operating Cost (€/day) | CO$\boldsymbol{_2}$ Emissions (kg/day) | Approach |
|---|---|---|---|
ECO | 5,129 | 18,032 | Min-cost solution |
KNEE | 5,205 | 17,846 | Selected solution |
ENV | 5,796 | 16,797 | Min-emission solution |
Table 5 lists the transfers and their settlement. EH3 sold 3,763 kWh and bought nothing, EH1 bought 2,969 kWh and sold nothing, and EH2 traded in both directions, buying 1,223 kWh and selling 430 kWh. The total purchases and sales match within 1 kWh due to rounding. On average, EH1 paid about €0.104/kWh, and EH3 received about €0.107/kWh.
EH1 | EH2 | EH3 | |
|---|---|---|---|
Sold (kWh) | 0 | 430 | 3,763 |
Bought (kWh) | 2,969 | 1,223 | 0 |
Net P2P (kWh) | $-$2,969 | $-$793 | 3,763 |
P2P cost (€) | 309 | 137 | 0 |
P2P revenue (€) | 0 | 46 | 401 |
Net settlement P2P (€) | 309 | 91 | $-$401 |
Figure 6 shows the electricity and heat balances of the whole community under bilateral exchange, that is, the sum of the three EHs. In Figure 6a, the transfers sent and received cancel in every hour, as they must at the community level. They total about 4.2 MWh over the day and reach about 320 kW in the afternoon. Grid purchases fall to 378 kWh, most of them in the first five hours of the day. The CHP units supply most of the community' s electricity, from about 190 kW at night to 1,250 kW in the evening. In Figure 6b, CHP heat follows the same profile, and the boilers cover the remaining demand, particularly at the morning and evening peaks. Over the day, the bilateral-exchange schedule also includes 60.1 kWh of scheduled load curtailment.

Over the 24 hours studied, the correlations of transfer volume with community electrical load, CHP electrical output and PV output were 0.58, 0.55 and 0.26, respectively. Hours 9–18 accounted for 59% of traded electricity. The smallest hourly transfers, about 32 kWh, occurred in hours 1 and 7. The 4.19 MWh exchanged was equivalent to 21.9% of the 19.16 MWh building electricity demand.
The community CHP units generated 20.77 MWh of electricity (Table 6). Grid purchases and PV output amounted to 0.38 and 0.36 MWh, respectively. The heat pumps drew 2.39 MWh in addition to the building electrical load. Batteries charged 0.077 MWh and discharged 0.062 MWh; the corresponding thermal storage flows were 0.068 and 0.055 MWh. Demand response shifted 1.10 MWh of electrical load and 0.59 MWh of heat demand within the day. CHP supplied 26.71 MWh of heat, boilers 23.42 MWh and heat pumps 8.37 MWh. At EH3 under independent operation, boilers supplied about 65% of the local heat demand.
| Item | EH3, Independent | Community, Exchange |
|---|---|---|
| Electricity: CHP | 8.36 | 20.77 |
| Electricity: grid purchases | 0.19 | 0.38 |
| Electricity: PV | 0.12 | 0.36 |
| Electricity: transfers received | – | 4.19 |
| Electricity: battery discharge | 0.01 | 0.06 |
| Electricity: battery charge | 0.012 | 0.077 |
| Electricity: load curtailment | 0 | 0.060 |
| Electricity: demand shifted (down/up) | 0.07/0.07 | 1.10/1.10 |
| Electricity: load | 7.43 | 19.16 |
| Electricity: heat pump input | 1.24 | 2.39 |
| Electricity: transfers sent | – | 4.19 |
| Heat: CHP | 10.75 | 26.71 |
| Heat: boiler | 28.26 | 23.42 |
| Heat: heat pump | 4.33 | 8.37 |
| Heat: thermal store discharge/charge | 0/0 | 0.06/0.07 |
| Heat: demand shifted (down/up) | 0 / 0 | 0.59/0.59 |
| Heat: load | 43.34 | 58.49 |
Table 7 compares the characteristic points of the two frontiers. At ECOs, exchange saved €122/day (2.3%) and reduced emissions by 948 kg/day (5.0%). At KNEEs, the differences were €107/day (2.0%) and 152 kg/day (0.8%). At ENVs, exchange still saved €58/day (1.0%), while both schedules emitted about 16.80 t CO$_2$/day.
The settlement between EHs redistributes income, but it does not create community savings. EH1 and EH2 paid net amounts of €309 and €91, and EH3 received €401 (Table 5); apart from rounding, these payments cancel. The saving comes from the change in dispatch. Electricity that EH3 would otherwise have exported at the export price, or would not have generated at all, replaces purchases that EH1 and EH2 would have made at the retail price, and the transaction fee on the transferred energy is deducted from the difference.
Table 8 compares the two cases under a common cap of about 18 t CO$_2$/day, which is close to the emissions of the independent-operation KNEE. Under this cap, bilateral exchange lowers the operating cost from about €5,310/day to €5,140/day, a saving of about €170/day (3.2%), and reduces grid purchases from about 4,200 kWh/day to less than 380 kWh/day, a reduction of more than 90%. More than 4.1 MWh/day is transferred between the EHs. The saving is larger than the €107/day found between KNEEs, because the bilateral-exchange knee lies at lower emissions than the independent-operation knee, and its cost therefore includes part of the cost of further abatement.
ECO | KNEE | ENV | |
|---|---|---|---|
Independent cost (€/day) | 5,251 | 5,312 | 5,854 |
Exchange cost (€/day) | 5,129 | 5,205 | 5,796 |
$\Delta$ cost (€/day) | $-$122 | $-$107 | $-$58 |
Independent CO$_2$ (kg/day) | 18,980 | 17,998 | 16,797 |
Exchange CO$_2$ (kg/day) | 18,032 | 17,846 | 16,797 |
$\Delta$ CO$_2$ (kg/day) | $-$948 | $-$152 | 0 |
Quantity | Independent | Exchange |
|---|---|---|
CO$_2$ cap (t/day) | 18.0 | 18.0 |
Operating cost (€/day) | 5,312 | 5,142 |
Grid purchases (kWh/day) | 4,200 | 378 |
Transfers between EHs (MWh/day) | 0 | 4.19 |
Table 9 compares daily costs at common caps by linear interpolation between adjacent frontier points. The estimated savings fell from about €170/day at 18.00 t CO$_2$/day to €100/day at 17.50 t and about €60/day at the tightest caps shown. Dividing the cost increase by the emissions reduction between adjacent schedules gives the average abatement cost over that interval. For independent operation, it ranged from €0.03 to €0.11/kg CO$_2$ above the selected knee to about €0.36 to €0.57/kg below it. With exchange, the first interval from the minimum-cost point averaged €0.41/kg. Both frontiers approached €0.57/kg over the final interval.
Cap (t CO$_2$/day) | Independent (€/day) | Exchange (€/day) | Saving (€/day) |
18.00 | 5,312 | 5,142 | 170 (3.2%) |
17.75 | 5,402 | 5,258 | 145 (2.7%) |
17.50 | 5,497 | 5,396 | 100 (1.8%) |
17.25 | 5,598 | 5,537 | 61 (1.1%) |
17.00 | 5,738 | 5,680 | 58 (1.0%) |
16.80 | 5,852 | 5,794 | 59 (1.0%) |
Whether a transfer also reduces emissions depends on where the transferred electricity comes from. If the CHP unit of the selling EH is already running to meet its heat demand, selling the surplus to a neighbor instead of exporting it does not change fuel use, and community emissions change only through the grid purchases that the transfer displaces. Under the accounting of Eq. (9), an export earns no emission credit, so this shift reduces emissions by the neighbor’s avoided purchases. If the transfer instead requires additional CHP output, the extra gas has to be weighed against the grid electricity it replaces. Provided the recovered heat displaces boiler heat, this electricity carries the effective emission rate of Eq. (40), and the transfer lowers emissions only if the grid emission factor exceeds it (Table 2).
The results agree with this reasoning. At ECOs, where emissions are unconstrained, exchange reduced emissions by 948 kg/day because CHP electricity from EH3 replaced grid purchases in EH1 and EH2. At ENVs, both cases reached about 16.80 t CO$_2$/day. A likely explanation is that this floor is set mainly by the gas needed to meet the winter heat demand once grid purchases have been cut as far as the equipment and connection limits allow. Exchange then lowers the cost of reaching the floor but not the floor itself. A lower floor would require a different heat supply, for example more heat-pump operation supplied by local renewable electricity.
The saving found here is of the same order as reported for other coordinated multi-energy systems. Hua et al. [24] obtained a 1.48% reduction in energy purchase cost for interconnected integrated energy systems with aggregated demand response, whereas the present community saves 1.0–3.2% of its daily operating cost depending on the emission cap. The larger figure at loose caps reflects the heat-led CHP surplus, which has no counterpart in electricity-only prosumer communities. The finding that grid purchases fall by more than 90% while both schedules are held to the same emission cap also underlines a point made in studies of energy communities [2], [3]: higher local self-consumption is not by itself evidence of lower emissions.
For an existing surplus that replaces a grid purchase, the retail–export spread determines the maximum transaction fee that aligns with community savings (Eq. (39)). The bilateral price determines how buyer and seller divide that saving. The daily settlements in Table 5 record net payments of €309 from EH1 and €91 from EH2 and net receipts of €401 for EH3. Assessing the gain to each owner also requires its grid transactions and changes in equipment operating costs [41].
The emission results point to the limits of exchange in a gas-based community. Exchange makes better use of cogenerated electricity, but the lowest attainable emissions are practically the same with and without it. Further reductions require changing the heat supply itself, for example by running heat pumps more often when low-carbon electricity is available; studies of heat pumps in district heating networks show that their location and size strongly affect the benefit [42]. The relative value of CHP and heat pumps also depends on the grid emission factor used. With a time-varying factor, CHP generation would be most valuable in hours of carbon-intensive grid supply and heat pumps in hours of low-carbon supply [33], [34]. Eq. (9) uses a single grid factor and does not resolve this hourly variation.
Total electricity exchanged across the community peaked at about 320 kW and exceeded 200 kW in 11 hours. This aggregate describes when the EHs used their connections most heavily. Sizing an individual link would require the simultaneous bilateral flows on that link and load profiles beyond the winter day studied.
The results refer to a single winter day, on which heat-led CHP generation is the main source of traded electricity. With the lower heat demand of spring or summer, less CHP electricity would be available, the PV surplus around midday would become the main tradable resource, and the volume, direction and timing of the transfers would change. The daily figures therefore cannot be scaled to annual values; an annual estimate requires several representative days weighted by their frequency. The schedules assume perfect foresight of demand, PV output and prices, so the savings represent the maximum potential of a day-ahead scheduler in the presence of forecast errors. Hourly or marginal grid emission factors, instead of an average value, can change the estimated emission benefit of shifting and exchanging electricity [4]. The network is represented only by capacity limits; voltage limits and losses, as considered by Ullah and Park [19] and Liu et al. [20], would reduce the volumes that can be traded and hence the saving. Settlement determines how the gains are divided. Whether all owners would participate depends on their individual costs and revenues [41].
4. Conclusions
This study compared independent operation with bilateral electricity exchange for three heterogeneous EHs on a winter day in Turin, using cost–emission Pareto frontiers obtained with the $\epsilon$-constraint method. Under a common cap of about 18 t CO$_2$/day, exchange reduced the daily operating cost by about €170 (3.2%) and grid purchases by more than 90%, from about 4,200 kWh to less than 380 kWh. EH3, the most heat-intensive EH, supplied 3,763 kWh to its neighbors from CHP generation that followed its own heat demand.
The effect on emissions depended on the operating point. At minimum cost, the exchange reduced emissions by 948 kg CO$_2$/day (5.0%), but both cases reached practically the same minimum emissions. In this case, therefore, exchange made it cheaper to reach a given emission level without lowering the lowest attainable level. A lower floor would require changes to the heat supply, for instance, replacing part of the gas-fired heat with heat pumps operated when local renewable electricity is available.
When equipment output stays fixed, transferring an existing surplus saves the difference between the retail and export prices after the transaction fee. The benefit was smaller at tighter emission caps. Over the final interval, both frontiers had an average abatement cost of about €0.57/kg CO$_2$. On the study day, bilateral transfers reached 4.19 MWh, while battery discharge totaled 0.062 MWh.
For communities dominated by heat demand, the results suggest that the value of local exchange lies mainly in better use of cogenerated electricity. Its emission benefit should be assessed against the grid emission factor and the heat that the CHP output displaces; the reduction in grid purchases alone does not measure it. Future work will extend the analysis to seasonal representative days, forecast uncertainty, hourly grid emission factors, network losses and voltage limits, and cooperative cost-allocation rules.
Conceptualization, A.B.; methodology, A.B. and M.D.S.; software, A.B.; validation, A.B. and M.D.S.; formal analysis, A.B., N.B., and M.D.S.; investigation, M.D.S.; resources, A.B.; data curation, A.B.; writing—original draft preparation, A.B.; writing—review and editing, M.D.S.; visualization, A.B.; supervision, M.D.S.; project administration, N.B. and M.D.S. All authors have read and agreed to the published version of the manuscript.
The data used to support the research findings are available from the corresponding author upon request.
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Table A1. Variables and definitions in Equations (1)–(40)
Variable/Symbol | Definition | Equation |
|---|---|---|
\(Z_{\mathrm{cost}}\) | Total daily operating cost of the community | (1) |
\(C_{\mathrm{grid}}\) | Net cost of grid electricity imports and exports | (1) |
\(C_{\mathrm{gas}}\) | Cost of natural gas consumed by CHP units and boilers | (1) |
\(C_{\mathrm{OM}}\) | Variable operation and maintenance cost | (1) |
\(C_{\mathrm{curt}}\) | Penalty cost for electrical-load and PV curtailment | (1) |
\(C_{\mathrm{DR}}\) | Demand-response activation cost | (1) |
\(C_{\mathrm{P2P}}\) | Transaction/network fee associated with P2P electricity exchange | (1) |
\(C_{\mathrm{slack}}\) | Penalty cost for residuals in the electricity and heat balances | (1) |
\(i\) | Index identifying an EH | (2) |
\(t\) | Hourly time-period index | (2) |
\(P_{\mathrm{imp}}^{i,t}\) | Grid electricity import power of EH \(i\) at time \(t\) | (2) |
\(P_{\mathrm{buy}}^{t}\) | Grid electricity purchase price at time \(t\) | (2) |
\(P_{\exp}^{i,t}\) | Grid electricity export power of EH \(i\) at time \(t\) | (2) |
\(P_{\mathrm{sell}}^{t}\) | Grid electricity selling/export price at time \(t\) | (2) |
\(\Delta t\) | Duration of each time interval (1 h) | (2) |
\(G_{\mathrm{chp}}^{i,t}\) | Natural-gas consumption of the CHP unit in EH \(i\) at time \(t\) | (3) |
\(G_{b}^{i,t}\) | Natural-gas consumption of the boiler in EH \(i\) at time \(t\) | (3) |
LHV | Lower heating value of natural gas | (3) |
\(\lambda_{\mathrm{gas}}\) | Unit price of natural gas | (3) |
\(P_{\mathrm{e,chp}}^{i,t}\) | Electrical power output of the CHP unit in EH \(i\) at time \(t\) | (4) |
OM\(_{\mathrm{chp}}\) | Variable operation and maintenance cost coefficient of the CHP unit | (4) |
\(P_{\mathrm{h,b}}^{i,t}\) | Thermal power output of the boiler in EH \(i\) at time \(t\) | (4) |
OM\(_{b}\) | Variable operation and maintenance cost coefficient of the boiler | (4) |
\(P_{\mathrm{curt}}^{i,t}\) | Electrical load curtailed in EH \(i\) at time \(t\) | (5) |
PEN\(_{\mathrm{curt}}\) | Penalty coefficient for electrical-load curtailment | (5) |
\(P_{\mathrm{pv,curt}}^{i,t}\) | PV power curtailed in EH \(i\) at time \(t\) | (5) |
PEN\(_{\mathrm{PV,curt}}\) | Penalty coefficient for PV power curtailment | (5) |
PEN\(_{\mathrm{DR,e}}\) | Penalty coefficient for electrical demand-response activation | (6) |
\(P_{\mathrm{e,up}}^{i,t}\) | Upward electrical demand-response adjustment in EH \(i\) at time \(t\) | (6) |
\(P_{\mathrm{e,down}}^{i,t}\) | Downward electrical demand-response adjustment in EH \(i\) at time \(t\) | (6) |
PEN\(_{\mathrm{DR,h}}\) | Penalty coefficient for thermal demand-response activation | (6) |
\(P_{\mathrm{h,up}}^{i,t}\) | Upward thermal demand-response adjustment in EH \(i\) at time \(t\) | (6) |
\(P_{\mathrm{h,down}}^{i,t}\) | Downward thermal demand-response adjustment in EH \(i\) at time \(t\) | (6) |
fee$_{\mathrm{P2P}}$ | P2P transaction/network fee per unit of transferred electricity (€/kWh) | (7) |
\(j\) | Index identifying the counterpart EH in a bilateral exchange | (7) |
\(P_{\mathrm{share}}^{i,j,t}\) | Directed electrical power sent from EH \(i\) (seller) to EH \(j\) (buyer) at time \(t\) (kW) | (7) |
PEN\(_{\mathrm{slack}}\) | Penalty coefficient for electricity- and heat-balance residuals | (8) |
Slack\(_{\mathrm{E}}^{i,t}\) | Residual (slack) in the electricity balance of EH \(i\) at time \(t\) | (8) |
Slack\(_{\mathrm{H}}^{i,t}\) | Residual (slack) in the heat balance of EH \(i\) at time \(t\) | (8) |
\(Z_{\mathrm{CO_{2}}}\) | Daily CO\(_{2}\) emissions of the community | (9) |
EF\(_{\mathrm{grid}}\) | Emission factor of grid electricity (kg CO\(_{2}\)/kWh) | (9) |
EF\(_{\mathrm{gas}}\) | Emission factor of natural gas referred to its lower heating value (kg CO\(_{2}\)/kWh) | (9) |
\(\epsilon_{k}\) | Emission cap for the \(k\)-th \(\epsilon\)-constraint optimization problem | (10) |
\(k\) | Index identifying an emission-cap level | (10) |
\(K\) | Total number of emission-cap levels in the \(\epsilon\)-constraint method | (10) |
\(P_{\mathrm{share}}^{\max,i,j}\) | Maximum electricity-transfer capacity of the link between EHs \(i\) and \(j\) (kW) | (11) |
\(P_{\mathrm{share}}^{i,i,t}\) | Self-transfer from EH \(i\) to itself; constrained to zero to exclude self-trading | (12) |
\(P_{\mathrm{share,in}}^{i,t}\) | Total electricity received by EH \(i\) through P2P transfers at time \(t\) | (13) |
\(P_{\mathrm{share,out}}^{i,t}\) | Total electricity sent by EH \(i\) to other EHs through P2P transfers at time \(t\) | (13) |
\(L_{\mathrm{hub}}^{i,t}\) | Reference electricity price for EH \(i\) at time \(t\), determined by an EH-specific discount and a price floor | (14) |
\(L_{\min}\) | Minimum reference electricity price (price floor) in the P2P pricing rule | (14) |
\(\delta^{i}\) | EH-specific discount applied to the common market electricity price | (14) |
\(L^{t}\) | Common market electricity price at time \(t\) | (14) |
\(p_{\mathrm{P2P}}^{i,j,t}\) | P2P transaction price for electricity transferred between EHs \(i\) and \(j\) at time \(t\) | (15) |
\(\delta_{\mathrm{P2P}}\) | Discount parameter defining the upper bound of the P2P price relative to the grid purchase price | (15) |
\(\delta_{\mathrm{sell}}\) | Premium parameter defining the lower bound of the P2P price relative to the grid export price | (17) |
Pay\(_{\mathrm{in}}^{i}\) | Total P2P electricity purchase expenditure of EH \(i\) | (19) |
Pay\(_{\mathrm{out}}^{i}\) | Total P2P electricity sales revenue of EH \(i\) | (20) |
Pay\(_{\mathrm{net}}^{i}\) | Net P2P settlement payment of EH \(i\): purchase expenditure minus sales revenue; positive means net payment | (21) |
\(C_{\mathrm{P2P}}^{\mathrm{fee}}\) | Total P2P transaction fee charged on all transferred electricity | (22) |
\(\eta_{\mathrm{chp}}^{\mathrm{e}}\) | Electrical efficiency of the CHP unit | (23) |
\(\eta_{\mathrm{chp}}^{\mathrm{h}}\) | Thermal efficiency of the CHP unit | (24) |
\(P_{\mathrm{h,chp}}^{i,t}\) | Thermal power output of the CHP unit in EH \(i\) at time \(t\) | (24) |
\(G_{\mathrm{chp}}^{\max,i}\) | Maximum natural-gas input capacity of the CHP unit in EH \(i\) | (26) |
\(P_{\mathrm{g}}^{i,t}\) | Net grid exchange of EH \(i\) at time \(t\); positive for imports and negative for exports | (29) |
\(P_{\mathrm{pv,use}}^{i,t}\) | PV electricity used locally by EH \(i\) at time \(t\) | (29) |
\(P_{\mathrm{es,d}}^{i,t}\) | Battery discharging power in EH \(i\) at time \(t\) | (29) |
\(P_{\mathrm{e,down}}^{i,t}\) | Downward electrical demand-response adjustment in EH \(i\) at time \(t\) (defined above) | (29) |
\(P_{\mathrm{curt}}^{i,t}\) | Curtailed electrical load in EH \(i\) at time \(t\) (defined above) | (29) |
\(P_{\mathrm{el}}^{i,t}\) | Electrical load demand of EH \(i\) at time \(t\) | (29) |
\(P_{\mathrm{es},c}^{i,t}\) | Battery charging power in EH \(i\) at time \(t\) | (29) |
\(P_{\mathrm{e,up}}^{i,t}\) | Upward electrical demand-response adjustment in EH \(i\) at time \(t\) (defined above) | (29) |
\(P_{\mathrm{e,hp}}^{i,t}\) | Electrical input power of the heat pump in EH \(i\) at time \(t\) | (29) |
\(\eta_{\mathrm{b}}\) | Thermal efficiency of the boiler | (30) |
\(P_{\mathrm{h,b}}^{\max,i}\) | Maximum thermal output capacity of the boiler in EH \(i\) | (30) |
\(P_{\mathrm{h,hp}}^{i,t}\) | Thermal power output of the heat pump in EH \(i\) at time \(t\) | (31) |
COP | Coefficient of performance of the heat pump | (31) |
\(P_{\mathrm{e,hp}}^{\max,i}\) | Maximum electrical input power capacity of the heat pump in EH \(i\) | (31) |
\(E_{\mathrm{es}}^{i,t}\) | Energy content of the battery in EH \(i\) at time \(t\) | (32) |
\(E_{\mathrm{es}}^{i,t-1}\) | Battery energy content in EH \(i\) at the end of the preceding time interval | (32) |
\(\eta_{\mathrm{es}}^{\mathrm{c}}\) | Charging efficiency of the battery | (32) |
\(\eta_{\mathrm{es}}^{\mathrm{d}}\) | Discharging efficiency of the battery | (32) |
\(E_{\mathrm{es}}^{\min,i}\) | Minimum allowable energy content of the battery in EH \(i\) | (33) |
\(E_{\mathrm{es}}^{\max,i}\) | Maximum allowable energy content of the battery in EH \(i\) | (33) |
\(P_{\mathrm{es}}^{\max,i}\) | Maximum charging/discharging power capacity of the battery in EH \(i\) | (33) |
\(E_{\mathrm{hs}}^{i,t}\) | Energy content of the thermal energy storage system in EH \(i\) at time \(t\) | (34) |
\(E_{\mathrm{hs}}^{i,t-1}\) | Thermal-storage energy content in EH \(i\) at the end of the preceding time interval | (34) |
\(\eta_{\mathrm{hs}}^{\mathrm{c}}\) | Charging efficiency of the thermal energy storage system | (34) |
\(P_{\mathrm{hs},c}^{i,t}\) | Thermal energy storage charging power in EH \(i\) at time \(t\) | (34) |
\(\eta_{\mathrm{hs}}^{\mathrm{d}}\) | Discharging efficiency of the thermal energy storage system | (34) |
\(P_{\mathrm{hs,d}}^{i,t}\) | Thermal energy storage discharging power in EH \(i\) at time \(t\) | (34) |
\(\alpha_{\mathrm{e}}\) | Proportional upper-bound coefficient for electrical demand-response adjustments | (36) |
\(\alpha_{\mathrm{h}}\) | Proportional upper-bound coefficient for thermal demand-response adjustments | (36) |
\(P_{\mathrm{hl}}^{i,t}\) | Thermal load demand of EH \(i\) at time \(t\) | (36) |
\(P_{\mathrm{grid}}^{\max,i}\) | Maximum grid import/export capacity of EH \(i\) | (38) |
\(\Delta c^{t}\) | Community-level economic gain per unit of electricity transferred at time \(t\) | (39) |
\(e_{\mathrm{eff}}\) | Effective CO\(_{2}\) emission factor of additional CHP electricity generation, accounting for recovered heat displacing boiler heat | (40) |
Note: CHP = combined heat and power; EH = energy hub; P2P = peer-to-peer; PV = photovoltaic.
