# On Efficient Aggregation of Distributed Energy Resources

Zuguang Gao, Khaled Alshehri, and John R. Birge Z. Gao and J. R. Birge are
with Booth School of Business, The University of Chicago, Chicago, IL 60637,
USA. {zuguang.gao<EMAIL_ADDRESS>Alshehri is with the Systems
Engineering Department, King Fahd University of Petroleum and Minerals
(KFUPM), Dhahran, Saudi Arabia<EMAIL_ADDRESS>
###### Abstract

The rapid expansion of distributed energy resources (DERs) is one of the most
significant changes to electricity systems around the world. Examples of DERs
include solar panels, small natural gas-fueled generators, combined heat and
power plants, etc. Due to the small supply capacities of these DERs, it is
impractical for them to participate directly in the wholesale electricity
market. We study in this paper an efficient aggregation model where a profit-
maximizing aggregator procures electricity from DERs, and sells them in the
wholesale market. The interaction between the aggregator and the DER owners is
modeled as a Stackelberg game: the aggregator adopts two-part pricing by
announcing a participation fee and a per-unit price of procurement for each
DER owner, and the DER owner responds by choosing her payoff-maximizing energy
supplies. We show that our proposed model preserves full market efficiency,
i.e., the social welfare achieved by the aggregation model is the same as that
when DERs participate directly in the wholesale market. We also note that two-
part pricing is critical for market efficiency, and illustrate via an example
that with one-part pricing, there will be an efficiency loss from DER
aggregation, due to the profit-seeking behavior of the aggregator.

##  I INTRODUCTION

The increasing adoption of distributed energy resources (DERs) challenges
fundamental assumptions in existing electricity markets design and operation,
as end-consumers not only become proactive, but also small-scale producers who
can have significant impacts on the power system [1]. According to the North
American Electric Reliability Corporation (NERC), DER is “any resource on the
distribution system that produces electricity and is not otherwise included in
the formal NERC definition of the Bulk Electric System (BES)”[2]. The
existence of DERs causes a fundamental shift, because electric power demand is
largely assumed to be fixed from independent market operators’ (ISOs)
perspective [3, 4, 5, 6, 7]. This fundamental shift calls for the
quantification of the impacts of DERs on wholesale markets design. Such
quantification is not easy; ISOs do not have oversight over the distribution
power network, and hence, cannot include DER owners as market participants.
Furthermore, even if ISOs can oversee the distribution power system, it would
be a significant burden and impractical to include DER supply directly into
the wholesale electricity market operations through ISOs, due to the
communicational, computational, and operational complexity. 111The number of
market participants would grow from hundreds to millions.

Figure 1: Overall interactions in the proposed efficient aggregation model

Different models have been proposed to include DER supply into wholesale
electricity markets. One possibility is to have a Distribution System Operator
(DSO) acting as a market manager at the distribution level, and finding
socially-optimal dispatch, similar to ISOs [8, 9, 10, 11, 12, 13]. Another
possibility is to have fully-distributed electricity market designs, in which
end-consumers can trade energy among themselves [14, 15]. The third model,
which we adopt here, is to have an aggregating company whose role is to
collect energy from DER owners, and participate in the wholesale market as a
producer of electricity. This model has been adopted by California ISO and New
York ISO [16, 17], and seems to be realistic for practical implementation,
especially with FERC’s recent Order No. 2222 in September, 2020 [18]. The
aggregator here buys DER supply from their owners, and bids directly to the
ISO similar to generating companies. The relationship between the aggregator
and prosumers in the same geographical footprint is naturally monopolistic,
where aggregators become price-making in retail electricity markets as they
can send price offers to prosumers in order to collect DER supply. Such price
offers need to be high-enough so that DER owners are attracted to sell, but
small-enough so that the aggregator can maximize her profits. This profit-
seeking behavior can impact the overall electricity market efficiency, but at
the same time, due to the impracticality of direct DER participation into
wholesale markets, aggregators are necessary and important players. This gives
rise to the following important question: In the presence of a profit-seeking
and a monopolistic aggregator, is there an aggregation model that can attain a
socially optimal (efficient) market outcome? The presence of such a mechanism
can in fact be significant. First, in reality, aggregators are mostly profit-
seeking, and are often monopolistic, which makes the markets prone to
efficiency losses as demonstrated in [19, 20]. Second, it is infeasible for
DER owners to participate in wholesale markets, so the presence of such
intermediaries is inevitable. Third, if such a mechanism can be designed, it
would address various debates surrounding whether or not DER aggregation need
to be done by profit-making entities, or social intermediaries.

In this paper, we address the above question by proposing a DER aggregation
model that yields efficient market outcomes, even when a DER aggregator ${\cal
A}$ is monopolistic and profit-seeking. We analytically show that with our
proposed model, the optimal DER capacities being integrated through ${\cal A}$
are equivalent to a benchmark (ideal, not realistic) case in which DER owners
can directly participate in the wholesale market. Briefly, our aggregation
model utilizes a two-price offers $\bf(P,p)$ from ${\cal A}$ to the prosumers,
where $\bf P$ corresponds to a fixed DER owner participation costs (connection
charges), and the other prices $\bf p$ are for marginal acquisition of DER
capacities. We remark here that having one-price offer $\bf p$ would not yield
efficient market outcomes due to the monopolistic behavior of ${\cal A}$, as
shown in [19, 20]. For an overall illustration, refer to Figure 1. Here, we
adopt a game-theoretic analysis of the relationship between the prosumers and
${\cal A}$, and show that the equilibrium prices $(\bf P^{*},p^{*})$ and DER
capacities $\bf{x}^{*}(\bf P^{*},p^{*})$ attain efficient market outcomes.

The paper is organized as follows: Section II discusses the benchmark ideal
model. In Section III, we propose an efficient DER integration model, and
state the main theoretical results of the paper. Via illustrative examples, we
conduct simulations in Section IV to gain some practical insights. The paper
concludes in Section V.

#### Notation

We let $\mathbb{R}$ denote the set of real numbers, and $\mathbb{R}_{+}$
(resp. $\mathbb{R}_{++}$) denote the set of nonnegative (resp. positive)
numbers. For $z\in\mathbb{R}$, we let $[z]^{+}:=\max\\{z,0\\}$. In any
optimization problem, a decision variable $x$ at optimality is denoted by
$x^{*}$. We use boldface to distinguish a vector $\bf{x}$ from a scalar $x$.
For an event ${\cal X}$, we let $\mathds{1}\\{{\cal X}\\}$ denote the
indicator function.

##  II DIRECT PROSUMER PARTICIPATION MODEL (BENCHMARK)

In this section, we introduce an ideal model where prosumers can participate
(buy or sell) directly in the wholesale market, and no aggregator is present.
This model, though not realistic, serves as a benchmark for evaluating the
market efficiency of our following models. There are three parties in this
model: prosumers who can buy and sell energy directly in the wholesale market,
conventional generators who generate and sell electricity in the wholesale
market, and an independent system operator (ISO) who clears the wholesale
market. In the following, we describe the optimization problems solved by each
of these three parties. Figure 2 illustrates the interactions between
prosumers and the ISO.

Figure 2: Benchmark model

###  II-A Prosumer’s Problem

Consider a power network with $n$ nodes (locations). At each location $i$,
there are $N_{i}$ number of prosumers. We assume that each prosumer $j$ at
location $i$ can purchase energy at the wholesale price $\lambda^{i}$.
Furthermore, prosumer $j$ at location $i$ is endowed with a capacity
${C}^{i}_{j}\geq 0$ of power production222$C^{i}_{j}$ can be zero for
consumers with no DER supply, so the model includes those regular consumers.
from a collection of resources, such as solar panels, wall-mounted batteries,
and plug-in electric vehicles. The power produced can be consumed locally by
prosumer $j$ or sold (partially) back to the wholesale market, again at the
wholesale price $\lambda^{i}$. The prosumer observes $\lambda^{i}$ and decides
the amount of energy to buy/sell. Let $u^{i}_{j}$ be prosumer $j$’s utility of
power consumption. We make the following assumption on prosumers’ utility of
consumption.

######  Assumption 1.

Each prosumer’s utility of consumption $u^{i}_{j}$ is increasing, strictly
concave, and differentiable. Furthermore, the domain of $u^{i}_{j}$ is $[0,Z]$
where $Z>C^{i}_{j}$ is some (large) upper bound of the amount of energy a
prosumer can consume. We assume that $\frac{\partial u^{i}_{j}(z)}{\partial
z}\to\infty$ as $z\to 0$, and $\frac{\partial u^{i}_{j}(z)}{\partial z}\to 0$
as $z\to Z$.

We can then write prosumer $j$’s optimization problem as

$\displaystyle\max_{x^{i}_{j}-d^{i}_{j}}\pi^{i}_{j}(x^{i}_{j},d^{i}_{j}):=\lambda^{i}(x^{i}_{j}-d^{i}_{j})+u^{i}_{j}(C^{i}_{j}+d^{i}_{j}-x^{i}_{j})$
(1) $\displaystyle\quad\text{s.t. }\qquad C^{i}_{j}-Z\leq
x^{i}_{j}-d^{i}_{j}\leq C^{i}_{j},$

where $d^{i}_{j}$ is the amount of energy prosumer $j$ purchases and
$x^{i}_{j}$ is the amount of energy she sells. For selling $x^{i}_{j}$ at the
wholesale price, prosumer $j$ receives $\lambda^{i}x^{i}_{j}$; for buying
$d^{i}_{j}$ at the wholesale price, she is charged $\lambda^{i}d^{i}_{j}$. The
prosumer leaves with $C^{i}_{j}+d^{i}_{j}-x^{i}_{j}$ to consume and her
utility from consumption would be $u^{i}_{j}(C^{i}_{j}+d^{i}_{j}-x^{i}_{j})$.
While Assumption 1 further imposes strict concavity of prosumers’ utilities,
our analysis throughout this paper remains largely applicable to generic
concave utilities, but strict concavity allows us to derive unique analytical
solutions and gain deep insights.

We note that since prosumers at location $i$ can buy and sell energy at the
same price $\lambda^{i}$, prosumer $j$ essentially has $x^{i}_{j}-d^{i}_{j}$
as the single decision to make in solving (1), while we keep both $x^{i}_{j}$
and $d^{i}_{j}$ in the notation to clearly represent the amount of selling and
buying, and to be consistent with the notation in the following sections.

######  Lemma 1.

Under Assumption 1, given any $\lambda^{i}$, there exists a unique optimal
solution $(x^{i}_{j}-d^{i}_{j})^{*}$ for the prosumer’s problem (1) which
satisfies

$\displaystyle\frac{\partial u^{i}_{j}(z)}{\partial
z}\bigg{|}_{z=C^{i}_{j}-(x^{i}_{j}-d^{i}_{j})^{*}}=\lambda^{i}.$ (2)

The above Lemma directly follows from the properties of problem (1). Without
loss of generality, and for ease of exposition, we restrict our attention to
the case in which at most one of $x^{i}_{j}$ and $d^{i}_{j}$ can be nonzero.
We first solve (1) for $(x^{i}_{j}-d^{i}_{j})^{*}$. Then, we let
${x^{i}_{j}}^{*}=\left[(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}$ and
${d^{i}_{j}}^{*}=\left[-(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}$. We also use the
notation ${x^{i}_{j}}^{*}(\lambda^{i})$ and ${d^{i}_{j}}^{*}(\lambda^{i})$ to
denote the optimal response of prosumer $j$ at location $i$ for a given
wholesale market price $\lambda^{i}$.

###  II-B Generator’s Problem

Let $G_{i}$ denote the number of dispatchable conventional generators at
location $i$. Generator $j$ at location $i$ chooses to supply
$y^{i}_{j}\in\left[\underline{y}^{i}_{j},\overline{y}^{i}_{j}\right]$. Let
$c^{i}_{j}(y^{i}_{j})$ be denote the production cost. We have the following
assumption.

######  Assumption 2.

Each generator’s cost function $c^{i}_{j}$ is increasing, strictly convex, and
differentiable in $\left[\underline{y}^{i}_{j},\overline{y}^{i}_{j}\right]$.
Furthermore, we let $\frac{\partial c^{i}_{j}(y^{i}_{j})}{\partial
y^{i}_{j}}\to 0$ as $y^{i}_{j}\to\underline{y}^{i}_{j}$ and $\frac{\partial
c^{i}_{j}(y^{i}_{j})}{\partial y^{i}_{j}}\to\infty$ as
$y^{i}_{j}\to\overline{y}^{i}_{j}$.

By selling $y^{i}_{j}$, generator $j$ earns a compensation $\lambda^{i}y^{i}$.
Given a wholesale price $\lambda^{i}$, generator $j$ maximizes its payoff by
solving

$\displaystyle\max_{y^{i}_{j}\in\left[\underline{y}^{i}_{j},\overline{y}^{i}_{j}\right]}\hat{\pi}^{i}_{j}(y^{i}_{j}):=\lambda^{i}_{j}y^{i}_{j}-c^{i}_{j}(y^{i}_{j}).$
(3)

######  Lemma 2.

Under Assumption 2, given any $\lambda^{i}$, there exists a unique optimal
solution ${y^{i}_{j}}^{*}$ for the generator’s problem (3) which satisfies

$\displaystyle\frac{\partial c^{i}_{j}(y^{i}_{j})}{\partial
y^{i}_{j}}\bigg{|}_{y^{i}_{j}={y^{i}_{j}}^{*}}=\lambda^{i}.$ (4)

The above Lemma directly follows from the properties of problem (3). We also
use the notation ${y^{i}_{j}}^{*}(\lambda^{i})$ to denote the optimal response
of generator $j$ at location $i$ at a given wholesale price $\lambda^{i}$.

###  II-C The Economic Dispatch Problem

Wholesale electricity markets in the United States and other countries are
managed by independent system operators (ISOs). An ISO clears the market by
matching supply and demand via social welfare maximization (in practice, this
is often done by production cost minimization to meet fixed system demands [4,
5, 6]), while ensuring that the power flows satisfy the network and line
capacity constraints. Specifically, let $X^{i}=\sum_{j\in[N_{i}]}x^{i}_{j}$ be
the total power supply at node $i$ from prosumers; let
$Y^{i}=\sum_{j\in[G_{i}]}y^{i}_{j}$ be the total power supply at node $i$ from
conventional generators; and let $D^{i}=\sum_{j\in[N_{i}]}d^{i}_{j}$ be the
total demand at node $i$. Furthermore, we let ${\bf f}$ be the vector of
capacities of transmission lines in the power network, and let ${\bf B}$ be
the line-to-node incidence matrix. The system operator chooses a vector ${\bf
h}$, where each element $h^{i}$ is the net injection to node $i$. We have the
following network constraints:

$\displaystyle{\bf h=D-Y-X},$ (5a) $\displaystyle{\bf 1}^{T}{\bf
h}=0,\qquad{\bf Bh}\leq{\bf f}.$ (5b)

We note that (5a) ensures the total supply matches the total demand at each
node; (5b) ensures that the total net injection by the system operator is zero
over the power network (here, ${\bf 1}$ is a vector of ones), and the total
power transmission at each line does not exceed its capacity. In addition to
the network constraints, the ISO needs to also consider all participant-
specific constraints described earlier in problems (1) and (3):

${\bf C-Z\leq x-d\leq C,\qquad\underline{y}\leq y\leq\overline{y}}$ (6)

The objective of the system operator is to maximize the social welfare, which
includes the prosumer surplus (PS), generator surplus (GS), and merchandizing
surplus (MS):

$\displaystyle{\sf PS}$
$\displaystyle:=\sum_{i\in[n]}\left(\sum_{j\in[N_{i}]}u^{i}_{j}(d^{i}_{j}-x^{i}_{j}+{C}^{i}_{j})-\lambda^{i}(h^{i}+Y^{i})\right),$
(7a) $\displaystyle{\sf GS}$
$\displaystyle:=\sum_{i\in[n]}\sum_{j\in[G_{i}]}\left(\lambda^{i}y^{i}_{j}-c^{i}_{j}(y^{i}_{j})\right),\
{\sf MS}:=\sum_{i\in[n]}\lambda^{i}h^{i}.$ (7b)

where we have imposed the relationship (5a) in deriving (7a). The social
welfare that the system operator optimizes is the sum of PS, GS, and MS. After
canceling terms, the social welfare can be written as

$\displaystyle\mathcal{W}_{B}:=\sum_{i\in[n]}\left(\sum_{j\in[N_{i}]}u^{i}_{j}(d^{i}_{j}+{C}^{i}_{j}-x^{i}_{j})-\sum_{j\in[G_{i}]}c^{i}_{j}(y^{i}_{j})\right).$
(8)

The system operator’s economic dispatch problem is then:

$\displaystyle\max\qquad\mathcal{W}_{B}({\bf h,x-d,y})$ (9)
$\displaystyle\text{subject
to}\qquad\eqref{eq:directcons}-\eqref{eq:directcons_p}.$

######  Assumption 3.

The system operator’s economic dispatch problem (9) is feasible.

######  Proposition 1 (Competitive Equilibrium).

Under Assumptions 1-3, there exists a unique optimal solution $\left({\bf
h^{*},(x-d)^{*},y^{*}}\right)$ to (9). Denote the optimal Lagrange multipliers
of constraints (5a) by ${\boldsymbol{\lambda}}$. Then, the following
statements are true:

  * •

$\left(\bf x-d\right)^{*}$ and $\boldsymbol{\lambda}$ satisfy (2).

  * •

${\bf y}^{*}$ and $\boldsymbol{\lambda}$ satisfy (4).

The above proposition states that solving the system operator’s problem (9)
leads to a competitive equilibrium. From the prospective of prosumer $j$ at
node $i$, this means that given the wholesale market price $\lambda^{i}$ (the
optimal Lagrange multiplier of (5a) for the same node), the corresponding
solution to her problem, which satisfies (2), is the same as the optimal
decision made by the ISO via solving (9). This is also true for all other
prosumers and generators. Having all market participants being satisfied with
the the competitive equilibrium, it serves as a good benchamrk for market
efficiency.

##  III PROPOSED EFFICIENT AGGREGATION MODEL

The direct participation model introduced in the previous section is a
benchmark: prosumers are allowed to participate directly and sell their
production in the wholesale market. In reality, the supply capacities of
prosumers are typically too small for consideration in the wholesale market.
333California ISO requires a minimum of $0.5{\sf MW}$ for a DER aggregator to
participate [21], and New York ISO requires $0.1{\sf MW}$. Also, computing the
dispatch and settlement for a large number of prosumers raises an untenable
computational burden on the system operator. The presence of DER aggregators
brings benefits to the system, as they open the door for DER owners to
participate and bring more flexibility to the grid. However, the profit-
seeking nature of these aggregators can cause efficiency losses [19, 20]. To
resolve this, we propose in this section an efficient aggregation model under
two-part pricing. In this model, prosumers sell part of their DER supply
productions to an aggregator $\mathcal{A}$, based on the price offers made by
$\mathcal{A}$. The interactions between $\mathcal{A}$ and prosumers are
modeled as a Stackelberg game [22]. The aggregator acts as a leader and
announces a price pair $(P^{i}_{j},p^{i}_{j})$ for each prosumer $j$ at
location $i$. The prosumer follows by choosing the amount of energy to sell.
If the prosumer decides to sell a nonzero fraction of her capacity to the
aggregator, she pays to the aggregator a participation fee $P^{i}_{j}$, and
earns the price $p^{i}_{j}$ for each unit of energy sold. The aggregator
$\mathcal{A}$ then sells all these procured capacity to the wholesale market
at the wholesale price $\lambda^{i}$. The goal of the aggregator $\mathcal{A}$
is to choose prices $(P^{i}_{j},p^{i}_{j})$ that maximize her profit, while
anticipating how DER owners would respond. Note that here, DER owners have
access only to one aggregator, so ${\cal A}$ is in fact monopolistic, which
further signifies the importance of our mechanism as it yields socially-
optimal outcomes.

We also note that differential pricing is allowed in this model, i.e., the
price pair $(P^{i}_{j},p^{i}_{j})$ can be set differently for different
prosumers. While it is reasonable to have varying prices depending on
locations [23], there exist some debates on whether prices should be allowed
to set differently for prosumers from the same location. The legal issue is
not the main focus of this paper. Though we assumed differential pricing in
the model, the equilibrium we obtain in the end has the same marginal price at
each location, that is, $p^{i}_{j}=\lambda^{i},\ \forall j\in[N_{i}]$. The
participation fee can be differentiated by, for example, mailing different
coupons to different prosumers to encourage their participations, which is
arguably more justifiable. In the remainder of this section, we show that this
aggregation model achieves the same socially-optimal market outcomes as in the
direct participation model.

###  III-A Prosumer’s Problem

Consider prosumer $j$ at location $i$. Upon seeing the prices
$(P^{i}_{j},p^{i}_{j})$ announced by $\mathcal{A}$, prosumer $j$ decides if
she would sell part of her capacity to $\mathcal{A}$. If she chooses so, she
would pay a fee $P^{i}_{j}$ to $\mathcal{A}$, and receives $p^{i}_{j}$ for
each unit of energy sold. We may write prosumer $j$’s payoff as

$\displaystyle\pi_{j}^{i}(x^{i}_{j},d^{i}_{j}):=$
$\displaystyle\qquad\begin{cases}p^{i}_{j}x^{i}_{j}-P^{i}_{j}+u^{i}_{j}\left(d^{i}_{j}+{C}^{i}_{j}-x^{i}_{j}\right)-\lambda^{i}d^{i}_{j},\text{
if }x^{i}_{j}>0,\\\
u^{i}_{j}\left(d^{i}_{j}+{C}^{i}_{j}\right)-\lambda^{i}d^{i}_{j},\hfill\text{
if }x^{i}_{j}=0,\end{cases}$ (10)

Given $(P^{i}_{j},p^{i}_{j},\lambda^{i})$, prosumer $j$ solves:

$\displaystyle\max_{x^{i}_{j}\in[0,C^{i}_{j}],d^{i}_{j}\in[0,Z-C^{i}_{j}+x^{i}_{j}]}\
\pi_{j}^{i}(x^{i}_{j},d^{i}_{j}),$ (11)

where $d^{i}_{j}$ is the amount of energy prosumer $j$ purchases at wholesale
market price $\lambda^{i}$, 444In real markets, end-use customers are
represented in the wholesale market via utility companies. Here, for ease of
exposition, we omit the analysis of the relationship between utility companies
and end-use customers and assume that they represent the true preferences of
their customers in the wholesale market without modifications. This allows us
to focus on the strategic aggregation component of the problem. Nevertheless,
our insights remain largely applicable if this assumption is relaxed. and
$x^{i}_{j}$ is the amount of energy she sells to the aggregator. For buying
$d^{i}_{j}$ at the wholesale price, prosumer $j$ is charged
$\lambda^{i}d^{i}_{j}$. If the prosumer does not sell ($x^{i}_{j}=0$), she has
a total of $d^{i}_{j}+C^{i}_{j}$ to consume, and her utility from consumption
would be $u^{i}_{j}(d^{i}_{j}+C^{i}_{j})$. If the prosumer chooses to sell
$x^{i}_{j}>0$ to $\mathcal{A}$, she is charged a participation fee
$P^{i}_{j}$, and receives a compensation $p^{i}_{j}x^{i}_{j}$. The prosumer
would have $d^{i}_{j}+C^{i}_{j}-x^{i}_{j}$ to consume in this case and her
utility from consumption would be $u^{i}_{j}(d^{i}_{j}+C^{i}_{j}-x^{i}_{j})$.

Let ${x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j},\lambda^{i})$ and
${d^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j},\lambda^{i})$ denote the optimal response
of prosumer $j$ given aggregator’s announced prices $(P^{i}_{j},p^{i}_{j})$
and the wholesale market price $\lambda^{i}$.555Sometimes, we drop arguments
for simplicity. Note that if $p^{i}_{j}>\lambda^{i}$, the prosumer can
arbitrage by buying at the price $\lambda^{i}$ and selling at a higher price
$p^{i}_{j}$. This will result in the prosumer earning infinite payoff and
aggregator losing infinite profit, which would be avoided by the aggregator.
Therefore, we may without loss of generality restrict our discussions to the
case when $p^{i}_{j}\leq\lambda^{i},\forall i\in[n],j\in[N_{i}]$. In the case
$p^{i}_{j}=\lambda^{i}$, similar to the direct participation model, we may
enforce that $x^{i}_{j}$ and $d^{i}_{j}$ cannot both be nonzero. We then have
the following lemma on the optimal response of prosumers.

######  Lemma 3.

Consider an arbitrary prosumer $j$ at location $i$. Let $(z_{1},z_{2})$ be
such that

$\displaystyle\frac{\partial u^{i}_{j}(z)}{\partial
z}\Big{|}_{z=z_{1}}=\lambda^{i},\qquad\frac{\partial u^{i}_{j}(z)}{\partial
z}\Big{|}_{z=z_{2}}=p^{i}_{j}.$ (12)

Then, under Assumption 1, both $(z_{1},z_{2})$ exist and are unique.
Furthermore, prosumer $j$’s optimal response can be described as follows.

  * •

If $C^{i}_{j}\leq z_{2}$, then, we have

${d^{i}_{j}}^{*}=\left[z_{1}-C^{i}_{j}\right]^{+},\qquad{x^{i}_{j}}^{*}=0.$

  * •

If $C^{i}_{j}>z_{2}$, then, we have

${x^{i}_{j}}^{*}=\left(C^{i}_{j}-z_{2}\right)\cdot\mathds{1}\left\\{{\cal
X}\right\\},\qquad{d^{i}_{j}}^{*}=0,$

where

${\cal X}:=\\{P^{i}_{j}\leq
p^{i}_{j}\left(C^{i}_{j}-z_{2}\right)+u^{i}_{j}\left(z_{2}\right)-u^{i}_{j}\left(C^{i}_{j}\right)\\}.$

The above Lemma states that if the capacity exceeds a certain value $z_{2}$
(note that $z_{2}$ is the value at which the marginal utility of consumption
is equal to the aggregator’s marginal price offer $p^{i}_{j}$) and the upfront
fee $P^{i}_{j}$ is not too high, then prosumers have an incentive to sell DER
supply to the aggregator. If the capacity is too small or the upfront fee is
too high, then prosumers would not sell DER supply and prefer to consume it
locally.

###  III-B Aggregator’s Problem

The DER aggregator $\mathcal{A}$ collects power from prosumers and sells it in
the wholesale market. By offering the prices $(P^{i}_{j},p^{i}_{j})$ to each
prosumer $j$ at location $i$, $\mathcal{A}$ procures a total capacity of
$\sum_{j\in[N_{i}]}{x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j})$ from location $i$.
$\mathcal{A}$ then sells it at the wholesale market price $\lambda^{i}$. Given
the wholesale market price $\lambda^{i}$, the aggregator’s profit from
prosumer $j$ at location $i$ is

