Designing a Robust Decentralized Energy Transactions Framework for Active Prosumers in Peer-to-Peer Local Electricity Markets

In this paper, a fully decentralized local energy market based on peer-to-peer(P2P) trading is proposed for small-scale prosumers. In the proposed market, the prosumers are classified as buyers and sellers and can bilaterally engage in energy trading (P2P) with each other. The buyer prosumers are equipped with electrical storage and can participate in a demand response (DR) program while protecting their privacy. In addition to bilateral negotiating with the local sellers, these players can compensate for their energy deficiency from the upstream market as the retail market at hours without local generation. In this paper, the retail market price is assumed uncertain. Robust optimization is applied to model this uncertainty in the buyer prosumers model. The proposed decentralized robust optimization guarantees the solution’s existence for each realization of uncertainty components. Furthermore, it performs optimization to realize the hard worse case from uncertainty components. A fully decentralized approach known as the fast alternating direction method of multipliers (FADMM) is employed to solve the proposed decentralized robust problem. The proposed approach does not require third-party involvement as a supervisory node nor disclose the players’ private information. Numerical studies were carried out on a small distribution system with several prosumers. The numerical results suggested the operationality and applicability of the proposed decentralized robust framework and the decentralized solving method.

(.) 2 B. Parameters α i , β i , γ i Cost function parameters for seller i ( /kWh 2 , /kWh , ) ω j , δ j Utility function parameters for buyer j ( /kWh, /kWh 2 ) D jt Consumer j demand at time t (kW) Following a century of relative stability in the electrical industry, the wide deployment of distributed energy sources (DERs) along with recent advancements in computations and communication technologies have transformed the nature of energy consumption, trade, and utilization. Passive consumers are now converted into active consumers with load management and generation capability, and a novel concept known as prosumer is formed [1]. With the introduction of prosumers followed by novel energy distribution models, including peer-to-peer (P2P) sharing, the power system has evolved from its traditional hierarchical structure into a decentralized model. With these changes, the conventional electricity markets have transformed into prosumer-centric markets [2] in which the prosumers can engage in local energy trading to manage their energy more effectively. In this trade, the prosumers sell their surplus energy to other prosumers with energy deficiency [3]. They can also trade energy with the upstream market as the retail market to achieve maximum economic benefits [4]. Furthermore, the prosumers can participate in demand response (DR) programs without relying on a supervisory entity. Some prosumers can be equipped with electrical storage to meet a portion of their 24-hour demand. These prosumers can charge their storage at periods with low electricity prices and supply a portion of their load at high electricity price periods by discharging their batteries. Studies have shown the retail market price to be a function of wholesale market price [5]. Therefore, uncertainty in retail market price can be a principal challenge for these new players in achieving maximum economic benefit from participation in this market (retail market). Another challenge faced by the P2P market is its clearing method. Market clearing methods can differ based on each market's structure, players' behaviors, particular rules, and assumptions. The centralized approach is a method of clearing these markets requiring aggregation and integration of all players' information [6], [7]. For this reason, the protection of players' privacy is not possible in these methods. A variety of distributed methods, including primal-dual gradient method [8]- [10], alternating direction method of multipliers [11]- [13], the fast alternating direction method of multipliers (FADMM) [14], [15], consensus-based methods [16], [17], and decentralized Ant-Colony optimization [18] have been utilized to clear these markets. Among them, ADMM has been widely employed in distributed optimization. Some studies do not apply this method in a fully decentralized manner by considering a supervisory node as a coordinator for players [12], [19], [20]. However, no supervisory node is utilized in other studies, rendering it a fully decentralized method [21].

