Next Article in Journal
A Contemporary Review on Deep Learning Models for Drought Prediction
Next Article in Special Issue
Source-Load Coordinated Low-Carbon Economic Dispatch of Microgrid including Electric Vehicles
Previous Article in Journal
Emissions Trading Systems, Structure Adjustment and Air Pollution Reduction: Evidence from Enterprises in China
Previous Article in Special Issue
A Demand Response Transaction Method for Integrated Energy Systems with a Trigonometric Membership Function-Based Uncertainty Model of Costumers’ Responsive Behaviors
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Novel Decentralized Peer-to-Peer Gas and Electricity Transaction Market between Prosumers and Retailers Considering Integrated Demand Response Programs

by
Hassan Khazaei
1,
Hossein Aghamohammadloo
1,
Milad Habibi
2,
Mehdi Mehdinejad
1 and
Amin Mohammadpour Shotorbani
3,*
1
Center of Excellence for Power Systems Automation and Operation, School of Electrical Engineering, Iran University of Science and Technology, Tehran 16846-13114, Iran
2
Faculty of Electrical and Computer Engineering, University of Tabriz, Tabriz 51666-16471, Iran
3
Faculty of Applied Science, University of British Columbia-Okanagan, Kelowna, BC V1V 1V7, Canada
*
Author to whom correspondence should be addressed.
Sustainability 2023, 15(7), 6165; https://doi.org/10.3390/su15076165
Submission received: 12 February 2023 / Revised: 20 March 2023 / Accepted: 27 March 2023 / Published: 3 April 2023
(This article belongs to the Special Issue Smart Grids, Sustainable Energy System, and Low-Carbon Technologies)

Abstract

:
This paper proposes a novel peer-to-peer (P2P) decentralized energy market consisting of retailers and prosumers considering integrated demand response (IDR). Retailers can trade electrical energy and gas with prosumers in a P2P way to maximize their welfare. Since they are equipped with electrical storage and power self-generation units, they can benefit from selling power not only to the upstream network but also to prosumers. In peer-to-peer transactions, the prosumers purchase electricity as well as gas from retailers. Because of their access to the competitive retail market, including some retailers, they enjoy more freedom to reduce their energy supply cost. In addition, the prosumers are equipped with an energy hub consisting of combined heat and power (CHP) units and electric pumps, allowing them to change their energy supply according to price fluctuations. Furthermore, they have some changeable electrical and thermal load enabling them to change their load if needed. To clear the proposed P2P decentralized market, a fully decentralized approach called the fully decentralized alternating direction method of multipliers (ADMM) is applied. This method does not require a supervisory entity and, thus, preserves the players’ private information. The numerical studies performed on a system with two retailers and multiple prosumers demonstrate the feasibility and effectiveness of the proposed decentralized market. The results also show that the proposed decentralized algorithm achieves the optimal global solution, compared with the centralized approach.

1. Introduction

The widespread deployment of distributed energy resources (DERs) and combined heat and power (CHP) plants, as well as advancements in computation and communicational technologies, have led to the emergence of new consumers known as prosumers, with the capability of generation, storage, and load management [1]. These evolutions have brought new challenges and opportunities to electricity markets. As power systems move toward decentralized management, electricity markets should also enable the active participation of prosumers through decentralization. This has recently been made possible by introducing peer-to-peer (P2P) electricity markets, which allow prosumers to share and invest in energy [2]. For efficient management of the energy, every prosumer in these markets can locally trade energy with other prosumers or even with the retail market. They can also use multienergy carrier systems to reduce the costs of more expensive energy carriers and, consequently, the total energy supply costs.

1.1. Related Works

