Roman Le Goff Latimier

Hamid Ben

Peer to peer electricity markets

Keywords: peer to peer market, electricity market, distributed optimisation, grid control

Driven by the energy transition and the development of distributed energy resources, peer-to-peer markets are the focus of much research. Because of their decentralised structure, they allow scaling up by multiplying the number of agents in a market. Moreover, they permit heterogeneous preferences between peers to introduce behaviours such as local exchanges or an environmentally friendly preference. Despite these attractive features, which make them good candidates for the evolution of power systems, they present several challenges that are still being investigated at present in order to become operationally viable. Supporting many agents is done by exchanging even more messages. Furthermore, integration with power systems requires adapting the interaction with the system operator. The aim is to ensure that the physical limits of the infrastructure are respected and to measure the completed trades. The decentralisation of the energy market also has an impact on the market for capacity reserves to deal with contingencies. Finally, the final challenge is how the enduser will deal with such a change. Despite these various difficulties, several pilot projects highlight the possibilities of these markets for the evolution of power systems.

Introduction

Electricity networks in the 21st century are facing a proliferation of connections from new protagonists. On the one hand, wind and photovoltaic power plants, sometimes of very low power, have developed [START_REF] Yu | Communication systems for grid integration of renewable energy resources[END_REF]. They constitute power injections distributed throughout the network, sometimes at very low voltage levels that were not planned for such uses. On the other hand, the drop in the cost of Lithium Ion batteries is leading to the widespread adoption of electric vehicles and even stationary domestic batteries [START_REF] Pudjianto | Virtual power plant and system integration of distributed energy resources[END_REF]. These new uses, in particular the electrification of mobility, are very likely to generate an increase in electrical consumption in the years to come [START_REF] Leou | Stochastic analyses of electric vehicle charging impacts on distribution network[END_REF]. Together with the possibility to produce energy on their own via a rooftop PV power plant, this results in the involvement of the user in their electrical behavior. The consumer becomes a prosumer at various stages: from the monitoring of his consumption, to their management, then to their balance with his domestic production [START_REF] Jacobs | The energy prosumer[END_REF]. This transition in electrical behaviour coincides with the development of communication networks. Although impelled independently, power networks and communication networks merge to constitute the concept of the smart grid [START_REF] Jenkins | Smart Grid[END_REF]. All the elements are now in place to mainstream the measurement and remote control of production and consumption. In this context, the concept of peer-to-peer exchanges is being put to new use: popularised by file exchange protocols, it provides the possibility of exchanging electricity in a way that is highly adapted to the new context of electricity networks. Indeed, it provides the possibility for everyone to directly operate in a participative energy market, capable of managing very large numbers of players, without any supervision by a central manager [START_REF] Einav | Peer-to-peer markets[END_REF].

Following a contextualisation presenting the role of electricity markets within the current management of a power system -section 2 -this article attempts to highlight the properties that make a P2P market such an attractive alternative -section 3. The mathematical definition and an example of resolution will be presented in section 4. The main remaining obstacles to its operational use will be raised in the following sections: intrinsic communication and time cost in section 5, coordination issues with power system management in section 6 and adoption by the prosumer in section 7. Finally some examples of experimental deployment in section 8 will be presented.

Prologue: current functions of an electricity market

A so-called market problem is defined by producers and consumers seeking to exchange a product by agreeing on a price and quantities. It is based on the assumptions that the good is substitutable and that the agents are so numerous and small that they cannot influence the outcome of the problem alone. In the case of power systems, the use of energy markets has become the hegemonic approach since the dismantling of vertically integrated operators [START_REF] Sioshansi | Electricity market reform: an international perspective[END_REF]. They are classically defined as follows [START_REF] Ventosa | Electricity market modeling trends[END_REF], with the purpose of optimizing the sum of the interests of all participants: where Ω denotes the set of agents participating in the market, p n the power that agent n will producep n ≥ 0 -or consumep n ≤ 0 -and f n the function describing their costs, which are most often considered convex. Indeed such an assumption can be widely checked by real systems if using modelling of adequate complexity. Morevoer it allows many efficient solving methods. These functions describe the costs of the power plants -fuel, maintenance, ... -and those of the consumers. In the context of today's markets, these consumers are the suppliers with whom the final consumers have their supply contracts. The market crucial point is the coupling constraint imposing balance of transactions (1b). The latter also conveys the balance of power injected and subtracted into the network1 . Finally, the power injected by each agent is limited by their physical constraints (1c). The definition of such a market problem is independent of the choice of its resolution method. Currently, energy markets are solved in a centralised manner. This means that a market operator is responsible for collecting bids and 50 offers and then setting the energy price for the current time period. Operationally this is done using a merit order method illustrated figure 1. The bids must be discrete rather than described in a continuous manner by functions.

min pn∈Ω n∈Ω f n (p n ) (1a) s.t.
A resolution using a convex optimisation algorithm could also be used in this centralised optimisation framework.

55

A second approach of the resolution of a market problem is distributed optimisation. Indeed, the market problem is precisely a problem of optimal exchange of a resource between agents. A distributed iterative resolution is specifically provided [START_REF] Boyd | Distributed optimization and statistical learning via the alternating direction method of multipliers[END_REF] by the following algorithm, with ρ > 0 and p the mean value among agents:

p k+1 n := argmin pn f n (p n ) + ρ 2 p n -p k n + p k + u k 2 s.t. p min n p n p max n ( 2a
)
u k+1 := u k + p k+1 (2b)
This decomposition can be deducted from distributed optimisation algorithms, but is also equivalent to equilibrium search processes such as tâtonement à la

Walras. Here, the central agent is still necessary because it must receive the p k+1 n updates from the agents, compute their average p k+1 value and update the dual variable (2b). However, the agents can perform their own updates (2a) and keep their objective functions confidential. Such a distributed approach allows a parallel resolution. This is why, even in the case of a resolution completely carried out by the central agent, one can encounter distributed optimisation schemes, for example between the cores of a processor. An example of implementation is proposed on the GitLab repository of the SATIE Laboratory2 .

Regardless of how this market has been resolved, several essential elements of a power system have not yet been taken into account. Firstly, market agents trade electricity without addressing the issue of its transmission. The grid is assumed to be a copper plate. It is therefore necessary that the power injection plans drawn up by the market are passed on to the system operator, who must ensure that this plan is compatible with the physical limits of the infrastructure.

If this is not the case, the markets have to decouple into different zones, each with different prices [START_REF] Shahidehpour | Market operations in electric power systems: forecasting, scheduling, and risk management[END_REF].

Moreover, an electricity market always takes place before real time in order to predict and agree on trades. However, it is inevitable that not everything will go according to expectations: a generator suffering an outage or poorly forecasted weather conditions that are adverse to renewable plants for instance.

All these unexpected events will create imbalances in the grid that will have to be compensated for. Other agents must be ready to adjust their own injection plans to mitigate the deviation. To do this, a reserve market must be established [START_REF] Wang | Demand-side reserve offers in joint energy/reserve electricity markets[END_REF].

The optimal solution for the system is obtained when the energy and reserve markets are resolved jointly.

Motivations for a transition to a peer-to-peer market

The mechanisms for managing electricity networks as described in the previous section allow for efficient regulation of these highly complex systems. They have been proven to provide good quality electricity with a very high availability rate. Nevertheless, there are several points that trigger a desire for evolution in these management mechanisms.

To begin with, the energy transition, together with the omnipresence of an efficient communication network, is driving the massive deployment of distributed generators and new consumption practices [START_REF] Pudjianto | Virtual power plant and system integration of distributed energy resources[END_REF]. The outlook for this transition is a metropolis whose roofs are covered with photovoltaic panels and whose electricity distribution infrastructures could not carry the consumption of electric vehicle recharging without demand response mechanisms [START_REF] Leou | Stochastic analyses of electric vehicle charging impacts on distribution network[END_REF]. Consequently, the inhabitants would actively participate in their electricity consumption. By definition, such a situation would make everyone both an electricity producer and a consumer seeking to minimise their purchasing costs. It would then become difficult to persevere with standard electricity supply contracts. Instead, each household would tend to become a small market agent [START_REF] Parag | Electricity market design for the prosumer era[END_REF], attempting to sell its production, buy its consumption and be rewarded for providing ancillary services [START_REF] Kubli | The flexible prosumer: Measuring the willingness to co-create distributed flexibility[END_REF]. This solution offers the most flexibility and allows for optimal control of the system: decision-making is transferred to each actor who can act according to his preferences and his particular situation. However, this comes up against a scaling-up hurdle.

Indeed, energy markets were not designed to coordinate thousands or even millions of agents. At present, only a few approved players are allowed to participate. The centralised form of a market presents a bottleneck that does not allow for scaling up, if only because of communication concentration issues. Peer to peer -P2P -markets provide an answer to this precise issue of scaling up as each agent trades electricity directly with its peers, without global supervision. There is therefore no bottleneck in the negotiation because all peers can negotiate in parallel. It should be noted that scaling is also addressed by other approaches in the literature. Aggregators, for example, propose to coordinate a large number of actors in order to value their overall behaviour in existing markets. Additionally, small but interconnected markets, as illustrated in figure 2, have been proposed [START_REF] Baroche | Prosumer markets: A unified formulation[END_REF]. However, it has been shown that all market topologies can be considered as particular cases of a P2P market: each central agent can be described as a particular peer, in communication with all the others. This property is a considerable safeguard in the context of current research activities. It is still unclear what operational solutions will emerge from the energy transition. Proposing methods for managing electrical systems on the basis of a P2P market therefore provides the guarantee that the method developed will be adaptable to any context using a market -which is a very loose characteristic.