$\displaystyle\Pi^{i}_{j}\left(P^{i}_{j},p^{i}_{j}\right):=$ (13)
$\displaystyle\qquad
P^{i}_{j}\mathds{1}\left\\{{x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j})>0\right\\}+(\lambda^{i}-p^{i}_{j}){x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j}).$

Anticipating the response functions ${x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j})$’s,
she seeks to maximize her overall profit:

$\displaystyle\max_{\bf P\geq 0,p\geq
0}\underbrace{\sum_{i\in[n]}\sum_{j\in[N_{i}]}\Pi^{i}_{j}\left(P^{i}_{j},p^{i}_{j}\right)}_{=:\hat{\Pi}(\bf
P,p)},$ (14)

Aggregator $\mathcal{A}$’s profit is composed of two parts; the total
participation fees charged to prosumers who sell positive amount of energy and
the profits earned by reselling the procured energy in the wholesale market.
We note that ${\cal A}$’s profit from prosumer $j$ depends only on the
response and the prices of prosumer $j$, and there is no coupling among
prosumers’ problems. It should be clear that the Aggregator’s problem (14) can
be decomposed to optimizing $(P^{i}_{j},p^{i}_{j})$ for each prosumer at each
location:

$\displaystyle\max_{P^{i}_{j}\geq 0,p^{i}_{j}\geq
0}\Pi^{i}_{j}\left(P^{i}_{j},p^{i}_{j}\right).$ (15)