This section reviews the studies conducted on short-term planning of retail energy management and P2P energy and gas trading.
In [3], prosumer integration in the wholesale market was explored, addressing the uncertainties in renewable generation and wholesale market prices by using a stochastic programming model. The battery storage enabled bilateral electricity transactions with the market and contributed to local flexibility for prosumers. The P2P energy transaction in an electricity market with high penetration of DERs was evaluated in [4], considering line flow constraints to avoid overload and congestion. A novel algorithm using the primal-dual gradient method was developed to clear the market without interaction with a central entity. In [5], an ancillary service market to deal with violations of grid constraints for P2P energy trading was presented. The proposed P2P trading market supports the grid operation regarding loss reduction, voltage support, and congestion management. Voltage regulation and loss reduction are important objectives for utilities [6]. In [7], multiclass energy management to coordinate energy trading among prosumers with heterogeneous preferences in the P2P energy market was studied. The model minimized power loss and battery depreciation costs while considering the prosumers’ added value and individual preferences. The presented market was cleared using the ADMM algorithm. Presented in [8] is a distributed framework based on machine learning to illustrate the relationship between retailer and prosumer. However, the proposed model is only for a retailer and a prosumer. In [9], a pool-structured P2P trading market was proposed with the objective of maximizing the social welfare of all prosumers by trading market products with/without intertemporal dependences. Trading was performed by a blockchain mechanism that uses smart contract functionality to manage the balances of digital tokens called EuroTokens. Jing et al. [10] applied a Nash-type noncooperative game between commercial and residential prosumers to model P2P energy trading. The integrated energy management criteria, including demand response, battery storage, and thermal storage, were considered in energy trading. The problem was linearized and solved using the McCormick relaxation method.
Xu et al. [11] studied the interactions of energy hubs with a multiperiod operational model. An ADMM approach with neighboring information exchange was applied to optimize multienergy flows. In [12], the scheduling of multimicrogrid systems was explored by using the decentralized-distributed (DD) adaptive robust optimization (ARO) method. A DD-ARO model was proposed based on the parallelizing-distributed (PD) framework to assign tie-line power coordination in the virtual center for neighboring stakeholders. The model was solved by using the column-and-constraint generation (CCG) algorithm. In the CCG algorithm, the ARO problem is decomposed into a master and subproblem. The optimization problem is solved using an iterative process [13]. In [14], P2P energy trading between a group of houses equipped with micro fuel cells and CHP units was assessed. The objective function for the houses was to minimize their costs resulting from gas consumption and P2P electricity trading. More importantly, each house could only serve as a buyer or a seller at each time step. The problem was linearized using a linearization method and solved by the ADMM algorithm. In [15], the energy management of microgrids using a decentralized multiagent energy management system was presented. EMS performs power dispatch of each microgrid with the objective of minimizing power exchange with the grid. Another EMS related to microgrid cluster plans the power sharing between different microgrids. In addition to the normal operation, the fault operation is also implemented using the Simulink and JADE platforms.
The operation of networked microgrids as energy hubs was investigated in [16], considering information privacy and microgrid security through a decentralized energy management system. A decentralized solution based on a robust ADMM model was applied to the interconnected operation mode of microgrids and distribution networks. Hayes et al. in [17], found that a moderate level of P2P transactions had no considerable impact on the operational performance of the network. By co-simulation of electricity distribution networks and local P2P energy trading platforms, they studied the impact of P2P energy trading on the performance of the low- and moderate-voltage distribution networks. In [18], an energy management approach was proposed for a residential energy hub considering the uncertainty in the output power of the hub on the demand side and the charge load of electric vehicles on the demand side. Furthermore, the impact of environmental and seasonal parameters in energy management was taken into account. The effects of different charging modes of vehicles, including vehicle-to-grid and grid-to-vehicle modes, were also addressed. In [19], a decentralized energy management framework among multiple energy hubs (MEHs) was suggested to improve the economic performance of an interconnected energy hub system. An improved ADMM algorithm was employed to achieve the coordination of energy hubs. Liu et al. [20] developed a secure distributed transactive energy management (S-DTEM) scheme for multiple interconnected microgrids. Only trading amounts and prices with each microgrid for the distributed energy management system were exchanged to protect information privacy. When each microgrid behaves as a price taker, the simultaneous use of the ADMM algorithm minimizes its local cost and the aggregate cost of the interconnected microgrids. The distributed energy management and strategy optimization for a regional microgrid was developed in [21] using a multiagent reinforcement learning (MARL) scheme. Independent real-time decisions were generated while keeping the balance of the benefits during interactive learning of agents. A multiagent deep Q-network (MADQN) was applied to approximate the value function. An optimal equilibrium selection mechanism was employed to calculate the collective update objective, promoting learning efficiency. In [22], an energy trading framework for distribution networks with high PV penetration was proposed. The P2P energy exchange mechanism was integrated with the OPF technique. The problem was modeled by Nash bargaining theory and solved based on the ADMM algorithm while taking privacy protection into account. In [23], a coalition game theory is proposed to implement the P2P energy trading in microgrid with distributed generation and battery energy storage systems with the aim of enhancing the prosumer’s profit. Microgrid operators check the customer’s purchasing offers and selling bids to earn the minimum overall energy consumption. In [24], the aim is to provide insights regarding the economic viability of energy flows within a renewable energy community based on a linear optimization model with peer-to-peer electricity trading. This study has modeled different technologies, such as PV, heat pumps, and community battery storage.
In [25], the competition in a retail energy market with energy hubs as its players was evaluated. The retailers concurrently sell electricity, heat, and gas to the prosumers. Given the price bids, the prosumers decide from which retailer and how much energy to buy. The problem was modeled and solved using a multifollower–multileader game. In [26], optimal business models for a P2P energy trading platform were presented. The paper discussed how the households under study would participate in a P2P energy trading platform and how business models support such platforms. Davoudi and Moeini-Aghtaie [27] designed an energy market based on the P2P concept at the distribution level while addressing the interdependences between energy carriers.
The following study gaps are evident based on the reviewed studies:
  • Competitive market model: Many previous studies have failed to address the effect of retail competition and have considered only one retailer to model the interactions between consumers and sellers.
  • Fully decentralized P2P market model: In some studies, the interactions between retailers and prosumers are not fully P2P and bilateral.
  • Integrated demand response: Most studies employ conventional demand response programs such as load shifting or curtailment. These approaches do not allow the participation of must-run loads in demand response programs. By using the equipment in their possession to change their energy source, the prosumers can enjoy the benefits of the demand response program without changing the load.
  • Market clearing with a fully decentralized approach: The market clearing approaches used in some former studies are not fully decentralized and require private information to be exchanged to clear the market. Given the P2P nature of the problem, it should be solved by using a fully decentralized approach.

1.2. Novelty

This paper develops a novel market model for fully decentralized P2P electrical energy and gas trading between retailers and prosumers. Retailers are equipped with self-power generation units and electrical storage. They purchase electrical energy and gas from the wholesale market and sell them to prosumers. Additionally, they exploit the capability of self-power generation, electrical storage, and the electricity market price difference at different hours to maximize their profit from trading with prosumers and the electricity network. Creating competition in the market contributes to more degrees of freedom and cost reduction for prosumers. Prosumers separately negotiate with retailers and reach an agreement about electrical energy and gas. Given that, unlike electricity, the gas price does not vary over 24 h, at peak electricity price hours, the prosumers change their energy source to supply a proportion of the electrical load from CHP units. They also have some changeable load that is convertible from electrical to the thermal load and vice versa. After bilateral negotiations with retailers, the prosumers schedule their electrical and thermal demands to minimize their costs without disclosing private information. A fully decentralized ADMM approach is applied to clear the proposed market.
The contributions of this paper are summarized as follows:
  • This paper designs and models a fully decentralized competitive P2P energy and gas market for retailers equipped with electrical storage and self-power generation unit and prosumers having CHP units, boilers, and heat pumps in the smart grid environment. The prosumers can trade electrical energy and gas with retailers as their peers in this market.
  • The model enables the participation of must-run loads in prosumers’ integrated demand response program. The prosumers change their energy supply source based on the fluctuations in electricity prices.
  • A fully decentralized ADMM approach is applied to clear the proposed decentralized electricity and gas market. This method guarantees the feasibility of the solution that does not require a supervisory node and achieves the global solution according to the problem’s nature (convexity).

1.3. Paper Organization

