# Co-optimizing Behind-The-Meter Resources under Net Metering

Ahmed S. Alahmed and Lang Tong ({asa278<EMAIL_ADDRESS> School of
Electrical and Computer Engineering, Cornell University, Ithaca, USA

###### Abstract

We consider the problem of co-optimizing behind-the-meter (BTM) storage and
flexible demands with BTM stochastic renewable generation. Under a generalized
net energy metering (NEM) policy—NEM X, we show that the optimal co-
optimization policy schedules the flexible demands based on a load priority
list that defers less prioritized loads to times when the BTM generation is
abundant. This gives rise to the notion of a net-zero zone, which we quantify
under different distributed energy resources (DER) compositions. We highlight
the special case of inflexible demands that results in a storage policy that
minimizes the imports and exports from and to the grid. Comparative statics
are provided on the optimal co-optimization policy. Simulations using real
residential data show the surplus gains of various customers under different
DER compositions.

###### Index Terms:

demand response, distributed energy resources, energy storage, home energy
management, net metering.

##  I Introduction

The falling prices of battery storage and the unremitting reduction of NEM
compensation rates for grid exports ushered storage deployment in residential
households, especially those coupled with rooftop solar111According to [1],
the total installed BTM storage capacity in 2020 reached 1000 MW, and 80% of
the residential storage capacity is paired with solar.. The increasing
differential between the rates of energy imports and exports under NEM,
increases the value of self-consuming the BTM generation, which can be
achieved by demand response [2], energy storage [3], or both [4].

Substantial research studied home energy management systems (HEMS) under the
existence of DER. The work in [4], however, was the first to propose a linear-
complexity and near closed-form characterization to the storage and flexible
demand co-optimization, which makes it possible to schedule a large number of
flexible demands and storage decisions as functions of the BTM renewable
distributed generation (DG). In this work, we expand on the analysis in [4] by
deriving additional structural properties and special cases that give more
insights to the optimal co-optimization policy.

The optimization of BTM storage operation has been extensively studied.
Researchers have studied the optimal operation of storage for various
objectives including bill minimization (or surplus maximization) [5, 6, 7],
wholesale market participation [8], and grid services provision [9]. The
literature on BTM residential storage operation largely omitted the situation
of dynamically controlling both the household’s consumption and storage to
maximize the customer’s benefit by actively scheduling the resources as
functions of the renewable DG. The handful of work done on consumption and
storage co-optimization either lacks the analyticity of our proposed solution
[5, 10, 8], or co-optimizes storage and time-of-service of deferrable load [6,
7] rather than the quantity of the elastic load, as presented in our work.

This work builds upon the optimal policy derived in [4], which co-optimizes
flexible loads and energy storage under the existence of stochastic renewable
generation when prosumers face NEM X tariff, by providing insights,
interpretations, and special cases to the solution structure. To this end,
four results are presented. First, we show that the optimal co-optimization
policy generates a load priority list that schedules demands based on the DG
profile. Second, we prove that the special case of inflexible demands
simplifies the optimal policy to one that minimizes the prosumer’s inflows and
outflows from and to the grid. Third, we quantify the net-zero zone, where the
prosumer is operationally off-the-grid, under different DER compositions.
Lastly, we perform comparative statics on the co-optimization policy’s optimal
decisions

Our simulation results adopts the Californian NEM 3.0 policy222Also called net
billing as stated in the California PUC decision. to model household’s
payment, under various customers types, including those with and without
storage, DG and flexible demands. The surplus gain and percentage of self-
consumed DG of the different customer types are investigated while varying
tariff and storage parameters.

##  II Problem Formulation and Optimal Decisions

We consider a household with BTM DER, including flexible demands, a renewable
DG, and an energy storage, facing an electric utility under NEM (Fig.1). The
surplus-maximizing household co-optimizes its BTM DER, which reveals appealing
decision and operational structures that we investigate.

Figure 1: Solar+storage prosumer under NEM. The variables of consumption $d$
and DG output $g$ are real and non-negative, whereas storage output $e$ and
net consumption $z$ variables are real.

###  II-A BTM DER Models

For the system model in Fig.1, we consider the sequential scheduling of
consumption $({\bf d}_{t})$ and storage operation $(e_{t})$ over a finite
horizon indexed by $t=0,\ldots,T-1$.

#### Flexible demand

The household has $K$ devices whose consumption bundle for $t=0,\ldots,T-1$ is
denoted by ${\bm{d}}_{t}=(d_{t1},\cdots,d_{tK})\in\mathcal{D}$, with

$\mathcal{D}:=\\{\bm{d}:\underline{\bm{d}}\preceq\bm{d}\preceq\overline{\bm{d}}\\}\subseteq\mathcal{R}^{K}_{+},$

where $\underline{\bm{d}},\overline{\bm{d}}$ are the consumption bundle’s
lower and upper limits, respectively. A device $k$ is uncontrollable if
$\underline{d}_{k}=\overline{d}_{k}$. The household’s total consumption is
defined as $d_{t}:=\bm{1}^{\top}\bm{d}_{t}$.

The utility $U_{t}({\bf d}_{t})$ of consuming ${\bf d}_{t}$ in interval $t$ is
assumed to be strictly concave, strictly increasing, continuously
differentiable, and additive, i.e.,

$U_{t}({\bf d}_{t}):=\sum_{k=1}^{K}U_{tk}(d_{tk}),\quad t=0,\ldots,T-1.$ (1)

The marginal utility function is denoted and defined by ${\bf L}_{t}:=\nabla
U_{t}=(L_{t1},\cdots,L_{tK})$.

#### Renewable

For $t=0,\ldots,T-1$, the renewable generation $g_{t}\in\mathcal{R}_{+}$ is an
exogenous (positive) Markovian random process.

#### Battery storage

For $t=0,\ldots,T-1$, the storage control is denoted by
$e_{t}=[e_{t}]^{+}-[e_{t}]^{-}\in[-\underline{e},\bar{e}]$, where
$[x]^{+}:=\max\\{0,x\\}$ and $[x]^{-}:=-\min\\{0,x\\}$ denote the positive and
negative part functions for any $x\in\mathcal{R}$, respectively, and
$\underline{e}$ and $\bar{e}$ are the maximum energy discharging and charging
rate constraints, respectively. The battery is charged when $e_{t}>0$ and
discharged when $e_{t}<0$.

The charging and discharging efficiencies are denoted by $\tau\in(0,1]$ and
$\rho\in(0,1]$, respectively, which means that charging the storage with
$[e_{t}]^{+}$ results in an increase of the SoC by $\tau[e_{t}]^{+}$, whereas
discharging by $[e_{t}]^{-}$ reduces the SoC by $\frac{1}{\rho}[e_{t}]^{-}$.
The storage SoC is denoted by $s_{t}\in[\underline{s},\bar{s}]$ with
$\underline{s}$ and $\bar{s}$ as the lower and upper capacity limits,
respectively. The SoC evolution is driven by $e_{t}$ as

$s_{t+1}=s_{t}+\tau[e_{t}]^{+}-[e_{t}]^{-}/\rho,\quad t=0,\ldots,T-1,$ (2)

with $s_{0}=s$ as the initial SoC, which is assumed to be exogenous and
independent of the household’s decisions.

###  II-B NEM X Tariff Model

The customer’s payment to the utility under NEM policy is based on the
household’s net-consumption $z_{t}\in\mathcal{R}$ defined by

$z_{t}:=d_{t}+e_{t}-g_{t},\quad t=0,\ldots,T-1.$ (3)

The net billing period can be as short as 5 minutes and as long as a day or a
month [11]. For ease of presentation, we restrict ourselves to the case that
the NEM billing period is the same as the household’s scheduling period, which
allows us to index the billing period also by $t$.

By adopting the NEM X tariff model introduced in [2], we use the NEM X tariff
parameter $\pi_{t}=(\pi^{+}_{t},\pi^{-}_{t},\pi^{0}_{t})$, to compute the
customer’s payment under NEM X as

$P^{\pi_{t}}_{t}(z_{t}):=\pi^{+}_{t}[z_{t}]^{+}-\pi^{-}_{t}[z_{t}]^{-}+\pi^{0}_{t},~{}~{}t=0,\ldots,T-1,$
(4)

where $\pi^{+}_{t},\pi^{-}_{t},\pi^{0}_{t}\in\mathcal{R}_{+}$ are the retail
(buy) rate, export (compensation) rate, and fixed (connection)
charge333Without loss of generality, we assume zero fixed charges
($\pi^{0}_{t}=0,\forall t$), since it does not affect the optimization or
solution structure., respectively. The prosumer is a net-consumer and faces
$\pi^{+}_{t}$ when $z_{t}\geq 0$, and a net-producer facing $\pi^{-}_{t}$ when
$z_{t}<0$.

The retail and export rates can be temporally varying (e.g., time-of-use
(ToU)) or fixed (e.g., flat pricing).

###  II-C Prosumer Decision Problem

We formulate the prosumer decision problem as a $T$-stage Markov decision
process (MDP). The state of the MDP in interval $t$ includes battery SoC
$s_{t}$ and renewables $g_{t}$, $x_{t}:=(s_{t},g_{t})\in\mathcal{X}$, whose
evolution is defined by (2) and the exogenous Markov process $(g_{t})$. The
initial state is denoted by $x_{0}=(s,g)$.

An MDP policy $\mu:=(\mu_{0},\ldots,\mu_{T-1})$ is a sequence of decision
rules,
$x_{t}\stackrel{{\scriptstyle\mu_{t}}}{{\rightarrow}}u_{t}:=(\bm{d}_{t},e_{t})$,
for all $x_{t}$ and $t$, that specifies consumption and storage operation in
each interval. The reward function $r_{t}^{\pi_{t}}$ consists of prosumer
surplus $S^{\pi_{t}}_{t}$ as a stage reward, and storage salvage value as a
terminal reward:

$r_{t}^{\pi_{t}}\left(x_{t},u_{t}\right):=\begin{cases}S^{\pi_{t}}_{t}(u_{t};g_{t}),&t\in[0,T-1]\\\
\gamma(s_{T}-s),&t=T,\end{cases},\\\ $ (5)

where

$S^{\pi_{t}}_{t}(u_{t};g_{t}):=U_{t}(\bm{d}_{t})-P^{\pi_{t}}_{t}(\bm{1}^{\top}\bm{d}_{t}-g_{t}+e_{t}),$
(6)

and $\gamma$ is the (marginal) salvage value of stored energy.

The storage-consumption co-optimization is defined by

$\displaystyle{\cal P}:\underset{\mu=(\mu_{0},\ldots,\mu_{T-1})}{\text{
Maximize}}$
$\displaystyle~{}~{}\mathbb{E}_{\mu}\left\\{\gamma(s_{T}-s)+\sum_{t=0}^{T-1}r_{t}\left(x_{t},u_{t}\right)\right\\}$
(7a) Subject to $\displaystyle\mbox{for all}~{}t=0,\ldots,T-1,$ $\displaystyle
s_{t+1}=s_{t}+\tau[e_{t}]^{+}-[e_{t}]^{-}/\rho$ (7b) $\displaystyle
g_{t+1}\sim F_{g_{t+1}|g_{t}}$ (7c) $\displaystyle\underline{s}\leq
s_{t}\leq\bar{s}$ (7d) $\displaystyle 0\leq[e_{t}]^{-}\leq\underline{e}$ (7e)
$\displaystyle 0\leq[e_{t}]^{+}\leq\bar{e}$ (7f)
$\displaystyle\bm{\underline{d}}\preceq\bm{d}_{t}\preceq\bm{\overline{d}}$
(7g) $\displaystyle x_{0}=(s,g),$ (7h)

where $F_{g_{t+1}|g_{t}}$ is the conditional distribution of $g_{t+1}$ given
$g_{t}$, and the expectation is taken over the exogenous stochastic generation
$(g_{t})$.

###  II-D Optimal Prosumer Decisions

The solution of the storage-consumption co-optimization in (7) is provided in
[4] under two assumptions: (A1) non-binding SoC limits (7d), and (A2)
sandwiched salvage value, where

$\max\\{(\pi_{t}^{-})\\}\leq\tau\gamma\leq\gamma/\rho\leq\min\\{(\pi_{t}^{+})\\}.$
(8)

Under A1-A2, the solution has a highly-scalable threshold-based structure that
co-schedules the consumption and storage based on the availability and level
of the BTM DG. For every $t=0,\ldots,T-1$, the co-optimization policy has six
BTM-DG-independent thresholds, ordered as

$\Delta_{t}^{-}\geq\sigma_{t}^{-}\geq\sigma_{t}^{-o}\geq\sigma_{t}^{+o}\geq\sigma_{t}^{+}\geq\Delta_{t}^{+},$
(9)

and computed as:

$\begin{array}[]{ll}\Delta_{t}^{+}:=f_{t}(\pi_{t}^{+})-\underline{e},{}{}&\Delta_{t}^{-}:=f_{t}(\pi_{t}^{-})+\overline{e},\\\
\sigma_{t}^{+}:=f_{t}(\gamma/\rho)-\underline{e},&\sigma_{t}^{-}:=f_{t}(\tau\gamma)+\overline{e},\\\
\sigma_{t}^{+o}:=f_{t}(\gamma/\rho),&\sigma_{t}^{-o}:=f_{t}(\tau\gamma),\\\
\end{array}$ (10)

where $f_{t}$ is the sum of inverse marginal utilities defined as

$\displaystyle f_{t}(\pi_{t})$ $\displaystyle:=$
$\displaystyle\sum_{k=1}^{K}f_{tk}(\pi_{t})$ (11) $\displaystyle
f_{tk}(\pi_{t})$ $\displaystyle:=$
$\displaystyle\max\\{\underline{d}_{k},\min\\{L_{tk}^{-1}(\pi_{t}),\overline{d}_{k}\\}\\},$
(12)

and $L_{tk}$ is the marginal utility function (1) of device $k$ in interval
$t$ and $L_{tk}^{-1}$ its inverse.

For every $t=0,\ldots,T-1$, the optimal consumption $d^{\ast}_{tk}(g_{t})$ of
every device $k$, storage operation $e^{\ast}_{t}(g_{t})$, net-consumption
$z^{\ast}_{t}(g_{t})$, and the resulting payment $P^{\ast,\pi_{t}}_{t}(g_{t})$
are monotonic in $g_{t}$, and their structures are summarized in Table I (Also
depicted in Fig.3). The household operates in 1) the net consumption zone
$(+)$ if $g_{t}\leq\Delta^{+}_{t}$, 2) the net production zone $(-)$ if
$g_{t}\geq\Delta^{-}_{t}$, and 3) the net zero zone $(0)$ if
$g_{t}\in[\Delta^{+}_{t},\Delta^{-}_{t}]$, under which the household is off-
the-grid.

