# A Market Mechanism for a Two-stage Settlement Electricity Market with Energy
Storage

Rajni Kant Bansal, Enrique Mallada, and Patricia Hidalgo-Gonzalez Rajni Kant
Bansal and Patricia Hidalgo-Gonzalez are with the University of California San
Diego, USA. Emails: {rabansal<EMAIL_ADDRESS>Mallada is
with the Johns Hopkins University, USA. Email<EMAIL_ADDRESS>
###### Abstract

Electricity markets typically clear in two stages: a day-ahead market and a
real-time market. In this paper, we propose market mechanisms for a two-stage
multi-interval electricity market with energy storage, generators, and demand
uncertainties. We consider two possible mixed bidding strategies: storage
first bids cycle depths in the day ahead and then charge-discharge power bids
in the real-time market for any last-minute adjustments. While the first
strategy only considers day-ahead decisions from an individual participant’s
perspective as part of their individual optimization formulation, the second
strategy accounts for both the market operator’s and participants’
perspectives. We demonstrate that the competitive equilibrium exists uniquely
for both mechanisms. However, accounting for the day-ahead decisions in the
bidding function has several advantages. Numerical experiments using New York
ISO data provide bounds on the proposed market mechanism.

##  I Introduction

Energy storage systems, like grid-scale lithium-ion batteries, that are
characterized by a fast response time, high ramp rate, their ability to
complement variability in renewable energy dispatch, etc., are being
considered across the grid for essential services. Recent policy steps from
regulators allowing market participation of emerging technologies, including
energy storage, have further increased its adoption in electricity markets [1,
2, 3]. In particular, several works have investigated the benefits of energy
storage for system reliability and power quality, e.g., supporting renewable
energy resources, transmission and distribution networks, etc. [4, 5, 6, 7,
8]. However, determining energy storage’s marginal operation costs remains a
key challenge in resource participation and efficient market clearing. Unlike
conventional fuel-based generators, where marginal costs depend on energy
supply, or variable renewable energy resources, with nearly zero operating
costs, the degradation incurred due to charge-discharge cycles constitutes the
bulk of the operation cost for energy storage.

Recent efforts have developed participation bids while accounting for the
operation cost of storage in two ways. The first approach relies on creating
an optimal sequence of charge-discharge energy bids, i.e., price-quantity
pairs, typically using a Bilevel optimization framework with the market
operator as a follower [9, 10, 11]. However, the resulting market mechanisms
based on energy bids require stringent conditions to align with the social
optimum and result in incentive-misaligned market outcomes [12]. The second
approach relies on developing a state of charge (SoC) based charge-discharge
bids to account for SoC-dependent energy storage physical characteristics,
e.g., storage degradation [13, 14]. These strategies either assume or estimate
unknown prices in markets. Further, the formulations typically consider a
single stage, e.g., real-time market, and do not take into account the impact
of the decisions in the day-ahead market on the subsequent decisions in the
real-time market. Besides, these works provide little insight into the impact
of storage decisions on the resulting market equilibrium.

In this paper, we study energy storage participation in a two-stage multi-
interval market with generators under demand uncertainties. We propose mixed
bidding market mechanisms with storage bidding an energy-cycling function,
i.e., charge-discharge cycle depths as a function of per-cycle prices, while a
generator bids a supply function in the day-ahead market. The day-ahead market
clears efficiently based on the forecast for the next day. The formulation is
implemented via a convex optimization problem that utilizes the convex storage
degradation cost function as a combination of the Rainflow cycle counting
algorithm with a cycle stress function [15, 12].

The cost of degradation depends on temporally coupled charge-discharge cycles.
Such temporal coupling makes it challenging to design bids for the real-time
stage that clears at a relatively faster timescale with adjustments to day-
ahead commitments. To address this, we propose two possible participation
strategies: 1) Participants account for their day-ahead decisions by including
them in their individual problems, i.e., profit maximization. More
specifically, we propose a constrained energy bid for storage in the real-time
market, such that the storage physical characteristics, e.g., storage
degradation function, remain the same. 2) Participants account for their day-
ahead market decisions in both the bidding function and individual problems. A
generator bids a supply function in the real-time market, similar to the day-
ahead stage. The real-time market clearing incorporates a rolling time horizon
window that includes binding and advisory intervals. The market operator
optimizes the dispatch decision with an updated forecast for the demand.

#### Contributions

Our work has multiple contributions. First, we extend the previously proposed
cycle-based market mechanism [12] for the day-ahead market and provide a
uniform price market mechanism for storage. The extended design allows market
operators to generate a uniform per-cycle price for various storage units,
similar to the case of generators in the existing market design. This
modification is necessary for the real-time market design. Second, we study
two mixed market mechanisms and the resulting competitive equilibrium in the
real-time market. It assumes participants as price-takers, and we show that
the equilibrium exists uniquely. Third, we provide a case study for the
proposed market mechanism and do a comparative analysis with the social
planner problem as we change the physical characteristics of energy storage.
Our analysis shows that the proposed mechanism performs within the bounds of
the benchmark social planner problem, meaning a bounded loss in the incentive
alignment with participation in the real-time market.

The rest of the paper is organized as follows. In section II we introduce the
market mechanisms for day-ahead and real-time market. The uniform price market
mechanism for the day-ahead market is discussed in Section III. In Section IV
we compare the two mixed market mechanisms and analyze the existence of
competitive equilibrium for the proposed. Section V discusses the case study
and Section VI concludes the paper.

##### Notation

We use $||\cdot||_{2}^{2}$ to denote the Euclidean norm and
$\langle\cdot,\cdot\rangle$ to denote the inner product. Also, $f(a;b)$
denotes a function of independent variable $a$ with $b$ as a parameter.

##  II Market Model

In this section, we formulate the social planner problem and describe the
proposed market mechanism for a two-stage settlement multi-interval
electricity market.

###  II-A Model Preliminaries

Consider a two-stage market consisting of a day-ahead and a real-time market,
where a set $\mathcal{G}$ of generators and a set $\mathcal{S}$ of storage
units participate to meet inelastic demand over a time horizon
$t\in\mathcal{T}\mathrel{\mathop{\mathchar 58\relax}}=\\{1,...,T\\}$. We
denote the demand forecast in day-ahead as $d^{d}\in\mathbb{R}^{T}$ and the
forecast error in real-time as $d^{r}\in\mathbb{R}^{T}$. Thus, the net demand
$d\in\mathbb{R}^{T}$ over two stages is given by