The paper is organized as follows:
  • Section 2: The section elaborates conceptually on the commercial P2P energy trading platform and presents a mathematical model of the proposed market.
  • Section 3: The section provides the numerical studies of the proposed market and discusses the simulation results.
  • Section 4: The conclusions are drawn in this section.

2. Problem Definition

This paper designs and models a P2P decentralized electricity and gas market for retailers and prosumers. The prosumers purchase the power and gas required by their generation units from the retailers. The retailers are equipped with electrical storage and self-power generation units to reduce their risk and increase their expected profit. These players utilize the price difference in the wholesale market (electricity and gas wholesale market) at different hours to gain a higher profit. They supply their load from the grid and charge their energy storage batteries at low-price hours. Conversely, when the grid price is high, they meet their demand from their self-generation units and battery discharge and sell their excess power to the grid. In addition to electrical energy, these players also sell gas to the prosumers.
The prosumers have access to multiple retailers to supply their required energy and gas, which encourages competition in the market. They are also equipped with CHP, boiler, and heat pump units. Using various energy generation equipment, such as CHP units, they can switch the energy source from electricity to gas, and vice versa, increasing the total welfare of the system. By implementing an integrated demand response program during peak load and peak price periods, the prosumers purchase gas, instead of electricity, from the grid to fulfill their demand. While the load decreases from the grid’s perspective, the prosumers also supply their loads, which enhances the total welfare of the system. The proposed market is a forward market in terms of the time structure. Considering the definition of players, time structure, and assumptions, the setup of the proposed problem is as follows.
As shown in Figure 1, the prosumers present their demand signals y j i t e and y j i t g to the retailers. After receiving the demand signals, the retailers update their price bids to the prosumers, λ i j t e , and λ i j t g . They also determine their selling levels x j i t e and x j i t g according to these prices and then announce these selling quantities and prices to the prosumers. The prosumers use these signals to determine and announce their units’ generation and the purchasing quantities of power and gas from each retailer. Based on these values, the retailers plan their self-generation units, battery charging and discharging, and power selling amount to the upstream network. This cycle continues until the stopping criterion of the proposed decentralized algorithm is met.
The price and amount of power and gas are the only information exchanged between retailers and prosumers. Thus, the players’ privacy is entirely preserved, and the units’ operational and sensitive commercial information (such as local generation cost coefficients) is not disclosed. Thus, the proposed market is a fully decentralized energy and gas market for P2P interactions between retailers and prosumers.

2.1. Mathematical Modeling

A market with N players comprised of N S = { 1 , , N S } retailers and N P = { 1 , , N P } prosumers is considered so that N P N S = . The roles of retailers and prosumers are assumed to be fixed during the scheduling period, meaning that the retailers do not purchase energy from the local prosumers and the prosumers are only price-takers. The prosumers generate and store the electrical and thermal energy required by their heat and power generation units and compensate for their energy and gas deficiency by purchasing from the retailers. In contrast, retailers can have both seller and buyer roles during the scheduling period. They can purchase power and gas from the wholesale market at a known price (for each scheduling period), generate electricity via self-generation units, and sell electricity and gas to the prosumers. Furthermore, in the proposed model, the retailers can engage in bilateral P2P negotiations with the prosumers over the transactive energy amount and price. They behave freely and independently during the scheduling period and attempt to move toward their goals. The primary objective function of the proposed market is to minimize the sum of all prosumers’ costs while maximizing the sum of revenues of all retailers.
max x , y i = 1 N S R i j = 1 N B C j + j = 1 N B S W j
where C j and R i denote the energy and gas supply cost of prosumer j and the income of retailer i, respectively. S W j is the utility function of prosumers.

2.1.1. Retailer Model

Relations (2)–(10) formulate the maximization problem of each retailer’s profit from selling electricity and gas to the prosumers. The objective function of each retailer is presented in relation (2). The first term is related to the profit from selling energy to the prosumers, and the second term describes the costs of electrical energy generation and energy purchase. The retailers are also equipped with electrical storage to optimally manage their energy. x i j t e and x i j t g represent the quantities of electricity and gas, respectively, sold to each prosumer. Furthermore, x i t e D A and x i t g D A show the electricity and gas price in the wholesale market. λ i j t e is the electricity trading price, and λ i j t g is the gas trading price between retailers and prosumers. Given that more than one retailer exists in the market, the market is competitive. The prosumers can purchase their required energy from the retailer with a lower price bid. λ t e D A and x i g D A demonstrate the electricity and gas prices of the wholesale market, respectively.
Relation (3) shows the electrical power balance of each retailer at time t. The retailers can purchase power from the upstream network to supply electrical power to the prosumers. Additionally, the retailers can use their self-power generation x i t s g and storage ( y j t c h , y j t d c h ) for optimal energy management. Relation (4) exhibits the gas supply for selling to the prosumers, which is equal to purchasing from the wholesale market.
Relation (5) describes the cost function C i ( x i t s g ) of a self-generator belonging to retailer i, which supplies the power x i t s g . A convex quadratic function approximates this cost function with respect to x i t s g . The coefficients α i , β i , and γ i contain the private information of retailer i represented by positive predetermined parameters in the retailer’s cost function. Relations (6)–(10) describe the constraints of the energy storage system [28]. Relation (6) determines the energy level of the storage system per hour, which depends on charge and discharge levels at that hour and the remaining energy from the previous hour. Constraints (7)–(9) represent the minimum and maximum energy storage levels per hour and the maximum charge and discharge levels per hour [29]. At each hour, the storage can operate in either charge ( b j t c h = 1 ) or discharge ( b j t d c h = 1 ) mode, as shown in constraint (10).
max R i = t j λ i j t e x i j t e + λ i j t g x i j t g C i ( x i t s g ) λ t e D A x i t e D A λ g D A x i g D A
s.t.
j x i j t e + x i t B S S , d c h x i t e D A x i t s g x i t B S S , c h = 0
x i t g D A j x i j t g = 0
C x i t s g = α i ( x i t s g ) 2 + β i x i t s g + γ i
E i t E S S = 1 L o s s E S S E i t 1 , E S S + η E S S × x i t E S S , c h x i t E S S , d c h η E S S
C a p E S S , m i n = E i t E S S , E = C a p E S S , m a x
0 x i t E S S , c h x c h E S S , m a x
0 x i t E S S , d c h x d c h E S S , m a x
b j t c h + b j t d c h 1