Solving (15) for each $i\in[n]$ and $j\in[N_{i}]$ would lead to the vectors
$\bf(P^{*},p^{*})$, which constitute an optimal solution for (14). We have the
following result on the optimal decisions of the aggregator.

######  Lemma 4.

Under Assumption 1, consider an arbitrary prosumer $j$ at location $i$, with
$z_{1}$ as in (12), and wholesale market price $\lambda^{i}$, When
$z_{1}<C^{i}_{j}$, the aggregator’s optimal pricing decision is

$\displaystyle{p^{i}_{j}}^{*}$ $\displaystyle=\lambda^{i},$ (16a)
$\displaystyle{P^{i}_{j}}^{*}$
$\displaystyle=\lambda^{i}(C^{i}_{j}-z_{1})+u^{i}_{j}(z_{1})-u^{i}_{j}(C^{i}_{j}).$
(16b)

When $z_{1}\geq C^{i}_{j}$, prosumer $j$ will not sell DER supply to ${\cal
A}$, i.e., $\Pi^{i}_{j}\left(P^{i}_{j},p^{i}_{j}\right)=0$, for any
$({P^{i}_{j}},{p^{i}_{j}})\in\mathbb{R}_{+}^{2}$.

Lemma 4 provides an optimal solution $({P^{i}_{j}}^{*},{p^{i}_{j}}^{*})$ to
(15), and the collection $\bf(P^{*},p^{*})$ form an optimal solution to (14).
We also note that the optimal solution may not be unique in general: ${\cal
A}$ may deviate from (16) by further decreasing ${p^{i}_{j}}^{*}$ and
increasing ${P^{i}_{j}}^{*}$ to earn the same profit, while keeping the
response of the prosumer $j$ being unchanged. This lemma states that there is
an optimal pricing scheme which sets the marginal price $p^{i}_{j}$ to be the
wholesale market price $\lambda^{i}$, and all prosumers at the same location
will be offered the same $p^{i}_{j}=\lambda^{i}$. The participation fees
$P^{i}_{j}$, however, will be charged differently for prosumers with different
utility functions. A keen reader would observe that in view of Lemmas 1 and 3,
the optimal DER supply to the wholesale market is the same with and without
the aggregator ${\cal A}$, thus making this aggregation model economically
efficient with socially optimal market outcomes.

###  III-C Aggregator-Prosumers Interaction as a Stackelberg Game

Let $\mathcal{G}(\boldsymbol{\lambda})$ denote the Stackelberg game among the
aggregator and the prosumers for a given vector of wholesale market prices
$\boldsymbol{\lambda}$. Aggregator $\mathcal{A}$ acts as a Stackelberg leader
and sets the prices $\bf(P,p)$. The prosumer follows by responding with
${x^{i}_{j}}^{*}(P^{i}_{j},p^{i}_{j},\lambda^{i})$. We now define the
equilibrium of the game.

######  Definition 1.

$\left(\bf P^{*},p^{*},{x}^{*}(P^{*},p^{*})\right)$ constitutes a Stackelberg
equilibrium of the game $\mathcal{G}(\boldsymbol{\lambda})$ if

  * •

Prosumers: For any $x^{i}_{j}\in\left[0,C^{i}_{j}\right]$, we have

$\pi_{j}^{i}\left({x^{i}_{j}}^{*}({P^{i}_{j}},{p^{i}_{j}}),{P^{i}_{j}},{p^{i}_{j}},\lambda^{i}\right)\geq\pi_{j}^{i}\left({x^{i}_{j}},{P^{i}_{j}}^{*},{p^{i}_{j}}^{*},\lambda^{i}\right)$

for all $i\in[n]$ and $j\in[N_{i}]$.

  * •

Aggregator: For all ${\bf P\geq 0,p\geq 0}$, we have

$\hat{\Pi}({\bf
P^{*},p^{*},x^{*}(P^{*},p^{*})},\boldsymbol{\lambda})\geq\hat{\Pi}(\bf{P,p,x^{*}(P,p)},\boldsymbol{\lambda}),$

We then have the following Stackelberg equilibrium for the game ${\cal
G}(\boldsymbol{\lambda})$, which follows directly from the prosumer’s optimal
response (Lemma 3) and the aggregator’s optimal pricing (Lemma 4).

######  Proposition 2.

Under Assumption 1, the game $\mathcal{G}(\boldsymbol{\lambda})$ admits a
Stackelberg equilibrium that satisfies

$\displaystyle{P^{i}_{j}}^{*}=\left[\lambda^{i}(C^{i}_{j}-z^{i}_{j})+u^{i}_{j}\left(z^{i}_{j}\right)-u^{i}_{j}(C^{i}_{j})\right]^{+}$
(17a) $\displaystyle{p^{i}_{j}}^{*}=\lambda^{i}$ (17b)
$\displaystyle{x^{i}_{j}}^{*}({P^{i}_{j}}^{*},{p^{i}_{j}}^{*})=\left[C^{i}_{j}-z^{i}_{j}\right]^{+}$
(17c)

for each prosumer $j$ at each location $i$, where $z^{i}_{j}$ satisfies
$\frac{\partial u^{i}_{j}(z)}{\partial z}\Big{|}_{z=z^{i}_{j}}=\lambda^{i}$,
and ${d^{i}_{j}}^{*}=\left[z^{i}_{j}-C^{i}_{j}\right]^{+}$.

We note that the game ${\cal G}(\boldsymbol{\lambda})$ may admit other
Stackelberg equilibria, but Proposition 2 provides the most economically
efficient one. In case of non-uniqueness, this economically efficient
equilibrium corresponds to the case where prosumers slightly prefer
participation, i.e., if selling $x^{i}_{j}$ amount of energy earns the
prosumer $j$ the same $\pi^{i}_{j}$ as not selling, then she chooses to sell
this $x^{i}_{j}$. 666Alternatively, one can impose a slight perturbation of
${P^{i}_{j}}^{*}$ to ${P^{i}_{j}}^{*}-\epsilon$, where $\epsilon>0$, to ensure
maximum DER supply. The above equilibrium is quite intuitive, ${\cal A}$
passes the location marginal price $\lambda^{i}$ obtained from wholesale
market outcomes as is to prosumers, so ${\cal A}$ has no marginal profits from
${\bf p}^{*}$. Instead, ${\cal A}$ makes all of the profits from the upfront
participation fees ${\bf P^{*}}$.

###  III-D Generator’s Problem

For a given wholesale market price $\lambda^{i}$, the conventional generators
solve the same problem as described in Section II-B, and the result of Lemma 2
still applies under the current aggregation model.

###  III-E The Economic Dispatch Problem

The system operator solves an optimization problem similar to that in the
direct participation model as described in Section II-C. The network
constraints (5) remain valid. Besides, the ISO also considers participant-
specific constraints:

${\bf 0\leq x\leq C,\quad 0\leq d\leq Z-C+x,\quad\underline{y}\leq
y\leq\overline{y}}$ (18)

The objective of the system operator is to maximize the social welfare, which
now includes the prosumer surplus (PS), aggregator surplus (AS), generator
surplus (GS), and merchandizing surplus (MS):

$\displaystyle{\sf PS}$
$\displaystyle:=\sum_{i\in[n]}\sum_{j\in[N_{i}]}\Bigg{(}u^{i}_{j}(d^{i}_{j}-x^{i}_{j}+{C}^{i}_{j})-\lambda^{i}d^{i}_{j}$
$\displaystyle\qquad\qquad\qquad\qquad+p^{i}_{j}x^{i}_{j}-P^{i}_{j}\mathds{1}\left\\{x^{i}_{j}>0\right\\}\Bigg{)}$
(19a) $\displaystyle{\sf AS}$
$\displaystyle:=\sum_{i\in[n]}\sum_{j\in[N_{i}]}\Bigg{(}P^{i}_{j}\mathds{1}\left\\{x^{i}_{j}>0\right\\}+\lambda^{i}x^{i}_{j}-p^{i}_{j}x^{i}_{j}\Bigg{)}$
(19b) $\displaystyle{\sf GS}$
$\displaystyle:=\sum_{i\in[n]}\sum_{j\in[G_{i}]}\left(\lambda^{i}y^{i}_{j}-c^{i}_{j}(y^{i}_{j})\right),{\sf
MS}:=\sum_{i\in[n]}\lambda^{i}h^{i}.$ (19c)

The social welfare is the sum of the above four terms. By the supply-demand
balance ${\bf h=D-Y-X}$, and after canceling terms, we write the social
welfare as

$\displaystyle{\cal
W}_{A}:=\sum_{i\in[n]}\left(\sum_{j\in[N_{i}]}u^{i}_{j}(d^{i}_{j}+{C}^{i}_{j}-x^{i}_{j})-\sum_{j\in[G_{i}]}c^{i}_{j}(y^{i}_{j})\right),$
(20)

which is the same as ${\cal W}_{B}$ in (8). The system operator’s economic
dispatch problem is then:

$\displaystyle\max\qquad\mathcal{W}_{A}({\bf h,x,d,y})$ (21)
$\displaystyle\text{subject to}\qquad\eqref{eq:directcons},\
\eqref{eq:aggcons_p}.$

######  Assumption 4.

The system operator’s economic dispatch problem (21) is feasible.

As the system operator solves (21), the wholesale market prices
$\boldsymbol{\lambda}$ are given by the optimal Lagrange multiplier of the
constraint (5a). We then have the following proposition.

######  Proposition 3 (Competitive Equilibrium).

Under Assumptions 1, 2, 4, there exists an optimal solution $\left({\bf
h^{*},x^{*},d^{*},y^{*}}\right)$ to (21). Let ${\boldsymbol{\lambda}}$ denote
the corresponding optimal Lagrange multipliers of constraints (5a). Then, the
following statements are true:

  * •

$(\bf x^{*},\bf{d}^{*})$ are consistent with Lemma 3, given $\bf(P^{*},p^{*})$
and $\boldsymbol{\lambda}$.

  * •

${\bf(P^{*},p^{*})}$ are consistent with Lemma 4, given ${\bf x^{*}}$ and
$\boldsymbol{\lambda}$.

  * •

${\bf y}^{*}$ satisfies (4), given $\boldsymbol{\lambda}$.

We now present the following theorem, which states that our proposed
aggregation model achieves the same market efficiency as the benchmark direct
participation model.

######  Theorem 1 (Main Result).

Let ${\cal W}_{A}^{*}$ be the optimal social welfare of (21), and let ${\cal
W}_{B}^{*}$ be the optimal social welfare of (9). Then, we have that

$\displaystyle{\cal W}_{A}^{*}={\cal W}_{B}^{*}.$ (22)

Further, we have that the optimal ${\bf x^{*},d^{*},y^{*}}$ (from Proposition
3) solving (21) are the same as those solving (9).

In summary, under the proposed aggregation model, the aggregator procures
energy from prosumers using two-part pricing, the aggregator would optimally
pay the wholesale market price to the prosumers for each unit of energy
procured, while the participation fee is differently charged to each prosumer
as the additional consumer surplus when she sells those energy compared with
not selling (which is dependent on her utility of consumption). Theorem 1,
together with Proposition 3, implies that under the aggregator’s two-part
differential pricing scheme, the prosumers’ optimal buying and selling
behavior is exactly the same as those in the direct participation model. As a
result, the social welfare achieved under the aggregation model matches that
of the direct participation model, i.e., there is no loss of market efficiency
from the aggregation.

######  Remark 1.

The significance of Theorem 1 follows from the fact that via our proposed
aggregation model, DER aggregation through a profit-seeking aggregator ${\cal
A}$ is equivalent to solving a socially-optimal economic dispatch model where
${\cal A}$ is absent. Hence, the potential efficiency loss due to presence of
a monopolistic profit-seeking aggregator ${\cal A}$ is off-set by two-part
pricing. This is not possible via one-part pricing, as demonstrated in [19,
20] and in Section IV, where efficiency loss arises from the profit-seeking
behavior of ${\cal A}$.

##  IV ILLUSTRATIVE EXAMPLES

Figure 3: Left: Efficient aggregation vs. no DER integration. Adding more
prosumers attains a higher social welfare. Middle: Comparison between the two
extremes (efficient aggregation vs. no DER) and the one-part pricing model
(inefficient). Right: Quantification of the efficiency loss for the one-part
pricing model, via the metric PoAg.

In this section, we illustrate our results via stylized examples, with the
goal of revealing some key insights. For ease of exposition, we consider a
power system with 1 node, and hence, there are no network constraints. We
remark that however, our theoretical results still hold for any power network.
We also assume that there is a fixed demand $\bar{D}$, and thus (5a) becomes

$\displaystyle{D+\bar{D}-Y-X=0}.$ (23)

We also consider one conventional power generator with cost

$c(y)=\alpha y^{2}+\beta y.$

With one prosumer, consider the isoelastic utility function $u$, with risk-
aversion parameter $\eta$ [24]:

$\displaystyle u(z)=\begin{cases}\frac{z^{1-\eta}-1}{1-\eta}&\eta\geq
0,\eta\neq 1,\\\ \ln(z)&\eta=1.\end{cases}$ (24)

When $\eta=0$, the prosumer is risk-neutral, for $\eta>0$, the prosumer is
risk-averse, and increasing $\eta$ implies more risk-aversion. For
$C>p^{-1/\eta}$, from Proposition 2, the Stackelberg equilirium prices of the
game ${\cal G}({\lambda})$ are

${p}^{*}=\lambda,\quad
P^{*}=\left[\lambda\left(C-\lambda^{-1/\eta}\right)+u\left(\lambda^{-1/\eta}\right)-u(C)\right]^{+},$

and the equilibrium response is

${x}^{*}({P}^{*},{p}^{*})=C-\lambda^{-1/\eta}.$

We note that by Lemma 3, the case when $C\leq\lambda^{-1/\eta}$ corresponds to
$x^{*}=0$ and $d^{*}=\lambda^{-1/\eta}-C$. The ISO’s problem for this single-
prosumer case is then:

$\displaystyle\max\qquad\mathcal{W}_{A}({x,d,y}):=u(C-x+d)-c(y)$ (25)
$\displaystyle\text{subject to}\qquad\bar{D}+d-x-y=0,\quad 0\leq
y\leq\bar{y},$ $\displaystyle\qquad\qquad\qquad 0\leq x\leq C,\quad 0\leq
d\leq Z-C+x.$

We compare the optimal value of (25), i.e., the optimal social welfare, with
the following alternative models.

1) _No DER participation model_

In this model, the prosumer is restricted to not selling her energy, i.e.,
$x=0$. The ISO’s problem is the same as (25) with the additional constraint
that $x=0$, i.e.,

$\displaystyle\max\qquad\mathcal{W}_{N}({d,y}):=u(C+d)-c(y)$ (26)
$\displaystyle\text{subject to}\qquad\bar{D}+d-y=0,\quad 0\leq y\leq\bar{y},$
$\displaystyle\qquad\qquad\qquad 0\leq d\leq Z-C.$

2) _One-part pricing model ( $P=0$)_

In this model, the prosumer may sell her energy to the aggregator ${\cal A}$
at a fixed marginal price $p$ set by ${\cal A}$, with no participation fees.
In this model, the prosumer solves

$\displaystyle\max_{x,d}\pi(x,d)=u(C+d-x)-\lambda d+px$ (27)
$\displaystyle\text{s.t. }\quad 0\leq x\leq C,\quad 0\leq d\leq Z-C+x.$

With the isoelastic utility function (24), an optimal response of the prosumer
is

$d^{*}=\left[\lambda^{-1/\eta}-C\right]^{+}\quad\text{and}\qquad
x^{*}=\left[C-p^{-1/\eta}\right]^{+}.$

Note that if $C\leq\lambda^{-1/\eta}$, then $d^{*}\geq 0$ and $x^{*}=0$, which
leads to zero profit of the aggregator for any $0\leq p\leq\lambda$, leading
to no DER dispatch at the wholesale market level. If $C>\lambda^{-1/\eta}$,
then the aggregator would choose a $p$ such that $C>p^{-1/\eta}$, and she
solves

$\max_{0\leq
p\leq\lambda}\Pi=(\lambda-p)x^{*}(p)=(\lambda-p)\left(C-p^{-1/\eta}\right).$

In this case, the Stackelberg equilibrium of the aggregator-prosumer game
$\hat{{\cal G}}({\lambda})$ (this is a different game from ${\cal
G}({\lambda})$, but similarly defined) is given by $(x^{*}(p^{*}),p^{*})$ that
satisfy

$(1-\eta)p^{*}+\eta C{p^{*}}^{1+1/\eta}=\lambda,\quad
x^{*}(p^{*})=C-p^{-1/\eta}.$

If we let $\eta=1$ (logarithmic utility), we then have

$p^{*}(\lambda)=\sqrt{\frac{\lambda}{C}},\quad x^{*}(p^{*})=C-p^{-1}.$

Now, the next question is, how can we define the corresponding social welfare.
Note that here, the Stackelberg equilibrium $(x^{*}(p^{*}),p^{*})$ does not
yield an efficient wholesale market outcome, so instead of using prosumer’s
utility in ISO’s economic dispatch problem, we need to construct an induced
function. First, we note that

$x^{*}(p^{*}(\lambda))=C-\sqrt{\frac{C}{\lambda}},$

and hence, the corresponding inverse supply function for the prosumer is

$p_{A}(x)=\frac{C}{(C-x)^{2}}.$

Now, the system operator solves the economic dispatch problem given by

$\displaystyle\max\qquad{\cal
W}_{O}(x,y):=-c(y)-\int_{0}^{x}p_{A}(\hat{x})d\hat{x}$ (28)
$\displaystyle\text{subject to}\qquad\bar{D}-x-y=0,\quad 0\leq y\leq\bar{y},$
$\displaystyle\qquad\qquad\qquad 0\leq x\leq C.$

