R Le Goff Latimier
email: roman.legoff-latimier@ens-rennes.fr

T Baroche
email: tbaroche@ens-rennes.fr

H Ben Ahmed
email: benahmed@ens-rennes.fr

Mitigation of Communication Costs in Peer-to-peer Electricity Markets

Keywords: Electricity markets, Peer-to-peer markets, Communication networks, Bilateral trading, Distributed optimization, Grid constraints

Peer-to-peer markets are a promising approach for integrating decentralized generation and prosumers into electricity markets. However, these markets require a very large number of messages to be exchanged in order to find a solution that respects the constraint of power balance in power systems. This study first establishes the shape of the compromise between communication costs and residual power imbalance resulting from a P2P market. Secondly alternative stopping criteria are proposed in order to reduce the cost of communication. The most effective approach is to ratify each trade independently using a threshold on its primary and dual residues, while continuing to negotiate the other trades. With the same residual imbalance, this stopping criterion results in a tenfold reduction of the number of messages exchanged on the basis of a Monte Carlo simulation. This reduction factor seems independent of the number of market participants.

I. INTRODUCTION

Power systems are currently undergoing a multiplication of decentralized production sources and storage possibilities due to the energy transition [START_REF] Naber | Scaling up sustainable energy innovations[END_REF]. Firstly this growth applies to high-capacity renewable power plants and large storage units. Such facilities are significant enougth to be integrated into the operators port-folio and have a significant individual impact on the grid. However beyond these huge installations, each consumer is in a position to potentially become a player on the electricity grid, via domestic storage or roof-mounted photovoltaic panels. In order to improve the robustness and performance of electricity networks, it is necessary to involve these distributed actors as part of the management of the network [START_REF] Parag | Electricity market design for the prosumer era[END_REF]. Nevertheless, this is extremely difficult in the paradigm of centralized electricity markets, as such mechanisms cannot directly connect millions of players.

Peer-to-peer (P2P) markets are likely to be a part of the solution to this multiplication of players in electricity markets [START_REF] Wu | Coordinated multilateral trades for electric power networks: theory and implementation1[END_REF]. A P2P market relies on multi-bilateral direct trades among participants. Employing a P2P market framework could yield a number of advantages, for instance thanks to product preference and its consumer-centric nature, allowing for a wealth of new business models.

Nevertheless, they require a very large amount of information to be exchanged, much greater than that required for a centralized market [START_REF] Gungor | Smart grid technologies: Communication technologies and standards[END_REF]. In a real-time context, such exchanges run the risk of not having enough time to succeed if the deadline is reached before the end of the negotiation process. Moreover, information is potentially expensive when it has to be exchanged rapidly in very large volumes. This implies a risk of overloading existing infrastructures and the necessity to develop specific protocols and channels [START_REF] Ancillotti | The role of communication systems in smart grids: Architectures, technical solutions and research challenges[END_REF]. These information costs -that are inherent to P2P markets -lead to the question of their value within the clearing and the potential trade-offs if they are to be reduced.

Within a P2P energy market, these exchanges of information make it possible to solve a constrained optimization problem, as will be presented in the section II. The objective is then to achieve maximum social welfare for the people involved while respecting the operating constraints of the electricity grid. On one hand, the costs associated with the exchange of information compete with the satisfaction of the various market agents. It is up to each agent to decide if he can have a profit from looking for a better trade. On the other hand, a compromise with the network's operating constraints appears. Indeed, exchanging too little information means that the constraints of the optimization problem may not be precisely respected. When the decided dispatch is enforced, this will imply non-compliance with grid codes, voltage values, overloads [START_REF] Goff Latimier | Distributed optimisaion with restricted exchanges dof information: Charging of on electric vehicle fleet[END_REF] or imbalances that will have to be compensated. This leads to increased stress on the network, a deterioration in energy quality and additional operating costs. In the subsequent stages of this study, only the power equilibrium constraint will be considered. What is the evolution of the imbalance of a P2P market according to the number of messages exchanged? How does the cost of communications evolve when trying to reduce the balancing cost for the system operator? Is it possible to propose implementations to reduce this number of messages?