2.1.2. Prosumer Model

Relations (11)–(19) minimize the energy consumption cost of prosumers. The relation (11) presents each prosumer’s objective function, which minimizes the cost of electricity and gas purchasing from retailers. The first term of this objective function indicates the utility function that models prosumers’ satisfaction level from consuming a certain amount of energy and response to energy price variations. Thus, these players determine their demand level according to energy prices. For buyer j at time t, the utility function is a piecewise quadratic function as given in relation (12) [30]. The second term in the objective function relates to the cost of buying energy from the retailer. According to the presented model, the prosumers purchase their required energy from a retailer that offers a lower price. The relation (13) imposes a constraint on prosumers’ electrical load supply.
Prosumers have access to multiple sources to manage their energy consumption. In addition to buying electrical energy from retailers, they can also purchase gas from retailers and use it in their CHP units to supply their required energy. For optimal energy management, the prosumers are also equipped with HP and have a changeable load. The constraint on thermal power balance is given in relation (14). Prosumers fulfill their heat demand by using CHP, boiler, and HP units. They also have changeable thermal loads. The relation (15) shows the gas supply required by CHP and boiler units, which equals the amount of gas purchased from retailers. Relations (16) and (17) describe the maximum input gas to CHP and boiler units.
max C j = t U y j t i λ i j t e y j i t e + λ i j t g y j i t g
s.t.
U y j t =   ω j y j t δ j y j t 2 y j t < ω j 2 δ j ω j 2 2 δ j y j t ω j 2 δ j
i y j i t e + η e c h p y j t g c h p + y P _ j t e _ c h a n g e y N _ j t e _ c h a n g e = y j t D e + a h y j t e , h p
η h c h p y j t g c h p + η b y j t g b + y j t h , h p + y P _ j t h _ c h a n g e y N _ j t h _ c h a n g e = y j t D h
y j t g c h p + y j t g b = i y j i t g
y j t g c h p y j g c h p _ m a x
y j t g b y j g b _ m a x
y j t e , h p y j e , h p _ M a x
y j t e i = i y j i t e + η e c h p y j t g c h p + y P t e _ c h a n g e
y j t h i = η h c h p y j t g c h p + η b y j t g b + y P _ j t e _ c h a n g e + a h y j t e , h p

2.1.3. Coupling Constraints

The optimization problems of retailers and prosumers are connected through relations (21) and (22). These relations are referred to as coupled constraints in optimization problems. This relation is regarded as market clearing conditions and states that at each time interval, the purchased amount of energy and gas by prosumer j should equal the amount sold by retailer i. The duals of these constraints ( λ i j e and λ i j g ) indicate the energy and gas trading price between prosumers and retailers.
x i j t e = y j i t e λ i j e
x i j t g = y j i t g λ i j g

2.2. Clearing Algorithm for the Proposed Decentralized Energy Market

Centralized implementation of the described optimization problem requires a central controller with access to the information of all players. The centralized approach is prone to players’ privacy breach and information disclosure by relying on a supervisory node. The present paper applies a decentralized approach using the ADMM algorithm for market clearing to tackle this issue.
In the proposed decentralized ADMM, each player requires a minimum information exchange with other players to solve its optimization problem. The coupled constraints (21) and (22) divide the optimization problem into several secondary subproblems based on the dual decomposition principle [31]. The secondary problem is then solved in a decentralized manner. ADMM approach allows problem decomposition in the incremental gradient method and convergence of the method of multipliers.
The reinforced Lagrangian for the presented optimization problem can be obtained from relation (23):
L = i = 1 N S R i j = 1 N B C j + j = 1 N B S W j + μ g x , y + λ i j e x i j t e y j i t e + λ i j g x i j t g y j i t g ρ x i j t e y j i t e 2 2 ρ x i j t g y j i t g 2 2
For simplification, the Lagrangian coefficient μ is used for the model of g x , y in all constraints except coupled constraints.
λ i j e is the coupling dual of the electrical part, and λ i j g is the coupling dual of the gas part in both retailer and prosumer problems. By adding the term ρ x i j t e y j i t e 2 2 ρ x i j t g y j i t g 2 2 to relation (23), reinforced Lagrangian ensures robustness and convergence [32]. ρ is a positive number indicating the penalty parameter.
The optimization problem of retailers is rewritten using the reinforced Lagrangian according to relation (24):
max x i e , x i g R i = t j λ i j t e x i j t e + λ i j t g x i j t g C i ( x i t s g ) λ t e D A x i t e D A λ g D A x i g D A ρ x i j t e y j i t e 2 2 ρ x i j t g y j i t g 2 2
s.t.
C o n s t r a i n t s ( 3 ) ( 10 )
Likewise, the prosumers’ problem is modeled using the reinforced Lagrangian as shown in relation (25):
max C j = t U y j t i λ i j t e y j i t e + λ i j t g y j i t g ρ x i j t e y j i t e 2 2 ρ x i j t g y j i t g 2 2
s.t.
C o n s t r a i n t s ( 12 ) ( 20 )
x i j t e and x i j t g , in the retailer’s problem, and y i j t e and y i j t g , in the prosumer’s problem, are predetermined parameters. In the ADMM approach, the main variables of both the buyer and seller problems are calculated from the corresponding subproblem using the incremental gradient method. The dual variable of the problem is updated iteratively:
x i e k + 1 = a r g   m i n x e   L ( x i e , y j i t e k , λ i j t e k )
y j e k + 1 = a r g   m i n y   L ( x i j t e k + 1 , y i e , λ i j t e k )
λ i j t e k + 1 = λ i j t e k ρ ( x i j t e k + 1 y j i t e k + 1 )
x i g k + 1 = a r g   m i n x g   L ( x i g , y j i t g k , λ i j t g k )
y j g k + 1 = a r g   m i n y g   L ( x i j t g k + 1 , y i g , λ i j t g k )
λ i j t g k + 1 = λ i j t g k ρ ( x i j t g k + 1 y j i t g k + 1 )
Instead of using a fixed update step ρ , a varying update step α k is provided. This coefficient is given in relations (32)–(33) [33]:
μ k + 1 = 1 + 1 + 4 ( μ k ) 2 2
α k + 1 = μ k 1 μ k + 1
In these relations, μ 0 = 1 is assumed. The stopping criterion for the proposed algorithm is presented below:
λ i j t e k + 1 λ i j t e k ϵ
λ i j t g k + 1 λ i j t g k ϵ
ϵ is an infinitesimal positive number close to zero.