Since there is no elastic demand $d$, the above problem is equivalent to the
following cost minimization problem

$\displaystyle\min\qquad{\cal C}_{O}(x,y):=c(y)+\frac{x}{C-x}$ (29)
$\displaystyle\text{subject to}\qquad\bar{D}-x-y=0,\quad 0\leq y\leq\bar{y},$
$\displaystyle\qquad\qquad\qquad 0\leq x\leq C.$

Anaolgously, we can define the cost ${\cal C}_{A}:=-{\cal W}_{A}$ for the
efficient dispatch model. To capture the efficiency loss for this model, we
adopt the Price of Aggregation (PoAg) metric introduced in [19, 20], which is
defined as

$\text{\sf PoAg}:=\frac{{\cal C}^{*}_{O}}{{\cal C}^{*}_{A}}.$

One can look at PoAg as similar to the Price-of-Anarchy in noncooperative
games, but PoAg naturally captures the hierarchical nature of electricity
markets. By definition, $\text{\sf PoAg}\geq 1$, and when it is equal to $1$,
it means that the aggregation model yields a socially-optimal market outcome.
Note that PoAg can be analogously defined for social welfare maximization, to
compare any inefficient model to ${\cal W}_{A}^{*}$.

Figure 3 illustrates the market outcomes for the above models. In our
simulations, we vary the capacity $C$ from 0 to $\bar{D}=100$. One can think
of this as a proxy for renewable energy integration, $C=0$ implies %0
renewable integration, and $C=\bar{D}$ implies %100 of the total inflexible
load might be met exclusively with DER capacity. We also assume the following
parameters

$\eta=1,\ \alpha=0.01,\ \beta=1,\ Z=1000,\ \bar{y}=1000.$

The above parameters are picked such that it is more expensive to use the
conventional generator than DERs, and conventional generators can fully meet
the total system’s demand. DER aggregation is expected to improve the social
welfare, and this is demonstrated in Figure 3 (Left). Since our model is
efficient, the improvements shown are the maximum possible ones. We then
increase the number of prosumers to two, having the same capacity and $\eta$,
and observe that the efficient welfare further improves. This is natural: the
more DER capacities available, the more cheaper resources are available to the
ISO. Next, we fix the number of prosumers to one, and study other aspects. The
one-part pricing model discussed above is also expected to improve the social
welfare, compared to no DER participation, but remains inefficient, as Figure
3 (Middle) shows. We quantify the efficiency loss via the PoAg metric and plot
it in Figure 3 (Right). Here, PoAg increases nonlinearly as $C$ increases.

##  V CONCLUSIONS AND FUTURE WORKS

To include DER capacities in the wholesale electricity market, we proposed an
efficient DER aggregation model. The aggregator announces a two-part price
offer to each prosumer (DER owner): a participation fee and a per-unit price
paid to the prosumer for the energy procured. This interaction is modeled as a
Stackelberg game, which admits an efficient equilibrium. Under this
equilibrium, the per-unit price is equal to the wholesale market price, and
prosumers choose to sell the same amount of energy as if they were
participating directly in the wholesale market (ideal case). As a result, the
social welfare achieved under this aggregation model is the same as the social
welfare achieved when prosumers can sell directly, i.e., there is no
efficiency loss even with a monopolistic aggregator. The two-part pricing
mechanism is essential in achieving this efficiency result. As illustrated via
an example, there may be efficiency loss if no participation fees can be
charged. Under the current model, the aggregator charges different
participation fees to the prosumers. There may be some debates on whether
differential pricing on the participation fee should be allowed. If the
aggregator has to choose a single participation fee for all prosumers at the
same location, we would no longer have the efficiency result, and
characterizing the efficiency loss in this aggregation process would be a
promising direction to work on. Another direction for future work is to
consider stochastic DER capacities under two-part pricing, and see how the
stochastic nature of the DER supply [25] would affect the aggregator-prosumer
game and the overall market efficiency.

## References

  * [1] I. Ritzenhofen, J. R. Birge, and S. Spinler, “The structural impact of renewable portfolio standards and feed-in tariffs on electricity markets,” _European Journal of Operational Research_ , vol. 255, no. 1, pp. 224–242, 2016.
  * [2] “Distributed Energy Resouces: Connection Modeling and Reliability Considerations,” North American Electric Reliability Corporation, Tech. Rep., 2017.
  * [3] D. Bertsimas, E. Litvinov, X. A. Sun, J. Zhao, and T. Zheng, “Adaptive robust optimization for the security constrained unit commitment problem,” _IEEE Transactions on Power Systems_ , vol. 28, no. 1, pp. 52–63, 2013.
  * [4] D. Gan and E. Litvinov, “Energy and reserve market designs with explicit consideration to lost opportunity costs,” _IEEE Transactions on Power Systems_ , vol. 18, no. 1, pp. 53–59, 2003.
  * [5] E. Litvinov, T. Zheng, G. Rosenwald, and P. Shamsollahi, “Marginal loss modeling in LMP calculation,” _IEEE Transactions on Power Systems_ , vol. 19, no. 2, pp. 880–888, 2004.
  * [6] T. Zheng and E. Litvinov, “Ex post pricing in the co-optimized energy and reserve market,” _IEEE Trans. Power Systems_ , vol. 21, no. 4, pp. 1528 – 1538, 2006.
  * [7] F. Zhao, T. Zheng, and E. Litvinov, “Constructing demand curves in forward capacity market,” _IEEE Trans. Power Systems_ , vol. 33, no. 1, pp. 525–535, 2018.
  * [8] J. Lian, D. Wu, K. Kalsi, and H. Chen, “Theoretical framework for integrating distributed energy resources into distribution systems,” in _2017 IEEE Power Energy Society General Meeting_ , July 2017, pp. 1–5.
  * [9] E. Ntakou and M. Caramanis, “Price discovery in dynamic power markets with low-voltage distribution-network participants,” in _2014 IEEE PES T &D Conference and Exposition_, April 2014, pp. 1–5.
  * [10] S. D. Manshadi and M. E. Khodayar, “A hierarchical electricity market structure for the smart grid paradigm,” _IEEE Transactions on Smart Grid_ , vol. 7, no. 4, pp. 1866–1875, July 2016.
  * [11] P. M. Sotkiewicz and J. M. Vignolo, “Nodal pricing for distribution networks: efficient pricing for efficiency enhancing DG,” _IEEE Transactions on Power Systems_ , vol. 21, no. 2, pp. 1013–1014, May 2006.
  * [12] J. Terra, R. Ferreira, C. Borges, and M. Carvalho, “Using distribution-level locational marginal pricing to value distributed generation: Impacts on revenues captured by generation agents,” in _2017 IEEE PES Innovative Smart Grid Technologies Conference - Latin America (ISGT Latin America)_ , Sep. 2017, pp. 1–6.
  * [13] S. Huang, Q. Wu, S. S. Oren, R. Li, and Z. Liu, “Distribution locational marginal pricing through quadratic programming for congestion management in distribution networks,” _IEEE Transactions on Power Systems_ , vol. 30, no. 4, pp. 2170–2178, July 2015.
  * [14] F. Moret and P. Pinson, “Energy collectives: a community and fairness based approach to future electricity markets,” _IEEE Transactions on Power Systems_ , pp. 1–1, 2018.
  * [15] F. A. Rahimi and A. Ipakchi, “Transactive energy techniques: Closing the gap between wholesale and retail markets,” _The Electricity Journal_ , vol. 25, no. 8, pp. 29 – 35, 2012.
  * [16] J. Gundlach and R. Webb, “Distributed energy resource participation in wholesale markets: Lessons from the California ISO,” _Energy Law Journal_ , vol. 39, no. 1, pp. 47–77, 2018.
  * [17] M. Lavillotti, “DER market design: Aggregations,” New York ISO, Tech. Rep., 2018\.
  * [18] FERC, “Participation of distributed energy resource aggregations in markets operated by regional transmission organizations and independent system operators,” 2020, Order No. 2222.
  * [19] K. Alshehri, M. Ndrio, S. Bose, and T. Başar, “The impact of aggregating distributed energy resources on electricity market efficiency,” _Proc. 53rd Annual Conference on Information Systems and Sciences, Johns Hopkins University, Baltimore, Maryland_ , March 20-22, 2019.
  * [20] ——, “Quantifying market efficiency impacts of aggregated distributed energy resources,” _IEEE Transactions on Power Systems_ , vol. 35, no. 5, 2020.
  * [21] “Distributed energy resource provider participation guide with checklist,” California ISO, Tech. Rep., 2016.
  * [22] T. Başar and G. J. Olsder, _Dynamic Noncooperative Game Theory_. SIAM, 1999.
  * [23] J. R. Birge, A. Hortaçsu, and J. M. Pavlin, “Inverse optimization for the recovery of market structure from market outcomes: An application to the MISO electricity market,” _Operations Research_ , vol. 65, no. 4, pp. 837–855, 2017.
  * [24] L. Ljungqvist and T. J. Sargent, _Recursive Macroeconomic Theory_. MIT Press, 2000.
  * [25] N. Sunar and J. R. Birge, “Strategic commitment to a production schedule with uncertain supply and demand: Renewable energy in day-ahead electricity markets,” _Management Science_ , vol. 65, no. 2, pp. 714–734, 2019.

## APPENDIX

###### Proof of Proposition 1.

First note that (9) can be equivalently written as:

$\displaystyle\max\qquad\mathcal{W}_{B}({\bf x-d,y})$ (30)
$\displaystyle\text{subject to}\ \ {\bf 1}^{\top}\left({\bf X-D+Y}\right)=\bf
0,\ {\bf-B(X-D+Y)}\leq{\bf f},$ $\displaystyle\qquad\qquad\ \ {\bf C-Z\leq
x-d\leq C},\ {\bf\underline{y}\leq y\leq\overline{y}.}$

By Assumption 1 and Assumption 2, each $u^{i}_{j}$ is strictly concave, and
each $c^{i}_{j}$ is strictly convex. Thus, ${\cal W}_{B}$ given by (8) is
strictly concave. It can be seen from (30) that the feasible set is compact,
and is nonempty by Assumption 3. Therefore, there exists a unique optimal
solution $\left({\bf(x-d)^{*},y^{*}}\right)$ to (30). By letting ${\bf
h^{*}}={\bf-Y^{*}-(X-D)^{*}}$, we have a unique optimal solution $\left({\bf
h^{*},(x-d)^{*},y^{*}}\right)$ to (9).

We write the Lagrangian of (9) as

$\displaystyle{\cal L}=$
$\displaystyle\sum_{i\in[n]}\Bigg{(}\sum_{j\in[N_{i}]}u^{i}_{j}\left({C}^{i}_{j}-(x^{i}_{j}-d^{i}_{j})\right)-\sum_{j\in[G_{i}]}c^{i}_{j}(y^{i}_{j})$
$\displaystyle+\lambda^{i}\left(h^{i}+X^{i}-D^{i}+Y^{i}\right)+\sum_{j\in[N_{i}]}\Big{(}\overline{\mu}^{i}_{j}\left(C^{i}_{j}-(x^{i}_{j}-d^{i}_{j})\right)$
$\displaystyle+\underline{\mu}^{i}_{j}\left(x^{i}_{j}-d^{i}_{j}-C^{i}_{j}+Z\right)\Big{)}+\sum_{j\in[G_{i}]}\Big{(}\overline{\nu}^{i}_{j}(\overline{y}^{i}_{j}-y^{i}_{j})$
$\displaystyle+\underline{\nu}^{i}_{j}(y^{i}_{j}-\underline{y}^{i}_{j})\Big{)}\Bigg{)}+\text{extra
terms},$ (31)

where
$\lambda^{i},\overline{\mu}^{i}_{j},\underline{\mu}^{i}_{j},\overline{\nu}^{i}_{j},\underline{\nu}^{i}_{j}$
are the Lagrange multipliers corresponding to constraints (5a) and (6), and
the “extra terms” correspond to constraint (5b). Under Assumptions 1 and 2, it
should be clear that the optimal solution $(x^{i}_{j}-d^{i}_{j})^{*}\neq
C^{i}_{j}$, $(x^{i}_{j}-d^{i}_{j})^{*}\neq C^{i}_{j}-Z$, and
${y^{i}_{j}}^{*}\neq\overline{y}^{i}_{j}$,
${y^{i}_{j}}^{*}\neq\underline{y}^{i}_{j}$. Then, from the KKT optimality
conditions, we have that
$\overline{\mu}^{i}_{j}=\underline{\mu}^{i}_{j}=\overline{\nu}^{i}_{j}=\underline{\nu}^{i}_{j}=0$.
Further, we have that

$\displaystyle\nabla_{(x^{i}_{j}-d^{i}_{j})}{\cal L}$
$\displaystyle=\frac{\partial
u^{i}_{j}}{\partial(x^{i}_{j}-d^{i}_{j})}\Big{|}_{(x^{i}_{j}-d^{i}_{j})^{*}}+\lambda^{i}=0,$
(32a) $\displaystyle\nabla_{y^{i}_{j}}{\cal L}$ $\displaystyle=-\frac{\partial
c^{i}_{j}}{\partial y^{i}_{j}}\Big{|}_{{y^{i}_{j}}^{*}}+\lambda^{i}=0,$ (32b)

where (32a) is equivalent to (2) and (32b) is equivalent to (4). ∎

###### Proof of Lemma 3.

Consider prosumer $j$ at location $i$. By Assumption 1, $\frac{\partial
u^{i}_{j}(z)}{\partial z}$ is continuous and ranges from $\infty$ to $0$. By
Intermediate Value Theorem, for any given $\lambda^{i}$ and $p^{i}_{j}$, there
exist a $(z_{1},z_{2})$ such that (12) holds. By strict concavity of
$u^{i}_{j}$, $\frac{\partial u^{i}_{j}(z)}{\partial z}$ is strictly
decreasing, so the $(z_{1},z_{2})$ is unique.

We next find the optimal solution to (III-A). We look at the two cases when
$x^{i}_{j}>0$ and $x^{i}_{j}=0$ separately. Recall that
$p^{i}_{j}\leq\lambda^{i}$. Then for any $x^{i}_{j}>0$ and $d^{i}_{j}\geq
x^{i}_{j}$, we have that

$\displaystyle\pi^{i}_{j}\left(x^{i}_{j},d^{i}_{j}\right)\leq\pi^{i}_{j}\left(0,d^{i}_{j}-x^{i}_{j}\right).$

For any $x^{i}_{j}>0$ and $0<d^{i}_{j}<x^{i}_{j}$, we have that

$\displaystyle\pi^{i}_{j}\left(x^{i}_{j},d^{i}_{j}\right)\leq\pi^{i}_{j}\left(x^{i}_{j}-d^{i}_{j},0\right).$

Therefore, we may without loss of generality restrict to the case when
$x^{i}_{j}$ and $d^{i}_{j}$ are not both strictly positive. We can rewrite
(III-A) as

$\displaystyle\pi_{j}^{i}(x^{i}_{j},d^{i}_{j})=\begin{cases}p^{i}_{j}x^{i}_{j}-P^{i}_{j}+u^{i}_{j}\left({C}^{i}_{j}-x^{i}_{j}\right),\text{
if }x^{i}_{j}>0,\\\
u^{i}_{j}\left(d^{i}_{j}+{C}^{i}_{j}\right)-\lambda^{i}d^{i}_{j},\hfill\text{
if }x^{i}_{j}=0.\end{cases}$ (33)

  * •

If $C^{i}_{j}\leq z_{2}$, then
$u^{i}_{j}\left(C^{i}_{j}-x^{i}_{j}\right)+p^{i}_{j}x^{i}_{j}\leq
u^{i}_{j}\left(C^{i}_{j}\right)$ for any $x^{i}_{j}>0$. Thus we have the
optimal ${x^{i}_{j}}^{*}=0$. If we further have that $C^{i}_{j}<z_{1}$, then
the first order condition of
$u^{i}_{j}\left(d^{i}_{j}+C^{i}_{j}\right)-\lambda^{i}d^{i}_{j}$ leads to
${d^{i}_{j}}^{*}=z_{1}-C^{i}_{j}$. If we instead have $C^{i}_{j}\geq z_{1}$,
then $u^{i}_{j}\left(d^{i}_{j}+C^{i}_{j}\right)-\lambda^{i}d^{i}_{j}\leq
u^{i}_{j}\left(C^{i}_{j}\right)$ for any $d^{i}_{j}>0$.

  * •

If $C^{i}_{j}>z_{2}$, then
$u^{i}_{j}\left(d^{i}_{j}+C^{i}_{j}\right)-\lambda^{i}d^{i}_{j}<u^{i}_{j}\left(C^{i}_{j}\right)$
for any $d^{i}_{j}>0$. We thus have ${d^{i}_{j}}^{*}=0$. When $x^{i}_{j}>0$,
the first order condition of
$p^{i}_{j}x^{i}_{j}-P^{i}_{j}+u^{i}_{j}\left({C}^{i}_{j}-x^{i}_{j}\right)$
leads to ${x^{i}_{j}}=C^{i}_{j}-z_{2}$. Moreover, it is only optimal to have
${x^{i}_{j}}^{*}=C^{i}_{j}-z_{2}>0$ if
$p^{i}_{j}x^{i}_{j}-P^{i}_{j}+u^{i}_{j}\left({C}^{i}_{j}-x^{i}_{j}\right)\geq
u^{i}_{j}\left(C^{i}_{j}\right)$, or equivalently, $P^{i}_{j}\leq
p^{i}_{j}\left(C^{i}_{j}-z_{2}\right)+u^{i}_{j}\left(z_{2}\right)-u^{i}_{j}\left(C^{i}_{j}\right)$.
Therefore, we have that
${x^{i}_{j}}^{*}=\left(C^{i}_{j}-z_{2}\right)\cdot\mathds{1}\left\\{{\cal
X}\right\\}$, where ${\cal X}=\\{P^{i}_{j}\leq
p^{i}_{j}\left(C^{i}_{j}-z_{2}\right)+u^{i}_{j}\left(z_{2}\right)-u^{i}_{j}\left(C^{i}_{j}\right)\\}$.

∎

###### Proof of Lemma 4.