The following section will first formulate and resolve a P2P market problem in a distributed approach. This section II will eventually present the different stopping criteria that are proposed here. The section III will then present the case study on which a Monte Carlo simulation of the P2P market is performed. The evolution of the imbalance according to the different stopping criteria will then be presented. The section IV gathers our conclusions and perspectives for future work.

II. P2P MARKET DESIGNS AND CORRESPONDING NEGOTIATION ALGORITHMS

A P2P market is based on a community of agents with flexible consumption or production. The scope here being centred on exchange mechanisms, a deterministic version of the market clearing will be addressed. A single market time unit will also be considered. However it may readily be extended to multiple time units with temporally binding constraints, while uncertainty could also be considered in a scenario-based stochastic optimization framework. As it is classically done, agents are supposed rational in the sense of [START_REF] Day | Rational choice and economic behavior[END_REF], i.e. always objectively taking the most beneficial decisions, and non-strategic, i.e. not anticipating actions and reactions of other agents.

In a first step, the P2P Market design of [START_REF] Moret | Negotiation Algorithms for Peer-to-Peer Electricity Markets: Computational Properties[END_REF], [START_REF] Baroche | Exogenous Cost Allocation in Peer-to-Peer Electricity Markets[END_REF] is recalled. An associated negotiation mechanism based on consensus Alternating Direction Method of Multipliers -ADMM [START_REF] Boyd | Distributed optimization and statistical learning via the Alternating Direction Method of Multipliers[END_REF] -is then presented. Finally, this section presents the different stopping criterion that will be considered in order to reduce the number of negotiation iterations and hence communication related-costs.

A. Standard P2P market: problem formulation

The goal of any market-clearing, formed by a set Ω of N Ω participants, is to match demand and supply while minimizing the total cost. The total cost sums all individual cost functions as in (1a). To minimize its cost function f n , agent n is able to optimize its traded volume p n within a flexibility range defined by a lower p min n and an upper p max n bound, as expressed in (1d). Note that a traded amount p n is taken positive if agent n is selling electricity, and negative when buying.

However a P2P market is intrinsically based on multibilateral trades. This fundamental mechanism calls for a split of these net powers into a set of multiple bilateral trades p nm in the manner of [START_REF] Sorin | Consensus-based Approach to Peer-to-Peer Electricity Markets with Product Differentiation[END_REF]. Every possible bilateral power trades within the P2P community can be gathered in matrix P. Elements p nm of this matrix which are not imposed to zero reflect agents m belonging to the trading partnership set ω n of agent n. The total traded volume of an agent n is then obtained by p n = m∈ωn p nm as in (1c). For a bilateral contract to be valid both partners need to agree on both a quantity and a price. Trade reciprocity on quantities is enforced by (1b), ensuring that p nm = -p mn . Price consensus is implicitly reached through the negotiation mechanism as detailed below. One can note that (1b) implies that P is skew-symmetric, so p nn = 0.

The final P2P market problem can be formulated as

min P,pn∈Ω n∈Ω f n (p n ) (1a) s.t. P = -P T [Λ] (1b)
p n = m∈ωn p nm [µ n ] n ∈ Ω (1c) p min n p n p max n [ν min n , ν max n ] n ∈ Ω. (1d)
Note that dual variable matrix Λ = (λ nm ) gathers all trading prices while µ n represents agent n's perceived price. This formulation allows for an additional specific cost on each bilateral trade to express preferences [START_REF] Sorin | Consensus-based Approach to Peer-to-Peer Electricity Markets with Product Differentiation[END_REF] or to allocate gridrelated costs [START_REF] Baroche | Exogenous Cost Allocation in Peer-to-Peer Electricity Markets[END_REF].

B. Standard P2P market: negotiation mechanism