$\displaystyle d\mathrel{\mathop{\mathchar 58\relax}}=d^{d}+d^{r}$ (1)

Each generator $j\in\mathcal{G}$ dispatches $g_{j}^{d}\in\mathbb{R}^{T}$ and
$g_{j}^{r}\in\mathbb{R}^{T}$ over the time horizon $\mathcal{T}$ in the day-
ahead and real-time markets, respectively. For $v\in\\{d,r\\}$, the stage-wise
and overall power dispatch of generator $j$ is subject to capacity constraints

$\displaystyle\underline{g}_{j}\leq g_{j,t}^{v}\leq\overline{g}_{j},\
t\in\mathcal{T}$ (2a) $\displaystyle\underline{g}_{j}\leq
g_{j,t}^{d}+g_{j,t}^{r}\leq\overline{g}_{j},\ t\in\mathcal{T}$ (2b)

where $\underline{g}_{j},\overline{g}_{j}$ denote the minimum and maximum
generation limits, respectively. Similarly, each energy storage
$s\in\mathcal{S}$ of capacity $E_{s}$ dispatches
$u_{s}^{d}\in\mathbb{R}^{T}\text{and }u_{s}^{r}\in\mathbb{R}^{T}$ in the day-
ahead and real-time markets, respectively. The individual and total energy
dispatch, i.e., discharge (positive) or charge (negative) rate, is bounded as,

$\displaystyle\underline{u}_{s}\leq u_{s,t}^{v}\leq\overline{u}_{s},\
t\in\mathcal{T}$ (3a) $\displaystyle\underline{u}_{s}\leq
u_{s,t}^{d}+u_{s,t}^{r}\leq\overline{u}_{s},\ t\in\mathcal{T}$ (3b)

where $v\in\\{d,r\\}$. The pair $\underline{u}_{s},\overline{u}_{s}$ denote
the minimum and maximum storage rate limits, respectively. The net output of
generator $j$ and storage $s$ over two stages is denoted as,

$\displaystyle g_{j}\mathrel{\mathop{\mathchar
58\relax}}=g_{j}^{d}+g_{j}^{r},j\in\mathcal{G},\
u_{s}\mathrel{\mathop{\mathchar
58\relax}}=u_{s}^{d}+u_{s}^{r},s\in\mathcal{S}$ (4)

We denote the stored energy in storage $s$ by a normalized State of Charge
(SoC) profile $x_{s}^{d}\in\mathbb{R}^{T+1}$ with initial SoC $x_{s,0}^{d}$
associated with the day-ahead storage dispatch $u_{s}^{d}$. The SoC evolves
over time horizon $\mathcal{T}$ as,

$\displaystyle x_{s,t}^{d}-x_{s,t-1}^{d}=\frac{1}{E_{s}}u_{s,t}^{d},\forall
s\in\mathcal{S},t\in\mathcal{T}$ (5)

Analogously, we denote SoC profile $x_{s}\in\mathbb{R}^{T+1}$ with initial SoC
$x_{s,0}$ corresponding to the net storage dispatch $u_{s}$, such that the SoC
evolves as

$\displaystyle x_{s,t}-x_{s,t-1}=\frac{1}{E_{s}}u_{s,t},\forall
s\in\mathcal{S},t\in\mathcal{T}$ (6)

The normalized SoC is bounded as,

$\displaystyle 0\leq x_{s,t}^{d}\leq 1,s\in\mathcal{S},t\in\mathcal{T}$ (7a)
$\displaystyle 0\leq x_{s,t}\leq 1,s\in\mathcal{S},t\in\mathcal{T}$ (7b)

Lastly, we assume periodicity constraints on storage to account for its cyclic
nature in current markets111However, we relax such a periodicity constraint in
real-time to allow storage for any immediate adjustments for system
reliability., i.e.,

$\displaystyle x_{s,0}^{d}=x_{s,T}^{d}$ (8a) $\displaystyle x_{s,0}=x_{s,T}$
(8b)

Substituting (6) in (8), we get

$\displaystyle\sum_{t\in\mathcal{T}}u_{s,t}^{d}=0,\ s\in\mathcal{S}$ (9a)
$\displaystyle\sum_{t\in\mathcal{T}}u_{s,t}=0,\ s\in\mathcal{S}$ (9b)

###  II-B Social Planner

The social planner’s problem, assuming perfect foresight is given by

$\displaystyle\min_{g_{j},j\in\mathcal{G},u_{s},s\in\mathcal{S},x_{s},s\in\mathcal{S}}$
$\displaystyle\
\sum_{j\in\mathcal{G}}C_{j}(g_{j})+\sum_{s\in\mathcal{G}}C_{s}(u_{s})$ (10a)
$\displaystyle\textrm{s.t.}\sum_{j\in\mathcal{G}}g_{j}+\sum_{s\in\mathcal{S}}u_{s}=d$
(10b)
$\displaystyle\eqref{gen_cap_total},\eqref{str_cap_total},\eqref{SoC_evolve_all},\eqref{SoC_ineq_total},\eqref{SoC_periodicity_total}$

where (10b) denotes the power balance constraint over two stages. In this
paper, we assume a quadratic cost function for the generators, given by

$\displaystyle
C_{j}(g_{j})=\frac{c_{j}}{2}\sum_{t\in\mathcal{T}}g_{j,t}^{2}+a_{j}\sum_{t\in\mathcal{T}}g_{j,t}$
(11)

where $c_{j},a_{j}$ are the cost coefficients222For ease of analysis, we
assume that $a_{j}=0$. However, the analysis is generalizable for the case
$a_{j}\neq 0$.. For storage $s$, we adopt the convex cycle-based degradation
cost as its operational cost. It combines the Rainflow cycle counting
algorithm with a cycle stress function to identify and penalize the cost of
charge-discharge cycles [12]. The cost function is given by

$\displaystyle
C_{s}(u_{s})=\frac{b_{s}}{2}\nu_{s}^{T}\nu_{s}=\frac{b_{s}}{2}u_{s}^{T}N(u_{s})^{T}N(u_{s})u_{s}$
(12)

where $b_{s}$ is the empirical cost coefficient. Also,
$\nu_{s}\in\mathbb{R}^{T}$ represents the vector of half-cycle depths created
from the Rainflow algorithm, which maps a storage dispatch profile to
associated charge-discharge half-cycles, such that

