Skip to main content

Topological considerations on peer-to-peer energy exchange and distributed energy generation in the smart grid


The vision of the future Smart Grid considers end-users connected to it as both consuming and generating energy. Equipped with small-scale renewable energy generators and storage systems, end-users, also known as prosumers, engage in a local energy market for procuring and selling energy, in turn disrupting the traditional utility model. The appeal of this vision lies in the engagement of end-users, in facilitating the introduction and optimization of renewable energy sources, with the overall expectation of optimizing the global energy generation and distribution process. To handle the peer-to-peer energy exchange and distributed energy generation in the digitalized Smart Grid, we proposed an optimization strategy. In the present work, we propose a Monte Carlo based simulation model to investigate the role of the topology in facilitating the peer-to-peer energy exchanges and distributed energy generation. We consider a 37-node distribution network and evaluate four topological models: radial, complete graph, random graph, and small-world. The results indicate that the random graph model is better than other models in reducing the average delivery path length and energy losses in the energy transfer between providers and consumers. The small-world model has higher efficiency than other models in reducing the maximum power load in the distribution network and the cost of buying energy for end-users. We scale up the investigation by considering a 100-node network and evaluate the random graph and the small-world models by varying the rewiring probabilities. The results show that the small-world model outperforms the random graph model on most efficiency metrics, even when considering infrastructural costs. This work provides the foundation for a decision support system for analysis and high level planning of the distribution network.


The traditional model of a power system, with large generation facilities and passive load at the distribution end, is being challenged by the advances in renewable energy sources and the digitalization of the infrastructure. The trend involving distributed energy generation (DEG) entails that the power flows, especially at the distribution level, become multi-directional. The term Smart Grid captures the digitalization of the infrastructure and the related trends as just presented. More generally, the Smart Grid adopts Information and Communication Technology (ICT) to enhance the efficiency, environmental sustainability, reliability and economics of producing and distributing electrical energy in the power system (The Smart Grid 2016). If the overall efficiency of the traditional design of power systems is approximately 30%, the expectation is to bring this as high as 70% for the Smart Grid (Yu et al. 2011).

To achieve such radical efficiency increases, a number of technologies and techniques are necessary. In the present work, we consider the scenario for which renewable energy generators (REGs), such as photovoltaic (PV) panels and small wind turbines, enable end-users (in this case also called “prosumers”) to produce electrical energy individually and to exchange the energy freely among each other. In other terms, the end-users can engage in a local energy market. After fulfilling the individual demands, their surplus energy is sold and transmitted to other end-users who need to buy energy. There are two key ingredients to realize such a scenario. One is the availability of such a market; the second is an energy distribution infrastructure that supports efficient, multi-directional power flows. In the present paper, we focus on the second issue: supporting “peer-to-peer energy exchange,” that is, the distribution of energy among end-users at a local scale. By contrast, “centralized energy exchange,” which is the current adopted model worldwide, means that end-users get the required energy from a central operator to which they remit their excess energy, when overproducing.

Achieved by introducing peer-to-peer energy exchange and trading in the same distribution network and distributed energy generation, the “Prosumer-involved Smart Grid” provides two important advantages: reducing the dependence on non-renewable energy sources that are based on fossil fuels; and improving the independence from centralized energy generation, operation and energy providers (The Smart Grid 2016). The distribution network is formed by the medium and low voltage (MV and LV) grids, including transformers and substations. The term “local scale” identifies residential areas covered by a sub-network of the distribution network running at low voltage without transformers and substations.

The present work extends the results presented in Sha and Aiello (2016), where we focused on the optimization of peer-to-peer energy exchange in the Prosumer-involved Smart Grid. The optimization objectives were to improve management of distributed energy generation, to reduce energy losses of delivery, to improve independence from a central operator, and to decrease energy costs for end-users. The present paper proposes a simulation model to investigate the topological effects on the optimization, that is, to study how the topology of distribution grids affect the optimal energy exchange based on distributed energy generation at the local scale. We study the effects of different topologies using the Monte Carlo approach (Law 2007). This work provides the foundation for a decision support system for the analysis and high-level planning of the distribution network towards managing distributed energy generation and peer-to-peer energy exchange. For the evaluation, we design four assessment metrics: energy loss ratio in the distribution network, energy cost for end-users, maximum load in electric lines, and average path length of energy delivery. The evaluation process is divided into two stages. The first stage is performed on a 37-node network with four topology models: radial, complete graph, random graph (k=4), and small-world (k=4,p=0.4). The second stage tests the random graph model with different average degrees k=4,6,8,10,12 and the small-world model with different pairs of average degrees k=4,6,8,10,12 and rewiring probabilities p=0.2,0.4,0.6,0.8,1.0. We test these models against 100-node networks. The present work is also based on and extends our previous paper (Sha and Aiello 2018) by designing the second stage of the evaluation process. The major contributions of the present paper are: (i) a proposal for evaluating how the topology models and the model’s parameters influence the performance of peer-to-peer energy exchange and trading, (ii) experiments from the topological point of view employing the optimization of peer-to-peer energy exchange, and (iii) a simulation model on the basis of the Monte Carlo approach and various statistical distributions.

The remainder of the paper is organized as follows. The “State of the art” section discusses the related work. The “Optimization of peer-to-peer energy exchange” section presents the mathematical optimization model of peer-to-peer energy exchange proposed in our previous paper (Sha and Aiello 2016). The “Monte Carlo simulation” section illustrates the Monte Carlo approach and the methods of simulating energy production, consumption, and real-time price. Evaluated topologies, parameters and cases, assessment metrics and evaluation settings are presented in “Simulation execution and results” where also the results are discussed. The “Scope and limitations” section discusses the scope and limitations of this paper. The “Conclusions” are offered in the final section.

State of the art

While energy exchange and trading in the Smart Grid is becoming increasingly studied, to the best of our knowledge, there are few works that combine the topological perspective with a probabilistic approach. In considering related work, we look into two main relevant fields: energy exchange and trading in the Smart Grid, and topological approaches to distribution networks.

Energy exchange and trading in the smart grid

In the context of the Smart Grid, a Microgrid comprises a cluster of distributed energy generators that are locally controlled and work at low voltages (≈≤1 kV) or medium voltage (usually ≈1−−69 kV) (Hatziargyriou et al. 2007). A Microgrid behaves, from the power grid’s perspective, as a single energy producer or consumer (Hatziargyriou et al. 2007). Game Theory is the most widely employed approach to model the system and its users (Abdella and Shuaib 2018). Matamoros et al. study how energy can be exchanged between two Microgrids in a peer-to-peer manner in order to minimize the total cost of energy generation and transportation, while each Microgrid fulfills its local energy demand (Matamoros et al. 2012). The approach is generalized for the case of Microgrids, which are fully connected, have a ring and a linear topologies (Gregoratti and Matamoros 2015). Other game theoretic approaches are presented in Lee et al. (2015), Zhang et al. (2018), and Marzband et al. (2018). Most studies on energy exchange and trading at the Microgrid level do not consider the topological effects on the reaching of equilibria and improving performances.

The PowerMatcher project focuses on a set of users connected to the same distribution network and coordinating their loads (Kok et al. 2005, 2010, 2012; Warmer et al. 2007, 2008; Hommelberg et al. 2007; Bliek et al. 2010; Kok 2010, 2013; MacDougall et al. 2011). Based on an agent-oriented architecture, the focus is on physical deployment and demonstrating the feasibility of local energy exchange. End-users, owning home appliances, electric vehicles and/or industrial installations, act as small electrical energy consumption. Small-sized distributed energy generators based on renewable sources provide small energy production in the operation of the electricity infrastructure. In this way, the PowerMatcher enables integration of the large amounts of renewable energy in the power grid while avoiding overloads in the distribution network. The aim of the project is to support the matching of supply and demand. A market-based control approach is employed to optimally balance energy production and consumption. The PowerMatcher project is validated both in the field deployment and in simulation studies with good results. It can improve the match between energy consumption and the availability of renewable energy production, and can reduce the imbalance caused by unpredictable behavior of renewable sources. In addition, it is able to relieve possibly overloaded distribution networks.