Consider prosumer $j$ at location $i$. Let $(z_{1},z_{2})$ be as in (12). Then
$z_{1}\leq z_{2}$ since $p^{i}_{j}\leq\lambda^{i}$. First note that when
$C^{i}_{j}\leq z_{1}\leq z_{2}$, ${x^{i}_{j}}^{*}=0$ by Lemma 3, and
$\Pi^{i}_{j}\left(P^{i}_{j},p^{i}_{j}\right)=0$ for any
$(P^{i}_{j},p^{i}_{j})\in\mathbb{R}^{2}_{+}$, i.e., the aggregator ${\cal A}$
earns zero profit from the prosumer regardless of her pricing decisions.

For those prosumers with $C^{i}_{j}>z_{1}$, we have that ${d^{i}_{j}}^{*}=0$
from Lemma 3. Since the aggregator earns zero profit if the prosumer does not
sell her energy, the aggregator would choose a $p^{i}_{j}$ such that
$C^{i}_{j}>z_{2}$ (because otherwise ${x^{i}_{j}}^{*}=0$) and thus
${x^{i}_{j}}^{*}=C^{i}_{j}-z_{2}$. We can add in the aggregator’s problem the
constraint that the prosumers would benefit from selling:

$\displaystyle\max_{P^{i}_{j},p^{i}_{j}\geq
0}P^{i}_{j}+\left(\lambda^{i}-p^{i}_{j}\right){x^{i}_{j}}^{*}$ (34)
$\displaystyle\text{s.t.
}p^{i}_{j}{x^{i}_{j}}^{*}+u^{i}_{j}\left(C^{i}_{j}-{x^{i}_{j}}^{*}\right)-P^{i}_{j}\geq
u^{i}_{j}\left(C^{i}_{j}\right),$

where ${x^{i}_{j}}^{*}$ is the optimal response of the prosumer, as a function
of $(P^{i}_{j},p^{i}_{j})$. We observe from (34) that, the optimal $P^{i}_{j}$
should satisfy
$P^{i}_{j}=p^{i}_{j}{x^{i}_{j}}^{*}+u^{i}_{j}\left(C^{i}_{j}-{x^{i}_{j}}^{*}\right)-u^{i}_{j}\left(C^{i}_{j}\right)$
in the maximization problem. Thus, (34) can be rewritten as

$\displaystyle\max_{p^{i}_{j}\geq
0}p^{i}_{j}{x^{i}_{j}}^{*}+u^{i}_{j}\left(C^{i}_{j}-{x^{i}_{j}}^{*}\right)-u^{i}_{j}\left(C^{i}_{j}\right)+\left(\lambda^{i}-p^{i}_{j}\right){x^{i}_{j}}^{*}$
$\displaystyle=$ $\displaystyle\max_{z_{2}\geq
0}u^{i}_{j}(z_{2})-u^{i}_{j}\left(C^{i}_{j}\right)+\lambda^{i}\left(C^{i}_{j}-z_{2}\right),$
(35)

and the first order condition of (35) leads to

$\displaystyle\frac{\partial u^{i}_{j}(z_{2})}{\partial
z_{2}}\Big{|}_{z_{2}=z_{2}^{*}}=\lambda^{i}.$ (36)

By (12), we also have that $\frac{\partial u^{i}_{j}(z)}{\partial
z}\Big{|}_{z=z_{2}^{*}}={p^{i}_{j}}^{*}$. We thus conclude that
${p^{i}_{j}}^{*}=\lambda^{i}$. This further leads to $z_{2}^{*}=z_{1}$, and
thus

$\displaystyle{P^{i}_{j}}^{*}$
$\displaystyle={p^{i}_{j}}^{*}\left(C^{i}_{j}-z_{2}^{*}\right)+u^{i}_{j}\left(z_{2}^{*}\right)-u^{i}_{j}\left(C^{i}_{j}\right)$
$\displaystyle=\lambda^{i}\left(C^{i}_{j}-z_{1}\right)+u^{i}_{j}\left(C^{i}_{j}-z_{1}\right)-u^{i}_{j}\left(C^{i}_{j}\right).$

∎

###### Proof of Proposition 3.

In this proof, we show that the optimal solution to (9) can be used to
construct an optimal solution to (21).

First note that the objectives of both problems have the same expression,
i.e., ${\cal W}_{A}({\bf h,x,d,y})={\cal W}_{B}({\bf
h,x-d,y})=\sum_{i\in[n]}\left(\sum_{j\in[N_{i}]}u^{i}_{j}(d^{i}_{j}+{C}^{i}_{j}-x^{i}_{j})-\sum_{j\in[G_{i}]}c^{i}_{j}(y^{i}_{j})\right).$
While we took $(\bf x-d)$ as a single vector of decision variables in solving
(9) and obtained a unique optimal solution $\left({\bf
h^{*},(x-d)^{*},y^{*}}\right)$ in Proposition 1, we can equivalently consider
${\bf x}$ and $\bf d$ as two separate vectors of decision variables. Consider
the constraints (6) and constraints (18). For any ${\bf x,d,y}$ satisfying
constraints (18), we have that ${\bf x-d\leq C}$ and ${\bf x-d\geq C-Z}$,
which implies constraints (6). With the other constraints being the same, the
feasible region of (21) is a subset of the feasible region of (9), which
implies that ${\cal W}_{B}^{*}\geq{\cal W}_{A}^{*}$.

Let $\left({\bf h^{*},(x-d)^{*},y^{*}}\right)$ be the optimal solution to (9).
Let $\bf x^{*}=\left[(x-d)^{*}\right]^{+}$ and $\bf
d^{*}=\left[-(x-d)^{*}\right]^{+}$, then $\bf x^{*}-d^{*}=(x-d)^{*}$. We show
that $\left({\bf h^{*},x^{*},d^{*},y^{*}}\right)$ is feasible to (21). It
suffices to show that $\bf 0\leq x^{*}\leq C$ and $\bf 0\leq d^{*}\leq
Z-C+x^{*}$. By definition, $\bf x^{*}\geq 0$ and $\bf d^{*}\geq 0$. If
$\bf(x-d)^{*}<0$, then $\bf x^{*}=0$ and $\bf d^{*}=-(x-d)^{*}\leq
Z-C=Z-C+x^{*}$. If $\bf(x-d)^{*}\geq 0$, then $\bf x^{*}=(x-d)^{*}\leq C$ and
$\bf d^{*}=0$. In either case, we have that $\bf x^{*},d^{*}$ are feasible to
(18), and thus $\left({\bf h^{*},x^{*},d^{*},y^{*}}\right)$ is feasible to
(21). Therefore, this set of $\left({\bf h^{*},x^{*},d^{*},y^{*}}\right)$ is
an optimal solution to (21), and thus ${\cal W}_{A}^{*}={\cal W}_{B}^{*}$.
Further, the corresponding optimal Lagrange multipliers of constraints (5a)
are the same in problem (9) and problem (21), i.e., the wholesale market
prices ${\boldsymbol{\lambda}}$ are the same under both models.

From Proposition 1, we know that ${y^{i}_{j}}^{*}$ and $\lambda_{i}$ satisfy
(4), $\forall i\in[n],\forall j\in[G_{i}]$. Moreover,
$\left(x^{i}_{j}-d^{i}_{j}\right)^{*}$ and $\lambda^{i}$ satisfy (2), $\forall
i\in[n],\forall j\in[N_{i}]$. Consider an arbitrary prosumer $j$ at an
arbitrary location $i$. With $p^{i}_{j}=\lambda^{i}$, $(z_{1},z_{2})$ as
defined in (12), and
${P^{i}_{j}}=\left[\lambda^{i}(C^{i}_{j}-z_{1})+u^{i}_{j}(z_{1})-u^{i}_{j}(C^{i}_{j})\right]^{+}$,
we have that $z_{1}=z_{2}=C^{i}_{j}-(x^{i}_{j}-d^{i}_{j})^{*}$. If
$C^{i}_{j}\leq z_{2}=C^{i}_{j}-(x^{i}_{j}-d^{i}_{j})^{*}$, then
$(x^{i}_{j}-d^{i}_{j})^{*}<0$, which implies that
${d^{i}_{j}}^{*}=\left[-(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}=\left[z_{1}-C^{i}_{j}\right]^{+}$
and ${x^{i}_{j}}^{*}=\left[(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}=0$. If
$C^{i}_{j}>z_{2}=C^{i}_{j}-(x^{i}_{j}-d^{i}_{j})^{*}$, then
$(x^{i}_{j}-d^{i}_{j})^{*}>0$, which implies that
${d^{i}_{j}}^{*}=\left[-(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}=0$ and
${x^{i}_{j}}^{*}=\left[(x^{i}_{j}-d^{i}_{j})^{*}\right]^{+}=C^{i}_{j}-z_{2}$.
In either case, the optimal response ${x^{i}_{j}}^{*}$ and ${d^{i}_{j}}^{*}$
matches those described in Lemma 3. Further, by Lemma 4, the choice of
$p^{i}_{j}=\lambda^{i}$ and
${P^{i}_{j}}=\left[\lambda^{i}(C^{i}_{j}-z_{1})+u^{i}_{j}(z_{1})-u^{i}_{j}(C^{i}_{j})\right]^{+}$
are optimal for the aggregator to maximize her profit from the prosumer $j$.
We have thus verified all statements listed in Proposition 3.∎

###### Proof of Theorem 1.

Immediately follows from the proof of Proposition 3. ∎