As developed in Appendix A, P2P Market (1) can be solved in a decentralized manner based on the consensus ADMM of [START_REF] Boyd | Distributed optimization and statistical learning via the Alternating Direction Method of Multipliers[END_REF], which seems appropriated according to [START_REF] Moret | Negotiation Algorithms for Peer-to-Peer Electricity Markets: Computational Properties[END_REF], [START_REF] Liu | Multi-Block ADMM for Big Data Optimization in Smart Grid[END_REF]. The decentralized negotiation mechanism associated to (1) reads at each iteration k

P k+1 n = argmin Pn f n (p n ) + m∈ωn λ k nm p k nm -p k mn 2 -p nm +(ρ/2) p k nm -p k mn 2 -p nm 2 s.t. p n = m∈ωn p nm p min n p n p max n (2a) λ k+1 nm = λ k nm -ρ p k+1 nm + p k+1 mn /2 (2b)
where penalty factor ρ > 0 and P n = (p nm ) m∈ωn groups trade proposals of agent n. Augmented Lagrangian terms in (2a) represents an agent's overcosts due to the lack of consensus with its partners. It aims at economically encouraging an agent to reach power consensus with its partners. According to [START_REF] Boyd | Distributed optimization and statistical learning via the Alternating Direction Method of Multipliers[END_REF], convergence of negotiation mechanism ( 2) is ensured as long as cost functions f n are closed, proper, and convex. Note that in (2b) prices are updated with a symmetric corrective term. Hence, prices are identical on both ends of a trade when λ 0 nm = λ 0 mn . The global stopping criteria associated to ( 2 (4b)

Parameters pri and dual denotes primal and dual global feasibility tolerances, respectively. Overall, the negotiation mechanism, described in Alg. 1, occurs in the following steps. At first agents solve their local optimization (2a). Then, they send the new trade proposals (p k+1 nm ) m∈ω to their respective partners. Once all counter proposals (p k+1 mn ) m∈ω are received agents can update trading prices (λ k+1 nm ) m∈ω , (2b), and local residuals (r n , s n ) k+1 , (4). Finally, they broadcast local residuals to all such that they can test global stopping criterion (3)1 . This process is repeated until convergence.

C. Alternative stopping criterion

The resolution of an electricity market in a P2P approach achieves a global optimum in a fully decentralized manner while respecting the physical constraints that are inherent in an electricity network [START_REF] Baroche | Exogenous Cost Allocation in Peer-to-Peer Electricity Markets[END_REF] -the power balance will be the only constraint here considered. In this sense, this is therefore a relevant alternative to centralized or community electricity markets. Indeed, the latter require the participation of a coordinating agent even when they are resolved in a decentralized manner. However, P2P resolution inherently presents computational difficulties that were presented in [START_REF] Moret | Negotiation Algorithms for Peer-to-Peer Electricity Markets: Computational Properties[END_REF]. In particular the present study focuses on the very important number of messages that have to be exchanged between peers. This issue is made even more critical as the number of messages N message increases with the square of the number of participants N Ω :

N message = O N 2 Ω (5)
whereas a classical pool-based market only requires the number of message to increase linearly with the number of agents. This characteristic is likely to be blocking for a real and operational deployment of P2P markets.

In order to reduce the number of messages exchanged when resolving a P2P market, several alternative stop criteria will be implemented and compared regarding communication needs.

• stopping criteria per agent: each agent can unilaterally decide to stop trying to improve his exchanges with his peers. The iteration when this decision occurs is denoted k n . Then the powers that agent n will exchange with agents m ∈ ω n no longer evolve and remain frozen at (p nm ) kn m∈ωn . The other agents continue their negotiations independently until each one of them meets their individual stopping criteria. This individual stopping criteria is based on the share of agent n into the global primal and dual residues r n and s n . An agent shall stop trading as soon as the primal and dual residues which concern his trades fall below a tolerance: • stopping criteria per trade: each agent can unilaterally decide to stop trying to improve a particular trade with a peer while carrying on the negociation with his other peers. The iteration when this decision occurs is denoted k nm . Then the power agent n will exchange with agent m no longer evolves and remains frozen at p knm nm . The agent will continue to negociate with his other peers until each one of his trades meets their individual stopping criteria. The global algorithm is stopped when all trades of all agents are finished. This stopping criteria per trade only consideres the share of trade p nm into the global primal and dual residues r n and s n . An agent shall stop trading as soon as the primal and dual residues which concern his trades fall below a tolerance:

p k+1 nm + p k+1 mn 2 pri trade 2 (7a) p k+1 nm -p k nm 2 dual trade 2 (7b)
For each one of these two criteria, the thresholds pri,dual agent,trade can either be defined in an absolute or a relative manner. In the latter case, they can be fixed as a fraction of the agent's nominal power:

pri,dual agent,trade = a • max |p min n |, |p max n | (8)
It should be observed that these alternative stopping criteria no longer provide evidence of the convergence of the P2P negotiation algorithm towards a global optimum. Although the objective functions are unchanged as well as the decomposition scheme of the global problem, there is no demonstration to our knowledge of the convergence of a P2P market when some exchanges are frozen before the end of the global algorithm. In addition, exchanges between peers are assumed to be synchronous in this case: each exchange of the k th iteration takes place before all peers move on to the k + 1 th iteration. Although this assumption is unrealistic in the context of a real deployment of a P2P market, we have no knowledge of a demonstration regarding the convergence of such negotiation if exchanges are asynchronous.

III. RESULTS

A. Test cases and reference's descriptions

The previous resolution and the different stopping criteria will be evaluated here on P2P market configurations. Based on [START_REF] Moret | Negotiation Algorithms for Peer-to-Peer Electricity Markets: Computational Properties[END_REF]'s test case generator, agents' characteristics are drawn from a uniform distribution to avoid extreme cases such as low flexibility slope and market power. For this purpose the generator ensures that consumers and producers each presents at least a third of the total number of market players. Before being split between agents, total consumption and production capacities are randomly sampled within a range proportional to the market size. Moreover, agents follow a quadratic cost function, as commonly done in the literature, for which prices and power set points are sampled within a given range. Since the outcome of the market clearing depends on agents characteristics, the convergence speed of the negotiation mechanism is evaluated on 1000 generated cases to perform a Monte Carlo analysis. To give a first overview of alternative criteria's impact on performances, the configurations tested in sections III-B and III-C are composed of 25 agents.

In order to define a reference situation, these thousand resolutions are first executed without any stopping criteria but a maximum number of iterations. The first result of this study is thus the shape of the trade-off between an acceptable power balance and the number of messages that have to be exchanged to achieve it. Indeed if there is still any imbalance in the market i.e. P = 0 -the grid operator will have to compensate it by adjusting the production of another power plant. The plunge of this imbalance along iterations of the P2P market clearing is then a tool to decide when power balance compensation costs become lower than communication costs. The left panel of Fig. 1 illustrates the progress of this imbalance.

Center and right panels of the same figure display, respectively, the simultaneous evolution of per agent and per trade primal residuals as defined in Section II-C. These two figures highlight the benefits of defining the proposed stopping criteria. Indeed, a significant proportion of agents converge quickly towards a solution that seems satisfactory to them. Their contribution to the overall residue therefore quickly becomes insignificant, i.e. about 2 orders of magnitude lower than the average of the agents. This phenomenon is even more pronounced when considering trades independently. Many converge towards their final value after a few iterations and therefore have no interest in being taken into account later. Thus communication would not need to be followed up once the agents or the trades reach a tolerance threshold. It seems a promising way to reduce the number of messages exchanged to reach market outcomes without deteriorating quality of the solutions.

B. Alternative stopping criteria

As outlined above, this study considers the case of the use of P2P negotiation for an electricity market. The discussion therefore focuses on respecting the equilibrium constraint of the injected and subtracted powers P = 0. Any violation of this constraint would entail additional costs to restore the balance of the network, by urgently using flexible means of production or consumption.

Fig. 2 represents the evolution of this coupling constraint depending on the number of messages exchanged for the different considered stopping criteria. The convergence speed of the reference solution is recalled in blue -average, 1 st and 3 rd quartiles, and 1 st and 9 th deciles.

