Open access peer-reviewed chapter

Peer-to-Peer Energy Trading in Microgrids and Local Energy Systems

By Yue Zhou and Jianzhong Wu

Submitted: July 1st 2021Reviewed: July 13th 2021Published: December 15th 2021

DOI: 10.5772/intechopen.99437

Downloaded: 95

Abstract

Peer-to-peer (P2P) energy trading is an innovative approach for managing increasing numbers of Distributed Energy Resources in microgrids or local energy systems. In P2P energy trading, prosumers and consumers directly trade and exchange power and energy with each other. The development of P2P energy trading is described in five key aspects, that is, market design, trading platforms, power and ICT infrastructure, regulation and policy, and from a social science perspective. A general multiagent framework is established to simulate the behaviour of and interaction between multiple entities in P2P energy trading. A general evaluation index hierarchy is proposed to assess various P2P energy trading mechanisms. Finally, a residential community that is set in the context of Great Britain is studied using multiagent simulation and hierarchical evaluation methods. Both the technical and economic benefits of P2P energy trading are demonstrated.

Keywords

  • Peer-to-peer energy trading
  • Distributed energy resource
  • Local energy system
  • Microgrid

1. Introduction

Traditional electric power systems operate in a unidirectional way, i.e. electricity is generated by large centralised generators, transmitted through transmission and distribution networks, and finally delivered to end users. Accordingly, electricity is sold through a wholesale market and large centralised generators sell electricity in bulk to energy suppliers (sometimes called ‘retailers’), who will further re-sell it in small amounts to end users.

However, the connection of Distributed Energy Resources (DERs) changes the landscape radically. DERs include distributed generators (especially renewable energy generators such as solar panels and wind generators), energy storage systems and flexible demand. DERs may cause reversed power flow, and both power systems and electricity markets become bidirectional. End users, who have the capability of generating electricity on site (called ‘prosumers’, which is a word combining ‘producer’ and ‘consumer’), are able to feed electricity back to the bulk power grid and obtain payment from energy suppliers.

Typical schemes to remunerate power fed from renewable sources into the bulk power grid are ‘net metering’ and ‘Feed-in Tariff (FiT)’ schemes. In net metering, the surplus generation that is fed back to the bulk power grid is recorded and then deducted from the electricity consumption of the same prosumer over a period of time (e.g., a month or a year). In the FiT scheme, the generation that is fed into the bulk power grid is remunerated at a fixed export price.

However, with rapidly increasing connection of DERs, net metering or FiT schemes impose financial pressure on the power utilities and any customers who do not install DERs. As a consequence, many countries are reducing their support for distributed renewable generation through these schemes. In this context, prosumers are seeking alternatives to selling surplus generation to the bulk power grid. Peer-to-peer (P2P) energy trading is an emerging solution, where prosumers and consumers exchange energy with each other in microgrids or Local Energy Systems (LES) [1].

Advertisement

2. Key aspects of peer-to-peer energy trading

As a promising scheme to tackle high penetration of DERs, P2P energy trading has attracted increasing attention and investment in many countries of the world. A rapidly increasing number of academic papers, research projects and industrial practice have emerged on P2P energy trading around the world [2]. P2P energy trading is a comprehensive scheme involving multiple spatial scales, multiple time scales and multiple conceptual layers, as summarised and illustrated in Figure 1.

Figure 1.

P2P energy trading with multiple spatial scales, time scales and conceptual layers.

Conceptual layers

P2P energy trading is a broad concept, beyond the power engineering domain. To implement P2P energy trading, various components are needed, including the electricity infrastructure to physically deliver the electricity traded, ICT infrastructure for supporting information exchange and advanced control, trading platforms for participants to negotiate and trade with each other, market design to set the trading rules, and laws and policies to regulate and guide the trading. Social science perspective is also valuable, which can help better understand participants’ behaviours and situations to improve the design and fairness in P2P energy trading.

Spatial scales

As shown in Figure 1, spatially, a hierarchical structure can be established for P2P energy trading in power systems. At the bottom level, prosumers and consumers can trade with each other within a microgrid/LES (e.g., in a community area). However, the generation and demand might not completely match with each other, resulting in the potential needs of the trading between microgrids/LES to consume/supply each other’s energy surplus/deficit. If the power and energy still cannot be balanced, electricity needs to be imported from / exported to upper-level power networks. With this hierarchical P2P energy trading structure, power and energy can be balanced layer by layer in a bottom-up manner, so that the capacity and losses of electricity transmission equipment can be reduced. In this chapter, we focus on P2P energy trading between prosumers and consumers in microgrids and LES.

Time scales

P2P energy trading spans a wide range of time scales as well. Similar to traditional energy trading in the electricity wholesale market, trading contracts can be made from well in advance (i.e., long-term/mid-term trading, such as year/month-ahead), day-ahead, intraday, to real time. After the delivery time, settlement needs to be conducted to examine whether and to what extent the participants in P2P energy trading have followed the pre-made contracts, and then to execute the financial payment/penalty accordingly.

2.1 Market design

Market design specifies the rules that the participants must follow to conduct energy trading with each other, including the requirements for information to be provided by the participants (e.g., the bids of the amount of energy and price in an auction), the rules to match generation and demand, the pricing model and the market settlement mechanism.

Currently, market design has attracted attention from both academia and industry [2]. Many market concepts have been proposed, which can be largely classified into three categories, i.e., centralised, decentralised and distributed markets. In a centralised market, there will be one central market coordinator, which collects all the information needed from prosumers and consumers, conducts the matching and pricing centrally, and settles the market or even directly controls some devices of prosumers/consumers. Centralised markets are relatively easy to design, being able to maximise the social welfare of all the participants and having higher level of certainty in terms of the participants’ behaviours. However, centralised markets are vulnerable to single-point failures, cause potential concerns over participants’ privacy and autonomy, and have scalability issues if the number of participants in the markets increases significantly.

The opposite type of markets is the decentralisedones, in which there is not a central market coordinator, and all the prosumers and consumers directly negotiate and trade with each other bilaterally, e.g., establishing a ‘bilateral contract network’ [3]. In contrast to centralised markets, decentralised markets protect participants’ privacy and autonomy and have good scalability, but it is more difficult to reach a stable outcome which maximises the social welfare.

The compromise solution is distributedmarkets, where there is still a central market coordinator, but collecting less information from the participants and intervening with the participants in a more indirect way (e.g., through pricing signals rather than direct control signals). A number of distributed market designs are based on the Stackelberg game [4] or Alternating Direction Method of Multipliers (ADMM) [5]. Generally, distributed markets combine the advantages and disadvantages of centralised and decentralised markets.

Although many mechanisms have been proposed, there are still many challenges in the market design of P2P energy trading. Prosumers and consumers can be seen as profit-driven entities, aiming to maximum profits / minimum costs in P2P energy trading, but they often have conflicting interests, and thus how to model and manage the complicated interaction among prosumers and consumers is a challenge. Game-theory methods, either cooperative or non-cooperative games, can be used to deal with this challenge [6]. Also, if multiple P2P energy trading markets are allowed in the same area, the dynamics of forming and dissolving P2P energy trading coalitions becomes an interesting and practical topic, which has not been well explored yet. Furthermore, with increasing adoption of P2P energy trading in the future, the relationship between P2P energy trading markets and existing electricity wholesale and retail markets needs to be re-defined and coordinated. The current assumption that P2P energy trading markets are just price takers of bulk retail / wholesale markets will no longer be the case (Box 1).

Box 1.

An example of P2P energy trading market design – Mid-market rate (MMR) mechanism.

The Mid-Market Rate (MMR) mechanism, first proposed in [7], is used as an example to demonstrate P2P energy trading market design. MMR is a centralised market, where a central market coordinator is needed for information collection, pricing and settlement. Spatially, the MMR mechanism operates within a community microgrid. Temporally, MMR mechanism applies to time scales from day-ahead to hour-ahead energy trading.

Consider an example microgrid with only one prosumer Aand one consumer B.

First, assume Ahas surplus generation of PA = 5kWh to be sold, and Bhas the same amount of demand, i.e. PB = 5kWh, to be supplied in a certain time slot.

Conventionally, Aand Bare individually metered and trade with the energy supplier. Assume the energy price at which prosumers/consumers buy electricity is pbuy = 15 p/kWh and the price to sell electricity to the energy supplier is psell = 5 p/kWh,. Then the net costs of them are (positive for cost, negative for income)

CA_CONV=psell×PA=5×5=25pE1
CB_CONV=pbuy×PB=15×5=75pE2

By contrast, in the MMR mechanism, Aand Bsubmit their surplus generation and electricity demand to the market coordinator, which makes the price for P2P energy trading as

pP2P=pbuy+psell2=15+52=10p/kWh.E3

The demand of Bwill be completely supplied by the surplus generation of Aat pP2P. Therefore, the net costs of Aand Bin the MMR mechanism will be

CA_P2P=pP2P×PA=10×5=50p,E4
CB_P2P=pP2P×PB=10×5=50p.E5

The foundation of the MMR mechanism is the assumption that pbuy is larger than psell, which is usually the case in most countries (e.g., in Great Britain, pbuy is about three times as high as psell). With this assumption, we can see that |CA_P2P| > |CA_CONV| while |CB_CONV| > |CB_P2P|, indicating that the prosumer Ahas higher income while the consumer Bhas lower cost in P2P energy trading, so both benefit. The MMR mechanism takes the P2P energy trading price as the mean of the buying and selling prices issued by the energy supplier.

2.2 Trading platforms

Once proper design of P2P energy trading markets is in place, trading platforms are needed for the prosumers, consumers and coordinators to exchange information and negotiate with each other, make deals and transactions, and conduct other relevant activities such as problem reporting and dispute resolution. Considering that trading frequencies are usually high in P2P energy trading, the trading platforms are usually web-based services, which can be accessed by the participants through smart phones, tablets or personal computers in a convenient way.

A trading platform can be built based either on conventional centralised servers and databases or on Distributed Ledger Technology (DLT). Blockchain, which is the underlying technology of Bitcoin and many other cryptocurrencies, is the most famous and widely used type of DLT. Blockchain has a number of features including trustworthiness, transparency, redundancy, tamper-proof ability, and intermediary avoidance, which means it has good potential to be used for supporting P2P energy trading. Furthermore, smart contracts, which are contracts in the form of computer codes that can be automatically executed, can reduce the costs of contracting, enforcement and compliance in P2P energy trading [8].

There have been many industrial projects using Blockchain for P2P energy trading, such as the Brooklyn microgrid case in the U.S. [9]. In spite of the many potential advantages and its increasing use, there are also many issues of using Blockchain or wider DLT for P2P energy trading. DLT is still young and undergoing rapid development, with a number of technical issues, e.g., the high computational and energy costs of the ‘Proof of Work (PoW)’ mechanism and the reduced level of trustworthiness of other consensus mechanisms (Box 2).

Box 2.

“Elecbay” – An example of P2P energy trading platform.

A software platform for P2P energy trading, named as “Elecbay”, has been proposed in [1] and introduced here as an example. The parties and their interaction within “Elecbay” are illustrated in Figure 2.

The design of “Elecbay” learns from that of eBay, which is a famous e-commercial platform enabling customer-to-customer or business-to-customer sales online. On “Elecbay”, electricity sellers list the electricity to be sold as items, while electricity buyers browse all the listed items and place orders. Each order specifies the amount, time duration and price of the electricity to be exchanged.

After the transactions are agreed between electricity buyers and sellers, they will be sent to network operators to check whether the orders satisfy physical network constraints. Network operators can reject the agreements that will cause problems to physical networks. Detailed mechanisms in this will be discussed in Section 2.3.

The electricity to be sold by the sellers may not be enough to satisfy all the needs of the buyers, and vice versa. Therefore, electricity suppliers cover this electricity imbalance (i.e., providing balancing service) through buying/selling electricity from/to sellers/buyers.

Finally, at the settlement stage, “Elecbay” will distribute the payment collected from electricity buyers among electricity sellers (for providing the electricity), network operators (for the use of networks) and electricity suppliers (for dealing with the electricity imbalance). The “Elecbay” platform may keep a small percentage of the payment as the service fee as well.

Figure 2.

The parties and their interaction within “Elecbay”.

2.3 Power and ICT infrastructure

The transactions agreed between prosumers and consumers in P2P energy trading need to be physically delivered through electric power networks. This can be private wires or public power networks, as illustrated in Figure 3.

Figure 3.

P2P energy trading through private wires and public power networks. (a) through private wires. (b) through public power networks.

If a prosumer and a consumer (or two prosumers) are connected purely by private wires, as shown in Figure 3(a), the situation is simple and clear, where the electricity can be transmitted just as agreed in P2P energy trading. However, this is a rare scenario in the real world – electricity transmission and distribution businesses benefit from economies of scale and economies of density, so it is generally not economic (and even illegal in some areas) to build private power networks. Typical examples of private power networks include those in industrial parks, newly built residential communities and microgrids in islands or remote areas.

Therefore, in most practical cases, prosumers and consumers are interconnected with each other through public power networks, as shown in Figure 3(b). Electricity in public power networks has unified power quality, and the electricity from different sources cannot be physically distinguished. In this case, P2P energy trading is in nature a virtual trading arrangement, similar to the bilateral electricity purchase contracts between larger generators and consumers in conventional electricity markets. In spite of the similarities, a lot of new commercial mechanisms need to be set up to allocate the network use charges and network losses, manage the operational constraints, and provide incentives for long term network investment.

Information and communication technology (ICT) infrastructure is also needed to achieve P2P energy trading. Metering infrastructure is needed for measuring the generation/consumption of prosumers and consumers in P2P energy trading for market settlement and billing purposes. The smart metering infrastructure being deployed in many areas of the world is useful in this regard. There is research showing that existing communication technologies are sufficient to support P2P energy trading [10, 11].

2.4 Law, regulation, and policy

There have not been many formal and widely applied policies, laws or regulations on P2P energy trading across the world. P2P energy trading and the corresponding supporting technologies like Blockchain are still at an early stage and under rapid development, so it may still be too early to make firm and widely applied policies. Trials that rely on derogations from existing regulations have the advantages of being very flexible and relatively easy to establish. However, with the rapidly increasing penetration of DERs and increasing scale of P2P energy trading, establishing systematic policy, regulation and legal frameworks will be required (Box 3).

Box 3.

A list of issues to be addressed in future policy development.

The following issues need to be addressed in future policy development:

  • the formal role and responsibilities of participants of P2P energy trading (e.g., prosumers, consumers and the P2P energy trading coordinators),

  • the relationship between P2P energy trading and existing electricity markets (e.g., wholesale market, retail market, capacity market and ancillary service market),

  • the distribution of levies, taxes and network charges among the participants of P2P energy trading,

  • appropriate subsidies and incentives for encouraging the development of P2P energy trading, and

  • protection of vulnerable customers and energy equity in P2P energy trading.

2.5 A social science perspective

P2P energy trading involves large numbers of small customers, who cannot be treated in the same way as large generation companies or electricity suppliers, which behave with almost perfectly economical rationality and have a high-risk tolerance. Therefore, a social science perspective is of great importance in P2P energy trading to design reasonable and effective market mechanisms and to better understand, engage, satisfy, and protect customers (Box 4).

Box 4.

Example social science questions in P2P energy trading.

  1. Is P2P energy trading all settled by cash?

    No! In an ethnographic study in two off-grid villages in rural India, Singh et al. found that P2P energy trading is not just an economic act but actually a complicated sociocultural process [12]. Besides the ‘in-cash’ return (i.e., money), there are ‘in-kind’ return (e.g., food, oil, cakes, and service of irrigation) and ‘intangible’ returns (e.g., goodwill and friendship), involving the dynamics of social relations.

  2. Does P2P energy trading always happen in a marketplace?

    No! In another ethnographic study conducted in an off-grid village in rural India, Singh et al. found that P2P energy trading can not only happen in the regulated market realm mainly with rational participants, but also as ‘a social and personal transaction of energy between giver and energy receiver’. This was named as ‘mutual energy trading’, which is mutually structured and negotiated [13].

  3. Do customers value ‘autarky’ or ‘autonomy’ more?

    Based on the result of an online survey involving 248 German homeowners, Ecker et al. found that most customers value ‘autarky’ (i.e., independence of power supply) more than ‘autonomy’ (i.e., the ability to self-determine the source of energy) [14]. Ecker et al. inferred that this preference might not be good news for deploying P2P energy trading, considering customers might price the electricity they generate at a higher price than its actual worth. This inference remains to be validated in practice.

Advertisement

3. Simulation and evaluation of peer-to-peer energy trading

More and more P2P energy trading mechanisms with various focuses and designs are being created by researchers and practitioners across the world. Therefore, instead of focusing on any specific P2P energy trading mechanism which might be upgraded or replaced quickly, a general simulation and evaluation framework of P2P energy trading is described. This framework facilitates an understanding of the interaction of various parties, and can be used to simulate and assess the outcome of P2P energy trading for improving the mechanism design and conducting feasibility analysis and impact assessment.

3.1 Multiagent simulation

P2P energy trading involves multiple parties with different interests and objectives, and thus is suitable to be modelled and simulated by a multiagent system. The overall picture of the multiagent simulation framework for P2P energy trading is shown in Figure 4.

Figure 4.

A multiagent simulation framework for P2P energy trading (DNO/DSO: Distribution network/system operator; TSO: Transmission system operator).

Figure 4 shows that the framework models the parties related to P2P energy trading as agents and also describes their interactions. In the lower block, the parties within the P2P trading community and their interactions are presented. Although the term ‘community’ is used, it is not necessary to be a physical community, but can be a virtual aggregation of the parties conducting P2P energy trading. The participants of P2P energy trading include prosumers, distributed generators (e.g., small-scale PV power plants), community energy storage (e.g., batteries collectively owned and shared by the customers in a community) and consumers. There is a coordinator managing various aspects of P2P energy trading. This trading coordinator could be a real entity, e.g., a company running this business, or a virtual one, such as a smart contract sitting in a blockchain. Depending on the specific P2P energy trading mechanisms, the participants need to exchange various types of information (such as measurements, bids and offers, pricing signals, and control signals) with the coordinator (in centralised or distributed market designs) or with other participants (in decentralised market designs).

The upper block of Figure 4 shows the external parties. Multiple P2P energy trading communities can trade and share energy with each other, creating a hierarchical P2P energy trading structure [15]. The P2P energy trading community needs to trade and share energy with the energy supplier (also called retailer) to balance the electricity surplus or deficit. Furthermore, the P2P energy trading community could provide various ancillary services, such as voltage support, congestion management and frequency support, for bulk power system utilities, such as distribution network operators (DNOs), distribution system operators (DSOs) and transmission system operators (TSOs) (Box 5) [16].

Box 5.

Mathematical models for simulating P2P energy trading adopting MMR mechanism.

A day-ahead P2P energy trading among prosumers adopting the MMR mechanism is presented as an instance for demonstrating the multiagent simulation. For this instance, the framework in Figure 4 is simplified as that in Figure 5.

As shown in Figure 5, using the MMR mechanism, the P2P energy trading coordinator decides the internal P2P energy trading prices, based on the energy bids provided by the prosumers and the import / export prices issued by the energy supplier. Four models are used to simulate the whole process of P2P energy trading, which are detailed as below.

  1. The P2P energy trading coordinator agent and the MMR pricing model

    The agent representing the P2P energy trading coordinator takes the inputs from the prosumer agents and energy supplier agent and generates the corresponding output, with the core being the MMR pricing model linking the inputs and outputs, as illustrated in Figure 6.

    In Figure 6, ICAis the set of inputs for the coordinator agent, where pSA=ptimtTptextTis the set of electricity prices issued by the supplier agent. ptimrepresents the price of buying electricity from the supplier (i.e. import price). ptexrepresents the prices of selling electricity to the supplier (i.e. export price). Tis the set of time slots considered and tis the index of a time slot. bPA=btPAtTis the set of ‘energy tenders’ submitted by the prosumer agents, indicating the amount of energy to be sold (if negative) or bought (if positive). The set OCAis the set of outputs for the coordinator agent. pP2P=ptbtTptstTis the prices for prosumers to conduct P2P energy trading with each other. ptbis the buying price and ptsis the selling price. eCA=etCAtTis the amount of electricity that the coordinator agent buys from / sells to the supplier agent (positive values for buying and negative for selling) for balancing the supply and demand of the whole P2P energy trading community.

    Based on the ‘energy tenders’ from the prosumer agents, the P2P energy trading coordinator agent calculates the amount of energy that it needs to buy from / sell to the supplier agent to address the supply and demand imbalance within the P2P energy trading community:

    etCA=i=1Nbi,tPAE6

where Nis the total number of prosumers in the P2P energy trading community and iis the index of a prosumer.

The P2P energy trading prices in the MMR mechanism, pP2P, are taken as the mean of grid import and export prices, with some modification terms when there is supply and demand imbalance in the P2P energy trading community, which needs to be balanced by the external supplier agent. Specific formulas are presented in Appendix A.

  • The prosumer agent and the decision-making model

    The prosumer agent optimises the schedules of its flexible devices and the energy tender submitted to the P2P energy trading coordinator agent, in order to maximise its own economic benefits, as illustrated in Figure 7. Note that a prosumer agent can include models of distributed generators, energy storage and various electric loads, so being a general model that can describe other parties such as community energy storage and consumers as shown in Figure 4.

    In Figure 7, IPAis the set of inputs for the prosumer agent, which includes the P2P energy trading prices pP2Pissued by the P2P energy trading coordinator agent. The set OPAis the set of outputs of the prosumer agent, which includes the ‘energy bids’ bPAof the prosumer. The prosumer agent runs an optimisation to decide its optimal operation schedule and energy bids. The formulation of the optimisation problem is presented in Appendix B.

  • The energy supplier agent

    The energy supplier is considered to act in a passive way, just to balance the electricity imbalances in the P2P energy trading community. The P2P energy trading coordinator imports/exports electricity from/to the energy supplier at the prices published by the energy suppliers. Flexible pricing schemes can be included, such as time-of-use (TOU) pricing, critical peak pricing (CPP), real-time pricing (RTP) and incline block pricing (IBP).

  • The implementation process and model

    The implementation model specifies how the agents interact with each other, especially between the P2P energy trading coordinator agent and prosumer agents. The decisions of the coordinator agent and prosumer agents depend on each other, so iterations are used to describe their interaction. The iteration process can be fully implemented in practice, or used to model the gaming process in the agents’ mind when they make decisions.

    The convergence of iteration is an issue. In some designs, game-theoretic analysis is used to prove the existence of equilibria, where the iteration can converge, such as in [4]. However, game-theoretic methods usually assume models with specific mathematical forms, which might not be the case in practice. To address this issue, some heuristic methods, such as the ‘Step Length Control’ and ‘Learning Process Involvement’ proposed in [17], can be used to facilitate convergence. If convergence still cannot be achieved, the iteration process can be set to end after a pre-set number of iterations.

    With the above formulation, P2P energy trading adopting the MMR mechanism can be simulated. A numerical example is given in Section 4.

  • Figure 5.

    The multiagent simulation framework for P2P energy trading adopting MMR mechanism.

    Figure 6.

    The P2P energy trading coordinator agent.

    Figure 7.

    The prosumer agent.

    3.2 Evaluation index hierarchy

    With the outcome of P2P energy trading obtained from the multiagent simulation or measured from real implementation cases, an evaluation system is needed for comprehensively assessing the performance of conducting P2P energy trading. The impact of P2P energy trading can include a wide range of aspects – for example, a multi-dimension conceptual framework has been proposed to analyse blockchain-based P2P microgrids from technological, economic, social, environmental and institutional dimensions [17]. In this chapter, we will establish a general index hierarchy with some key quantitative technical and economic indexes for assessing the performance of P2P energy trading.

    3.2.1 Technical indexes

    From the perspective of microgrid/LES operators, one important motivation of conducting P2P energy trading is to better coordinate and integrate a high penetration of DERs. The potential technical capability of P2P energy trading is mainly in the improvement of local power and energy balance, which can be quantified in various ways.

    Box 6.

    Technical indexes for assessing P2P energy trading.

    Local Power Balance Index

    The local power balance facilitated by P2P energy trading can help release circuit congestion, reduce circuit losses and improve the circuit utilisation within the microgrid/LES, and defer network reinforcement for both the microgrid/LES and upper-level power networks. The local power balance can be quantified by the peak-to-average ratio (PAR) within the microgrid/LES, as calculated by

    ILPB=PMmaxPM¯E7

    where ILPBis the value of Local Power Balance Index; PMmaxis the peak active power of the microgrid/LES; PM¯is average active power of the microgrid/LES throughout the time horizon considered (usually one day).

    Local Energy Balance Index

    Local energy balance indicates the extent to which local generation/demand can be consumed/ satisfied within the microgrid/LES, also reflecting the independency of the microgrid/LES. The local energy balance can be quantified by

    ILEB=t=1TPtIm+PtExt=1TPtD+PtGE8

    where ILEBis the value of Local Energy Balance Index; PtImand PtExare the total import and export power of the microgrid/LES at the time step t; PtDand PtGare the total demand and local generation of the microgrid/LES at the time step t; Tis the total number of time steps considered (usually for one day).

    3.2.2 Economic indexes

    The economic performance of P2P energy trading can be measured from the perspectives of individual participants as well as the whole microgrid/LES. Economic benefits are direct incentives for conducting P2P energy trading, especially for individual participants.

    Box 7.

    Economic indexes for assessing P2P energy trading.

    Coalition Stability Index

    For each individual participant, the necessary condition for it to stay in the P2P energy trading community, rather than directly trade with the conventional energy supplier, is that its economic benefit obtained through P2P energy trading is no lower than those with the energy supplier. Therefore, the coalition stability of the P2P energy trading community can be quantified by the percentage of participants who have higher economic benefits in P2P energy trading than those with the energy supplier, i.e.

    ICS=NHNP2PE9

    where ICSis the value of Coalition Stability Index; NHis the number of participants who have higher economic benefits in P2P energy trading than those with the energy supplier; NP2Pis the total number of the participants in the P2P energy trading community.

    Total Benefits Index

    The total economic benefits of all the participants brought by P2P energy trading, with the benefits with the energy supplier as a reference value, are assessed by

    ITB=BMP2PBMESE10

    where ITBis the value of Total Benefits Index; BMP2Pis the total economic benefits of all the participants in the P2P energy trading community; BMESis the total economic benefits of all the participants if trading with the energy supplier otherwise. The economic benefits are measured by net electricity costs.

    Benefits Allocation Index

    Another index is needed for reflecting how the total benefits brought by P2P energy trading are allocated to each participant, which is defined as follows:

    IBA=i=1NP2Pj=1NP2PCiCjE11

    where IBAis the value of Benefits Allocation Index, and Crepresents the net cost of a P2P energy trading participant (positive for cost and negative for income) throughout the time horizon considered. It is seen that (11) calculates the summation of the cost difference between any two participants in P2P energy trading.

    3.2.3 Index normalisation and index hierarchy establishment

    Based on the individual technical and economic indexes defined in the previous subsections, an index hierarchy can be established to assess the overall performance of P2P energy trading. To compare and synthesise different indexes, the indexes need to be normalised with the following features: (i) the index value being a number ranging from 0 to 1, and (ii) the index value ‘0’ representing ‘the worst’ and ‘1’ representing ‘the best’. Specific normalisation of the indexes presented in the previous subsections is given in the following box. The technical and economic indexes presented in Boxes 6 and 7 are normalised as follows (Table 1).

    CategoryIndex nameOriginal indexNormalised indexNotes
    TechnicalLocal Power BalanceILPB=PMmaxPM¯ILPB=1ILPBσσ: Maximum peak-average ratio from experience
    Local Energy BalanceILEB=t=1TPtIm+PtExt=1TPtD+PtGILEB=1ILEB
    EconomicCoalition StabilityICS=NHNP2PICS=ICS
    Total BenefitsITB=BMP2PBMESITB=ITBBMmaxBMESBMmax: Maximum potential benefits that could be obtained (calculated through centralised optimisation [18])
    Benefits AllocationIBA=i=1NP2Pj=1NP2PCiCjIBA=1IBA2NP2P2·maxi12NCi

    Table 1.

    Normalisation of evaluation indexes for assessing P2P energy trading.

    After normalisation, the indexes can be synthesised hierarchically by calculating the weighted sum, as presented below and illustrated in Figure 8 [19]:

    Figure 8.

    Evaluation index hierarchy for assessing P2P energy trading.

    ITPI=iNTIαi·IiTIwhereiNTIαi=1,αi0E12
    IEPI=iNEIβi·IiEIwhereiNEIβi=1,βi0E13
    IOPI=iNsubγi·IisubwhereiNsubγi=1,γi0E14

    where ITPI, IEPIand IOPIrepresent the values of Technical Performance Index, Economic Performance Index, and Overall Performance Index; αi, βiand γiare the weighting coefficients; IiTIrepresents the i-th technical index (such as the local power/energy balance index), and NTIis the total number of technical indexes; IiEIrepresents the i-th economic index (such as Coalition Stability Index, Total Benefits Index and Benefits Allocation Index), and NEIis the total number of economic indexes; Iisubrepresents the i-th index below the ‘Overall Performance Index’ level (such as Technical Performance Index and Economic Performance Index), and Nsubis the total number of these indexes.

    It is worth noting that the indexes and hierarchy presented are just examples, and the methodology behind these examples is general and scalable. Firstly, more/different indexes for assessing technical or economic performance can be defined. Furthermore, other aspects beyond technical and economic performance, such as social, environmental and institutional dimensions, can also be considered to be assessed. More complicated methods can be used to synthesise the indexes at different levels, such as using the Analytic Hierarchy Process (AHP) method to decide the values of weighting coefficients.

    Advertisement

    4. Case study

    A case study using multiagent simulation and the evaluation index hierarchy described in Sections 2 and 3 demonstrates P2P energy trading and its performance. A residential community consisting of 20 houses in Great Britain (GB) was considered. P2P energy trading was conducted between the customers within the community, adopting the MMR mechanism. The simulation was conducted in MATLAB and the optimisation was solved using CPLEX solvers.

    4.1 Case design and parameters

    For the 20 houses in the community, it was assumed that half of the houses had a 2 kW PV system for each house but did not have an electric vehicle, while each of the other half owned an electric vehicle but did not have a PV system. The CREST model [20], which is based on realistic GB statistics, was used to generate the electrical and usage patterns of the domestic appliances, demand and PV generation profiles of each house. The parameters and travel behaviour of the electric vehicles were generated from a database reflecting realistic use in GB [21].

    The customers were assumed to conduct P2P energy trading under the MMR mechanism. They were assumed to do the trading day-ahead at the time resolution of one hour, i.e., making energy trading agreements for each hour of the next day one day in advance. For P2P energy trading, the ‘Learning Process Involvement’ technique was adopted as the implementation mechanism [19], with the learning rate selected as 0.5 and the maximum iteration number being 300. The import and export electricity prices provided by the external energy supplier were assumed to be 14.57 pence/kWh and 5.03 pence/kWh, which are typical values in GB.

    Two reference cases (i.e., ‘P2G’ and ‘Global Optimum’) were simulated and compared with the P2P energy trading case (the ‘P2P’ case). The ‘P2G’ (‘Peer to Grid’) is the current arrangement in GB, where customers separately trade with the energy supplier at the import/export prices. In the ‘Global Optimum’ case, all the customers were assumed to be fully controlled by a centralised entity, which minimised the electricity cost of the whole community. The ‘Global Optimum’ case is to provide a reference to examine the capability of P2P energy trading in tapping the economic potential in the community.

    When calculating the values of the evaluation indexes, equal coefficients were taken at all the levels.

    4.2 Simulation and evaluation results – technical performance

    The resulting daily demand profiles of the whole community in the three cases are presented in Figure 9, also with the community generation profiles and external/internal electricity prices plotted. The index values regarding the technical performance are shown in Table 2.

    Figure 9.

    The community demand and generation profiles with the external/internal electricity prices in the three cases. (a) the ‘P2G’ case. (b) the ‘global optimum’ case. (c) the ‘P2P’ case.

    CasesLocal power balance indexLocal energy balance indexTechnical performance index
    P2G0.15910.46570.3124
    P2P0.51040.78050.6454
    Global Optimum0.31890.82600.5724

    Table 2.

    Indexes values of the technical performance in the three cases.

    Figure 9(a) shows that the surplus PV power generation of some customers in the community was not consumed by other customers in the community due to the lack of coordination among customers when the customers separately traded with the external energy supplier. Moreover, the peak power of the community of the day was as high as 38.45 kW. By contrast, Figure 9(b) shows that, with the global optimisation, the local energy balance was able to reach a very high level, and the peak net power was reduced significantly to 10.14 kW.

    Figure 9(c) shows the results with P2P energy trading. Compared to the ‘P2G’ case, much flexible demand was shifted to around noon to utilise the surplus PV power generation, incentivised by the lower internal P2P buying prices during those periods. This resulted in a much higher level of local energy balance as well as a higher level of local power balance with the peak net power of the community in the day being just 9.20 kW. Compared to the ‘Global Optimum’ case, the local energy balance level of the ‘P2P’ case was slightly lower expectedly, but the peak net power was also slightly lower (indicating an even better local power balance than the ‘Global Optimum’ case). This is because the price signals with the unit of £/MWh just incentivise local energy balance but do not incentivise local power balance directly. Therefore, additional measures, such as adding a ‘capacity charge’ element (i.e., with the unit being £/MW), can be taken (in the traditional retail market or in the P2P energy trading market) to further incentivise the local power balance.

    Table 2 shows the quantified performance through the index values. Consistent with the results shown in Figure 9, the values of Local Power Balance Index, Local Energy Balance Index and Technical Performance Index in the ‘P2P’ case are 220.8%, 67.6% and 106.6% higher than those in the ‘P2G’ case. On the other hand, the value of Local Energy Balance Index in the ‘P2P’ case is just 5.5% lower than that of the ‘Global Optimum’ case, showing that P2P energy trading under the MMR mechanism had got very close to the global optimum in this respect.

    4.3 Simulation and evaluation results – economic performance

    The total net cost of the community is illustrated in Figure 10, showing that P2P energy trading with the MMR mechanism significantly reduced the total net cost of the community compared to the ‘P2G’ case, being very close to the global optimum value.

    Figure 10.

    The daily net cost to the community in the three cases.

    Figure 11 shows that the daily net cost of any customer in the ‘P2P’ case was lower than that in the ‘P2G’ case, indicating that P2P energy trading benefited every customer to some extent and no customer would have the incentive to escape from the P2P energy trading coalition.

    Figure 11.

    The cost distribution in the community in the ‘P2G’ and ‘P2P’ cases.

    The index values regarding the economic performance are calculated as presented in Table 3. Note that the index values regarding the cost distribution were not calculated for the ‘Global Optimum’ case, since how the total cost of the community is allocated was not specified for the ‘Global Optimum’ case.

    CasesCoalition stability indexTotal benefits indexBenefits allocation indexEconomic performance index
    P2G1.00000.00000.77380.5854
    P2P1.00000.91500.70600.8649
    Global OptimumN/A1.0000N/AN/A

    Table 3.

    Indexes values of the economic performance in the three cases.

    The numbers in Table 3 are discussed as follows. Consistent with the results in Figures 10 and 11, the value of Total Benefits Index of the ‘P2P’ case is significantly higher than that of the ‘P2G’ case, being only 8.5% lower than that of the ‘Global Optimum’ case. No customer would be worse off in the ‘P2P’ case, so the value of Coalition Stability Index takes the maximum value of 1.0000. By contrast, the value of Benefits Allocation Index in the ‘P2P’ case is slightly lower than that of the ‘P2G’ case, showing that P2P energy trading with the MMR mechanism did not improve the equity level in the community in terms of electricity cost. In summary, the value of Economic Performance Index of the ‘P2P’ case is 27.95% higher than that of the ‘P2G’ case, showing clear economic benefits brought by P2P energy trading.

    4.4 Simulation and evaluation results – overall performance

    The performance of the three cases is summarised in Table 4. It is shown that P2P energy trading has a significantly better performance from both the technical and economic perspectives, compared to the existing arrangement where customers separately trade with the energy supplier, showing the great potential of P2P energy trading.

    CasesTechnical performance indexEconomic performance indexOverall performance index
    P2G0.31240.58540.4489
    P2P0.64540.86490.7552
    Global Optimum0.5724N/AN/A

    Table 4.

    Comparison of the overall performance of the three cases.

    Advertisement

    5. Summary

    P2P energy trading is an innovative approach for managing increasing numbers of DERs in microgrids or local energy systems. In P2P energy trading, prosumers and consumers directly trade and exchange power and energy with each other. With proper design, P2P energy trading can create a triple win situation for customers, microgrids/local energy systems and wider bulker energy systems.

    P2P energy trading is an emerging area with rapidly increasing academic research and industrial practice in many places of the world. P2P energy trading can be conducted across multiple temporal scales (e.g., settlement markets and forward markets with various time resolutions) and multiple spatial scales (i.e., within/between/beyond microgrids/LES). The development of P2P energy trading can be categorised into five key aspects, that is, i) market design, ii) trading platforms, iii) power & ICT infrastructure, iv) law, regulation & policy, and v) social science perspective.

    Multiagent simulation and an evaluation index hierarchy were proposed to simulate and evaluate various P2P energy trading mechanisms. These techniques are useful for both academic study and industrial practice. In the multiagent simulation, relevant parties involved in P2P energy trading, such as market coordinators, energy suppliers and prosumers, are modelled as agents, with their internal behaviour models and interaction with other parties described. In the evaluation index hierarchy, quantitative indexes are defined to assess different aspects of P2P energy trading (e.g., technical and economic aspects), and indexes are synthesised to reflect higher-level performance. It is worth noting that the multiagent simulation framework and evaluation index hierarchy described are actually open systems, which are easy to extend and adjust for further development or specific applications.

    Finally, P2P energy trading in a residential community in the context of GB was demonstrated as a case study. The houses had PV panels, electric vehicles and other typical appliances, trading and sharing electricity with each other in a day-ahead manner. Simulation results showed that the adopted P2P energy trading mechanism significantly improved the technical and economic performance of the community. The case study also showcased the application of a multiagent simulation framework and the effectiveness of the evaluation index hierarchy.

    Advertisement

    The Mid-Market Rate mechanism makes the P2P energy trading prices using the following formulas:

    ptb=ptmean·Gt+ptimDtGtDtDt>GtptmeanDtGttT,EA1
    pts=ptmeanDtGtptmean·Dt+ptexGtDtGtDt<GttT,EA2

    where

    ptmean=ptim+ptex2tT,EA3
    Dt=i=1Nmaxbi,tPA0tT,EA4
    Gt=i=1Nminbi,tPA0tT.EA5

    In (A1) and (A2), ptband ptsrepresent the prices at which the prosumers buy and sell electricity in the P2P energy trading community. ptmeanis the average of the import price ptimand export price ptexissued by the supplier agent, as calculated in (A3).Dtand Gtare the total electricity demand and supply in the P2P energy trading community, as specified by (A4) and (A5) respectively. bi,tPAis the energy tender submitted by the prosumer agent i, indicating the amount of energy to be sold (if negative) or bought (if positive).

    The prosumer agent runs an optimisation to decide its optimal operation schedule and energy bids. If a prosumer with solar PV panels, an electric vehicle, an electric water heater with a tank (as a flexible load) and inflexible electric loads is considered for example, the decision-making model of this prosumer is as follows:

    mint=1TptP2P·Ptnet·tEB1

    where

    Ptnet=xtH+xtchηch+xtdisηdis+PtinflexPtPVtT,EB2
    ptP2P=ptbPtnet>0ptsPtnet0tT,EB3

    subject to

    k=1txkHt+ρ·M·c·θiniθ¯k=1tQktT,EB4
    k=1txkHtρ·M·c·θ¯θini+k=1tQktT,EB5
    Qt=ρ·mt·c·θsetθcoldtT,EB6
    0xkHPHtT,EB7
    SOCt=SOCini+1Ck=1txtch+xtdisttT,EB8
    SOCtin=SOCtoutSOCtT,EB9
    SOC¯SOCtSOC¯tT,EB10
    SOCT=SOCinitT,EB11
    0xtchPch,Pdisxtdis0tT.EB12

    (B1) is the objective function, showing that the prosumer agent tries to minimise its daily net electricity cost. Ptnetis the net power consumption at the time slot t, calculated by (B2) where xtHis the power consumption of the electric water heater; xtchand xtdisare the charging (always positive) and discharging (always negative) power of the electric vehicle; ηchand ηdisare charging and discharging efficiencies of the electric vehicle; Ptinflexis the sum of the all the inflexible loads; PtPVis the power generation of the PV panels. Positive Ptnetmeans the prosumer has electricity deficit, so the prosumer agent needs to buy electricity from the P2P energy trading community, thus the P2P energy trading price being the buying price shown in (B3). By contrast, negative Ptnetmeans the prosumer has electricity surplus, so the prosumer agent needs to sell electricity to the P2P energy trading community, thus the P2P energy trading price being the selling price shown in (B3). tis the length of a time step.

    (B4)(B7) are the constraints regarding the electric water heater with a hot water tank. (B4) and (B5) ensure that the thermal energy stored in the hot water tank can satisfy the hot water demand at the same time does not exceed the capacity of the tank. ρis unit conversion coefficient between ‘J’ and ‘kWh’; Mis the maximum amount of water the tank can store in the tank; cis the specific heat capacity of water; θ¯and θ¯are the lower and upper limits of the water temperature in the tank; θiniis the initial water temperature in the tank. (B6) calculates the heat energy needed at each time step, Qt, because of the hot water use. θsetis the setpoint of the water temperature, and θcoldis the temperature of the cold water inlet. mtis the amount of water consumed at each time step. (B7) specifies the range of electric power of the water heater for heating.

    (B8)(B12) are the constraints regarding the electric vehicle. (B8) describes the evolution of the state of charge (SOC) of the batteries in the electric vehicle. (B9) models the impact of travelling on the SOC, where SOCtinand SOCtoutrepresent the SOC when the electric vehicle returns home and leaves from home for travelling respectively, and SOCrepresents the amount of energy needed (measured by SOC) for travelling. Note that here only one travel is modelled – if more travels are made, similar equations can be added. (B10) specifies the upper bound SOC¯and lower bound SOC¯of SOC. (B11) requires the SOC at the end of the day, SOCT, should be equal to that at the beginning of the day, SOCini, so that the schedule is sustainable for the future. (B12) specifies the ranges of charging and discharging power.

    In summary, given the P2P energy trading prices received from the P2P energy trading coordinator agent, the prosumer will optimise its flexible load schedule to minimise its own net electricity cost. The resulting net power consumption/generation will be submitted to the coordinator agent for deciding the P2P energy trading prices, i.e., the set of energy bids being bPA=btPA=PtnettT.

    © 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution-NonCommercial 4.0 License, which permits use, distribution and reproduction for non-commercial purposes, provided the original is properly cited.

    How to cite and reference

    Link to this chapter Copy to clipboard

    Cite this chapter Copy to clipboard

    Yue Zhou and Jianzhong Wu (December 15th 2021). Peer-to-Peer Energy Trading in Microgrids and Local Energy Systems, Microgrids and Local Energy Systems, Nick Jenkins, IntechOpen, DOI: 10.5772/intechopen.99437. Available from:

    chapter statistics

    95total chapter downloads

    More statistics for editors and authors

    Login to your personal dashboard for more detailed statistics on your publications.

    Access personal reporting

    Related Content

    This Book

    Next chapter

    District Heating and Cooling Systems

    By Iván De la Cruz and Carlos E. Ugalde-Loo

    Related Book

    First chapter

    Synthesis Processes for Li-Ion Battery Electrodes – From Solid State Reaction to Solvothermal Self-Assembly Methods

    By Verónica Palomares and Teófilo Rojo

    We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

    More About Us