3. Simulation

This section provides the numerical studies to evaluate the feasibility of the proposed P2P energy and gas market and the effectiveness of the proposed decentralized approach. The centralized approach results are compared with the proposed decentralized results in terms of optimality.

3.1. Test Platform

The numerical studies are carried out on a distribution system having two retailers and three prosumers. The average price of the New York wholesale market is derived from [34]. The predicted demand value is shown in Figure 2. Table 1 and Table 2 provide the private parameters related to the retailers and prosumers. The stopping criteria are taken as 0.0001.

3.2. Case Study 1

This section evaluates the results from P2P electrical energy transactions of retailers with prosumers and the upstream network (wholesale market). For the simple analysis of the obtained results, Figure 3 displays the P2P electrical energy transaction between retailer 1 and all the prosumers at 3:00, 9:00, 15:00, and 22:00 hours. Similarly, Figure 4 exhibits the P2P thermal energy transaction between retailer 1 and all prosumers at 9:00, 17:00, 20:00, and 23:00 hours. These figures indicate the complete convergence of the proposed decentralized approach between the retailer and the prosumers. Each player adopts a different strategy at different hours to maximize its welfare. The dynamics of the proposed decentralized model enables each player to maximize its individual social welfare while simultaneously increasing the social welfare of the local market.
As stated above, the retailers have self-generation units and electrical energy storage to increase their welfare and profit. When the wholesale market prices are high, they can use their self-generation unit and storage to supply their load and sell electrical energy to the upstream network. In contrast, when the prices are low, they obtain electrical energy from the upstream network to charge their energy storage system and satisfy their demand.
Figure 5 illustrates the interaction of retailer 1 with the upstream network, charge, and discharge of the storage, and also the self-generation, along with the wholesale market price curve. As is evident from this figure, at 1:00–6:00 and 9:00–16:00 hours, when the wholesale market price is low, the retailer uses the upstream network’s electrical energy to satisfy the load and charge the battery. As the wholesale market price increases at 7:00–8:00 and 17:00–20:00 hours, the retailer sells electricity to the upstream network using battery discharge and self-power generation. Additionally, at 21:00–23:00 hours, other than purchasing power from the upstream network, the retailer fulfills its electrical demand by using the self-power generation power and capacitor discharge. As shown in Figure 5, the retailer is not only dependent on the upstream network and has access to various resources to increase its welfare as well as the welfare of the whole system.
Table 3 provides the profit and cost of all market participants in the centralized and proposed decentralized approaches. The results suggest only a 0.003 percent difference between the two approaches, which verifies the effectiveness of the decentralized approach. The prosumers are equipped with CHPs and heat pumps to enhance their welfare and supply their thermal loads. Moreover, they have some changeable load. Figure 6 depicts the power supply of prosumer 1 along with gas price, retailer’s price bid, and the wholesale market price plots. At peak price hours, i.e., between 17:00 and 21:00 hours, the prosumer purchases a very small amount of power from the retailers and obtains gas from retailers instead of electrical energy. Thus, prosumer 1 satisfies its demand by using CHP power generation and changing its load (changeable load) to thermal power. Moreover, at 1:00–7:00 and 9:00–16:00 hours, when the price difference between electricity and gas is low, the heat pump unit is used to supply a portion of thermal power. Figure 7 also depicts the thermal load supply of prosumer 1 along with the wholesale electricity market price, wholesale gas market price, and retail gas market price curves. From 17:00 to 21:00 hours, when the electricity price is high, the prosumer uses boiler and CHP units to provide the thermal load. Because of the difference between electricity and gas prices at other hours, prosumer 1 uses the heat pump, boiler, and CHP units to supply its power.
Given the obtained results, the proposed decentralized model offers remarkable features other than the described decentralized benefits, including the integrated demand response concept. At peak electricity price hours, the prosumers and retailers use their internal capacity and change energy sources from electricity to gas to produce electrical energy by CHP units. While the load has reduced from the perspective of the upstream network, the power is not reduced or shifted. Thus, the social welfare of the whole system increases.

3.3. Case Study 2

This case study presents the effect of retail market competitiveness. Assuming that only one retailer exists for P2P energy transactions, Table 4 provides the monopoly mode results. Similar to the first case study, the centralized and presented decentralized approach results are identical. Obviously, in this case, the prosumers need to pay a higher cost (equal to USD 29,611.8) compared with the duopoly mode, because the retailer participates alone in the peer-to-peer market and has no other competitor to sell energy and gas to prosumers; retailers earn more profit. Although the retailer gains a higher profit, the social welfare is reduced compared with the former case as prosumers should pay more costs (because the market is a monopoly and prosumers do not have the ability to choose a retailer to buy electricity and gas). Figure 8 and Figure 9 respectively demonstrate electrical energy and gas trading between prosumers and retailers at various hours. As shown in these figures, more iterations are required in this case to reach an agreement and convergence. Therefore, in the competitive mode, prosumers enjoy higher degrees of freedom to achieve an agreement with each retailer. It should be noted that the existence of competition between retailers will control the price of energy in the proposed market and prevent excessively high prices.

4. Conclusions