A. RELATED WORKS
Recently, numerous studies have concentrated on market design for P2P energy trading. For the purpose of this study, the literature review is carried out from three aspects: with/without considering prosumers with storage, with/without prosumers participation in DR program, and with/without considering uncertainty in the upstream market price.
The authors in [10] have proposed a fully decentralized P2P market and cleared it using a decentralized primal-dual gradient approach. In the proposed model, all players of a local distribution network negotiate with each other and reach an agreement over price and energy amount. However, In [22] has developed a P2P market model for transmission systems and employed the primal-dual gradient method to clear the designed market, which is not fully decentralized. in the presented model, the sellers act as price-maker players that cannot choose their energy peers. In a fully decentralized P2P market, all individual players negotiate and agree on the price and the amount of transactional power. It should be noted that the primal-dual gradient method is not a comprehensive method for clearing the P2P market because it is only applicable to convex models [23]. Authors in [24] encourage the large producers with fossil fuel, the intermediary providers, the consumers with flexible load, and the renewable sources in the power grid to participate in P2P transactions via a bilateral contract network. The authors in [25] have designed a fully decentralized and hierarchical P2P energy trading market for prosumers of a community in which shiftable home appliances and home battery storage systems are utilized to facilitate P2P energy transactions. Multi-bilateral economic dispatch as a novel P2P market is developed in [16]. Authors have applied a relaxed consensus innovation (RCI) approach to clear their proposed market. P2P energy transaction for virtual power plants as prosumers under blockchain technology is presented in [26]. Authors provided (encoded) the essential infrastructure for P2P transactions between virtual power plants using smart contracts. Stable-matching algorithm as a low-voltage distribution system operator is suggested in [27] to determine the shortest electric route between the local energy market players. After specifying the closest peers, the authors cleared the proposed market using continuous double auction. P2P trading for a virtual power plant as a community is proposed in [28] using the Ethereum Blockchain Platform. To avoid security concerns and peers' cost minimization, the proposed market has been cleared using an auction mechanism in the blockchain platform and smart contracts in the form of irreversible contracts. In [18], a short-term P2P energy market with the pool-structured and parallel auction for small-scale prosumers with blockchain technology has been designed and cleared using decentralized ant-colony optimization. Authors in [29] have sought optimal routing to prevent lines congestion in P2P energy transactions in a distribution network with thousands of peers. They utilized a slime mold-inspired meta-heuristic optimization algorithm for a P2P market. Authors in [30] proposed an energy agent to improve energy trading among consumers and the electricity grid. The proposed agent updates the optimal demand and dynamic price for energy transactions in the proposed market. An operational model for P2P energy trading among a group of electric vehicles (EVs) in a charge station and a commercial entity equipped with solar generation is presented in [31]. The authors applied dynamic pricing for EVs based on the stored energy price in this model. This pricing model enhances the profit of EV owners and increases the share of charge stations in P2P energy markets. In [32], a model of energy transaction is proposed for the members of an energy community in which the flexible buyers can trade energy with other members of their community and participate in the wholesale market with the aid of a community manager. Authors in [33] developed a novel model using blockchain technology for prosumers' P2P transactions of energy-backed tokens. A novel concept called demurrage is utilized in the proposed model to avoid energy token accumulation. A novel decentralized market in the presence of prosumers and active retailers in their locality is presented in [34]. The authors applied a primal-dual sub-gradient method to clear the presented market.
Given the performed studies in Table 1, the following study gap is evident: • Fully decentralized P2P market model: some of the proposed models in studies are not fully decentralized P2P, and all players do not negotiate with each other separately and bilaterally.
• Direct and dynamic energy transaction of local players with the upstream network: in some of the proposed models, the prosumers can only participate in the local transactions or cannot directly choose the upstream market as an energy peer. By imposing restrictions on price to discourage the prosumers from participating in the upstream market, these studies hamper the players' ability to participate and transact energy with the upstream network and exploit its benefits.
• Participation in DR program: Some studies do not consider prosumers' participation in DR programs as virtual peers. In others, the proposed models are not fully decentralized, and the prosumers' privacy is not protected. In other words, the prosumers do not participate in the DR program, and an operator as a supervisory node decides on prosumers' participation in the DR program.
• Considering uncertainty in upstream market price: neglecting uncertainty in upstream market price is one of the major study gaps in most studies related to P2P energy transactions because it significantly impacts the actual scheduling of prosumers. By considering a more realistic market behavior, the proposed model can show more robustness in the face of uncertainties as a stochastic event.
• Fully decentralized P2P market clearing with a fully decentralized approach: Some studies have employed the centralized or not fully decentralized approaches in addition to mentioned gaps. Nevertheless, given the nature of the proposed problem, a decentralized approach should be applied to clear this market.