TABLE I: Summary of the optimal co-optimization policy.

Zone | $(+)$ | $(0)$ | $(-)$
---|---|---|---
$g_{t}$ | $g_{t}<\Delta^{+}$ | $g_{t}\in(\Delta^{+}_{t},\sigma^{+}_{t}]$ | $g_{t}\in(\sigma^{+}_{t},\sigma^{+o}_{t}]$ | $g_{t}\in(\sigma^{+o}_{t},\sigma^{-o}_{t}]$ | $g_{t}\in(\sigma^{-o}_{t},\sigma^{-}_{t}]$ | $g_{t}\in(\sigma^{-}_{t},\Delta^{-}_{t}]$ | $g_{t}>\Delta^{-}_{t}$
$d^{\ast}_{tk}(g_{t})$ | $f_{tk}(\pi^{+}_{t})$ | $f_{tk}(f^{-1}_{t}(g_{t}+\underline{e}))$ | $f_{tk}(f^{-1}_{t}(\gamma/\rho))$ | $f_{tk}(f^{-1}_{t}(g_{t}))$ | $f_{tk}(f^{-1}_{t}(\gamma\tau))$ | $f_{tk}(f^{-1}_{t}(g_{t}-\overline{e}))$ | $f_{tk}(\pi^{-}_{t})$
$e^{\ast}_{t}(g_{t})$ | $-\underline{e}$ | $-\underline{e}$ | $g_{t}-\sigma^{+o}_{t}$ | $0$ | $g_{t}-\sigma^{-o}_{t}$ | $\overline{e}$ | $\overline{e}$
$z_{t}^{\ast}(g_{t})$ | $z_{t}^{\ast}>0$ | $z_{t}^{\ast}=0$ | $z_{t}^{\ast}=0$ | $z_{t}^{\ast}=0$ | $z_{t}^{\ast}=0$ | $z_{t}^{\ast}=0$ | $z_{t}^{\ast}<0$
$P^{\ast,\pi_{t}}_{t}(g_{t})$ | $\pi^{+}_{t}z^{\ast}_{t}$ | $0$ | $0$ | $0$ | $0$ | $0$ | $\pi^{-}_{t}z^{\ast}_{t}$