Another study based on Game Theory proposes a model that involves energy exchange and trading among prosumers (Samadi et al. 2016). Some studies investigate energy exchange based on intelligent buildings. Mocanu et al. propose a Building Energy Management Systems (BEMS) enabling energy exchange among buildings to optimize their energy scheduling and energy cost (Mocanu et al. 2014). In Kim and Lavrova (2013), Kim et al. optimize power flows in order to share energy among buildings equipped with battery storage systems. Based on energy exchange among buildings, the work presented in Čaušević et al. (2019) proposes a mechanism that can supply electricity to communities affected by a power outage. The proposed mechanism assigns different priorities to buildings in the community based on community preferences. During power outage, the building with the highest priority is supplied with electricity by energy exchange first. In (Wörner et al. 2019), Wörner et al. describe the implementation of an actual prototype of blockchain-based electricity market for energy exchange within a neighborhood. The goal of this work is to evaluate the application of blockchain technology in energy exchange among prosumers.

In this field, the closest line of research to our study is on power routing which is a mechanism allowing electrical energy routing between prosumers and consumers. It is an essential service required for the energy exchange and trading (Abe et al. 2011; Zhong et al. 2016). In Tashiro et al. (2012), Tashiro et al. propose a system at physical layer to dispatch electrical energy by power packets from a source to a destination. The power packet means that electrical energy is treated like data packets tagged with the information about senders and receivers (Tashiro et al. 2012). The paper provides the physical foundation scheme for the peer-to-peer energy exchange. In Wang et al. (2017), Wang et al. present a design of a power router that is responsible for power dispatching. The design includes the hardware structure of the router and a power routing algorithm based on graph theory and lowest cost selection. The proposed power routing algorithm considers physical constraints of the power network. Based on such power router, Zhu et al. design a routing protocol to find the most energy efficient path for power flows from one house to another house (Zhu et al. 2011). This protocol focuses on the data security perspective on the power routing. A power router is also the subject of (Nguyen et al. 2010) in which Nguyen et al. present the cost-scaling push-relabel algorithm to control the power flow in distribution networks considering the distributed energy generation, bidirectional power flows and meshed network topology. In Brocco (2013), Brocco proposes a distributed protocol to create and maintain energy transit paths between energy sources and loads devices. The work focuses on the autonomous control of the power routing. In Hong and Kim (2016), Hong et al. propose a strategy utilizing game theory for optimizing power routing among prosumers or Microgrids. The main aim of their strategy is to minimize the transaction price. Power routing is simply modeled as a traditional transportation problem to balance the energy supply and demand. Ma et al. propose a power dispatching protocol based on the power packet and power router (Ma et al. 2018). The protocol focuses on matching energy consumers with suppliers, balancing load and generation, and scheduling energy transit in the distribution network. Very recently, the authors of (Jogunola et al. 2020) proposed a slime-mould inspired approach for optimizing the power routing among prosumers in the distribution network. The optimization approach considers the energy losses of power routing, the capacity constraint of electric lines, and the topology of the distribution network. This work is in line with our previous paper (Sha and Aiello 2016). The power routing algorithms proposed in the above cited works (Wang et al. 2017; Zhu et al. 2011; Nguyen et al. 2010; Brocco 2013; Hong and Kim 2016; Ma et al. 2018; Jogunola et al. 2020) are all centralized. Decisions about energy price, energy transit and demand-supply balance are decided centrally by the power router or a central controller. The work in (Jogunola et al. 2020) considers meshed graphs as the topology of the distribution network. The work presented in Nguyen et al. (2010) and Wang et al. (2017) use meshed direct graphs to model the topology of the power network, while other papers do not consider the topology perspective.

While the reviewed work focuses mostly on the coordination mechanism among the actors, in the present work we consider issues of efficiency of delivery and show how this is influenced by the underlying network topology.

Topological approaches to distribution

Reconfiguration problems of the distribution network from a power engineering point of view are the focal point of topological studies of the distribution networks. Reconfiguration in distribution systems is defined as altering the topological structures of distribution feeders by opening and closing the switches for reducing power loss or balancing load in the system (Civanlar et al. 1988). For example, Gohokar et al. apply the network topology approach to formulate the reconfiguration problem of the distribution network and achieve at least a 5% energy loss reduction (Gohokar et al. 2004).

From the power distribution’s perspective, the topology of the distribution network has an important influence on electrical energy distribution and might need to change with respect to distributed energy generation for the Smart Grid. Brown argues for the necessity for non-radial distribution networks to support distributed energy generation in the Smart Grid (Brown 2008). This standpoint is further emphasized in Dugan et al. (2010) where the adoption of a meshed distribution network is shown to have the potential to reduce energy losses and to facilitate distributed energy generation. In addition, Alvarez-Herault et al. propose approaches to upgrade the distribution network topology from the current radial shape to a meshed network; the goal is to support the increasing connection of the distributed renewable energy generation for the Smart Grid (Alvarez-Herault et al. 2015).

In our previous work, we consider possible evolution of the distribution grids towards a Smart Grid. In particular, we provide a topological analysis of the Dutch distribution networks (Pagani and Aiello 2011). We assess the topological properties’ influence on the cost of peer-to-peer energy exchange and trading in the Prosumer-involved Smart Grid. In the following (Pagani and Aiello 2014), we investigate several network topology models (e.g., small-worlds, random graphs) to discover which one performs best for supporting the peer-to-peer energy exchange and trading, and how network topology models influence the cost of electrical energy transit in the Smart Grid. Finally, in Pagani and Aiello (2016), we take a practical step in evaluating how to evolve the existing distribution network to a smart grid model, taking into account the physical constraints. In the present work, we go beyond a statical topological analysis and look into the actual power flows and practical network topologies, which clarifies and fills gaps left by previous works on the subject.

Optimization of peer-to-peer energy exchange

Prosumers produce energy for their own consumption or for resell. In the model, we proposed, any node can be a buyer and the price for energy is set dynamically per transaction (Sha and Aiello 2016). Electric utilities also sell energy and have to cater system’s balance for a profit. Nodes can simply be consumers. All end-users are part of the same energy market to trade energy negotiating at real-time prices. The market’s borders are defined by the topology of the infrastructure and are therefore geographical in nature. More precisely, the model uses the following assumptions.

  • Buying and selling energy are random discrete events.

  • Buying or selling energy is an autonomous decision of each prosumer.

  • Buying, selling and transmitting energy, in different time slots are independent events.

  • At any given time slot, a prosumer can only be a consumer or a provider, not both.

  • The providers prefer selling energy to the peers rather than the electric utility.

  • The consumers prefer buying energy from the peers rather than the electric utility.

  • Energy delivery entails a non-null energy loss.

  • Energy losses are only due to power line transit.

  • The cost of energy losses is paid by the consumer.

  • The compensation of delivery energy losses is not considered.

  • Only active power in the distribution network is considered.

  • Voltage instability in electric lines is not considered.

We define a weighted electricity distribution graph as one where nodes and edges represent end-users (including prosumers) and the electric lines connecting the end-users, respectively. The substations and transformers are not represented in the graph. The electric lines are differentiated according to their electrical resistance, and thus are modeled as weighted edges. According to the electrical resistance of the electric line, we can calculate the energy loss in this line. The edges are considered directed to represent the flow. The direction of the edge is dependent on the time slot, that is, it can change at different times. Formally, we have

Definition 1

(Weighted Electricity Distribution Graph) An electricity distribution graph is a weighted graph G(V,E,W) such that each element viV is an end-user that is a consuming unit of a physical distribution network. If there is an edge eij=(vi,vj)E between two nodes, there is a physical electric line connecting directly the elements represented by vi and vj. The weight of the edge eij is w(eij)W that is the electrical resistance of the physical electric line connecting vi and vj.

In the weighted electricity distribution graph, we have

Fact 1Between any two nodes, a path PATH(i,j)={eia,eab,...,exj}represents a set of physical electric lines connecting vi and vj.

As a point of notation, given a system with p end-users, we write EU={eu1,eu2,...,eup} to denote these end-users and a set of time slots T={Δt1,Δt2,...} where Δti=Δtj(ij). A set of energy consumers and providers at Δt is denoted by EC(t)={ect,1,ect,2,...,ect,n} and EP(t)={ept,1,ept,2,...,ept,m}, respectively. For each provider, we have ept,i=(pricet,i,supplyt,i), where pricet,i represents the energy price (€/kW ·h) of ept,i and supplyt,i represents an amount of energy supplied by ept,i. The amount of energy that ect,i buys from ept,j is represented by buyt,(i,j)(0,supplyt,j]. The energy generated and consumed by eut,i are represented by GEt,i and Ct,i, respectively. Thus, we have Qt,i=GEt,iCt,i representing the amount of energy which eut,i is able to sell or needs to buy. If Qt,i>0, eut,i has surplus energy to sell. If Qt,i<0, eut,i needs to buy energy to fulfill its demand. If Qt,i=0, eut,i is self-satisfied.