The first panel in this figure refers to the stopping criterion where each agent stops when its residues fall below an absolutely fixed limit, as in [START_REF] Gungor | Smart grid technologies: Communication technologies and standards[END_REF]. Each point on the figure represents one of the 1000 simulated situations. The threshold pri agent and dual agent takes values from 10 -5 to 10 0.5 to map a large part of the convergence. It should be noted that the speed of convergence under this strategy is almost similar to the baseline situation. It appears that very few, if any, agents can achieve convergence on all their trades in an earlier stage. They therefore all remain active for a very long time in the negotiation process. This is actually consistent with panels a) Fig. 2. Convergence speed on the coupling constraint depending on the number of messages with different stopping criterions -average, 1 st and 3 rd quartile, 1 st and 9 th deciles. The reference behaviour is recalled in blue. and b) of figure 1. Indeed, the residues per agent decrease at the same rate as the global imbalance and all agents share the residuals equally.

The second panel of Fig. 2 is dedicated to the stopping criterion on each trade, as in [START_REF] Day | Rational choice and economic behavior[END_REF], with an absolute tolerance. A significant acceleration can then be noticed. Indeed, the coupling constraint decreases up to 10 times faster with this stopping criterion strategy. Due to the definition of pri trade and dual trade in absolute terms, the quantiles are grouped together, which reflects a low dispersion in convergence rates between the market simulations. The choice of such a shutdown criterion therefore seems highly appropriate to achieve market clearing that respects the network's equilibrium constraint while minimizing communication costs and delays.

The third panel represents the results for the stopping criterion per agent, defined as a proportion of its nominal power. Similarly to when the stopping criterion was defined in an absolute way, this strategy gives results very close to the reference situation.

Finally, the fourth panel concerns the stopping criterion per trade, defined as a fraction of the nominal power of the agent. This strategy may have significant accelerations compared to the reference situation although these do not concern all values. It therefore seems generally less effective than when tolerance thresholds are defined in an absolute way.

Continuous curves observed in Fig. 2 over wide ranges of accuracy have been obtained by setting various values of tolerance thresholds pri,dual agent,trade . For each value of tolerance threshold, the mean imbalance is represented in the reference case. The difference is actually due to the fact that trades are taken as constant in the alternative strategy while they are always improved in the reference case. In other words, stopping negotiations on several trades have an impact on the remaining ones, which was to be expected. Even though the per agent relative approach appears interesting in terms of precision, its inefficiency in terms of messages as observed above rather puts it aside. Lastly, the use of a relative per trade method seems detrimental overall for the imbalance.

C. Final iteration distribution

The reduction in the number of messages globally exchanged is achieved by stopping many trades as soon as their primary and dual residues fall below a threshold. Figure 4 represents the histogram of the final iterations for each trade k nm with a tolerance per trade prim trade = dual trade = 10 -1.5 . The overwhelming majority of trades are therefore frozen from the very first iterations. After 15 iterations, 99.99% of the trades are concluded. For these trades, the observed prices are similar to those obtained in the reference solution to within 10 -6 . However, the chosen threshold value allows to draw attention to the fact that the remaining fraction was no longer able to converge towards a solution that respected the tolerance. These trades therefore continued to iterate until they reached the maximum number of iterations set in this resolution at 1000. This observation stems in all likelihood from the absence of a guarantee of global convergence when introducing such stopping criteria. Such a behavior cannot be highlighted for lower trade .

D. Impact of the number of agents

In order to estimate the impact of the number of agents on the stopping criteria previously introduced, the configuration identified as particularly interesting is reproduced for larger markets. This configuration is a stopping criterion per trade and a tolerance on primary and dual residues of 10 -3 . Table I summarizes the variations for markets with between 25 and 100 agents. First, the imbalance of the injected powers is indicated in mean value and standard deviation. The number of messages exchanged using the stopping criterion per trade is designated N stop message . This number is compared to N ref message , the number of messages that must be exchanged to achieve the same accuracy with a global stopping criterion. The increase in the number of messages follows the square of the number of agents in both cases. Counter intuitively, the reduction factor of the number of exchanged messages therefore remains globally constant regardless of the number of peers in the market.