##  III Solution Properties and Special Cases

We discuss some properties and special cases of the optimal co-optimization
policy in Sec.II-D. Sec.III-A shows the load priority ranking structure of the
solution. Sec.III-B considers the special case of solving (7) under
passive444We use passive and active to refer to customers with DG-inelastic
and DG-elastic demands, respectively [11]. demands. Sec.III-C, quantifies the
net zero zone, and show that the more flexible resources the prosumer has, the
larger its net zero zone. Lastly, Sec.III-D, provides comparative statics
analysis on the solution structure.

###  III-A Load Priority Ranking Rule

The optimal consumption schedule reveals important microeconomics
interpretations based on marginal utilities of devices and the rates
$\pi^{+}_{t},\pi^{-}_{t},\gamma/\rho$ and $\tau\gamma$. Devices with higher
marginal utilities are prioritized in the net-consumption zone
($z^{\ast}_{t}(g_{t})>0$); when the DG output is low. Less important devices
(lower marginal utilities) are exercised only when the DG output is high.
Proposition 1 formalizes the conditions for device consumptions in each net-
consumption zone.

######  Proposition 1 (Load priority ranking rule).

Under A1-A2, and assuming w.l.o.g that $\underline{d}_{k}=0,\forall k$, the
scheduling of every device $k$ and $t=0,\ldots,T-1$ in any of the three
consumption zones, depends on its marginal utility $L_{tk}(\cdot)$. If

  1. 1.

$L_{tk}(0)>\pi^{+}_{t}$, device $k$ is consumed in all zones.

  2. 2.

$\pi^{+}_{t}\geq L_{tk}(0)>\gamma/\rho$, device $k$ is consumed in all zones,
except the net-consumption zone.

  3. 3.

$\gamma/\rho\geq L_{tk}(0)>\tau\gamma$, device $k$ is consumed only if
$g_{t}>\sigma^{+o}_{t}$.

  4. 4.

$\tau\gamma\geq L_{tk}(0)>\pi^{-}_{t}$, device $k$ is consumed only if
$g_{t}>\sigma^{-}_{t}$.

  5. 5.

$\pi^{-}_{t}>L_{tk}(0)$, device $k$ is never consumed. ∎

To illustrate Proposition 1, marginal utilities of five devices corresponding
to the 5 cases in Proposition 1 are shown in Fig.2. Note that since the
marginal utility of device 1 at zero consumption $L_{t1}(0)$ is greater than
$\pi^{+}_{t}$, the device was consumed in all zones because the non-increasing
marginal utility intersected all of the four price lines, granting a positive
consumption. On the other hand, for device 55, since
($L_{t5}(0)\leq\pi^{-}_{t}$), the device was not consumed in any zone. Devices
2, 3 and 4 do not consume in the net-consumption zone since
$L_{t2}(0),L_{t3}(0),L_{t4}(0)<\pi^{+}_{t}$, however, they start consuming
from the smallest point under which their marginal utilities intersect with
the price.

Figure 2: Consumption allocation to devices based on marginal utilities.

###  III-B Passive Prosumer

For every $t=0,\ldots,T-1$, the passive SDG555We refer to prosumers with
standalone DG as DG prosumers, and prosumers with storage and DG as SDG
prosumers. prosumer schedules the consumption as if the household faces only
$\pi^{+}_{t}$, and therefore consumes $f_{t}(\pi^{+}_{t})$ for any DG output.
It turns out that the the optimal policy of a passive SDG prosumer is to
minimize the absolute value of its net-consumption $z_{t}$.

######  Proposition 2 (Optimal policy under DG-passive demands).

Under A1-A2 and for any DG-passive consumption bundle
$\hat{\bm{d}}_{t}\in\mathcal{D}$, the optimal storage operation is to
discharge/charge as much as possible to minimize the absolute value of net
consumption:

$\displaystyle\mu^{\ast}_{t}\in\underset{e_{t}\in\\{-\underline{e},\bar{e}\\}}{\text{arg
min}}$ $\displaystyle~{}~{}|z_{t}|.$ (13)

for every $t=0,\ldots,T-1$, ∎

The passive SDG prosumer optimal policy is intuitive (Fig.3). The storage
exercises a balancing control that tries to null the renewable-adjusted
consumption $\tilde{d}_{t}:=\bm{1}^{\top}\hat{\bm{d}}_{t}-g_{t}$ [12]. For the
given fixed total consumption $f_{t}(\pi^{+}_{t})$, the battery’s stored
energy is used to a) reduce net consumption in case $\tilde{d}_{t}<0$, b)
increase net consumption (production) in case $\tilde{d}_{t}>0$, and c)
maintain net-zero as much as possible. Under (a), the prosumer gains at the
rate of $\pi^{+}$ and losses at the rate of $\gamma/\rho$, whereas under (b),
the prosumer gains at the rate of $\tau\gamma$ and losses at the rate of
$\pi^{-}$. Proposition 2 also implies that the ratio of self-consumption over
the scheduling period $SC\in[0,1]$, defined by

$SC(z_{t}):=1+\sum_{t=0}^{T-1}\frac{[z_{t}]^{-}}{g_{t}},\text{ for
}\sum_{t=0}^{T-1}g_{t}>0,$ (14)

is maximized.

Figure 3: Active (solid) and passive (dashed) SDG prosumers decisions.

###  III-C Net Zero Zone Quantification

The passive SDG prosumer case shows the propensity of prosumers to achieve
net-zero. We hence define and quantify the net-zero zone length under
different DER compositions.

######  Definition 1 (Net-zero zone length).