Furthermore, in this trade organisation centered around the prosumer, there is a strong desire which is already at work today in many areas of consumption: one wants to identify the origin of its purchases and to be assured of its fairness in terms of human rights, carbon impact or geographical origin for instance [START_REF] Kara | The impacts of eu co2 emissions trading on electricity markets and electricity consumers in finland[END_REF].

In the case of electricity, this differentiation between two suppliers can only be achieved through contracts or certificates of origin as there is no physical difference and no way to track electrons on a grid. However, in a centralised electricity market and by definition, the quantities offered are equivalent and interchangeable. Such differentiation is therefore impossible. On the contrary, in the case of P2P markets, it is very feasible to specify that one is willing to pay more for the product of a particular seller. A preference is then given to a renewable producer or to locally produced electricity. Several prices for the same asset can then go along within the same market, depending on agents preferences [START_REF] Morstyn | Multiclass energy management for peer-topeer energy trading driven by prosumer preferences[END_REF].

Moreover, electricity exchange will probably be just one of the components of future networks. Indeed, the forecasting of production and consumption is of vital importance for the anticipative management, in particular of storage facilities. However, this forecast can only be made accurately by aggregating the local data and measurements of each agent. A shared good -the forecast -will therefore be calculated by aggregating individual contributions. An adequate value will therefore have to be given to each contribution in order to redistribute fairly the benefits obtained thanks to the forecast [START_REF] Goncalves | Towards data markets in renewable energy forecasting[END_REF]. Such a data market could then come along with the electricity market, also under a P2P structure.

Mathematical definition of a peer-to-peer market and example of resolution

A peer-to-peer market [START_REF] Sousa | Peer-topeer and community-based markets: A comprehensive review[END_REF] consists of a set of agents who aim to minimize their objective functions by exchanging contracts. By agents, we mean producers -owning production plants -consumers, or prosumers. The latter combine both behaviors, either simultaneously or at different times. Storage units in particular belong to this category. Their objective functions reflect their operating costs, the services they have committed to provide, or a quantification of the inconvenience they would suffer if they could not consume. This last point can be objectively quantified in the case of industrial consumption, but is much more subjective in the case of domestic consumers. Finally, the notion of contract refers here to the fact that a market takes place upstream of real time, no electrons are circulating at the moment. Ensuring that power flows according to the proposed contracts will be addressed at a later stage. For a peer-to-peer market, the contracts do not relate to power injected or subtracted at the agent's connection point. Instead, it is a quantity of electricity exchanged between two agents. This is called a bilateral exchange. The power injected by an agent will therefore be the sum of all the exchanges it has contracted with its peers.

The peer-to-peer market among agents of the set Ω is stated as the following problem:

min (pnm) n∈Ω f n m∈ωn p nm (3a) s.t. ∀n, m, p nm = -p mn (3b) ∀n, m, p min nm p nm p max nm (3c) ∀n, p min n p n p max n (3d)
The problem has many similarities with a centralized market problem. The power of agent n has been replaced by a sum of trades contracted with his peers. ω n stands for the set of peers of agent n. Limits on the trades have been added. The major difference lies in the market equilibrium constraint (1b) which is not compatible with a decentralized framework. Indeed its verification would require that everyone communicates their trades to everyone else. It is therefore replaced by a stronger, but decentralizable, constraint (3b), that of the reciprocity of each trade: the buyer must agree to buy the same quantity as the seller wishes to sell. The agents' f n functions are assumed to be convex.

However the problem is not strictly convex with respect to the trades p nm . The optimal social welfare value may be achieved by several trades configurations.

If desired, the problem can be strictly convexified by adding to (1a) a negligible term minimizing the trades α n,m p 2 nm . Like any optimization problem, it may be solved by several different algorithms. Strictly speaking, it would be an option to centralize the objective functions of the agents and solve the problem by the same algorithms as a centralized market. In the case of a simulation, this is a viable solution. The number of variables being much larger, the time performance could only be inferior to a pool market. Moreover, such a centralized resolution would be unnatural for a P2P market which should, intrinsically, remove any bottleneck and be decentralized. In an operational ambition, it is mandatory to systematically adopt a decentralized optimization method. Several algorithms are possible: Consensus+Innovation [START_REF] Sorin | Consensus-based approach to peer-to-peer electricity markets with product differentiation[END_REF], Alternating Direction Method of Multipliers [START_REF] Boyd | Distributed optimization and statistical learning via the alternating direction method of multipliers[END_REF] for example. This last option is very frequently chosen [START_REF] Park | Comparative review and discussion on p2p electricity trading[END_REF][START_REF] Tushar | Peer-to-peer trading in electricity networks: An overview[END_REF]. The example of resolution presented below uses this versatile method, which in the present case, is equivalent to the simpler method of multipliers. Constraints (3c) and (3d) being local to each agent, they are not taken into account in the problem decomposition approach below. The first step is to develop the augmented Lagrangian of the problem (3) with ρ > 0:

L ρ (P, Λ) = n∈Ω f n m∈ωn p nm + m∈ωm λ nm ( p nm + p mn ) + ρ 2 (p nm + p mn ) 2 (4)
where P refers to the set of trades (p nm ) and Λ the set of dual variables associated with each reciprocity constraint. The principle of the multiplier method consists in performing a gradient descent according to the following iterations:

(P nm ) k+1 m∈ωn = argmin (Pnm) m∈ωn f n ( m∈ωn p nm )+ m∈ωn λ k nm p nm + p k mn -p k nm 2 + ρ 2 p nm + p k mn -p k
λ k+1 nm = λ k nm + ρ p k+1 nm + p k+1 mn (5b)
Both steps (5a) and (5b) can be performed by each agent independantly, although one has to wait for peers decisions p k+1 mn . Note that the reciprocity constraint has been modified: the trade p nm is compared to the mean

p k mn -p k nm 2
at the previous iteration rather than to the sole peer decision p k mn . Once the convergence is reached, both expressions are equivalent and the latter avoids oscillations during the iterative resolution. The above iterative resolution highlights that the P2P market can be solved in a completely decentralised way, i.e. without any concentration of information in a single computational node, as opposed to a distributed resolution.

The global stopping criteria associated to [START_REF] Jenkins | Smart Grid[END_REF] with, respectively, primal and dual local residuals

r k+1 n = m∈ωn p k+1 nm + p k+1 mn 2 (7a)
s k+1 n = m∈ωn p k+1 nm -p k nm 2 . ( 7b
)
Parameters pri and dual denotes primal and dual global feasibility tolerances, respectively. Figure 3 depicts the information exchanges that must take place during this resolution. In this version, checking the stopping criterion still requires a broadcast step, which is problematic for scaling. However, section 5.1 will show that stopping criteria local to each trade also allow convergence,

205

without broadcasting and with much less message exchange.

In order to perform the algorithm (5), the minimisation step (5a) still needs to be addressed. Here again many methods are applicable. As this convex problem is local to each agent, a centralised solution using an interior point algorithm is for example possible. Since it is strictly a sharing problem, a solution by ADMM is also possible, either explicitly coded or via an Operator Splitting Quadratic Program type solver [START_REF] Stellato | Osqp: An operator splitting solver for quadratic programs[END_REF]. Again for illustrative purposes, an iterative resolution by ADMM is presented here, using the structure of the problem (5a). This one is indeed a sharing problem of the form :

min (pnm) m∈ωn f n m∈ωn p nm + m∈ωn g nm (p nm ) (8)
with

g nm (p nm ) =λ k nm p nm + p k mn -p k nm 2 + ρ 2 p nm + p k mn -p k nm 2 2 = ρ 2 p nm + p k mn -p k nm 2 + λ k nm ρ 2 - λ k nm ρ 2 (9)
Since the minimisation is on the variable p nm , the last term may not be taken into account. The direct application of ADMM on such a sharing problem requires a reformulation with a new variable:

min (pnm,qnm) m∈ωn f n m∈ωn q nm + m∈ωn g nm (p nm ) (10a) s.t. ∀n, m, p nm = q nm (10b)
Hence the following algorithm, where µ is the dual variable associated to (10b), l denotes the second iteration variable, M n is the number of peers in the set ω n , ρ n is the coefficient of the augmented Lagrangian of this local problem and

. denotes the mean value :

P l+1 nm = argmin Pnm ρ 2 P nm + p k mn -p k nm 2 + λ k nm ρ + ρn 2 P nm -P l nm + P l -Q l + µ l ρn 2 (11a)
Q l+1 = argmin Q f n M n • Q + M n • ρ n 2 • Q -P l+1 - µ l ρ n 2 (11b) µ l+1 n = µ l n + ρ n P l+1 -Q l+1 (11c)
These minimisation steps can be solved analytically in the case of quadratic Although this solution scheme converges systematically for convex functions, the different coefficients of the augmented Lagrangians have a strong impact on the convergence speed. Figure 4 illustrates this influence for a 10-agent P2P market, where each agent can trade with everyone else.

It is crucial to clarify that the resolution presented in this section only addresses the market problem [START_REF] Leou | Stochastic analyses of electric vehicle charging impacts on distribution network[END_REF] and that the behaviours of real economic actors are far more complex. It is required to assume that the interests of market players will be uniquely described by the objective functions f n and that they will behave rationally and not strategically [START_REF] Day | Rational choice and economic behavior[END_REF]. Although such assumptions can be applied to economic actors whose impact on the market is marginal [START_REF] Le Cadre | Peer-to-peer electricity market analysis: From variational to generalized nash equilibrium[END_REF], the section 7 will discuss the limits of such an assumption in the case of a participative P2P market.

Intrinsic challenges to operational use

Despite their many interesting properties, P2P markets raise several complexities that ought to be addressed to allow their operational deployment -5. Moreover, in the particular case of electricity markets, several mechanisms must be redesigned since the market is only one part of the management of this complex system -section 6. Finally, as the prosumer is brought to the centre of grid management by P2P markets, the crucial issue of his reaction to such tools remains largely to be investigated -section 7.

Increasing communication needs

A peer-to-peer organisation allows the number of agents to be amplified by eliminating the bottleneck of a central agent. During the iterative resolution process, information is exchanged directly between agents without concentration at a regulator. This decentralised organisation of communications allows for scaling up. However, it considerably increases the overall number of messages during the resolution process. Indeed, in the case of a centralised market, each agent sends a single message to the central agent. For a distributed resolution, each agent sends a message to the central agent at each iteration. The number of messages is therefore proportional to the number of agents and the number of iterations, which in turn depends on the desired resolution accuracy. Conversely, in the case of a P2P market, each agent must send a message to each of its M peers at each iteration. The total number of messages is therefore multiplied by M , assuming the number of iterations is not significantly affected.

To guarantee convergence to the globally optimal solution -similar to that obtained by a centralized or distributed market -the P2P market must be completely connected, i.e., each agent must be connected to all others. The number of communications is then proportional to N 2 . This is an upper bound that is only realized in cases of proof of concept and research. Indeed, such an increase in the number of messages would make any operational deployment hardly feasible. The communication protocols considered to manage these exchanges can be the classic Internet layer, 5G and low-power protocols such as LoRa. The choice of a communication protocol is however outside the scope of this article.

Faced with this issue of increasing communication needs, several approaches should be explored in the remainder of this section.

• section 5.2: how to choose one' s peers to achieve a solution close to the global optimum without the assumption of full connectivity of the communication graph?

• section 5.3: how to speed up the overall resolution time?

• continuation of this section: how to limit the number of necessary iterations to reach the optimum?

In order to limit as much as possible the number of iterations needed to reach the optimum, we will point out here two approaches. First of all, a P2P market is operationally expected to be used repeatedly, with a market for a time slot succeeding the one dedicated to the previous slot. During this succession, knowing the solution obtained by the previous market is an obvious hint to predict the solution of the current market. Indeed, production and consumption behaviours have an inertia which limits the variations of strong amplitude. The solutions of the two markets will probably be very close. Initializing the iterative resolution of the current market to the solution obtained by the previous market is therefore a simple and very efficient solution to reduce the number of iterations. This idea is referred to as warm start.

Furthermore, the number of messages exchanged in a P2P market can be greatly reduced by noticing that the speed of convergence of trades is very diverse. Some trades converge in a few iterations, while others will take much longer to conclude. This property strongly depends on the market configuration and cannot be generically formalised. However, the use of alternative stopping criteria can only improve the speed of convergence. For example, figure 5 presents the results obtained when the stopping criterion is fixed agent by agent or trade by trade [START_REF] Goff Latimier | Mitigation of communication costs in peer-to-peer electricity markets[END_REF]. The idea is then that as soon as the dual residue of a trade -respectively of an agent-falls below a certain tolerance, which can be fixed in a relative or absolute way, this trade -respectively agent -is considered as settled. No more messages are then exchanged about it, even if the market continues globally to establish the remaining trades. These alternative stopping criteria strategies have been implemented on a P2P market with 25 agents, whose objective functions are randomly drawn 1000 times. The overall market imbalancenm P nm -is plotted as a function of the number of messages exchanged, in blue for the baseline situation. The stopping criterion on each trade, according to an absolute tolerance, allows notably a reduction by a factor of 10 of the number of messages to be exchanged.

Choosing one' s peers

P2P markets feature the fundamental capability of managing a very large number of agents since each agent does not communicate with all the others, but only with a few. The issue of choosing these few peers among all the market players is therefore unavoidable. In the context of an energy market, it is all the more crucial as it will affect the final solution. A market is indeed very different from a file sharing system where all peers share the same resource. In a market, all agents have different cost functions. Choosing the wrong partners therefore results in a cost overrun as shown figure 6. The reference situation is a market where all peers can trade with all. This is the only configuration where the P2P market is demonstrated to converge to the optimal solution obtained by a centralized market. A Monte Carlo simulation is then performed by removing random links from the market connection matrix. The final price obtained as well as the social welfare are then plotted as a function of the sparsity of the communication matrix.

For an operational P2P market where agents must respect a maximum number of partners, there is to the best of our knowledge no explicit method that guarantees the best choice. This open problem seems very suitable for greedy heuristics or reinforcement learning. However, the validation of such methods will require to be evaluated against the optimal solution which can only be determined by an exhaustive search.

Market resolution time

Any parallel calculation benefits from an acceleration due to the tasks carried out simultaneously by several calculation nodes. Since a P2P market is inherently built so that the agents are independent, they can therefore carry out their local calculations in parallel, provided that they synchronise at each iteration to exchange their offers with their peers. During an operational deployment, however, this synchronisation stage presents a great risk of slowing down because it is necessary to obtain messages from all the peers. Waiting times will therefore be necessary until the last one arrives. These messages will have to be routed via a multiplexed communication network with many other purposes. Communication times cannot therefore be uniform between all agents, but moreover they can neither be guaranteed nor repeatable. Indeed, remote agents will have longer communication times due to propagation times and more repeaters on the route. Depending on the load of the communication network, messages may be delayed due to the packet switching paradigm on which the widely multiplexed networks that make up the internet are built.

When a message is lost, the communication protocols are able to detect it and retransmit it. However, this results in a higher overall transmission delay. For these reasons, an operational resolution of a peer-to-peer market with decentralised calculations is likely to spend most of its time waiting for the arrival of messages from peers.

Faced with this problem, one possible solution is an asynchronous implementation of the resolution. Indeed, during a distributed resolution where an agent must wait for responses from several peers, the waiting times are determined by the slowest of the peers, as illustrated in figure 7. However, this longest waiting time depends not only on the distance to be covered and the performance of the network, but also on its load rate and packet losses. As soon as a packet is lost, the transport protocols -TCP -automatically cause a retransmission, but this results in at least double the waiting time. A P2P market algorithm capable of updating itself without waiting to receive all the messages from its peers therefore allows a significant acceleration. As illustrated in figure 7, as soon as an agent receives a message, it updates its local problem without waiting. A new adjustment parameter is therefore introduced, the asynchronous rate δ. It is defined as the ratio between the number of messages we wait to receive before updating and the total number of messages we should receive. δ = 1 corresponds to a synchronous implementation because all messages must be expected. Figure 8 then represents the speedup that is achieved by an asynchronous implementation. Not only can an acceleration of about 40% be observed, but this acceleration is very little affected by communication hazards. σ represents here the risk that a message gets lost and thus generates retransmission delays, σ = 0 stands for a perfectly reliable network. While the synchronous version is strongly affected by such a degradation of the network reliability, the asynchronous version is almost completely immune to it.

Coordination challenges with other power system operation features

The previous section has raised some of the inner problematics of solving a P2P market. However, as the section 2 has highlighted, an energy market is not the only brick in the operation of a power system as a whole. Several coordination mechanisms must therefore be rethought. We will first address the issue of contractualization of exchanges and their measurement. Second, the coordination between the P2P market and the grid operator will be discussed.

Finally, the evolution of the reserve market will be outlined.

Contractualisation of exchanges and measurement

The decentralised structure of a P2P market raises the issue of the contractualisation of trades. With no central trusted agent, it is necessary to find a process that ratifies trades also in a decentralised manner. The blockchain is currently an approach that is attracting considerable interest [START_REF] Goranović | Blockchain applications in microgrids an overview of current projects and concepts[END_REF][START_REF] Andoni | Blockchain technology in the energy sector: A systematic review of challenges and opportunities[END_REF]. It allows contracts to be verified by everyone by concatenating them in a chain of which everyone has a copy and whose authenticity can be verified by everyone using a cryptographic hash signature.

There are already many examples of contributions to implement different economic models. The situations of microgrids [START_REF] Di Silvestre | A technical approach to the energy blockchain in microgrids[END_REF], fleets of electric vehicles [START_REF] Kang | Enabling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains[END_REF][START_REF] Knirsch | Privacy-preserving blockchain-based electric vehicle charging with dynamic tariff decisions[END_REF], optimal power flow [START_REF] Van Leeuwen | An integrated blockchain-based energy management platform with bilateral trading for microgrid communities[END_REF], flexibilities aggregator [START_REF] Vangulick | Blockchain for peer-to-peer energy exchanges: design and recommendations[END_REF] and network service [START_REF] Mengelkamp | A blockchain-based smart grid: towards sustainable local energy markets[END_REF] have been proposed. The implementation of a P2P marketplace exchange is the most emblematic application [START_REF] Van Leeuwen | An integrated blockchain-based energy management platform with bilateral trading for microgrid communities[END_REF][START_REF] El-Sayed | A real pilot-platform implementation for blockchain-based peer-to-peer energy trading[END_REF]. Moreover, the blockchain is not limited to the implementation of distributed control of a system upstream of real time. It also allows the validation of exchanges that have physically happened by harvesting the measurements of the power meters [START_REF] Gao | Gridmonitoring: Secured sovereign blockchain based monitoring on smart grid[END_REF]. It is then possible to validate whether the behaviours have been consistent with the commitments.

