Uncertainty-Aware Trading of Congestion and Imbalance Mitigation Services for Multi-DSO Local Flexibility Markets

The design of Local Flexibility Markets (LFMs) for energy and reserve dispatch of Renewable Distributed Energy Resources (RDERs) has recently been a topic of wide research. However, in an scenario with high penetration of RDERs deployed among different Distribution System Operators (DSOs) jurisdictions, further operational requirements concerning congestion and imbalance mitigation services may lay down. In this context, the relationship between capacity and energy products and the uncertainty management scheme becomes essential for procuring of RDERs flexibility. This paper proposes an uncertainty-aware Multi-DSO LFM. This market setting uses flexibility products to mitigate congestions and imbalances among different DSOs. First, capacity products hold back the flexibility of the RDERs in anticipation of contingencies. Then, energy products are activated within each time slot if the event finally occurs. LFM is solved in a coordinated and decentralised fashion using the properties of the Alternating Direction Method of Multipliers (ADMM), preserving participants' privacy. Uncertainty of RDERs and energy events duration are modelled using chance-constraint linear optimisation. The proposed methodology has been tested in a case study based on a realistic dataset and radial distribution systems.

Complex voltage of node i at time period t (V, rad).p i,j,t , q i,j,t Active and reactive power flow through line (i, j) at time period t (kW, kVAr).p c a,t , p e a,t Power of agent a after capacity market clearing c and after energy asks e (kW).soc s,t SOC of BESS s in time period t (kWh).
Functions P{X ≤ ξ} Probability of the uncertain parameter X being lower or equal than ξ.φ − X (•) ICDF of uncertain parameter X.