For $t=0,\ldots,T-1$, and for any optimal policy $\bm{\mu}^{\ast}$ the net-
zero zone length is given by

$|{\cal G}_{t}^{\bm{\mu}^{\ast}}|:=\underset{g_{t}\in{\cal
G}_{t}^{\bm{\mu}^{\ast}}}{\text{ Maximize }}g_{t}-\underset{g_{t}\in{\cal
G}_{t}^{\bm{\mu}^{\ast}}}{\text{ Minimize }}g_{t}$ (15)

where ${\cal
G}_{t}^{\bm{\mu}^{\ast}}=\\{g_{t}\in\mathcal{R}_{+}:z^{\bm{\mu}^{\ast}}_{t}(g_{t})=0\\}$
is a convex set.

Definition 1 is used in Corollary 1 to show that the co-optimization policy’s
net-zero zone length is the sum of the net-zero zone lengths of DG active [2]
and SDG passive prosumers (Sec.III-B).

######  Corollary 1 (Net-zero zone length quantification).

Under A1-A2, and for every $t=0,\ldots,T-1$, the net-zero zone lengths of
optimal: 1) passive DG $|{\cal G}_{t}^{\bm{\mu}^{\ast}_{1}}|$, 2) active DG
$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{2}}|$, 3) passive SDG $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{3}}|$ and 4) active SDG $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{4}}|$ prosumers are ordered as

$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{4}}|\geq|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{3}}|\geq|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{2}}|\geq|{\cal G}_{t}^{\bm{\mu}^{\ast}_{1}}|,$ (16)

if $f_{t}(\pi_{t}^{-})-f_{t}(\pi_{t}^{+})\leq\overline{e}+\underline{e}$, and
ordered as

$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{4}}|\geq|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{2}}|\geq|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{3}}|\geq|{\cal G}_{t}^{\bm{\mu}^{\ast}_{1}}|,$ (17)

if $f_{t}(\pi_{t}^{-})-f_{t}(\pi_{t}^{+})>\overline{e}+\underline{e}$.

It also holds that

$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{4}}|=|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{2}}|+|{\cal G}_{t}^{\bm{\mu}^{\ast}_{3}}|.$ (18)

∎

The corollary shows that the more flexible resources (active loads and
storage) an optimal prosumer has, the longer its net-zero zone length, as in
$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{4}}|$. The length of net-zero zone is
compromised if one or both of the decision variables are dropped, i.e.,
$\bm{d}$ in $|{\cal G}_{t}^{\bm{\mu}^{\ast}_{3}}|$, $e$ in $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{2}}|$ and both $\bm{d},e$ in $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{1}}|$.

Shrinking the net-production and net-consumption zones lengths, while
increasing $|{\cal G}_{t}^{\bm{\mu}^{\ast}}|$ has crucial economical and
technical implications. As $|{\cal G}_{t}^{\bm{\mu}^{\ast}}|$ increases, the
customer’s bill becomes more immune to $\pi^{-}$ reductions, because $SC$ in
(14) becomes higher. For grid operators and utilities, higher $|{\cal
G}_{t}^{\bm{\mu}^{\ast}}|$ achieves operational benefits such as reducing
reverse power flows, which improves network’s reliability [13]. This, however,
may come at the cost of higher grid defection rates [14], requiring utilities
to reshape their business model.

###  III-D Comparative Statics

Here we offer a comparative statics analysis on the optimal policy to
investigate how the parameters and variables influence the solution structure
in each net-consumption zone. Theorem 1 in the appendix formalizes the effect
of changing exogenous parameters on the endogenous quantities of consumption,
storage operation, payment, and surplus. Table II summarizes the comparative
static analysis by considering $\epsilon$-increases of the exogenous
parameters and examining changes of endogenous quantities at interior points
of the three zones.

Table II shows that the increase in the renewable output enables increasing
the consumption and the storage output, which results in a decreasing payment
and increasing surplus. This is because, under NEM X, self-consumption of the
renewable output is valued more than exporting it back.

Varying the NEM X tariff parameters $\pi=(\pi^{+},\pi^{-},\pi^{0})$, as shown
in Table II have direct implication on $S^{\ast,\pi_{t}}_{t}(g_{t})$.
Increasing $\pi^{+}_{t}$ negatively affects $S^{\ast,\pi_{t}}_{t}(g_{t})$,
since the household consumption will be reduced. However, increasing the
export rate positively effect $S^{\ast,\pi_{t}}_{t}(g_{t})$ as the payment to
the utility reduces and the consumption increases. Increasing $\pi^{0}_{t}$
reduces $S^{\ast,\pi_{t}}_{t}(g_{t})$, because the payment increases.
Interestingly, the storage output is independent of the NEM X tariff
parameters.

The salvage value rate affects the optimal consumption, storage operation, and
prosumer surplus only in the net-zero zone, where the consumption and surplus
reduce as $\gamma$ increases, and the storage output increases as $\gamma$
increases.

TABLE II: Comparative Static Analysis.

Quantity | Zone | $g_{t}\bm{\uparrow}$ | $\pi^{+}_{t}\bm{\uparrow}$ | $\pi^{-}_{t}\bm{\uparrow}$ | $\gamma\bm{\uparrow}$ | $\pi^{0}_{t}\bm{\uparrow}$
---|---|---|---|---|---|---
$d^{\ast}_{tk}(g_{t})$ | $+$ | — | $\bm{\downarrow}$ | — | — | —
$-$ | — | — | $\bm{\downarrow}$ | — | —
$0$ | $\;\;\bm{\uparrow}$ | — | — | $\bm{\downarrow}$ | —
$e^{\ast}_{t}(g_{t})$ | $+$ | — | — | — | — | —
$-$ | — | — | — | — | —
$0$ | $\;\;\bm{\uparrow}$ | — | — | $\;\;\bm{\uparrow}$ | —
$P^{\ast,\pi_{t}}_{t}(g_{t})$ | $+$ | $\bm{\downarrow}$ | $\times$ | — | — | $\;\;\bm{\uparrow}$
$-$ | $\bm{\downarrow}$ | — | $\bm{\downarrow}$ | — | $\;\;\bm{\uparrow}$
$0$ | — | — | — | — | $\;\;\bm{\uparrow}$
$S^{\ast,\pi_{t}}_{t}(g_{t})$ | $+$ | $\;\;\bm{\uparrow}$ | $\bm{\downarrow}$ | — | — | $\bm{\downarrow}$
$-$ | $\;\;\bm{\uparrow}$ | — | $\;\;\bm{\uparrow}$ | — | $\bm{\downarrow}$
$0$ | $\;\;\bm{\uparrow}$ | — | — | $\bm{\downarrow}$ | $\bm{\downarrow}$

$\bm{\uparrow}:$ increasing  $\bm{\downarrow}\;:$ decreasing  — : unchanged
$\times:$ indeterminant

##  IV Numerical Results

We consider a household receiving service under a NEM policy. Five prosumer
types are studied: 1) consumers: customers without BTM DER, 2) active DG
prosumers: customers who optimize their consumption based on available DG [2],
3) active SDG prosumers: customers who co-optimize storage and consumption as
in Sec.II-D, 4) passive DG and 5) passive SDG prosumers: customers who do not
optimize consumption based on available DG; DG is only used to reduce cost.
Passive prosumers consume as if they are consumers.

To model household’s consumption and renewable generation, we used the Smart
project data set666The data repository can be accessed at Smart Data Set. We
used home D., which has a 1-minute granularity of aggregated and individual
home circuits collected over the year of 2016. We restricted our simulation to
only three months of 2016 (June-August).