B. NOVELTIES AND CONTRIBUTIONS
This paper develops a novel market for fully decentralized P2P energy transactions among prosumers in a small distribution network. Prosumers are classified into two groups of buyer and seller, based on their net consumption and generation. Buyer prosumers are equipped with electrical storage green. They can also participate in the price-based demand response program without third-party operator involvement. Given that the seller prosumers do not have surplus generation at all hours, the buyer prosumers purchase their demand deficiency from the upstream network as the retail market.
Since the retail market price is a function of the wholesale market price, it involves uncertainty. Thus, the buyers should consider this uncertainty in their scheduling. Robust optimization is applied in this paper to model uncertainty in retail market price in buyers' models. The proposed market is cleared using a fully decentralized FADMM approach. The presented approach neglects the coordinator node and offers a higher convergence rate compared to conventional ADMM. Hence, the contributions of this paper are summarized as follows in terms of the P2P fully-decentralized market model, VOLUME 10, 2022 direct and dynamic energy transactions of local players with the upstream market, participation in demand response program, considering the uncertainty of the upstream market price, clearing the fully decentralized P2P market with a fully decentralized approach: • A fully decentralized P2P energy market is designed and modeled in the presence of a demand response program for small-scale prosumers equipped with storage. The prosumer with supply shortage can satisfy this deficiency from the retail market as an energy peer.
• The uncertainty in upstream market price in buyer prosumers model is modeled using robust optimization; thus, the novel proposed model of these players shows robustness against price variations.
• A fully decentralized FADMM approach is employed to clear the proposed market in the presence of demand response programs and uncertainty in retail market price. The proposed approach does not require the private information of prosumers and guarantees a feasible and global solution for all individual local players.

C. PAPER ORGANIZATION
The remainder of this paper is organized as follows: Section II: this section presents the commercial platform of P2P energy in two subsections of the proposed market's concept and mathematical design.
Section III: in this section, the numerical studies of the proposed market are carried out for two case studies, and the simulation results are analyzed.
Section IV: the conclusions are provided in this section.

II. PEER-TO-PEER ENERGY TRADING FRAMEWORK A. DESCRIPTION OF STRUCTURE, ASSUMPTIONS, AND CONCEPT OF THE ENERGY TRADING FRAMEWORK
Prosumers are smart agents with the dual capability of generation and consumption. If their net consumption and generation are positive, they sell their excess power to the network (upstream market). Conversely, if their net consumption and generation are negative, they supply their energy shortage from the network. For this reason, these agents are divided into two groups of producers and consumers in the proposed market structure, and they are assumed to play a fixed role during the scheduling period. It is also presumed that the prosumers with buyer roles are equipped with electrical storage, participate in price-based demand response programs, and manage their flexible demand. From a time aspect, the proposed market is considered a dayahead market. With the market's time structure, players, and assumptions being defined, the proposed market platform is structured as follows: According to Figure 1, the sellers update their price bids (λ ijt ) by receiving demand signals from the buyers (y jit ) and determine their generation level (x it ) and sale amount to local buyers (x ijt ) based on this price. Then, they announce the specified price bids (λ ijt ) and sale amount (x ijt ) to the buyers. After receiving the price signal and sale amount from the local sellers (λ ijt ) and price signal of the retail market (λ R t ) as the day-ahead market, the local buyers determine their total required demand (y jt ), demand amount from local sellers (y jit ), participation level in DR program (y DR jt ) and charge/discharge level of their storage (y dch jt , y ch jt ). The buyers then announce the amount of demand to the local sellers (y jit ). This process continues until the stopping criterion of the proposed decentralized algorithm is satisfied. One major concern in bilateral energy transactions (P2P) is a privacy breach. In the proposed market, the players' privacy is maintained from two aspects. First, it prevents the disclosure of important operation information and sensitive commercial information because the price and amount of trading power is the only information they exchange with each other. From the second aspect, the prosumers' participation in the DR program is executed without the operator (controller node) involvement. Considering these interactions, the proposed market presents a fully decentralized bilateral energy market for P2P interaction between prosumers.

B. MATHEMATICAL DESIGN OF THE PROPOSED MARKET
A market with N prosumers divided into two classes of N B = {1, . . . , N B } local buyers and N S = {1, . . . , N S } local sellers is proposed such that N B ∩ N S = ∅. Assuming this condition means that the role of each prosumer is fixed and not changed during the scheduling period.