I. INTRODUCTION
T HE ever-increasing penetration of Renewable Distributed Energy Resources (RDERs) is motivating a profound change in the operation of energy markets.With the long-term objective of becoming the first climate-neutral continent by 2050, Europe aspires to have 32% of its final energy consumption from Renewable Energys (REs) by 2030 [1].Medium and small scale Distributed Generation (DG) can be pivotal in the decarbonisation of electrical energy systems.Nevertheless, those assets do not have easy access to traditional wholesale market structures.To fill this gap, Local Flexibility Markets (LFMs) promote the participation of these medium to small scale assets.At the same time, uncertainty associated to RDERs operation introduce further operational complexities.Deviations from forecast estimates, may lead to congestions and imbalances when the real time approaches [2], [3].Traditionally, those contingencies are managed in intra-day and balancing markets, following the top-down approach.Despite that, as the adoption of the Local Energy Markets (LEMs) progresses [4], such local issues could be directly managed from a local perspective, without involving upstream resources and agents [5].In this scenario, trading opportunities arise, especially when using RDERs flexibility [6].
LEMs have been object of wide discussion in the literature [7].They serve as a tool for energy dispatch in local energy communities [8], microgrids [9], or even for creating a pool for scheduling the charging of electric vehicles [10].Other works investigate hierarchical RDERs structures for balancing services [11] or transactive energy markets structures from a game-theoretic point of view [12].The figure of the Distribution System Operator (DSO) oversees that the clearing of those LEMs dot not compromise the integrity of network elements [13].Several market designs for RDERs have been examined in the literature.Incentive mechanisms for energy and reserve trading among areas [14] and peers [15] were proposed.Decentralised markets for energy communities [8] and microgrids [9] have been also investigated.Within this context, little attention has been paid to the provision of congestion and imbalance mitigation services among multiple DSOs.Flexibility trading among those market players is important as LFMs are an effective platform to boost the integration of RDERs while meeting the growing demand for energy of modern distribution systems It is reasonable to assume that the provision of congestion and mitigation services needs both capacity and energy products to effectively accommodate RDERs.The integration of both products allows DSOs to hold back the flexibility of the participating agents in case of a foreseeable event, and activate it in the form of energy only when it is needed [16].Capacity and energy products are linked through the duration of the event for secondary frequency regulation markets, where the capacity is firstly cleared and then agents are activated to respond against an energy event [17].However, there are few works that acknowledge the importance of this link as those products are usually cleared in separated markets [18].Nevertheless, this activation has been modelled through a hierarchical model in [19] for energy communities and in [20] for generators under uncertainty.Authors in [21] propose a formulation that ensures the availability of the reserve capacity offered by Battery Energy Storage Systems (BESSs) under uncertainty, investigating the impact of the activation of the products.Several methodologies are proposed to deal with the uncertainty of the activation, scenario generation [22], which came at a high computational cost, or even ensuring energy for all the activation for the worst-case scenario [23].A detailed description of this link through the duration of the events is explained in [24] where the uncertainty distribution of the activation of the products is integrated in a framework for the operation of BESSs.This fact, along with the integration of the uncertainties, allows DSOs to, not only protect themselves against contingencies, but also study how the reliability level impacts on the clearing solution.Those effects are barely described in the literature, and they play a fundamental role in the integration of DGs.
In order to do so, the uncertainty associated to RDERs must be further analysed and introduced in the problem formulation.To model those events, Monte-Carlo [25] and robust optimization [26], [27] techniques are proposed in the literature, but the output of the optimization problem may vary depending on the scenario selection.Other works study the Chance Constraints (CCs)' method to provide consistent solutions for a given level of reliability [15].This approach is one of the most popular methodologies [28], [29], [30] when dealing with uncertainty of a wide set of actors due to the fact that their Probability Density Functions (PDFs) can be assimilated to well-established distributions functions [31].Nevertheless, the above works formulate uncertainty only for energy and reserve dispatch of RDERs and do not take into account the integration of capacity products for congestion and imbalance mitigation services provision, nor the duration of energy events.The uncertainty modelling gives insights about the future outcomes and it also enables DSOs to study what could happen for a determined level of reliability [8].
The regulatory design of local markets and its decentralisation are still an active research topic [32], [33].Although, efforts were made in this sense over the last several years, further concerns about coordination may arise in a LFM that encompass several DSOs [34].Several methodologies to coordinate coupling constraints among systems have been studied, which can be arranged The authors in [35] simulated the behaviour of each agent by solving an individual optimization, while the authors in [36] present an auction where the energy is traded for small-scale consumers.These techniques can represent all market participants, but at a high computational cost and with the risk of auction price spikes.Metaheuristic methods such as Particle Swarm Optimization (PSO), are well suited for large-scale optimisation [37], while Reinforcement Learning (RL) techniques can even deal with partial observability of the data [38], but they cannot guarantee the optimal solution.To overcome this, optimisation-based techniques such as Augmented Lagrangian and KKTs condition decomposition can achieve the optimal dispatch of the market.Optimality Conditions Decomposition (OCD) has been used in [32] to solve cross-border electricity trading, but this technique is limited to one single subproblem.Analytical Target Cascading (ATC) is used if there are multiple subproblems [39], but it is limited to leader-follower problems.Then Proximal Message Passing (PMP) [40] can be used to coordinate the solution of distributed markets in a parallel fashion for any coordination problem but requires a higher number of iterations compared with Alternating Direction Method of Multipliers (ADMM) technique.Standard ADMM coordinate power dispatch solutions among energy communities [8] and power plants with carbon markets [34].Operation of networked microgrids [41] and peer-to-peer markets [15], [42] have been coordinated based on consensus decomposition.Those decentralised methodologies are mostly oriented for energy dispatch applications.Coordination among DSOs has been barely studied in the literature when trading flexibility to mitigate congestions and imbalances.Authors in [43] highlight the importance of DSO-TSO coordination for congestion mitigation.Blockchain technology for coordination among DSOs is analysed in [44].However, decentralisation of CCs among different DSOs has not been extensively studied.
This paper shows that an uncertainty-aware LFM which trades capacity and energy products can be cleared in a decentralised setting, reaching the same solution that the centralised clearing formulation achieves.In light of these gaps in knowledge, this paper builds its contributions as follows: C1. Modelling of a Multi-DSO LFM for the trading of capacity and energy products.There are few works that address the modelling of LFM involving different jurisdictions while mitigating contingencies.Congestions and imbalances mitigation using Multi-DSO LFMs is a topic not well addressed that may arise concerns in future distribution networks.C2.Analysis of the uncertainty ligated to RDERs and duration of energy events using CCs.Handling uncertainty of RDERs is of vital importance when considering the local market clearing in distribution networks.
CC modelling captures the knowledge DSOs have about the contingency, as well as, it enables to analyse the impact that different levels of uncertainty have on the market solution.C3.Coordination and decentralisation of the uncertainty aware Multi-DSO LFM.On a context of increasing concerns about privacy, this work sheds light on the coordinated and decentralised trade of capacity and energy products among DSOs under uncertainty for contingency mitigation while preserving privacy of participating agents.CCs have been coordinated among areas using the Inverse Cumulative Density Function (ICDF) of real data.This setting enables to model the activation of energy products, which is a topic not well addressed in the literature.In this work, a decentralised market clearing mechanism is proposed using an adaptive-ADMM algorithm.Forecast deviations are fitted to a Versatile distribution [31] and the duration of the energy events are fitted to an exponential distribution [17].Results of the case study illustrate that the coordination of the decentralised clearing is driven by economic and electric signals that physically appear at interconnections.
The paper is organised as follows.Sections II and III present the context and the decentralised clearing problem formulation for the Multi-DSO LFM analysing the uncertainty associated to the problem.Results from a case study based on SimBench dataset and a realistic distribution network are depicted in Section IV.Lastly, Section V concludes the paper.