In this paper, a dynamic, competitive, fully decentralized P2P energy and gas market for prosumers and retailers without reliance on a supervisory entity was designed and implemented. The retailers were equipped with electrical storage and self-generation power units and could exchange electricity and gas with the upstream network and prosumers while protecting their privacy. The prosumers were energy hubs having various facilities, including CHP units, heat pumps, and boilers. Moreover, the presence of a changeable load provided a degree of freedom to prosumers to change their loads. By having access to multiple retailers, the prosumers could freely and independently agree with each retailer over the trading price and amount of electrical power and gas in a competitive market. Given the presence of various sources, the prosumers could minimize their costs by changing energy sources from electricity to gas and vice versa. This concept was evaluated as an integrated demand response program. The integrated demand response increased the prosumers’ welfare. Applying the ADMM method for market clearing maximized the players’ welfare with less information exchange and without disclosure of the private information of market players. Furthermore, the solutions obtained in the case study had a minimal distance from the centralized approach, indicating that the global solution is achieved close to the centralized method. Finally, the effect of competition in the market on price reduction was examined. Given the results of the monopoly mode, the prosumers’ cost increased by 21.8%, which suggests the effect of competition on reducing the costs in the proposed decentralized model. The following suggestions are proposed for future studies:
  • Consider the electricity and gas network constraints.
  • Consider the uncertainties of wholesale electricity market prices and demand.
  • Design the strategy for retailers to determine the electricity and gas prices first and modify that according to the feedback they receive from prosumers.

Author Contributions

H.K.: Conceptualization, Mathematical Designing, Software, Data curation, Methodology, Visualization, Writing—Original draft preparation. H.A.: Conceptualization, Mathematical Designing, Software, Methodology, Visualization, Writing—Original draft preparation. M.H.: Conceptualization, Mathematical Designing, Software, Methodology, Visualization, Writing—Original draft preparation. M.M.: Conceptualization, Mathematical Designing, Software, Data curation, Methodology, Visualization, Writing—Original draft preparation. A.M.S.: Supervision, Conceptualization, Data curation, Reviewing and Editing, Funding Acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

IndexesDefinition
tTime index
iRetailer index
jProsumer index
kRepetition index
parameters
α i , β i and γ i Cost function parameters for retailer i ($/kWh 2 , $/kWh, $)
ω i , δ i Utility function parameters for prosumer j ($/kWh, $/kWh 2 )
x c h E S S , m a x , x d c h E S S , d c h Maximum of charging/discharge power of electrical energy storage system
η e g , c h p Efficiency of gas consumed by the CHP unit
η e g , b Efficiency of gas consumed by the boiler unit
a h Efficiency of electrical consumed by the heat pump unit
L o s s E S S Losses of storage system
η E S S Efficiency of charging/discharging of storage system
x c h E S S , m a x , x c h E S S , m a x Maximum of energy charged/discharged in electrical energy storage
Variables
C j Energy and gas supply cost of prosumer j
R i Income of retailer i
S W j Utility function of prosumers
x i j t e Quantities of electricity sold to each prosumer
x i j t g Quantities of gas sold to each prosumer
x i j t e D A Electricity price in the wholesale market
x i j t g D A Gas price in the wholesale market
λ i j t e Electricity trading price
λ i j t g Gas trading price between retailers and prosumers
λ t e D A Electricity prices of the wholesale market
λ t g D A Gas prices of the wholesale market
x i t s g Self-power generation
y j t c h , y j t d c h Charging/discharging power of electrical energy storage system
C i ( x i t s g )Cost function of a self-generator belonging to retailer i
b j t c h , b j t d c h Binary variable for determining the state of charging/discharging of system storage
x i t E S S , c h , x i t E S S , d c h Charging/discharging power of electrical energy storage
y j t D e Energy participated in demand response program by prosumer j at time t
y j t g b Gas consumed by boiler units
y j t g c h p Gas consumed by CHP units
y j t e h p Electricity consumed by the heat pump units