1) BUYER AND SELLER OPTIMIZATION MODEL
The local buyers seek to maximize their welfare through optimal participation in the local and retail market. These players can participate in the price-based DR program without relying on a central entity. Further, they are equipped with electrical storage for their optimal energy management. Relations (1) to (11) describe the objective function and constraints related to the buyers.
Relation (1) shows the objective function of buyer j. The first term in this expression is a utility function. The common form of the utility function has three important properties. First, lack of energy consumption is equal to a zero utility function U j (0) = 0, meaning that not consuming energy will bear no advantage for the buyers. Second, it is a non-descending function U j (y j ) ≥ 0 meaning that the consumers, when possible, are inclined to consume more energy until they reach their highest consumption level. Third, the utility function is considered a concave function U j (y j ) ≤ 0 meaning that the consumers' satisfaction level can gradually saturate. Each player is an independent decision-maker whose energy demand can vary based on price and weather conditions. Furthermore, the energy demand depends on consumer type (industrial, commercial, and residential). For instance, residential and industrial prosumers respond differently to the same price. The different responses of different prosumers to various price scenarios can be modeled using utility functions from microeconomics [35]. Different choices of utility functions such as quadratic and logarithmic functions can model the behavior of different prosumers [36]. Given the nature of players, a quadratic function was applied in this paper to model the players' response to price variations (according to relation (2)). This means that these prosumers can determine their demand level based on the energy price. Moreover, the total energy demand of buyer j is expressed in relation (3). The second term in buyers' objective function is the energy purchase cost from the local sellers (local market), while the third term represents the energy purchase cost from the local market. Relation (4) displays the electrical power balance for buyer j at time t. Each buyer can participate concurrently in both local energy market (y jit ) and retail market (y g jt ) to supply and manage its demand at time t (D jt ). In addition, the buyers alter their demand level (load shift) during the scheduling period via participation in DR programs (y DR jt ) as a virtual generation unit and optimal storage management (y ch jt , y dch jt ). The restrictions related to DR participation are expressed in relations (5)- (6). Relation (5) impose a constraint on the participation level in the DR program, while relation (6) ensures that load shedding will not occur during the scheduling period. The equality and inequality constraints on buyer j's electrical storage are provided in relations (7)- (11). Relation (7) yields the storage energy level per hour. The constraints on charge and discharge of electrical storage are presented in relations (8) and (9). Relation (10) constrains the energy amount stored in the storage. At each hour, the storage can be operated in either charge (b ch jt = 1) or discharge mode (b dch jt = 1) as shown in relation (11). The local sellers can negotiate with individual local buyers in a P2P fashion and reach an agreement over the price(different marginal price) and amount of transactional energy. Relations (12)-(15) describe the objective func-tion (welfare) and generation constraints related to the seller i.
The first term of the objective function in relation (12) represents the profit achieved from selling power to the local consumers, and the second term is the cost function of power generation(according to relation (15) [37]). Relation (13) gives the sum of energy sold to all local peers. Furthermore, the generated power of this seller is constrained via relation (14).

2) MATHEMATICAL MODELING OF THE OPTIMIZATION PROBLEM
The proposed problem aims to maximize the social welfare of local players (prosumers). Thus, the objective function is obtained from the sum of the objective functions of sellers and buyers provided in relations (1)- (15).
The optimization problems of local sellers and buyers are related using relation (17), which is known as a coupled constraint in optimization problems. This relation is considered a market-clearing condition and states that the amount of energy purchased by buyer j should equal the amount sold by seller i at each time interval. The dual of this constraint (λ ijt ) shows the energy transaction price between the buyer and seller.