II. PROBLEM FORMULATION
An overview of the different stages of a LFM clearing mechanism between two DSOs is depicted in Fig. 1.When the DSO A identifies a congestion or an imbalance, it asks the Local Market Operator (LMO) to organise a LFM.Flexibility of the RDERs are obtained after a forecast and a subsequent analysis of those results.Then, each RDER submits its bid to the market through the DSO.The capacity market is then cleared using a iterative process, being the LMO responsible for market coordination.LMO receives asks and bids x A,k , x B,k from both DSOs and it responds with an update of the price signals (λ k ).When convergence is reached, results are disseminated among areas and energy products of RDERs are activated only in case they are needed.LMO and DSO B surveillance the market.

A. Modelling of RDERs Agents
In this section, the market participants are modelled.Three different types of RDERs are included in the formulation: Flexible Loads (FLs), Flexible Generators (FGs) and BESSs.
Let P sch f,t be the forecast power demand of the FL f at time period t.These agents provide flexibility by means of varying its demand level after market clearing p c f,t , within a lower and upper bound P f ≤ p f,t ≤ P f .Their participation in the capacity market with upward ν u f,t and downward ν d f,t products leads to, The power demand of the FLs after the energy products activation is, Those flexibility products are constrained by upper and lower bounds of consumption.Then, ν u f,t ≤ P f − P sch f,t and ν d f,t ≤ P sch f,t − P f for all FL f and time period t.After the capacity clearing, the DSO may request a determined quantity of energy product Δt. Flexibility bids are calculated as linear functions of the volume traded [33] in ( 3) and ( 4).Costs S c,u f,t , S c,d f,t , S e,u f,t , and S e,d f,t differentiate each product and are defined unilaterally by agents.Thus, those bids internalise agent costs for providing flexibility.This approach is widely employed in literature when defining markets bids [7].
DG in distribution networks usually encompass technologies such as PV, wind, biomass or small-hydro [25].Thus, FG g participates in the capacity market with upward ν u g,t and downward ν d g,t products.Let P sch g,t be the forecast generation, which can be modified by the trading as, Moreover, the generated power of FG g after the activation of the energy products is, Similarly, trading is restricted by upper and lower bounds of generation P g ≤ p c g,t ≤ P g .Thus, ν u g,t ≤ P g − P sch g,t and ν d g,t ≤ P sch g,t − P g .Energy and capacity products are related considering that ω g,t ≤ ν g,t Δt, for upward u and downward d products.Bids are calculated as linear functions of products traded [33] BESSs in distribution systems are being operated for diverse purposes, such as energy arbitrage, surplus storage or peakshaving [18], [45].Let P sch s,t be the power of the battery s in its .Additionally, SOC restrictions ( 13) and ( 14) must be considered when offering capacity products.Energy and capacity products are related such as ω s,t ≤ ν s,t Δt.
Bids for BESSs products are linear functions [33] of the flexibility traded quantity as,

B. Network Modelling
The power flow through distribution networks is governed by the difference in voltage magnitude and in voltage phase angle.Considering only active power flow to this matter could lead to optimistic estimations of the state of the branch, which could result in the market not being activated when the real thermal limit of the line is violated.To solve this, second order cone relaxation of the power flow of the grid are used [11], [26].However, they are not valid if reverse power flows may appear due to a high share of distributed PV, as expected in future distribution networks [46].Thus, the lineal and state-independent model is needed to model the power flow equations as in [47].Active and reactive node balances are considered in ( 17) and ( 18) Power flow through branches and thermal branch limit are determined as follows,

C. Market Constraints
Energy products are activated within shorter time windows than capacity products.Let ϕ t be the duration of the energy event in time period t, so that ϕ t ∈ [0, Δt).In addition to that, in order to maintain the market working in a local environment, the imbalance imb t is calculated as the overall difference before and after the market must remain zero, as Prices of the energy λ e t and capacity λ c t are the dual variables of imbalance equations ( 24) and ( 25) [33].

D. Complex Bids Formats
Until this point, a linear bidding strategy is used to model the participation of the agent in the market.Although this assumption is extended, real world markets can also accept complex bidding formats which represent costs more precisely [48].Let R a,t be the ratio which describes the willingness to change the power output of the agents.Then, the bids are described as follows for all agent a and time period t, In addition to this, complex bidding formats may also include the degradation of the BESSs.The degradation of the battery is driven by non-linear physics laws.Nevertheless, the authors in [49] model the degradation phenomena as a semi-definite function of the SOC soc s,t and the power output p s,t , as follows, ]∀s, ∀t (28) where K is the degradation cost, B s is the capacity of the BESS s and a, b, c and, d are per-unit costs scalars.These complex bidding formats are included in the objective function of the problem, maintaining the convexity of the problem.Thus, the existence and uniqueness of the solution is granted.

E. Objective of the Market Clearing Mechanism
The objective of the market clearing mechanism is a joint minimization of the capacity and energy products bids traded, as follows, Minimization of the costs for the bids of the participating agents would lead to minimum flexibility procuring costs [8].

A. Modelling Uncertainty of RE Sources
The forehand LFM optimization problem has several uncertainty sources.The first one is associated to the forecast of RDERs.Inspired by [15], Versatile distribution is used to model the distribution of the forecast uncertainty.A pictorial example of this method is presented in Fig. 2. Uncertainty sets are generated using ARIMA models for FLs and FGs [50].The ICDF is described as, where β 1 , β 2 , and β 3 are fitted to quantile functions using non-linear least-square fitting method.

B. Modelling Uncertainty of Energy Events
The second uncertainty source is related with the duration of the balancing events ϕ t .We assume that only one balancing event can occur in each time slot t, and that those events are independent of each other [19].These system-wide events are strongly related with frequency, which duration follows an exponential distribution function ϕ t ∼ exp(λ), as depicted in Fig. 3 [17].Notwithstanding the foregoing, this methodology is fully compatible with whichever distribution function is selected.The rate λ has been fitted using least squares method with real data from Portugal during 2021 [51].An R 2 score of 98.52% was obtained using this method.

C. Chance Constraints Formulation
Considering the previously described uncertainty sources, CCs are defined to introduce the uncertainty component into the market clearing formulation.In the case of the RDERs, once the forecast is determined, their uncertainty can be also obtained as the ICDF are analytical and known.The actual bounds of the after market power (1) and ( 5) are redefined using CCs, Equation ( 31) ensure that each agent a is able to meet with its power limits when participating in the market, for a given value of the uncertainty level α a .Following this reasoning, forecast uncertainty also affects to the bidding limits for the different products of the market.Then, Similarly, equations ( 22) and ( 23), must consider the uncertain behaviour of the duration of energy events.They are reformulated as CCs as, The uncertainty level α p models the expected duration of the events, and the energy that is needed.Lower values of α p lead to higher costs, but also higher level of reliability in the operation.In this case, the physical meaning of the uncertainty value α p represents the knowledge DSO p has about the duration of the event.This fact enables the model to capture situations such as the DSO underestimating the duration of the event (α p low), and needing to increase its capacity products acquisitions.
CCs (31) is solved following the procedure explained in Annex A, as, Similarly, CCs (32) to (33) are, The physical meaning of the uncertainty value α a represents how confident are RDERs in the forecast output when they participate in the LFM.Higher values of α a would lead to Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.wider bounds of operation, maximizing flexibility at the cost of assuming higher risk.Then, CCs (34) and ( 35) are,

D. Decentralised Negotiation Mechanism
The Multi-DSO LFM is cleared in a decentralised setting using an adaptive ADMM technique [52].The coordination scheme for a three-DSO setting is depicted in Fig. 4.
After solving their respective sub-problems, each DSO sends an update of the complicating variables (x p,k ) to the LMO.Vector x p,k contains information about volume of products traded in each area p at iteration k, i.e., ene u,p,k t , cap d,p,k t , cap u,p,k t , cap d,p,k t , imbalance those products generates imb u,p,k t , imb d,p,k t and voltage magnitude and phase angle at interface v p,k i,t , θ p,k i,t .Then, the LMO sends back an updated value of the dual variables (λ k ) and the penalty factor (γ k ).The algorithm continues iterating until an agreement in prices is reached, when the residuals of the solution are lower than a threshold level ε.To solve the problem in a decentralised setting, coupling constraints must be separated and decomposed.This separation of the coupling constraints is based on the network and market magnitudes that appear at the interface.
Let p ∈ Ω p be the set of DSOs participating in the market.Fig. 5 depicts how coordination is done at the interface.Coupling constraint ( 39) is decomposed as follows, Same procedure can be applied for (39).Imbalance constraints ( 24) and ( 25) are decomposed computing the imbalance internally within each area.Then, Network model also define coupling constraints among DSOs.Let branch (i, j) be the power branch connecting the two DSOs as Fig. 5(a) shows, each area duplicates the other's node variables as Fig. 5(b) and 5(c) shows.Coupling variables related to power flow are duplicated at the interface.Voltage magnitude v i,t and v j,t and voltage phase angle θ i,t and θ j,t are duplicated.Thus, After this coordination protocol, the problem became separable, and can be decomposed into several sub-problems, one for each DSO, using the Augmented Lagrangian as objective.The sub-problem for a single DSO is, 1)-( 21), ( 36)-( 38) where vectors λ k t , m A,k t are defined as follows for every time period t in Ω t , After all DSOs complete their inner iteration, primal r k 2 and dual s k 2 residuals are updated.Convergence is achieved if and only if max{ r k 2 , s k 2 } < ε.If that is not the case, multipliers λ k t and the penalty factor γ k are updated for the next iteration.This is done by approximating the dual problem using the subgradient rule, as Annex B presents.

E. Desirable Market Properties
When developing LFM algorithms, it is of major importance to analyse the four desirable properties that a market could have: market efficiency, revenue adequacy, incentive compatibility and cost recovery.
1) Market efficiency is ensured when the final outcome of the decentralised algorithm ensures the optimality of the clearing solution.After convergence, residuals of each sub-problem falls below ε.Thus, m p,k t → 0 and the optimal cost of the agent a of each area p, c p a,t * is defined by, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Then, total costs of all areas p ∈ Ω p is equal to the result of the centralised clearing problem as follows, Which proves the optimality of the decentralised solution.Thus, market efficiency is ensured.2) Incentive compatibility is granted when the dominant strategy is to bid according to the true preferences of the agents.However, in marginalism markets strategic behaviour of the agents may affect the solution.This could be controlled with policies that ensure if any participant is unable to offer what has been previously settled in the market, and obtained an unfair revenue for this behaviour, it will be penalised.3) Revenue adequacy refers to the condition of the LMO never incurring into financial deficit.Two different products are traded in this market at marginal prices λ e t and λ c t .As they are linked to equations ( 24) and ( 25), exporting DSOs with imb p t ≤ 0 will receive revenues at prices λ t while importing DSOs with imb p t ≥ 0 will issue payments.Then, due to the fact that, p∈Ω p imb p t = 0, the market is budget balanced and the LMO does not incur into financial deficit nor profit.4) Cost recovery of the operational costs of the participation in the market is granted as no DSO is forced to participate in the market at a loss.Cost functions of the agents are linear functions crossing the origin of the products c a,t = f (ω a,t , ν a,t ) which ensure that f (0, 0) = 0.Then, negative profits are avoidable, and cost recovery is granted.The market hereby proposed fulfills three out of four market properties.However, due to the impossibility theorem of Hurwicz [53], no market mechanism is capable of ensuring all properties at the same time.

IV. CASE STUDY AND SIMULATION RESULTS
This case study is based on the radial network 201_3 [54].Data of consumption and generation of different agents are obtained from SimBench dataset [55].Fig. 6 depicts the network used for this case study.42 Static Loads (SLs), 15 FLs, 42 FGs and 12 BESSs are connected to the grid distributed over

A. Impact of the Reactive Power Modelling in the Market Solution
Voltage magnitude and voltage phase angle plays a fundamental role in distribution systems when computing the power flow.DC modelling of the grid neglects voltage magnitude, which can lead to an underestimation of the power flow.For that reason, the model proposed in [47] is used.In this point, it is possible to run the LFM without considering the reactive power flow.However, it has great influence in determining if a line is congested or not due to (21).An example of the different estimations of the power flow through branch 126-127 in the case study is depicted in Fig. 7.
As Fig. 7 shows, both the reactive power flow and the voltage magnitude modelling are of overly importance to determine if a congestion occurs, and thus, if the market is activated.

B. Comparison of the Linear and Complex Bid Models
To model the willingness of the agent a to change their power output, the ratio R a,t is introduced as a quadratic term Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.26) and ( 27).This ratio is a thousand times lower than the bid cost S a,t [48].Besides, degradation costs are described following (28), considering the degradation cost K as 400 €/kWh, and scalars a = 0.37, b = 0.42 (kW) −2 , c = 0.0065 (kW) −1 , d = 0.006 (kW) −2 [49].The solution of the LFM under both bid models are compared in Table II Costs for the flexibility procurement increase between 0.98% and 2.46% depending on the type of agent.On the other hand, products quantities are reduced between 2.11% and 0.64%.

C. Incentivizing RE DG Participation
To verify that the LFM design fulfils the previously settled objectives, several simulations are considered.Simulations are carried out assuming uncertainty levels α p of 10%, 5% and 2% and with DG share of 45%, 60%, 75% and 85%, when solving a congestion of 75 kVA in the beginning of the feeder (line 126-127).Uncertainty level α a is equal to 5% for all agents.Branch selection responds to the worst-case scenario for the participation of RDERs.Area B is forced to reduce its demand or increase its generation to solve the issue.This congestion forces FGs to provide upward flexibility products which is difficult for RDERs.
Results are shown in Table IV, analysing the impact of the DG in the reliability of the solution, the total costs, the volume of the products traded and the mean duration of the events.Reliability is calculated as the joint probability that all CCs are fulfilled for a given time period t.DG share has positive impact on the minimum reliability of the stochastic solution due to a reduction in the duration and the magnitudes of the events, as the last row of Table IV shows.Volume of energy and capacity products traded in the market give a sense of the magnitude of the congestions that appears in the grid for a given DG share.The magnitude of those events and costs for solving them are reduced as the DG share increase, but if the share is over 75%, volume and costs of products traded start increasing again, because of the impact of the stochasticity in the clearing.Nevertheless, the expected duration of those events is reduced as the DG share increases no matter the knowledge DSO has of the contingency, i.e., α p is 10% or 2%.

D. Impact of the Uncertainty Level
Following the same case study of a congestion of 75 kVA in line 126-127, the impact the uncertainty has on the solution is analysed in this section.Fig. 8 presents the power flow through that line in each case.However, power flow scheduled after energy trading varies depending on the level of uncertainty α p .Power flow scheduled after capacity market do not get affected by the change in uncertainty level, however, it does affect to the volume of flexibility products and their costs.
Volume of products traded in the market also changes with the uncertainty level α p as Fig. 9 shows.For a DG share of 60%, the volume of capacity products decreases from 289.53 kW (α p = 10%) to 203.65 kW (α p = 2%).As the magnitude of the congestion is the same no matter the uncertainty level α p , energy products volume is around the same value, 40.56 kWh for α p = 10% and 45.22 kWh for α p = 2%.The reason behind such behaviour lies in the physical meaning of α p .Higher values of α p exemplify the situation where the DSO assummed that the duration of the event would be low, but ended up being than expected, needing a higher amount capacity products at the end, as Fig. 9(a) depicts.On the other hand, if α p is maintained low, as Fig. 9(b) presents, the amount of capacity products is reduced, but energy products slightly increases.This is illustrated in Table IV.
Total costs for flexibility procuring increases with the level of uncertainty as Table IV presents.This is due to the fact that the reliability of the solution also increases, and the solution is nearer to the worst-case scenario.

E. Decentralisation of the Solution
In a context with intrinsic concerns about privacy, the decentralisation of the market clearing enables a full market integration in areas of the grid operated by several DSOs.This section presents a case study that mitigates a congestion of 36 kVA in branch 78-80 of the DSO B. It is assumed that assets from DSO B have higher operational costs as the uncertainty of their forecast is lower compared to assets from DSOs A and C as Fig. 10 and Table III present.Selected branch is located in the middle of the feeder to allow DSO B to mitigate the congestion with the assets connected to its jurisdiction.In this sense, downward flexibility needed downstream the congestion can be balanced with assets from DSO B, connected upstream the congestion, trading upward flexibility.Simulations are performed considering α p = α a = 10%.
Then, the results of this case study are depicted in Fig. 11  and Table V.Market efficiency is enhanced when all DSOs participate in the market, as the cost of the solution is reduced a 44.65% and the power flow through branch 78-80 is closer to the thermal limit, as Fig. 11 shows.The volume of products, as well  as the flexibility per agent increases when all areas participate in the market.Thus, the clearing solution when assets from all DSOs participate in the market can face shorter balancing events compared with the solution of only DSO B. Nevertheless, the reliability of the solution is enhanced from a 3.80% to 89.44%.Costs of energy and capacity flexibility products also are reduced Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.an 80.15% and 82.14%, respectively, as more economical assets participate in the market clearing.The evolution of the dual and primal solutions of the Multi-DSO LFM using standard and adaptive version of the ADMM is also analysed.Fig. 12 shows the evolution of the primal ( r k 2 ), dual ( s k 2 ) residuals and the penalty factor (γ k ) during the decentralised market clearing process.ADMM parameters are fixed to γ 0 = 10 −1 , τ = 25, μ = 10.
As Fig. 12 shows, the standard version of the ADMM algorithm is unable to obtain enough precision when clearing the market.This justifies the use of the adaptive version of the algorithm which obtains primal and dual convergence within 140 iterations for a precision level of ε = 10 −3 .The solver spends 280.252 seconds to solve the decentralized version of the problem, which results in 2.0018 seconds per iteration.

V. CONCLUSION
This paper has presented a Multi-DSO Local Flexibility Market for decentralised trading of capacity and energy products to mitigate congestions and imbalances.The clearing procedure takes into account the uncertainty of the different RDERs as well as the uncertainty of the energy events.Besides of that, it also captures how uncertainty level affects to market operation and its associated costs.capacity and energy products, along with uncertainty modelling, the market captures the nondeterministic nature of the energy events, and it also analyses the associated costs of hedging against events of a determined duration.
This LFM helps to integrate RDERs across several DSO jurisdictions while maintaining their operational independence, obtaining the same solution that the centralised setting.This decentralisation process is driven by economical and physical constraints that appear at the interface, i.e., the prices of the products exchanged in the market, and node voltage magnitude and phase angle.Nevertheless, to achieve that objective, multiple iterations of an ADMM procedure are needed.
A case of study based on radial network 201_3 and SimBench dataset demonstrates the feasibility of the proposed approach.Non-linearities associated to the model can be included into the model using a convex approximation of them.
Reduced operational costs are obtained when the DG share increases, what incentives the DSOs to deploy them.Moreover, enhanced reliable solutions are obtained when integrating multiple DSOs in the market clearing protocol, even if the assets included have high uncertainty.Solution took a reduced number of iterations among DSOs to converge, 140 iterations for this case study.

APPENDIX A RESOLUTION OF THE CHANCE CONSTRAINTS
The following procedure is applied to solve the CCs of the market clearing problem.Let use (31) where φ − e (ξ) is the distribution of the forecast error.Both distributions have the same shape, but they are displaced with respect of each other [31].Then assuming that φ which solves the CC as the Versatile and Exponential distributions used in this work are known and analytical.Following similar reasoning, CCs (32)-( 35) are solved.where m(x A , x B ) represents coupling constraints between DSOs.ADMM algorithm uses the convergence properties of the Augmented Lagrangian and accelerates it with a second-order term.The main difference between standard ADMM and its adaptative version lies in the penalty factor update of (60), which takes advantage of the superlinear convergence property of the method when γ k → ∞, while maintaining primal r k and dual s k residuals within μ distance of one another.The decomposed optimization problem for the DSO A, considering the dual variables λ k shared by the LMO, is as follows, x A,k+1 : arg min Similarly, DSO B solves its sub-problem.Then, primal r k and dual s k residuals are computed, so r k 2 = m(x A,k , x B,k ) 2 and s k 2 = γ k x k+1 − x k 2 , and convergence is checked considering, Lastly, if the solution has not converged, multipliers λ k are updated by the LMO based on the subgradient rule, approximating the dual function of the problem by the norm of the coupling constraints m t (x A,k , x B,k ) 2 .Then, penalty factor γ k is modified based on the primal r k 2 , dual residuals s k 2 and parameters τ and μ, The algorithm loops until (58) holds, as Fig. 13, then it stops and the market clearing solution is obtained.
Uncertainty-Aware Trading of Congestion and Imbalance Mitigation Services for Multi-DSO Local Flexibility Markets Ángel Paredes , Student Member, IEEE, José A. Aguado , Member, IEEE, and Pedro Rodríguez , Fellow, IEEE Abstract-The design of Local Flexibility Markets (LFMs) for energy and reserve dispatch of Renewable Distributed Energy Resources (RDERs) has recently been a topic of wide research.However, in an scenario with high penetration of RDERs deployed among different Distribution System Operators (DSOs) jurisdictions, further operational requirements concerning congestion and imbalance mitigation services may lay down.In this context, the relationship between capacity and energy products and the uncertainty management scheme becomes essential for procuring of RDERs flexibility.This paper proposes an uncertainty-aware Multi-DSO LFM.This market setting uses flexibility products to mitigate congestions and imbalances among different DSOs.First, capacity products hold back the flexibility of the RDERs in anticipation of contingencies.Then, energy products are activated within each time slot if the event finally occurs.LFM is solved in a coordinated and decentralised fashion using the properties of the Alternating Direction Method of Multipliers (ADMM), preserving participants' privacy.Uncertainty of RDERs and energy events duration are modelled using chance-constraint linear optimisation.The proposed methodology has been tested in a case study based on a realistic dataset and radial distribution systems.

Fig. 2 .
Fig. 2.An example of the versatile distribution for uncertainty modelling of a FL.

Fig. 3 .
Fig. 3. ICDF representation of the duration of energy events.

Fig. 4 .
Fig. 4. Representation of the coordination scheme for a LFM with three DSOs interconnected.

Fig. 7 .
Fig. 7. Comparison of the power flows considering active and reactive power (blue), only reactive power (green) and DC model (orange), and branch thermal limit (red).

Fig. 8 .Fig. 9 .
Fig. 8. Summary of the results of the LFM for different values of uncertainty levels α p .

Fig. 10 .
Fig. 10.Comparison of the PDF of FLs from DSO (a) A, C and (b) B.

Fig. 11 .
Fig. 11.Power flow through branch 78-80 when solving the congestion using only area B assets, and assets from all areas.
Upward u/downward d energy product e from agent a at time period t (kWh).Upward u/downward d capacity product c from agent a at time period t (kW).
≤ soc s,t ≤ SOC s for all BESS s and time period t.These restrictions also affect the quantity of the capacity products that could be offered, so ν u s,t ≤ P conv Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE III COMPARISON
OF THE COSTS AND THE PARAMETERS OF THE VERSATILE DISTRIBUTION OF EACH DSO FOR THE CASE STUDY TABLE IV BEHAVIOUR OF THE MARKET FOR DIFFERENT DG SHARE AND UNCERTAINTY LEVEL (α p )

TABLE V COMPARISON
OF THE RESULTS OF THE MARKET WHEN SOLVING A CONGESTION OF 36 KVA IN LINE 78-80 USING RESOURCES OF AREA B ONLY AND ALL AREAS (α a = α p = 0.10) Fig. 12.Comparison of the evolution of the residuals in the adaptive ADMM (dashed lines), versus its standard version (solid lines).
as an example.Let φ P sch a,t be the Cumulative Density Function (CDF) of the scheduled power for the agent a, then