In the proposed model, the power flow will follow varying paths which depend on the set of pairwise agreements between nodes per time slot and the physical constraint of keeping the system in electric balance. This also means that energy losses on the network will vary per time slot. Since energy losses are paid by the buyer, the buyer has the interest to make energy provisioning decisions that are optimal with respect to losses. In other words, the individual optimization goal can be stated as: “given an open energy market with real-time pricing possibilities, how to find the cheapest energy provider dynamically and be delivered energy following the paths with minimum energy losses.”

For a consumer ect,i, the cost of buying an amount of energy x is defined as CoB(x). The energy loss of delivering x to the consumer is defined as LoD(x). The delivery path from ept,j to ect,i is PATH(j,i)={e1,e2,...} where PATH(j,i) consists of electric lines {e1,e2,...} without substations and transformers. Energy loss in an electric line ePATH(j,i) is defined as LSe. Thus, energy loss of a delivery path PATH(j,i) is the sum of LSe in all electric lines {e1,e2,...}PATH(j,i). Then, in case of Qt,i<0, the objective function of optimizing energy cost of ect,i at any given time slot is the following:

$$ \left\{\begin{array}{ll} CoB(|{Q_{t,i}}|) =\min \sum\limits_{j = 1}^{|{EP(t)}|} \left(price_{t,j} \cdot \left(buy_{t,(i,j)} + LoD\left(buy_{t,(i,j)}\right)\right)\right)\\ LoD(buy_{t,(i,j)})=\min \sum\limits_{\forall PATH(j,i)} \left(\sum\limits_{e \in PATH(j,i)} LS_{e}\right) \end{array} \right. $$

Since a prosumer can only act as a consumer or a provider at any given time slot, we have Eq. (2). Meaning that a prosumer cannot buy and sell energy at the same time slot.

$$ EC(t) \cap EP(t) = \emptyset $$

The set of consumers and producers is a subset of the set of nodes. Then, we have Eq. (3). The formula contains “ ” and not “ =”, because some prosumers can be self-satisfied at a given time slot.

$$ EC(t) \cup EP(t) \subseteq EU $$

At each time slot, the total energy consumption and the total energy supply in the distribution network have to be the same. Since prosumers are not necessarily able to provide the energy to all consumers, a super agent (i.e., an electric utility) is part of the model with the ability to buy or sell energy at fixed prices when end-users’ demand and supply are unbalanced. The super agent buys energy at a lower price than it sells it.

The amount of energy balanced by the super agent at Δt is represented by ES(t). Positive values of ES(t) (ES(t)>0) represent the selling of energy by the utility, negative values (ES(t)<0) represent buying. Three constraints represent the condition that the system has to be always in balance.

$$ |{Q_{t,i}}| = \sum_{j = 1}^{|{EP(t)}|} buy_{t,(i,j)} $$
$$ \sum_{i = 1}^{|{EC(t)}|} |{Q_{t,i}}| = \sum_{j = 1}^{|{EP(t)}|} supply_{t,j} + ES(t) $$
$$ \sum_{i = 1}^{|{EC(t)}|} C_{t,i} = \sum_{j = 1}^{|{EP(t)}|} GE_{t,j} + ES(t) $$

Finally, two physical system’s constraints are part of the model: ampacity and flow directionality. Ampacity of an electric line ek is the maximum electric current \(I_{e_{k}}^{max}\) carried by the electric line (Grigsby 2007). The ampacity is related to the dependent on the voltage \(U_{e_{k}}\) in the following way \(I_{e_{k}}^{max} \times U_{e_{k}} \times \Delta t\). The power flow starting from ept,j going through ek is represented by \(f_{(e_{k},ep_{t,j})}\). This leads to:

$$ \sum_{ep_{t,j} \in EP(t)} f_{(e_{k},ep_{t,j})} \leq I_{e_{k}}^{max} \cdot U_{e_{k}} \cdot \Delta t $$

On a given line at a given time slot, there can be only one direction of flow, that is, the direction of \(f_{(e_{k},ep_{t,j})}\), represented by \(d_{(e_{k},ep_{t,j})}\) takes values in the pair: {−1,1}. For example, if there is a power flow in an electric line from point A to B at Δt, another power flow in this electric line from point B to A at the same Δt is not allowed.

$$ |{\sum_{ep_{t,j} \in EP(t)} d_{(e_{k},ep_{t,j})}|} = \sum_{ep_{t,j} \in EP(t)} |{d_{(e_{k},ep_{t,j})}|} $$

Monte Carlo simulation

To understand the optimization strategy’s effectiveness and its dependence on the various parameters, we resort to stochastic simulations. In particular, the Monte Carlo Simulation method relies on generating repeated random numbers (Law 2007; Raychaudhuri 2008). In our work, this entails the use of statistical distributions for modeling energy consumption, renewable energy production, and real-time pricing. We run simulations for several topological models, to assess the topological effects on the optimization of energy distribution. In particular, we consider: a small-world model (Watts and Strogatz 1998), a random graph model (Noh and Rieger 2004), a complete graph model, and a radial model. The reason for choosing the small-world model is that this model obtains a good balance between the upgrading costs for infrastructure and energy distribution efficiency (Pagani and Aiello 2014). The other models are considered as they form a benchmark for comparison. The radial model is the currently most common network distribution model used in practice and thus can be considered for the comparison with current practice. While the random graph and the complete graph models can be seen as extreme cases of the small-world models where the rewiring probability is maximum or null, respectively. Next, we illustrate the specific sub-models for energy production, consumption, and distribution networks.

Simulation of wind energy production

Wind power is dependent on the length of the turbine’s rotor blades, air density, and wind speed. The formulas of generating electric power Pw by a wind turbine, and calculating electrical energy Ew are derived from (Grogg 2005), shown next:

$$ \left\{ \begin{array}{lll} P = 0.5 \times A \times \rho \times V^{3} \times C_{w}\\ P_{w} = \min (P, P_{max})\\ E_{w} = P_{w} \times \Delta t \end{array} \right. $$

The units of Pw and Ew are Watt and Joule, respectively. The area swept by the rotor blades (m2), air density (kg/m2), and wind speed (m/s) are represented by A, ρ and V, respectively. We use Cw(0,1) to represent the efficiency of a wind turbine, and Pmax (Watt) is the maximum power output.

The analytical relationship between the electric power Pw and the wind speed V depends on the control characteristics of the wind turbine, which are cut-in speed Vci and cut-off speed Vco. The wind turbine only works when the wind speed is in [Vci,Vco]. Otherwise, the turbine is locked. Meaning that Pw=0 when V<Vci or V>Vco.

We apply a standard three-bladed turbine (Bukala et al. 2015) in the simulation, where the swept area of blades A=10.75 (m2), the maximum power output Pmax=2600 (Watt), Vci=2 (m/s), and Vco=13 (m/s). We approximate the wind turbine’s efficiency Cw from the efficiency curve, as shown in Fig. 1. For air density, we use the average value ρ=1.225 (kg/m3) (International Organization for Standardization 1975).

Fig. 1
figure 1

Three-bladed efficiency curve of the wind turbine, from (Bukala et al. 2015)

The wind speed is generated by applying a Weibull distribution (Karki et al. 2006). The scale and shape of the distribution are calibrated by means of historical measures. In Ayr (2014), the author calculates the parameters of the Weibull distribution for 97 sites in Italy based on wind data collected throughout the country during 30 years. We use Milano Malpensa site’s data provided by that work, in which the scale is 3.18 and the shape is 1.4 (Ayr 2014). This site is located near an international airport. Therefore, the wind data of this site are more stable and can provide useful information of wider validity (Ayr 2014).

Simulation of solar energy production

For the photovoltaic panel simulation, we consider one hour intervals and the temperature, air pressure, local time, and geographical location. For a cloudy sky, the model of hourly solar radiation is on the basis of the widely adopted model from (Sung et al. 2015). The model is characterized by the peak solar radiance Smax,t (kW/m2), the sunrise trise and sunset tset times. More precisely:

$$ \left\{ \begin{array}{lll} I_{ss,t} = 0, t \leq t_{rise}\\ I_{ss,t} = S_{max,t} \cdot sin \left. \frac{\pi \cdot (t - t_{rise})}{t_{set} - t_{rise}} \right.\\ I_{ss,t} = 0, t \geq t_{set} \end{array} \right. $$

where Iss,t is the solar radiance (kW/m2) of the simple sky model at time t, trise and tset are the sunrise and sunset time, respectively. In the present work, as the panels are assumed to be roof-based, Smax,t is the maximum terrestrial radiance in an hour IETI,max,t multiplied by the hourly clearness index CIt. IETI,max,t is dependent on the zenith angle θZ,t, eccentricity factor E0, and the peak value on terrestrial surface I0, shown below (Sung et al. 2015):

$$ \left\{ \begin{array}{ll} S_{max} = I_{ETI,max,t} \cdot CI_{t}\\ I_{ETI} = I_{0} \cdot E_{0} \cdot cos\theta_{Z,t} = 1362 \cdot \left. 1 + 0.033 \cdot cos\left. \frac{2 \cdot \pi \cdot d_{n}}{365} \right. \right. \cdot cos\theta_{Z} \end{array} \right. $$

where dn is how many days simulated in a year. The angle between the sun position and vertical axis is called the zenith angle (Z) θZ,t. To calculate θZ,t, we refer to (Grena 2012) where five algorithms for the calculation are presented. We choose the Algorithm 3 because it has the best balance between model precision and computational costs.

Algorithm 3 depends on the temperature, air pressure, local time, and geographical location. For the geographical location, we choose Maastricht in The Netherlands as detailed weather data is available thanks to the Royal Netherlands Meteorological Institute (KNMI) (Daily Data from the Weather in the Netherlands). Furthermore, Maastricht is the least influenced city of the Netherlands with respect to North Sea weather fluctuations. The data includes daily average cloud coverage, daily minimum temperature, daily maximum temperature, lowest hourly value of air pressure, and highest hourly value of air pressure. We use the meteorological data of 2016, where the sunrise and sunset times are obtained from “”.

In a year, we select a random day dn and the hour t in dn is the time slot. When t is not in the sunrise to sunset interval, the energy output is null. Otherwise, we use the weather data of the day and generate random numbers to calculate solar radiation and solar energy production in t. The value of the air pressure at t is randomly generated between the minimum and maximum values of the air pressure in a day. For the temperature, we assume that the hourly temperature Tt is linear between the minimum temperature Tmin at the time HTmin and maximum temperature Tmax at HTmax in a day. Then, we can estimate the temperature at time t as follows:

$$ \left\{\begin{array}{lll} T_{t} = \left. \frac{(T_{max} - T_{min}) \cdot (t - H_{Tmin})}{H_{Tmax} - H_{Tmin}} + T_{min} \right., t \in [H_{Tmin}, H_{Tmax}], H_{Tmin} < H_{max}\\ T_{t} = \left. \frac{(T_{min} - T_{max}) \cdot (t - H_{Tmax})}{H_{Tmin} - H_{Tmax}} + T_{max} \right., H_{Tmax} < t < H_{Tmin}, H_{Tmax} < H_{Tmin}\\ T_{t} = 0, other \end{array} \right. $$

when the time t is not in [Tmin,Tmax], we generate a random number in [Tmin,Tmax] as Tt.

For a cloudy sky, the clearness index CIt is the sky portion that is without cloud covering. CIt is generated by a normal distribution whose mean value is in [0.4476,0.64811] and standard deviation of 0.14 (Jurado et al. 1995). The mean value of CIt varies daily and the seasonal variability is taken into account. We transform the daily average cloud coverage CCd into the mean value of the clearness index in a day by 1−CCd/CCupper, where CCupper is the upper bound of CCd.

The formulas of producing solar power Ps and electrical energy Es by a photovoltaic panel are shown nextFootnote 1.

$$ \left\{\begin{array}{lll} P = A \cdot r \cdot C_{p} \cdot Q\\ P_{s} = \min (P, P_{peak})\\ E_{s} = P_{s} \cdot \Delta t \end{array} \right. $$

The unit of Ps is Watt and the unit of Es is Joule. The surface area of a photovoltaic panel (m2) and solar radiation (W/m2) are denoted by A and r, respectively. We use Cp(0,1) to denote the efficiency of a photovoltaic panel. We use Q[0.5,0.9] to denote the Quality Factor (Performance Ratio) that includes all loss relating to the solar power production of the photovoltaic panel. The peak power output of the photovoltaic panel is Ppeak (Watt).

We choose LG360Q1CFootnote 2 as the simulated photovoltaic panel where the photovoltaic panel’s efficiency Cp=0.196, the photovoltaic panel’s surface area A=1.73 (m2) and the photovoltaic panel’s peak power output Ppeak=360 (Watt). Because it has the top-three highest quality in 2017 and affordable price for the residential usersFootnote 3.

For residence buildings, fixed or adjustable panels are realistic choices. We assume that all photovoltaic panels are adjustable panels and their tilt is adjusted twice a year: in the summer and winter. Because adjustable panels can capture more energy during the whole year than fixed panels (Landau 2017). The Quality Factor (Performance Ratio) of the adjustable panel is Q=0.75 (Landau 2017).

In the Netherlands, a modern residential building typically has 4 to 6 photovoltaic panels (van Sark and Schoen 2017). In relevant rare cases, some buildings do not have sufficient roof areas to fit 4 panels and some buildings have relevant higher energy consumption requiring more than 6 panels. Therefore, we consider that an end-user installs 2 to 8 panels. Since the photovoltaic panels are usually installed with even numbers, we randomly select a number in {2,4,6,8} for a prosumer when the simulation starts. The total energy generated by the whole installation is the sum of the generation of each photovoltaic panel.

Simulation of energy consumption

Studies on the household energy consumption profile exist. Ogunjuyigbe et al. provide the profile of a typical household (Ogunjuyigbe et al. 2016). In Gottwalt et al. (2011), a similar profile is identified. Both of these profiles have two consumption peaks. One is in the morning and another one is in the afternoon. Therefore, the consumption in an hour of end-users can be assumed to be drawn by a bimodal distribution (Galtung 1967).

The bimodal distribution has two normal distribution curves combined that can model the two consumption peaks during one day. Then, we assume the boundary of the bimodal distribution to be at 11:00AM. Therefore, one peak appears in the morning around 6:00AM, and the other one is in the afternoon around 5:00PM. The bimodal distribution’s parameters are calculated via the dataset of Liander (Energy Consumption of Small Customers in the Netherlands). In the afternoon, the standard deviation and mean of the consumption are 0.064 and 0.227, respectively. In the morning, the standard deviation and mean of the consumption are 0.058 and 0.15, respectively.

Simulation of energy prices

The energy price is assumed to change every hour and to correlate to overall country demand. It therefore follows the bimodal distribution of energy consumption with the same boundary. The parameters of such energy price distribution are coherent with the “electricity price statistics”Footnote 4 of 2017. The mean value of the distribution is €0.2 per kW ·h which is the average price for the European 28 countries (“EU-28”). The standard deviation of the distribution is 0.05. The minimum price is €0.05 per kW ·h. The electric utility offers a fixed price that is set to €0.22 per kW ·h, which is the average price of “Euro area”.

Simulation of distribution networks

A standard three-phase IEEE distribution test feeder is used to represent the radial topologies (Kersting 2001). The network consisting of 37 nodes is adapted for the simulation by removing the transformer and regulator, by considering a voltage of 120V for all electric lines (Fig. 2a). All of 37 nodes in the test feeder are assumed to be end-users and the distributed loads of three phases are assumed to be balanced. To generate small-world (Fig. 2b) and random graph (Fig. 2c) models, we use the Java library “GraphStream”Footnote 5. Each electric line in all topologies has the same material and equal length. Thus, all electric lines have equal electrical resistance and ampacity.

Fig. 2
figure 2

A test feeder and graphs of topology models

Simulation execution and results

We built a Java program to implement the Monte Carlo simulations of the model presented in “Monte Carlo simulation” section. The simulation program was run on the Peregrine High Performenace Computing clusterFootnote 6 with 24 cores at 2.5 GHz and 112 GB memory. The running of this program approximately consumed 139 hours.

Assessment metrics

We design four metrics to evaluate the topological effects on the optimization strategies. The metrics are populated using the same load demand satisfaction. Firstly, to assess the energy delivery efficiency, we measure the energy loss ratio in the distribution network. The measured energy losses are on the basis of transferring the equal amount of energy in various considered topologies. For any end-user, the losses based on transferring energy from prosumers and from the super agent are both accounted for. LOSSt,i denotes the energy loss of an end-user eut,i at Δt. BUYt,i denotes the amount of energy that an end-user eut,i buys at Δt. We measure the ratio between energy losses on the network and the amount of energy that all end-users buy over a day (Eq. 14).

$$ \frac{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} LOSS_{t,i}}{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} BUY_{t,i}} $$

Secondly, to evaluate the economic benefits of a particular topology, we measure the energy costs for end-users. The energy costs are the total money that the end-users pay for buying and delivering energy from both prosumers and the super agent. COSTt,i denotes the energy cost of an end-user eut,i at Δt. We measure the energy cost (unit: EUR) of buying and delivering 1 kW ·h energy on the network (Eq. 15).

$$ \frac{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} COST_{t,i}}{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} BUY_{t,i}} $$

Thirdly, to evaluate the influence on energy distribution flows we measure the maximum load in distribution networks. The maximum load in an electric line is the maximum energy an electric line carries at a time slot. We measure the maximum load (unit: kW) of the distribution network which is the maximum value of the loads in all electric lines in the whole network over one day. The electric line set is E and the load in an electric line et,i at Δt is denoted by LOADt,i. Then, we have:

$$ \max \limits_{\forall t \in |{T}|} \{\max \limits_{\forall e_{i} \in |{E}|} LOAD_{t,i}\} $$

Lastly, we measure the average delivery path length for energy distribution in order to assess the efficiency of transmitting electricity between two nodes. The average delivery path length is the average hop count of all delivery paths from all resources (providers) to all destinations (consumers) in the distribution network. It represents the average number of electric lines of the delivery paths to transfer energy from providers to users who buy the energy. Since each electric line in all topologies has the same length and electrical properties, each electric line in all topologies has the same weight. Hence, the delivery path length equals the weighted delivery path length. DPLt,i denotes the total delivery path length for transferring all bought energy to an end-user eut,i at Δt. DPNt,i denotes the number of delivery paths for transferring all bought energy to an end-user eut,i at Δt. Then, we measure the average delivery path length (unit: step) to transfer all bought energy by all end-users over a day:

$$ \frac{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} DPL_{t,i}}{\sum\limits_{\forall t \in |{T}|} \sum\limits_{\forall eu_{t,i} \in |{EU}|} DPN_{t,i}} $$

Power flow patterns

We apply two patterns of the power flow. One is Radial-flow that simulates energy distribution flows in the traditional way. In the distribution network, all end-users get energy from a central provider. The prosumer is not part of this pattern. The central provider injects electrical energy into the distribution network via Node 799, as shown in Fig. 2a.

The second pattern is the Optimal-flow one that adheres to the model proposed in “Optimization of peer-to-peer energy exchange” section. In this model, some or all of the end-users act as prosumers; energy production, real-time energy price, and peer-to-peer energy exchange are enabled. A single super agent injects electricity into the distribution network via Node 799 when end-users’ demand exceeds supply. For the random graph, complete graph, and small-world models, the location of Node 799 is decided by the model generation randomly. We refer to (Sha and Aiello 2016) for the algorithms of the Optimal-flow and do not repeat them here.

Evaluation stages and prosumer settings

We divide the evaluation process into two stages. In the first stage, we compare the performance based on various topologies. We test the random graph, complete graph, radial, and small-world models. For the small-world model, we use a rewiring probability p=0.4 and an average degree of four k=4, which provide a good balance between energy distribution efficiency and the cost of upgrading the infrastructure (Pagani and Aiello 2014). Then, we use the same average degree k=4 for the random graph model. The experiments are performed on the modified IEEE 37-node test feeder, introduced in “Simulation of distribution networks”. To model the traditional distribution way, we apply the Radial-flow pattern introduced in “Power flow patterns” to the radial topology. We apply the Optimal-flow to all topologies. This leads to five evaluation cases: “Traditional”, “Complete Graph”, “Small-world”, “Random Graph”, and “Radial”. We apply Traditional to the baseline. We use several settings of the prosumer for the Optimal-flow cases with the goal to understand the influence of the number of prosumers. The case considers 24%, 50%, 75%, and 100% of prosumers; more precisely M=9,18,27,37 in the 37 nodes networks. These settings are referred to as “24%-prosumer”, “48%-prosumer”, “73%-prosumer”, and “100%-prosumer”, respectively. For the baseline (i.e., evaluation case Traditional), the number of prosumers is always 0 and it is therefore referred to as “0%-prosumer.”

In the second stage, we test Small-world and Random Graph by varying graph formation probabilities by small increments. More precisely, the tested parameters of the random graph model are average degrees k=4,6,8,10,12, while for the small-world model we test the same average degrees as the random graph model and p=0.2,0.4,0.6,0.8,1.0 as the rewiring probabilities. We repeat the experiments for the 100 node graphs. The evaluation cases are named with the acronyms of topology models. For example, the random graph with k=4 is referred to as “RG4” and the small-world having k=4,p=0.4 is referred to as “SW44”.

In the second stage, we go beyond the traditional distribution way. Therefore, only the Optimal-flow pattern is applied and the Traditional case is not part of the simulation. We only compare the Random Graph case and the Small-world case with each other. We also assume that all end-users are prosumers, since the evaluation in this stage focuses on the topologies. Hence, this stage only has one prosumer setting, M=100. In addition, this stage has the same physical constrains of distribution networks as the first stage. Meaning that the voltage for all electric lines is 120V, and all phases have the balanced loads, and each electric line has the same electrical resistance and ampacity.

Simulation settings

Small wind turbines and photovoltaic panels are the typical small scale energy generators adopted by prosumers. We randomly associate to each prosumer either a wind or solar generator. Hence, the wind and solar sources are given equal weight in the simulation. The solar source is only available in the daytime but wind is recurrent. This setting provides the possibility of simulating energy exchange in the nighttime.

The Monte Carlo approach is based on running many several simulation instances and processing the statistics of all outputs (Law 2007). Thus, in the first stage, we run the simulation 10,000 times. Meaning that the program simulates 10,000 days and calculates the mean values of the simulation outputs. The simulation randomly selects each day from the four seasons. Hence, the simulation represents the seasonal effects. In the second stage, the number of simulated days is set to 5000. Because the computation time of simulating more than 5000 days is too long to be accepted by the HPC cluster. Each evaluation case runs once in each iteration. In any iteration, Δt=1 hour and there are T=24 time slots.


The results of the simulation are intended to determine the impact of the topology on the efficiency of open peer-to-peer energy market and, what models perform best. First, we consider the various topological models, and then we analyze the effects of parameter tuning for the most promising ones.

Topology comparison

First, we assess the energy loss ratio. That is, the total amount of energy losses in the distribution network divided by the total amount of energy bought by all end-users (Eq. 14). This metric indicates the performance of energy loss reduction for delivering energy in the distribution network. The measured energy losses are based on transferring a given, fixed amount of energy in the evaluated topologies, including the losses of transferring energy from prosumers and from the super agent. The simulation results are shown in Fig. 3, where the Complete Graph, Small-world, Random Graph, and Radial have decreasing energy loss with the increasing number of prosumers. The decrease of performance for these topologies are approximately linear. The energy loss maximally decreases 23%, compared to the baseline, achieved by the Complete Graph when the percentage of the number of prosumers reaches 100%. The Complete Graph performs better than other topology models in all prosumer settings. The Random Graph ranks second. Its performance is less than the performance of the Complete Graph by 4.3% at 24%-prosumer, by 5.7% at 100%-prosumer, and by 6.5% at other two prosumer settings. The performance of the Small-world only has 0.7% less than the performance of the Random Graph at 73%-prosumer. Using three different prosumer settings, these two topology models have the same performance. The Radial ranks last. Its performance is less than the performance of the Small-world by 2.9%,4.3%,4.3%, and 4.4% at four prosumer settings respectively.

Fig. 3
figure 3

Energy loss ratio

Second, we evaluate the energy costs for end-users which include the cost of buying energy and the cost of transferring energy. The costs are the money paid by the end-users for buying and delivering one Kilowatt-hour on the network (Eq. 15). This metric indicates the performance of energy cost reduction in various topology models. As one can see in Fig. 4, the Complete Graph, Small-world, Random Graph, and Radial have decreasing energy costs with the increasing number of prosumers. The decrease for the topologies are almost linear. The energy cost maximally decreases 8%, compared to the baseline, achieved by the Complete Graph when the prosumer percentage reaches 100%. The Small-world ranks second followed by the Random Graph and the Radial is the last one. However, with the same prosumer setting, the performances of different topologies have small differences. The performance of the Small-world is less than the performance of the Complete Graph by 0.4% at all prosumer settings. However, it exceeds the performance of the Random Graph by 0.4% at 73%-prosumer and 100%-prosumer. The Random Graph has the same performance as the Small-world at 24%-prosumer and 48%-prosumer. The performance of the Radial is less than the performance of the Random Graph by 0.8% for all prosumer settings.

Fig. 4
figure 4

Energy costs for end-users

Then, we evaluate the maximum load in the distribution network. The simulation results are shown in Fig. 5, where the Complete Graph, Small-world, Random Graph, and Radial have meaningful reductions compared to the baseline. The Complete Graph performs better than other topologies for all prosumer settings. It achieves the maximum reduction of 96.3% when the prosumer percentage is 100%. The Small-world ranks second. Its performance reaches 88.7% at 100%-prosumer, which is less than the performance of the Complete Graph by 7.6%. The performance of the Random Graph is almost same as the performance of the Small-world. The performance difference between these two topologies is no more than 0.2%. The Radial ranks last. Its performance is less than the performance of the Random Graph by 9.6%,11.6%,10.9%, and 9.3% at four prosumer settings respectively. Furthermore, for all topologies, increasing the number of prosumers only has slight influence on the results.

Fig. 5
figure 5

Maximum load of the distribution network

Lastly, we evaluate the average delivery path length for delivering energy and show the simulation results in Fig. 6. As one can see, the performances of four prosumer settings are very close for all topologies. The average delivery path length maximally decreases with a value of 84%, compared to the baseline, achieved by the Complete Graph at all prosumer settings. The Random Graph ranks second. Its maximum reduction for this metric reaches 56.1% at 73%-prosumer and 100%-prosumer, which is less than the performance of the Complete Graph by 27.9%. The Small-world ranks third. It has close performance to the Random Graph. The maximum performance difference between these two topologies is 2.7% at 48%-prosumer and 73%-prosumer. The Radial ranks last. The performance of the Small-world exceeds the performance of the Radial from 23.1% to 30.3% which means a relevant large performance enhancement.

Fig. 6
figure 6

Average delivery path length

The figures provide an overall illustration of the assessment metrics’ performance. To show the enhancement clearly, assessment numerical data are also provided. Thus, the reduction percentage compared to the baseline for each metric is calculated, as shown in Table 1. The energy loss ratio, maximum load, energy cost, and average delivery path length maximally decrease of 23%, 96.3%, 8%, and 84%, respectively, with respect to the Complete Graph. The Radial has the bottom performances for all metrics. Comparing the Small-world and Random Graph, they have the same maximum reduction of energy loss ratio which is 17.3%. The Small-world performs better than the Random Graph with respect to energy cost and maximum load achieving the maximum reduction of 7.6% and 88.7%, respectively. However, the Random Graph exceeds the Small-world for the average delivery path length. It achieves the maximum reduction of 56.1%.

Table 1 The cases’ comparison of the performance

In summary, the Complete Graph outperforms the other topologies’. Because it has full-meshed topology providing edges for all pairs of nodes. But the Complete Graph is only an idealized model because of its high construction and management costs. Considering more practical topologies, both of the Small-world and Random Graph perform well for several metrics. The Small-world stands out in two metrics: the maximum load and the energy costs. The Random Graph stands out in other metrics: average delivery path length and energy loss ratio. The performance of average delivery path length and the maximum load is independent of the number of prosumers. However, the performance of energy loss ratio and energy costs is highly relevant to the number of prosumers.

Parameter influence on random graph and small-world

In the second stage, our aim is to assess the parameter influence on the small-world and random graph models. For the random graph model, all metrics have a similar trend that is shown in Fig. 7. As one can see, the value of the assessment metric decreases with the increase of the average degree. Furthermore, the influence of average degree on the random graph model is non-linear. Thus, the speed of the improvement gets slower while the average degree k increases. This means that the performance of the random graph model improves with the increase of its average degree. But the speed of this improvement attenuates with the increase of the average degree.

Fig. 7
figure 7

Parameter influence on the performance of the random graph model

For the small-world model, all metrics have a similar shape and trend, as shown in Fig. 8. The performance decreases with the increasing of the “k” and “p” values. This means that the small-world model’s performance improves with the increase of its rewiring probability and average degree. Furthermore, the curves on p-axis (x-axis) and k-axis (y-axis) indicate that the influence of the average degree is much more significant than the influence of rewiring probability. The most significant improvement of the performance happens when “k” increases from 4 to 6. After that, the performance improves less with the increase of “k”. Especially when k>8, the speed of performance improvement dramatically reduces. That is, the influence of the average degree on the performance improvement is marginal when k>8.

Fig. 8
figure 8

Parameter influence on the performance of the small-world model

The figures provide an indication of overall trends and shapes of the parameter influence on the small-world and the random graph models. Overall, the performance of these two models is highly dependent on their parameters. To clearly compare the performance of these two models on the 100-node network, numerical data of the evaluation are also provided. Thus, we select the values at the same average degree “k” (rewiring probability p=1.0 for the small-world model) of these two models for each metric, as shown in Tables 2, 3, 4 and 5, for comparison. One notices that the small-world model exceeds the random graph model in most of cases in three metrics, Energy Loss Ratio, Maximum Load, and Average Delivery Path Length. The random graph model has only better performance than the small-world model in the metric Energy Cost. The possible explanation is that the small-world model has enhanced propagation speed (Watts and Strogatz 1998) which makes peer-to-peer energy exchange efficient for large-scale networks. Overall, the small-world model has advantages over the random graph model in the large-scale network.

Table 2 Performance comparison of Energy Loss Ratio between the small-world and the random graph
Table 3 Performance comparison of Energy Cost between the small-world and the random graph
Table 4 Performance comparison of Maximum Load between the small-world and the random graph
Table 5 Performance comparison of Average Delivery Path Length between the small-world and the random graph

Scope and limitations

The main assumption made in the present study is that changing the topology of distribution grids is not only feasible, but advantageous to move from a centralized electricity infrastructure to a distributed, peer-to-peer, decentralized one. The study shows how nodes connected to such future grids could exchange energy and what would be valid strategies to optimize the energy exchanges.

It is important to notice that this is a mathematical, topological study that considers the operation aspects of distribution grids, and not the long term planning. In fact, changing the topology of a distribution grid has relevant costs tied to the necessary laying of cabling and connecting stations. This fact can hinder the broad applicability of the methods proposed here. At the same time, we remark that electric assets have typically a long life (e.g., 50–70 years Willis (2013)) and are usually amortized in decades. In other words, such costs would be spread over a very long time horizon. In addition, new distribution and Microgrids could be designed directly with alternative topologies such as those studied here. In Pagani and Aiello (2016), we have made an economic evaluation to describe the economic feasibility to move towards denser topologies starting from existing medium and low voltage grids of the North of the Netherlands. We conclude that investigating alternative distribution topologies has potential and that it is necessary to perform additional studies that include also the planning phase and the amortization costs of the infrastructure in the economy of the operation costs.

Another assumption made is that energy can flow easily from distributed generation to load across the distribution grid and the losses are only due to power line transit. In other terms, we do not consider other possible losses or power quality issues. Technical solutions to make such flow across a distribution grid possible and efficient are assumed to be available. This is a potential treat to the applicability of the presented approach, though it is a highly investigated area and we are optimistic about the feasibility.

Finally, when considering alternative topologies, we assume that all links have the same physical properties, i.e., are the same. This is done to focus on the topological aspects. Furthermore, one could consider these values as averages. Given that distribution grids typically have short links, in the order of magnitude of kilometers, we consider this assumption acceptable for the topological testing. Furthermore, evidence from a previous study done on actual distribution networks, are encouraging in this respect (Pagani and Aiello 2016).


We propose a simulation approach to evaluate the topological effects of the distribution network on peer-to-peer energy exchange and distributed energy generation. The model and solution of optimizing peer-to-peer energy exchange come from our previous work (Sha and Aiello 2016) and is here used to evaluate several topological models under varying distributed energy generation and load conditions. The evaluation is on the basis of Monte Carlo simulation. We apply various statistical distributions to simulate renewable energy generation, energy consumption of end-users, and real-time prices. For the evaluation, we design four assessment metrics that are: energy loss ratio in the distribution network, energy cost for end-users, maximum load in electric lines, and average delivery path length of energy delivery.

We started with a 37-node radial network. Then, we moved onto more topological refined models. The random graph model can reduce the average delivery path length when transferring energy from providers to consumers, and energy losses of delivery with respect to other models. On the other hand, the small-world model has higher efficiency than other models in reducing the maximum power load in the distribution network and the cost of obtaining energy by the end-users. The second stage tested on 100-node networks shows that the small-world model outperforms the random graph model in the large-scale network. In addition, the most significant performance enhancement of the small-world model happens when the average degree k≤8. Thus, the small-world model with k[4,8] is a better choice when we consider the balance between performance and saving on infrastructural costs. This result is in line with the outcomes of our previous work (Pagani and Aiello 2014).

From a practical point of view, the small-world model appears to have advantages over other models since it can provide a good balance between energy distribution efficiency and the cost of network construction. For the distribution network with dozens of end-users, the small-world model can provide better performance than the random graph model as it requires lower infrastructural/construction costs. For the larger network, since the construction cost of distribution infrastructure rises with the increase of the network scale, the small-world model has a larger advantage over other topology models from an economic perspective. In addition, the small-world model performs better with the higher ratio of prosumers to end-users in the distribution network. Considering the increasing social and economic appeal of becoming a prosumer, the small-world model appears to be a valid design model for energy distribution networks. Such a result confirms the results of our previous work using other metrics and simulations (Pagani and Aiello 2014). The present work provides the foundation for a decision support system for analysis and high level planning of the distribution network towards managing distributed energy generation and peer-to-peer energy exchange.

Additional technical challenges need to be addressed in order to implement the peer-to-peer energy exchange and distributed energy generation in the envisioned smart grid. Firstly, ICT-related systems should be designed for the Smart Grid, which enable end-users to share the trading information such as the data of energy providers, consumers and prices. Secondly, more accurate approaches should be developed to forecast energy production and consumption for end-users. Finally, more precise costs of renewable energy generation should be estimated, in turn to enable good real-time energy prices forecasts.

To gain further insights on the attractive models of future Smart Grids, we plan to consider the buffering effects of having distributed energy storage systems, such as home batteries and electric vehicles. This entails the addition to the model of optimization strategies for charge/discharge cycles. With distributed energy storage systems, prosumers are enabled to decide whether the surplus energy should be sold to the end-users for an immediate profit or stored for later self-usage with some level of efficiency of storage.

Considering the voltage problem caused by the distributed energy generation, more advanced the reactive power and voltage control as ancillary services should be developed and applied for the distribution network. Moreover, the influence of distributed energy storage systems on the voltage problem and reactive power control should be investigated.

Availability of data and materials

All datasets on which the conclusions of the manuscript are publicly available and presented in machine-readable format files.


  1. Photovoltaic Software:

  2. Product page (accessed on 30 December 2017):




  6. Peregrine HPC cluster: peregrine-hpc-cluster


  • Abdella, J, Shuaib K (2018) Peer to peer distributed energy trading in smart grids: A survey. Energies 11(6).

  • Abe, R, Taoka H, McQuilkin D (2011) Digital grid: Communicative electrical grids of the future. IEEE Trans Smart Grid 2(2):399–410.

    Google Scholar 

  • Alvarez-Herault, M-C, N’Doye N, Gandioli C, Hadjsaid N, Tixador P (2015) Meshed distribution network vs reinforcement to increase the distributed generation connection. Sust Energ Grids Netw 1:20–27.

    Google Scholar 

  • Ayr, U (2014) Wind data analysis and wind energy potential in Italy. Int Sci J Environ Sci 3.

  • Bliek, F, van den Noort A, Roossien B, Kamphuis R, de Wit J, van der Velde J, Eijgelaar M (2010) PowerMatching city, a living lab Smart Grid demonstration In: 2010 IEEE PES Innovative Smart Grid Technologies Conference Europe (ISGT Europe), 1–8.

  • Brocco, A (2013) Fully distributed power routing for an ad hoc nanogrid In: 2013 IEEE International Workshop on Inteligent Energy Systems (IWIES), 113–118.

  • Brown, RE (2008) Impact of Smart Grid on distribution system design In: 2008 IEEE Power and Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st Century, 1–4.. IEEE, New York.

    Google Scholar 

  • Bukala, J, Damaziak K, Karimi HR, Kroszczynski K, Krzeszowiec M, Malachowski J (2015) Modern small wind turbine design solutions comparison in terms of estimated cost to energy output ratio. Renew Energy 83(Supplement C):1166–1173.

    Google Scholar 

  • Čaušević, S, Warnier M, Brazier FMT (2019) Self-determined distribution of local energy resources for ensuring power supply during outages. Energy Inf 2(1):6.

    Google Scholar 

  • Civanlar, S, Grainger JJ, Yin H, Lee SSH (1988) Distribution feeder reconfiguration for loss reduction. IEEE Trans Power Deliv 3(3):1217–1223.

    Google Scholar 

  • Daily Data from the Weather in the Netherlands. Available online: Accessed on 7 Jan 2016.

  • Dugan, RC, Arritt RF, McDermott TE, Brahma SM, Schneider K (2010) Distribution system analysis to support the Smart Grid In: IEEE PES General Meeting, 1–8.

  • Energy Consumption of Small Customers in the Netherlands. Available online: Accessed on 7 Jan 2016.

  • Galtung, J (1967) Theory and Methods of Social Research. Universitetsforlaget, Oslo, Norway.

    Google Scholar 

  • Gohokar, VN, Khedkar MK, Dhole GM (2004) Formulation of distribution reconfiguration problem using network topology: A generalized approach. Electr Power Syst Res 69(2):304–310.

    Google Scholar 

  • Gottwalt, S, Ketter W, Block C, Collins J, Weinhardt C (2011) Demand side management—a simulation of household behavior under variable prices. Energy Policy 39(12):8163–8174.

    Google Scholar 

  • Gregoratti, D, Matamoros J (2015) Distributed energy trading: The multiple-microgrid case. IEEE Trans Ind Electron 62(4):2551–2559.

    Google Scholar 

  • Grena, R (2012) Five new algorithms for the computation of sun position from 2010 to 2110. Solar Energy 86(5):1323–1337.

    Google Scholar 

  • Grigsby, LL (2007) Electric Power Generation, Transmission, and Distribution (2nd Edition). CRC Press, Boca Raton. Chap. 12.

    Google Scholar 

  • Grogg, K (2005) Harvesting the wind: The physics of wind turbines. Phys Astron Comps Papers 7.

  • Hatziargyriou, N, Asano H, Iravani R, Marnay C (2007) Microgrids. IEEE Power Energy Mag 5(4):78–94.

    Google Scholar 

  • Hommelberg, MPF, Warmer CJ, Kamphuis IG, Kok JK, Schaeffer GJ (2007) Distributed control concepts using multi-agent technology and automatic markets: An indispensable feature of smart power grids In: 2007 IEEE Power Engineering Society General Meeting, 1–7.

  • Hong, JS, Kim M (2016) Game-theory-based approach for energy routing in a smart grid network. J Comput Netw Commun 2016:2–222.

    Google Scholar 

  • International Organization for Standardization (1975) ISO 2533:1975 Standard Atmosphere, 1st edn. International Organization for Standardization. Accessed 10 Dec 2018.

  • Jogunola, O, Wang W, Adebisi B (2020) Prosumers matching and least-cost energy path optimisation for peer-to-peer energy trading. IEEE Access 8:95266–95277.

    Google Scholar 

  • Jurado, M, Caridad JM, Ruiz V (1995) Statistical distribution of the clearness index with radiation data integrated over five minute intervals. Solar Energy 55(6):469–473.

    Google Scholar 

  • Karki, R, Hu P, Billinton R (2006) A simplified wind power generation model for reliability evaluation. IEEE Trans Energy Convers 21(2):533–540.

    Google Scholar 

  • Kersting, WH (2001) Radial distribution test feeders In: Power Engineering Society Winter Meeting, 2001. IEEE, vol. 2, 908–9122.

  • Kim, B, Lavrova O (2013) Optimal power flow and energy-sharing among multi-agent smart buildings in the Smart Grid In: 2013 IEEE Energytech, 1–5.

  • Kok, K (2010) Multi-agent coordination in the electricity grid, from concept towards market introduction In: Proceedings of the 9th International Conference on Autonomous Agents and Multiagent Systems: Industry Track. AAMAS ’10, 1681–1688.. International Foundation for Autonomous Agents and Multiagent Systems.

  • Kok, JK (2013) The PowerMatcher: Smart coordination for the smart electricity grid. PhD thesis, Vrije Universiteit Amsterdam.

  • Kok, K, Roossien B, MacDougall P, van Pruissen O, Venekamp G, Kamphuis R, Laarakkers J, Warmer C (2012) Dynamic pricing by scalable energy management systems — field experiences and simulation results using PowerMatcher In: 2012 IEEE Power and Energy Society General Meeting, 1–8.. IEEE, New York.

    Google Scholar 

  • Kok, JK, Scheepers MJJ, Kamphuis IG (2010) Intelligent Systems, Control and Automation: Science and Engineering (ISCA), vol. 42. Springer, Heidelberg.

    Google Scholar 

  • Kok, JK, Warmer CJ, Kamphuis IG (2005) PowerMatcher: Multiagent control in the electricity infrastructure In: Proceedings of the Fourth International Joint Conference on Autonomous Agents and Multiagent Systems, AAMAS ’05, 75–82.. ACM, New York.

    Google Scholar 

  • Landau, CR (2017) Optimum Tilt of Solar Panels. Accessed 10 Dec 2018.

  • Law, AM (2007) Simulation Modeling and Analysis (4th Edition). McGraw-Hill, New York.

    Google Scholar 

  • Lee, J, Guo J, Choi JK, Zukerman M (2015) Distributed energy trading in microgrids: A game-theoretic model and its equilibrium analysis. IEEE Trans Ind Electron 62(6):3524–3533.

    Google Scholar 

  • Ma, J, Song L, Li Y (2018) Optimal power dispatching for local area packetized power network. IEEE Trans Smart Grid 9(5):4765–4776.

    Google Scholar 

  • MacDougall, P, Warmer C, Kok K (2011) Mitigation of wind power fluctuations by intelligent response of demand and distributed generation In: 2011 2nd IEEE PES International Conference and Exhibition on Innovative Smart Grid Technologies, 1–6.. IEEE, New York.

    Google Scholar 

  • Marzband, M, Javadi M, Pourmousavi SA, Lightbody G (2018) An advanced retail electricity market for active distribution systems and home microgrid interoperability based on game theory. Electr Power Syst Res 157:187–199.

    Google Scholar 

  • Matamoros, J, Gregoratti D, Dohler M (2012) Microgrids energy trading in islanding mode In: 2012 IEEE Third International Conference on Smart Grid Communications (SmartGridComm), 49–54.

  • Mocanu, E, Aduda KO, Nguyen PH, Boxem G, Zeiler W, Gibescu M, Kling WL (2014) Optimizing the energy exchange between the Smart Grid and building systems In: 2014 49th International Universities Power Engineering Conference (UPEC), 1–6.

  • Nguyen, PH, Kling WL, Georgiadis G, Papatriantafilou M, Tuan LA, Bertling L (2010) Distributed routing algorithms to manage power flow in agent-based active distribution network In: 2010 IEEE PES Innovative Smart Grid Technologies Conference Europe (ISGT Europe), 1–7.

  • Noh, JD, Rieger H (2004) Random walks on complex networks. Phys Rev Lett 92(11):118701.

    Google Scholar 

  • Ogunjuyigbe, ASO, Ayodele TR, Akinola OA (2016) Optimal allocation and sizing of PV/Wind/Split-diesel/Battery hybrid energy system for minimizing life cycle cost, carbon emission and dump energy of remote residential building. Appl Energy 171:153–171.

    Google Scholar 

  • Pagani, GA, Aiello M (2011) Towards decentralization: A topological investigation of the medium and low voltage grids. IEEE Trans Smart Grid 2(3):538–547.

    Google Scholar 

  • Pagani, GA, Aiello M (2014) Power grid complex network evolutions for the Smart Grid. Physica A Stat Mech Appl 396:248–266.

    Google Scholar 

  • Pagani, GA, Aiello M (2016) From the grid to the Smart Grid, topologically. Physica A Stat Mech Appl 449:160–175.

    MathSciNet  MATH  Google Scholar 

  • Raychaudhuri, S (2008) Introduction to Monte Carlo simulation In: 2008 Winter Simulation Conference, 91–100.

  • Samadi, P, Wong VWS, Schober R (2016) Load scheduling and power trading in systems with high penetration of renewable energy resources. IEEE Trans Smart Grid 7(4):1802–1812.

    Google Scholar 

  • Sha, A, Aiello M (2016) A novel strategy for optimising decentralised energy exchange for prosumers. Energies 9(7).

  • Sha, A, Aiello M (2018) Topological considerations on decentralised energy exchange in the Smart Grid. Procedia Comput Sci 130:720–727. The 9th International Conference on Ambient Systems, Networks and Technologies (ANT 2018) / The 8th International Conference on Sustainable Energy Information Technology (SEIT-2018) / Affiliated Workshops.

    Google Scholar 

  • Sung, T, Yoon SY, Kim KC (2015) A mathematical model of hourly solar radiation in varying weather conditions for a dynamic simulation of the solar organic rankine cycle. Energies 8(7):7058–7069.

    Google Scholar 

  • Tashiro, K, Takahashi R, Hikihara T (2012) Feasibility of power packet dispatching at in-home DC distribution network In: 2012 IEEE Third International Conference on Smart Grid Communications (SmartGridComm), 401–405.

  • The Smart Grid (2016) An Introduction. Available online: Accessed 30 Apr 2016.

  • van Sark, W, Schoen T (2017) Photovoltaic system and components price development in the Netherlands In: Proceedings of the 33rd European Photovoltaic Solar Energy Conference, 2866–2869.. WIP-Renewable Energies, Munich.

    Google Scholar 

  • Wang, R, Wu J, Qian Z, Lin Z, He X (2017) A graph theory based energy routing algorithm in energy local area network. IEEE Trans Ind Inf 13(6):3275–3285.

    Google Scholar 

  • Warmer, CJ, Hommelberg MPF, Kok JK, Kamphuis IG (2008) Local DER driven grid support by coordinated operation of devices In: 2008 IEEE Power and Energy Society General Meeting - Conversion and Delivery of Electrical Energy in the 21st Century, 1–5.

  • Warmer, CJ, Hommelberg MPF, Roossien B, Kok JK, Turkstra JW (2007) A field test using agents for coordination of residential micro-CHP In: 2007 International Conference on Intelligent Systems Applications to Power Systems, 1–4.

  • Watts, DJ, Strogatz SH (1998) Collective dynamics of ’small-world’ networks. Nature 393(6684):440–442.

    MATH  Google Scholar 

  • Willis, L (2013) Introduction to transmission and distribution (T&D) networks: T&D infrastructure, reliability and engineering, regulation and planning. In: Melhem Z (ed)Electricity Transmission, Distribution and Storage Systems. Woodhead Publishing Series in Energy, 3–38.. Woodhead Publishing, Cambridge.

    Google Scholar 

  • Wörner, A, Meeuw A, Ableitner L, Wortmann F, Schopfer S, Tiefenbeck V (2019) Trading solar energy within the neighborhood: Field implementation of a blockchain-based electricity market. Energy Inf 2(1):11.

    Google Scholar 

  • Yu, X, Cecati C, Dillon T, Simões MG (2011) The new frontier of smart grids. Ind Electron Mag IEEE 5(3):49–63.

    Google Scholar 

  • Zhang, B, Jiang C, Yu JL, Han Z (2018) A contract game for direct energy trading in Smart Grid. IEEE Trans Smart Grid 9(4):2873–2884.

    Google Scholar 

  • Zhong, W, Yu R, Xie S, Zhang Y, Tsang DHK (2016) Software defined networking for flexible and green Energy Internet. IEEE Commun Mag 54(12):68–75.

    Google Scholar 

  • Zhu, T, Xiao S, Ping Y, Towsley D, Gong W (2011) A secure energy routing mechanism for sharing renewable energy in smart microgrid In: 2011 IEEE International Conference on Smart Grid Communications (SmartGridComm), 143–148.

Download references


The authors are grateful to Laura Fiorini for suggestions about the simulation.


Ang Sha is supported by the China Scholarship Council (CSC). The work is partially supported by the EU H2020 FIRST project (Ref. 6742023).

Author information

Authors and Affiliations



Ang Sha performed the problem modelling, algorithm design, simulation implementation, evaluation, result analysis, and constructed the manuscript. Marco Aiello supervised the research, provided key suggestions on the problem modelling, simulation and evaluation, and revised the manuscript. Both authors read and approved the final manuscript.

Corresponding author

Correspondence to Ang Sha.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sha, A., Aiello, M. Topological considerations on peer-to-peer energy exchange and distributed energy generation in the smart grid. Energy Inform 3, 8 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: