Towards the Design of P2P Energy Trading Scheme Based on Optimal Energy Scheduling for Prosumers

: The peer-to-peer (P2P) energy trading is anchored in more efficient usage of electric power by allowing excess electric power from energy prosumers to be harnessed by other end-users. To boost the P2P energy trading, it is of pivotal significance to call on energy prosumers and end-users to actively participate in the trading while sharing information with a greater degree of freedom. In this perspective, this paper purports to implement the P2P energy trading scheme with an optimization model to assist in energy prosumers’ decisions by reckoning on hourly electric power available in the trading via the optimal energy scheduling of the energy trading and sharing system (ETS). On a purely practical level, it is assumed that all trading participants neither join the separate bidding processes nor are forced to comply with the predetermined optimal schedules for a trading period. Furthermore, this paper will be logically elaborated with reference to not only the determination of transaction price for maximizing the benefits of consumers under the different electricity rates but the establishment of additional settlement standards for bridging an imperative gap between optimally planned and actually transacted quantities of the P2P energy trading.


Introduction
Global interests in transition to a sustainable energy future and reduction of greenhouse gas emissions triggered by the United Nations Framework Convention on Climate Change (UNFCCC) [1] have been moving steadily to huge investments in technologies of distributed energy resources (DERs). Since the Paris climate agreement of 2015 [2], this change has been spotlighted as an effective way to forge the new climate regime and avert the climate crisis.
The fossil fuel-based centralized energy industry will be soon replaced by the decentralized one with relatively energy-efficient and eco-friendly solutions used by energy prosumers. Obviously, the prominent role of information communication technology (ICT) is required for a major paradigm shift in the energy sector [3,4]. The synergistic convergence of energy and ICT may track energy consumption of end-users in real time with an innovative automatic system, thereby integrating their energy consumption and DERs to a single consistent system and optimizing the total energy supply and demand. In addition, it can provoke the fundamental change in end-users' behaviors by analyzing and visualizing their energy consumption patterns. To this end, outstanding efforts to incorporate the proliferation of renewables as well as the advancement of ICT and energy-related technologies into a new business realm are underway around the world [5]. With all the heightened expectations, diverse types of demonstration projects with the peer-to-peer (P2P) energy trading mechanism have so far been witnessed worldwide [6][7][8][9].
In order to ferret out the general applicability of the P2P energy trading, this paper is intended to explore a completely novel framework, which can guide energy prosumers' strategic behaviors by sharing hourly information on the P2P energy trading. Here, the information is determined a priori based on trading participants' predictions and technical characteristics of their generating facilities without the iterative bidding procedures. Though it is obtained by the optimal energy scheduling of the energy trading and sharing system (ETS), an outline of additional settlement standards will be presented in this paper to coordinate the mismatch between optimally planned and actually transacted quantities of the P2P energy trading.

Overview of the P2P Energy Trading Scheme
The P2P energy trading is expected to bolster up more efficient use of energy by sharing excess electric power of energy prosumers with neighbors [10]. The possibility of sharing various information and looking for new business opportunities will be the key to encouraging energy prosumers and end-users to be more aggressive in the P2P energy trading [11,12].
In this respect, this section will exploit a seamless P2P energy trading scheme to seek energy prosumers' strategic behaviors by deriving hourly electric power available in the P2P energy trading via the optimal energy scheduling of ETS, based on a range of their predictions and technical characteristics of energy prosumers' assets.

Underlying Assumptions of P2P Energy Trading Scheme
The P2P energy trading scheme proposed in this paper is subject to the following provisos:

•
All P2P trading participants' information about load forecasts, generation predictions, and the involvement of controllable generating facilities including energy storage system (ESS) in the P2P energy trading will be automatically transmitted to ETS through their intelligent electronic device (IED) prior to planning for the P2P energy trading.

•
All energy prosumers attending the P2P energy trading must register data on technical properties of their own controllable generating and storage facilities at ETS in advance. This kind of information will be tagged as private and is not open to other market agents [13].