IV. CONCLUSION P2P markets require to exchange a number of messages that increases with the square of the number of participants. This property would entail significant communication costs in the case of their deployment in electricity markets where the constraint of balance between injected and consumed power is critical. In this study, alternative stopping criteria have been proposed in order to reduce the number of messages while preserving the same respect for the equilibrium constraint.

The most efficient of these criteria proposes to establish each trade independently as soon as its primal and dual residue falls below a tolerance. This results in a tenfold reduction in communication needs. The impact of the selected tolerance levels on the respect of the equilibrium constraint has been investigated, as well as the number of iterations allowing trades to be frozen. Finally, the scaling up of this stopping criterion was examined on markets with up to 100 agents.

However, the stopping criterion was considered here as an exogenous constraint, for example set by regulation to maximize the system's efficiency. In an individual approach, where each agent would bear the communication costs for each message he sends, the problem could then be formulated as a trade-off between the communication cost and the expected improvement of a trade. Such a resolution would require anticipating peers' decisions and, therefore, assuming that agents would behave strategically.

Fig. 1 .

 1 Fig. 1. Quantiles (5%) of the power imbalance (left), and per agent (center) and per trade (right) residuals through messages in a 25 agent P2P market. The traded volume is 1370 W in this test case.

Fig. 3 .

 3 Fig. 3. Impact of tolerance threshold on global imbalance

Fig. 4 .

 4 Fig. 4. histogram of final iterations for a P2P market of 25 agents and a tolerance per trade prim trade = dual trade = 10 -1.5

Algorithm 1 :

 1 Standard P2P Negotiation Mechanism Data: ρ, pri , dual 1 for n ∈ Ω do in parallel Data: f n , p min n , p max n , ω n 2Initialize: p nm = p mn = λ nm = 0, ∀m ∈ ω n ; , s n ) and receive (r j , s j ) j∈Ω\{n} ;

	3	do
	4	P n ←-(2a);
	11	while (3) not True;
	12 end

/ * Update local proposals * / 5 foreach m ∈ ω n do 6 Send p nm to and receive p mn from agent m; 7 λ nm ←-(2b); / * Update trading price * / 8 end 9 (r n , s n ) ←-(4); / * Update local residuals * / 10 Broadcast (r n

TABLE I IMPACT

 I OF THE NUMBER OF PEERS IN A MARKET ON THE STOPPING CRITERION.

	Npeers	50	100	125	150	175	200
	imbalance •10 -3	160	460	610	765	905	1050
	σ imbalance •10 -3	60	200	300	410	540	660
	N stop message • 10 3	11.5	49.5	100	140	177	225
	N ref message • 10 3	100	510	830	1220	1700	2290
	reduction factor	10.4	9.7	10.3	8.7	9.6	10.1

Besides this costly communication, this could represent a privacy concern which is beyond the scope of this study.

APPENDIX

A. Decentralized P2P negotiation algorithm

Problem [START_REF] Naber | Scaling up sustainable energy innovations[END_REF] can not be straightly decomposed per agent due to complicating constraint (1b), which is mutually binding between partners. (1b) can be transformed into

with C = (c nm ) n,m an additional slack variable. Suppose penalty factor ρ > 0, dual variable µ = (µ n ) n∈Ω and function fn -the extended-value of f n , in the sense of [START_REF] Boyd | Distributed optimization and statistical learning via the Alternating Direction Method of Multipliers[END_REF], defined on (1d). Then the augmented Lagrangian of ( 1) with ( 9) reads

Leading to consensus ADMM {P, µ} k+1 = argmin

which step (11a) can be distributed among agents such as

Finally, as in [START_REF] Boyd | Distributed optimization and statistical learning via the Alternating Direction Method of Multipliers[END_REF], update (11b) can be written

) Substituting (13) in (11c) gives Λ k+1 -Λ k+1,T = 0. So, after the first iteration C k+1 = P k+1 -P k+1,T /2. Overall, after simplifications, the decentralized negotiation mechanism reads as [START_REF] Parag | Electricity market design for the prosumer era[END_REF].