The consumption preferences are captured by the following, widely-adopted,
quadratic concave utility function

$U_{tk}(d_{tk})=\begin{cases}\alpha_{tk}d_{tk}-\frac{\beta_{tk}}{2}d_{tk}^{2},&0\leq
d_{tk}<\frac{\alpha_{tk}}{\beta_{tk}}\\\
\frac{\alpha_{tk}^{2}}{2\beta_{tk}},&d_{tk}\geq\frac{\alpha_{tk}}{\beta_{tk}},\end{cases}$
(19)

where $\alpha_{tk}$ and $\beta_{tk}$ are some utility parameters that are
learned using historical consumption and price data by positing an elasticity
of demand777The long-run price elasticity of electricity demand used was -0.21
[15]. as in [11].

The battery charge and discharge efficiencies $\tau,\rho$ were assumed to be
0.95. Similar to Tesla Powerwall888The specifications of Tesla Powerwall can
be found at Tesla Powerwall. 2, the storage capacity was set to 13.5 kWh. The
salvage value rate $\gamma$ was chosen so that A2 in (8) holds.

The household faces the Californian NEM 3.0 tariff, which has a ToU-based
retail rate $\pi^{+}$, a dynamic avoided-cost-based export rate $\pi^{-}$, and
a fixed charge of $\pi^{0}=\$15$/month. For $\pi^{+}$, we adopted PG&E 2022
summer E-TOU-B rate schedule, which has peak and off-peak rates of
$\pi^{+}_{h}=\$0.49$/kWh and $\pi^{+}_{l}=\$0.37$/kWh, respectively, and a
16–21 peak period. For $\pi^{-}$, the 2022 average avoided cost rates,
developed by E3 Inc. avoided cost calculator (ACC), were used999The ACC rates
can be accessed at E3 ACC..

###  IV-A Surplus Gain

We compared the average daily surplus gain achieved by the five prosumer
types, using consumers as the benchmark. Table III shows the average
percentage gain in daily surplus over that achieved by a consumer under one-
minute and one-hour netting frequencies and three different storage
charge/discharge rates $\overline{e}=\underline{e}\in\\{0.5,0.75,1\\}$.

Four key observations are in order. First, active SDG customers achieved the
highest surplus gain of all cases. Second, increasing the netting frequency
from hourly to minutely basis always resulted in lower surplus gains, as
customers became more vulnerable to the lower export rate. Third, the value of
being active were significant, with 8% surplus gain increase for both DG and
SDG customers. Lastly, increasing storage rate by 0.25kW for both passive and
active customers resulted in a roughly 4% surplus gain.

TABLE III: Surplus gain over consumers (%).

DER | Customer |  $\overline{e}=\underline{e}$ (kW) | 1-min | 1-hour
---|---|---|---|---
– | Consumer | 0 | 0 | 0
DG | Passive | 0 | 69.27 | 70.82
Active | 0 | 77.48 | 79.21
DG + Storage | Passive | 0.5 | 81.27 | 82.98
0.75 | 86.13 | 87.90
1 | 90.52 | 92.33
Active | 0.5 | 89.44 | 91.23
0.75 | 94.19 | 96.02
1 | 98.32 | 100.25

###  IV-B DG Self-Consumption

Table IV shows the self-consumption (computed as in (14)) percentage of the
studied customer types under a one-minute and one-hour netting frequencies and
three different storage charge/discharge rates
$\overline{e}=\underline{e}\in\\{0.5,0.75,1\\}$.

Broadly speaking, customers who achieved high surplus gains in Table III
managed to achieve high self-consumption percentages (Table IV). This is,
however, not always the case, as active DG prosumers achieved higher self-
consumption but lower surplus gain compared to passive SDG prosumers with
0.5kW storage charge/discharge rates. The reason is that, although active DG
prosumers more effectively reduced energy exports, they under-performed in
reducing energy imports compared to SDG prosumers, which is more costly. At
0.75kW and 1kW storage rates, passive SDG prosumers had both higher surplus
gains and higher self-consumption.

Table IV shows that increasing the netting frequency decreased the self-
consumption percentage, as customers had a shorter banking period for loads to
consume the DG output. For both netting frequencies, installing a DG without
actively scheduling the consumption based on the available DG, resulted in
exporting back more than 57% of the DG. Actively scheduling the consumption
based on the available DG, as proposed [2], increased self-consumption to over
55%. When the prosumer installed storage in addition to the DG, self-
consumption increased to more than 61% when the customer was passive, and to
over 74% when the prosumer was active.

TABLE IV: DG self-consumption (%).

DER | Customer |  $\overline{e}=\underline{e}$ (kW) | 1-min | 1-hour
---|---|---|---|---
– | Consumer | 0 | – | –
DG | Passive | 0 | 41.02 | 42.25
Active | 0 | 55.22 | 56.68
DG + Storage | Passive | 0.5 | 52.22 | 53.32
0.75 | 57.18 | 58.19
1 | 61.64 | 62.67
Active | 0.5 | 66.24 | 67.40
0.75 | 70.87 | 71.97
1 | 74.79 | 76.00

###  IV-C Value of Storage

Fig.4, shows surplus gains of active and passive SDG prosumers compared to
active and passive DG prosumers101010This is also called value of storage.
under varying export rates (left) and storage efficiencies (right).

The left plot shows that the value of storage (VoS) and value of demand
response (VDR) increased as the differential between the retail and export
rates enlarged. The gain increase was higher in the active SDG – passive DG
case (yellow), because the curve augmented both VDR and VoS. The surplus gain
increased in the passive SDG – passive DG (orange) and active SDG – active DG
(blue) cases, as the $\pi^{-}$ decreased was primarily due to VoS, which has
higher value when locally absorbing $g$ becomes more valuable. The passive SDG
– active DG surplus gain as $\pi^{-}$ decreased, compares the effectivity of
VoS alone and VDR alone in reducing exported generation.

The right plot shows that VoS increased as the storage charging/discharging
efficiencies increased. Interestingly, the passive SDG – active DG curve
(purple) shows that when the storage was relatively inefficient, VDR exceeded
VoS, which was reversed as the storage efficiency improved.

Figure 4: Surplus gain over active/passive DG prosumers
($\overline{e}=\underline{e}=0.75$kW).

##  V Conclusion

This work analyzed the structural properties of the optimal policy co-
optimizing flexible demands and storage devices when operated with a renewable
DG. The policy is shown to abide by a load priority ranking rule that
exercises consumption decisions based on load importance, which gets relaxed
when the renewables are abundant. Comparative statics on the optimal
decisions, prosumer payment, and reward have been investigated under different
tariff and household DER parameters. Lastly, it has been shown that under the
special case of inflexible demands, the storage is operated in a manner that
minimizes the inflows and outflows from and to the grid.

## References

  * [1] G. L. Barbose, S. Elmallah, and W. Gorman, “Behind the meter solar+storage: Market data and trends,” Lawrence Berkeley National Laboratory, Tech. Rep., 07 2021.
  * [2] A. S. Alahmed and L. Tong, “On net energy metering X: Optimal prosumer decisions, social welfare, and cross-subsidies,” _IEEE Transactions on Smart Grid_ , pp. 1–1, 2022.
  * [3] N. R. Darghouth, G. L. Barbose, and A. D. Mills, “Implications of rate design for the customer-economics of behind-the-meter storage,” Lawrence Berkeley National Laboratory, Tech. Rep., 08 2019. [Online]. Available: https://emp.lbl.gov/webinar/implications-rate-design-customer
  * [4] A. S. Alahmed, L. Tong, and Q. Zhao, “Co-optimizing distributed energy resources in linear complexity under net energy metering,” 2022. [Online]. Available: https://arxiv.org/abs/2208.09781
  * [5] M. A. A. Pedrasa, T. D. Spooner, and I. F. MacGill, “Coordinated scheduling of residential distributed energy resources to optimize smart home energy services,” _IEEE Transactions on Smart Grid_ , vol. 1, no. 2, pp. 134–143, 2010.
  * [6] Y. Xu and L. Tong, “Optimal operation and economic value of energy storage at consumer locations,” _IEEE Transactions on Automatic Control_ , vol. 62, no. 2, pp. 792–807, 2017.
  * [7] Y. Guo, M. Pan, Y. Fang, and P. P. Khargonekar, “Decentralized coordination of energy utilization for residential households in the smart grid,” _IEEE Transactions on Smart Grid_ , vol. 4, no. 3, 2013.
  * [8] J. Garcia-Gonzalez, R. M. R. de la Muela, L. M. Santos, and A. M. Gonzalez, “Stochastic joint optimization of wind generation and pumped-storage units in an electricity market,” _IEEE Transactions on Power Systems_ , vol. 23, no. 2, pp. 460–468, 2008.
  * [9] H. Hao, D. Wu, J. Lian, and T. Yang, “Optimal coordination of building loads and energy storage for power grid and end user services,” _IEEE Transactions on Smart Grid_ , vol. 9, no. 5, pp. 4335–4345, 2018.
  * [10] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on utility maximization in power networks,” in _2011 IEEE Power and Energy Society General Meeting_ , 2011, pp. 1–8.
  * [11] A. S. Alahmed and L. Tong, “Integrating distributed energy resources: Optimal prosumer decisions and impacts of net metering tariffs,” _SIGENERGY Energy Inform. Rev._ , vol. 2, no. 2, p. 13–31, Aug. 2022. [Online]. Available: https://doi.org/10.1145/3555006.3555008
  * [12] P. Harsha and M. Dahleh, “Optimal management and sizing of energy storage under dynamic pricing for the efficient integration of renewable energy,” _IEEE Transactions on Power Systems_ , vol. 30, no. 3, pp. 1164–1181, 2015\.
  * [13] E. L. Ratnam, S. R. Weller, and C. M. Kellett, “Scheduling residential battery storage with solar PV: Assessing the benefits of net metering,” _Applied Energy_ , vol. 155, pp. 881–891, 2015.
  * [14] S. Borenstein, “Can net metering reform fix the rooftop solar cost shift?” Jan. 2021. [Online]. Available: https://energyathaas.wordpress.com
  * [15] A. Asadinejad, A. Rahimpour, K. Tomsovic, H. Qi, and C. fei Chen, “Evaluation of residential customer elasticity for incentive based demand response programs,” _Electric Power Systems Research_ , vol. 158, pp. 26–36, 2018\.

## Appendix: Proofs

###  V-A Proof of proposition 1

From the solution of (7), the prosumer’s fixed consumptions are functions of
the prices $\pi^{+}_{t},\pi^{-}_{t},\gamma/\rho,\tau\gamma$ with the order in
(8). From the monotonicity of the marginal utilities $L_{tk}(\cdot)$ for every
$t=0,\ldots,T-1$ and device $k$, the consumptions are ordered as:

$f_{tk}(\pi^{-}_{t})\geq f_{tk}(\tau\gamma)\geq f_{tk}(\gamma/\rho)\geq
f_{tk}(\pi^{+}_{t})$ (20)

The proof of cases 1–5 in the proposition is in order:

  1. 1.

If $L_{tk}(0)>\pi^{+}_{t}$, then $L^{-1}_{tk}(\pi^{+}_{t})>0$ hence
$f_{tk}(\pi^{+}_{t})>0$. Given (20) and the monotonicity of $d^{\ast}_{tk}$,
device $k$’s minimum limit constraint will never bind. As a result, the device
is consumed in all three net-consumption zones.

  2. 2.

If $\frac{\gamma}{\rho}<L_{tk}(0)\leq\pi^{+}_{t}$, then
$L^{-1}_{tk}(\pi^{+}_{t})\leq 0$ and $L^{-1}_{tk}(\gamma/\rho)\geq 0$, hence
$f_{tk}(\gamma/\rho)>0$. Because $\underline{d}_{k}=0$, the consumption in the
net-consumption zone is $f_{tk}(\pi^{+}_{t})=0$. Therefore, device $k$ is not
consumed in the net-consumption zone, i.e. when
$g_{t}\leq\Delta^{+}_{t},\forall t$.

  3. 3.

If $\tau\gamma<L_{tk}(0)\leq\frac{\gamma}{\rho}$, then
$L^{-1}_{tk}(\gamma/\rho)\leq 0$ hence $f_{tk}(\gamma/\rho)=0$. However,
$L^{-1}_{tk}(\tau\gamma)>0$ hence $f_{tk}(\tau\gamma)>0$. Given (20) and the
monotonicity of $d^{\ast}_{tk}$, the device $k$ is not consumed whenever
$g_{t}\leq\sigma^{+o}_{t}$ for every $t$.

  4. 4.

If $\pi^{-}_{t}<L_{tk}(0)\leq\tau\gamma$, then $L^{-1}_{tk}(\tau\gamma)\leq 0$
hence $f_{tk}(\tau\gamma)=0$. However, $L^{-1}_{tk}(\pi^{-}_{t})>0$ hence
$f_{tk}(\pi^{-}_{t})>0$. Given (20) and the monotonicity of $d^{\ast}_{tk}$,
the device $k$ is not consumed whenever $g_{t}\leq\sigma^{-}_{t}$.

  5. 5.

If $L_{tk}(0)<\pi^{-}_{t}$, then $L^{-1}_{tk}(\pi^{-}_{t})<0$ hence
$f_{tk}(\pi^{-}_{t})=0$. Given (20) and the monotonicity of $d^{\ast}_{tk}$,
the device $k$ is never consumed. ∎

###  V-B Proof of proposition 2

When the consumption is dropped from the set of decision variable, the MDP
policy $\mu:=(\mu_{0},\ldots,\mu_{T-1})$ becomes a sequence of decision rules,
$x_{t}\stackrel{{\scriptstyle\mu_{t}}}{{\rightarrow}}u_{t}:=e_{t}$, for all
$x_{t}$ and $t$, that specifies storage operation in each interval. The
optimal storage operation of the prosumer decision problem in (7), under
A1-A2, follows from Proposition 3 in [4], with fixing the consumption at
$f_{t}(\pi^{+}_{t})$ for every $t=0,\ldots,T-1$, as