•
There are no restrictions on eligibility criteria for energy prosumers who wish to attend the P2P energy trading. That is, massive players are free to participate in the P2P energy trading irrespective of their types and sizes. Moreover, no technological limitations on facilities for power supply are given.

•
The commodity in the P2P energy trading is low-cost surplus electric power from energy prosumers, implying that the P2P energy trading is targeted to only end-users.

•
The utility can play a passive role in the P2P energy trading to maintain the balance of supply and demand in energy for individual trading participants. Thus, the transaction price at the P2P energy trading must be set at levels that are slightly lower than the utility's usage rates of electricity for the P2P power buyers. • All energy prosumers can choose between selling their surplus to the utility and engaging in the P2P energy trading. To deter energy prosumers from selling back the electric power purchased from the utility, or to preclude arbitrage activities, the utility is supposed to purchase their surplus at a much cheaper contracted price than the utility's usage rates of electricity applied to them. Consequently, energy prosumers cannot help but prefer trading their surplus on the basis of the P2P approach to reselling it to the utility. When it comes to the P2P energy trading scheme, it will prevail over the existing utility-based retail energy market.

•
All trading participants need not undergo the separate bidding processes since the excessive transaction expenses, when considering their small electricity consumption, may be inevitably incurred from the repetitive bidding processes. For this reason, it may seem extraordinarily onerous to solicit their repeated bids for the strategic trading for the purpose of managing their own power usages. • All trading participants are not obligated to stick to the optimal schedules for a trading period which will be drawn up by ETS. From the end-users' point of view, they barely have strategic means enough to respond to the resulting recommendations and, at the same time, it is nearly impossible for them to conform to predetermined solutions due to inherent uncertainties. Simply put, ETS provides all trading participants with a useful point of reference on hourly transacted prices and amounts as well as the availability of opportunities for the P2P energy trading.

•
The settlement standards for the P2P energy trading need to be arranged as well on account of the mere fact that an absence of the obligation to invariably uphold the optimal schedules of ETS should call for the additional settlement process after a trading period is terminated.
In short, Figure 1 exhibits the basic organizational structure of the P2P energy trading scheme.

Mathematical Formulation of Optimal Energy Scheduling Problem for P2P Energy Trading
In this subsection, the optimal energy scheduling problem over a specific span of trading will be formulated based on the previous hypotheses. This model deals with not only quantitative information such as hourly transacted amounts of electric power for energy prosumers and end-users but conditional information such as the functional role of energy prosumers and the operational states of their generating and storage facilities. Accordingly, the mixed integer linear programming (MILP) will be adopted as an optimization algorithm [14]. On the other hand, the transaction price at the P2P energy trading will not be taken into account as a variable or a constant during the course of the computation since the bidding behaviors of trading participants are not involved in the proposed P2P energy trading scheme. It is no wonder that the transaction price at the P2P energy trading must be determined following the optimal energy scheduling.
First of all, the objective of this optimization model is to minimize the total power supply costs for all trading participants, which are equal to the sum of the usage charges for electricity received from the utility and the operation costs for energy prosumers' own generation equipment [15]. In the microeconomic context, this objective may be aptly interpreted as the maximization of possible benefits for all trading participants by identifying the hourly maximum quantities available in the P2P energy trading which they will be able to share with the same monetary value. Mathematically, it can be formulated as follows: Indeed, the optimal energy scheduling model for the P2P energy trading may be regarded as the optimal resource operation planning for all trading participants. Undoubtedly, technical details of controllable generating and storage facilities as well as hourly energy balancing of each trading participant should be addressed, which can be represented by the constraints of the optimization problem [16,17]: 1. Constraint on hourly quantity of electricity for the P2P energy trading: It means that the P2P energy trading will be facilitated only when the residual electric power by energy prosumers is always equal to or greater than the transacted volume by the P2P energy trading. In addition, it will enable energy prosumers to sell the remnants exceeding the trading amount to the utility at the predefined price: 2. Constraint on hourly energy balancing of trading participants: It means that each load demand for trading participants must be fully satisfied by either their self-generation of electricity or power purchases from the utility and the P2P energy trading: 3. Constraint on hourly participation in the P2P energy trading by energy prosumer: All energy prosumers can pursue the role of a seller or a buyer. However, when they decide to participate in the P2P energy trading at a certain moment, they must choose whether they serve as a seller or a buyer. In a mathematical formulation, an either-or approach like decision-making of joining the P2P energy trading can be tackled with the binary variable: 4. Constraints on hourly maximum power received from the utility for the energy prosumer: All trading participants' energy balancing can be ascribed solely to the purchase of electricity from the utility and the P2P trading. Since the purchase of electricity from the utility by the energy prosumer depends on the role of participation in the P2P energy trading, the constraint on hourly maximum power received from the utility can be imposed by taking advantage of the conditional binary variable: 5. Constraint on operation of the distributed generation equipment: The hourly operational states and generation of distributed generation equipment owned by energy prosumers are strongly influenced by technical specifications of the corresponding generating units, which will be associated with constraints of the optimization problem.
• Constraint on maximum and minimum generation of the distributed generation equipment: The power output of online distributed generation equipment at a given time must be within the reasonable operational limits. Once the generating unit is switched off, its power output must be designated as zero. It can be ascertained by employing the binary variable of operational states for the distributed generation equipment: , , • min ≤ , , ≤ , , • max , ∀ , , • Constraint on ramping rates of the distributed generation equipment: The ramping rate is the physical characteristic to express how quickly a generating unit's power output is changing, either increasing or decreasing. Hence, its power output will be affected in the consecutive trading intervals by these ramping-up and ramping-down restrictions [18]: 6. Constraint on operation of the energy storage system (ESS): In fact, hourly charging and discharging states as well as the amount of energy stored in ESS are governed by technical requirements pertinent to the operation of ESS. In the following, several features will be introduced and tailored to the constraints of the optimal P2P energy scheduling model.
• Constraint on charging and discharging powers in ESS: The charging and discharging powers extracted from ESS for a trading period will certainly be bound by maximum permissible capacities for each operational mode and dominated by the installed capacity of power conditioning system (PCS) in ESS: , , ≤ , , • max , ∀ , , • Constraint on state-transition for the energy level in ESS: At a specific moment, the state of charge (SOC) in ESS heavily relies on the charging and discharging powers as well as the conversion efficiency based on the SOC in a previous step [19]. Shortly, the state-transition equation for the energy level in ESS can be constructed in a sequential manner: • Constraint on SOC in ESS: The SOC in ESS must be observed in accordance with prescribed conditions to ensure the natural life cycles of ESS: To capitulate briefly, the optimization model can be construed as the minimization of the power supply costs for all P2P trading participants subject to various constraints as stated in Equation (2) to Equation (13). Here, the variables to be determined in this model are, on an hourly basis, sales and purchases by the P2P trading, purchases from the utility, information on distributed generation equipment and ESS, and conditional modes of energy prosumers.

Determination of Transaction Price at P2P Energy Trading
Since the trading commodity at a specified time window is the surplus electric power by energy prosumers, the P2P energy trading will not be realized if there is no extra electric power to be traded. Depending on the surplus electric power by energy prosumers arising from the aforementioned optimal P2P energy scheduling model, it is crucial to see whether or not the P2P energy trading will take place by the following relationship: The transaction price at a time when there are no happenings of the P2P energy trading must be set as zero: When there exists any P2P energy trading, the transaction price is otherwise assigned to the utility's transmission tariff subtracted from the utility's lowest usage rate of electricity for trading participants who bought electricity from the P2P energy trading: In the proposed scheme, the price bidding is prohibited and an hourly amount of energy available in the P2P energy trading is derived by the optimal energy scheduling model. Under the fixed P2P trading quantity, giving a preference to end-users with higher willingness to pay for electricity would entail maximizing the consumer surplus [20,21].
As portrayed in Figure 2, the transaction price is deemed to be the market clearing price (MCP) for maximizing the consumer surplus. Since the direct power exchange between trading participants in the P2P energy trading is envisaged without the aid of upstream transmission network, both end-users and energy prosumers need not pay for the transmission fee when buying and selling the electric power within the P2P energy trading scheme [22]. The transaction price at the P2P energy trading is, at least, lower than the utility's usage rates of electricity for trading participants since the payments for the transmission are excluded, which can be confirmed by (16). It is apparent that trading participants must be attracted to the P2P energy trading rather than the power purchase from the utility.