$\displaystyle\nu_{s}\mathrel{\mathop{\mathchar
58\relax}}=Rainflow(u_{s})=N(u_{s})u_{s}$ (13)

Here the matrix $N(u_{s})$ is a function of the storage dispatch $u_{s}$ and
represents the Rainflow map between the storage dispatch profile and half-
cycle depths. See, e.g., [12] for more details.

###  II-C Two-Stage Market Mechanism

In this subsection, we describe the two-stage market clearing, as shown in
Figure 1.

Figure 1: Two-stage Mixed Market Mechanism.

####  II-C1 Day-Ahead Market

: Each generator $j$ submits a supply function parameterized by
$\alpha_{j}^{d}\in\mathbb{R}$ indicating its willingness to participate in
day-ahead market as,

$\displaystyle g_{j}^{d}=\alpha_{j}^{d}\lambda^{d}$ (14)

where $\lambda^{d}\in\mathbb{R}^{T}$ denotes the clearing prices in the day
ahead. Analogously, each storage $s$ submits an energy cycling function
parameterized by $\beta_{s}^{d}\in\mathbb{R}$ that maps cycle depths
$\nu_{s}^{d}\in\mathbb{R}^{T}$ to per cycle prices
$\theta_{s}^{d}\in\mathbb{R}^{T}$, as

$\displaystyle\nu_{s}^{d}=\beta_{s}^{d}\theta_{s}^{d}$ (15)

The market operator collects all the bids and solves the day-ahead market
clearing problem, given by

$\displaystyle\min_{g_{j}^{d},j\in\mathcal{G},(u_{s}^{d},\nu_{s}^{d}),s\in\mathcal{S}}$
$\displaystyle\
\sum_{j\in\mathcal{G}}\sum_{t\in\mathcal{T}}\frac{(g_{j,t}^{d})^{2}}{2\alpha_{j}}\\!+\\!\\!\sum_{s\in\mathcal{S}}\sum_{t\in\mathcal{T}}\frac{(\nu_{s,t}^{d})^{2}}{2\beta_{s}}\\!$
(16a) s.t.
$\displaystyle\sum_{j\in\mathcal{G}}g_{j}^{d}+\sum_{s\in\mathcal{S}}u_{s}^{d}=d^{d}$
(16b) $\displaystyle\nu_{s}^{d}=N(u_{s}^{d})u_{s}^{d}$ (16c)
$\displaystyle\eqref{gen_cap_individual},\eqref{str_cap_individual},\eqref{SoC_periodicity_da}$

where (16c) denotes the constraint associated with the Rainflow algorithm. The
market clearing gives the optimal dispatch and prices, such that generator $j$
produces $g_{j}$ and gets paid $(\lambda^{d})^{T}g_{j}^{d}$ while storage $s$
produces a cycle depth schedule $\nu_{s}$ and gets paid
$(\theta_{s}^{d})^{T}\nu_{s}^{d}$. Here the prices
$\lambda^{d},\theta_{s}^{d}$ are given by the dual variables corresponding to
the constraints (16b) and (16c), respectively.

In the day-ahead market, participants are competing against each other to
maximize their profit. We assume participants as price-takers such that the
individual problems of generator $j$, is

$\displaystyle\max_{g_{j}^{d}}\ \langle\lambda^{d},g_{j}^{d}\rangle-
C_{j}(g_{j}^{d}),\ \textrm{s.t.}\ \eqref{gen_bid_da}$ (17)

and storage $s$, is

$\displaystyle\max_{(u_{s}^{d},\nu_{s}^{d})}\langle\theta_{s}^{d},\nu_{s}^{d}\rangle-
C_{s}(u_{s}^{d})\ \textrm{s.t.}\ \eqref{str_bid_da}$ (18)

Since the participants are price-takers, they do not anticipate their
decisions in the real-time market.

####  II-C2 Real-Time Market

Analogous to the day-ahead market, each generator $j$ submits a supply
function $f\mathrel{\mathop{\mathchar
58\relax}}\mathbb{R}\times\mathbb{R}^{T}\rightarrow\mathbb{R}^{T}$,
parameterized with $\alpha_{j}^{r}\in\mathbb{R}$, as

$\displaystyle g_{j}^{r}=f(\alpha_{j}^{r};\lambda^{r})$ (19)

where $\lambda^{r}\in\mathbb{R}^{T}$ denotes the clearing prices in the real-
time. However, unlike storage in day-ahead markets, in the real-time market
storage $s$ bids a supply function $h\mathrel{\mathop{\mathchar
58\relax}}\mathbb{R}\times\mathbb{R}^{T}\rightarrow\mathbb{R}^{T}$,
parameterized by $\beta_{s}^{r}$, as

$\displaystyle u_{s}^{r}=h(\beta_{s}^{r};\lambda^{r})$ (20)

Given the bids $(\alpha_{j}^{r},\beta_{s}^{r})$ the market operator clears the
market and meets the supply-demand balance for each time period
$t\in\mathcal{T}$, as

$\displaystyle
d^{r}=\sum_{j\in\mathcal{G}}f(\alpha_{j}^{r};\lambda^{r})+\sum_{s\in\mathcal{S}}h(\beta_{s}^{r};\lambda^{r})$
(21)

Given the prices in the real-time market and the participant’s decision in the
day-ahead market, the individual problem of generator $j$ is given by,

$\displaystyle\max_{g_{j}^{r}}\
\langle\lambda^{d},g_{j}^{d}\rangle+\langle\lambda^{r},g_{j}^{r}\rangle-
C_{j}(g_{j}^{d}+g_{j}^{r})\ \textrm{s.t.}\ \eqref{gen_bid_rt_func}$ (22)

and storage $s$ is

$\displaystyle\max_{u_{s}^{r}}\
\langle\theta_{s}^{d},\nu_{s}^{d}\rangle+\langle\lambda^{r},u_{s}^{r}\rangle-
C_{s}(u_{s}^{d}+u_{s}^{r})\ \textrm{s.t.}\ \eqref{str_bid_rt_func}$ (23)

###  II-D Market Equilibrium

In this subsection, we characterize the properties of competitive equilibrium
in a two-stage market, such that the market clears and participants do not
deviate from their bid.

######  Definition 1.

Each stage of a two-stage market is at the competitive equilibrium if the
participant bids and the clearing prices, i.e.,
$(\lambda^{d},\alpha_{j}^{d},\beta_{s}^{d})$ and
$(\lambda^{r},\alpha_{j}^{r},\beta_{s}^{r})$, in day-ahead and real-time
markets, respectively, satisfy:

  1. 1.

The bid $\alpha_{j}^{d}(\alpha_{j}^{r})$ of generator $j$ in the day-ahead
(real-time) market maximizes its profit.

  2. 2.

The bid $\beta_{s}^{d}(\beta_{a}^{r})$ of storage $s$ in the day-ahead (real-
time) market maximizes its profit.

  3. 3.

The inelastic demand $d^{d},d^{r}$ in the day-ahead and the real-time market
is met, resulting in clearing prices $\lambda^{d},\theta_{s}^{d}$ and
$\lambda^{r}$, respectively.

##  III Uniform Price Market Mechanism

In this section, we extend the previous cycle-aware market mechanism [12] in
the day-ahead market and propose a uniform price market mechanism.

######  Theorem 2.

(Incentive Compatibility [12]) The competitive equilibrium in the day-ahead
market also aligns with the social optimum.

The incentive compatibility results first appeared in [12] for a market
mechanism where storage bids cycle depths and generator bids power in a day-
ahead market. However, the resulting competitive equilibrium provides non-
uniform prices for storage units, which may not be desirable from a market
operator perspective. To address this, we propose the following theorem that
ascertains uniform prices in a market.

######  Theorem 3.

Let’s assume that the capacity constraints of storage (3a) and generator (2a)
are non-binding. Furthermore, the SoC constraint associated with energy
storage (7a) is also non-binding. Given optimal bids
$\alpha_{j}^{d},\beta_{s}^{d}$, there exists a unique set of coefficients
$\epsilon_{s}$ such that the day-ahead market clearing (16) results in uniform
prices.

###### Proof.

Let’s assume a proportional energy storage dispatch of the form

$\displaystyle
u_{s}^{d}=\epsilon_{s}(d^{d}-\sum_{j\in\mathcal{G}}g_{j}^{d}),\textrm{ where
}\sum_{s\in\mathcal{S}}\epsilon_{s}=1$ (24)

Let’s denote $u^{d}\mathrel{\mathop{\mathchar
58\relax}}=(d^{d}-\sum_{j\in\mathcal{G}}g_{j}^{d})$. The KKT conditions of the
convex day-ahead market clearing problem (16) are given by,

$\displaystyle
d^{d}=\sum_{j\in\mathcal{G}}g_{j}^{d}+\sum_{s\in\mathcal{S}}u_{s}^{d},\
g_{j}^{d}=\alpha_{j}^{d}\lambda^{d}$ (25a)
$\displaystyle\nu_{s}^{d}=N(u_{s}^{d})u_{s}^{d},\
\nu_{s}^{d}=\beta_{s}^{d}\theta_{s}^{d}$ (25b)
$\displaystyle\lambda^{d}=\sum_{k}\gamma_{k}N_{k}(u^{d}_{s})^{T}N_{k}(u_{s}^{d})u_{s}^{d}+\delta_{s}\mathbf{1}$
(25c) $\displaystyle\mathbf{1}^{T}u_{s}^{d}=0.$ (25d)

where $\gamma_{k}$ are convex coefficients associated with subgradients of the
piecewise linear convex cost of storage cycling (12). See e.g., [12], for more
details. Also, $\lambda^{d},\theta_{s}^{d},$ and $\delta_{s}$ are the dual
variables associated with constraints (16b), (16c), and (9a), respectively.
Substituting the proportional dispatch condition (24) in the KKT conditions
(25), we get

$\displaystyle u^{d}=d^{d}-\sum_{j\in\mathcal{G}}g_{j}^{d},\
g_{j}^{d}=\alpha_{j}^{d}\lambda^{d}$ (26a)
$\displaystyle\nu_{s}^{d}=\epsilon_{s}N(u^{d})u^{d}$ (26b)
$\displaystyle\nu_{s}^{d}=\beta_{s}^{d}\theta_{s}^{d}\implies\theta_{s}^{d}=\frac{\epsilon_{s}}{\beta_{s}}N(u^{d})u^{d}$
(26c)
$\displaystyle\lambda^{d}=\sum_{k}\gamma_{k}\frac{\epsilon_{s}}{\beta_{s}}N_{k}(u^{d})^{T}N_{k}(u^{d})u^{d}+\delta_{s}\mathbf{1}$
(26d) $\displaystyle\mathbf{1}^{T}u^{d}=0$ (26e)

where we use the [12, Lemma 1] to write

$N(u_{s}^{d})=N(\epsilon_{s}u^{d})=N(u^{d}).$

Rewriting the KKT conditions (26), we get

$\displaystyle\frac{d-u^{d}}{\sum\limits_{j\in\mathcal{G}}\alpha_{j}^{d}}=\sum_{k}\gamma_{k}\frac{\epsilon_{s}}{\beta_{s}^{d}}N_{k}(u^{d})^{T}N_{k}(u^{d})u^{d}+\delta_{s}\mathbf{1}$
(27a) $\displaystyle\mathbf{1}^{T}u^{d}=0$ (27b)

Given the optimal bids ($\alpha_{j}^{d},\beta_{s}^{d}$), we consider a convex
optimization problem, as

$\displaystyle\min_{u^{d}}$ $\displaystyle\
\frac{||u^{d}||_{2}^{2}}{2\sum\limits_{j\in\mathcal{G}}\alpha_{j}^{d}}\\!-\\!\frac{\
\langle
d^{d},u^{d}\rangle}{\sum\limits_{j\in\mathcal{G}}\alpha_{j}^{d}}\\!+\\!\frac{||N(u^{d})u^{d}||_{2}^{2}}{\sum\limits_{s\in\mathcal{S}}\beta_{s}^{d}}$
(28a) s.t. $\displaystyle\ \mathbf{1}^{T}u^{d}=0\mathrel{\mathop{\mathchar
58\relax}}\delta$ (28b)

From [15], we observe that the optimization problem (28) is convex. Therefore,
$\exists$ a unique primal-dual solution $(u^{d})^{*},\delta^{*}$ to the convex
optimization problem (28) which satisfies the KKT conditions (27). Hence,
assuming

$\displaystyle\epsilon_{s}=\frac{\beta_{s}}{\sum\limits_{s\in\mathcal{S}}\beta_{s}^{d}},\
\delta_{s}^{*}\mathrel{\mathop{\mathchar 58\relax}}=\delta^{*}\ \forall
s\in\mathcal{S},\ u_{s}^{d}=\epsilon_{s}u^{d}$ (29)

we observe that we have a unique optimal solution with uniform clearing prices

$\displaystyle\lambda^{d}=\frac{d-u^{d}}{\sum\limits_{j\in\mathcal{G}}\alpha_{j}^{d}},$
(30a) $\displaystyle\theta_{s}^{d}=\theta^{d}\mathrel{\mathop{\mathchar
58\relax}}=\frac{\epsilon_{s}}{\beta_{s}^{d}}N(u^{d})u^{d}=\frac{1}{\sum\limits_{s\in\mathcal{S}}\beta_{s}^{d}}N(u^{d})u^{d}$
(30b)

that satisfies the KKT conditions of the original problem. Therefore, we have
a uniform price market mechanism. ∎

For ease of analysis, we assume the inequality constraints are non-binding.
However, the result can be observed for a general formulation as well.
Moreover, the resulting competitive equilibrium for the uniform price market
mechanism also aligns with the social planner optimum in the day-ahead market.

##  IV Competitive Equilibrium in the Real-Time Market

In this section, we discuss two potential energy storage participation
strategies in the real-time market, i.e., day-ahead unaware bidding and day-
ahead aware bidding. For ease of exposition and closed-form analysis, we
consider in this section a simplified setting where the power balance (21) is
the only constraint in the real-time market clearing. A general setting is
considered in the case study in Section V.

###  IV-A Mixed Market Mechanism - Day-Ahead Unaware Bidding

In this subsection, we characterize the competitive equilibrium in the real-
time market given the participants’ decision in the day-ahead market. Each
generator $j$ bids

$\displaystyle g_{j}^{r}=\alpha_{j}^{r}\lambda^{r}$ (31)

and storage $s$ bids

$\displaystyle u_{s}^{r}=\beta_{s}^{r}\lambda^{r}$ (32)

in the real-time market. Substituting (31) in (22), we get

$\displaystyle\max_{\alpha_{j}^{r}}\
\alpha_{j}^{r}||\lambda^{r}||_{2}^{2}-\frac{c_{j}}{2}||g_{j}^{d}+\alpha_{j}^{r}\lambda^{r}||_{2}^{2}$
(33)

where we drop the revenue term $\langle\lambda^{d},g_{j}^{d}\rangle$ from the
day-ahead market as it does not affect the objective in the optimization
problem. Similarly, substituting (32) in (23), we get

$\displaystyle\max_{\beta_{s}^{r}}\
\beta_{s}^{r}||\lambda^{r}||_{2}^{2}-\frac{b_{s}}{2}||N(u_{s}^{d}+\beta_{s}^{r}\lambda^{r})(u_{s}^{d}+\beta_{s}^{r}\lambda^{r})||_{2}^{2}$
(34)

To account for the temporally coupled cost of storage degradation while making
decisions in the real-time market at a faster time scale, we assume that
storage deviations are constrained in the neighborhood of its day-ahead
decision such that

$\displaystyle N(u_{s}^{d}+u_{s}^{r})=N(u_{s}^{d})$ (35)

More precisely, we constrain the storage dispatch such that the piecewise
linear map between cycle depths and SoC profile remains the same. Such a
strategy allows storage to participate in the market with a simplified
setting, e.g., existing supply function, with the flexibility to change the
optimal bid to account for the degradation cost.

######  Theorem 4.

Let’s assume a uniform price market mechanism in the day-ahead market. Also,
assume that

$N(u_{s}^{d}+u_{s}^{r})=N(u_{s}^{d}).$

The competitive equilibrium in the real-time market, given the participants’
decision in the day-ahead market, exists uniquely. There exists a unique set
of coefficients $\omega$ such that the equilibrium can be determined as

$\displaystyle\lambda_{r}=\omega d^{r}$ (36a)
$\displaystyle\alpha_{j}^{r}=c_{j}^{-1}-\frac{<g_{j}^{d},\lambda^{r}>}{||\lambda^{r}||_{2}^{2}}$
(36b)
$\displaystyle\beta_{s}^{r}=b_{s}^{-1}\frac{||\lambda^{r}||_{2}^{2}-\langle\theta_{s}^{d},N(u_{s}^{d})\lambda^{r}\rangle}{||N(u_{s}^{d})\lambda^{r}||^{2}_{2}}$
(36c)
$\displaystyle\\!\\!\omega\\!=\\!\frac{<\\!\lambda^{d},d^{r}\\!\\!>}{||d^{r}||_{2}^{2}}\\!+\\!\\!\\!{\left(\\!\sum\limits_{j\in\mathcal{G}}\\!\\!c_{j}^{-1}\\!\\!+\\!\\!\\!\sum\limits_{s\in\mathcal{S}}\\!b_{s}^{-1}\frac{||d^{r}||_{2}^{2}}{||\\!\sum\limits_{k}\\!\\!\gamma_{k}N(\\!u_{s}^{d})d^{r}||^{2}_{2}}\\!\\!\right)\\!\\!\\!}^{-1}$
(36d)

where $\gamma_{k}\geq 0,\sum_{k}\gamma_{k}=1$ are the convex coefficients
associated with the subgradients of the piecewise linear convex cost function
(12). See e.g., [12] for more details.

###### Proof.

Given the day-ahead decisions and prices in the real-time market, we can solve
for the optimal bid by taking the derivative of the convex optimization
problem (33), as

$\displaystyle\\!\\!\\!\\!||\lambda^{r}||^{2}_{2}-\\!c_{j}(g_{j}^{d}\\!+\\!\alpha_{j}^{r}\lambda^{r})^{T}\\!\lambda^{r}\\!\\!=\\!0\\!\\!\implies\\!\\!\alpha_{j}^{r}\\!=\\!c_{j}^{-1}\\!-\\!\frac{\langle
g_{j}^{d},\lambda^{r}\rangle}{||\lambda^{r}||^{2}_{2}}$ (37a)

Similarly, taking the derivative of (34), we get the optimal bid of energy
storage $s$,

$\displaystyle\\!||\lambda^{r}||^{2}_{2}-b_{s}\\!\left(N(u_{s}^{d})(u_{s}^{d}+\beta_{S}^{r}\lambda^{r})\\!\right)^{T}\\!N(u_{s}^{d})\lambda^{r}\\!=\\!0$
(38)

where we use $N(u_{s}^{d}+u_{s}^{r})=N(u_{s}^{d})$. Substituting (13) and (15)
in (38), we get

$\displaystyle\implies$
$\displaystyle||\lambda^{r}||^{2}_{2}-b_{s}\left(\nu_{s}^{d}+\beta_{S}^{r}N(u_{s}^{d})\lambda^{r}\right)^{T}N(u_{s}^{d})\lambda^{r}\\!=\\!0$
(39a) $\displaystyle\implies$
$\displaystyle||\lambda^{r}||^{2}_{2}\\!-\\!\left(\theta_{s}^{d}+b_{s}\beta_{S}^{r}N(u_{s}^{d})\lambda^{r}\right)^{T}\\!\\!N(u_{s}^{d})\lambda^{r}\\!=\\!0$
(39b) $\displaystyle\implies$
$\displaystyle\beta_{S}^{r}=b_{s}^{-1}\frac{||\lambda^{r}||_{2}^{2}-\langle\theta_{s}^{d},N(u_{s}^{d})\lambda^{r}\rangle}{||N(u_{s}^{d})\lambda^{r}||^{2}_{2}}$
(39c)

At the equilibrium, (21), (37a), and (39c) must hold simultaneously. Since
$\lambda^{r}$ is proportional to $d^{r}$, let’s assume that $\exists\
\omega\in\mathbb{R}$ such that $\lambda^{r}=\omega d^{r}$. Substituting (14)
in (37a), as

$\displaystyle\\!\\!\alpha_{j}^{r}\\!=\\!c_{j}^{-1}\\!\left(\\!1\\!-\\!\frac{<\lambda^{d},\lambda^{r}>}{||\lambda^{r}||_{2}^{2}}\right)\\!\\!=\\!c_{j}^{-1}\\!\left(\\!\\!1\\!-\\!\frac{1}{\omega}\frac{<\lambda^{d},d^{r}>}{||d^{r}||_{2}^{2}}\\!\\!\right)$
(40a)
$\displaystyle\implies\sum\limits_{j\in\mathcal{G}}\alpha_{j}^{r}=\sum\limits_{j\in\mathcal{G}}c_{j}^{-1}\left(1-\frac{1}{\omega}\frac{<\lambda^{d},d^{r}>}{||d^{r}||_{2}^{2}}\right)$
(40b)

Similarly, substituting (25c) in (39c) and simplifying as

$\displaystyle\\!\\!\\!\\!\\!\\!\beta_{s}^{r}\\!=\\!b_{s}^{-1}\frac{||\lambda^{r}||_{2}^{2}-\langle\lambda^{d},\lambda^{r}\rangle}{||\\!\sum\limits_{k}\\!\gamma_{k}N(u_{s}^{d})\lambda^{r}||^{2}_{2}}\\!=b_{s}^{-1}\frac{||d^{r}||_{2}^{2}-\omega^{-1}\langle\lambda^{d},d^{r}\rangle}{||\sum\limits_{k}\\!\gamma_{k}N(u_{s}^{d})d^{r}||^{2}_{2}}$
(41)

Substituting (40b) in (41), as

$\displaystyle\implies$
$\displaystyle\beta_{s}^{r}=b_{s}^{-1}\frac{\sum\limits_{j\in\mathcal{G}}\alpha_{j}}{\sum\limits_{j\in\mathcal{G}}c_{j}^{-1}}\frac{||d^{r}||_{2}^{2}}{||\sum_{k}\gamma_{k}N(u_{s}^{d})d^{r}||^{2}_{2}}$
(42a) $\displaystyle\implies$
$\displaystyle\sum\limits_{s\in\mathcal{S}}\beta_{s}^{r}=\sum\limits_{s\in\mathcal{S}}b_{s}^{-1}\frac{\sum\limits_{j\in\mathcal{G}}\alpha_{j}}{\sum\limits_{j\in\mathcal{G}}c_{j}^{-1}}\frac{||d^{r}||_{2}^{2}}{||\sum_{k}\gamma_{k}N(u_{s}^{d})d^{r}||^{2}_{2}}$
(42b)

where we use the fact that energy dispatch is proportional and
$N(u_{s}^{d})=N(u^{d})$ in the case of uniform price market mechanism in
equation (42b). Substituting (40b) and (42b) in (21), we get

$\displaystyle\omega\\!=\\!\frac{<\\!\\!\lambda^{d}\\!,d^{r}\\!\\!>}{||d^{r}||_{2}^{2}}\\!+\\!\\!\left(\\!\sum\limits_{j\in\mathcal{G}}\\!\\!c_{j}^{-1}\\!\\!+\\!\\!\\!\sum\limits_{s\in\mathcal{S}}\\!b_{s}^{-1}\frac{||d^{r}||_{2}^{2}}{||\sum\limits_{k}\gamma_{k}N(u_{s}^{d})d^{r}||^{2}_{2}}\\!\\!\right)^{-1}$

Hence, under the price-taking assumption the optimal bid and clearing prices
$(\alpha_{j}^{r},j\in\mathcal{G},\beta_{s}^{r},s\in\mathcal{S},\lambda^{r})$
exist uniquely. ∎

Although the competitive equilibrium exists uniquely, it requires a customized
iterative algorithm, where participants’ bids and clearing prices are updated
repetitively until convergence, to solve the equilibrium, which may not be
feasible for real-time market operations. To address this, we propose a
modified bidding approach in the following subsection that accounts for the
day-ahead decisions in the bidding function.

###  IV-B Mixed Market Mechanism - Day-Ahead Aware Bidding

Given the day-ahead decisions, each generator $j$ bids

$\displaystyle g_{j}^{r}=\alpha_{j}^{r}\lambda^{r}-g_{j}^{d}$ (43)

and storage $s$ bids

$\displaystyle u_{s}^{r}=\beta_{s}^{r}\lambda^{r}-u_{s}^{r}$ (44)

in the real-time market. Substituting (43) in (22), we get,

$\displaystyle\max_{\alpha_{j}^{r}}\
\alpha_{j}^{r}||\lambda^{r}||_{2}^{2}+\langle\lambda^{r},g_{j}^{d}\rangle-\frac{c_{j}}{2}||\alpha_{j}^{r}\lambda^{r}||_{2}^{2}$
(45)

and substituting (44) in (23), we get

$\displaystyle\max_{\beta_{s}^{r}}\
\beta_{s}^{r}||\lambda^{r}||_{2}^{2}+\langle\lambda^{r},u_{s}^{d}\rangle-\frac{b_{s}}{2}||N(\beta_{s}^{r}\lambda^{r})(\beta_{s}^{r}\lambda^{r})||_{2}^{2}$
(46)

Note that we drop the terms associated with the day-ahead revenue in (45) and
(46), as it does not affect the objective in the individual problem. Once all
the bids $(\alpha_{j}^{r},\beta_{s}^{r})$ are collected, the market operator
clears the real-time market to achieve supply-demand balance, given by

$\displaystyle
d^{r}=\sum_{j\in\mathcal{G}}\left(\alpha_{j}^{r}\lambda^{r}-g_{j}^{d}\right)+\sum_{s\in\mathcal{S}}\left(\beta_{s}^{r}\lambda^{r}-u_{s}^{d}\right)$
(47)

######  Theorem 5.

The competitive equilibrium of the mixed market mechanism with day-ahead
decision-aware bids in the real-time market exists uniquely, as

$\displaystyle\lambda^{r}=\phi d,$ (48a)
$\displaystyle\alpha_{j}^{r}=c_{j}^{-1},$ (48b)
$\displaystyle{\beta_{s}^{r}}=b_{s}^{-1}\frac{||\lambda^{r}||_{2}^{2}}{||N(\lambda^{r})\lambda||_{2}^{2}}$
(48c)
$\displaystyle\phi^{-1}=\left(\sum_{i\in\mathcal{S}}b_{s}^{-1}\frac{||d||_{2}^{2}}{||N(d)d||_{2}^{2}}+\sum_{j\in\mathcal{G}}c_{j}^{-1}\right)$
(48d)

###### Proof.

Writing the derivative of (45) for the optimal bid of each generator $j$, we
get

$\displaystyle||\lambda^{r}||_{2}^{2}(1-\alpha_{j}^{r}c_{j})=0\implies{\alpha_{j}^{r}}=c_{j}^{-1},\
\forall j\in\mathcal{G}$ (49)

Similarly, we take the derivative of (46) for storage, as

$\displaystyle\\!\\!\\!\\!||\lambda^{r}||_{2}^{2}\\!-\\!b_{s}{\beta_{s}^{r}}||\\!N(\\!\lambda^{r}\\!)\lambda^{r}||_{2}^{2}\\!=\\!0\\!\\!\\!\implies\\!\\!\\!{\beta_{s}^{r}}\\!\\!=\\!b_{s}^{-1}\frac{||\lambda^{r}||_{2}^{2}}{||\\!N(\\!\lambda^{r}\\!)\lambda^{r}||_{2}^{2}}$
(50a)

where we use [12, Lemma 1] in (50a). At the equilibrium (47), (49), and (50a)
must hold simultaneously. Since $\lambda^{r}$ is proportional to $d$, let’s
assume $\exists\ \phi\in\mathbb{R}$ such that $\lambda^{r}=\phi d$.
Substituting (16b), (49), (50a) in (47), we can solve for $\phi$ as

$\displaystyle\phi^{-1}=\left(\sum_{s\in\mathcal{S}}b_{s}^{-1}\frac{||d||_{2}^{2}}{||N(d)d||_{2}^{2}}+\sum_{j\in\mathcal{G}}{c_{j}}^{-1}\right)$
(51)

Hence the competitive equilibrium exists uniquely. ∎

We note that the competitive equilibrium in Theorem 5 does not need any extra
requirements in market parameters, unlike the mixed market mechanism in
subsection IV-A. Additionally, the resulting market equilibrium with constant
optimal participant bids can be solved fast enough for the needs of the real-
time market using convex optimization.

##  V Case Study

In this section, we provide a numerical case study that analyses the mixed
market mechanism based on decision-aware bidding from subsection IV-B. For the
day-ahead market, we formulate a two-day optimization horizon consisting of
Day $1$ with $24$ time periods as the binding period and Day $2$ with $24$
periods as the advisory period. In the real-time market, we use a rolling time
horizon window of $24$ h that has the 1st hour as the binding period and the
rest as advisory periods. We assume that at each hour in the real-time market,
the market realizes the updated demand only for the 1st (binding) interval. As
the window rolls forward, the operator minimizes the dispatch cost subject to
operational constraints for stage-wise and overall dispatch.

We use forecast and real aggregate demand data for Aug 25-26, 2023, from the
Millwood Zone in the New York ISO [16]. Furthermore, we assume one generator
with aggregate cost coefficients $c=20\$/(MW)^{2}$ [17] and capacity limits
$\underline{g}=0,\ \overline{g}=\max_{t}\\{d_{t}\\}$. Also, we assume one
energy storage asset with variable capacity cost $B$ and variable capacity
$E$. The empirical cost coefficient given by $bs\mathrel{\mathop{\mathchar
58\relax}}=\rho BE$ where $\rho=5.24\times 10^{-4}$ [18, 15]. We assume a
$4$-hour Lithium-ion battery such that the storage dispatch is bounded by
$\underline{u}=-\frac{E}{4}$ and $\overline{u}=\frac{E}{4}$.

It is important to note that in real-time markets, the absence of a
periodicity constraint may lead to periodicity constraint violations in cases
of total two-stage dispatch. The operator only considers the optimal real-time
dispatch for the first interval of the horizon as binding as the horizon
window moves forward. Therefore, we use the underlying social planner problem
(10) with and without periodicity constraints as a benchmark to compare the
performance of the proposed mixed market mechanism from different
perspectives.

Figure 2: Social cost in the proposed mixed market mechanism, social planner
without periodicity constraints, and social planner with periodicity
constraints w.r.t (left) storage capital cost and (right) storage capacity.

We first consider the market perspective. Figure 2 illustrates the two-stage
social cost for the three strategies, i.e., the proposed mixed market
mechanism, the social planner with periodicity, and the social planner without
periodicity, as we (a) change the storage capital cost for a fixed storage
capacity of $E=50MWh$ and (b) change the storage capacity for a fixed storage
capital cost $B=150\$/kWh$. The two-stage social cost of the proposed
mechanism lies between the two bounds of the social planner problems in both
the left and the right panels. This means that the proposed mechanism does not
lead to significant losses in incentive compatibility. However, as we decrease
the storage capital cost on the left panel or increase the storage capacity on
the right panel, the difference in the social cost tends to increase. This
suggests further study of the proposed mechanism in a more rigorous market
setting.

Figure 3: Storage profit in the proposed mixed market mechanism, social
planner without periodicity constraints, and social planner with periodicity
constraints w.r.t (left) storage capital cost and (right) storage capacity.

We next consider the resource owner perspective. Figure 3 illustrates the two-
stage profit for the three strategies, i.e., the proposed mixed market
mechanism, the social planner with periodicity, and the social planner without
periodicity, as we (a) change the storage capital cost for a fixed storage
capacity of $E=50MWh$ and (b) change the storage capacity for a fixed storage
capital cost $B=150\$/kWh$. As expected, the energy storage profit also lies
within the two bounds of the social planner problem. Similar to the previous
case, the difference in profit between the mixed market mechanism and social
planner without periodicity tends to increase as energy storage becomes
cheaper or larger. However, note that profits tend to saturate at low capital
costs, which results in greater utilization in real-time markets, as shown in
the left panel.

##  VI Concluding Remarks

We study the market participation strategy of energy storage in two-stage
markets while accounting for the temporally coupled storage operating cost in
the form of its cycling cost. We propose two specific mixed market mechanisms
where energy storage bids charge-discharge cycles in the day-ahead market
followed by charge-discharge power bids in the real-time market. In the first
mechanism, participants take into account their day-ahead decisions in their
individual profit maximization problems. Alternatively, in the second
approach, participants reflect on their day-ahead decisions in both bidding
functions and individual problems.

Although both market mechanisms result in a unique competitive equilibrium,
the first requires an iterative best response algorithm which may not be
desirable in real-time markets due to frequent market clearing. The second
approach, on the other hand, can be implemented via convex programming.
Numerical simulations for the real-world NYISO data show that the proposed
mechanism lies within the two bounds of the social planner problem, implying a
bounded loss in incentive compatibility.

## References

  * [1] “Annual energy outlook 2021 with projections to 2050.” Energy Information Administration, Washington, DC, 2021.
  * [2] “Participation of distributed energy resource aggregations in markets operated by regional transmission organizations and independent system operators, Docket No. rm18-9-000, Order No. 2222.” Department of Energy, Federal Energy Regulatory Commission, USA, 2020.
  * [3] P. Denholm, J. Nunemaker, P. Gagnon, and W. Cole, “The Potential for battery energy storage to provide peaking capacity in the United States,” National Renewable Energy Laboratory (NREL), Tech. Rep., 2019.
  * [4] C. A. Hill, M. C. Such, D. Chen, J. Gonzalez, and W. M. Grady, “Battery energy storage for enabling integration of distributed solar power generation,” _IEEE Transactions on Smart Grid_ , 2012.
  * [5] M. A. Abdullah, K. M. Muttaqi, D. Sutanto, and A. P. Agalgaonkar, “An effective power dispatch control strategy to improve generation schedulability and supply reliability of a wind farm using a battery energy storage system,” _IEEE Transactions on Sustainable Energy_ , vol. 6, no. 3, pp. 1093–1102, 2015.
  * [6] R. T. Elliott _et al._ , “Sharing energy storage between transmission and distribution,” _IEEE Transactions on Power Systems_ , 2019.
  * [7] D. Pudjianto, M. Aunedi, P. Djapic, and G. Strbac, “Whole-systems assessment of the value of energy storage in low-carbon electricity systems,” _IEEE Transactions on Smart Grid_ , vol. 5, no. 2, pp. 1098–1109, 2014.
  * [8] N. G. Singhal, R. K. Bansal, J. M. Kemp, E. Ela, and M. Heleno, “Integration of hybrids into wholesale power markets,” Lawrence Berkeley National Laboratory (LBNL), Berkeley, CA (United States), Tech. Rep., 8 2023. [Online]. Available: https://www.osti.gov/biblio/1994813
  * [9] G. He, Q. Chen, C. Kang, P. Pinson, and Q. Xia, “Optimal bidding strategy of battery storage in power markets considering performance-based regulation and battery cycle life,” _IEEE Transactions on Smart Grid_ , vol. 7, no. 5, pp. 2359–2367, 2015.
  * [10] D. Krishnamurthy, C. Uckun, Z. Zhou, P. R. Thimmapuram, and A. Botterud, “Energy storage arbitrage under day-ahead and real-time price uncertainty,” _IEEE Transactions on Power Systems_ , 2018.
  * [11] S. Bhattacharjee, R. Sioshansi, and H. Zareipour, “Energy storage participation in wholesale markets: The impact of state-of-energy management,” _IEEE Open Access Journal of Power and Energy_ , vol. 9, pp. 173–182, 2022.
  * [12] R. K. Bansal, P. You, D. F. Gayme, and E. Mallada, “A market mechanism for truthful bidding with energy storage,” _Electric Power Systems Research_ , vol. 211, 2022.
  * [13] N. Zheng, X. Qin, D. Wu, G. Murtaugh, and B. Xu, “Energy storage state-of-charge market model,” _IEEE Transactions on Energy Markets, Policy and Regulation_ , vol. 1, no. 1, pp. 11–22, 2023.
  * [14] C. Chen, S. Li, and L. Tong, “Multi-interval energy-reserve co-optimization with soc-dependent bids from battery storage,” 2024.
  * [15] R. K. Bansal, P. You, D. F. Gayme, and E. Mallada, “Storage degradation aware economic dispatch,” in _2021 American Control Conference (ACC)_ , 2021, pp. 589–595.
  * [16] “ISO-New York : Energy market and operational data,” Available at https://www.nyiso.com/custom-reports/ (2023).
  * [17] R. D. Zimmerman and C. E. Murillo-Sanchez, “Matpower (version 7.0) [software].” Available at https://matpower.org/ (2019).
  * [18] Y. Shi, B. Xu, Y. Tan, D. Kirschen, and B. Zhang, “Optimal battery control under cycle aging mechanisms in pay for performance settings,” _IEEE Transactions on Automatic Control_ , vol. 64, no. 6, pp. 2324–2339, 2019.