References

  1. Gottwalt, S.; Gärttner, J.; Schmeck, H.; Weinhardt, C. Modeling and valuation of residential demand flexibility for renewable energy integration. IEEE Trans. Smart Grid 2016, 8, 2565–2574. [Google Scholar] [CrossRef]
  2. Sousa, T.; Soares, T.; Pinson, P.; Moret, F.; Baroche, T.; Sorin, E. Peer-to-peer and community-based markets: A comprehensive review. Renew. Sustain. Energy Rev. 2019, 104, 367–378. [Google Scholar] [CrossRef] [Green Version]
  3. Zepter, J.M.; Lüth, A.; del Granado, P.C.; Egging, R. Prosumer integration in wholesale electricity markets: Synergies of peer-to-peer trade and residential storage. Energy Build. 2019, 184, 163–176. [Google Scholar] [CrossRef]
  4. Khorasany, M.; Mishra, Y.; Ledwich, G. A decentralized bilateral energy trading system for peer-to-peer electricity markets. IEEE Trans. Ind. Electron. 2019, 67, 4646–4657. [Google Scholar] [CrossRef] [Green Version]
  5. Zhang, K.; Troitzsch, S.; Hanif, S.; Hamacher, T. Coordinated market design for peer-to-peer energy trade and ancillary services in distribution grids. IEEE Trans. Smart Grid 2020, 11, 2929–2941. [Google Scholar] [CrossRef]
  6. Najafi, S.; Lakouraj, M.M.; Sedgh, S.A.; Livani, H.; Benidris, M.; Fadali, M. Chance-Constraint Volt-VAR Optimization in PV-Penetrated Distribution Networks. In Proceedings of the 2022 IEEE Kansas Power and Energy Conference (KPEC), Manhattan, KS, USA, 25–26 April 2022; IEEE: New York, NY, USA, 2022; pp. 1–6. [Google Scholar]
  7. Morstyn, T.; McCulloch, M.D. Multiclass energy management for peer-to-peer energy trading driven by prosumer preferences. IEEE Trans. Power Syst. 2018, 34, 4005–4014. [Google Scholar] [CrossRef]
  8. Nejati Amiri, M.H.; Mehdinejad, M.; Mohammadpour Shotorbani, A.; Shayanfar, H. Heuristic Retailer’s Day-Ahead Pricing Based on Online-Learning of Prosumer’s Optimal Energy Management Model. Energies 2023, 16, 1182. [Google Scholar] [CrossRef]
  9. Esmat, A.; de Vos, M.; Ghiassi-Farrokhfal, Y.; Palensky, P.; Epema, D. A novel decentralized platform for peer-to-peer energy trading market with blockchain technology. Appl. Energy 2021, 282, 116123. [Google Scholar] [CrossRef]
  10. Jing, R.; Xie, M.N.; Wang, F.X.; Chen, L.X. Fair P2P energy trading between residential and commercial multi-energy systems enabling integrated demand-side management. Appl. Energy 2020, 262, 114551. [Google Scholar] [CrossRef]
  11. Xu, D.; Wu, Q.; Zhou, B.; Li, C.; Bai, L.; Huang, S. Distributed multi-energy operation of coupled electricity, heating, and natural gas networks. IEEE Trans. Sustain. Energy 2019, 11, 2457–2469. [Google Scholar] [CrossRef]
  12. Qiu, H.; You, F. Decentralized-distributed robust electric power scheduling for multi-microgrid systems. Appl. Energy 2020, 269, 115146. [Google Scholar] [CrossRef]
  13. Sedgh, S.A.; Doostizadeh, M.; Aminifar, F.; Shahidehpour, M. Resilient-enhancing critical load restoration using mobile power sources with incomplete information. Sustain. Energy Grids Netw. 2021, 26, 100418. [Google Scholar] [CrossRef]
  14. Nguyen, D.H.; Ishihara, T. Distributed peer-to-peer energy trading for residential fuel cell combined heat and power systems. Int. J. Electr. Power Energy Syst. 2021, 125, 106533. [Google Scholar] [CrossRef]
  15. Harmouch, F.Z.; Krami, N.; Hmina, N. A multiagent based decentralized energy management system for power exchange minimization in microgrid cluster. Sustain. Cities Soc. 2018, 40, 416–427. [Google Scholar] [CrossRef]
  16. Nikmehr, N. Distributed robust operational optimization of networked microgrids embedded interconnected energy hubs. Energy 2020, 199, 117440. [Google Scholar] [CrossRef]
  17. Hayes, B.P.; Thakur, S.; Breslin, J.G. Co-simulation of electricity distribution networks and peer to peer energy trading platforms. Int. J. Electr. Power Energy Syst. 2020, 115, 105419. [Google Scholar] [CrossRef]
  18. Emrani-Rahaghi, P.; Hashemi-Dezaki, H.; Hasankhani, A. Optimal stochastic operation of residential energy hubs based on plug-in hybrid electric vehicle uncertainties using two-point estimation method. Sustain. Cities Soc. 2021, 72, 103059. [Google Scholar] [CrossRef]
  19. Wang, X.; Liu, Y.; Liu, C.; Liu, J. Coordinating energy management for multiple energy hubs: From a transaction perspective. Int. J. Electr. Power Energy Syst. 2020, 121, 106060. [Google Scholar] [CrossRef]
  20. Liu, Y.; Gooi, H.B.; Li, Y.; Xin, H.; Ye, J. A secure distributed transactive energy management scheme for multiple interconnected microgrids considering misbehaviors. IEEE Trans. Smart Grid 2019, 10, 5975–5986. [Google Scholar] [CrossRef]
  21. Fang, X.; Zhao, Q.; Wang, J.; Han, Y.; Li, Y. Multi-agent Deep Reinforcement Learning for Distributed Energy Management and Strategy Optimization of Microgrid Market. Sustain. Cities Soc. 2021, 74, 103163. [Google Scholar] [CrossRef]
  22. Li, J.; Zhang, C.; Xu, Z.; Wang, J.; Zhao, J.; Zhang, Y.J.A. Distributed transactive energy trading framework in distribution networks. IEEE Trans. Power Syst. 2018, 33, 7215–7227. [Google Scholar] [CrossRef]
  23. Huang, H.; Nie, S.; Lin, J.; Wang, Y.; Dong, J. Optimization of Peer-to-Peer Power Trading in a Microgrid with Distributed PV and Battery Energy Storage Systems. Sustainability 2020, 12, 923. [Google Scholar] [CrossRef] [Green Version]
  24. Fina, B.; Schwebler, M.; Monsberger, C. Different technologies’ impacts on the economic viability, energy flows and emissions of energy communities. Sustainability 2022, 14, 4993. [Google Scholar] [CrossRef]
  25. Aghamohammadloo, H.; Talaeizadeh, V.; Shahanaghi, K.; Aghaei, J.; Shayanfar, H.; Shafie-khah, M.; Catalão, J.P.S. Integrated Demand Response programs and energy hubs retail energy market modelling. Energy 2021, 234, 121239. [Google Scholar] [CrossRef]
  26. Karami, M.; Madlener, R. Business models for peer-to-peer energy trading in Germany based on households’ beliefs and preferences. Appl. Energy 2022, 306, 118053. [Google Scholar] [CrossRef]
  27. Davoudi, M.; Moeini-Aghtaie, M. Local energy markets design for integrated distribution energy systems based on the concept of transactive peer-to-peer market. IET Gener. Transm. Distrib. 2022, 16, 41–56. [Google Scholar] [CrossRef]
  28. Mehdinejad, M.; Shayanfar, H.A.; Mohammadi-Ivatloo, B.; Nafisi, H. Designing a robust decentralized energy transactions framework for active prosumers in peer-to-peer local electricity markets. IEEE Access 2022, 10, 26743–26755. [Google Scholar] [CrossRef]
  29. Shen, Z.; Wu, L.; Sedgh, S.A.; Radmehr, F. Optimal operation scheduling of a microgrid using a novel scenario-based robust approach. In Engineering Optimization; Taylor & Francis: Abingdon, UK, 2023; pp. 1–22. [Google Scholar]
  30. Mehdinejad, M.; Shayanfar, H.; Mohammadi-Ivatloo, B. Peer-to-peer decentralized energy trading framework for retailers and prosumers. Appl. Energy 2022, 308, 118310. [Google Scholar] [CrossRef]
  31. Boyd, S.; Parikh, N.; Chu, E.; Peleato, B.; Eckstein, J. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends® Mach. Learn. 2011, 3, 1–122. [Google Scholar]
  32. Seyfi, M.; Mehdinejad, M.; Mohammad-Ivatloo, B.; Shayanfar, H. Decentralized peer-to-peer energy trading for prosumers considering demand response program. In Proceedings of the 2021 11th Smart Grid Conference (SGC), Tabriz, Iran, 7–9 December 2021; IEEE: New York, NY, USA, 2021; pp. 1–5. [Google Scholar]
  33. Ullah, M.H.; Park, J.D. Peer-to-peer energy trading in transactive markets considering physical network constraints. IEEE Trans. Smart Grid 2021, 12, 3390–3403. [Google Scholar] [CrossRef]
  34. Mehdinejad, M.; Shayanfar, H.; Mohammadi-Ivatloo, B. Decentralized blockchain-based peer-to-peer energy-backed token trading for active prosumers. Energy 2022, 244, 122713. [Google Scholar] [CrossRef]