Implementation of Settlement Standards for P2P Energy Trading
During the period of trading, the actual amount of energy traded by the P2P application can be substantially different from the scheduled volume estimated by the optimal energy scheduling model because of considerable uncertainties such as load forecast errors, renewable generation forecast errors, unpredictable outages of generating, and storage facilities. The most feasible alternative to guarantee more transparent P2P energy trading must be reinforced by clearing the actual amount of energy for the P2P trading participants as per the planned optimal schedules [23]. In this subsection, the methodology of finalizing the sales and purchases for settlement will be investigated by allowing for hourly actual surplus electric power secured by energy prosumers for a trading period.

•
The cleared sales of energy prosumers: The cleared sales of energy prosumers are the smaller of the actual surplus and the optimized one computed by the mathematical model: • The cleared purchases of end-users: The amount of electric power which end-users can buy from the P2P energy trading will be restricted by the electric power which can be supplied by energy prosumers. Therefore, the cleared purchases of end-users will be calibrated by the ratio of total cleared sales to the sum of estimated ones by all energy prosumers when compared with the purchases of end-users predicted by the optimal energy scheduling model: The cleared sales of energy prosumers and the cleared purchases of end-users are, respectively, reimbursed and charged with the transaction price at the relevant time, as indicated by (16).

•
The revenues from sales of electricity by energy prosumers: • The payments for purchases of electricity by end-users: When the real surplus from energy prosumers is beyond the estimated sales of electric power by the P2P energy trading, another settlement rule should be materialized. Since the surplus exceeding the estimated sales is not treated as the commodity of the P2P energy trading, trading will be carried out by the contract between the utility and energy prosumers. On the premise that the utility will likely purchase their surplus at the extremely lower price than the transaction price at the P2P energy trading, it will instead appeal to higher levels of their commitment to bettering the P2P energy trading. The main events over time in the proposed P2P energy trading scheme are illustrated in Figure 3.

Collection of Data
Optimization and Market Clearing

Exchange of Electric Power Settlement
" Gate Closure" D D-1 D+x Figure 3. Implementation process of P2P energy trading scheme.

Numerical Results
In this section, the validity and effectiveness of the proposed P2P energy trading mechanism will be verified by gauging the savings of power supply cost through the successive execution of an offline optimal energy scheduling model.
For a comprehensive case study, the hypothetical multi-microgrid test bed will be organized with several electric facilities installed in the Korea Electrotechnology Research Institute. The simplified structure of the system, technical properties of each electric equipment, and averaged hourly load demands in independent microgrids are vividly revealed in Figure 4. It is, for simplicity, assumed that each microgrid stands for one energy prosumer and mutual energy exchange is achieved by virtual tie-lines adjoining each other while considering the hourly P2P energy trading in June of 2018.    6, respectively, display hourly photovoltaic power generation forecasts and hourly load forecasts of every microgrid that will be deployed as a part of multiple input data for simulation.  When the offline optimal P2P energy scheduling of a hypothetical multi-microgrid is performed, it is anticipated that a total of 39,402 kWh will be traded at the weighted average trading price of 173.2 won/kWh throughout a simulation period of one month, as described by (21): As visualized by Figure 7, there would be an overwhelming proportion of transactions during peak times, dedicating surplus energy harvested by MG 1 and MG 3 to MG 2 in scarce generation resources and elevated demand for electricity. Briefly, simulation results of the P2P energy trading for a case study are listed in Table 1.  In the meantime, it should be pointed out that the utility's usage rate of electricity applies equally to all the energy prosumers in MG 1 through MG 3 with a view to being in line with reality.
It can be seen in Table 2 that the savings in total power supply costs of a sample system by the P2P energy trading, lasting for one month, reach nearly 8.9 per cent of those in entirely resorting to the power purchase from the utility. This is primarily because the P2P energy sales of low-cost surplus electric power by MG 1 with no load demand are quite probable instead of meeting the system demand by the purchase from the utility at times of higher electricity tariff rates. Not surprisingly, the savings in total purchases of electricity from the utility in the P2P energy trading account for about 0.4 per cent of those in a case that there are no P2P options for the energy trading. In effect, it is now recognized that any potential impacts of the P2P energy trading will be enhanced by more flexible and scalable management of cost-effective power supply resources rather than the noticeable reduction in power purchases from the utility. As far as all numerical results in this paper are concerned, these are the outcomes resulting from the condition that the consumers' benefits by the P2P energy trading are locked by the utility's electricity tariff rate. Figure 8 demonstrates the hourly power supply costs for the overall trading period in each scenario where the power supply cost exclusively comprises the payment for power purchases from the utility and the operation cost for power production by energy prosumers. Over a full trading period of one month, the hourly amounts of electricity purchased from the utility in each scenario are graphically shown in Figure 9.   Table 3 summarizes the comparisons of total power generation by DERs and discharging powers by ESS for one month according to the category of energy trading. In particular, the hourly power generation by DERs and discharging powers by ESS in each scenario are, chronologically, sketched in Figures 10 and 11.