These proposals are based on a variety of blockchains, but Ethereum is the most frequently observed solution. In order to ensure the authenticity of the blockchain, a consensus must be reached between all participants. This consensus is most often still achieved by a proof of work. This solution is highly energy intensive. However, other mechanisms such as a proof of stake are becoming increasingly adopted.

Interaction with the system operator

As described in the section 2, in the current regulatory context, the grid operator receives a power injection forecast from the market operator in order to identify potential risks to the physical infrastructure. In the context of a decentralised market, several approaches are possible to replace this interaction:

• the P2P market is marginal enough not to change the current operating rules. This is the case for the examples of experimental deployment that exist so far.

• a channel of interaction between the P2P market and the network operator is created. This is then an exogenous signal -from outside -sent to the P2P market that the operator must adjust in order to ensure the safety of the physical infrastructure.

• the system operator is coordinated directly with the market at each iteration -endogenous approach.

Exogenous approach. The endogenous approach therefore consists of injecting a signal into the P2P market. This signal takes the following form:

min (pnm) n∈Ω f n m∈ωn p nm + m∈ωn γ nm p nm (12a)
with γ nm a fee imposed by the network operator. The only purpose of this fee is to force the agents to reduce their trades in order to respect the network's operating constraints. It can therefore be adjusted from one time step to the next to be zero when the network is not overloaded. Moreover γ can be determined according to many different metrics. For example, by taxing trades according to the distance separating the agents: the closer they are, the less the trade stresses the network. Or according to zones defined by the most fragile lines. Figure 9 represents an example of a market subjected to such exogenous policies.

Depending on the γ policy, trades can be reduced uniformly or partitioned.

As a result of this fee, the system operator will collect money. This money would be used to cover operating costs, but would also be redistributed among the market agents according to the flexibility service they have provided to the community. As the purpose of the γ fee is to force the agents to respect the network's operating constraints, an example is shown in Figure 10. The initial configuration of the market resulted in a violation of the capacity of some lines -the most problematic represented in dotted line. The introduction of a fee restores operation compatible with the physical infrastructure, although it is more or less efficient depending on the policies chosen. The additional cost to the market, collected by the network operator, is shown in the bottom panel of the figure. The most efficient policy is considered to be the one that enforces the network constraints, at the lowest cost. This best choice highly depends on the configurations. Its judicious adjustment would in the future requires a good grid observability and would depend on the expertise of the system operator and its acquired experience [START_REF] Guerrero | Decentralized p2p energy trading under network constraints in a low-voltage network[END_REF].

Endogenous approach. In contrast to an exogenous approach, the endogenous approach strives to involve the system operator as closely as possible in the resolution of the P2P market. At each iteration of the market -or each few iterations -the system operator receives a copy of the trades in order to signal violations, as illustrated figure 11. Such a scheme proves to be as effective as an optimal power flow as illustrated figure 12.

However, endogenous resolution presents several operational difficulties. First of all, it increases even more the number of messages to be transmitted and the risks of associated delays. This last effect can be limited by using an asynchronous implementation as illustrated figure 12. Furthermore, the computational cost and real time constraints for the system operator are not currently viable on a large scale. In the future, decentralising the computation of the system operator could allow an operational use of this scheme.

Coupling with a reserve market

The purpose of the energy market is to anticipate the exchanges that will take place at a given moment on the electricity network. However, these exchanges never take place exactly as expected, as explained section 2. Since the purpose of the reserve market is to provide for the compensation of discrepancies, it is necessary to adapt it to a P2P process as well [START_REF] Guo | Chance-constrained peerto-peer joint energy and reserve market considering renewable generation uncertainty[END_REF]. Otherwise, the decentralisation of the management would not be complete. Ideally, the energy and capacity markets are solved jointly, otherwise there is a sub-optimality.

A coupled pool market consists of the following chance constrained problem, where p n is the power that an agent forecasts on the market, p * n is the power that will actually be realised, r + n is the reserves that allow to increase production or decrease consumption and r - n is the opposing reserves:

min pn,r + n ,r - n n∈Ω f n p n , r + n , r - n (13a) s.t. n∈Ω p n = 0 (13b) ∀n, p min n + r - n p n p max n -r + n (13c) P n∈Ω r - n ≤ n∈Ω p * n ≤ n∈Ω r + n ≥ δ (13d)
Such a market should be transposed to a P2P scheme. Trades on reserves r +,- nm can be introduced with no difficulty. However the challenge comes from the coupling probabilistic constraint (13d). The uncertainty on the power balance depends on everyone's incertitudes. To be able to decentralise this market, this constraint will need to be altered [START_REF] Baroche | Marchés pair-à-pair de l'électricité dans les réseaux électriques[END_REF]. It must therefore be replaced by a constraint local to each agent: each agent must guarantee to be able to respect his commitments with a certain degree of confidence δ n :

P r - n + m∈ωn r - nm ≤ p * n ≤ r + n + m∈ωn r + nm ≥ δ n (14)
To do this, he can buy reserves from his peers in order to improve his self reliability, or sell them if he is very reliable. There are many different ways of distributing the global uncertainty δ to local confidence levels δ n . The problem is not straightforward, especially because the uncertainties may be dependent on each other: if there is less wind than expected, all wind producers will produce less.

The tests are carried out on a 14-bus network, to experiment with different methods of uncertainty allocation. Figure 13 represents the temporal trajectories of the exchanged power and the constituted reserves. The performances of these allocation policies are compared figure 14. Although respecting their local confidence level, the two first allocations Rel.α µ and Rel.α σ does not constitute enough reserve to respect the global confidence level. Rel.α 1 and Abs.α σ provide both a sufficient confidence and a social welfare close to the centralised performance. Joint reserve and energy P2P markets therefore seem a viable outcome.

User behaviour within a P2P market

After discussing the internal concerns of the P2P algorithm and the issues raised by its coordination with other elements of power system regulation, the most sensitive aspect is undoubtedly how users will seize such tools. Indeed, the market's decentralisation is designed to bring the prosumer to the centre by giving him as many levers as possible. This empowerment must, however, be accompanied by the prosumer's desire and commitment, otherwise it will all be in vain. At present, there is only a limited experience of this issue. However, the studies carried out are very encouraging [START_REF] Bertsch | Public acceptance and preferences related to renewable energy and grid expansion policy: Empirical insights for germany[END_REF][START_REF] Ableitner | User behavior in a real-world peer-to-peer electricity market[END_REF][START_REF] Hahnel | Becoming prosumer: Revealing trading preferences and decision-making strategies in peer-to-peer energy communities[END_REF]. Furthermore, the way users are involved distinguishes a vast majority who wish to actively participate in the experimental P2P markets, either by setting their own prices at any given time or by using proposed automatic profiles. These elements are crucial because the willingness of participants is essential to improve the overall performance [START_REF] Perger | Pv sharing in local communities: Peer-to-peer trading under consideration of the prosumers' willingness-to-pay[END_REF].

In addition to the ergonomics of the devices and interfaces offered to the prosumer, several points need to be taken into account in the design of P2P systems so that the user adopts them. As a P2P market is not intended to be allknowing about the consumer's life, some of his decisions may appear irrational, such as the deliberate choice to pay more. This lack of knowledge of true motivations can be addressed from the perspective of the bounded rationality of economic agents [START_REF] Marín Radoszynski | Electric demand response and bounded rationality: mean-field control for large populations of heterogeneous bounded-rational agents[END_REF]. The impact of these unexpected decisions must necessarily be evaluated [START_REF] Barazza | The impact of heterogeneous market players with bounded-rationality on the electricity sector low-carbon transition[END_REF] and taken into account in order for regulations to be effective.

Moreover, real world use of markets will give rise to behaviours that are at worst malicious, at least strategic [START_REF] Rasouli | An efficient market design for electricity networks with strategic users possessing local information[END_REF]. Coalitions of agents will naturally form by affinity if not by economic interest [START_REF] Marzband | Framework for smart transactive energy in home-microgrids considering coalition formation and demand side management[END_REF]. Preventing such behaviour would probably be illusory and would be a brake on the adoption of P2P approaches.

In order for them to remain marginal, the design of market mechanisms [START_REF] Le Cadre | Designing coalition-based fair and stable pricing mechanisms under private informa-tion on consumers' reservation prices[END_REF] and the redistribution of possible taxes -see section 6.2 -must ensure their fairness [START_REF] Moret | Energy collectives: A community and fairness based approach to future electricity markets[END_REF]. When it is a question of a service rendered by an agent to preserve a common infrastructure, the contribution of each one should be evaluated from collaborative games approaches [START_REF] Azuatalam | Shapley value analysis of distribution network cost-causality pricing[END_REF].

Examples of pilot projects

Due to both the involvement desire of users and technical efficiency issues, many P2P projects have emerged in recent years. The purpose of this section is not to propose an exhaustive review, which is an increasingly wide-ranging excercise [START_REF] Zhang | Review of existing peer-to-peer energy trading projects[END_REF][START_REF] Jogunola | State-of-the-art and prospects for peer-to-peer transaction-based energy system[END_REF][START_REF] Sousa | Peer-topeer and community-based markets: A comprehensive review[END_REF]. Moreover, regulatory constraints currently limit the actual deployment of P2P markets. Rather, it is a matter of using a few examples of projects to illustrate the concepts mentioned in the previous sections.