3) UNCERTAINTY MODELING
The time of schedule realization for the proposed market of this paper is 24 hours ahead; thus, a time difference exists between schedule and its realization. This time difference causes uncertainty in some input data of this schedule. One output of this schedule is the amount of power purchase from the retail market as the upstream market whose clearing price (retail market) depends on the wholesale market. Given that the day-before market (wholesale) is not still cleared, thus the purchase price from the retail market is unknown for local buyers and has uncertainty. One of the statistical methods to overcome these uncertainties is robust optimization. This method becomes more effective by assuming only a linear range of uncertain parameter variations. The scenario-based stochastic method will be more effective if more historical information on parameter variation is available to draw its probability distribution function. Assuming that limited information exists about the variation range of the retail market price (which is the function of the wholesale market), this paper employs the robust optimization method to model the uncertainty of this parameter under the uncertainty set in the local buyers' model. This uncertainty set is considered polyhedral, which is presented in more detail in [38]. Uncertainty set for the retail market price can be determined as follows: The variation range of retail market price lies between λ R,max t as the upper bound and λ R,min t as the lower bound. These upper and lower bounds are applied by uncertainty budgeting ( ) on retail market price, and this constraint is determined by λ and λ to control conservatism for λ .
The uncertain parameter (λ R t ) is located in the objective function of the buyer model; thus, the objective function can be regarded as a constraint. max y j WB j = z j (19) s.t By doing this, the local buyer j's model is modified into a hard worse case model called the max-min method. The uncertainty set λ for parameter λ R t can be rewritten into the following relation: In this relation, λ R t represents the nominal value, λ R t the constant fluctuation and ξ jt the stochastic variable for the retail market price under uncertainty λ R t . Thus, relation (20) takes the following form: λ ijt y jit (22) Considering the hard worse case, we will have: λ ijt y jit (23) 26748 VOLUME 10, 2022 Deviation in the upper bounds of the range indicates the realization of the worst-case uncertainty. In this relation, the robust counterpart max ξ jt T t=1 ξ jt λ R t y g jt in the uncertainty set λ needs to be obtained. The detailed proof of this equivalence which is found using second-order conic programming, is provided in Ref [39], [40]. Therefore, considering the uncertainty in retail market price, the local buyer problem is achieved as follows: max y j WB j = z j (24) s.t

4) THE PROPOSED DECENTRALIZED ENERGY MARKET-CLEARING ALGORITHM
The optimization problem presented in relations (16)- (17) can be solved in a centralized manner. The centralized approach requires a supervisory node as a central controller. This supervisory node needs to access all operational and commercial information of prosumers. Trusting a supervisory node with players' confidential information contributes to the risk of players' privacy breaches and information disclosure. Thus, to avoid this issue, this paper has presented a decentralized FADMM algorithm to solve the proposed problem in a fully-decentralized manner needless of a supervisory node. In the proposed decentralized FADMM, each prosumer solves its optimization problem with minimum (insignificant) information received from other prosumers. The optimization problem is decomposed into several secondary subproblems based on the dual decomposition principle [13]. In this decomposition, the coupled constraint (17) is relaxed, and its dual is taken as price. In this case, each player solves its optimization problem as a secondary problem in a decentralized manner. By writing reinforced Lagrangian of the presented optimization problem in (16)-(17), the following relation will be achieved: This relation employs Lagrangian multiplier µ for noncoupled constraints in buyer and seller problems (g(x, y)) to avoid excessive complexity. λ ijt is the dual of the coupled constraint in buyer and seller problems. The standard Lagrangian is valid for a fully-convex problem that does not exhibit many sudden variations. To overcome these limitations, reinforced Lagrangian in the form of relation (28) is utilized that ensures the problem convergence and robustness by adding the term (ρ x ijt − y jit 2 2 ). In this expression, ρ is a positive number called the penalty parameter. By writing the original buyer and seller problems based on the reinforced Lagrangian, we'll have: y jit in the seller problem and x ijt in the buyer problem are taken as pre-determined parameters. max y j WB j = z j (30) s.t Under these circumstances, all original variables of both buyer and seller problems need to be computed from the corresponding sub-problem based on the gradient ascent method. The problem's dual variable is updated using the iterative method: To speed up the convergence rate of conventional ADMM, the dual variable (relation (36)) update is changed as follows [15]: In these relations, µ 0 = 1 is assumed. The stopping criterion for the proposed algorithm is defined as follows. In these VOLUME 10, 2022 relations, is a small positive number.

III. SIMULATION
This section elaborates on the results of simulation to verify the operationality of the proposed decentralized market model and the applicability of its solving method. All numerical simulations were executed by the general algebraic modeling system (GAMS) on a PC with Intel(R) Core(TM) i3-2330M CPU 2.20 GHz 6 GB RAM. It should be noted that the results of the centralized approach are utilized as a benchmark to evaluate the optimality of the proposed decentralized method. a PC with.

A. TEST PLATFORM
The numerical studies are carried out on a small residential distribution network comprised of three households (buyer) and four households with small-scale production (seller) using a one-day data of Pecan Street [41]. The average New York wholesale market price [41] is used for nominal price values of the retail market (λ R t ). Figure 2 depicts the predicted demand and production profiles and the nominal price of the retail market. The private parameters of the sellers and buyers are taken from [42]. The stopping criterion and the step size (ρ) of the FADMM algorithm are taken as 0.001 and 0.05, respectively.
Two case studies are carried out in this paper: • Case study 1: P2P energy transaction among prosumers without considering uncertainty in the retail market price (definite scheduling) • Case study 2: P2P energy transaction among prosumers with considering uncertainty in the retail market price (robust scheduling)