Discussion
To validate the commercial viability of the proposed P2P energy trading scheme, it has been examined with an experimental multi-microgrid test bed consisting of some electric facilities in the Korea Electrotechnology Research Institute. Despite the exceptional situation that the benefit by the P2P energy trading would be limited to the utility's usage rate of electricity, it was up to the P2P energy trading to enforce the affordable and practical power usage by making better use of more cost-effective technologies for power supply.
The proposed P2P trading system plays a role of matching the excess electric power from prosumers to end-users who want to buy it, on an automated architecture, without their bidding behaviors. In a qualitative sense, the consumers' benefits would be the net savings of electric bills by a reduction in power supply costs. The consumers can reap the financial benefits from the P2P energy trading, which is assured by Table 2. While the consumers should pay an amount of 39,476,209 won in return for the sole means of buying electric power directly from the utility, the total amount of power supply costs with the P2P trading options is as much as 35,963,139 won. The net savings from the P2P energy trading amount to a total of 3,513,070 won.
In addition to lowering electric bills, if the social utility driven by the P2P energy trading can be evidently transferred to the consumers' benefits, the rational energy utilization will be promoted so that the value of electricity use can be strengthened by improving close collaboration between P2P trading participants. In addition, it might empower energy prosumers to voluntarily invest in DERrelated technologies by fostering the trading platform favorable to their profit-making.

Conclusions
It is commonly believed that the P2P energy trading will lay a solid foundation on which a prompt, comfortable, and competitive usage of energy should be consolidated by making the best of redundant power from energy prosumers. Nevertheless, in invigorating the P2P energy trading, it is of the utmost importance that more trade deals between energy prosumers and end-users should be negotiated by expanding a string of business opportunities through the frequent sharing of information. In this aspect, one of the main challenges in this paper was to come up with a promising and straightforward framework for contributing to the P2P trading participants' decision-making by unveiling the hourly maximum amount available in the P2P energy trading, based on their predictions and technical data of their generating assets. As such, no bidding processes would be applied to all trading parties and they did not necessarily need to accept the optimal schedules for a trading period as reported by ETS. Simultaneously, this paper has attempted to formulate the mathematical problem for the optimal P2P energy trading, discover the transaction price for maximizing the benefits of P2P trading participants under the different time-of-use tariffs, and ultimately develop additional settlement standards for bridging the overall gap between optimally planned and actually transacted quantities of the P2P energy trading. In conclusion, it is worth reiterating that the proposed methodology coordinating day-ahead optimal scheduling and real-time corrective operations has concerned itself with an overarching and outreaching solution for the prosumer aggregator.