Anibal Sanjab
email: anibal.sanjab@vito.be.

Hélène Le Cadre
email: helene.le-cadre@inria.fr.

Yuting Mou
email: yutingmou@seu.edu.cn

Hélène Le

TSO-DSOs Stable Cost Allocation for the Joint Procurement of Flexibility: A Cooperative Game Approach

Keywords: Flexibility, Electricity Markets, TSO-DSO Coordination, Cooperative Game Theory, Optimization

In this paper, a transmission-distribution systems flexibility market is introduced, in which system operators (SOs) jointly procure flexibility from different systems to meet their needs (balancing and congestion management) using a common market. This common market is, then, formulated as a cooperative game aiming at identifying a stable and efficient split of costs of the jointly procured flexibility among the participating SOs to incentivize their cooperation. The non-emptiness of the core of this game is then mathematically proven, implying the stability of the game and the naturally-arising incentive for cooperation among the SOs. Several cost allocation mechanisms are then introduced, while characterizing their mathematical properties. A case study is then presented, considering an interconnected system composed of the IEEE 14-bus transmission system and the Matpower 18-bus, 69-bus, and 141-bus distributions systems. The numerical results showcase the cooperation-induced reduction in system-wide flexibility procurement costs, and identify the varying costs borne by the different SOs under different cost allocations methods.

I. INTRODUCTION

The increasing integration of distributed energy resources (DERs) and electrification of the consumer energy space (e.g., transportation and heating) pose challenges for grid operation, due to the induced uncertainty and changing load patterns [START_REF] Le | CEER paper on DSO procedures of procurement of flexibility[END_REF], [START_REF] Silva-Rodriguez | Short term wholesale electricity market designs: A review of identified challenges and promising solutions[END_REF]. However, this new energy landscape also enables an unprecedented growing volume of invaluable flexibility 1 (from different voltage levels of the grid) thereby providing essential services (e.g., congestion management and balancing) for transmission system operators (TSOs) and distribution system operators (DSOs). In this respect, the introduction of market mechanisms for the procurement of flexibility from flexibility services provides (FSPs) has been increasingly recommended in policies [START_REF] Le | CEER paper on DSO procedures of procurement of flexibility[END_REF], and has been the center of several recent works in the literature [START_REF] Le Cadre | A game-theoretic analysis of transmission-distribution system operator coordination[END_REF]- [START_REF] Hermann | Congestion management in distribution networks with asymmetric block offers[END_REF] and demonstration projects [START_REF] Schittekatte | Flexibility markets: Q&A with project pioneers[END_REF].

As FSPs could provide their flexibility as a service to different system operators (SOs), a major branch of literature has focused on the SOs' joint procurement (i.e. co-optimization) of flexibility [START_REF] Vicente-Pastor | Evaluation of flexibility markets for retailer-DSO-TSO coordination[END_REF], [START_REF] Roos | Designing a joint market for procurement of transmission and distribution system services from demand flexibility[END_REF], to maximize the grid and system-level value of this flexibility 2 . In particular, a key focus has been shed on the need for coordination between SOs to achieve joint procurement, not only for optimization of economic efficiency but also to ensure that the activated flexibility meets grid operational constraints of all the grids involved [START_REF] Le Cadre | A game-theoretic analysis of transmission-distribution system operator coordination[END_REF]- [START_REF] Sanjab | A linear model for distributed flexibility markets and dlmps: A comparison with the socp formulation[END_REF], [START_REF] Gerard | Coordination between transmission and distribution system operators in the electricity sector: A conceptual framework[END_REF], [START_REF] Sheikhahmadi | Bi-level optimization model for the coordination between transmission and distribution systems interacting with local energy markets[END_REF]. However, when jointly procuring flexibility, it is paramount to decide how the costs of this flexibility should be divided among the participating SOs in the most efficient and fair way, and most importantly, in a manner that incentivizes SOs to naturally collaborate and jointly procure flexibility rather than running their disjoint markets. To the best of our knowledge 3 , no work in the literature has presented a fundamental analysis and comprehensive solution to this joint cooperation and cost allocation problem, as is the goal of the current work. To this end, the current work focuses on the cooperation among SOs for the joint procurement of flexibility by casting the cooperation in a common market as a cooperative game among the SOs to address these various key questions.

Cooperative game theory provides a set of principles and tools to investigate how multiple agents with interconnected interests, when allowed to communicate, can form coalitions that benefit all their members, and to allocate the resulting benefits/costs among the coalition members, fairly and efficiently. Cooperative game theory has recently gained an increased application in power system research. In a recent paper [START_REF] Churkin | Review of cooperative game theory applications in power system expansion planning[END_REF], the authors review a range of cooperative games applications where a particular attention is shed on power system expansion planning. In [START_REF] Churkin | Enhancing the stability of coalitions in cross-border transmission expansion planning[END_REF], a bilevel optimization framework incorporating cooperative games' principles into a transmission expansion planning problem is proposed while accounting for the compromise between coalition stability and economic efficiency. In local energy communities, cooperative game theory is adopted to expedite stable peer-to-peer trading algorithms and incentivize individual users [START_REF] Malik | A prioritybased approach for peer-to-peer energy trading using cooperative game theory in local energy community[END_REF] as well as to allocate DER values [START_REF] Fleischhacker | Stabilizing energy communities through energy pricing or PV expansion[END_REF]. Under a pool-based electricity market, the Shapley value (an allocation concept from cooperative game theory) has been adopted for tariff computation of transmission loss charges [START_REF] Hsieh | Allocation of transmission losses based on cooperative game theory and current injection models[END_REF]. Cooperative game theory has also been employed to facilitate the planning [START_REF] Ali | Optimal planning of clustered microgrid using a technique of cooperative game theory[END_REF] and 2 A number of works in the literature [START_REF] Heleno | Estimation of the flexibility range in the transmission-distribution boundary[END_REF]- [START_REF] Gonzalez | Determination of the time-dependent flexibility of active distribution networks to control their TSO-DSO interconnection power flow[END_REF] has also focused on estimating and modeling the flexibility capacity at the TSO-DSO interface (i.e., the collective volume of flexibility that could be provided by distribution systems to TSOs, while taking distribution network constraints into account) -using, e.g., the identification of distribution system flexibility regions. This provides a main guide for TSO-DSO coordination for the procurement of flexibility but differs in scope from a co-optimized joint procurement process. 3 We note that the work in [START_REF] Vicente-Pastor | Evaluation of flexibility markets for retailer-DSO-TSO coordination[END_REF] looks at a Retailer-DSO-TSO coordination setting while focusing particularly on the Shapley value for the numerical computation of cost allocation, hence, defers in scope from the current work. operation of microgrids [START_REF] Du | Coordinating multi-microgrid operation within distribution system: A cooperative game approach[END_REF], to study coalition formation and energy trading between microgrids [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF]- [START_REF] Sanjab | Power System Analysis: Competitive Markets, Demand Management, and Security[END_REF], as well as for analyzing shared energy investments [START_REF] Hupez | A new cooperative framework for a fair and cost-optimal allocation of resources within a low voltage electricity community[END_REF] and collective response to tariffs [START_REF] Robu | Efficient buyer groups with prediction-of-use electricity tariffs[END_REF]. Moreover, a recent application of the Shapley value for cost allocation in a Retailer-DSO-TSO coordination setting has been proposed in [START_REF] Vicente-Pastor | Evaluation of flexibility markets for retailer-DSO-TSO coordination[END_REF].

In this paper, we develop a novel cooperative game-theoretic approach in which 1) we formulate the concept of cooperation stability between the TSO and DSOs in a joint flexibility market, 2) determine whether cooperation between the TSO and DSOs is naturally incentivized and the conditions therefore, and 3) derive several cost allocation mechanisms and analytically investigate their properties focusing on concepts such as stability, efficiency, and computational complexity.

Towards this end, we first introduce a novel flexibility market model including a TSO and multiple DSOs for jointly procuring congestion management and balancing services while explicitly accounting for grid constraints. This framework is developed by first introducing disjoint TSO and DSO level markets and joining them in a common market setting. We then formulate the joint procurement of flexibility between any subset of SOs as a cooperative (cost allocation) game and analyze its properties. We subsequently analyze and prove the non-emptiness of the game's core 4 . This, as a result, implies that all SOs would be better off joining the grand coalition (i.e., the set of all SOs in a common market setting) as compared to joining any sub-coalition (i.e., a coalition of a subset of SOs, or forming disjoint markets with no cooperation). Furthermore, we extend this property to different pricing mechanisms including pay-as-bid and nodal pricing. Then, we introduce several cost allocation mechanisms to allocate the costs of the jointly procured flexibility among the different SOs (namely, the Shapley value, normalized Banzhaf index, cost gap allocation, Lagrangian-based cost allocation, equal profit method, and proportional cost) and investigate their stability (whether they belong to the core), allocation adequacy, and other mathematical properties such as: efficiency, symmetry, additivity, dummy player, anonymity, and computational complexity.

Our analytical conclusions and results are further corroborated using a flexibility market case analysis focusing on an interconnected test system composed of the IEEE 14-bus transmission system interconnected with three distribution systems -namely, the Matpower 141-bus, 69-bus and 18-bus systems. The numerical results highlight 1) the significant reduction in system costs when more SOs joint the common market grand coalition, highlighting the benefits of cooperation, 2) the essential role of higher interface flows on reaping the benefits of cooperation, and 3) the disparity that can result from different cost allocation methods, thereby providing key inputs to SOs, regulators, and decision makers regarding TSO-DSO cooperation and flexibility cost allocation.

The rest of the paper is organized as follows. Section II presents the disjoint and common markets formulations. Section III introduces the cooperative game formulation. Sec-tion IV investigates the stability of the game, while Section V provides different cost allocation mechanisms and characterizes their properties. Section VI introduces the numerical results, and Section VII concludes the paper.

Notation

Let R n indicate the set of n dimension real vectors, and R n + its nonnegative orthant. I is the identity matrix. . represents the Euclidean norm. Given a vector x, x t denotes its transpose. Let col(x 1 , ..., x N ) := [x T 1 , ..., x T N ]. Depending on the context, |.| will denote the absolute value of a scalar or the cardinal of a set. Matrices and vectors will be represented in bold font, using capital letters for matrices.

II. SYSTEMS AND MARKETS MODELS Consider a transmission system (operated by a TSO) composed of a set of nodes, N T , and set of lines, L T , represented by a graph G T (N T , L T ). At a subset, N D , of these nodes, distribution systems (each operated by a DSO) are connected. We refer to N D ⊆ N T , as the set of interface nodes, containing N D nodes from each of which stems one of the N D different distribution systems. We let a) p T n be the net real power injection at node n ∈ N T , b) p T,o and d T,o be, respectively, the vectors of anticipated base injection and load at all transmission system nodes N T , c) P T ij denote the real power flow over line {i, j} ∈ L T , with maximum thermal line limit F T,max ij , d) T p n T and T q n T denote the active and reactive power transfer to the distribution system connected to node n T ∈ N D , and e) X (i,j),n denote the generation shift factor of P T ij with respect to the net injection at node n ∈ N T , capturing the change in the flow over line {i, j} ∈ L T due to a change in net injection at node n ∈ N T .

We denote a distribution system connected to a transmission node n T ∈ N D by DSO-n T . Each DSO-n T is composed of a radial distribution network composed of N n T nodes (where node

n n T 0 ∈ N n T
is the root node of DSO-n T ) and L n T distribution lines forming a graph, G n T (N n T , L n T ). In each DSO-n T , we let A(n) denote the ancestor node of n ∈ N n T \{n n T 0 } and K(n) the set of predecessor nodes of n. For the root node n n T 0 , A(n n T 0 ) = n T . For each DSO-n T , we let a) s n T n = p n T n +jq n T n be the net complex power injection at bus n ∈ N n T , b) p n T ,o and d n T ,o be, respectively, the vectors of anticipated base generation and demand at all distribution system nodes N n T , c) P n T A(n)n and Q n T A(n)n be, respectively, the real and reactive power flowing over the line connecting A(n) and n, with a maximum apparent power flow denoted by S n T ,max A(n)n , and d) v n T n be the magnitude squared of the voltage at node n ∈ N n T , with upper and lower limits specified, respectively, by v n T ,max n and v n T ,min n . Here,

P n T A(n n T 0 )n n T 0 and Q n T A(n n T 0 )n n T 0
denote the interface flows with the transmission grid, which are equal, respectively, to T p n T and T q n T defined on the transmission side. In addition, for the line parameters, we let r n T A(n)n and x n T A(n)n be, respectively, the resistance and reactance of line {A(n), n} ∈ L n T . We next introduce the formulation of disjoint transmission and distribution markets, followed by the common market model, which joins the distribution and transmission-level markets.

A. Disjoint Transmission-Level Market

We consider that the TSO's anticipated base schedule p T,o and d T,o shows imbalance and/or line congestion which the TSO aims to solve using resources available only from the transmission level (hence, resulting in a disjoint market). These resources are represented by offers to the market from assets connected to the transmission network. Let ∆p T + n and ∆p T - n correspond, respectively, to the volumes of increase and reduction in generation (respectively, upward and downward flexibility) connected at the transmission bus n. In addition, let ∆d T + n and ∆d T - n correspond, respectively, to the volumes of reduction and increase in demand (i.e., upward and downward flexibility) at node n of the transmission network. In addition, let c T + pn , c T - pn , c T + dn , and c T - dn represent the unit price offered by adjustable generation and loads for, respectively, ∆p T + n , ∆p T - n , ∆d T + n , and ∆d T - n . The goal of the TSO is to resolve the balancing and congestion issues at the minimum possible cost. Hence, the TSO's problem can be described as follows 5 :

min ∆p T ,∆d T n∈N T c T + pn ∆p T + n -c T - pn ∆p T - n +c T + dn ∆d T + n -c T - dn ∆d T - n , (1)
Subject to:

p T n = p T,o n +∆p T + n -∆p T - n -d T,o n +∆d T + n -∆d T - n , ∀n ∈ N T , (2)
P T ij = N T n=1 p T n X (i,j),n - n∈N D T p n X (i,j),n , ∀{i, j} ∈ L T , (3)
p T n - js.t.{i,j}∈L T P T ij = 0 : (λ T n ), ∀n ∈ N T \ N D , (4)
p T n -T p n - js.t.{i,j}∈L T P T ij = 0 : (λ T n ), ∀n ∈ N D , (5)
-F T,max ij ≤ P T ij ≤ F T,max ij , ∀{i, j} ∈ L T , (6)
0 ≤ ∆p T + n ≤ ∆p T +,max n , 0 ≤ ∆p T - n ≤ ∆p T -,max n , ∀i ∈ N T , (7)
0 ≤ ∆d T + i ≤ ∆d T +,max i , 0 ≤ ∆d T - i ≤ ∆d T -,max i , ∀i ∈ N T . (8)
Here, ∆p T and ∆d T are the vectors grouping, respectively, ∆p T + n and ∆p T - n , and ∆d T + n and ∆d T - n , at all nodes n ∈ N T . Equation (2) defines the net injection at node n ∈ N T . Constraint (3) consists of the power flow equations over all the transmission lines expressed using the generation shift factors, X (i,j),n . Constraint (4) is the energy balance equation at node n ∈ N T \ N D , while (5) is the energy balance equation at interface node n ∈ N D . λ T n denotes the Lagrange multipliers of the nodal energy balance constraints at each node n ∈ N T . In this disjoint transmission system market formulation, T p n is considered to be a constant (i.e. not dependent on any decision variable) to reflect the case that balancing and congestion management in this case are to be resolved using flexibility available only at the transmission system. In addition, [START_REF] Sanjab | A linear model for distributed flexibility markets and dlmps: A comparison with the socp formulation[END_REF] represents the congestion prevention constraints, while [START_REF] Roos | Designing a joint market for procurement of transmission and distribution system services from demand flexibility[END_REF] and (8) capture the bid limits.

B. Disjoint Distribution-Level Market

The disjoint market for congestion management at the DSO-n T level uses solely distribution grid flexibility to solve congestion issues resulting from the anticipated base generation and load profiles, p n T ,o and d n T ,o , at all distribution system nodes N n T . Let ∆p n T + n and ∆p n T - n correspond, respectively, to the volumes of increase and reduction in generation (corresponding to, respectively, upward and downward flexibility) connected at the DSO-n T node n. In addition, we let ∆d n T + n and ∆d n T - n represent upward and downward flexibility at node n (i.e., the volumes of reduction and increase in demand at that node). In addition, similarly to the cost structure on the transmission level, we let c n T + pn , c n T - pn , c n T + dn , and c n T - dn represent the unit prices offered by adjustable generation and loads on the distribution level for, respectively,

∆p n T + n , ∆p n T - n , ∆d n T + n , and ∆d n T - n .
As the DSO-n T 's goal is to resolve congestion issues at minimum cost, its problem can be formulated as follows 6 .

min ∆p n T ,∆d n T ,q n T n∈N n T c n T + pn ∆p n T + n -c n T - pn ∆p n T - n + c n T + dn ∆d n T + n -c n T - dn ∆d n T - n , (9)
Subject to:

p n T n = p n T ,o n +∆p n T + n -∆p n T - n -d n T ,o n +∆d n T + n -∆d n T - n , ∀n ∈ N n T , (10)
p n T n +P n T A(n)n - k∈K(n) P n T nk = 0, ∀n ∈ N n T \ n n T 0 : (λ n T n ), (11)
q n T n + Q n T A(n)n - k∈K(n) Q n T nk = 0 ∀n ∈ N n T \ n n T 0 , (12)
T p n T - k∈K(n n T 0 ) P n T n n T 0 k = 0, : (λ n n T 0 ), (13)
T q n T - k∈K(n n T 0 ) Q n T n n T 0 k = 0, (14)
v n T n = v n T A(n) -2r n T A(n)n P n T A(n)n -2x n T A(n)n Q n T A(n)n , ∀n ∈ N n T \ n n T 0 , (15)
αmP n T A(n)n +βmQ n T A(n)n +δmS n T ,max A(n)n ≤ 0, ∀m ∈ M, {A(n), n} ∈ L n T , (16)
v n T ,min n ≤ v n T n v n T ,max n , ∀n ∈ N n T , (17)
q n T ,min n ≤ q n T n ≤ q n T ,max n , ∀n ∈ N n T , (18)
T q,min n T ≤ T q n T ≤ T q,max n T , ( 19
)
0 ∆p n T + n ∆p n T +,max n , 0 ∆p n T - n ∆p n T -,max n , ∀n ∈ N n T , ( 20
)
0 ∆d n T + n ∆d n T +,max n , 0 ∆d n T - n ∆d n T -,max n , ∀n ∈ N n T . (21)
Here, ∆p n T and ∆d n T are vectors grouping, respectively, ∆p . Equation [START_REF] Heleno | Estimation of the flexibility range in the transmission-distribution boundary[END_REF] returns the net generation, p n T n , which 6 The proposed linear distribution-level flexibility market makes use of the LinDistFlow power flow equations to compute active and reactive power flows as well as voltage magnitudes (as the MS-only DC power flow representation is not typically adequate for distribution systems). The accuracy of this linear formulation as compared to a second order cone programming counterpart is evaluated in [START_REF] Sanjab | A linear model for distributed flexibility markets and dlmps: A comparison with the socp formulation[END_REF].

depends on the base generation and load profiles and the activated flexibility at node n. The equality constraints in (11)- [START_REF] Gonzalez | Determination of the time-dependent flexibility of active distribution networks to control their TSO-DSO interconnection power flow[END_REF] follow directly from the LinDistFlow formulation [START_REF] Baran | Optimal sizing of capacitors placed on a radial distribution system[END_REF], representing the linearized power flow equations in radial distribution networks. In a local market mechanism (i.e. disjoint DSO-n T level market), the interface flow T p n T is considered to be constant -i.e., not a decision variable nor a dependent variable -which is directly derived from the initial anticipated base generation and load profiles at each of the nodes of the system as can be seen by substituting [START_REF] Heleno | Estimation of the flexibility range in the transmission-distribution boundary[END_REF] and [START_REF] Capitanescu | TSO-DSO interaction: Active distribution network power chart for TSO ancillary services provision[END_REF] in [START_REF] Lopez | Quickflex: a fast algorithm for flexible region construction for the TSO-DSO coordination[END_REF]. Hence, this reflects that congestion management on the distribution level is to be resolved solely using flexibility provided from within the distribution system. We denote the Lagrange multiplier of constraint [START_REF] Capitanescu | TSO-DSO interaction: Active distribution network power chart for TSO ancillary services provision[END_REF] and ( 13) by λ n T n . Constraint ( 16) is a linearization of the complex flow limit constraint. This linearization, as proposed in [START_REF] Wang | Distributed generation hosting capacity evaluation for distribution systems considering the robust optimal operation of OLTC and SVC[END_REF], is a polygonal inner-approximation that transforms the feasibility region of the flow limit constrain from a circle of radius S n T ,max A(n)n into a polygon whose number of edges are given by the size of the approximation set M. The values of α m , β m , and γ m define this polygon such that all its vertices would lie on the original feasibility circle of radius S n T ,max

A(n)n
(a detailed explanation of this approximation is presented in [START_REF] Wang | Distributed generation hosting capacity evaluation for distribution systems considering the robust optimal operation of OLTC and SVC[END_REF]). Constraints [START_REF] Sheikhahmadi | Bi-level optimization model for the coordination between transmission and distribution systems interacting with local energy markets[END_REF] and ( 18) capture the limits on the nodal voltage magnitudes and reactive power injections, to ensure operational stability and the real-reactive power operational and capacity limits of load and generation, while (19) enforces a limit on the reactive power transfer with the transmission grid, T q n T , where this limit reflects the technical substation capacity as well as any financially-imposed limits on the allowable power transfers. Constraints [START_REF] Malik | A prioritybased approach for peer-to-peer energy trading using cooperative game theory in local energy community[END_REF] and [START_REF] Fleischhacker | Stabilizing energy communities through energy pricing or PV expansion[END_REF] reflect the limits of the submitted bids.

Remark II.1. As can be noted in the distribution-level market in ( 9) -( 21), even though reactive power is not traded in the market as a flexibility product, it has a direct effect on the feasibility region of the market solution, in particular on the voltage magnitudes and apparent power flows as seen in ( 12), ( 14) - [START_REF] Churkin | Enhancing the stability of coalitions in cross-border transmission expansion planning[END_REF]. In general, a setting can be considered in which the reactive power outcomes of flexibility resources are coupled to their active power outcomes, which makes active power bids have associated reactive power components (based, e.g., on constant or modifiable power factors). This strict coupling is not considered in the market formulation in ( 9) -( 21), to keep the generality of the formulation. However, it can be readily accommodated by adding an additional constraint coupling the reactive power flexibility to the active power flexibility bid activation.

C. Common Market Model

In the common market, the TSO can readily use resources offered from within the different distribution systems connected to its transmission network as well as resources connected to its transmission network to perform balancing and congestion management. Concurrently, the DSOs can use resources offered from their distribution networks for congestion management. In the common market, flexibility resources (i.e. submitted bids) are accessible to all participating SOs and the market is jointly cleared, in a collaborative manner, to optimally meet the needs of all the SOs while abiding by the operational limits (i.e. constraints) of all the grids involved. The proposed common market formulation, incorporating the TSO and the N D DSOs, combines the disjoint market models as follows:

min ∆p,∆d,q n∈N T c T + pn ∆p T + n -c T - pn ∆p T - n +c T + dn ∆d T + n -c T - dn ∆d T - n + n T ∈N D n∈N n T c n T + pn ∆p n T + n -c n T - pn ∆p n T - n +c n T + dn ∆d n T + n -c n T - dn ∆d n T - n , (22)
Subject to:

(2)-( 8), ( 10)-( 21)

∀n T ∈ N D , (23)
and

T p,min n T ≤ T p n T ≤ T p,max n T ∀n T ∈ N D . ( 24
)
∆p and ∆d are the vectors of generation and demand flexibility variables (i.e., respectively, ∆p T and ∆p n T for all n T ∈ N D , and ∆d T and ∆d n T for all n T ∈ N D ). In addition, q is the vector of q n T for all n T ∈ N D . The common market formulation sums the objective functions of the disjoint markets and uses all the operational and bid level constraints from these markets. An additional constraint in the common market is [START_REF] Du | Coordinating multi-microgrid operation within distribution system: A cooperative game approach[END_REF]. In this regard, in contrast to the disjoint markets, the common market model treats T p n T as a dependent variable (rather than a constant as in the disjoint markets) with limits shown in [START_REF] Du | Coordinating multi-microgrid operation within distribution system: A cooperative game approach[END_REF]. This enables the interaction between the previously disjoint markets to jointly procure the flexibility needed by all SOs. As in the common market T p n T is variable, (24) captures the limits on the interface power between the transmission and distribution system, capturing the technical substation capacity limits as well as any contractually imposed limits on the interface power transfer.

Remark II.2. We note that the common market formulation in ( 22)-( 24) can be readily adapted to reflect a sub-common market setting joining any subset of the SOs. This is readily achieved by replacing N D by any defined subset of DSOs in ( 22)-( 24), and by optionally including or excluding the TSOlevel market from the formulation.

D. Compact Formulation

Due to its linearity, and for the ease of notation, the common market model can be readily expressed using a compact linear programming (LP) formulation. This is carried out next, which will be useful in defining the cooperative game framework.

We introduce x 0 as the column vector which contains the TSO's decision variables: x 0 col ∆p T + , ∆p T -, ∆d T + , ∆d T -. The TSO's feasibility set X 0 is defined based on the constraints that depend only on the TSO's decision variables. Each DSO-n T 's decision variable column vector, denoted by x n T , contains

x n T col ∆p n T + , ∆p n T -, ∆d n T + , ∆d n T -, q n T .
We define X n T as the feasibility set of DSO-n T . The set is made of constraints that depend only on the DSO's decision variables. We let x ∈ X 0 × n T X n T be the vector that contains the joint decisions of the TSO and DSOs. Dependent variables, which can be expressed as functions of the TSO and DSOs' decision variables, are concatenated in a column vector z. Precisely, we set:

z col p T , P T , (p n T ) n T ∈N D , (P n T ) n T ∈N D , (Q n T ) n T ∈N D , (v n T ) n T ∈N D , T p , T q . Constants such as p T,o , d T,o , (p n T ,o ) n T ∈N D , (d n T ,o ) n T ∈N D , ∆p T +,max ,∆p T -,max , ∆d T +,max , ∆d T -,max , (∆p n T +,max ,∆p n T -,max , ∆d n T +,max , ∆d n T -,max ) n T ∈N D , (v n T ,max ) n T ∈N D , (v n T ,min ) n T ∈N D , (q n T ,max ) n T ∈N D , (q n T ,min ) n T ∈N D , T q,max , T q,min , T p,max , T p,min , Ξ (i, j), n = X (i,j),n , (r n T , x n T ) n T ∈N D , α, β, δ, F T,max
, and (S n T ,max ) n T ∈N D , are taken as input parameters. We also define the TSO's cost vector

c 0 col c T + p , -c T - p , c T + d , -c T - d and DSO-n T 's cost vector c n T col c n T + p , -c n T - p , c n T + d , -c n T - d , 0
. Based on this compact notation, the TSO's objective function can be written as Φ 0 (x 0 ) c t 0 x 0 , while the objective function of each DSO-n T is given by Φ n (x n T ) c t n T x n T , where . t is the transpose operator. The social cost of the common market, introduced in ( 22), is defined as the sum of the TSO and DSOs' objective functions, i.e., Φ(x) Φ 0 (x 0 ) + n T ∈N T Φ n T (x n T ). To write the common market model ( 22)-( 24) in a compact matrix form, a change of notations is needed. For that purpose, we order the DSOs in ascending order form 1 to N D = |N D | based on the values of their initial n T . In addition, we denote x col x 0 , (x n ) n as the concatenation of the TSO and DSOs' decision variables.

As the common market model in ( 22)-( 24) is linear, it can readily be presented as a standard compact linear program (LP), using our defined vector notation, as follows:

(LP) min x,z Φ(x), (25a)
s.t. Ax + Bz ≤ d, (λ) (25b) x0 ∈ X0, ( 25c
) xn ∈ Xn, ∀n ∈ N D , (25d) z ∈ Z. (25e)
The steps towards this compact formulation are presented in the Appendix. Note that (25b) can be equivalently written as

(A 0 x 0 +B 0 z 0 )+ n (A n x n +B n z n ) ≤ d to differentiate
between the TSO and the different DSO n's variables. We let λ be the dual variable of (25b).

Constraints (25c) and (25d) characterizing the feasibility set of the TSO and DSOs, can be explicitly written as Ψ 0 (x 0 ) ≤ 0 and Ψ n (x n ) ≤ 0, ∀n ∈ N respectively. We denote µ 0 and (µ n ) n as the associated dual variables.

The Lagrangian function associated with the optimization problem ( 25) is defined as follows:

L(x, z, λ, µ) Φ(x) + λ t Ax + Bz -d + µ t 0 Ψ0(x0) + n µ t n Ψn(xn). (26)
In addition, we introduce the relaxed formulation (also, often called partial dual formulation) of ( 25) where the coupling constraint (25b) is replaced by a penalty in the objective:

max λ≥0 min x∈X ,z∈Z Φ(x) + λ t (Ax + Bz -d) , (27a)
s.t. x0 ∈ X0, (27b) xn ∈ Xn, ∀n ∈ N D , (27c) z ∈ Z. (27d)
The dual function of problem ( 25) is g(λ, µ) min x,z L(x, z, λ, µ) where L(.) is defined in [START_REF] Saad | Coalitional game theory for cooperative micro-grid distribution networks[END_REF]. The associated dual problem is max λ≥0,µ≥0 g(λ, µ). The duality gap is the non-negative number Φ(x * ) -g(λ * , µ * ) where x * is a solution to the primal problem [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF] and λ * , µ * are solutions to the dual problem. Under constraint qualification (e.g. Slater's condition) for [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF], strong duality implies:

min x,z max λ≥0 L(x, z, λ) = max λ≥0 min x,z L(x, z, λ). ( 28
)
Remark II.3. Since Ψ 0 (.), Ψ n (.), ∀n ∈ N D and (25b), (25e) are all defined through affine functions, Slater's condition is not strictly required and can be replaced with non-strict inequalities in the LP feasibility set.

III. COST GAME DEFINITION

We consider a game that is populated by the non-empty set N D of the N D DSOs and the TSO. We will refer to them as the players of the game. A coalition is a subset of N G N D ∪ {TSO}. The grand coalition is the set N G of all SOs (players), with cardinality N G . We cast this game as a characteristic function cost game, G, formally defined as follows.

Definition 1 (Characteristic Function Cost Game [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]). A characteristic function cost game G is given by a pair (N G , v), where v : 2 N G → R is a characteristic function, which maps each coalition C ⊆ N G to a real number v(C). The real number v(C) denotes the value of the coalition C.

The common market in [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF], and its special cases for a singleton TSO or DSO market (or any sub-common market containing any subset of the SOs as discussed in Remark II.2), corresponds to a characteristic function v given by:

v(C) = n∈C c t n x * n where C ⊆ N G , (29)
and (x * n ) n∈C is the optimum of the optimization problem

min (xn) n∈C ,(zn) n∈C n∈C Φn(xn), (30a)
s.t. Ax + Bz ≤ d, (30b) xn ∈ Xn, zn ∈ Zn, ∀n ∈ C. ( 30c
)
As the coalitional value v(C) (i.e., the total cost of the common and sub-common markets) can be divided amongst the members of C in any way that the members of C choose, G is classified as a transferable utility (TU) game [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF].

As we show next, in the case where the global coupling constraint (30b) depends only on the decision variables of the SOs belonging to the coalition, our cost game G takes the form of a linear production game [START_REF] Owen | On the core of linear production games[END_REF]. In this class of games, which is common in transportation and logistics, players pool resources to produce finished goods which can be sold at a given market price defined as the dual variables of the coupling constraints. We define x C col (x n ) n∈C as the stack of the vectors of decision variables of all the SOs in C ⊆ N G . Definition 2 (Linear Production Game [START_REF] Owen | On the core of linear production games[END_REF]). A linear production game is a characteristic function game with value function defined as in [START_REF] Robu | Efficient buyer groups with prediction-of-use electricity tariffs[END_REF] Proof. As can be seen in the common market formulation in ( 22)-( 24), the coupling between the transmission [( 1)-( 8)] and distribution [( 9) -( 21)] markets takes place through the interface power flow variable, T p n T , for all n T ∈ N D . Then, if T p n T is fixed by the TSO (i.e., cannot be changed unilaterally if the TSO and DSO are not part of the same coalition), then there is no coupling between coalitions not containing the TSO and the coalition that contains the TSO. As such, in this case, for each coalition C, Problem (30) can be defined as a linear production game problem as expressed in [START_REF] Baran | Optimal sizing of capacitors placed on a radial distribution system[END_REF].

In general, an outcome of the characteristic function game, G, consists of two parts: i) a partition of the SOs (i.e. the players) into coalitions, known as the coalition structure; and ii) a cost vector, distributing the value of each coalition among its members. These concepts are formally defined next.

Definition 3 (Coalition Structure). Given our game G = (N G , v), a coalition structure over N G is a collection of non- empty subsets CS = {C 1 , ..., C s } such that ∪ s j=1 C j = N G and C i ∩ C j = ∅, ∀i, j ∈ {1, ..., s} such that i = j. A vector y = (y 1 , ..., y N G ) ∈ R N G is a cost allocation vector for a coalition structure CS = {C 1 , ..., C s } over N G if: y n ≥ 0, ∀n ∈ N G , n∈C s y n ≥ v(C s )
for any s ∈ {1, ..., s} (feasibility condition). The efficiency of y is defined as follows.

Definition 4 (Efficiency). A cost allocation vector y is efficient if all the coalition cost is distributed amongst coalition members, i.e., n∈C s y n = v(C s ), ∀s ∈ {1, ..., s}.

The space of all coalition structures will be denoted CS. An outcome of G is, hence, a pair (CS, y).

For a cost allocation vector y, we let y(C) n∈C y n denote the total cost allocation of a coalition C ⊆ N G under y. By extension, the social cost of the coalition structure CS will be denoted v(CS)

C∈CS v(C).

For the derivations that ensue, we now recall classical definitions of two subclasses of coalitional games that will be useful thereafter: submodular games and concave games.

Definition 5 (Submodularity [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]). A characteristic function v is said to be submodular if it satisfies

v(C ∪ C ) + v(C ∩ C ) ≤ v(C) + v(C ),
for every pair of coalitions C, C ⊆ N G . A game with a submodular characteristic function is said to be concave.

Concave games have an intuitive characterization in terms of players' marginal contributions: in a concave game, a player (i.e. an SO) is more useful (decreasing the group cost) when it joins a bigger coalition, as formally defined next. Definition 6 (Concavity [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]). A characteristic function game G is concave if and only if for every pair of coalitions C, C such that C ⊂ C and every player n

∈ N G \ C it holds that v(C ∪ {n}) -v(C) ≤ v(C ∪ {n}) -v(C ).
To define whether a common market can naturally arise, the stability of the cooperation between the SOs in a common market must be defined and verified. A stable coalition is a coalition from which no SO has an incentive to deviate. A stable grand coalition, is the coalition including the TSO and all DSOs and which is stable. Consider an outcome (CS, y) of the cost game G. If y(C) > v(C) for some C ⊆ N G , the SOs in C could do better by abandoning the coalition structure CS and forming a coalition of their own. Thus, in this case, the outcome (CS, y) is unstable. The set of stable outcomes, i.e., outcomes where no subset of SOs (players) has an incentive to deviate, is called the core of G.

(G) {y * ∈ R N G | i∈N G y * i = v(N G ) and i∈C y * i ≤ v(C), ∀C ⊆ N G }.
The constraints imposed on C(G) ensure that no TSO or DSO has an incentive to leave the grand coalition (of all SOs in a common market) and form any subcoalition (a sub-common market as defined in Remark II.2, encompassing any subset of SOs including the singleton coalitions/disjoint markets). A cost allocation belonging to the core is efficient and meets the Individual Rationality (IR) property [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF], [START_REF] Shapley | Cores of convex games[END_REF]. Definition 7, which is the classical definition of the core of a cooperative game, does not deal with the Incentive Compatibility (IC) property. Therefore, in general, being in the core does not guarantee the IC property of the cost allocation. Coping with the IC property requires the consideration of asymmetric information structures when formulating the TSO-DSOs game [START_REF] Le Cadre | A game-theoretic analysis of transmission-distribution system operator coordination[END_REF]. In general, attempts to determine efficient cost allocations would be thwarted by players' incentives to misrepresent their preferences, e.g., to behave as free-riders. Lindhal mechanism was introduced in [START_REF] Walker | A simple incentive compatible scheme for attaining lindhal allocations[END_REF] to achieve allocations that are efficient, and achieve both IR and IC properties. The development of such a mechanism constitutes relevant future work, but is out of the scope of the current paper.

We next analyze the stability of the grand coalition in our game and the resulting, naturally arising common benefit of the SOs to cooperate in a common flexibility market.

IV. STABILITY ANALYSIS OF COST GAME G

For the common market to naturally arise and be sustained, collaboration among SOs should be naturally beneficial to all of them. This is achieved if their collaboration is stable, i.e., when the core of our formulated TSO-DSO game G, defined in Definition 7, is non-empty. We next prove that the core of G is non-empty and, hence, the TSO and DSOs have a natural incentive to collaborate and form a common market.

A. Stability of Cost Game G

We first begin by proving that it is beneficial for any DSO to collaborate with the TSO than forming a disjoint market.

Proposition 2. Any DSO n ∈ N D prefers cooperating with the TSO than remaining alone.

Proof. It is profitable for any DSO n ∈ N D to cooperate with the TSO if and only if:

v({TSO ∪ n}) ≤ v({n}) + v({TSO}). ( 32
)
Considering the relaxed version of (25) which we proved to be equivalent to [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF] under weak Slater's condition, the inequality ( 32) is equivalent to the following one:

max λ min x 0 ,z 0 ,xn,zn c t 0 x0 + c t n xn + λ t (Ax + Bz -d) ≤ max λ min x 0 ,z 0 c t 0 x0 + λ t (Ax + Bz -d) + max λ min xn,zn c t n xn + λ t (Ax + Bz -d) , (33)
where x 0 ∈ X 0 , x n ∈ X n , z 0 ∈ Z 0 , z n ∈ Z n . Since [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF] holds by definition, we can conclude that any DSO n ∈ N D has an incentive to cooperate with the TSO.

We next show that, under Proposition 1, not only would any DSO benefit from cooperating with the TSO, but also that any DSO has an incentive to be part of the grand coalition made of all of the N D DSOs and the TSO.

Theorem 1. If each coalition C ⊆ N G not containing a TSO cannot unilaterally change their active power transfer between the TSO and the connected distribution networks, (T p n ) n∈C , then the characteristic function cost game G has a non-empty core. Therefore, G is stable.

Proof. If each coalition C ⊆ N G not containing a TSO cannot change their active power transfer to the connected distribution networks (T p n ) n∈C -i.e., each DSO n must keep its T p n constant unless it is part of a coalition with the TSOthen, Proposition 1 holds. This implies that our cost game G reduces to a linear production game, which is proven to have a non-empty core in [START_REF] Owen | On the core of linear production games[END_REF]. Therefore, G is stable.

Due to the stability of G proven in Theorem 1, it is always beneficial for all DSOs and TSO to cooperate in a common market. We next also analyze the stability of the game when the assumption on the interface flow in Proposition 1 does not hold.

B. Cost Game Asymptotic Stability

For the purpose of the derivations that ensue, we introduce Proof. We observe that LP (30) has a specific structure since its objective function is decomposable over each agent in the coalition and the coupling constraint (25b) is shared among all the agents in N G . Let C ⊆ N G . Relying on LP [START_REF] Ott | Experience with PJM market operation, system design, and implementation[END_REF] structure, a direct application of [START_REF] Le Cadre | Parametrized inexact-admm based coordination games: A normalized nash equilibrium approach[END_REF], Prop. 6 enables us to prove that the set of solutions of LP (30) over C coincides with the set of solutions of the generalized Nash equilibrium problem GNEP(C), which has a generalized potential game structure, defined as:

G ε (N G , v ε ) with v ε (C) v(C) + ε n∈C x n 2 , ∀C ⊆ N G ,
∀n ∈ C, min xn,zn Φn(xn), (34)
s.t. Ax + Bz ≤ d, ( 35
) xn ∈ Xn, zn ∈ Zn. (36)
Let SOL(P ) be the set of solutions of problem P .

(C ∪ {n}) - v(C ) -v(C ∪ {n}) -v(C) = c t n (x * * n -x * n ) for any C ⊂ C and any n ∈ N G \ C where x * *
n solves LP (30) over C ∪ {n}. For the concavity property introduced in Definition 6 to hold, we need to check that x * * n -x * n ≥ 0. However, though we know the optimal solutions of the LPs are found at vertices of the feasibility set, they might not be unique. This means that players of C ∪{n} might choose different solutions than players of C ∪ {n}. By adding a quadratic perturbation to the SOs' cost functions in the form ε n∈C x n 2 for small enough ε, the perturbed problem picks the solution to the original problem with the smallest l 2 norm [START_REF] Mangasarian | Normal solutions of linear programs[END_REF], i.e., the perturbed problem has a unique solution. As such, G ε is concave since the x * and x * * solutions of the associated LPs coincide.

Proposition 4. The perturbed characteristic function game G ε approximates G for small enough ε.

Proof. From [START_REF] Mangasarian | Normal solutions of linear programs[END_REF], Thm. 2.4, if for any C ⊆ N G , the LP (30) has a solution and its constraints satisfy Slater's condition, then the iterative successive overrelaxations algorithm defined in [START_REF] Mangasarian | Normal solutions of linear programs[END_REF] is bounded and has an accumulation point for each ε ∈ (0, ε] for some ε > 0. To check these two conditions, we observe that the LP objective function has a finite closed domain and is well defined at all points of the feasibility set (30b)-(30c) defined by Ψ 0 (.), Ψ n (.) n . Therefore the LP is feasible and Slater's condition holds (see Remark II.3).

Corollary IV.1. The characteristic function cost game G ε is submodular.

Proof. This results follows directly from Proposition 3. Indeed, every concave game is necessarily submodular [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]. This, hence, allows us to prove the non-emptiness of the core, as shown next.

Theorem 2. The core of the perturbed characteristic function cost game G ε is non-empty and, asymptotically (i.e., for ε small enough), the grand coalition of G is stable.

Proof. Consider the following allocation linear program:

max y n∈N G yn, (37a)
s.t. n∈C yn ≤ v(C), ∀C ⊆ N G . ( 37b
)
It is quite obvious that C(G) = ∅ if and only if the optimum value of the linear program ( 37) is equal to v(N G ), in which case any optimal solution to (37) lies in C(G). Taking the linear program dual to [START_REF] Le Cadre | Parametrized inexact-admm based coordination games: A normalized nash equilibrium approach[END_REF], an equivalent condition for C(G) = ∅ can be obtained based on the concept of balanced sets. A collection B of nonempty subsets of N G is balanced if C∈B γ C v(C) ≤ v(N ) holds for every balanced collection B with weights (γ C ) C∈B . It is well-known that a game has a non-empty core if and only if it is balanced [START_REF] Bondareva | Some applications of linear programming methods to the theory of cooperative games[END_REF].

The cost game G ε being submodular from Corollary IV.1, (37) is equivalent to:

max y n∈N G yn, (38a)
s.t. n∈N G yn = n∈N G Φn(x * n ) + ε x * n 2 , (38b)
x * = arg min

x,z n∈N G Φn(xn) + ε xn 2 , (38c) s.t. Ax + Bz ≤ d, (38d) x ∈ X , z ∈ Z. (38e)
By construction, for a concave cost game like G ε , the Shapley 7 value is solution to [START_REF] Mangasarian | Normal solutions of linear programs[END_REF] and as such, belongs to the core of the game [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF], [START_REF] Shapley | Cores of convex games[END_REF]. The concavity of the game is the necessary condition for the Shapley value to be in the core. This implies that the core of G ε is never empty.

From Proposition 4, it is possible to construct a sequence of outcome solution of [START_REF] Mangasarian | Normal solutions of linear programs[END_REF], by computing the Shapley value of G ε , that converges to the core of G. Therefore, the core of G is non-empty and its grand coalition is stable. Theorem 2, hence, extends the stability results in the absence of the interface power condition stated in Proposition 1 by proving that asymptotically it is beneficial for the TSO and all DSOs to cooperate in a common market. 7 The Shapley value is introduced in detail and analyzed in Section V-A.

C. Cost Game Stability Under Nodal Pricing

In the prior derivations, c n was used in the cost function of the players, which would reflect a cost-based market clearing or a pay-as-bid mechanism. However, Theorem 1 and Theorem 2 can be readily extended beyond pay-as-bid for other pricing schemes, such as nodal pricing (i.e., locational marginal pricing) as shown, respectively, next.

Proposition 5. Assuming that each coalition C ⊆ N G not containing a TSO cannot unilaterally change their active power transfer between the TSO and the connected distribution networks and that the dual variable λ * of (38d) is unique, the core of the cost game G is non-empty under nodal pricing.

Proof. Under the assumption that each coalition C ⊆ N G not containing a TSO cannot unilaterally change their active power transfer between the TSO and the connected distribution networks, Theorem 1 applies. Equivalently, [START_REF] Mangasarian | Normal solutions of linear programs[END_REF] has a solution with ε = 0. Under nodal pricing, to compute the grand coalition value, we need to solve an optimization problem which is a special case of the relaxed form of (38c)-(38e) with ε = 0, where we replace A by I + A and set c n = 0, ∀n. From Theorem 1, we know it has a solution. Therefore, the core of G is non-empty under nodal pricing. Proposition 6. Assuming that the players coordinate in their evaluation of the coupling constraint dual variable λ * , and that it is unique, the core of the cost game G is asymptotically (e.g., for ε small enough) non-empty under nodal pricing.

Proof. Under nodal pricing, the cost game

G ε coalitional value becomes v ε (C) = n∈C λ * t n x * n +ε n∈C x * n 2
, where C ⊆ N G , (x * n ) n∈C is the optimum of (38c)-(38e) where Φ n (x n ) is replaced with λ * t n x n and λ * is the optimal dual variable of (38d). First, we note that the proof of Proposition 3 can be extended to nodal pricing. Indeed by assuming that the players coordinate in their evaluation of the dual λ * and that it is unique, we guarantee the uniqueness of the solution of the primal problem (38c)-(38e) and the rest of the proof can be directly transposed to the nodal pricing setting. Under nodal pricing, to compute the grand coalition value, we need to solve the following optimization problem:

max λ≥0 min (xn)n,(zn)n λ t (I + A)x + Bz -d + ε n xn 2 , (39a) s.t. xn ∈ Xn, zn ∈ Zn, ∀n ∈ N G . ( 39b
)
We note that it is a special case of the relaxed form of (38c)-(38e) where we replace A by I + A and set c n = 0, ∀n. Therefore, Proposition 4, Corollary IV.1 and Theorem 2 can be subsequently extended to nodal pricing.

After proving the stability of the cooperation of the SOs in the common market, we next present several cost allocation methods -based on which the total cost of flexibility procurement in the common market can be split -and analytically characterize their properties.

V. ALLOCATION MECHANISMS

We introduce several cost allocation mechanisms and study their properties for our TSO-DSOs cooperative game, based on efficiency, stability, and fairness criteria, which measure how well each SO allocated cost reflects its contribution to the total cost. We note that the assumption on the interface power flow in Proposition 1 is highly likely to arise in practice, as it is reasonable to consider that the interface power flow between a TSO and DSO can only be modified if the TSO and DSO belong to the same coalition, as this interface power exchange affects both SOs. Hence, in the cost allocation mechanisms in this section, we focus on this particular setting.

The properties for evaluating a cost allocation mechanism, Φ(G), are defined as follows:

(i)

Efficiency: n Φ n (G) = v(N G ). (ii) Dummy player: if a player n is a dummy in G, i.e., v(C ∪ {n}) = v(C), ∀C ⊆ N G \ {n}, then Φ n (G) = 0. (iii) Symmetry (equal treatment of equals): if n and n are equivalent in G, in the sense that v(C ∪ {n}) = v(C ∪ {n }), ∀C ⊆ N G , then Φ n (G) = Φ n (G).
(iv) Additivity:

Φ n (G + G) = Φ n (G) + Φ n ( G), ∀n ∈ N G .
(v) Stability: the cost allocation Φ(G) belongs to the core of the game G.

(vi) Anonymity: players' relabeling does not affect their cost allocation. If n and n are two players, and game G is identical to G except for exchanging the roles of n and n , then Φ n (G)=Φ n ( G). Note that (vi) implies (iii).

The studied cost allocation mechanisms are defined next.

A. Shapley Value (SV)

The Shapley value is a solution concept that is usually formulated with respect to the grand coalition: it defines a way of distributing the value v(N G ) that could be obtained by the grand coalition [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]. The SV is based on the intuition that the cost allocated to each agent (in our case to each SO) should be proportional to its contribution. A simplistic implementation of this solution would be to allocate cost to each SO according to how much it decreases the cost of the coalition of all other SOs when it joins it, i.e., set the cost of SO n to v(N G ) -v(N G \ {n}). However, under this cost allocation, the total cost assigned to the SOs may differ from the value of the grand coalition. To avoid this problem, we rely on an ordering of the SOs (0 for the TSO, from 1 to N D for the DSOs) and allocate a cost to each SO according to its contribution to the coalition formed by its predecessors in this particular ordering. That is, player 0 pays v({0}), player 1 pays v({1, 0}) -v({0}), etc. As can be easily observed, this cost allocation distributes the value of the grand coalition among the players. Define P N G as the set of permutations, e.g., one-to-one mappings from N G to itself. We introduce S p (n) as the set of all the predecessors of n in p ∈ P N G , i.e., S p (n) {n ∈ N G |p(n ) < p(n)} where < denotes the predecessor relationship. The SV of SO n is denoted SV n (G) and is given by

SVn(G) 1 N G p∈P N G ∆p(n), (40)
where ∆ p (n) v S p (n) ∪ {n} -v S p (n) measures the marginal contribution of n with respect to a permutation p. It can equivalently be written under the extended form:

SVn(G) = C⊆N G \{n} |C|!(N G -|C| -1)! N G ! v(C ∪ {n}) -v(C) . (41)
For each permutation (ordering) of the SOs, each SO bears a cost based on its contribution to the coalition formed by its predecessors in this permutation. The allocated cost is averaged over all possible permutations to guarantee the symmetry of the allocation.

By construction, SV(G) meets properties (i)-(iv) [START_REF] Shapley | Cores of convex games[END_REF]. In fact, the SV is the only cost allocation method that meets the four properties (i)-(iv) simultaneously. The anonymity property (vi) is also met by the SV, meaning that the SV does not discriminate between the SOs solely on the basis of their indices [START_REF] Hart | Shapley value[END_REF]. Finally, based on Theorem 1 and Theorem 2, property (v) is checked. The main challenge of the SV is in its computational complexity (NP -complete).

The computation process of SV is summarized as follows: (1) Calculate P N G , the set of all permutations.

(2) Calculate S p (n), the set of all the predecessors of n in

p ∈ P N G . (3) Calculate ∆ p (n) v S p (n) ∪ {n} -v S p (n) , the marginal contribution of n with respect to permutation p. (4) Calculate SV n (G) 1 N G p∈P N G ∆ p (n).

B. Normalized Banzhaf Index (B # )

Like the SV, the Banzhaf index B(G) measures the agents' expected marginal contributions. However, instead of averaging over all permutations of players, it averages over all coalitions in the game. The Banzhaf index of an SO n is denoted B n (G) and is given by:

Bn(G) 1 2 N G -1 C⊆N G \{n} v(C ∪ {n}) -v(C) . (42)
B(G) meets properties (ii)-(iv) [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]. Similarly to the SV, it meets also the anonymity property (vi). Because it lacks the efficiency property (i), B(G) is not in the core of G. To meet the efficiency property (i), a rescaled version of the Banzhaf index, called the normalized Banzhaf, has been proposed as:

B n (G) Bn(G) n ∈N G B n (G) . (43)
The B (G) meets properties (i)-(iii); however it loses (iv) [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF]. Similarly to B(G), it meets property (vi). We next prove that B (G) leads to a stable cost allocation. Proof. By construction, the normalized Banzhaf index is efficient. We need to check the non-deviation property, i.e., that n∈C B n (G) ≤ v(C), ∀C ⊆ N G . We notice that the normalized Banzhaf index is a convex combination of elements that are constructed in the proof of Th.2.27 in [START_REF] Chalkiadakis | Computational aspects of cooperative game theory[END_REF] to exhibit elements from the core of G ε . Since these elements belong to the core by construction, the normalized Banzhaf index is itself a convex combination of these elements, and the core of the cost game G can be shown to be a convex set. Hence, the normalized Banzhaf index meets the non-deviation property, which implies that it belongs to the core of G.

Similarly to the SV, both versions of Banzhaf index share exponential computational complexity rates, implying challenges for implementations on a large scale.

The computation process of B is summarized as follows: (1) Calculate C ⊆ N G \ {n}, the set of coalitions without agent n.

(2) Calculate v(C ∪ {n}) -v(C), marginal contribution of n
with respect to a coalition C. (3) Calculate the Banzhaf index B n (G) according to [START_REF] Frisk | Cost allocation in collaborative forest transportation[END_REF]. ( 4) Calculate the normalized Banzhaf index B n (G) according to [START_REF] Castro | Polynomial calculation of the shapley value based on sampling[END_REF].

C. Cost Gap Allocation Method (CGA)

This method coincides with the τ -value, introduced in [START_REF] Tijs | Game theory and cost allocation problems[END_REF]. Similarly to the SV, we define ∆ = ∆(n) n as the marginal cost vector. Its n-th coordinate is the separable cost of SO n:

∆(n) v(N G ) -v(N G \ {n}), ∀n ∈ N G . (44)
For each coalition C ⊆ N G , the cost gap of C is defined by:

g(C) v(C) -n∈C ∆(n) if C = ∅, g(∅) 0. (45)
The map g : 2 N G → R is the cost gap function of game G. It is noted that g(N G ) is equal to the non separable cost in G. In general, we consider g ≥ 0. The weight vector w is defined such that: w n min {C|n∈C} g(C), ∀n ∈ N G . For any characteristic function v such that g(C) ≥ 0, ∀C ⊆ N G and n∈N G w n ≥ g(N G ), the cost gap allocation method assigns the cost allocation:

y ∆ if g(N G ) = 0, ∆ + g(N G )( n∈N G wn) -1 w if g(N G ) > 0. (46)
The cost gap allocation CGA(G) meets the efficiency (i), dummy player (ii), anonymity (vi) and, therefore, symmetry (iii) properties [START_REF] Tijs | Game theory and cost allocation problems[END_REF]. CGA(G) is stable for N G < 4, but can lead to unstable outcomes for 4 ≥ N G [START_REF] Tijs | Game theory and cost allocation problems[END_REF]. CGA(G) gives rise to a closed-form calculation. However, it requires spanning the set of all coalitions

C ⊆ N G , |CS| = 2 N G -1.
The computation process of CGA is summarized as follows: (1) Calculate ∆(n), the marginal cost of agent n according to (44). (2) Calculate g(C), the cost gap of C according to [START_REF] Mou | Supporting Dataset for the Analysis on TSO-DSOs Cooperation and Stable Cost Allocation for the Joint Procurement of Flexibility (Network and Bid List)[END_REF].

(3) Calculate the weight w n min {C|n∈C} g(C), ∀n ∈ N G . (4) Calculate the CGA according to [START_REF] Sanjab | Data injection attacks on smart grids with multiple adversaries: A game-theoretic perspective[END_REF].

D. Lagrangian Based Allocation (L)

This method is an extension of the classical shadow price based cost split [START_REF] Frisk | Cost allocation in collaborative forest transportation[END_REF], with which it coincides when weak duality holds for the cost game G. In [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF], we obtain the dual λ for the coupling constraint (25b), and duals µ 0 , (µ n ) n for the individual constraints (25c), (25d). When solving [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF] for the grand coalition, we get v(N G ). The optimal dual solution has the property that:

v(N G )= λ t (Ax+Bz-d)+µ t 0 Ψ0(x0)+ n µ t n Ψn(xn). (47)
Since our problem is linear, each SO's contribution can be found by computing its contribution to the dual objective function value [START_REF] Frisk | Cost allocation in collaborative forest transportation[END_REF]. This cost allocation is efficient (i) under weak duality [START_REF] Owen | On the core of linear production games[END_REF]. Stability (v) is also achieved since efficiency (i) holds and the individual rationality condition is met by definition of the cost allocation and weak duality. From [START_REF] Karangelos | Cyber-physical risk modeling with imperfect cyber-attackers[END_REF], dummy player (ii), and additivity (iv) hold. However, symmetry (iii) and anonymity (vi) do not hold in general. As an illustration, since players who are equivalent in the game G can be discriminated based on price depending on their location on the network, the symmetry property (iii) does not hold. This, as a result, implies that the anonymity property (vi) cannot hold neither.

Lagrangian based cost allocation L(G) requires the computation of the grand coalition optimal value (e.g., solving a linear optimization program) and all the dual variables associated with the constraints in [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF]. Making use of a solver, the L(G) implementation is practically simple.

E. Equal Profit Method (EPM)

This cost allocation method aims at finding a stable cost allocation while minimizing the maximum difference in pairwise relative savings. This method is labeled the Equal Profit Method (EPM) [START_REF] Frisk | Cost allocation in collaborative forest transportation[END_REF]. The relative savings of SO n is computed as:

v({n}) -yn v({n}) = 1 - yn v({n}) . (48)
When a cost allocation is stable, v({n}) ≥ y n , this allocation is obtained using the solution of an LP problem:

min γ, (49a)
s.t. γ ≥ yn v({n}) - y n v({n }) , ∀n, n , (49b)
n ∈C

y n ≤ v(C), ∀C ⊆ N G , (49c)
n ∈N G y n = v(N G ), yn ≥ 0, ∀n. (49d)
EPM belongs to the core of the cost game G by construction, as (49c), (49d) define efficiency and individual rationality 8 respectively. This means that it meets the efficiency (i), and stability (v) properties. The symmetry property (iii) is naturally met from (49b) at the optimum. However, additivity (iv), anonymity (vi), and dummy player (ii) are not met in general. EPM requires the optimal solution of a constrained LP. Making use of a solver, its implementation is relatively simple.

F. Proportional Cost Allocation (PCA)

This cost allocation method aims to distribute the total cost of the grand coalition (i.e., the total cost of the common market), v(N G ), among the SOs depending on the volume of flexibility used by each of them. This is captured by the following computation of the allocated costs:

yn = wn.v(N G ). ( 50
)
Parameter w n captures SO n's share of the total procured flexibility, and is such that w n ≥ 0, ∀n ∈ N G , and n ∈N G w n = 1. Alternatively, in case stand-alone costs are used, it is equal to SO n's own cost when no coalitions are formed [START_REF] Frisk | Cost allocation in collaborative forest transportation[END_REF]:

wn = v({n}) n ∈N G v({n }) (51)
Note that a cost allocation is said to be individually rational if no SO pays more than its stand-alone cost, e.g., w n ≤ v({n}) v(N G ) , ∀n ∈ N G . The proportional cost allocation method is easy to understand, implement, and compute. Besides, it is stable if and only if:

n∈C wn ≤ v(C) v(N G ) , ∀C ⊆ N G . (52)
In case stand-alone costs are used (we refer to this specifically as PCA), the proportional allocation is stable when (52) holds, in which case (v) is met. The efficiency property (i) is always met due to the normalization of the weights. The symmetry property (iii) also holds, but neither anonymity (vi) nor dummy player (ii) hold. The computation process of PCA follows (50) and (51), which requires the solution of N G + 1 LPs to compute the characteristic function values.

A comparison of the properties of the different proposed cost allocation methods is provided in Table I. Regarding complexity (as shown in Table I), SV and B require spanning the full set of partitions of SOs into coalitions and are NPcomplete. On the contrary, PCA, L and EPM are O(N G ), i.e., their complexity grows linearly in the number of SOs. Finally, CGA grows with the number of possible coalitions, which translates into reaching a complexity of O(2 N G ). In terms of performance, only O(N G ) methods are scalable to a large number of SOs. O(2 N G ) and NP-complete methods, as SV or B , cannot be applied to large scale problems, though they can be approximated efficiently relying on sampling methods [START_REF] Castro | Polynomial calculation of the shapley value based on sampling[END_REF].

VI. NUMERICAL RESULTS

For the numerical results, we consider an interconnected system composed of the IEEE 14-bus transmission network connected to three distribution networks -namely, the Matpower 18-bus, 69-bus, and 141-bus systems. The topology of the interconnection is shown in Fig. 1. All network parameters are based on the corresponding cases in Matpower [START_REF] Zimmerman | Matpower: Steady-state operations, planning, and analysis tools for power systems research and education[END_REF], while the interface real and reactive power capacities are limited at [-1, +1] MW and [-1, +1] MVAr, respectively. We add base demand to the buses and adapt the capacity limit of lines, so that the initial system state (without any flexibility activation) shows anticipated congestions and system imbalance. Flexibility bids for both upward and downward flexibility are created over the different nodes. The submitted bids are drawn from a uniform distribution in the range of [START_REF] Heleno | Estimation of the flexibility range in the transmission-distribution boundary[END_REF][START_REF] Gonzalez | Determination of the time-dependent flexibility of active distribution networks to control their TSO-DSO interconnection power flow[END_REF]e/MWh for downward bids and [50, 55] e/MWh for upward offers, not to induce biases stemming from the submitted bids/offers. The full network data and list of bids, i.e., order book, used in the case study are available at [START_REF] Mou | Supporting Dataset for the Analysis on TSO-DSOs Cooperation and Stable Cost Allocation for the Joint Procurement of Flexibility (Network and Bid List)[END_REF].

We first showcase the benefit of cooperation in reducing the total system costs. Fig. 2 shows the incremental benefit of cooperation when adding additional DSOs up to the grand coalition as well as the impact that the interface flow limits have on the cooperation benefit. We consider first each SO alone (i.e. disjoint markets), then incrementally add one DSO to the coalition and compute the total costs. The coalition formed are denoted C 1 to C 8 (defined in Fig. 2), where C 1 represents the case of disjoint markets (i.e., singleton SOs) and C 8 the case of the grand coalition forming a common market. The notation in the coalition structures C 1 to C 8 of Fig. 2 uses internal brackets to group together SOs that are part of the same coalition in each of the coalition structures. For example, in C 4 , TN and DN 69 form a coalition, while DN 18 and DN 141 each form a singleton coalition (i.e., does not cooperate with any other SO). Fig. 2 shows the resulting total cost per coalition structure for three different levels of maximum interface flow limits, where the 50%×T p,max and 20%×T p,max cases reduce the interface flow maximum limit for each DSO to, respectively, 20% and 50% of its original value, T p,max . As can be seen from Fig. 2, adding more DSOs in the cooperation further reduces the total costs. For example, by comparing C 1 , C 2 , C 5 and C 8 (marked in bold font in Fig. 2), we can observe the way the sequential addition of DN 18 , DN 69 , and DN 141 to the TSO (TN) led to a significant decrease in total system costs for all values of interface flow limits (C 8 achieves 29%, 28%, and 12% reduction with respect to C 1 for, respectively, T p,max , 50%×T p,max , and 20%×T p,max ). For comparison, the total cost of each SO in disjoint markets is shown in Fig. 3, where the accumulation of these costs lead to the total cost of C 1 in Fig. 2. These costs result from the strict flexibility needs of each SO as they reflect the costs of disjoint markets (i.e., without cooperation). In this regard, the resulting individually purchased upward, downward, and total flexibility in those disjoint markets for each SO are shown in Fig. 4.

In addition to highlighting the reduction in total costs driven by cooperation, Fig. 2 also highlights the effect of allowing a higher level of interface power exchange on achieving a more efficient procurement of flexibility, as out of the three interface flow limits, the 20% × T p,max case achieves the least amount of savings. Indeed, Fig. 2 further showcases the way in which a tighter interface flow limit reduces the benefits introduced by cooperation, by showcasing the increased total cost under each coalition for the three limits T p,max , 50% × T p,max , and 20%×T p,max . However, the impacts of the interface flow limits on different DSOs vary significantly. By comparing bars of the same color in C 2 , C 3 and C 4 , we can see that C 2 shows the most severe variation in costs for a tighter interface flow limit. This reflects the fact that DN 18 is affected more significantly, as in this case study, DN 18 has the largest contribution to the total cost reduction in the common market (can be considered in that sense as the most influential SO). Hence, when its flow with the TSO is more limited, the benefit from cooperation significantly decreases.

In addition to the flexibility bids (prices and quantities) submitted from a given distribution network, the location of the distribution network itself within the system (i.e., the node in the transmission system to which the distribution network is connected) also plays a key role in its contribution to the cost reduction of the coalition. For example, we consider a case in which we place three identical 18-bus distribution networks including the same set of bids (denoted DN A , DN B , and DN C ) at different buses of the transmission network and evaluate the total costs when each DSO cooperates with the TSO (the corresponding network data for this use case is available in [START_REF] Mou | Supporting Dataset for the Analysis on TSO-DSOs Cooperation and Stable Cost Allocation for the Joint Procurement of Flexibility (Network and Bid List)[END_REF]). The numerical results are shown in Table II. Even though the distribution systems and the set of submitted bids from those systems are the same, the resulting cooperation-induced reduction in system costs are differentas shown Table II -due to the location of transmission system congestions. As shown in Table II, the total cost is reduced by 10.2% when the TSO cooperates with DN B (third row in Table II), but this saving drops to only 6.4% when the TSO cooperates with DN C (fourth row in Table II). We next investigate the resulting cost for each SO, in the grand coalition C 8 , under the different cost allocation methods. The stacked bars in Fig. 5 showcase the cost allocated to each system operator via the different mechanisms presented in Section V and summarized in Table I. Fig. 5 first shows the benefit of cooperation (as compared, e.g., to the disjoint market costs in Fig. 3. Indeed, the relative cost reduction for each SO under different cost allocation methods compared with a disjoint market in the case of T p,max is shown in Table III. Table III shows that in this particular setting, the TSO is benefiting the most of the cooperation in a grand coalition as compared to running disjoint markets. Nonetheless, all the other DSOs also achieve cooperation-driven cost reductions but with varying proportions. Fig. 5 also highlights the varying proportions of the total cooperation cost to be taken up by each SO under different cost allocation methods. For example, in the results of Fig. 5, considering the nominal T p,max case, the Shapley value leads all DSOs to bear a higher portion of the total cost as compared to, e.g., the PCA method. The results show that the SV, in this numerical setting, induces a shift in total cost from the TSO to the DSOs as compared to the PCA. Under this setting, the CGA is more favorable to the TSO as compared to the SV, while the PCA is less favorable, which is the opposite case to that of the DSOs. In addition, the EMP, for example, can help reducing the cost allocated to DN 18 , who, in general, bears the highest cost in all the allocation methods. However, the CGA and EPM do not cover some of the essential properties for adequate cost allocation (as shown in Table I). The interface flow limits have also a direct effect on the disparity of the costs borne by each SO. For example, as shown in Fig. 5, the 20%×T p,max limit increases the cost borne by the TSO for all cost allocation methods, while this limit helps reducing the cost borne by DN 18 under the Lagragianbased allocation method. In general, Fig. 5 shows that the tighter the interface flow limits the lower the difference in costs under the different cost allocation methods as cooperation becomes more limited and, hence, less consequential. The presented numerical results are specific to our numerical case analysis. However, they serve to highlight the fact that different cost allocations and interface flow limits can lead to disparity in the cost borne by each SO. Hence, choosing an adequate allocation scheme (meeting key properties in Table I) while reducing this disparity, are essential to achieving beneficial, stable, efficient, and fair cooperation among SOs for the joint procurement of flexibility resources. In general, the Shapley value is naturally a favorable choice, since it satisfies all the analyzed properties. Nevertheless, if a large number of SOs are involved, it would be too computationally challenging to use the Shapley value. The Normalized Banzhaf index is also NP-complete and suffers from a heavy computational load. Meanwhile, it loses the efficiency property and stability property. Therefore, B is the least favorable choice in this setting. CGA also shows computational complexity that can be challenging for a large set of SOs. In addition, as stability is one of the most desirable properties (for incentivizing cooperation), the CGA would likely not be adequate to implement for N G ≥ 4, as for N G ≥ 4, CGA is not guaranteed to be stable. The remaining three methods (L, EPM, and PCA) are relatively easy to compute, but they show a loss of a number of properties as compared to, e.g., the Shapley value. Nonetheless, their computational simplicity can encourage their practical implementation.

Hence, the choice between cost allocation methods depends on the methods' properties, as well as on the prior knowledge by each SO of the general cost that they will bear when cooperating in a common market under a specific cost allocation. However, in general, for each of the cost allocations that are stable, the cost that would be allocated for any SO in the common market is still lower as compared to the non-cooperation case (i.e., forming a disjoint or sub-common market), which, hence, encourages cooperation. As such, if a cost allocation method is stable and efficient, the trade-off between computational complexity and desirable remaining mathematical properties (and their effects in practice) can drive the decision for the choice of the best allocation method.

VII. CONCLUSION AND FUTURE OUTLOOK

In this paper, we have introduced a common market model for the joint TSO-DSOs procurement of flexibility. We have then developed a cooperative game approach to analyze the cooperation potential of SOs in the common market. In this regard, we have proven the stability of their cooperation, implying that cooperation in this common market can naturally arise without external intervention. In addition, we have analyzed several possible cost allocation mechanisms, to split the cost of the jointly procured flexibility among the participating SOs in a stable and adequate manner, while analyzing the properties of each of those methods. Our numerical results have further highlighted the benefits of this cooperation. In addition, the results have shown the paramount effect of the interface flow limits on the benefits of cooperation, highlighting the need for further investments to improve power exchange capabilities among the different grids. The numerical results have also highlighted the disparity that can be introduced by different cost allocation methods, where some methods lead to a shift in the costs borne by different SOs for the same market.

This work paves the way for several future extensions further investigating TSO-DSO cooperation for the procurement of flexibility. Indeed, the investigation of the proposed methodology to non-linear market models (e.g., second order cone programming relaxation of optimal power flow problems) could constitute a direct first extension of the current work. In addition, the impact of imperfect information on the social cost with respect to a benchmark situation in which the social cost is evaluated under full information, was numerically evaluated in [START_REF] Le Cadre | A game-theoretic analysis of transmission-distribution system operator coordination[END_REF]. A second interesting future direction would be to quantify how imperfect information in cooperative games impacts the cost allocation methods and SOs' costs, and build mechanisms that incentivize information sharing from SOs. In this regard, the current approach could also be extended to adversarial learning settings, taking into account the possible communication of false data regarding, e.g., the expected base power and loads [START_REF] Sanjab | Data injection attacks on smart grids with multiple adversaries: A game-theoretic perspective[END_REF]- [START_REF] Sanjab | Smart grid data injection attacks: To defend or not?[END_REF]. This constitutes an interesting third research direction. Finally, we note that in this analysis, a state of harmonization of entry requirements between the disjoint markets, the sub-common, and the common markets is considered, enabling FSPs to participate in the markets formed by the SOs' coalitions. A last future extension is to look into cases where different market structures (disjoint, sub-common, and common) can have different entry requirements, which may impact the potential benefits of cooperation.

  n T + n and ∆p n T - n , and ∆d n T + n and ∆d n T - n at each n ∈ N n T

Definition 7 .

 7 The core C(G) of the characteristic function game G = (N G , v) is the set of all efficient outcomes (CS, y * ) such that y * (C) ≤ v(C), ∀C ⊆ N G . The core of our cost game G can formally be defined as follows: C

Proposition 3 .

 3 as the ε approximation of the characteristic function game G for some ε ∈ (0, ε]. The characteristic function v ε of G ε is a regularized version of the characteristic function v of G. We start by proving an intermediate result that characterizes the cost game G ε . The perturbed characteristic function game G ε is concave.

  Pick any C ⊂ C and any n ∈ N G \ C . Let (x m ) m∈C ∪{n} be a solution to LP (30) over C ∪ {n}. The potential structure of GNEP(C ∪ {n}) implies that (x m ) m∈C ∪{n} ∈ SOL GNEP(C ∪ {n}) if and only if (x m ) m∈C∪{n} ∈ SOL GNEP(C ∪ {n}) and (x m ) m∈C \(C∪{n}) ∈ SOL GNEP(C \ (C ∪ {n})) , which is equivalent to (x m ) m∈C∪{n} is solution to LP (30) over C ∪ {n} and (x m ) m∈C \(C∪{n}) is solution to LP (30) over C \ (C ∪ {n}). Now, we compute v(C ∪ {n}) -v(C) = c t n x * n where x * n solves LP (30) over C ∪ {n}, and v

Proposition 7 .

 7 The normalized Banzhaf index B (G) meets the stability property (v) for the cost game G.

Fig. 1 :

 1 Fig. 1: Topology of the interconnection between the transmission (TN) and distribution networks. DN 18 , DN 69 and DN 69 are connected to node 2, 6 and 14 of TN, respectively.

Fig. 2 :Fig. 3 :Fig. 4 :

 234 Fig. 2: Total cost reduction when different coalitions are formed in three cases of interface flow limit

Fig. 5 :

 5 Fig. 5: SOs' costs, in the grand coalition C 8 , under different cost allocation methods and interface flow limit.

  where A C , B C , d C are constant matrices and vector defined locally to coalition C players.Proposition 1. If in each coalition C ⊆ N G containing only DSOs, the active power transfer between each DSO and TSO (T p n ) n∈C is fixed, then the characteristic function cost game G takes the form of a linear production game.

		and (x * n ) n∈C is the optimum of
	the optimization problem
	min (xn) n∈C ,(zn) n∈C	n∈C	Φn(xn),	(31a)
	s.t.	AC xC + BC zC ≤ dC ,	(31b)
		xn ∈ Xn, zn ∈ Zn, ∀n ∈ C,	(31c)

TABLE I :

 I Properties of the Cost Allocation Methods for cost game G.

	Properties	SV	B		CGA			L				EPM	PCA
	Efficiency
	Dummy player
	Symmetry
	Additivity
	Stability				if N G < 4						under (52)
	Anonymity
	Complexity	NP-complete	NP-complete		O(2 N G )		O(N G )		O(N G )	O(N G )
	Simplicity
				T p,max	50% × T p,max		20% × T p,max
		C8= {TN, DN18, DN69, DN141}
		C7= {TN, DN69, DN141}, {DN18}
		C6= {TN, DN18, DN141}, {DN69}
		C5= {TN, DN18, DN69}, {DN141}
		C4= {TN, DN69}, {DN18}, {DN141}
		C3= {TN, DN141}, {DN18}, {DN69}
		C2= {TN, DN18}, {DN69}, {DN141}
		C1= {TN}, {DN18}, {DN69}, {DN141}
			0	20	40	60	80	100	120	140	160	180	200
								Total cost [e]

TABLE II :

 II Total costs when identical DSOs located at different buses cooperate with the TSO. {TN}, {DN A }, {DN B }, {DN C } 43.15 {TN, DN A }, {DN B }, {DN C } 39.81 {TN, DN B }, {DN A }, {DN C } 38.74 {TN, DN C }, {DN A }, {DN B } 40.4

	Coalition	Total Costs [e]

TABLE III :

 III Relative cooperation-induced cost reduction under different cost allocation methods compared with a disjoint market in the case of T p,max .

		DN 18	DN 69	DN 141	TN
	SV	17%	23.2%	23.1%	46.1%
	B	14.2%	29 %	29.7%	45.9%
	CGA	10.6%	1.6%	0.2%	65.5%
	PCA	29.2% 29.2%	29.2%	29.2%
	EPM	21.2%	3.1%	0.4%	53.2%
	L	6%	3.1 %	0.4%	70.1%

The core is a game-theoretic concept used to assess cooperation stability, and will be formally defined in Section III.

The transmission-level flexibility market formulation builds upon transmission-level optimal power flow models that include a linear power flow representation (commonly known as the MW-only DC power flow model) based on generation shift factors as commonly implemented in North American electricity markets such as in[START_REF] Ott | Experience with PJM market operation, system design, and implementation[END_REF].

A cost allocation vector y for a coalition structure CS satisfies the individual rationality property if yn ≤ v({n}), ∀n ∈ N G , i.e., each SO weakly pefers being in the coalition structure to being on his own.

The authors have equally contributed to this work. This work is supported by the EU's Horizon 2020 Research and Innovation Programme under grant agreement No 824414 -CoordiNet project.

The work of Yuting Mou is in part supported by the Fundamental Research Funds for the Central Universities. 1 providing, as a result, a service to system operators.

APPENDIX COMPACT LP FORMULATION OF THE COMMON MARKET

We aim at expressing ( 22)- [START_REF] Du | Coordinating multi-microgrid operation within distribution system: A cooperative game approach[END_REF] in the compact linear matrix form in [START_REF] Saad | Game-theoretic methods for the smart grid: An overview of microgrid systems, demand-side management, and smart grid communications[END_REF]. To that purpose, we introduce M n T adj ∈ Mat(N n T , N n T ) as the adjacency matrix of graph G n T (N n T , L n T ), where M n T adj (i, j) = 1 if there exists a link connecting node i ∈ N n T to node j ∈ N n T ; 0 otherwise. Similarly, we define M T adj ∈ Mat(N T , N T ) as the adjacency matrix of G T (N T , L T ), where M T adj (i, j) = 1 if there exists a link connecting node i ∈ N T to node j ∈ N T ; 0 otherwise. In addition, we consider the generation shift factor (GSF) matrix Ξ ∈ Mat(L T , N T ) such that Ξ (i, j), n = X (i,j),n is the GSF of line (i, j) ∈ L T and node n ∈ N T . Moreover, for notation simplicity, we introduce vector 1 n T of size 1 × N T , with 1 n T (n T ) = 1; 0 otherwise. Similarly, for any i ∈ N n T , we introduce vector

, with 1 n T i (i) = 1; 0 otherwise. The square matrix with vector x on its main diagonal is denoted diag(x). M (n, :) denotes the n-th row of matrix M , while M (:, n) denotes its n-th column.

We start with the transmission side. It is clear that (2) is linear in x 0 and z. It can be written under the compact form:

n -p T,o n , ∀n ∈ N T . Then, (3) is linear in z leading to the compact linear formulation: -p T t Ξ(l, :) t + P T (i, j) + T p Ξ(l, :) t = 0, ∀l = {i, j} ∈ L T . Equation (4) applies to nodes on the transmission network, excluding nodes at the interface with the distribution networks. Equation ( 4) is also linear in z, taking the form: p T n -M T adj (n, :)(P T (n, :)) t = 0, ∀n ∈ N T \ N D . Equation [START_REF] Papavasiliou | Coordination schemes for the integration of transmission and distribution system operations[END_REF] focuses on nodes at the interface between the transmission and the distribution networks. It takes the compact form below, which is again linear in z: p T n -T p n -M T adj (n, :)(P T (n, :)) t = 0, ∀n ∈ N D . Finally, ( 6)-( 8) provides lower and upper-bounds on the variables P T (i, j) in z and on x 0 , respectively.

At the distribution side, we consider any DSO-n T ∈ N n T . ( 10) is linear in x n T and z: - 11) is linear only in z, and can be written as follows:

-( 14) are linear in z, giving rise to: 16) can be expressed as a function of z:

. Finally, ( 17)-( 21) impose lower and upper-bounds on x n T and z components.

Anibal Sanjab received his M.S. and Ph.D. in Electrical Engineering from Virginia Tech (VA, USA) in 2014 and 2018, respectively, and his B.E. in Electrical Engineering from the Lebanese American University (Byblos, Lebanon), in 2012. After serving as a postdoctoral associate at the Electrical and Computer Engineering Department at Virginia Tech, he joined the Flemish Institute for Technological Research (VITO) and EnergyVille (Belgium) in 2019 as a senior researcher in the energy technology unit. He is currently involved in various H2020 European and Belgian projects -including "CoordiNet", "OneNet", "EUniversal", "EPOC", and "Alexander" projects -and was previously involved in various USbased projects focusing on cyber-physical systems security, demand side management, and power system operation and statistical analysis. His research experience and current interests focus on game theory, optimization, electricity and energy markets, TSO-DSO coordination, prosumer-centric energy management, network tariff design, and cyber-physical systems. He has been awarded the best student paper award at the IEEE SmartGridComm in 2015 and is the recipient of the Fulbright scholarship for the years 2012-2014. Dr. Sanjab has served on the technical and organizing committees for a number of international conferences and workshops.

Hélène Le Cadre is an Inria researcher (chargée de recherche) at Inria Lille-Nord Europe research center, in France. She holds an MS.c degree in applied mathematics jointly delivered by the Ecole Normale Supérieure (ENS) de Rennes and the University of Rennes 1, and a Ph.D on network games from the same university. She graduated from Institut Mines-Télécom (IMT) Atlantique, with a speciality in information science and control theory. She worked as a research fellow and assistant professor at Ecole des Mines de Paris, at Sophia-Antipolis, France. She spent some time in Belgium: first in 2016, as a visiting researcher at the center for operations research and econometrics at University catholique of Louvain, and, later, at the Flemish Institute for Technological Research (VITO). These experiences enabled her to specialize in operations research techniques and market design. Her current research interests revolve around (algorithmic) game theory, optimization, machine learning and forecasting, with applications in energy, telecommunications, networks and societal-scale system problems.