$e^{\ast}_{t}(g_{t})=\left\\{\begin{array}[]{ll}\max\\{g_{t}-f_{t}(\pi^{+}_{t}),-\underline{e}\\}&g_{t}\leq
f_{t}(\pi^{+}_{t})\\\
\min\\{g_{t}-f_{t}(\pi^{+}_{t}),\bar{e}\\}&g_{t}>f_{t}(\pi^{+}_{t}).\\\
\end{array}\right.$

Given

$\displaystyle\max(a,b)\pm c$ $\displaystyle=\max(a\pm c,b\pm c)$
$\displaystyle\min(a,b)\pm c$ $\displaystyle=\min(a\pm c,b\pm c),$

the optimal net-consumption
$z^{\ast}_{t}(g_{t}):=f_{t}(\pi^{+}_{t})-g_{t}+e^{\ast}_{t}$, can be written
as:

$z^{\ast}_{t}(g_{t})=\left\\{\begin{array}[]{ll}\max\\{0,f_{t}(\pi^{+}_{t})-g_{t}-\underline{e}\\},&z^{\ast}_{t}(g_{t})\geq
0\\\ \min\\{0,f_{t}(\pi^{+}_{t})-g_{t}+\bar{e}\\},&z^{\ast}_{t}(g_{t})<0,\\\
\end{array}\right.$

which is simply

$z^{\ast}_{t}(g_{t})=\left\\{\begin{array}[]{ll}f_{t}(\pi^{+}_{t})-g_{t}-\underline{e},&z^{\ast}_{t}(g_{t})>0\\\
0,&z^{\ast}_{t}(g_{t})=0\\\
f_{t}(\pi^{+}_{t})-g_{t}+\bar{e},&z^{\ast}_{t}(g_{t})<0.\\\
\end{array}\right.$ (21)

Note that to solve (13), for every $t=0,\ldots,T-1$, one can break:

$\displaystyle\mathcal{P}:$
$\displaystyle\underset{e\in\\{-\underline{e},\bar{e}\\}}{\text{minimize}}$
$\displaystyle|z_{t}|,$

to the following three convex optimizations $\mathcal{P}^{+},\mathcal{P}^{-}$
and $\mathcal{P}^{0}$:

$\displaystyle\mathcal{P}^{+}:$
$\displaystyle\underset{e_{t}\in\\{-\underline{e},\bar{e}\\}}{\text{minimize}}$
$\displaystyle z_{t}$ subject to $\displaystyle
f_{t}(\pi^{+}_{t})-g_{t}+e_{t}\geq 0$ $\displaystyle\mathcal{P}^{-}:$
$\displaystyle\underset{e_{t}\in\\{-\underline{e},\bar{e}\\}}{\text{minimize}}$
$\displaystyle-z_{t}$ subject to $\displaystyle
f_{t}(\pi^{+}_{t})-g_{t}+e_{t}\leq 0$ $\displaystyle\mathcal{P}^{0}:$
$\displaystyle\underset{e_{t}\in\\{-\underline{e},\bar{e}\\}}{\text{minimize}}$
$\displaystyle z_{t}$ subject to $\displaystyle
f_{t}(\pi^{+}_{t})-g_{t}+e_{t}=0$

Given $g_{t}$, the optimal schedule is the one that achieves the minimum value
among $\mathcal{P}^{+},\mathcal{P}^{-}$ and $\mathcal{P}^{0}$. Note that, for
all three optimizations, the optimal storage operation exist. Because the
Slater’s condition is satisfied for these optimizations, KKT conditions for
optimality is necessary and sufficient.

From Theorem 1 in [2], we can use the renewable adjusted consumption
$\tilde{d}_{t}:=f_{t}(\pi^{+}_{t})-g_{t}$ here to characterize the optimal
storage operation, as:

$e^{\ast}_{t}(g_{t})=\left\\{\begin{array}[]{ll}-\underline{e},&-\tilde{d}_{t}<-\underline{e}\\\
-\tilde{d}_{t},&-\tilde{d}_{t}\in[-\underline{e},\overline{e}]\\\
\overline{e},&-\tilde{d}_{t}>\overline{e}.\\\ \end{array}\right.$ (25)

Using the optimal storage operation $e^{\ast}_{t}(g_{t})$ the optimal net
consumption is

$\displaystyle z^{\ast}_{t}(g_{t})$ $\displaystyle=$
$\displaystyle\tilde{d}_{t}+e^{\ast}_{t}(g_{t})$ (29) $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}\tilde{d}_{t}-\underline{e},&z^{\ast}_{t}(g_{t})>0\\\
0,&z^{\ast}_{t}(g_{t})=0\\\
\tilde{d}_{t}+\overline{e},&z^{\ast}_{t}(g_{t})<0,\end{array}\right.$

which is equivalent to (21). ∎

###  V-C Proof of corollary 1

The proof of the corollary is based on the thresholds of the operational zones
of every customer type. For every $t=0,\ldots,T-1$, the net-zero zone of
active SDG prosumers is when $g_{t}\in[\Delta^{+}_{t},\Delta^{-}_{t}]$, hence
the length of the zone is

$|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{4}}|=\Delta^{-}_{t}-\Delta^{+}_{t}=f_{t}(\pi^{-}_{t})-f_{t}(\pi^{+}_{t})+\bar{e}+\underline{e}.$

The net-zero zone of passive SDG prosumers with consumption
$f_{t}(\pi^{+}_{t})$ is when
$g_{t}\in[f_{t}(\pi^{+}_{t})-\underline{e},f_{t}(\pi^{+}_{t})+\overline{e}]$
(as shown in the proof of proposition 2), hence the length of the zone is

$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{3}}|=\bar{e}+\underline{e}.$

The net-zero zone of active DG prosumers is when
$g_{t}\in[f_{t}(\pi^{+}_{t}),f_{t}(\pi^{-}_{t})]$ (as Theorem 1 in [2] shows),
hence the length of the zone is

$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{2}}|=f_{t}(\pi^{-}_{t})-f_{t}(\pi^{+}_{t}).$

Lastly passive DG prosumers have the smallest net-zero zone length $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{1}}|$ because $z^{\ast}$ crosses zero only in one
distinct point, i.e., $f_{t}(\pi^{+}_{t})=g_{t}$.

Therefore, the ranking in (16) holds if
$f_{t}(\pi^{-}_{t})-f_{t}(\pi^{+}_{t})\leq\bar{e}+\underline{e}$, and the
ranking in (17) holds if
$f_{t}(\pi^{-}_{t})-f_{t}(\pi^{+}_{t})>\bar{e}+\underline{e}$. One should
easily verify (18) from the expressions of $|{\cal
G}_{t}^{\bm{\mu}^{\ast}_{2}}|,|{\cal G}_{t}^{\bm{\mu}^{\ast}_{3}}|$, and
$|{\cal G}_{t}^{\bm{\mu}^{\ast}_{4}}|$ above. ∎

###  V-D Theorem 1 and its proof

######  Theorem 1 (Comparative statics analysis of NEM X prosumer).

Under A1-A2, for every $t=0,\ldots,T-1$, and every device $k$, the optimal
consumption level $d_{tk}^{\ast}(\cdot)$, optimal storage operation
$e^{\ast}_{t}(\cdot)$, and optimal stage reward $S^{\ast,\pi_{t}}_{t}(\cdot)$
are all monotonically increasing with $g_{t}$, whereas the prosumer payment
$P^{\ast,\pi_{t}}_{t}(\cdot)$ is monotonically decreasing with $g_{t}$.

For every $g_{t}$ at the interior of each scheduling zone, 1) the consumption
$d^{\ast}_{tk}$ monotonically decreases with $\pi^{+}_{t},\pi^{-}_{t}$ and
$\gamma$, 2) the storage operation is independent of $\pi^{+}_{t}$ and
$\pi^{-}_{t}$, but it monotonically increases with $\gamma$ in the net-zero
zone, 3) the payment $P^{\ast,\pi_{t}}_{t}(\cdot)$ monotonically decreases
with $\pi^{-}_{t}$, and independent of $\gamma$, and lastly 4) the optimal
surplus $S^{\ast,\pi_{t}}_{t}(\cdot)$ monotonically decreases with
$\pi^{+}_{t}$ and $\gamma$ and monotonically increases with $\pi^{-}_{t}$ and
$\gamma$.

The fixed charges $\pi^{0}$ do not affect $d_{tk}^{\ast}(\cdot)$ and
$e^{\ast}_{t}(\cdot)$, but $S^{\ast,\pi_{t}}_{t}(\cdot)$ and
$P^{\ast,\pi_{t}}_{t}(\cdot)$ monotonically decreases and monotonically
increases with $\pi^{0}$, respectively.