Figure 1. The structure of the proposed decentralized market.
Figure 1. The structure of the proposed decentralized market.
Sustainability 15 06165 g001
Figure 2. The prediction of electrical and thermal loads of each prosumer.
Figure 2. The prediction of electrical and thermal loads of each prosumer.
Sustainability 15 06165 g002
Figure 3. The convergence of the proposed P2P electrical energy trading approach between retailer 1 and prosumers at different hours.
Figure 3. The convergence of the proposed P2P electrical energy trading approach between retailer 1 and prosumers at different hours.
Sustainability 15 06165 g003
Figure 4. The convergence of the proposed P2P gas trading approach between retailer 1 and prosumers at different hours.
Figure 4. The convergence of the proposed P2P gas trading approach between retailer 1 and prosumers at different hours.
Sustainability 15 06165 g004
Figure 5. The variation plot of charge and discharge of the electrical energy storage of retailer 1, the amounts of self-generation and trading with the upstream network, along with the price variation curve.
Figure 5. The variation plot of charge and discharge of the electrical energy storage of retailer 1, the amounts of self-generation and trading with the upstream network, along with the price variation curve.
Sustainability 15 06165 g005
Figure 6. The plot of electrical demand supply of prosumer along with the price variation curve.
Figure 6. The plot of electrical demand supply of prosumer along with the price variation curve.
Sustainability 15 06165 g006
Figure 7. The plot of heat demand supply of prosumer along with price variation curve.
Figure 7. The plot of heat demand supply of prosumer along with price variation curve.
Sustainability 15 06165 g007
Figure 8. The convergence of the proposed P2P electrical energy trading approach between retailers and prosumers at various hours.
Figure 8. The convergence of the proposed P2P electrical energy trading approach between retailers and prosumers at various hours.
Sustainability 15 06165 g008
Figure 9. The convergence of the proposed P2P gas trading approach between the retailer and prosumers at various hours.
Figure 9. The convergence of the proposed P2P gas trading approach between the retailer and prosumers at various hours.
Sustainability 15 06165 g009
Table 1. The private information of prosumers and retailers.
Table 1. The private information of prosumers and retailers.
Retailer α i   ( / kWh 2 ) β i ( / kWh ) X i sg _ max Prosumer δ j ( / kWh 2 ) ω j   ( / kWh )
10.0511.061712010.0728.21
20.069.061713020.08411.21
30.04513.24
Table 2. The private information of the prosumers’ units.
Table 2. The private information of the prosumers’ units.
Prosumer η T U η B U η ch U η ce U y j gb _ max y j gchp _ max y e , hp _ Max a h
10.980.900.450.401401501002
20.950.920.50.42130170902
30.960.950.430.451501601102
Table 3. Comparison of the proposed approach results with the centralized method.
Table 3. Comparison of the proposed approach results with the centralized method.
Profit (ȼ)Cost (ȼ)Total Profit (ȼ)Total Cost (ȼ)SW
RetailerProsumer
R1R2U1U2U3
Centralized11,218.713,421.4−43,727.5−45,225.3−46,681.724,640.1135,634.5−78,494
Decentralized11,219.313,421.6−43,730.2−45,223.2−46,679.424,640.9135,632.8−78,494.2
Table 4. A comparison of monopoly and duopoly results.
Table 4. A comparison of monopoly and duopoly results.
Profit (ȼ)Cost (ȼ)Total Cost (ȼ)Difference (ȼ)SW
RetailerProsumer
U1U2U3
Centralized33,547.929−53,217.8−54,071.9−57,948.3165,23829,603.5−99,574.1
Decentralized33,558.638−53,224.2−54,072−57,948.4165,244.629,611.8−99,574.6
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Khazaei, H.; Aghamohammadloo, H.; Habibi, M.; Mehdinejad, M.; Mohammadpour Shotorbani, A. Novel Decentralized Peer-to-Peer Gas and Electricity Transaction Market between Prosumers and Retailers Considering Integrated Demand Response Programs. Sustainability 2023, 15, 6165. https://doi.org/10.3390/su15076165

AMA Style

Khazaei H, Aghamohammadloo H, Habibi M, Mehdinejad M, Mohammadpour Shotorbani A. Novel Decentralized Peer-to-Peer Gas and Electricity Transaction Market between Prosumers and Retailers Considering Integrated Demand Response Programs. Sustainability. 2023; 15(7):6165. https://doi.org/10.3390/su15076165

Chicago/Turabian Style

Khazaei, Hassan, Hossein Aghamohammadloo, Milad Habibi, Mehdi Mehdinejad, and Amin Mohammadpour Shotorbani. 2023. "Novel Decentralized Peer-to-Peer Gas and Electricity Transaction Market between Prosumers and Retailers Considering Integrated Demand Response Programs" Sustainability 15, no. 7: 6165. https://doi.org/10.3390/su15076165

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop