A Combinatorial Double Auction for Community Shared Distributed Energy Resources

The integration of distributed energy resources (DERs), such as renewable energy (RE) and energy storage systems, can have many environmental and economic benefits. The sharing of medium-scale DERs can enhance these benefits by ensuring efficient resource utilisation and can promote sharing economy and economies of scale opportunities. In this paper, we design a combinatorial double auction (CDA) for DER sharing between multiple DER providers and a community of consumers. The proposed DER market addresses the complementarity of DER services and supports the environmentally sustainable behaviour of consumers. The purpose of the proposed auction is to allocate the limited DER resources efficiently without compromising the privacy or the comfort of consumers. First, the combinatorial bidding rules are designed and the social welfare optimisation problem is formulated. Then, utility maximising strategies for consumers with both economic and environmental objectives are proposed. Additionally, three types of DER providers are introduced, and their revenue maximising strategies are investigated. A case study with real world RE generation and demand data from the UK is presented. Simulation results show that the proposed CDA can greatly reduce energy emissions (by 24%) while also enhancing the revenues of DER providers, with gains up to 82%, when compared with the case where DER energy is sold through a $k$ -double auction.

The associate editor coordinating the review of this manuscript and approving it for publication was Chandan Kumar .

SES
Shared energy storage. SoC State of charge. SR Sellers' revenue. SWO Social welfare optimisation. V2G Vehicle-to-grid. WT Wind turbine. Energy demand of consumer i in kWh. VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ γ i Weight for emission savings of consumer i in £/g.CO 2 eq. λ g Price of grid energy in £/kWh. e g MEF of grid energy in g.CO 2 eq/kWh.

R ji
Equivalent resistance between DER provider j and consumer i in . V j Nodal voltage at the bus DER provider j is connected to in kV. λ k j Price of resource k offered by DER provider j in £/kWh. e k j MEF of resource k offered by DER provider j in g.CO 2 eq/kWh. E k j Energy limit of resource k offered by DER provider j in kWh. u ij Utility of consumer i by being matched with DER provider j in £. d k ij Energy demand requested by consumer i for resource k offered by DER provider j in kWh.
x ij Boolean (0 or 1) variables to match consumer i with DER provider j. J ij Disutility of consumer i resulting from energy cost and emissions in £. Inverter efficiency. P c,max BESS charging power limit in kW. P d, max BESS discharging power limit in kW. C B BESS capacity in kWh.

SoC init
BESS initial SoC in %. SoC max BESS maximum allowable SoC in %. e t PV MEF of PV energy at time t in g.CO 2 eq/kWh. e t B MEF of BESS energy at time t in g.CO 2 eq/kWh. P t WT ,gen Predicted WT generation at time t in kWh.

I. INTRODUCTION
Distributed energy resources (DERs) such as solar photovoltaic (PV), wind turbines (WT), and battery energy storage systems (BESS) have several technical, economic, and environmental benefits. Distributed generation can enhance system resilience and lower transmission losses. Dependence on grid supply can be reduced, thus deferring generation and transmission investments [1]. The utilisation of BESS can smooth demand volatility and counter the intermittency of renewable energy (RE) supply [2], thus allowing for higher penetration of RE, and reducing the CO 2 emissions of electricity consumption [3]. Nonetheless, reductions in feed-in tariffs [4] and low utilisation of individually-owned DERs [3] have motivated the design of DER sharing mechanisms, where prosumer communities can trade energy amongst themselves in peer-to-peer (P2P) markets. Such markets, however, suffer from privacy concerns [5], and complexity due to the large number of players who can be buyers and sellers interchangeably [6]. These limitations coupled with the high investment and space requirements of smallscale (1-10 kW) individually-owned DERs have promoted the investment in medium-scale (10-100 kW) community shared DERs [3]. Unlike the uncontrollable small-scale DERs, Community shared DERs can also limit some of the technical challenges of DER integration, which include voltage violations and overloading of distribution lines [7]. Investing in community shared DERs can also open the opportunity for economies of scale, which can further cut down the costs of DER integration. One of the main challenges of DER sharing is the design of a local energy market (LEM) that governs the strategic interactions between the DER owners and the consumers who wish to utilise DER energy services. A market mechanism consists of a tuple ⟨B, µ, π ⟩; a messaging (bidding) space B where market players interact by sharing information or by submitting their bids, an allocation rule µ that maps the players' bids to an outcome, and a payment rule π [8]. The challenge is to design the rules of the DER sharing market in a way that allocates the limited energy resources efficiently (i.e., in a way that maximises social welfare) while also preserving the privacy of consumers (i.e., without asking them to share their private information).

A. RELATED WORKS
Some studies have proposed LEM mechanisms for community shared DERs. The authors in [9] propose an optimisation approach for the capacity allocation of a shared energy storage (SES) to a community of consumers. In [10], a Stackelberg game is proposed to model the interactions between an SES provider and a retailer serving a community of prosumers. The authors in [11] propose a pricing scheme for a load aggregator that operates a SES serving consumers with demand elasticity. A cooperative game is formulated in [12] for buildings sharing an energy storage. The authors propose a fair cost sharing approach based on nucleolus and demonstrate its superiority to the Shapley approach. In [13], a two-stage optimisation model for sharing an energy storage is proposed. The SES provider determines capacity prices in the first stage and users determine their optimal charging schedule in the second stage. A bi-level energy trading framework is presented in [14], where the operation schedule of an energy storage shared by prosumers is determined in the lower level and the feasibility of this schedule is checked in the upper level according to the distribution network constraints. The authors in [15] propose a double auction mechanism based on a multi-armed bandit algorithm for energy trading between prosumers, where buyers/sellers select their bid prices from a discrete price set that is bounded from below by the FIT and by the grid price from above. The common limitation of these studies is that they treat the various DER energy services as substitutable items, failing to capture their complementary nature [8].
Others have proposed market mechanisms that allow for combinatorial bidding for the sharing of DERs. A combinatorial auction mechanism for SES capacity allocation and pricing is presented in [16], where consumers request SES capacity for multiple time intervals. The authors use a genetic algorithm to solve the winner determination problem. Although the temporal complementarity of energy usage is taken into consideration in the proposed mechanism, other types of complementary SES resources such as energy, charging, and discharging power were not considered. This is limiting as consumers have specific needs for energy and charging/discharging power. In [17], an online scheduling mechanism is developed for a community of prosumers sharing an energy storage. Prosumers bid their optimal SES usage profiles along with their valuation of these profiles in realtime, and the SES manager accepts/rejects those requests and updates its prices in a way that satisfies the operational constraints of the SES. The proposed online mechanism takes advantage of the complementarity of SES resources and accounts for the uncertainty in prosumers' storage needs, however it produces sub-optimal outcomes and does not account for the strategic behaviour of SES providers who can be profit oriented in practice with an objective to maximise their revenue. The authors in [18] propose a credit-based mechanism for DER sharing, where capacity and energy from an energy storage are priced using cost-based and demandbased methods. Although the proposed mechanism captures the revenue maximising behaviour of the DER provider and the cost minimising behaviour of the prosumers, it cannot be readily extended to more practical scenarios where multiple DER providers compete to provide their services to a community of consumers. The authors in [19] formulate the trading of energy storage usage rights as a bilevel optimisation problem, where consumers bid their optimal charging schedule in the upper level, allocation is determined in the lower level, and pricing is calculated based on the optimalities of both levels. The proposed trading mechanism is an iterative one, which can suffer from convergence complications due to communication delays or failure. In [20], two models for DER sharing in an apartment building are proposed; a social welfare optimisation model, where the objective of the DER provider is to maximise the aggregate benefit of its consumers, and a game-theoretic model, where the DER provider's objective is to maximise its revenue. Consumers' valuation function is formulated as the sum of cost saving, emission saving, and a value for the availability of DER. The main drawback of the proposed scheme is the assumption that the private preferences of consumers are known to the DER provider a priori, whereas in practice, consumers tend to avoid sharing their private information. An SES combinatorial auction is proposed in [21]. In the proposed auction, consumers submit their demand-price bids for the capacity, energy, charging power, and discharging power services of the SES, upon which the SES provider runs a winner determination and payment calculation algorithm that is based on social welfare maximisation. The auction is implemented in a day-ahead format, which can suffer in practice due to the uncertainty and stochasticity of distributed generation and due to the uncertainty and volatility of electricity demand. Additionally, the proposed auction cannot be readily extended to scenarios with multiple DER providers.
More relevantly, a few studies have presented energy market structures based on combinatorial double auctions. In [22], electric and heat energy resources are traded between multiple producers and consumers. Buyers bid their energy requirements and their reservation price (i.e., maximum price VOLUME 11, 2023  they are willing to pay) while sellers offer their produced energy and bid their reservation price (i.e., minimum price they are willing to accept). The authors propose a heuristic based on open book call markets to match demand and supply for both electricity and heat. The proposed market can result in inefficient outcomes and it does not take the environmental impact of the energy resources into consideration. The authors in [23] propose an auction for trading SES capacity, charging power, and discharging power resources, where sellers/buyers submit supply/demand and price bids. The auctioneer determines the clearing price and quantities by matching the supply and demand curves of each SES resource individually. Although the proposed double auction offers a simple methodology for trading multiple resources, it does not implement combinatorial bidding where bundled requests can either be accepted fully or rejected altogether. This is essential in combinatorial auctions because bidders value their requested bundles differently to each requested service individually. Additionally, the proposed mechanism also does not account for network losses, which can be significant in low voltage distribution networks. A combinatorial double auction for energy trading between microgrids is presented in [24]. Microgrids with surplus/deficiency in energy submit their quantity-price bids to an auctioneer, who then runs a winner determination algorithm based on a combination of a genetic algorithm and particle swarm optimisation. The authors, however, do not investigate the bidding strategies of the market players or the concept of emission reduction as a motivation for microgrids to choose which energy trades to undertake. The authors in [25] propose a day-ahead LEM for trading electricity and hydrogen between multiple providers and consumers. The proposed auction maximises social welfare and preserves the privacy of its consumers. Nonetheless, market clearing is based on an iterative algorithm where players keep updating their bids and the auctioneer keeps clearing the market until a convergence criterion is met.
Iterative mechanisms can have convergence speed concerns and can be manipulated by strategic behaviour (cf. [8]). Table 1 summarises the research gaps and highlights the contributions of the proposed CDA.

B. CONTRIBUTION
In this paper, we address the gaps highlighted in Table 1 and propose an LEM where multiple DER providers offer their energy services to a community of consumers. Consumers are modelled as rational agents who wish to minimise their energy costs. The DER sharing mechanism is designed in a way that allows for the environmentally sustainable behaviour of consumers who wish to minimise their energy emissions. The strategic revenue maximising behaviour of DER providers is also captured in the proposed mechanism. Due to the complementarity of DER services, the LEM mechanism we propose for DER sharing is based on a combinatorial double auction (CDA). The purpose of the proposed auction is to allocate the limited DER resources efficiently without compromising the privacy of consumers. The proposed auction also accounts for DER network losses, which are relevant when multiple DER providers are located distantly in low voltage distribution networks [26]. Additionally, to limit the effect of uncertainty in generation and demand on market outcomes, the proposed CDA is designed to be implemented in real-time format (hour-ahead). We simulate the proposed framework on the IEEE 37-bus network using real world generation and demand data from the UK. We also investigate the impact of DER sizing and pricing on generated revenue, and that of DER placement on DER energy losses.
The key contributions of this study are as follows: • A novel CDA is proposed for sharing DERs between multiple providers and a community of consumers. Social welfare maximisation, privacy preservation, and environmental impact consideration are key features of the proposed market.
• DER revenue maximising strategies of three types of DER providers operating different energy resources are proposed. Consumers' utility maximising strategies are also examined.
• Simulation of the proposed CDA on a modified IEEE 37-bus network with real-world generation and demand data is implemented. Strategic sizing, pricing, and placement of DERs are investigated.

C. PAPER ORGANISATION
The rest of the paper is organised as follows. The problem statement is discussed in Section II. Section III presents the proposed CDA market mechanism for DER sharing and investigates the bidding strategies of both buyers and sellers. Simulation results are shown and discussed in Section IV. Section IV also evaluates the performance of the proposed CDA in terms of some desired properties, which include efficiency, privacy preservation, and tractability. Conclusions are drawn and future research directions are discussed in Section V.

II. PROBLEM STATEMENT
In this section, we describe the problem facing the distribution system operator (DSO) who is tasked with designing and regulating a market for DER sharing between multiple DER providers and consumers. We assume that the DSO is a selfless non-profit operator whose objective is to maximise the total welfare of all market players, specifically by allocating the limited resources offered by the DER providers to the consumers who value these resources the most. The DER sharing market is assumed to be spatially bounded to a given area which lies within a distribution network operated by the DSO. We assume that the distribution network has bidirectional power flow capabilities that are not limited by physical network constraints (this assumption is further discussed in Section IV-E5). We also assume that the network is integrated with a communication infrastructure that allows for the exchange of information between the DSO and all market players. Consumers are assumed to be equipped with an automated agent that acts as an interface in the DER sharing market. Consumers need only input their preferences and their automated agents would bid in the auction on their behalf.
The system architecture of the proposed framework for DER sharing is shown in Fig. 1. Suppose that a distribution network has a number of DER providers, where M = {1, . . . , j, . . . , m} is the set of DER providers, and a number of consumers where N = {1, . . . , i, . . . , n} is the set of consumers. Each DER provider has a set of energy resources K j = {1, . . . , k, . . . , K }. Each resource k ∈ K j can be characterised by three parameters; energy limit in kWh, price in £/kWh, and emission factor in g.CO 2 eq/kWh. The marginal emission factor (MEF) of energy can be used as a representative to calculate the emissions of electricity consumption. According to [27], MEF is the best metric to evaluate the environmental impact of electricity demand. We assume that in the future smart grid, each unit of energy can be traced to its origin and it can be integrated with information about its MEF. The DSO can use MEF information in order to optimise the benefit of DER integration and capitalise on the environmentally sustainable behaviour of consumers. Furthermore, we assume that consumers have a fixed energy demand d i , measured in kWh, and are not willing to compromise their comfort by reducing or shifting this demand. Consumers can value utilising the offered DER services in two ways; saving on their energy costs, and reducing their energy carbon footprint [28]. Consumers who value reducing their emissions can do so by setting a weight γ i to their expected emission savings, which has a unit of £/g.CO 2 eq. Moreover, we assume that grid power is accessible to all market players and that grid prices λ g are demand-dependent and are broadcasted a day-ahead. We also assume that the MEF of grid power e g is calculated in real-time (hourly) and shared publicly. Finally, we assume that for each consumer i ∈ N , the DSO calculates the equivalent resistance R ji connecting them to each DER provider j ∈ M and provides them access to this information along with the nodal voltage V j for each DER provider. This is to provide consumers with the necessary network parameters for them to be able to estimate the network losses that result from DER utilisation. Note that only the losses in the shared DERs are considered in this study, since these losses affect the trading volume and revenues of the proposed LEM.

III. CDA FOR DER SHARING
The proposed auction is designed to have an hour-ahead format. This is preferable to the day-ahead format because it lessens the level of uncertainty in RE generation [29] and because it reduces the dimensionality, and thus complexity of the allocation problem. First, the DSO announces the start of the current auction round and broadcasts the price and MEF of grid power for the next hour, respectively, λ g and e g . Then, the DER providers who wish to participate in the current auction round are requested to bid their price λ k j , MEF e k j , and energy limit E k j for each energy resource type k ∈ K j they wish to offer. Consumers then submit their bids to the DSO for utilising the resources of each DER provider. Each consumer can submit up to m number of bids, each containing their demand for each resource offered by each DER provider. They are also asked to report the value they gain from getting the demand they are requesting. This value is denoted u ij , representing the utility consumer i gains by being matched with DER provider j. Hence, each consumer i is asked to submit bid i (j) = {d k ij , u ij } to the DSO for each DER provider j ∈ M, where d k ij is the demand request vector ∀k ∈ K j , and u ij is the scalar utility.
Example: Consider the following simple example with two DER providers, each offering two energy services. Table 2 shows the prices and MEF of the grid and the offered DER services. Assume Consumer A has a demand of 1 kWh and is a strictly cost minimising customer. The only service that would cut their cost is resource 1 from Provider I, VOLUME 11, 2023  saving them £0.1. Therefore their bid for Provider I would be bid 1 (I ) = {1, 0, 0.1} while their bid for Provider II would be bid A (II ) = {0, 0, 0}. Now assume Consumer B has a demand of 2 kWh and a value for emission reduction of γ B = 0.5 £/kg.CO 2 eq. Similarly, the only resource that would offer cost savings is resource 1 from Provider I. However it has no effect on emissions. Therefore Consumer B's value for getting their demand from this resource u BI would only derive from the cost saving of 2 kWh × (0.2 − 0.1) £/kWh = £0.2. Hence, their bid for Provider I would be bid B (I ) = {2, 0, 0.2}. In contrast, resource 2 from Provider II is the only resource that offers emission savings, however, without cost implications. The value of utilising this resource u BII would be 0.5 £/kg.CO 2 eq × 2 kWh × (0.2 − 0.05) kg.CO 2 eq/kWh = £0.15. Therefore, Consumer B would submit bid B (II ) = {0, 2, 0.15} for DER provider II.
Given the combinatorial nature of DER sharing, consumers' bids can either be accepted fully or rejected by the DSO. In the proposed auction, the DSO matches the consumers' bids to the bundles offered by the DER providers in a way that maximises social welfare. In settings with multiple sellers and buyers, social welfare consists of the sum of buyers' utilities and the sum of sellers' revenues. Denote the boolean variable vector that represents whether a bid is accepted or rejected as x ij , which is of length (n × m). Where x ij = 1 means that bid i (j) is accepted and consumer i is matched to DER provider j, while x ij = 0 means that bid i (j) is rejected. Consumers' total welfare (i.e., buyers' welfare) BW becomes: However only one bid can be accepted from each consumer, thus implementing an XOR bidding rule for buyers, which can be formulated as: the DER providers are assumed to be independent entities who are financially driven to optimise their own operating revenues. Note that investments and operating costs are neglected in the proposed CDA, given its short horizon (an hour-ahead). The total operating revenues of the DER providers (i.e., sellers' revenues) SR is: The objective of the DSO is to maximise social welfare by optimising the boolean variable vector x ij : Constraint 4a implements the XOR bidding rule, while constraint 4b ensures that energy limits of the DER resources are not violated. This social welfare optimisation (SWO) problem is an integer linear program (ILP) with boolean variables, which is similar to the 0-1 knapsack problem and is NP-hard. However, it can be solved using the branch and cut method [30] or using heuristics such as genetic algorithms [31].

A. CONSUMER BIDDING STRATEGY
Consumers are assumed to be rational agents whose objective from participating in CDA is to minimise their disutility. Consumers can lower their energy cost by purchasing from resources priced cheaper than the grid. They can also lower their environmental impact by using low-emission energy resources, thus gaining social value [32]. We assume that consumers can predict their energy demand d i of the next hour with negligible errors. Given the announced DER prices λ k j and MEF e k j , consumer i can determine the optimal demand vector d k ij they wish to get from each DER provider j by minimising their disutility J ij , where: where C ij and E ij respectively represent the cost and energy emissions of consumer i, if matched with DER provider j. γ i is the weight set by consumer i for emission reduction in £/g.CO 2 eq. Denoting the demand that is satisfied by the grid as d g i , the disutility function can be formulated as: Demand d i can either be met by the grid d g i or by DER sharing k∈K j d k ij . Nonetheless, losses in the demand met by DER can only be compensated by the grid.
where V j is the nodal voltage where DER provider j is located. The consumer's disutility minimisation problem becomes: where d g i is from (7). Constraint 8a ensures that the energy provided by DER does not exceed demand. This optimisation problem is a quadratic programming problem that can be solved using Karush-Kuhn-Tucker (KKT) multipliers method. The optimal disutility J * ij can be used to calculate utility u ij , where: At each auction round, consumers run this disutility minimisation problem for each DER provider and submit their bids containing optimal demand vector d k ij and utility u ij to the DSO.

B. DER PROVIDER BIDDING STRATEGY
DER providers are modelled as independent investors who wish to maximise their revenue by offering their energy services in CDA. In this section, we discuss the bidding strategies of three different types of DER providers; (i) a DER provider equipped with PV generation and a BESS, (ii) a DER provider equipped with WT generation and a BESS, and (iii) a DER provider operating an EV charging station and equipped with PV generation. Fig. 2 shows the different configurations of the three types of DER providers. Given that DER providers do not have access to the consumers' private utility information or to other providers' bidding information, DER providers can only assume that their offered services will be sold in CDA, and thus can optimise the offered quantities of these services.

1) DER PROVIDER WITH PV AND BESS (TYPE I)
Assume that a DER provider who has PV generation and a BESS can predict its PV supply a day-ahead. Denote this PV generation as P t PV ,gen , where t ∈ T , representing the 24 time steps (hours) in a day. The DER provider can either sell this supply directly in CDA whenever it is generated P t PV at price λ t PV or use it to charge their BESS P t PV ,B and sell it at a later time step. The DER provider can also charge its BESS from the grid P t g,B during off-peak demand periods when price is low and sell any stored energy P t B during peak demand periods at price λ t B . The DER provider schedules its BESS utilisation a day-ahead in order to optimise its revenue: subject to P t PV /η inv + P t PV ,B = P t PV ,gen ∀t ∈ T (10a) η inv P t g,B + P t PV ,B ≤ P c,max ∀t ∈ T (10b) where η c , η d , and η inv are the charging, discharging, and inverter efficiencies, respectively. P c,max and P d,max are the charging and discharging power limits of the BESS. C B is the BESS capacity, and SoC init and SoC max are the initial and maximum state of charge (SoC) of the BESS. Constraint 10a is for PV supply-demand balance, while constraints 10b-10d VOLUME 11, 2023 are for BESS operation. The initial (i.e., minimum) and maximum SoC levels are enforced to limit the operation of BESS within the linear zone of the charging and discharging curves, thus avoiding nonlinear charging/discharging cycles, and preventing overcharging/overdischarging. Note that battery leakage losses are assumed to be negligible. At each CDA round t, the DER provider offers their PV energy P t PV at price λ t PV and an MEF of e t PV . Similarly, they bid their stored energy P t B at price λ t B and MEF e t B . Although the DER provider can solve its revenue maximisation problem a dayahead, it can take advantage of the real-time format of CDA and adjust its offered services with more accurate predictions of its RE generation.

2) DER PROVIDER WITH WT AND BESS (TYPE II)
Similar to Type I, we assume that Type II DER provider can predict its WT generation a day-ahead with negligible errors, denoted P t WT ,gen . The DER provider can use this supply to charge its BESS P t WT ,B or sell it directly in CDA P t WT at price λ t WT . The revenue maximisation problem of Type II DER provider can be formulated as: subject to P t WT + P t WT ,B = P t WT ,gen ∀t ∈ T (11a) The DER provider then bids {P t WT , λ t WT , e t WT } for their WT energy, and {P t B , λ t B , e t B } for their stored energy, at each CDA round.

3) DER PROVIDER WITH RE AND AN EV CHARGING STATION (TYPE III)
An EV can act as an energy storage system and provide vehicle-to-grid (V2G) energy to local consumers. Note, we assume that an agreement between the charging station operator and the EV owners to use their V2G services is already in place. Nonetheless, the charging station can offer V2G energy in CDA. Assume that an EV arrives at the charging station at real time t arr l with an initial SoC SoC arr l , where l ∈ L, representing the set of connected EVs. Each EV makes a request by setting the departure time t dep l and required SoC level at departure SoC dep l . Each EV is also required to provide its minimum and maximum SoC levels, denoted SoC min,l and SoC max,l respectively, its capacity C l in kWh, its charging/discharging power limit P max,l , and its charging/discharging efficiency η c,l and η d,l . The real arrival time is mapped onto the CDA time steps using a ceiling rounding operator ⌈⌉ to obtain the smallest following time step t a l ∈ T . Similarly, the real departure time is mapped onto the CDA time steps using a floor rounding operator ⌊⌋ to obtain the largest previous time step t d l ∈ T . Given that EV's arrival is a stochastic process [33], the DER provider can form its revenue maximisation problem when an event occurs (i.e. when an EV arrives or departs abruptly before its scheduled departure time). Consequently, the scheduling horizon of the EV charging station starts from the time an event occurs t s ∈ T and ends at the latest departure time of any of the connected EVs t f = max(t d l ) ∈ T . Similar to Type I and Type II, the DER provider of Type III can either use its PV generation or grid power to charge an EV, respectively P t PV ,l and P t g,l , and offer its remaining PV energy P t PV and its EV discharging energy P t EV = l∈L P t EV ,l in CDA. Given that an EV can be involved in multiple scheduling instances (if an event occurs during its stay), we denote SoC init l as its initial SoC level at time t s , where: Assuming that the DER provider sets prices λ t PV and λ t EV for selling its PV and V2G energy services in CDA, the revenue optimisation problem of the DER provider becomes: Constraints 13a-13d are to ensure that the operational limits of each EV are not violated, while constraint 13e ensures that each EV depart with their requested SoC level. The DER provider bids {P t PV , λ t PV , e t PV } for their PV energy, and {P t EV , λ t EV , e t EV } for their stored energy, at each CDA round.

IV. RESULTS & DISCUSSION
A. SIMULATION SETUP Fig. 3 shows the network configuration used in this case study, which is based on the IEEE 37-bus network. 100 residential consumers were randomly distributed across load buses with demand data that was taken from the Low Carbon London project (LCLP) [34]. Aggregate demand of the 4,173 LCLP non-dynamic consumers was used to calculate hourly grid prices using a quadratic function (similar to [35], [36]) with 3.125×10 −3 £/MWh 2 and 0.1 £/MWh as the quadratic and linear price coefficients, respectively. Hourly data of the electricity marginal emission factors from the UK was provided by Electricity Maps [37] with an average of 423 g.CO 2 eq/kWh. Consumers' weights for environmental impact were randomly taken from [0, 0.1] £/kg.CO 2 eq. PV generation data for DER types I and III were taken from UK PV measurements [38], but were scaled to simulate a 60 kW PV array for type I and 30 kW for type III. Wind generation data was taken from a 100 kW turbine measurements [39]. Electricity marginal emission factor for PV and WT were assumed to be 50 g.CO 2 eq/kWh and 13.7 g.CO 2 eq/kWh, respectively [40]. Types I and II DER providers were each equipped with two Tesla Powerwall BESS, where each powerwall has 13.5 kWh capacity and 5 kW continuous charging/discharging power [41]. Since a round trip efficiency of 0.9 is only specified in the datasheet, we assume that η c = η d = √ 0.9. Type III DER provider is assumed to have level-2 AC chargers with a maximum power of 19.2 kW each [42]. EV data [43], arrival/departure times, initial/requested SoC levels, along with all data and code used in this simulation can be accessed at [44]. Inverter efficiency is assumed to be 0.98 [41]. DER prices were set at [0.95, 0.98, 1.00] of grid prices for RE and [0.90, 1.00, 0.95] of grid prices for stored energy for types I, II, and III respectively. The effect of DER prices on revenue is investigated in the following sections. Table 3 summarises the DERs used in this simulation.

B. MAIN RESULTS
In order to demonstrate the superiority of the proposed CDA over existing works, it is compared with two cases.
Case 1: A baseline system where consumers can only purchase energy from the grid and DER providers can sell their energy services through a feed-in tariff (FIT) scheme. The baseline system for Type III DER provider is based on cost minimisation where charging from the grid is scheduled at low price periods while satisfying the requested SoC level at EV departure. The FIT price λ FIT used to calculate DER  revenues in the baseline system was taken from the UK smart export guarantee scheme governed by Ofgem [45], where 0.055 £/kWh was the highest reported FIT in 2020. This tariff was used in the baseline system.
Case 2: A k-double auction ( [15], [46]) where market clearing is done by matching the supply and demand curves. In the k-double auction, supply and demand bids are sorted by price and then the market clearing price is calculated by λ mcp = kλ d + (1 − k)λ s , where λ d and λ s are the last demand and supply prices just before the supply-demand intersection point, and where k ∈ [0, 1] (see [15] for further details). In this scenario, we assume that consumers bid their demand and are willing to pay λ i ∈ [λ FIT , λ g ]. The parameter k was set at 0.5.
The proposed CDA and the two cases were simulated for a day (i.e., 24 CDA rounds). Fig. 4 compares the aggregate grid demand for consumers and for EVs between the proposed CDA and the two cases. It also shows the energy services offered by the DER providers and the ones purchased by the consumers. In the proposed CDA, consumers purchased 26% of their baseline demand from CDA and 75% from the grid, where losses in DER energy accounted for 1%. The difference in EV grid demand between CDA and the baseline system is due to two reasons; to offer V2G energy in CDA, and because all generation from Type III DER provider's PV was used to charge its connected EVs in the baseline system, whereas only half of that generation was used as charging power in CDA with the other half being offered directly to consumers. 98% of the energy offered by the DER providers was sold in CDA, while only 50% was sold in the k-double auction, with the other half being fed to the grid at the FIT. The advantage of the proposed CDA is that it allows consumers to bid for each energy resource, and thus consumers with a non-zero EI weight would value low-emission energy higher than the grid's. It should be noted that some of Type II's RE generation was used to charge its BESS and offered as stored energy in CDA. However, this offered stored energy was not wanted by consumers because it did not offer any cost or emission savings when compared with RE. Therefore, the strategic pricing of a provider's DERs is an important factor in its energy utilisation and thus its revenue maximisation. This is discussed in Section IV-C.
Next, the performance of CDA is compared with that of the two cases in terms of consumers' energy costs and emissions. Table 4 presents a comparison of the key performance indicators (emissions, costs, and revenues) between the three cases. This is also shown in Fig. 5 where the daily cumulative emissions and costs of the three cases are compared. Although the cost savings that result from participating in CDA were found to be minimal (1%), the savings in energy CO 2 emissions were at 24%, amounting to 483 kg.CO 2 eq, compared to the baseline system. This generated an aggregate value of £39.5 for all consumers, which takes the social welfare of CDA consumers to £46.5, where £7.5 were from cost savings. In contrast, the k-double auction resulted in a much lower social welfare (£19.3), where only £15 were from emission savings. The reason behind this is that market clearing in the k-double auction is only based on price and volume, whereas CDA allocates the low-emission energy to the consumers who value them the most. Fig. 5 also shows the daily cumulative revenues of DER providers for the three cases. The gain in revenue for Type I is almost the same for both CDA and the k-double auction (above 300%) when compared to the baseline system. This is because Type I's RE is priced the lowest, which always takes precedence in the k-double auction. The superiority of the proposed CDA over the two cases is demonstrated in the revenues of Type II and Type III providers. For Type II, CDA revenues were higher than cases 1 and 2 by 242% and 82%, respectively. These were at 400% and 75% for Type III. It should be noted that the revenues of Type III DER provider were offset in Fig. 5 by the minimum EV charging cost that was used in the baseline system.

C. STRATEGIC SIZING AND PRICING OF DER
Here, we study the effect of varying DER sizes and prices on the revenue of DER providers. First, PV power capacity and BESS size are varied for DER provider Type I. The impact of these different sizes on the provider's daily revenue is shown in Fig. 6. Evidently, the gain in revenue from each kW of added PV power capacity is much higher than that resulting from each added kWh of BESS capacity, which is 0.61 £/kW on average for PV compared to 0.12 £/kWh for BESS. Nonetheless, the gain in revenue from expanding PV power starts decreasing when the size of PV is beyond 300 kW. This emphasises the importance of the optimal sizing of DER on its return on investment. The following scenario investigates the impact of DER pricing on revenue. Assuming that a subset of consumers gain value by reducing their carbon footprint, low-emission DERs can be offered at higher prices than the grid's and still be purchased in CDA. Here, the revenue of Type II DER provider is calculated at various RE prices. Additionally, we show the effect of these prices on revenue when the consumers' average weight for emission savings is varied between 50 and 250 £/tonne.CO 2 eq. Fig. 7 demonstrates the results of this scenario simulation. While lower prices almost generate the same revenue across the different average EI  weights, higher prices severely cut revenues at low average EI weights but can also yield much greater revenues when EI weights are high. DER providers who have some information about the distribution of EI weights in their consumer communities can use it to their advantage and formulate their revenue maximisation problem as a stochastic optimisation problem and set their prices in a way that maximises their expected revenues. Moreover, a DER provider with multiple resources should maintain reasonable competition between their resources. This is to avoid having consumers bid for one of the resources for its competitive advantage (i.e., when a provider's resource offers larger cost and emission savings than the provider's other resources) and discard the other resources, thus diminishing their revenue. A rule of thumb would be to price low-emission resources higher than the ones with higher MEF. This ensures that cost-oriented consumers bid for the lower price resource, while environmentally sustainable consumers bid for the lower emission resource if it  generates higher value than the cost savings resulting from getting the lower priced resource.

D. DER PLACEMENT
One of the key advantages of DER utilisation is its ability to lower energy losses when installed near load centres. Indeed, the optimal placement of DERs is essential to fully exploit their benefits. Several studies are dedicated to the placement of DERs (See [47], [48] for example). In this paper, we merely study the effect of DER placement on the network losses in DER energy. Note that the network losses that result from normal load flow are not considered. In order to determine the optimal placement of the three types of DER providers, we first fixed the location of two providers at arbitrary buses of the IEEE 37-bus network and observed the DER losses that result from placing the third provider at the remaining buses. The location of that provider was then fixed at the bus that corresponded to the minimum losses. This was carried out iteratively until no improvement in losses was witnessed. Fig. 8 shows the daily cumulative DER losses for the case shown in Fig. 3 and for the optimal placement case, which located the three types of DER providers at buses 15, 3, and 32 respectively. DER losses were reduced by 60%. This highlights the importance of proper network planning and policy development.

E. PERFORMANCE EVALUATION
The proposed DER sharing mechanism deals with the combinatorial nature of DER energy services and allows for the environmentally sustainable behaviour of consumers. It can also be implemented in real-time (hour-ahead), which lessens the impact of uncertainty in RE and in demand. Additionally, the proposed market allows for multiple sellers and buyers, and it accounts for DER energy losses. Here, we evaluate the proposed mechanism in terms of fairness, market efficiency, strategy proofness, privacy preservation, and scalabilty.

1) FAIRNESS
The auction implements utilitarian division, which is defined as the allocation of goods to the buyers that value them the most, and is considered as one of the fairness criteria for resource allocation [49]. Additionally, the pricing of DER services is uniform to all consumers and is demandindependent. Constant uniform pricing is considered as a fair pricing approach [50]. Furthermore, the proposed mechanism is budget balanced, i.e., all payments made by the buyers are transferred to sellers, thus keeping the altruistic nature of the DSO intact.

2) EFFICIENCY & STRATEGY PROOFNESS
The proposed allocation rule is based on SWO and therefore is efficient. However, strategic consumers might bid their utility untruthfully to manipulate allocation decisions, which would compromise the efficiency of the market outcome. Incentive compatible mechanisms such as Vickrey-Clarke-Groves (VCG) and d'Aspremont-Gérard-Varet (AGV) can be directly applied to the proposed CDA to ensure that truthful bidding is the best strategy for rational consumers. Nonetheless, VCG is not a budget balanced mechanism and can therefore compromise fairness. Also, both VCG and AGV use nonlinear prices to incentivise truthfulness. Hence, a trade-off between strategy proofness and fairness needs to be assessed if consumers were to be strategic.

3) PRIVACY
One of the important features of any DER sharing mechanism is to preserve the privacy of its consumers. In the proposed CDA, consumers only bid their energy requirements from DERs and their utility gained from obtaining this energy. They are not asked to reveal any information about their baseline demand or their private utility function, which includes their EI weight and their value for electricity. Furthermore, DER providers do not have access to the consumers' bids in the proposed CDA, and therefore cannot use historical consumers' bid data to learn their private information.

4) COMPUTATIONAL COMPLEXITY
Given the real-time format of the proposed CDA, its tractability is paramount. One of the advantages of the proposed CDA is that it is a non-iterative mechanism and its outcome can be computed in one-shot. And although its real-time format limits the time available for computation, it eliminates the time aspect, and thus reduces the problem's dimensionality. Revenue maximisation problems of the DER providers (Eq. 10, 11, and 13) are all linear programming problems, which can be solved in polynomial time. Consumers' utility maximisation (Eq. 8) is a convex quadratic programming problem, which can also be solved in polynomial time. Average run time of the consumer's utility maximisation problem was found to be 39 ms.
To assess the scalabilty of the SWO problem (Eq. 4), computation time was observed when solving the problem for different numbers of consumers. This is shown in Fig. 9. As evident, even for extremely large numbers of participants, the proposed CDA can be conveniently implemented in realtime (hour-ahead).
All simulations were run in Python 3 environment, optimisation problems were solved using GUROBI interface in CVXPY. The hardware used had an Intel Core i7, 2.6 GHz processor and 8 GB RAM.

5) NETWORK CONSTRAINTS
An LEM consists of a physical layer where energy transactions are implemented and a virtual layer where market interactions and decisions take place. In this paper, we assume that the physical layer (i.e., distribution network) that the DSO operates has the capability to handle any DER sharing scenario. Nonetheless, this is not necessarily a limitation of the proposed CDA. Given that the developed market framework is regulated centrally, the DSO can check if any of the network constraints is violated after making an allocation decision and then update the SWO problem if necessary by implementing trading constraints on the consumers that are causing network infeasibilities.

V. CONCLUSION
In this paper, a combinatorial double auction was proposed for DER energy trading between multiple DER providers and multiple energy consumers. The proposed market mechanism addresses the complementarity of DER services and supports the environmentally sustainable behaviour of consumers. The proposed CDA does not only implement an efficient allocation rule that is based on social welfare optimisation, but it also protects the privacy of DER consumers. Additionally, the proposed CDA accounts for DER network losses and limits the effect of uncertainty in RE generation and in demand on market efficiency.
The strategies of disutility minimising consumers and revenue maximising DER providers were investigated. Three types of DER providers were considered, where each had two energy resources; PV generation and BESS, WT generation and BESS, and PV generation with V2G services.
The proposed market was simulated on the IEEE 37-bus network using real world energy generation and consumption data from the UK. Comparisons between the proposed CDA and two reference cases show that it optimises social welfare and enhances DER revenues and trading volumes. Moreover, strategic sizing, pricing, and placement of DERs are investigated. Furthermore, the proposed CDA was found to be scalable and fair in its allocation and payment rules.
Possible future research directions include designing an incentive compatible payment rule for the proposed CDA to ensure that truthful bidding is a dominant strategy for consumers. Investigating the strategic behaviour of DER providers who have some information about the consumers' private utility functions is another future research direction. In this research, we have assumed that the auctioneer (i.e., the DSO) is a non-profit agent whose objective is to maximise the social welfare of market players. It would be interesting to investigate the case where the auctioneer has financial objectives and aims to achieve maximum payoff from matching DER providers with consumers. With the recent development of power system inertia markets, interested researchers can investigate the concurrent participation of DER providers in local energy markets and in virtual inertia markets. Moreover, a mechanism for incentivising EV owners to provide V2G operating rights to the charging station manager can be designed. This mechanism needs to take the effect of V2G on battery life into consideration. Furthermore, several components of the proposed market architecture (which include bidding agents, auction algorithm, and messaging space) rely on internet-of-things (IoT) and a communication infrastructure. These can be vulnerable to malicious or adversarial attacks. A blockchain architecture can be proposed for implementing the bidding, energy, and payment transactions in the proposed market. This can enhance the security and reliability of the market's information and power exchanges.