B. CASE STUDY 1
In this case study, P2P energy transactions among prosumers are evaluated. According to the proposed model, the buyer prosumers can purchase energy from the retail market. In this case study, the buyer prosumers do not consider the uncertainty of the retail market price in their optimization model. Regarding the problem dimensions and for easy analysis of the obtained results, the energy transaction between seller 1 with all buyers at 8 a.m., energy transaction between seller 2 with all buyers at 12 o'clock, energy transaction between seller 3 with all buyers at 16:00, and energy transaction between seller 4 with all buyers for 8 p.m. are shown in Figure 3. This figure verifies the convergence of the proposed decentralized approach for bilateral trading between each local buyer and seller. From this figure, energy transaction differs between sellers and buyers at different hours meaning that each player adopts different strategies for various hours to maximize its welfare. This freedom of action is indicative of the dynamics and competitiveness of the proposed market. As mentioned before, the buyers are equipped with energy storages (batteries) to increase their welfare. The buyers supply a portion of their load from storages when the retail market price is high and charge their batteries at hours with the low retail market price. As mentioned before, the buyers are equipped with energy storage (batteries) to increase their welfare. The buyers supply a portion of their load from storage when the retail market price is high and charge their batteries at hours with the low retail market price. Figure 4 plots the variations in charge and discharge of buyers' electrical storage and the retail market nominal price variation curve. From this figure, from 1-4 and 10-15 o'clock, when the retail market price is low, the buyers, in addition to supplying a portion of their hourly demand, charge their batteries to increase their welfare. Contrarily, from 5-9 and 17-21 o'clock, they satisfy their demand by using their batteries rather than purchasing from the market due to high retail market prices. Table 2 presents the total welfare of local players, total energy transactions in the local market, and total energy purchase from the retail market. According to Figure 2, since the local generation is not available at all scheduling hours, the local consumers meet their demand by purchasing power from the local market and optimize their demand supplying cost through storage and participation in DR programs without relying on a supervisory node. Furthermore, the presented results in Table 2 suggest that the objective function value (global optimal) and total traded power of the decentralized approach corroborates that of the centralized approach.
The scalability of heuristic algorithms is a function of two major factors: computation time and iteration number. Notably, the computation time of the algorithm depends on the system specifications, including CPU and RAM. FADMM scalability is tested for a large number of prosumers. Table 3 presents how the number of prosumers affects the computation time and the number of iterations required for FADMM convergence. The results suggest that the FADMM's computation time and the number of iterations  are a function of the players' number. This paper assumes that all players in the proposed market are connected. Given that a fully-connected communication network exists among all players, each player can negotiate with all other market players. Thus, according to Table 3, the algorithm's computation time increases significantly with the number of players. For future studies, segmentation methods can be used to solve this problem.