### Proof of Theorem 1

We prove Theorem 1 in three stages: 1) comparative statics of $d_{tk}^{\ast}$
and $e^{\ast}_{t}$, 2) comparative statics of $P^{\ast,\pi_{t}}_{t}$, and 3)
comparative statics of $S^{\ast,\pi_{t}}_{t}$.
1) Comparative statics of $d_{tk}^{\ast}$ and $e^{\ast}_{t}$: Under A1-A2, and
for every $t=0,\ldots,T-1$, and every device $k$, the storage operation
$e^{\ast}_{t}$ and consumption $d_{tk}^{\ast}$ expressions under the optimal
co-optimization policy are given by [4]

$\displaystyle e^{\ast}_{t}$ $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}-\underline{e},&g_{t}\leq\sigma^{+}_{t}\\\
g_{t}-\sigma_{t}^{+o},&g_{t}\in[\sigma^{+}_{t},\sigma^{+o}_{t}]\\\
0,&g_{t}\in[\sigma^{+o}_{t},\sigma^{-o}_{t}]\\\
g_{t}-\sigma_{t}^{-o},&g_{t}\in[\sigma^{-o}_{t},\sigma^{-}_{t}]\\\
\overline{e},&g_{t}\geq\sigma^{-}_{t},\\\ \end{array}\right.$ (35)
$\displaystyle d_{tk}^{\ast}$ $\displaystyle=$
$\displaystyle\left\\{\begin{array}[]{ll}f_{tk}(\pi^{+}_{t}),&g_{t}\leq\Delta^{+}_{t}\\\
f_{tk}(f^{-1}_{t}(g_{t}+\underline{e})),&g_{t}\in(\Delta_{t}^{+},\sigma_{t}^{+}]\\\
f_{tk}(f^{-1}_{t}(\gamma/\rho)),&g_{t}\in(\sigma^{+}_{t},\sigma^{+o}_{t})\\\
f_{tk}(f^{-1}_{t}(g_{t})),&g_{t}\in[\sigma^{+o}_{t},\sigma^{-o}_{t}]\\\
f_{tk}(f^{-1}_{t}(\gamma\tau)),&g_{t}\in(\sigma^{-o}_{t},\sigma_{t}^{-})\\\
f_{tk}(f^{-1}_{t}(g_{t}-\overline{e})),&g_{t}\in[\sigma^{-}_{t},\Delta_{t}^{-})\\\
f_{tk}(\pi^{-}_{t}),&g_{t}\geq\Delta_{t}^{-},\\\ \end{array}\right.$ (43)

respectively. Theorem 1 in [4] showed that the storage operation and
consumption are both monotonically increasing functions of $g_{t}$.
Additionally, the monotonicity of $L_{tk}$ indicates that the optimal
consumption $d_{tk}^{\ast}$ decreases with $\pi^{+}_{t},\gamma$ and
$\pi^{-}_{t}$. From the expression of $e^{\ast}_{t}$ above, the storage
operation is independent of $\pi^{+}_{t}$ and $\pi^{-}_{t}$, but monotonically
increases with $\gamma$ in the net-zero zone.

2) Comparative statics of $P^{\ast,\pi_{t}}_{t}$: Under A1-A2, and for every
$t=0,\ldots,T-1$, the net consumption under the optimal co-optimization policy
$z^{\ast}_{t}=d^{\ast}_{t}-g_{t}+e^{\ast}_{t}$ is a monotonically decreasing
functions of $g_{t}$, as shown in Theorem 1 in [4]. Using the prosumer payment
definition in (4) and the optimal net consumption, the payment under the
optimal co-optimization policy $P^{\ast,\pi_{t}}_{t}$ becomes:

$P^{\ast,\pi_{t}}_{t}=\pi^{0}_{t}+\left\\{\begin{array}[]{ll}\pi^{+}(f_{t}(\pi^{+}_{t})-g_{t}-\underline{e}),&g_{t}<\Delta^{+}_{t}\\\
0,&g_{t}\in[\Delta^{+}_{t},\Delta^{-}_{t}]\\\
\pi^{-}(f_{t}(\pi^{-}_{t})-g_{t}+\overline{e}),&g_{t}>\Delta^{-}_{t},\end{array}\right.$

which is monotonically decreasing with $g_{t}$ and monotonically increasing
with $\pi^{0}_{t}$. The payment is monotonically decreasing with
$\pi^{-}_{t}$, as $\frac{\partial f_{t}(\pi^{-}_{t})}{\partial\pi^{-}_{t}}\leq
0$. The payment is independent of $\gamma$, as $\frac{\partial
P^{\ast,\pi_{t}}_{t}}{\partial\gamma}=0$.

3) Comparative statics of $S^{\ast,\pi_{t}}_{t}$: Under A1-A2, and for every
$t=0,\ldots,T-1$, and every device $k$, the monotonicity of
$S^{\ast,\pi_{t}}_{t}$ is shown by recalling that, because $U_{tk}$ is
monotonically increasing with $d^{\ast}_{tk}$, which is monotonically
increasing with $g_{t}$, it holds that $U_{tk}(g_{t})$ is a monotonically
increasing function of $g_{t}$. Given that $U_{tk}$ and $P^{\ast,\pi_{t}}_{t}$
are monotonically increasing and monotonically decreasing with $g_{t}$,
respectively, the prosumer surplus is monotonically increasing with $g_{t}$.

Increasing $\pi^{+}$ monotonically decreases $S^{\ast,\pi_{t}}_{t}$, because
in the net consumption zone ($g_{t}<\Delta^{+}_{t}$), we have

$S^{\ast,\pi_{t}}_{t}=\sum_{k=1}^{K}U_{tk}(f_{tk}(\pi^{+}_{t}))-\pi^{+}(\sum_{k=1}^{K}f_{tk}(\pi^{+}_{t})-g_{t}-\underline{e})-\pi^{0}_{t},$

and deriving the above expression with respect to $\pi^{+}_{t}$, gives
$-(\sum_{k=1}^{K}f_{tk}(\pi^{+}_{t})-g_{t}-\underline{e})<0$.

Increasing $\pi^{-}$ monotonically increases $S^{\ast,\pi_{t}}_{t}$, because
in the net production zone ($g_{t}>\Delta^{-}_{t}$), we have

$S^{\ast,\pi_{t}}_{t}=\sum_{k=1}^{K}U_{tk}(f_{tk}(\pi^{-}_{t}))-\pi^{-}(\sum_{k=1}^{K}f_{tk}(\pi^{-}_{t})-g_{t}+\overline{e})-\pi^{0}_{t},$

and deriving the above expression with respect to $\pi^{-}_{t}$, gives
$-(\sum_{k=1}^{K}f_{tk}(\pi^{-}_{t})-g_{t}-\overline{e})>0$.

Increasing $\gamma$ monotonically decreases $S^{\ast,\pi_{t}}_{t}$, because in
the net zero zone ($g_{t}\in[\Delta^{+}_{t},\Delta^{-}_{t}]$), the surplus is
simply $S^{\ast,\pi_{t}}_{t}=\sum_{k=1}^{K}U_{tk}(d^{\ast}_{tk})$, and given
that $d^{\ast}_{tk}$ monotonically decreases with $\gamma$, it holds that the
surplus is also a monotonically decreasing function of $\gamma$.

Finally, the monotonicity of $\pi^{0}_{t}$ is immediate from the definitions.
∎