One of the most representative projects of P2P exchanges in terms of its scale and background is the Brooklyn Micro Grid project [START_REF] Mengelkamp | Designing microgrid energy markets: A case study: The brooklyn microgrid[END_REF], operated by LO3 Energy. Within the context of often congested distribution networks, this community with a significant amount of decentralised production has installed smart meters capable of making purchase and sale contracts via a blockchain.

The market mechanisms are online matching or experimental P2P. These trades are achieved via the main distribution network. However, a physically separable microgrid has been added in case of congestion of the main grid so as to isolate a neighbourhood of 10 by 10 housing blocks. This example is emblematic of the possible coexistence between several management paradigms. Such a coexistence between several types of management is also illustrated in the Nordhavn district in Copenhagen [START_REF] Wang | Energylab nordhavn: An integrated community energy system towards green heating and e-mobility[END_REF]. The approach there is also multi-energy and explicitly addresses the charging of electric vehicles. Here again, at the current stage, the management deployed is more community than P2P.

The coordination of a community to manage both its flexibilities and its network is also illustrated by the Consort project on the island of Bruny [START_REF] Scott | Network-aware coordination of residential distributed energy resources[END_REF]. The focus is there on the optimal management of a weakly interconnected island network. The problem solved is a distributed optimal power flow which is a premise close to an endogenous P2P market. Project leaders highlight user information is a crucial acceptance factor that allows the implementation of the most efficient pricing rules. This importance of participants support is a common thread running through all the projects we know of [START_REF] Van Der Schoor | Power to the people: Local community initiatives and the transition to sustainable energy[END_REF].

Regarding this citizen's will that drives many projects, regulation is often the blocking obstacle. Its evolution is underway [START_REF] Frieden | Collective self-consumption and energy communities: Overview of emerging regula-735 tory approaches in Europe[END_REF] at a very heterogeneous pace from one country to another. For example, the evolution in 2018 of the European directive "Renewable Energy Directive" indicates that Renewable Energy

Communities are entitled to self-arrange sharing of renewable energy within the community and to access all suitable energy markets directly or through aggregation in a non discriminatory manner [START_REF] Inês | Regulatory challenges and opportunities for collective renewable energy prosumers in the eu[END_REF]. Meanwhile its transposition into national laws gives rise to many disparities. France, Germany, the Netherlands and the United Kingdom have adopted the drafts that are perceived to be the most favourable to prosumers. However a tool such as virtual net metering is only allowed in the UK and Germany although it is a key element for collective self-consumption and P2P trading.

Conclusion and prospects for evolution

The development of the concept of peer-to-peer markets is one of the main innovations capable of addressing the energy transition in power systems. Their theoretical tools are a generalisation of the usual market problem. They provide answers to the multiplication of agents and the heterogeneous behaviour of prosumers. Their formalisation and a decentralised resolution were presented.

Implementation issues remain before their operational use, in particular concerning the communication network. Many answers are being investigated and the increase in bandwidths is easing their pressure. The issue of P2P markets opens up the question of the evolution of grid management as a whole. Distribution grid in particular are the focus of the energy transition and are facing the same challenges that led to the emergence of P2P markets. The project examples thus highlight that congestion management often was their starting point. Furthermore, the key element is the support of users and their desire for using this new tool. Here again, current projects are encouraging.

The current legislative evolutions will open further possibilities. This is leading to an increasing number of projects, each focusing on specific issues and proposing ad hoc mechanisms. The transition between this current proliferation

Figure 1 :

 1 Figure1: Example of merit order curve: production offers are ranked by increasing price. The crossing point with the consumption demand settles the electricity price[START_REF] Cludius | The merit order effect of wind and photovoltaic electricity generation in germany 2008-2016: Estimation and distributional implications[END_REF]

Figure 2 :

 2 Figure 2: Examples of market structures [15]: each dot represents an agent and each line a communication. Physical connections are not represented here.

nm 2 2 s

 2 .t. ∀m ∈ ω n p min nm p nm p max nm p min n m∈ωn p nm p max n (5a)

4 =10Figure 4 :

 44 Figure 4: Impact of ρ on the convergence speed of a 10 agent, fully connected P2P market.

Figure 5 :

 5 Figure5: Imbalance of a P2P market depending on the number of messages according to different stopping criterion -average, 1 st and 3 rd quartiles, 1 st and 9 th deciles. The reference behaviour is displayed in blue[START_REF] Goff Latimier | Mitigation of communication costs in peer-to-peer electricity markets[END_REF]. Grey crosses : each result of the MonteCarlo simulation.

Figure 6 :

 6 Figure6: Evolution of a P2P market efficiency depending on the sparsity of the communication matrix -mean value in plain line and decile in colour[START_REF] Moret | Negotiation algorithms for peerto-peer electricity markets: Computational properties[END_REF]

Figure 7 :Figure 10 :Figure 11 :

 71011 Figure 7: Message exchanges diagram in a three agent market: i, j and m, with ω i = {j, m} and ω j = ωm = {i} in synchronous and asynchronous cases. The diagonal arrows represent the message exchanges over time and the colored rectangles represent the porcessing time of a local iteration.The asynchronous case here consists of agent i only waiting for one message instead of two before performing its calculation[START_REF] Dong | Convergence analysis of an asynchronous peer-to-peer market with communication delays[END_REF]

Figure 12 :

 12 Figure 12: Power injection comparison between Matpower and endogenous negotiation mechanisms. Asynchronous case with δpeers = δ SO = 0.2 [42].

Figure 13 :

 13 Figure 13: Evolution of reserves -up and down -for a confidence level of 95%, according to various repartitions of the uncertainty among peers [23].

Figure 14 :

 14 Figure 14: Joint market social welfare for a centralized resolution and with various repartitions of the uncertainty among peers [23]. Allocations Rel.α µ and Rel.α σ does not respect the global confidence level.

  are such as

		Initial state					Initialize P nm , P mn , λ nm , r n , s n 0 0 0	Memory	Comm. layer
								ρ
	Optimize locally (while aiming towards consensus with peers)			Update P nm ← (5a)	P nm	Send P nm
		Exchange new values with peers					P mn	Wait P mn
	(Send to and receive from exchanging peers)
		Update exchange prices		Peers	Update λ nm ← (5b)	λ nm	Peers
	Evaluate and broadcast local residuals			Update (r n , s n )← (7)	r n n , s	Send (r n , s n )
	False	Do peers agree on values ? True		Legend	False	True Test criteria (6)	m m ) m , s (r	Wait (r m , s m ) m	Legend Logical path
					Logical path				Data flows
		Converged	Agent n	Data flows Point to point Broadcast		Converged		Agent n	Broadcast Point to point Internal
	Figure 3: Decentralized algorithm for P2P market and associated dataflow, adapted from [23]
			n∈Ω	r k+1 n	pri 2 and	n∈Ω	s k+1 n	dual 2	(6)

During the transport of electricity through the grid, losses are generated. These losses are compensated for by the system operator, who buys an amount equivalent to the losses on the market.

https://gitlab.com/satie.sete/p2p_electricity_markets

https://gitlab.com/satie.sete/p2p_electricity_markets

and the emergence of new standards is likely to be the next milestone. Moreover, P2P markets will not remain limited to electricity. To this may be added the control of network constraints, flexibilities, reserves, and so forth. The opening up to multi-energy networks and the inclusion of mobility is a logical extension. This increase in the complexity of the products offered on P2P markets requires vigilant attention to price design and fairness, as well as to the opinion of the prosumer.

P2P markets provide a more comprehensive approach to the problems of large-scale networks. Although one cannot know what the future will be made of, the intellectual framework of peer-to-peer markets is relevant to identify the obstacles and propose solutions to the problems involved in enabling the evolution of power systems.


Ce ´cile Boucharat

Vale ´rie Desauziers

Pierre Le Cloirec

Experimental design for the study of two derivatization procedures for simultaneous GC analysis of acidic herbicides and water chlorination by-products

Keywords: Pentafluorobenzylation, BF 3 /methanol esterification, Experimental design, Carboxylic acids

Experimental design for the study of two derivatization procedures for simultaneous GC analysis of acidic herbicides and water chlorination by-products

C Boucharat, Valérie Desauziers, Pierre Le Cloirec

Introduction

Carboxylic organic acids represent about 5-8% of the dissolved organic matter identified in natural water [START_REF] Thurman | Organic Geochemistry of Natural Waters[END_REF][START_REF] Dore | Chimie des Oxydants -Traitement des Eaux[END_REF][START_REF] Legube | [END_REF]. These compounds essentially have natural origins (fatty acids) [START_REF] Martin | La Matie `re Organique Naturelle des eaux de Surface: Fractionnement, Caracte ´risation et Re ´activite ´[END_REF]. However, a small proportion of them (1%), are anthropogenic and can be toxic at trace level. Examples include phenoxyalkanoic acids, used as herbicides and chloroacetic acids, which are the main by-products of the drinking water chlorination process [START_REF] Dore | Chimie des Oxydants -Traitement des Eaux[END_REF][START_REF] Ben Amor | [END_REF]6]. The chemical properties of these compounds are very different and therefore they are generally analyzed separately by using specific methods [START_REF]Test Methods: Methods for Nonconventional Pesticides[END_REF][START_REF]Test Method for Evaluating Solid Waste Physical/Chemical Methods[END_REF][START_REF] Barth | [END_REF]. In this study, a different approach was envisaged. It consisted of a procedure able to simultaneously analyze chloroacetic and phenoxyalkanoic acids.

As these compounds need to be determined at trace level, the first step of the protocol consists of an extraction/concentration procedure (this step will not be studied here). Then, the extract is analyzed by chromatography. GC/MS and GC/ ECD were chosen in this study because, respectively, of the possibility of molecular identification of the extracted compounds, and because of the specific and sensitive detection.

GC analysis of organic acids is widely used, but a preliminary derivatization step is needed because of the thermal unstability and the low volatility of these compounds [10,11]. Several derivatization processes are possible and the most representative are esterification, alkylation, acylation or silylation [START_REF] Blau | Handbook of Derivatives for Chromatography[END_REF]. Esterification involves nucleophilic substitution generally catalyzed by a strong acid (HCl or H 2 SO 4 ) or by a Lewis acid (BF 3 ) [11]. The other derivatization methods also consist of nucleophilic substitution but a bimolecular mechanism is involved, without formation of a carbocation. This is the case of alkylation by pentafluorobenzyl bromide (PFBBr) or by diazomethane. All these methodologies differ according to the stability of the derivatives formed, the presence of interfering by-products and their rapidity. Thus, diazomethane derivatization is known to be dangerous, and the reagent presents impurities [11,[START_REF] Horner | [END_REF]. The same disadvantage is observed for pentafluorobenzylation which generally needs a supplementary purification step on a silica cartridge [10,14]. However, the derivatives are stable and can be detected at very low concentrations by electron capture [11,[START_REF] Chau | Analysis of Pesticides in Water[END_REF]. Mass spectrometry of PFBBr derivatives is also interesting, because of the detection of a specific ion m/z 181 [START_REF] Lee | [END_REF].

On the other hand, the derivatization methods involving esterification by BF 3 /alcool are also widely applied according to their ease of use, and because no further purification procedure is needed. Moreover, GC/MS identification of a wide range of organic acids is possible. Thus, methyl esters are generally available in mass spectra libraries, unlike PFBBr derivatives. However, no specific ion can be observed and the sensitive GC/ECD is not really suitable except for chlorinated acids.

21790 3493 Temperature (X 1 ) b 1 b 2 -2807 Reaction time (X 2 ) PFBBr concentration (X 3 ) b 3 14106 b 12 -10434 Temperature/time (X 1 X 2 ) 2392 b 13 Temperature/PFBBr (X 1 X 3 ) b 23 -3146 Time/PFBBr (X 2 X 3 ) -5172 b 123 Temperature/time/PFBBr (X 1 X 2 X 3 )
According to the literature, the detection limits determined for BF 3 /methanol derivatization followed by GC/MS analysis range from 5 to 50 mg l -1 for acidic herbicides and the average reproducibility is 9% [11]. Considering the PF-BBr alkylation, the detection limits in GC/ECD range from 1 to 13 mg l -1 for acidic herbicides [11,17], and is close to 10 mg l -1 for fatty acids with a reproducibility of 7 -11% according to the compounds [START_REF] Lee | [END_REF]. These results show that these two methods are suitable for trace GC analysis of organic acids. However, it can be noted that these data concern different families of acids studied separately. Consequently, these procedures (BF 3 /methanol esterification and PF-BBr alkylation) were tested in this study with a view to their application to organic acids in a wide range of chemical properties. To this aim, a two-level experimental design was applied to each procedure in order to check the most influential factors and interactions, and try to improve the sensitivity of the methods. Detection limits were determined for chloroacetic acids and phenoxyalkanoic herbicides in GC/ECD and GC/MS after PFBBr alkylation, and by GC/MS after BF 3 /methanol esterification. Considering pentafluorobenzylation, the elimination of the solid-phase purification step was envisaged by reducing the content of the different reagents.

Materials and methods

Reagents

Solvents were purchased from commercial sources. Methanol, hexane and acetone were RS pesticide grade (Carlo Erba Farmitalia, Milan, Italy), and toluene was 99.5%-grade (Riedel de Hae ¨n, Seelze, Germany): potassium carbonate was 99%-grade (UCB): pentafluorobenzyl bromide (PFBBr), 18-crown-6, BF 3 /methanol (12/88, m/m) and BF 3 /methanol (50/50, m/m) were 99%grade (excepted BF3/methanol; Aldrich, Milwaukee, WI). Standard of benzoic acid was Pestanal grade (Riedel de Hae ¨n, Seelze, Germany), dichloro-, trichloro-acetic acids and d 5 -benzoic acid were 99%-grade (Aldrich, Milwaukee, WI), 2-Cl-benzoic acid, 2,4-D, MCPA, 2,4-DP, MCPP, 2,4,5-T and decafluorobiphenyl were 99%-grade (Alltech, Deerfield, USA). Ultrapure water was prepared by purifying demineralized water using a Milli-Q filtration system (Millipore, Bedford, MA).

Standard solutions

The following compounds were used: chloroacetic acids (dichloroacetic and trichloroacetic acids), aromatic acids (benzoic and 2-chlorobenzoic acids), and phenoxyalcanoic acids (2-(4chloro 2-methylphenoxy) propanoic acid (MCPP), 4-chloro 2-methyl phenoxyacetic acid (MCPA), 2-(2,4-dichlorophenoxy) propanoic acid (2,4-DP), 2,4-dichlorophenoxyacetic acid (2,4-D), 2,4,5trichlorophenoxyacetic acid (2,4,5-T). These compounds were dissolved in methanol and working solutions were prepared by diluting stock solutions in the derivatization medium. Two internal standards were used. Decafluorobiphenyl was added to the PFBBr reaction medium before GC injection. For BF 3 /methanol derivatization, d 5benzoic acid was used.

PFBBr deri6atization

The PFBBr derivatization was performed in 2 or 4 ml acetone containing the studied acids. The concentrations are 10 mg l -1 for phenoxyalcanoic and aromatic acids and 20 mg l -1 for chloroacetic acids. Potassium carbonate was added, together with the catalyst (18-crown-6) and the PFBBr. The concentrations of these different reagents will be studied and discussed in the following paragraphs. Then the glass reaction flask was connected to a micro-refrigerant (Wheaton-33). Several temperatures and reaction times were tested (Section 3.1). The sample was then evaporated in a gentle nitrogen stream and the derivatives were dissolved in 1 ml hexane before GC/ECD or GC/MS injection. The main disadvantage of this protocol is the presence of numerous impurities. Consequently, a purification step should be added to the procedure. It could consist in washing the derivatization medium, by adding 4 ml of ultrapure water with 1 ml of hexane. The mixture was shaken using a Vortex (Heidolf REAX 2000). The hexane extract can be also purified on a solid-phase silica cartridge (Bond Elut 100 mg; Merck, Darmstadt, Germany). The elution of the PFBBr derivatives was carried out by percolating a toluene/hexane solution (30/70, v/v) after rinsing with toluene/hexane (10/90). The elution yield of the derivatives was around 80%. The elimination of these time-consuming steps will be studied further.

BF 3 /methanol deri6atization

The reaction was performed in 2 ml of methanol by using different amounts of the BF 3 catalyst (Section 3.2). The concentrations of the studied acids were 800 mg l -1 for chloroacetic acids and 400 mg l -1 for the other compounds.

After derivatization (the temperature and the reaction time will be studied below), 2 ml of ultra-pure water were added and the esters formed were extracted by 1 ml hexane.

Chromatographic instrumentation

PFBBr derivatives were injected both in GC/ ECD and GC/MS, whereas methyl esters were only injected in GC/MS. GC/ECD: a Varian 3400 gas chromatograph was used, equipped with a 63 Ni electron-capture detector fixed at 300°C. One microliter of the extract containing the derivatives was injected in a split/splitless injector (splitless mode) fixed at 230°C. The GC column was a PTE-5 (Supelco, Bellefonte, PA), 30 m×0.32 mm I.D., thickness 0.25 mm. Nitrogen (U) was the carrier gas (flow rate 2.5 ml min -1 ). The GC oven was programmed from 80 to 220°C at 5°C min -1 .

GC/MS: a Varian 3400 chromatograph was used, equipped with a septum programmable in- jector Varian SPI 1093 and coupled with a thermostated transfer line with a mass spectrometric detector Varian saturn II [18]. The GC column was a DB-5 MS (J&W Scientific, Folsom, CA), 60 m × 0.25 mm I.D., thickness 0.25 mm. Helium (N60) was the carrier gas (flow rate 1.2 ml min -1 ). For PFBBr derivatives, the GC oven was fixed at 80°C for 2 min, then programmed from 80 to 250°C at 5°C min -1 , the final temperature being maintained for 19 min. For methyl ester analysis, the GC oven was fixed at 70°C for 10 min, then programmed from 70 to 250°C at 5°C min -1 , the final temperature being maintained for 2 min. The transfer line and ion source were maintained at 220 and 180°C, respectively. For PFBBr derivatives, the injector was programmed from 80 to 220°C at 200°C min -1 whereas for methyl esters, it was fixed at 80°C for 1 min and then programmed from 80 to 250°C at 100°C min -1 . The mass spectrometer was used in Electron Impact (EI) mode. EI mass spectra were obtained at an ionisation energy of 70 eV. Derivatives were qualified by specific ion mass spectrometry in full scan ionisation mode. The acquisition was performed from 40 to 349 amu at 1 scan per second. One microliter of extract was injected using a Varian 8200 CX autosampler.

0 772 b 1 Temperature (X 1 ) Reaction time (X 2 ) b 2 161 b 3 -339 BF 3 amount (X 3 ) b 12 6 Temperature/time (X 1 X 2 ) -169 b 13 Temperature/BF 3 (X 1 X 3 ) Time/BF 3 (X 2 X 3 ) b 23 -43 Temperature/time/BF 3 (X 1 X 2 X 3 ) b 123 -9

Experimental design

The influence of different parameters (or factors) and their interactions on the derivatization procedures were studied by using the experimental design methodology [START_REF] Sado | Les Plans d'Expe ´riences -De l'Expe ´rimentation a `l'Assurance Qualite ´[END_REF][START_REF] Pillet | Introduction aux Plans d'Expe ´riences par la Me ´thode Taguchi[END_REF].

For each derivatization procedure studied, a complete two-level factorial design 2 3 (three parameters) was applied. A complete factorial design consists in testing all the combinations of the levels of the different parameters and their interactions with the minimum of experimentation. Two levels, expressed as coded values (+1) and (-1), were defined for each parameter studied [START_REF] Sado | Les Plans d'Expe ´riences -De l'Expe ´rimentation a `l'Assurance Qualite ´[END_REF]. This leads to the determination of an experimental area involving eight (2 3 ) experimentations, which can be represented by an experimental matrix, where the coded values of the parameters are replaced by their real experimental values (Tables 1 and4). The parameters and their where n is the number of experiments (here, 8), and y k the response corresponding to the kth experiment.

To represent the response (y), a polynomial equation (Eq. ( 2)) can be proposed:

y= b 0 + % i b i X i + % ij b ij X i X j + … ( 2
)
b 0 is the average effect, X i the coded variable which corresponds to the factor i, and b i the effect of the factor i on the response y.

Generally, the values of the coefficients b do not allow to directly estimate if the considered factor has a significant effect on the response y. Therefore, a variance analysis was used. The basis hypothesis corresponds to a non-influence of the factor i. In this case, it can be demonstrated that the ratio F cal = (V i )/(V r ), where V i is the variance of the factor i and V r the residual variance follows the Snedecor law [START_REF] Sado | Les Plans d'Expe ´riences -De l'Expe ´rimentation a `l'Assurance Qualite ´[END_REF]. The residual variance V r represents the variance of a non-controled factor (experimental error), or the variance of a factor which has been not considered in the study (noise factor).

If the influence of the factor is significative (for a given confidence interval), the ratio F cal is higher than the value F tab(h,i) given by the Fisher-Snedecor tables. F tab was considered here with a confidence interval of 95%, h and i being the degrees of liberty of the considered factor and of the residue, respectively.

Results and discussion

PFBBr deri6atization

Elimination of interferents

The reagents and the reaction medium (organic solvent) were chosen from the literature. Chau and Terry [10] have shown that the amount of esters formed increases with the polarity of the solvent. Therefore, acetone is the most used due to its polarity and volatility which allows an easy evaporation before solvent change and GC injection [10,17,[START_REF] Johnson | [END_REF]. Methanol and other protic solvents are not suitable because they would not levels (which delimit the experimental area) were chosen from the literature.

The effects of the parameters and their interactions were evaluated on the average area of the chromatographic peaks (response). The effect of a factor i is represented by the coefficient b i , obtained by comparing the response values when the factor goes from (-1) to ( +1) (Eq. ( 1)). The interaction between the two factors i and j is expressed as the coefficient b ij,m (m = factor number). It should be considered when the effect of the first factor depends on the level of the second factor.

B ij = 1 n % k 9y k (1)
favor bimolecular nucleophilic substitution. Only one reference mentioned the use of ethanol [22].

The solvent where esters are redissolved is less polar than the derivatization solvent: benzene, hexane and isooctane [10,14]. Hexane is the most used and was hence chosen in this study.

A base was added to the derivatization mixture, leading to acid dissociation and reaction on the electrophilic carbon of the pentafluorobenzyl bromide. Several basis were tested [23], and it was shown that potassium carbonate (K 2 CO 3 ) is most suitable because it permits an easier derivatization of carboxylic acids. A catalyst is also involved in the procedure in order to enhance the nucleophilic substitution. The catalyst, generally 18-crown-6 [23,24], would allow the amount of PFBBr to be limited and consequently, the contribution of interfering products.

The protocol defined by Chau and Terry [10] is the basis of numerous studies related to the PF-BBr derivatization. The derivatization was performed in 4 ml acetone containing the different model compounds (1 mg l -1 each), K 2 CO 3 (2 g l -1 ), 18-crown-6 (0.5 g l -1 ) and PFBBr (125 mg l -1 ). The reaction was carried out at the ambient temperature over 5 h. After solvent evaporation and redissolution in hexane, the derivatives were injected in GC/ECD. However, this procedure induced a lot of interferents. This result is not surprising and confirms the observations previously mentioned in the literature about the problem of impurities. In the case where the responses of the target compounds are higher than those of impurities, a dilution of the extract can simplify the chromatogram. A purification procedure was however envisaged. A water rinse was first performed (Section 2.3). An improvement in the elimination of interferent was observed, but the dilution of the extract (100 times) was still necessary. Moreover, this procedure was not reproducible (RSD= 130% for four experimentations) and the detection limit after dilution was not satisfactory for trace analysis (around 500 mg l -1 for 2,4-D). A solid-phase purification was therefore tested (Section 2.3), but the dilution step remains necessary to reduce the contribution of interfering peaks on the chromatogram.

Another possibility consisted in decreasing the amount of reagents. Indeed, Fogelqvist [25] noted an increasing of the baseline noise due to an excessive quantity of 18-crown-6. But the same derivatization yield can be observed by using smaller concentrations of catalyst [23,25]. The quantity of the derivatization reagents was therefore decreased in order to reduce impurities. This procedure was hence carried out until the areas of the target compounds started to diminish so as not to decrease sensitivity. In these conditions, the purity of the extract did not require any further purification or dilution before GC/ECD injection. The composition of the reaction mixture was as follows: 2 ml acetone containing the acidic compounds, K 2 CO 3 (50 mg l -1 ), 18-crown-6 (10 mg l -1 ) and PFBBr (125 mg l -1 ).

Experimental design

This study was performed by using the previously described derivatization procedure. The following parameters (factors) were tested: PFBBr concentration, temperature and reaction time. Earlier works mentioned very different experimental conditions: the temperature varies according to a wide scale (ambient or 70°C with controled reflux) and the reaction time ranged from 30 min and 5 h [10,24]. These values were hence retained as the levels (-1) and (+ 1) for the temperature and time factors. PFBBr was studied in a concentration range where the interferents did not create very much baseline noise. However, the reagent was introduced in excess compared to the total concentration of acids (100 times higher). The response measured is the average area of the chromatographic peaks obtained after injection of the derivatives in GC/ECD. These areas were corrected by using an internal standard (Section 2.2).

The experimental matrix of the complete factorial design studied is described in Table 1.

The response (y) only concerns the aromatic acids and chlorophenoxyalcanoic acids. Chloroacetic acids were not identified according to the experimental conditions applied here.

The values calculated for the effect of the factors and their interactions are described in Table 2.

The following polynomial equation can be therefore proposed (Eq. ( 3)):

y = 21790+ 3493X 1 -2807X 2 +14106X 3 -10434X 1 X 2 +2392X 1 X 3 -3146X 2 X 3 -5172X 1 X 2 X 3 (3)
This model was therefore not acceptable because the predicted values did not match experimental results (difference around 250%).

The significations of the factors and their interactions after comparison of the F cal values with F tab are presented in Fig. 1.

The effects of the interactions X 1 X 3 and X 2 X 3 are smaller than those of the other interactions. Therefore, they were not considered in the variance calculation [START_REF] Sado | Les Plans d'Expe ´riences -De l'Expe ´rimentation a `l'Assurance Qualite ´[END_REF]. In this case, F tab1,2 = 18.51 and the residue is 4%. This latter shows that all the factors supposed to have an influence on the derivatization were considered.

The derivatization efficiency increases with the PFBBr concentration which is the most significant factor. However, this concentration could not be further increased because of the possibility of increasing interfering by-products. The 'temperature/time' interaction is quite significant and shows that good results are obtained by applying short reaction time at 70°C, or long reaction time at the ambient temperature. Indeed, it is possible that a long derivatization time at 70°C leads to the degradation of the pentafluorobenzyl esters.

The best result is obtained for a reaction with 250 mg l -1 of PFBBr at 70°C over 30 min. A good response is also observed for a derivatization at the ambient temperature during 5 h (Fig. 2). According to the increasing of interfering products when the reaction mixture is heated (Fig. 3), it would be preferable to perform the derivatization at the ambient temperature over 5 h.

Compared to the conditions generally used, which are based on the protocol performed by Agemian and Chau [14], the K 2 CO 3 concentra-tion was reduced ten times and the catalyst concentration was diminished from 0.5 g l -1 to 10 mg l -1 . This allows the derivatives to be analyzed without a further purification step. According to the results of the experimental design, the best conditions were achieved for a PFBBr concentration of 250 mg l -1 . This is twice as high than the concentration generally cited in the literature [10,14,17]. However, the temperature and derivatization time (5 h at ambient temperature) were found as previously defined by several authors [10,14,24].

The reproducibility calculated for five experiments corresponding to these conditions is 13%. Good sensitivity and detection limits were obtained in GC/ECD (1-4 mg l -1 ). These are of the same order as those obtained by Hajslova et al. [11], but in our case, no further purification was used. The detection limits are also considerably lower than those achieved by Gurka et al. (10 mg l -1 ) [17] and Agemian and Chau (100 mg l -1 ) [14]. However, chloroacetic acids were not detected. This could be explained by a co-elution of these compounds with the solvent or with interfering by-products because chloroacetic acids were unambiguously identified by GC/MS, using mass spectra available from the literature [10,26,27] (pentafluorobenzyl esters are not listed in mass spectra library). The specific ion m/z 181 also helps to make the identification easier. The sensitivity of GC/MS is not very satisfactory however (40 mg l -1 to 1 mg l -1 ), and is not appropriate for trace analysis in water. Therefore, another derivatization method was studied.

The detection limits in GC/ECD and GC/MS are given in Table 3, together with the characteristic m/z ions used for the ester derivative identification.

It can be noticed that only the average area of all the acids was determined. Thus the chosen conditions are optimized for most acids but not necessarily for some of the individual ones. This could explain the high detection limit for the PFBB derivative of trichloroacetic acid. In this case, the yield for the PFBBr and trichloroacetic acid reaction may be low under the conditions optimized for phenoxyalkanoic acids.

BF 3 /methanol deri6atization

The BF 3 /methanol derivatization does not need, a priori, any purification step before injection in GC [28 -30], but in order to increase the partition coefficient during hexane extraction of the esters, it is necessary to add water to the derivatization mixture [28].

A two-level experimental design similar to that described for PFBBr derivatization was carried out. Three factors likely to have an effect on the derivation efficiency were studied: catalyst amount (BF 3 ), temperature and reaction time. The response 'y' studied was the average area of the chromatographic peaks obtained by GC/MS (Total Ionic Current). The parameter levels were chosen from the literature [11,[START_REF] Horner | [END_REF]28,31].

The experimental matrix of the complete factorial design is described in Table 4.

The values calculated for the effect of the factors and their interactions are described in Table 5.

The following polynomial equation can be therefore proposed (Eq. ( 4)):

y=2704+ 772X 1 +161X 2 -339X 3 +6X 1 X 2 -169X 1 X 3 -43X 2 X 3 -9X 1 X 2 X 3 (4)
This relationship was verified at the center of the experimental area (65 min reaction at 45°C and with 30% BF 3 in methanol). According to these operating conditions, the predicted value matched the experimental response well: the difference is 7.8%. This value is of the same order as the reproducibility (7%) calculated for five experiments carried out at the center of the experimental area. The linearity of the response was also verified with another point (60 min reaction at 40°C with 15% BF 3 ). The proposed linear model can therefore be validated and the response can be predicted without any further experimentation within the experimental area limits.

The significations of the factors and their interactions after comparison of the F cal values with F tab are presented in Fig. 4.

The interactions X 1 X 2 and X 1 X 2 X 3 were not considered in the variance calculation because the corresponding coefficients (b 12 and b 123 ) were negligible (Table 5). Therefore, according to the PF-BBr derivatization, F tab1,2 = 18.51 [START_REF] Sado | Les Plans d'Expe ´riences -De l'Expe ´rimentation a `l'Assurance Qualite ´[END_REF]. The residue value corresponding to the non-explained variance is 0.01%. This result is satisfactory and shows the correct choice of the influential parameters.

The three considered factors under consideration and two interactions concerning the catalyst content are significant. It appears that the influence of the catalyst content is negative, especially when the temperature and the reaction time are maxima. It can be therefore pointed out that the absence of catalyst leads to a decrease of the peak areas (30%). It is hence necessary to use BF 3 , but at low content.

The maximum average of peak areas was obtained for a 2-h derivatization at 70°C with 10% BF 3 in methanol. These conditions correspond to those stated in the literature [11,[START_REF] Horner | [END_REF], i.e. a small concentration of BF 3 (around 10%) and a derivatization temperature of 70°C. However, the factorial design indicated that better results were achieved with a 2-h reaction, whereas in the literature, shorter times were used (10-20 min) [11,[START_REF] Horner | [END_REF]. The detection limits obtained after injection in GC/MS are of the order of 1 mg l -1 , and vary between 1 and 10 mg l -1 , for chlorophenoxyalkanoic and chloroacetic acids, respectively. Considering herbicides, the detection limits are 5-50 times lower than those established by Hajslova et al. [11]. These limits are therefore very low and permit this procedure to be applied to trace analysis in water after a preconcentration step. A procedure has been developed in our laboratory and will be published elsewhere. It consists of a solidphase preconcentration using a non-specific extraction followed by a specific ion-exchange reconcentration of the acids. After methanolic elution, the compounds are directly methylated by adding BF 3 in the elution solvent. The detection limits thus obtained in GC/MS ranged from 20 ng l -1 for phenoxyalkanoic acids and 80 ng l -1 for chloroacetic acids. These values are in good agreement with European pesticide regulations for drinking water (100 ng l -1 ).

The detection limits in GC/MS are given in Table 6, together with the characteristic m/z ions used for the identification of the ester derivatives.

As examples, GC/MS chromatograms of dichloroacetic acid-and 2,4-D-methyl esters are presented in Fig. 5.

Conclusion

Two derivatization procedures were compared in order to find the best compromise for trace GC analysis of organic acids. Chloroacetic and phenoxyalcanoic acids were studied simultaneously, ensuring that procedures were applicable to the main acidic micropollutants found in drinking water.

A two-level factorial design enabled us to check the influence of derivatization parameters such as temperature, reaction time and reagent content, and contributed to an improval in reaction efficiency.

This work has shown that GC/ECD analysis of PFBBr derivatives is possible without any purification step. The sensitivity obtained is suitable for trace analysis. However, chloroacetic acids were not analyzed although they were detected in GC/ MS. Moreover, the application of this method to natural samples could be limited because of the presence of numerous interfering by-products. Pentafluorobenzyl bromide derivatization is also not really specific to organic acids. Indeed, phenolic compounds may be derivatized by this procedure, and their derivatives could be co-eluted with those of the acidic compounds. GC/MS analysis permits the identification of all the acids studied but it is not sensitive enough for trace analysis. BF 3 /methanol derivatization is easier to perform and does not induce interfering by-products. The derivatives are also easily identified by GC/ MS according to their mass spectra which are available in the software library, on the contrary of PFBBr derivatives. Moreover, this methodology does not require any evaporation step and hence, does not induce any compound losses.

In conclusion, BF 3 /methanol appears to be a suitable method for GC/MS analysis of carboxylic acids. The low detection limits (1 mg l -1 ) and the satisfactory reproducibility (7%) make this method suitable trace analysis in water after a preconcentration for step.

Fig. 1 .

 1 Fig. 1. PFBBr derivatization. Signification of the different factors studied and their interactions.

Fig. 2 .

 2 Fig. 2. GC/ECD chromatogram of PFBBr de ´rivatives (5 h at ambient temperature). 1. benzoic acid; 2. 2-chlorobenzoic acid; 3. MCPP; 4. MCPA; 5. 2,4-DP; 6. 2,4-D; 7. 2,4,5-T. (Detector: attenuation 2; sensitivity 10).

Fig. 3 .

 3 Fig. 3. GC/ECD chromatogram of PFBBr de ´rivatives (10 min at 70°C). 1. benzoic acid; 2. 2-chlorobenzoic acid; 3. MCPP; 4. MCPA; 5. 2,4-DP; 6. 2,4-D; 7. 2,4,5-T. (Detector: attenuation 2; sensitivity 10).

Fig. 4 .

 4 Fig. 4. BF 3 /methanol derivatization. Signification of the different factors studied and their interactions.

Fig. 5 .

 5 Fig. 5. GC/MS chromatograms of dichloroacetic acid methyl ester (500 mg l -1 ) and 2,4-D methyl ester (40 mg l -1 ) (as specific m/z ions).

Table 1

 1 PFBBr derivatization: experimental matrix and response (y)

	Reaction time (h)	y (A.U.) a

Table 2

 2

	PFBBr derivatization: effect of the factors and interactions on
	the response (y)
	Factor/interaction	Effect
		Designation	Value
	Average	b 0

Table 3

 3 Detection limits of PFBBr derivatives in GC/ECD and GC/MS m/z ions L.D. GC/ECD (mg l -1 ) tr (min) (GC/MS) L.D. GC/MS (mg l -1 ) Compounds

	22.0	48-83-181

a A.U.: Area Unit.

Table 5 BF 3

 53

	/methanol derivatization: effect of factors and interactions
	on the response (y)
	Factor/interaction	Effect
		Designation	Value
	Average	b	2704

Table 6

 6

	Detection limits of methyl ester derivatives in GC/MS
	Compounds	L.D. (mg l -1 )	tr (min)	m/z ions
	Dichloroacetic	6.8	9.2	59-83-85
	acid
	Trichloroacetic	3.0	12.7	59-82-117
	acid
	Benzoic acid	0.6	21.7	77-105-136
	2-Chloroben-	0.8	27.5	111-139-170
	zoic acid
	MCPP	0.8	36.0	142-169-228
	MCPA	1.3	36.4	77-141-214
	2,4-DP	1.6	37.7	162-189-248
	2,4-D	1.8	38.0	111-199-234
	2,4,5-T	2.1	41.8	233-235-268