C. CASE STUDY 2
This case study considers the P2P energy transaction among prosumers considering uncertainty in upstream market price VOLUME 10, 2022  (retail market). As presented in the modeling section, a robust optimization method is applied to overcome this uncertainty. Compared to the previous case study, the demand costs are expected to increase for local buyers (prosumers), which leads to their welfare reduction. The amount of these undesirable variations depends on the deviation from the retail market's predicted price and the determination of local buyers' robust budget ( ). In this case study, the price deviation from the nominal value equals 10%, and is taken as 1. Thus, expectedly the local buyers' behavior in purchasing power from the retail market changes so that the buyer fulfils its demand from the retail market with increased conservatism, maximum participation in the DR program, and maximum usage of its storage sources.
For this case study, similar to the first one, for easy analysis of the obtained results, the energy transaction between  seller 1 with all buyers at 8 a.m., energy transaction between seller 2 with all buyers at 12 o'clock, the energy transaction between seller 3 with all buyers at 16 o'clock, and energy transaction between seller 4 with all buyers at 8 p.m. are shown in Figure 5. Due to uncertainty in retail market price, during hours with abundant local generation (such as 12 o'clock), the buyers purchase more power from the local sellers than the first case study to reduce their demand supplying costs. Figure 6 illustrates in more detail the amount of P2P energy transactions between local buyers during the 24-hour scheduling period. From this figure, all local buyers engage in energy transactions with local sellers during periods with abundant local generation. Rather than purchasing energy from the upstream market, they transact energy with each other without a supervisory entity as a coordinator node. The amount of energy purchase by each buyer is different. Buyer 3 performs the highest and buyer 1 the lowest purchase from this market. Figure 7 exhibits the electrical power balance for local buyers, the retail market's nominal price, and the average price of local transactions. Based on this figure, from 1-5 and 23-24 o'clock, due to the lower nominal price of the retail market and lack of local generation, the buyers charge their storage, participate in a DR program and satisfy their demand from the retail market. In other words, they shift a portion of their flexible demand to these hours. From 10 a.m. until 7 p.m. that the local generation is abundant, the buyers procure a large portion of their demand through P2P transactions with local sellers. In this period, the P2P transactions price is lower than the nominal price of the retail market owing to abundant local generation, and these prices have similar behavior to the nominal price of the retail market, meaning that the local market transaction prices follow the nominal price of the retail market. According to Figure 7, from 6 to 10 a.m. and 6 to 9 p.m., when the nominal price of the retail market is high, the buyers use their storage to fulfil their demand. Additionally, by participating in the demand response program, they shift a portion of their demand to the hours with low retail market nominal prices to minimize their demand supplying cost and maximize their welfare. Table 4 compares the welfare results of individual local players with and without considering uncertainty in the retail market price. As is evident, variations in the players' welfare level occur by considering uncertainty in retail market price. By increased power selling to local players due to the rise in retail market price, the sellers' welfare has increased by 0.3 percent while the buyers' welfare has been reduced by 2 percent. Notably, their demand supplying cost has increased by 2 percent compared to case study 1. In general, by considering uncertainty in retail market price (with budgeting equal to 1 and 10 percent deviation) which is a source of demand supply of the local consumers, the total welfare decreases by 1.4. The results of this table suggest that budgeting and deviation percent of the retail market price can significantly impact buyers' welfare and, consequently, the total welfare. Figure 8 depicts the effect of variations in uncertainty budgeting and retail market price deviation percent on buyers' total welfare. The deviation in electricity market price ranges from 5 to 30 percent, and the robust uncertainty budget of the retail market price is considered to vary from = 5 to = 10. As shown by this figure, the demand supplying cost of buyers is growing by taking into account a high level of robustness which proves that the local buyers' welfare reduces by increasing the robustness of the optimal scheduling.

IV. CONCLUSION
This paper designed and implemented a fully-decentralized P2P energy market for small-scale prosumers. The numerical studies show that the prosumers can freely trade energy in the proposed market without relying on a supervisory entity. They can use their storage as much as 21 percent of the total consuming load during the scheduling period. These players can participate in demand response programs, and their welfare resulting from free participation without thirdparty involvement increases to over 12 percent. They can also participate freely in the retail market and supply more than 53 percent of their load from this market as an energy peer. Although considering robust optimization to model the price uncertainty of this market negatively affects the profit of these players by more than 1.4 percent, it provides a realistic perspective for the active consumers to schedule their participation in this market. By considering budgeting and deviation percentage of different retail market prices, the proposed decentralized robust optimization was demonstrated to ensure the feasibility of the solution existence for each realization of uncertainty components while optimizing hard, worstcase scenario realization of uncertainty components. The case studies further suggested that the fast alternating direction method of multipliers (FADMM) for market-clearing can maximize the market players' welfare while ensuring less information exchange and privacy protection. However, the solutions obtained by the proposed approach have a 0.03 percent distance compared to the centralized approach. Thus, the proposed approach achieves the optimal global solution similar to the centralized method. Based on the proposed model of this paper, the authors offer the following suggestions for future research: 1) Using other statistical methods like the fuzzy and stochastic methods to overcome the uncertainties in the proposed model, including the uncertainties in the retail market price and active consumers' load 2) Using artificial intelligence-based methods, including machine learning to forecast the active consumer's load and the upstream market price 3) Applying the proposed model for large-scale consumers such as commercial and industrial consumers 4) Considering electric vehicles and their associated uncertainty in active consumers' model 5) Using the segmentation methods instead of considering the fully-connected communication network between prosumers to reduce the computation time and iterations number required for FADMM convergence 6) Considering renewable sources and their associated uncertainty in active sellers' model 7) Considering change the role of prosumers between buyer and seller during the scheduling period