# Guaranteeing Service in Connected Microgrids: Storage Planning and Optimal
Power Sharing Policy

Arnab Dey1, Vivek Khatana1, Ankur Mani2 and Murti V. Salapaka1 This work is
supported by Advanced Research Projects Agency-Energy OPEN through the project
titled "Rapidly Viable Sustained Grid" via grant no. DE-AR0001016.1 Arnab Dey
<EMAIL_ADDRESS>Vivek Khatana<EMAIL_ADDRESS>Murti V.
<EMAIL_ADDRESS>are with Department of Electrical and Computer
Engineering, University of Minnesota, Twin Cities, USA, and 2 Ankur Mani
<EMAIL_ADDRESS>is with Department of Department of Industrial and Systems
Engineering, University of Minnesota, Twin Cities, USA,

###### Abstract

The integration of renewable energy sources (RES) into power distribution
grids poses challenges to system reliability due to the inherent uncertainty
in their power production. To address this issue, battery energy sources
(BESs) are being increasingly used as a promising solution to counter the
uncertainty associated with RES power production. During the overall system
planning stage, the optimal capacity of the BES has to be decided. In the
operational phase, policies on when to charge the BESs and when to use them to
support loads must be determined so that the BES remains within its operating
range, avoiding depletion of charge on one hand and remaining within
acceptable margins of maximum charge on the other. In this paper, a stochastic
control framework is used to determine battery capacity, for microgrids, which
ensures that during the operational phase, BESs’ operating range is respected
with pre-specified high probability. We provide an explicit analytical
expression of the required BESs energy capacity for a single microgrid with
RES as the main power source. Leveraging insights from the single microgrid
case, the article focuses on the design and planning of BESs for the two-
microgrid scenario. In this setting, microgrids are allowed to share power
while respecting the capacity constraints imposed by the power lines. We
characterize the optimal power transfer policy between the microgrids and the
optimal BES capacity for multiple microgrids. This provides the BES savings
arising from connecting the microgrids.

Index Terms: Battery sizing, Brownian motion, Stochastic optimization,
Renewable, Uncertainty

##  I Introduction

In recent years, there has been a tremendous growth in the penetration level
of renewable energy sources (RES) in the traditional power distribution
networks to address environmental issues, such as carbon emission, and techno-
economic issues, such as conventional energy resource depletion, and
increasing consumer demand. It is projected that RES will contribute $90$% of
the total energy production by 2050, and approximately 1 trillion USD per year
will be invested in the development of renewable energy sectors [1]. However,
despite the environmental benefits renewable penetration poses a major
challenge to the reliable operation of the distribution system as RES are
inherently uncertain. Battery energy sources (BESs), provide an attractive
option to counter RES uncertainty with the ability to store excess energy when
supply exceeds demand and to provide energy when demand exceeds RES-based
energy. A key challenge is to determine the capacity of the BES and the
associated strategy of when to charge the battery and when to use it to
service loads. The problem is difficult because of the stochasticity of RES.
Moreover, in the multi-microgrid scenario the facility to share power has the
potential to provide benefits of spatial diversity for minimizing needed BES
capacity. However, the related problem for determining capacity and
charging/discharging policy incorporating the power-sharing ability while
respecting constraints of power lines and ensuring BES charge state within
specified limits is formidable [2]. Note that, while BES capacity governs the
resource installation cost of the system, the flow capacity of the lines
determines the line installation cost. Thus, a proper characterization of both
is extremely important to efficiently determine the total installation cost of
the system. In this article, we describe a methodology to determine the BES
capacity and power-sharing policy respecting the flow capacity. Summarizing,
two tasks posed by RES penetration into the grid are addressed in this
article:

(i) How much BES energy capacity each microgrid (MG) should have to ensure the
BESs are operated within the specified operating range at all times?

(ii) What should be the power-sharing policy amongst the microgrids?

In prior state of the art, the problem of BESs size determination is
approached with two primary objectives: (1) operational cost minimization to
address techno-economic goals, (2) enhancement of system reliability. Most of
the existing works focus on BESs capacity determination with the aim of
optimizing installation and operation costs. In this context, several
strategies are proposed to find the optimal battery size for both grid-
connected and grid-isolated systems [3, 4, 5]. In [3, 4, 6], battery sizing
strategies, based on cost optimization in probabilistic unit commitment
settings, are proposed. A stochastic programming approach, to decide the
optimal size of battery storage by minimizing the cost of purchasing energy
from the grid, is proposed in [7]. In [5], a chance-constrained approach to
minimize the system operation cost, considering a probabilistic constraint on
the amount of underproduction, is synthesized. However, overproduction
scenarios are not addressed. Furthermore, various optimization techniques [8,
9, 10] are proposed for the optimal allocation of BESs to enable cost-
efficient operation of renewable-powered microgrids. However, in critical
application scenarios, such as hospitals, reliability of the system is more
important compared to cost optimization. For improving system reliability,
various techniques in the state-of-the-art include chance-constrained
optimization to minimize power curtailment [11], battery charge-discharge
control [12], data-driven approaches [13], load-shaping techniques [14].
Further, optimization methods to find optimal energy storage size for load
loss minimization are devised [15]. However, such methodologies consider
either generation or load curtailment probability as the reliability index and
thus are difficult to deploy in critical applications where minimizing
curtailment of both generation and load is of importance. In [16], a numerical
analysis with joint optimization of generation and load curtailment is
proposed. However, no guarantees of demand fulfillment are provided. Despite
the importance, works on determining optimal BESs capacity to minimize both
generation and load curtailment without degradation of the BESs, are limited
in the existing literature. On the other hand, various data-driven power-
sharing strategies to improve multi-microgrid operation are discussed in [17,
18, 19]. However, to the best of the author’s knowledge, existing works on
analytically tractable power-sharing policies, in the case of multiple
microgrids, and an analysis of how the transmission line capacity affects the
choice of battery capacity is scarce.

To this end, we propose a chance-constrained BESs sizing methodology and
power-sharing policy, for multi-microgrid systems, to improve system
reliability by minimizing both generation and load curtailment. Our primary
contributions are summarized below:

1\. We propose an analytical method to determine the optimal BES energy
capacity to minimize both load and generation curtailment for a finite time
horizon. Our proposed method provides probabilistic guarantees on the amount
of curtailment and ensures the available energy in the BESs remains within the
operating range throughout the time horizon with high probability.

2\. We extend our BES energy capacity design methodology to a system having
two MGs that can share power with each other via a connecting power line.
Here, we provide a power transfer policy that achieves the minimum BES energy
capacity, required to be installed in each of the MGs, while ensuring the BESs
are operated within specified energy limits at all times. We also quantify the
BES investment savings arsing from connected operation of two MGs.

The rest of the paper is organized as follows: The system description, problem
formulation, and the solution methodology for the single MG system are
provided in Section II, III, and Section IV respectively. Section V provides
the problem formulation and solution strategy for a connected two-microgrid
system. Experimental results are presented in Section VI and Section VII
presents the concluding remarks.

##  II System Description

We consider an MG having local RES, loads, and $N$ number of BESs. The RES and
the BESs are utilized to supply the loads. The system architecture is
illustrated in Fig. 1 which shows a microgrid network receiving power from RES
and BESs while servicing loads. We denote the power output of the renewables,
load demand, and the total power output of the BESs by $P_{g}(t),D_{c}(t)$,
and $b(t)$ respectively. We consider that each BES is identical and has a
maximum capacity of $B_{max}\in\mathbb{R}^{+}$ kWh.

Figure 1: Microgrid architecture

The objective of the microgrid is to determine the number of BESs, $N$, to
sustain the system for a given finite time horizon with probabilistic
guarantees on the amount of generation and load curtailment by ensuring that
the energy available in the BESs remain within acceptable limits. Here we
focus on determining optimal BESs capacity which satisfies the following: (i)
if the RES produces more power than what is demanded by the load, then the
battery can be charged with the surplus generation and (ii) when the RES
production is less than the required load, the battery has sufficient storage
to supply the deficit power. The above conditions are satisfied if the maximum
capacity of BESs is not reached and the BESs never get depleted under the
uncertainty presented by the RES. In the next section, we make the problem
description precise.

##  III Problem Formulation

We consider that the load demand (with power $D_{c}(t)$ demanded at time $t$)
in the system is required to be supplied continuously for a time horizon
denoted by $T_{f}$. Note that, the total energy provided by $N$ number of
BESs, till time $t\geq 0$ is given by
$\int_{0}^{t}b(s)\text{d}s=\int_{0}^{t}(D_{c}(s)-P_{g}(s))\text{d}s$. Further,
let the net energy available from the BESs, at any time $t\geq 0$, be denoted
by $X(t)$. Then, we have,

$\displaystyle\textstyle
X(t)=X(0)-\int_{0}^{t}b(s)\text{d}s=X(0)+\int_{0}^{t}(P_{g}(s)-D_{c}(s))\text{d}s,$

where $X(0)$ denotes the initially available energy in the BESs. Further, let
$B_{0}\in[0,B_{max}]$ kWh at time $t=0$ be the initial charge held by each of
the $N$ BESs, and let $\alpha:=B_{0}/B_{max}$ denote the initial charge to the
maximum charge ratio. Thus, the net initial energy available in the BESs is
$X(0)=NB_{0}=\alpha NB_{max}$. The load demand and the RES power generation
are both uncertain. To characterize the uncertainty we assume that the net
surplus energy, $\int_{0}^{t}(P_{g}(s)-D_{c}(s))\text{d}s$, follows a Brownian
motion characterized by $\sigma W(t)$ where $\sigma\neq 0$ models the
volatility, and $W(t)$ is a Weiner process defined on a probability space
$(\Omega,\mathcal{F},\mathbb{P})$. Thus, $X(t)$ can be written as:

$\displaystyle X(t)=\sigma W(t)+\alpha NB_{max}.$ (1)

Note that, to avoid curtailment of RESs power, the Distribution System
Operator (DSO) has to ensure that all the batteries have charge below the
designated maximum $B_{\max}$ for all times $t\in[0,T_{f}]$. Similarly, to
reduce load curtailment, BESs should have positive charge for all times
$t\in[0,T_{f}]$. Thus to reduce both generation and load curtailment, the DSO
is responsible for sustaining the batteries throughout the time interval
$[0,T_{f}]$ without discharging the batteries completely or charging them to
the maximum capacity. Let $X^{sup}_{t}:=\sup_{s\in[0,t]}X(s)$ and
$X^{inf}_{t}:=\inf_{s\in[0,t]}X(s)$ denote the maximum and minimum energy
available in the BESs at any time $s\in[0,t]$ respectively. Therefore, the DSO
needs to ensure the following:

$\displaystyle\mathbb{P}[X^{sup}_{T_{f}}<NB_{max},X^{inf}_{T_{f}}>0]\geq
1-\delta,$ (2)

where $\delta>0$ is a small pre-specified tolerance in the probability of
violating the conditions on the charge of the BESs. In the above setup, the
decision variables include the initial charge $B_{0}$, and the number $N$ of
batteries to be used. The problem translates to: given
$\sigma,B_{max},\delta$, decide the minimum number, $N$, of batteries
required, and the initial charge ratio $\alpha$, such that (2) and (1) are
satisfied. Thus the following chance-constrained problem needs to be solved:

$\displaystyle\min_{\alpha,N}$ $\displaystyle\textstyle\hskip 7.22743ptN$ (3)
$\displaystyle\text{subject to}\ \textstyle N\geq 0,$ $\displaystyle\textstyle
0\leq\alpha\leq 1,$ $\displaystyle\textstyle X(t)=\sigma W(t)+\alpha
NB_{max},$
$\displaystyle\textstyle\mathbb{P}[X^{sup}_{T_{f}}<NB_{max},X^{inf}_{T_{f}}>0]\geq
1-\delta.$ (4)

In the planning stage, the DSO solves (3) to determine the required capacity
of BESs. In the next section, we describe the solution methodology for the
DSO.

##  IV Solution Methodology

In this section, we describe our proposed methodology to solve the problem of
the DSO as described in the previous section. We emphasize that obtaining an
analytical solution to (3) reamins intractable. Hence, we first analyze the
chance-constraint (4) to derive a tractable approximation of (3). Further, we
derive the corresponding value of $\alpha$ that leads to an explicit solution
to the approximated problem.

###  IV-A Analysis of the chance constraint

Note that,
$\mathbb{P}[X^{sup}_{T_{f}}\mspace{-4.0mu}<\mspace{-4.0mu}NB_{max},X^{inf}_{T_{f}}>0]=1-\mathbb{P}[\\{X^{sup}_{T_{f}}\geq
NB_{max}\\}\cup\\{X^{inf}_{T_{f}}\leq 0\\}]$. Therefore, the constraint (4)
can be equivalently written as $\mathbb{P}[\\{X^{sup}_{T_{f}}\geq
NB_{max}\\}\cup\\{X^{inf}_{T_{f}}\leq 0\\}]\leq\delta$. Further, for
$a\in\mathbb{R}$, let

$\displaystyle T(a):=\inf(t\geq 0,X(t)=a)$

denote the first time the battery energy level reaches $a$ kWh. Then we have,
$X_{T_{f}}^{sup}\geq NB_{max}$ if and only if $T(NB_{max})\leq T_{f}$, and
$X^{inf}_{T_{f}}\leq 0$ if and only if $T(0)\leq T_{f}$ [20]. Thus, the
constraint (4) can be written as $\mathbb{P}[\\{T(NB_{max})\leq
T_{f}\\}\cup\\{T(0)\leq T_{f}\\}]\leq\delta$. Consider the following problem:

$\displaystyle\min_{\alpha,N}$ $\displaystyle\textstyle\hskip 7.22743ptN$ (5)
$\displaystyle\text{subject to}\ \textstyle N\geq 0,\ \textstyle
0\leq\alpha\leq 1,$ $\displaystyle\textstyle X(t)=\sigma W(t)+\alpha
NB_{max},$ $\displaystyle\textstyle\mathbb{P}[T(NB_{max})\leq
T_{f}]\textstyle+\mathbb{P}[T(0)\leq T_{f}]\leq\delta.$ (6)

Note that a feasible solution to (5) is also a feasible solution to (3), as
$\mathbb{P}[\\{T(NB_{max})\leq T_{f}\\}\cup\\{T(0)\leq
T_{f}\\}]\leq\mathbb{P}[T(NB_{max})\leq T_{f}]+\mathbb{P}[T(0)\leq T_{f}]$.
The solution to (5) provides an upper bound of the solution to (3). In the
subsequent development, we derive a tractable upper bound to the chance
constraint (6), which we further utilize to find a theoretical solution to
(5).

###  IV-B Battery Capacity Determination

In this section, we derive a tractable non-linear approximation to the chance-
constraint (6) to obtain an analytical solution to (5). Here, first we provide
an upper bound to the chance-constraint (6) as presented in the following
theorem:

######  Lemma 1.

Let

$\displaystyle\textstyle
f(N,\alpha):=e^{-\frac{N^{2}B_{max}^{2}(1-\alpha)^{2}}{2\sigma^{2}T_{f}}}+e^{-\frac{N^{2}B_{max}^{2}\alpha^{2}}{2\sigma^{2}T_{f}}},$
(7)

where $\alpha\in[0,1]$ and $N\geq 0$. Then, we have,

$\displaystyle\textstyle\mathbb{P}[T(NB_{max})\leq
T_{f}]\textstyle+\mathbb{P}[T(0)\leq T_{f}]\leq f(N,\alpha),$ (8)

for all $N$ and $\alpha$.

###### Proof.

Please see Appendix A. ∎

Further note, for any $N\geq 0$, we have $f(N,\alpha)>1$ if
$\alpha\mspace{-4.0mu}=\mspace{-4.0mu}1$ or $0$. However, a feasible solution
to (5) requires $f(N,\alpha)\leq 1$ as $\delta\in(0,1)$. Now, consider the
following problem:

$\displaystyle\tilde{N}:=\min_{\alpha,N}$ $\displaystyle\textstyle\hskip
7.22743ptN$ (9) $\displaystyle\text{subject to}\ \textstyle N\geq 0,\
\textstyle\alpha\in(0,1),$ $\displaystyle\textstyle f(N,\alpha)\leq\delta.$
(10)

From Lemma (1), we derive that any feasible solution to (9) is also a feasible
solution to (5). Thus the solution to (9) provides an upper bound of the
solution to (5). In the subsequent development, we show how an explicit
solution to $\tilde{N}$ is obtained. Let $N(\alpha)$ denote the solution to
(9) for a given $\alpha\in(0,1)$, that is,

$\displaystyle N(\alpha):=\min_{N}$ $\displaystyle\textstyle\hskip 7.22743ptN$
(11) $\displaystyle\text{subject to}\ \textstyle N\geq 0,\ \textstyle
f(N,\alpha)\leq\delta.$

Then we have,

$\displaystyle\tilde{N}=\min_{\alpha}$ $\displaystyle\textstyle\hskip
7.22743ptN(\alpha)$ (12) $\displaystyle\text{subject to}\
\textstyle\alpha\in(0,1).$

We present the following theorem to provide an explicit solution to (9) by
considering the sub-problems (11) and (12).

######  Theorem 1.

Let

$\displaystyle\textstyle
N_{o}:=\frac{\sqrt{8\sigma^{2}T_{f}\ln(2/\delta)}}{B_{max}}.$ (13)

Then, for $\alpha=\frac{1}{2}$, the optimal value of (11) is given by
$N(\frac{1}{2})=N_{o}$. Further, for all
$\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$, we have, $N(\frac{1}{2})\leq
N(\alpha)$. Thus optimal value of (12), or equivalently the optimal value of
the problem (9), is $\tilde{N}=N(\frac{1}{2})=N_{o}$.

###### Proof.

Please see Appendix B. ∎

Therefore, given $\sigma,B_{max},\delta$ and $T_{f}$, an optimal strategy is
to initially charge the BESs to half of their maximum capacities, $B_{max}$.
Further, the DSO can derive the optimal number of required BESs using (13)
such that the batteries can sustain the demand throughout the time interval
$[0,T_{f}]$ without getting discharged completely or charged to the maximum
capacity with a probability of $1-\delta$. In the next section, we discuss
optimality gap and rate optimality of our proposed solution to the problem (9)
compared to the problem (5).

###  IV-C Optimality gap

Note that, the probabilities $\mathbb{P}[T(NB_{max})\leq T_{f}]$ and
$\mathbb{P}[T(0)\leq T_{f}]$ can be explicitly derived as follows ([20]):

$\displaystyle\textstyle\mathbb{P}[T(NB_{max})\textstyle\leq
T_{f}]\textstyle=\frac{2}{\sqrt{2\pi}}\int_{\frac{NB_{max}(1-\alpha)}{\sigma\sqrt{T_{f}}}}^{\infty}e^{-\frac{1}{2}x^{2}}\text{d}x,$
$\displaystyle\textstyle\mathbb{P}[T(0)\textstyle\leq
T_{f}]\textstyle=\frac{2}{\sqrt{2\pi}}\int_{\frac{\alpha
NB_{max}}{\sigma\sqrt{T_{f}}}}^{\infty}e^{-\frac{1}{2}x^{2}}\text{d}x.$ (14)

Hence, for any given $\alpha$, $\mathbb{P}[T(NB_{max})\textstyle\leq
T_{f}]+\mathbb{P}[T(0)\textstyle\leq T_{f}]$ is monotonic decreasing in $N$.
Let $\hat{N}$ denote the optimal value of the problem (5). Here, from (IV-C),
we have the following: Given $\delta,B_{max}$ and $T_{f}$, there exists a
constant $\hat{c}\geq 0$, such that if $\hat{N}=\hat{c}\sigma\sqrt{T_{f}}$,
$\mathbb{P}[T(\hat{N}B_{max})\textstyle\leq
T_{f}]+\mathbb{P}[T(0)\textstyle\leq T_{f}]\leq\delta$. Note that, from
Theorem 1, we have $\tilde{N}=\tilde{c}\sigma\sqrt{T_{f}}$, where
$\tilde{c}=\frac{\sqrt{8\ln(2/\delta)}}{B_{max}}$. Hence, our proposed
solution to the problem (9) is optimal up to a constant compared to the
solution to (5), that is $\lim_{T_{f}\to\infty}\frac{\hat{N}}{\tilde{N}}=c$,
where $c\geq 0$ is a constant.

In the next section, we extend our analysis to a system having two microgrids
connected to each other and derive the battery capacity for the entire system.
Further, we show how the flow capacity of the power line connecting the MGs
affects the required battery capacity and provide a design guideline for
determining the same.

##  V Battery Sizing and Power Sharing Policy for Connected multi-microgrids

###  V-A Problem formulation

In this section, we extend our battery capacity determination methodology,
described in Section IV-B, to an interconnected two-microgrid system, as shown
in Fig. 2. Each MG has its local RES generation and loads and further, they
can share power with each other.

Figure 2: Connected two microgrid architecture

Let $P_{12}(t)$ denote the amount of power flow from MG-$1$ to MG-$2$ at time
$t\in[0,T_{f}]$. Further, let $P_{gi}(t),D_{ci}(t),b_{i}(t)$ denote the RES
power output, load, and power supplied by the BESs of MG-$i\in\\{1,2\\}$
respectively. Hence, in each MG, the total energy supplied by $N$ number of
BESs, till time $t\geq 0$, is given by:

$\displaystyle\textstyle\int_{0}^{t}b_{1}(s)\text{d}s$
$\displaystyle=\textstyle\int_{0}^{t}(D_{c1}(s)-P_{g1}(s))\text{d}s+\int_{0}^{t}P_{12}(s)\text{d}s,$
$\displaystyle\textstyle\int_{0}^{t}b_{2}(s)\text{d}s$
$\displaystyle=\textstyle\int_{0}^{t}(D_{c2}(s)-P_{g2}(s))\text{d}s-\int_{0}^{t}P_{12}(s)\text{d}s.$

Denoting $X_{i}(t),i\in\\{1,2\\}$ as the net energy available from the BESs of
MG-$i,i\in\\{1,2\\}$ at time $t\geq 0$, we have,
$X_{i}(t)=X_{i}(0)-\int_{0}^{t}b_{i}(s)\text{d}s$, where $X_{i}(0)$ denotes
the intially available energy in the BESs. Similar to the case of single MG,
let $N$ denote the number of BESs to be installed at each MG-$i,i=1,2$, and
let $B_{0}\in[0,B_{max}]$ kWh be the initial charge held by each of the $N$
BESs at time $t=0$. Further, let $\alpha:=B_{0}/B_{max}$ denote the initial
charge to the maximum charge ratio. Then, we have, $X_{i}(0)=\alpha
NB_{max},i\in\\{1,2\\}$. Similar to the case of a single microgrid, here, we
assume that the net surplus energy,
$\int_{0}^{t}(P_{gi}(s)-D_{ci}(s))\text{d}s$, follows a Brownian motion
characterized by $\sigma W_{i}(t),t\in[0,T_{f}]$, where $\sigma\neq 0$ models
the volatility, and $W_{i}(t)$ is a Weiner process. Further assume $W_{i}(t)$
is independent of $W_{j}(t),i\neq j,i,j\in\\{1,2\\}$. Here, we have the
following:

$\displaystyle\textstyle X_{1}(t)$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle
X_{1}(0)\mspace{-4.0mu}-\mspace{-4.0mu}\int_{0}^{t}b_{1}(s)\text{d}s$
$\displaystyle\textstyle=\mspace{-4.0mu}\alpha
NB_{max}\mspace{-4.0mu}+\mspace{-4.0mu}\sigma
W_{1}(t)\mspace{-4.0mu}-\mspace{-4.0mu}\int_{0}^{t}P_{12}(s)\text{d}s,\text{
and,}$ $\displaystyle\textstyle X_{2}(t)$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle
X_{2}(0)\mspace{-4.0mu}-\mspace{-4.0mu}\int_{0}^{t}b_{2}(s)\text{d}s$
$\displaystyle\textstyle=\mspace{-4.0mu}\alpha
NB_{max}\mspace{-4.0mu}+\mspace{-4.0mu}\sigma
W_{2}(t)\mspace{-4.0mu}+\mspace{-4.0mu}\int_{0}^{t}P_{12}(s)\text{d}s.$ (15)

Our problem is divided into two stages; in the planning stage, the DSO
determines the number of BESs (or equivalently the BESs capacities), $N$,
along with their initial charge ratio $\alpha$. Once the batteries are
deployed, the DSO controls the power transfer amount,
$P_{12}(t),t\mspace{-4.0mu}\in\mspace{-4.0mu}[0,T_{f}]$, between the MGs in
the operational stage. Let the maximum power flow limit of the line,
connecting MG-1 and MG-2, is given by $\overline{P}_{12}$. Here, we define the
power transfer policy, to be determined by the DSO, by
$\pi\mspace{-4.0mu}:\mspace{-4.0mu}[0,T_{f}]\mspace{-4.0mu}\to\mspace{-4.0mu}\mathbb{R}$
and let
$\Pi(\overline{P}_{12})\mspace{-4.0mu}:=\mspace{-4.0mu}\\{\pi:\mspace{-4.0mu}[0,T_{f}]\mspace{-4.0mu}\to\mspace{-4.0mu}\mathbb{R}|\pi(t)\mspace{-4.0mu}\in\mspace{-4.0mu}[-\overline{P}_{12},\overline{P}_{12}]\mbox{
for all
}0\mspace{-4.0mu}\leq\mspace{-4.0mu}t\mspace{-4.0mu}\leq\mspace{-4.0mu}T_{f}\\}$
denote the set of permissible policies adhering to the given power line
capacity. In the subsequent analysis, we suppress the explicit dependency of
$\pi(t)$ on $t$ for the brevity of notation.

Let
$X_{i,T_{f}}^{sup}\mspace{-5.0mu}:=\mspace{-5.0mu}\sup_{t\in[0,T_{f}]}X_{i}(t)$
and
$X_{i,T_{f}}^{inf}\mspace{-5.0mu}:=\mspace{-5.0mu}\inf_{t\in[0,T_{f}]}X_{i}(t),i\mspace{-4.0mu}=\mspace{-4.0mu}1,2$
denote the maximum and minimum energy available, respectively, at any time
$t\mspace{-4.0mu}\in\mspace{-4.0mu}[0,T_{f}]$ in the BESs of MG-$i$. Note
that, the available energy in the BESs at any time depends on the number $N$,
initial charge ratio $\alpha$, and the power transfer policy $\pi$. Hence, let
the probability that the BESs, given an initial charge of
$X_{i}(0)\mspace{-4.0mu}=\mspace{-4.0mu}\alpha NB_{max}$, do not get fully
charged or emptied any time during the time horizon $[0,T_{f}]$ be denoted by

$\displaystyle\textstyle P(N,\alpha,\pi)$
$\displaystyle:=\textstyle\mathbb{P}[X_{1,T_{f}}^{sup}\mspace{-4.0mu}<\mspace{-4.0mu}NB_{max},\textstyle
X_{1,T_{f}}^{inf}\mspace{-4.0mu}>\mspace{-4.0mu}0,$
$\displaystyle\textstyle\textstyle
X_{2,T_{f}}^{sup}\mspace{-4.0mu}<\mspace{-4.0mu}NB_{max},X_{2,T_{f}}^{inf}\mspace{-4.0mu}>\mspace{-4.0mu}0].$

Here, the objective of the DSO is to determine a suitable control strategy
$\pi$ and initial charge ratio $\alpha$, that minimizes the number of BESs,
$N$, and ensures with a given high probability of $1-\delta$, that the BESs
are not fully charged or empty during the time horizon $[0,T_{f}]$. Therefore,
DSO solves the following chance-constrained problem: Given
$B_{max},\overline{P}_{12},\delta,T_{f}$,

$\displaystyle\min_{\alpha,N,\pi}$ $\displaystyle\textstyle\hskip 7.22743ptN$
(16) $\displaystyle\text{subject to}\ (\ref{eq:brownian_soc_two_mg}),\
\textstyle N\geq 0,\ \textstyle 0\leq\alpha\leq 1,$
$\displaystyle\textstyle\pi\in\Pi(\overline{P}_{12}),\ \textstyle
P(N,\alpha,\pi)\geq\mspace{-4.0mu}1\mspace{-4.0mu}-\mspace{-4.0mu}\delta.$

In the planning stage, the DSO solves (16) to decide the number of BESs to be
installed in both the MGs, their initial charges, and the power transfer
policy. The power transfer policy is followed throughout the time horizon
$[0,T_{f}]$ in the operational stage, once the BESs are deployed. In Section
V-B, we present an analytical solution to (16). Further note that, the power
line capacity $\overline{P}_{12}$ affects the solution to (16); In the
following sections, we characterize such dependency of the optimal solution of
(16), characterizing the number of batteries required, on the power line
capacity.

###  V-B Solution methodology

Given $B_{max},\overline{P}_{12},\delta,T_{f}$, let the solution set of (16)
be denoted by,

$\displaystyle\textstyle S_{1}$
$\displaystyle:=\textstyle\operatorname*{argmin}\limits_{N,\alpha,\pi}\\{N:(N,\alpha,\pi)\in
F_{1}\\},\text{ where,}$ $\displaystyle\textstyle F_{1}$
$\displaystyle:=\textstyle\\{(N,\alpha,\pi):\eqref{eq:brownian_soc_two_mg}\text{
is satisfied},0\leq\alpha\leq 1,N\geq 0,$
$\displaystyle\pi\in\Pi(\overline{P}_{12}),\textstyle P(N,\alpha,\pi)\geq
1-\delta\\}.$

Suppose $(N^{*},\alpha^{*},\pi^{*})$ solves the problem (16), that is
$(N^{*},\alpha^{*},\pi^{*})\mspace{-4.0mu}\in\mspace{-4.0mu}S_{1}$ and
$N^{*}\mspace{-4.0mu}=\mspace{-4.0mu}\min_{N,\alpha,\pi}\\{N:(N,\alpha,\pi)\mspace{-4.0mu}\in\mspace{-4.0mu}F_{1}\\}$.
In the following theorem, we show how an equivalent tractable problem can be
constructed to obtain $N^{*}$, the optimal value of (16).

######  Theorem 2.

Consider the following problem:

$\displaystyle\nu$
$\displaystyle:=\textstyle\max\limits_{N,\pi}\\{P(N,\alpha^{*},\pi):(N,\pi)\in
F_{2}\\},\text{ where,}$ (17) $\displaystyle F_{2}$
$\displaystyle:=\textstyle\\{(N,\pi):\eqref{eq:brownian_soc_two_mg}\text{ with
}\alpha=\alpha^{*}\text{ is satisfied},$
$\displaystyle\textstyle\pi\in\Pi(\overline{P}_{12}),N\leq N^{*}\\},$

and let the solution set of (17) be denoted by,

$\displaystyle\textstyle
S_{2}:=\operatorname*{argmax}\limits_{N,\pi}\\{P(N,\alpha^{*},\pi):(N,\pi)\in
F_{2}\\}.$

Suppose $(N^{\prime},\pi^{\prime})\in S_{2}$, then
$N^{\prime}\mspace{-4.0mu}=\mspace{-4.0mu}N^{*}$ and
$(N^{\prime},\alpha^{*},\pi^{\prime})\in S_{1}$.

###### Proof.

Please see Appendix C. ∎

Remark: Thus if $(N^{\prime},\pi^{\prime})$ solves problem (17) then
$(N^{\prime},\alpha^{*},\pi^{\prime})$ also solves problem (16) and
$N^{\prime}$ will be equal to $N^{*}$ which is the optimal value of (16).

Note that, as $(N^{\prime},\alpha^{*},\pi^{\prime})$ obtained from the
solution to (17), solves the problem (16) as well, we first seek to derive
$\pi^{\prime}$ from (17). In this context, let $\tilde{\pi}(N,\alpha)$ denote
a power transfer policy that maximizes $P(N,\alpha,\pi)$ for a given $N>0$ and
$\alpha\in[0,1]$, that is,

$\displaystyle\tilde{\pi}(N,\alpha):=$
$\displaystyle\operatorname*{argmax}_{\pi}\ P(N,\alpha,\pi)$ (18)
$\displaystyle\text{subject to
}(\ref{eq:brownian_soc_two_mg}),\pi\in\Pi(\overline{P}_{12}).$

In the subsequent section, we derive the policy $\tilde{\pi}(N,\alpha)$ and
show that the policy does not depend on $N$ and $\alpha$ and rather depends on
the available energy in the batteries of the MGs.

####  V-B1 Power Transfer Policy Determination

Let the time horizon $[0,T_{f}]$ be partitioned into $K$ intervals
$0\mspace{-4.0mu}=\mspace{-4.0mu}t_{0}\mspace{-4.0mu}<\mspace{-4.0mu}t_{1}\mspace{-4.0mu}<\mspace{-4.0mu}\ldots\mspace{-4.0mu}<\mspace{-4.0mu}t_{K}\mspace{-4.0mu}=\mspace{-4.0mu}T_{f}$,
such that $t_{k}\mspace{-4.0mu}=\mspace{-4.0mu}k\Delta
t,k\mspace{-4.0mu}\in\mspace{-4.0mu}\\{0,1,\ldots,K\\}$ where $\Delta
t=T_{f}/K$. Let
$\overline{X}_{k}\mspace{-4.0mu}:=\mspace{-4.0mu}[X_{1}(t_{k})\
X_{2}(t_{k})]^{T}$ denote the vector of available energy in the batteries of
the MGs at time $t_{k}$. Note that, in discrete time, the power transfer
policy $\pi$ is a sequence of $K$ power transfer control laws, that is,
$\pi\mspace{-4.0mu}=\mspace{-4.0mu}[P_{12}(0),P_{12}(t_{1}),\ldots,P_{12}(t_{K-1})]$.
Further, let
$P^{\pi}_{0}(\overline{x}_{0})\mspace{-4.0mu}:=\mspace{-4.0mu}\mathbb{P}[\overline{X}_{k}\mspace{-4.0mu}\in\mspace{-4.0mu}B,\text{
for all
}k\mspace{-4.0mu}\in\mspace{-4.0mu}\\{1,\ldots,K\\}|\overline{X}_{0}=\overline{x}_{0}]$
denote the probability that $\overline{X}_{k}$ remains within some given
interval $B\mspace{-4.0mu}\in\mspace{-4.0mu}\mathbb{R}^{2}$ for all $k$,
starting with an initial value of $\overline{X}_{0}=\overline{x}_{0}$ and
following a given policy $\pi$ thereafter. We define
$B\mspace{-4.0mu}:=\mspace{-4.0mu}[0,NB_{max}]\mspace{-4.0mu}\times\mspace{-4.0mu}[0,NB_{max}]$.
We choose $\Delta t$ in such a way that $NB_{max}-\overline{P}_{12}\Delta
t>0$. Here, we define $N_{B}\mspace{-4.0mu}:=\mspace{-4.0mu}NB_{max}$, for
brevity of notation. Consider, the problem, given
$N_{B},\overline{x}_{0}\in[0,N_{B}],T_{f},\overline{P}_{12}$,

$\displaystyle\max_{\pi}$ $\displaystyle\textstyle\hskip
7.22743ptP^{\pi}_{0}(\overline{x}_{0})$ (19) $\displaystyle\text{subject to}\
(\ref{eq:brownian_soc_two_mg}),\pi\in\Pi(\overline{P}_{12}).$

Let $\pi^{\prime}$ solve the problem (19), that is
$\pi^{\prime}\mspace{-4.0mu}=\mspace{-4.0mu}[P^{\prime}_{12}(t_{0}),P^{\prime}_{12}(t_{1}),\ldots,P^{\prime}_{12}(t_{K-1})]\mspace{-4.0mu}=\mspace{-4.0mu}\operatorname*{argmax}_{\pi}\\{P^{\pi}_{0}(\overline{x}_{0}):\eqref{eq:brownian_soc_two_mg}\text{
is satisfied},\pi\mspace{-4.0mu}\in\mspace{-4.0mu}\Pi(\overline{P}_{12})\\}$.
We utilize the dynamic programming principle to derive $\pi^{\prime}$.

Consider the last time step $t_{K-1}=T_{f}-\Delta t$, and suppose
$\overline{X}_{K-1}\mspace{-4.0mu}=\mspace{-4.0mu}\overline{x}\mspace{-4.0mu}=\mspace{-4.0mu}[x_{1},x_{2}]^{T}$.
From (V-A) and by the definition of Wiener process, for the last time step, we
have,
$\overline{X}_{K}\mspace{-4.0mu}\sim\mspace{-4.0mu}\mathcal{N}(\overline{x}+(P_{12}(t_{K-1})\Delta
t)[-1\ 1]^{T},(\sigma^{2}\Delta t)\mathbb{I})$, where
$\mathbb{I}\mspace{-4.0mu}\in\mspace{-4.0mu}\mathbb{R}^{2}$ is an identity
matrix. Note,
$\mathbb{P}[\overline{X}_{K}\mspace{-4.0mu}\in\mspace{-4.0mu}B|\overline{X}_{K-1}\mspace{-4.0mu}=\mspace{-4.0mu}\overline{x}\mspace{-4.0mu}\in\mspace{-4.0mu}B]$
can further be written as

$\displaystyle\textstyle\mathbb{P}[\overline{X}_{K}\mspace{-4.0mu}\in\mspace{-4.0mu}B|\overline{X}_{K-1}\mspace{-4.0mu}=\mspace{-4.0mu}\overline{x}\mspace{-4.0mu}\in\mspace{-4.0mu}B]$
$\displaystyle\textstyle=\mathbb{P}[X_{1}(t_{K})\mspace{-4.0mu}\in\mspace{-4.0mu}[0,N_{B}]|X_{1}(t_{K-1})\mspace{-4.0mu}=\mspace{-4.0mu}x_{1}\mspace{-4.0mu}\in\mspace{-4.0mu}[0,N_{B}]]$
$\displaystyle\textstyle\mathbb{P}[X_{2}(t_{K})\mspace{-4.0mu}\in\mspace{-4.0mu}[0,N_{B}]|X_{2}(t_{K-1})\mspace{-4.0mu}=\mspace{-4.0mu}x_{2}\mspace{-4.0mu}\in\mspace{-4.0mu}[0,N_{B}]]$
$\displaystyle=\textstyle\Big{[}\Phi\Big{(}\frac{N_{B}-x_{1}+P_{12}\Delta
t}{\sigma\sqrt{\Delta
t}}\Big{)}\mspace{-4.0mu}-\mspace{-4.0mu}\Phi\Big{(}\frac{-x_{1}+P_{12}\Delta
t}{\sigma\sqrt{\Delta t}}\Big{)}\Big{]}$
$\displaystyle\textstyle\Big{[}\Phi\Big{(}\frac{N_{B}-x_{2}-P_{12}\Delta
t}{\sigma\sqrt{\Delta
t}}\Big{)}\mspace{-4.0mu}-\mspace{-4.0mu}\Phi\Big{(}\frac{-x_{2}-P_{12}\Delta
t}{\sigma\sqrt{\Delta t}}\Big{)}\Big{]}$
$\displaystyle=\textstyle\Big{[}\Phi(g_{1}(x_{1},P_{12}))-\Phi(g_{2}(x_{1},P_{12}))\Big{]}$
$\displaystyle\textstyle\Big{[}\Phi(g_{3}(x_{1},P_{12}))-\Phi(g_{4}(x_{1},P_{12}))\Big{]},$

where $\Phi(\cdot)$ is the CDF of standard normal, and,

$\displaystyle\textstyle g_{1}(x_{1},P_{12})\mspace{-4.0mu}$
$\displaystyle\textstyle:=\mspace{-4.0mu}\frac{N_{B}-x_{1}+P_{12}\Delta
t}{\sigma\sqrt{\Delta t}},\ \textstyle
g_{2}(x_{1},P_{12})\mspace{-4.0mu}\textstyle:=\mspace{-4.0mu}\frac{-x_{1}+P_{12}\Delta
t}{\sigma\sqrt{\Delta t}}$ $\displaystyle\textstyle
g_{3}(x_{2},P_{12})\mspace{-4.0mu}$
$\displaystyle\textstyle:=\mspace{-4.0mu}\frac{N_{B}-x_{2}-P_{12}\Delta
t}{\sigma\sqrt{\Delta t}},\ \textstyle
g_{4}(x_{2},P_{12})\mspace{-4.0mu}\textstyle:=\mspace{-4.0mu}\frac{-x_{2}-P_{12}\Delta
t}{\sigma\sqrt{\Delta t}},$

and $\overline{x}\in[0,N_{B}]\times[0,N_{B}]$.

At the last time step, we need to determine the power transfer amount
$P_{12}(t_{K-1})$ that maximizes the probability,
$P^{\pi}_{K-1}(\overline{x})=\mathbb{P}[\overline{X}_{K}\mspace{-4.0mu}\in\mspace{-4.0mu}B|\overline{X}_{K-1}\mspace{-4.0mu}=\mspace{-4.0mu}\overline{x}\mspace{-4.0mu}\in\mspace{-4.0mu}B]$.
In the subsequent paragraphs, we omit the explicit dependency of
$P_{12}(t_{K-1})$ on time for brevity of notation. We further define
$V_{k}^{\pi}(\overline{x}):=P_{k}^{\pi}(\overline{x})=\mathbb{P}[\overline{X}_{k}\in
B,\text{ for all }k\in\\{k+1,\ldots,K\\}|\overline{X}_{k}=\overline{x}_{0}\in
B]$. Thus,

$\displaystyle\textstyle V_{K-1}^{\pi}(\overline{x})$
$\displaystyle:=\textstyle\Big{[}\Phi(g_{1}(x_{1},P_{12}))-\Phi(g_{2}(x_{1},P_{12}))\Big{]}$
$\displaystyle\textstyle\Big{[}\Phi(g_{3}(x_{2},P_{12}))-\Phi(g_{4}(x_{2},P_{12}))\Big{]}.$

Thus, at the last time step, we solve the following problem: Given
$\overline{x}\in[0,N_{B}]$,

$\displaystyle\sup_{P_{12}}$ $\displaystyle\textstyle\hskip
7.22743pt\textstyle V_{K-1}^{\pi}(\overline{x})$ (20)
$\displaystyle\text{subject to}\ -\overline{P}_{12}\leq
P_{12}\leq\overline{P}_{12},$ (21)

In the subsequent paragraphs, we derive a solution to (20).

Note that, the Lagrangian of the problem (20) can be written as follows:

$\displaystyle\textstyle
L(P_{12},\lambda_{1},\lambda_{2}):=V_{K-1}^{\pi}(\overline{x})$
$\displaystyle\textstyle-\lambda_{1}(P_{12}-\overline{P}_{12})-\lambda_{2}(-\overline{P}_{12}-P_{12}),$
(22)

where $\lambda_{1}\mspace{-4.0mu}\geq\mspace{-4.0mu}0$ and
$\lambda_{2}\mspace{-4.0mu}\geq\mspace{-4.0mu}0$ are the Lagrange multipliers.
The KKT conditions [21] for the Lagrangian $L(P_{12},\lambda_{1},\lambda_{2})$
can be written as:

$\displaystyle\textstyle\frac{\partial L(\cdot)}{\partial P_{12}}=0,\
\lambda_{1}(P_{12}\mspace{-4.0mu}-\mspace{-4.0mu}\overline{P}_{12})=0,\lambda_{2}(-\overline{P}_{12}\mspace{-4.0mu}-\mspace{-4.0mu}P_{12})=0.$
(23)

Here, we have the following:

$\displaystyle\textstyle\frac{\partial L(\cdot)}{\partial P_{12}}=0$
$\displaystyle\textstyle\implies-\frac{\sqrt{\Delta
t}}{\sqrt{2\pi}\sigma}\Big{[}e^{-\frac{1}{2}(g_{2}(x_{1},P_{12}))^{2}}-e^{-\frac{1}{2}(g_{1}(x_{1},P_{12}))^{2}}\Big{]}$
$\displaystyle\textstyle\Big{[}\Phi(g_{3}(x_{1},P_{12}))-\Phi(g_{4}(x_{1},P_{12}))\Big{]}$
$\displaystyle\textstyle+\frac{\sqrt{\Delta
t}}{\sqrt{2\pi}\sigma}\Big{[}\Phi(g_{1}(x_{1},P_{12}))-\Phi(g_{2}(x_{1},P_{12}))\Big{]}$
$\displaystyle\textstyle\Big{[}e^{-\frac{1}{2}(g_{4}(x_{2},P_{12}))^{2}}-e^{-\frac{1}{2}(g_{3}(x_{2},P_{12}))^{2}}\Big{]}-\lambda_{1}+\lambda_{2}=0.$
(24)

Further, from the complementary slackness conditions, we can deduce the
following:

Case 1: It is not feasible to have non-zero values for both $\lambda_{1}$ and
$\lambda_{2}$.

Case 2: If $\lambda_{1}\mspace{-4.0mu}\neq\mspace{-4.0mu}0$, then
$P_{12}\mspace{-4.0mu}=\mspace{-4.0mu}\overline{P}_{12}$ and
$\lambda_{2}\mspace{-4.0mu}=\mspace{-4.0mu}0$.

Case 3: If $\lambda_{2}\mspace{-4.0mu}\neq\mspace{-4.0mu}0$, then
$P_{12}\mspace{-4.0mu}=\mspace{-4.0mu}-\overline{P}_{12}$ and
$\lambda_{1}\mspace{-4.0mu}=\mspace{-4.0mu}0$.

Considering Cases 2, and 3, it can be shown that, (i) if
$x_{1}>x_{2}+2\overline{P}_{12}\Delta t$, the KKT conditions (23) are
satisfied with $P_{12}=\overline{P}_{12}$, (ii) if
$x_{2}>x_{1}+2\overline{P}_{12}\Delta t$, the KKT conditions (23) are
satisfied with $P_{12}=-\overline{P}_{12}$, and (iii) if $x_{1}=x_{2}$, the
KKT conditions are satisfied with $P_{12}=0$. In the case of,
$|x_{1}-x_{2}|\mspace{-4.0mu}\in\mspace{-4.0mu}(0,2\overline{P}_{12}\Delta
t]$, we consider $P_{12}=\frac{x_{1}-x_{2}}{2\Delta t}$. Note that, in this
case, $\lambda_{1}=\lambda_{2}=0$, and, $P_{12}=\frac{x_{1}-x_{2}}{2\Delta t}$
satisfies the KKT conditions (V-B1). Later we show that as $\Delta t$ becomes
smaller ($\Delta t\to 0$), the region
$|x_{1}-x_{2}|\in(0,2\overline{P}_{12}\Delta t]$ shrinks and we obtain a bang-
bang power transfer policy.

Hence, in summary, we have the following: a power transfer policy,
characterized by,

$\displaystyle\textstyle P_{12}=\overline{P}_{12},\text{ if
}x_{1}>x_{2}+2\overline{P}_{12}\Delta t,$ $\displaystyle\textstyle
P_{12}=-\overline{P}_{12},\text{ if }x_{2}>x_{1}+2\overline{P}_{12}\Delta t,$
$\displaystyle\textstyle P_{12}=0,\text{ if }x_{1}=x_{2},$
$\displaystyle\textstyle P_{12}=\frac{x_{1}-x_{2}}{2\Delta t},\text{ if
}|x_{1}-x_{2}|\in(0,2\overline{P}_{12}\Delta t],$ (25)

satisfies the KKT conditions (V-B1).

Let the optimal value of (20) be denoted by
$V_{K-1}^{*}(\overline{x}):=\sup_{P_{12}}\\{V_{K-1}^{\pi}(\overline{x}):\overline{P}_{12}\leq
P_{12}<\overline{P}_{12}\\}$. Here we assume that $V_{K-1}^{*}(\overline{x})$
is concave in $\overline{x}\in[0,N_{B}]$, which can be empirically verified
for the power transfer policy (V-B1). In the subsequent analysis, we show that
under the assumption, $V_{K-1}^{*}(\overline{x})$ is concave in
$\overline{x}$, we have $V_{k}^{*}(\overline{x})$ is concave in
$\overline{x}\in[0,N_{B}]$ for all $k\in\\{0,1,\ldots,K-1\\}$, and thus, the
power transfer policy (V-B1) is optimal for all $k$.

Note that, $P_{0}^{\pi}(\overline{x}_{0})$ can be expressed as follows:

$\displaystyle\textstyle
P_{0}^{\pi}(\overline{x}_{0})=\mathbb{E}[\Pi_{j=1}^{K}\mathbbm{1}_{B}(\overline{X}_{j})|\overline{X}_{0}=\overline{x}_{0}],$

where $\mathbbm{1}_{A}(\overline{X})\mspace{-4.0mu}=\mspace{-4.0mu}1$, if
$\overline{X}\in A$, and $0$ otherwise. Thus we have,

$\displaystyle\textstyle V_{k}^{\pi}(\overline{x})$
$\displaystyle=\textstyle\mathbb{E}[\Pi_{j=k+1}^{K}\mathbbm{1}_{B}(\overline{X}_{j})|\overline{X}_{k}=\overline{x}],$
(26) $\displaystyle\textstyle V_{k}^{*}(\overline{x})$
$\displaystyle=\textstyle\sup_{\pi}V_{k}^{\pi}(\overline{x}).$ (27)

We denote the transition probability by $Q_{k}(\cdot)$ which is defined as
follows:

$\displaystyle\textstyle
Q_{k}(\mathcal{X}|\overline{x},P_{12}(t_{k})):=\mathbb{P}[\overline{X}_{k+1}\in\mathcal{X}|\overline{X}_{k}=\overline{x},P_{12}(t_{k})].$

In subsequent analysis, we show that the following recursion,

$\displaystyle\textstyle V_{K}^{*}(\overline{x})$ $\displaystyle=\textstyle
1,$ (28) $\displaystyle\textstyle V_{k}^{*}(\overline{x})$
$\displaystyle=\textstyle\sup\limits_{P_{12}(t_{k})}\int\mathbbm{1}_{B}(\overline{y})V^{*}_{k+1}(\overline{y})Q_{k}(\text{d}\overline{y}|\overline{x},P_{12}(t_{k})),$
$\displaystyle\textstyle k\in\\{0,1,\ldots,K-1\\},$

solves the problem (19).

We start with the base case $k=K-1$. From the definition (26), we have,

$\displaystyle\textstyle
V^{*}_{K-1}(\overline{x})\textstyle=\sup\limits_{P_{12}(t_{K-1})}\mathbb{E}[\mathbbm{1}_{B}(\overline{X}_{K})|\overline{X}_{K-1}=\overline{x}]$
$\displaystyle=\textstyle\sup\limits_{P_{12}(t_{K-1})}\int\mathbbm{1}_{B}(\overline{y})\mathbb{P}[\overline{X}_{K}\in\text{d}\overline{y}|\overline{X}_{K-1}=\overline{x},P_{12}(t_{K-1})]$
$\displaystyle=\textstyle\sup\limits_{P_{12}(t_{K-1})}\int\mathbbm{1}_{B}(\overline{y})V^{*}_{K}(\overline{y})Q_{K-1}(\text{d}\overline{y}|\overline{x},P_{12}(t_{K-1})).$

Thus the recursion (28) holds for $k=K-1$. Now let $k\in\\{0,1,\ldots,K-2\\}$
and presume that $V^{*}_{k+1}(\overline{x})$ is known. From the definition
(26), we have the following:

$\displaystyle\textstyle
V_{k}^{*}(\overline{x})=\sup\limits_{P_{12}(t_{k}),\ldots,P_{12}(t_{K-2})}\mathbb{E}[\Pi_{j=k+1}^{K-2}\mathbbm{1}_{B}(\overline{X}_{j})|\overline{X}_{k}=\overline{x}]$
$\displaystyle\textstyle=\sup\limits_{P_{12}(t_{k}),\ldots,P_{12}(t_{K-2})}[\int\Pi_{j=k+1}^{K-2}\mathbbm{1}_{B}(\overline{X}_{j})$
$\displaystyle\textstyle\Pi_{i=k+2}^{K-2}Q_{i-1}(\text{d}\overline{y}_{i}|\overline{y}_{i-1},P_{12}(t_{i-1}))Q_{k}(\text{d}\overline{y}_{k+1}|\overline{x},P_{12}(t_{k}))$
$\displaystyle\textstyle=\sup\limits_{P_{12}(t_{k})}[\int\mathbbm{1}_{B}(\overline{y}_{k+1})$
$\displaystyle\textstyle\Big{(}\sup\limits_{P_{12}(t_{k+1}),\ldots,P_{12}(t_{K-2})}[\int\Pi_{j=k+2}^{K-2}\mathbbm{1}_{B}(\overline{y}_{j})$
$\displaystyle\textstyle\Pi_{i=k+2}^{K-2}Q_{i-1}(\text{d}\overline{y}_{i}|\overline{y}_{i-1},P_{12}(t_{i-1})\Big{)}Q_{k}(\text{d}\overline{y}_{k+1}|\overline{x},P_{12}(t_{k}))$
$\displaystyle=\textstyle\sup\limits_{P_{12}(t_{k})}[\int\mathbbm{1}_{B}(\overline{y}_{k+1})V^{*}_{k+1}(\overline{y}_{k+1})Q_{k}(\text{d}\overline{y}_{k+1}|\overline{x},P_{12}(t_{k}))].$

This completes the proof that (28) solves the problem (19).

Under the assumption that $V^{*}_{K-1}(\overline{x})$ is concave in
$\overline{x}$, by the recursion (28), we have that $V^{*}_{k}(\overline{x})$
is also concave in $\overline{x}$, and the power transfer control law (V-B1)
is optimal for all $k\in\\{0,1,\ldots,K\\}$. We remark that, as $\Delta t$
gets smaller ($\Delta t\to 0$) the region,
$|x_{1}-x_{2}|\in(0,2\overline{P}_{12}\Delta t]$, shrinks. Further, recall
that,

$\displaystyle\textstyle
P(N,\mspace{-2.0mu}\alpha,\mspace{-2.0mu}\pi)\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle\mathbb{P}[X_{1,T_{f}}^{sup}\mspace{-4.0mu}<\mspace{-4.0mu}N_{B},\textstyle
X_{1,T_{f}}^{inf}\mspace{-4.0mu}>\mspace{-4.0mu}0,\textstyle\textstyle
X_{2,T_{f}}^{sup}\mspace{-4.0mu}<\mspace{-4.0mu}N_{B},X_{2,T_{f}}^{inf}\mspace{-4.0mu}>\mspace{-4.0mu}0],$
$\displaystyle=\textstyle\mathbb{P}[X_{1}(t)\in[0,N_{B}],X_{2}(t)\in[0,N_{B}],\text{
for all }t\in[0,T_{f}]].$

On the other hand, by definition,
$P_{0}^{\pi}(\overline{x}_{0})=\mathbb{P}[\overline{X}_{k}\in[0,N_{B}],\text{
for all }k\in\\{0,1,\ldots,K\\}|\overline{X}_{0}=\overline{x}_{0}]$, with
$\Delta t=\frac{T_{f}}{K}$. Thus taking $\Delta t\to 0$ we can show that the
optimal power transfer policy, that maximizes $P(N,\alpha,\pi)$, is as
follows:

$\displaystyle\tilde{P}_{12}(t)=\begin{cases}\textstyle\overline{P}_{12},&\text{
if }\textstyle X_{1}(t)>X_{2}(t),\\\ \textstyle-\overline{P}_{12},&\text{ if
}\textstyle X_{1}(t)<X_{2}(t),\\\ 0,&\text{ if }\textstyle
X_{1}(t)=X_{2}(t)\end{cases}$ (29)

####  V-B2 Battery Capacity Determination

As per the optimal power transfer policy, at any time $t\in[0,T_{f}]$, the MG
having higher available energy in its battery storage transfers power to the
other one. Here, note that, $\tilde{P}_{12}(t)$ does not depend on the choice
of $N$ and $\alpha$, thus, $\tilde{\pi}(N,\alpha)$ leads to the optimal
solution to (17); hence $\tilde{\pi}(N,\alpha)=\pi^{\prime}$. Let
$X_{1}^{\pi^{\prime}}(t)$ and $X_{2}^{\pi^{\prime}}(t)$ denote the total
available energy in the BESs of MG-$1$ and MG-$2$ respectively, following the
policy $\pi^{\prime}$. Thus, from (V-A), we have the following:

$\displaystyle\textstyle X_{1}^{\pi^{\prime}}(t)$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle\alpha
NB_{max}\mspace{-4.0mu}+\mspace{-4.0mu}\sigma
W_{1}(t)\mspace{-4.0mu}-\mspace{-4.0mu}\int_{0}^{t}\tilde{P}_{12}(s)\text{d}s,\text{
and,}$ $\displaystyle\textstyle X_{2}^{\pi^{\prime}}(t)$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle\alpha
NB_{max}\mspace{-4.0mu}+\mspace{-4.0mu}\sigma
W_{2}(t)\mspace{-4.0mu}+\mspace{-4.0mu}\int_{0}^{t}\tilde{P}_{12}(s)\text{d}s.$
(30)

Further, from Theorem 2, we have that, $\pi^{\prime}$ solves problem (16) as
well. Hence, upon obtaining $\pi^{\prime}$, we simplify problem (16) as
follows:

$\displaystyle\min_{\alpha,N}$ $\displaystyle\textstyle\hskip 7.22743ptN$ (31)
$\displaystyle\text{subject to}\
(\ref{eq:brownian_soc_two_mg_under_optimal_policy}),\ \textstyle N\geq 0,\
\textstyle 0\leq\alpha\leq 1,$ $\displaystyle\textstyle
P(N,\alpha,\pi^{\prime})\geq\mspace{-4.0mu}1\mspace{-4.0mu}-\mspace{-4.0mu}\delta.$

In the subsequent analysis, we show how a tractable solution to the problem
(31) is obtained to determine the number of BESs (or equivalently the BESs
capacity of the MGs).

Let $X_{c}^{\pi^{\prime}}(t):=X_{1}^{\pi^{\prime}}(t)+X_{2}^{\pi^{\prime}}(t)$
and
$X_{d}^{\pi^{\prime}}(t):=X_{2}^{\pi^{\prime}}(t)-X_{1}^{\pi^{\prime}}(t),t\in[0,T_{f}]$.
Then, from (V-B2), we have the following:

$\displaystyle\textstyle X_{c}^{\pi^{\prime}}(t)$
$\displaystyle\textstyle=2\alpha
NB_{max}\mspace{-4.0mu}+\mspace{-4.0mu}\sigma(W_{1}(t)+W_{2}(t))$
$\displaystyle\textstyle X_{d}^{\pi^{\prime}}(t)$
$\displaystyle\textstyle=\sigma(W_{2}(t)-W_{1}(t))+2\int_{0}^{t}\tilde{P}_{12}(s)\text{d}s.$
(32)

Further, let
$X_{c,T_{f}}^{\pi^{\prime},sup}:=\sup_{t\in[0,T_{f}]}X_{c}^{\pi^{\prime}}(t)$
and
$X_{c,T_{f}}^{\pi^{\prime},inf}:=\inf_{t\in[0,T_{f}]}X_{c}^{\pi^{\prime}}(t)$.
Here we present the following proposition which provides an upper bound to the
solution to (31):

######  Proposition 1.

Let $N^{*}$ denote the solution to (31) and $\beta\geq 0$ be a given constant.
Further, consider the following problem:

$\displaystyle\min_{\alpha,N}$ $\displaystyle\textstyle\hskip 7.22743ptN$ (33)
$\displaystyle\text{subject to}\ (\ref{eq:brownian_soc_two_mg_1}),\ \textstyle
N\geq 0,\ 0\leq\alpha\leq 1,$
$\displaystyle\textstyle\mathbb{P}[X_{c,T_{f}}^{\pi^{\prime},sup}\geq
2NB_{max}-\beta]\textstyle+\mathbb{P}[X_{c,T_{f}}^{\pi^{\prime},inf}\leq\beta]$
$\displaystyle\textstyle+\mathbb{P}[|X_{d,T_{f}}^{\pi^{\prime},sup}|\geq\beta]\leq\delta.$
(34)

Let $\hat{N}$ denote the optimal value of (33), then
$N^{*}\mspace{-4.0mu}\leq\mspace{-4.0mu}\hat{N}$.

###### Proof.

Please see Appendix D. ∎

Note,
$\mathbb{P}[|X_{d,T_{f}}^{\pi^{\prime},sup}|\mspace{-4.0mu}\geq\mspace{-4.0mu}\beta]$
is monotonically decreasing in $\beta$. Hence, we choose $\beta$ in such a way
that
$\mathbb{P}[|X_{d,T_{f}}^{\pi^{\prime},sup}|\mspace{-4.0mu}\geq\mspace{-4.0mu}\beta]\mspace{-4.0mu}<\mspace{-4.0mu}\frac{\delta}{2}$.
Let $\delta^{\prime}\mspace{-4.0mu}:=\mspace{-4.0mu}\frac{\delta}{2}$. Thus,
problem (33) can be simplified as follows:

$\displaystyle\min_{\alpha,N}$ $\displaystyle\textstyle\hskip 7.22743ptN$ (35)
$\displaystyle\text{subject to}\ (\ref{eq:brownian_soc_two_mg_1}),\ \textstyle
N\geq 0,\ 0\leq\alpha\leq 1,$
$\displaystyle\textstyle\mathbb{P}[X_{c,T_{f}}^{\pi^{\prime},sup}\mspace{-4.0mu}\geq\mspace{-4.0mu}2NB_{max}\mspace{-4.0mu}-\mspace{-4.0mu}\beta]\textstyle\mspace{-4.0mu}+\mspace{-4.0mu}\mathbb{P}[X_{c,T_{f}}^{\pi^{\prime},inf}\leq\beta]\leq\delta^{\prime}.$
(36)

Let $(\alpha_{c},N_{c})$ solve the problem (35). Further note that, by
definition [22], $(W_{1}(t)+W_{2}(t))\sim\sqrt{2}W_{c}(t)$, where $W_{c}(t)$
is a Weiner Process, and thus
$X_{c}^{\pi^{\prime}}(t)\sim\sigma_{c}W_{c}(t)+2\alpha NB_{max}$, where
$\sigma_{c}=\sqrt{2}\sigma$. Thus, following the methodology described in
Section IV, we can derive the following:

$\displaystyle N_{c}$
$\displaystyle\textstyle\leq\frac{\sqrt{8\sigma_{c}^{2}T_{f}\ln(2/\delta^{\prime})}}{2B_{max}}+\frac{\beta}{B_{max}},$
$\displaystyle\alpha_{c}$ $\displaystyle\textstyle=\frac{1}{2}.$ (37)

Thus, we provide an upper bound to $\tilde{N}$ that solves (35) which can be
utilized by the DNO for practical purposes.

Next, we consider the effect of power line capacity on the battery capacity
requirement of the MGs. We consider the following two extreme cases of the
power line capacity: (i) $\overline{P}_{12}=0$, and (ii)
$\overline{P}_{12}\to\infty$. First, consider the scenario when
$\overline{P}_{12}=0$, that is, the MGs are not connected to each other. In
this case, each MG can be treated as a single MG, and the number of BESs
required in each can be obtained from Theorem 1. Let $\tilde{N}_{0}$ denote
the total number of BESs for the entire system, combining MG-$1$ and MG-$2$.
Then from Theorem 1, we have, $\tilde{N}_{0}=2\tilde{N}=2c\sigma\sqrt{T_{f}}$,
where, $c:=\sqrt{8\ln({2/\delta})}/B_{max}$. Next, consider the scenario when
the power transfer capacity is infinite. In this case, the combination of the
two MGs can be treated as a single MG. Further, by definition [22], we have
$(W_{1}(t)+W_{2}(t))\sim\sqrt{2}W_{c}(t)=\sigma_{c}W_{c}(t)$, where $W_{c}(t)$
is a Wiener process, and $\sigma_{c}=\sqrt{2}$. Here, the total energy
available from the BESs, at time $t\in[0,T_{f}]$, is given by
$X_{1}(t)+X_{2}(t)=2\alpha NB_{max}+\sigma(W_{1}(t)+W_{2}(t))$. Let
$\tilde{N}_{\infty}$ denote the required number of BESs in this case. Thus,
from Theorem 1, we have,
$\tilde{N}_{\infty}=c\sigma_{c}\sqrt{T_{f}}=\sqrt{2}\tilde{N}$. Here, note
that $\tilde{N}_{0}=\sqrt{2}\tilde{N}_{\infty}$, thus, eventually, the
required number of BESs decreases as the power flow capacity is increased up
to a factor of $\sqrt{2}.$

##  VI Experimental Results

In this section, we demonstrate the applicability and utility of our proposed
BES capacity design and power transfer policy determination methodology.
First, we consider the case of a single microgrid where a modified IEEE-33 bus
distribution network with a total load of $15$ kW is taken as the system under
study. A battery, operated in Grid Forming Mode (GFM), is connected to bus $1$
and a wind farm is connected to bus $4$. The parameters, considered, for the
real-time simulation, are as follows: $\sigma=1,\delta=0.02,B_{max}=1\text{
kWh},T_{f}=5$ hours. The power network is emulated inside OP5700 real-time
simulator box, manufactured by OPAL-RT. The RT simulation is conducted using
eMEGASIM-based EMT-simulation platform of RTLAB with a simulation step size of
$50\mu s$. Using Theorem 1, GFM battery capacity is set to $13$ kWh with
initial battery charge set to $6.5$ kWh. The system is run for $5$ hours in
real-time. The wind and load variation and the power provided by the GFM
battery are shown in Fig. 3a. The battery State-of-the Charge (SoC) is shown
in Fig. 3b. It can be seen that, throughout the time horizon of $5$ hours, the
battery SoC neither hits the maximum capacity of $13$ kWh, nor gets completely
depleted, establishing the utility of our proposed battery sizing methodology.

Next, we consider a system of two MGs, connected to each other via a power
line. The parameters, considered for the simulation, are as follows:
$\sigma=1,\delta=0.02,B_{max}=1\text{ kWh},\overline{P}_{12}=15\text{
kW},T_{f}=5\text{ hours}$. The time step, $\Delta t$, for the simulation is
chosen to be $30$ seconds. Using (V-B2), the BES capacity of each MG is set to
$10$ kWh. The power transfer policy, (V-B1), is employed. Fig. 4 shows the
simulation results for $5000$ runs, where we plot the available energy in the
BES of each MG. It is observed that in only $0.4$% of the total number of
realizations, either the SoC of MG-1 battery or MG-2 battery hits the upper
limit of $10$ kWh or hits the lower limit of $0$ kWh, which is well within the
chosen limit of $2$% ($\delta\mspace{-4.0mu}=\mspace{-4.0mu}0.02$). Next, we
empirically analyze the effect of power line capacity, $\overline{P}_{12}$
under our proposed power transfer policy, on the required BES capacity to
ensure that both the battery SoC remains within the operating range with a
probability of at least $(1-\delta)=0.98$. Here, in Fig. 5, we plot the
required BES capacity, averaged over $5000$ runs, as we vary the power line
capacity $\overline{P}_{12}$. It is observed that under our proposed power
transfer policy, with the increase in line capacity, the MGs can share more
power with each other, which in turn reduces the required BES capacity. Thus
our proposed BES sizing and power transfer policy can provide a system design
guideline for the distribution system operators.

(a)

(b)

Figure 3: (a) Wind, load variation, and GFM battery power for $5$ hours in
real-time in the IEEE-$33$ bus single MG system. (b) The battery does not get
fully charged or get depleted throughout the time horizon. Figure 4: Two MG
system: Battery capacity of each MG is $10$ kWh with a power line capacity of
$15$ kW. Out of $5000$ realizations of the available energy in the batteries
of MG-1 and MG-2, only 0.4% realizations, hits either the upper limit of $10$
kWh or the lower limit of $0$ kWh. Figure 5: Required BES capacity for each MG
decreases, under the optimal power transfer control policy, as power line
capacity increases.

##  VII Conclusion

In this article, we provide a BESs energy capacity determination methodology
for microgrids that ensures the BESs do not reach their maximum capacity or
get completely depleted throughout a chosen time horizon, with a pre-specified
high probability. Such an operation guarantees that in case the RES generation
is more than the demand, the BES can be charged and when demand exceeds the
RES generation, the BESs can be utilized to supply the loads, thus reducing
both generation and load curtailments. We further extend the methodology to a
two MG system, where along with the required BES capacity, we provide a power
transfer policy between the MGs that reduces the BESs requirement while
ensuring the BESs remain within their operating range with high probability.
We analytically show that BES requirement is minimized if at any time, the MG
having higher available energy in its BESs, transfers maximum power that can
flow via the power line, to the other. Further, as the power line capacity in
increased the requied BES capacity can be decreased up to a factor of
$\sqrt{2}$.

## References

  * [1] IRENA, “Global energy transformation: A roadmap to 2050,” 2019, [Accessed 31 August 2020]. [Online]. Available: https://www.irena.org/-/media/Files/IRENA/Agency/Publication/2019/Apr/IRENA_Global_Energy_Transformation_2019.pdf
  * [2] M. Hannan, M. Faisal, P. J. Ker, R. Begum, Z. Dong, and C. Zhang, “Review of optimal methods and algorithms for sizing energy storage systems to achieve decarbonization in microgrid applications,” _Renewable and Sustainable Energy Reviews_ , vol. 131, p. 110022, 2020.
  * [3] M. Zolfaghari, N. Ghaffarzadeh, and A. J. Ardakani, “Optimal sizing of battery energy storage systems in off-grid micro grids using convex optimization,” _Journal of Energy Storage_ , vol. 23, pp. 44–56, 2019.
  * [4] H. Khorramdel, J. Aghaei, B. Khorramdel, and P. Siano, “Optimal battery sizing in microgrids using probabilistic unit commitment,” _IEEE Transactions on Industrial Informatics_ , vol. 12, no. 2, pp. 834–843, 2015.
  * [5] Y. Li, Z. Yang, G. Li, D. Zhao, and W. Tian, “Optimal scheduling of an isolated microgrid with battery storage considering load and renewable generation uncertainties,” _IEEE Transactions on Industrial Electronics_ , vol. 66, no. 2, pp. 1565–1575, 2018.
  * [6] S. X. Chen, H. B. Gooi, and M. Wang, “Sizing of energy storage for microgrids,” _IEEE transactions on smart grid_ , vol. 3, no. 1, pp. 142–151, 2011.
  * [7] F. Hafiz, A. R. de Queiroz, P. Fajri, and I. Husain, “Energy management and optimal storage sizing for a shared community: A multi-stage stochastic programming approach,” _Applied energy_ , vol. 236, pp. 42–54, 2019.
  * [8] M. Ma, H. Huang, X. Song, F. Peña-Mora, Z. Zhang, and J. Chen, “Optimal sizing and operations of shared energy storage systems in distribution networks: A bi-level programming approach,” _Applied Energy_ , vol. 307, p. 118170, 2022.
  * [9] R. Khezri, A. Mahmoudi, and M. H. Haque, “Impact of optimal sizing of wind turbine and battery energy storage for a grid-connected household with/without an electric vehicle,” _IEEE Transactions on Industrial Informatics_ , vol. 18, no. 9, pp. 5838–5848, 2022.
  * [10] Y. Yang, S. Bremner, C. Menictas, and M. Kay, “Battery energy storage system size determination in renewable energy systems: A review,” _Renewable and Sustainable Energy Reviews_ , vol. 91, pp. 109–125, 2018.
  * [11] R. Xie, W. Wei, M.-F. Ge, Q. Wu, and S. Mei, “Coordinate sizing of energy storage and transmission line for a remote renewable power plant,” _IET Renewable Power Generation_ , vol. 16, no. 12, pp. 2508–2520, 2022.
  * [12] M. R. Aghamohammadi and H. Abdolahinia, “A new approach for optimal sizing of battery energy storage system for primary frequency control of islanded microgrid,” _International Journal of Electrical Power & Energy Systems_, vol. 54, pp. 325–333, 2014.
  * [13] C. W. Tan, T. C. Green, and C. A. Hernandez-Aramburo, “A stochastic method for battery sizing with uninterruptible-power and demand shift capabilities in pv (photovoltaic) systems,” _Energy_ , vol. 35, no. 12, pp. 5082–5092, 2010.
  * [14] Y. Yang, H. Li, A. Aichhorn, J. Zheng, and M. Greenleaf, “Sizing strategy of distributed battery storage system with high penetration of photovoltaic for voltage regulation and peak load shaving,” _IEEE Transactions on smart grid_ , vol. 5, no. 2, pp. 982–991, 2013.
  * [15] M. Khasanov, S. Kamel, C. Rahmann, H. M. Hasanien, and A. Al-Durra, “Optimal distributed generation and battery energy storage units integration in distribution systems considering power generation uncertainty,” _IET Generation, Transmission & Distribution_, vol. 15, no. 24, pp. 3400–3422, 2021.
  * [16] M. Habibi, A. Oshnoei, V. Vahidinasab, and S. Oshnoei, “Allocation and sizing of energy storage system considering wind uncertainty: An approach based on stochastic scuc,” in _2018 Smart Grid Conference (SGC)_. IEEE, 2018, pp. 1–6.
  * [17] Y. Cao, D. Li, Y. Zhang, Q. Tang, A. Khodaei, H. Zhang, and Z. Han, “Optimal energy management for multi-microgrid under a transactive energy framework with distributionally robust optimization,” _IEEE Transactions on Smart Grid_ , vol. 13, no. 1, pp. 599–612, 2021.
  * [18] X. Liu, M. Zhang, X. Xie, L. Zhao, and Q. Sun, “Consensus-based energy management of multi-microgrid: An improved soc-based power coordinated control method,” _Applied Mathematics and Computation_ , vol. 425, p. 127086, 2022.
  * [19] Y. Wang, Y. Cui, Y. Li, and Y. Xu, “Collaborative optimization of multi-microgrids system with shared energy storage based on multi-agent stochastic game and reinforcement learning,” _Energy_ , p. 128182, 2023.
  * [20] I. Karatzas and S. Shreve, _Brownian motion and stochastic calculus_. Springer Science & Business Media, 2012, vol. 113.
  * [21] S. P. Boyd and L. Vandenberghe, _Convex optimization_. Cambridge university press, 2004.
  * [22] S. E. Shreve, _Stochastic calculus for finance II: Continuous-time models_. Springer Science & Business Media, 2004, vol. 11.

##  Appendix A Proof of Lemma 1

We have $X(t)=\sigma W(t)+\alpha NB_{max}$. Recall that for $a\in\mathbb{R}$,
$T(a)=\inf\\{t\geq 0:X(t)=a\\}=\inf\\{t\geq 0:W(t)=\frac{a-\alpha
NB_{max}}{\sigma}\\}$. We define $\beta:=\frac{a-\alpha NB_{max}}{\sigma}$. It
follows from the properties of the Weiner process [22], that $T(NB_{max})$ is
a stopping time.

Let $M(t):=e^{cW(t)-\frac{1}{2}c^{2}t}$ for any $c\neq 0$. Note that, the
stochastic process $M(t)$ is a martingale [20]. Therefore, for all $t\geq 0$,
we have $\mathbb{E}[M(t)]=M(0)=1$. Further, we have $\mathbb{E}[M(T(a))]=1$
[20].

We first consider the case, $a=NB_{max}$. Here, we have,

$\displaystyle\mathbb{E}[M(T(NB_{max}))]=1$ $\displaystyle\textstyle\implies$
$\displaystyle\mathbb{E}[e^{\frac{c}{\sigma}W(T(NB_{max}))-\frac{1}{2}c^{2}T(NB_{max})}]\textstyle=1$
$\displaystyle\textstyle\implies$
$\displaystyle\mathbb{E}[e^{\frac{c}{\sigma}X(T(NB_{max}))-\frac{1}{2}c^{2}T(NB_{max})}]\textstyle=e^{\frac{c\alpha
NB_{max}}{\sigma}}.$ (38)

Note that, in the case of $a=NB_{max}$, we have,
$\beta=\frac{NB_{max}(1-\alpha)}{\sigma}\geq 0$. Therefore, we choose a
positive constant $c$. Let $c=\sqrt{2s}$ for some $s\in\mathbb{R}^{+}$. Then,
from (A), we have

$\displaystyle\mathbb{E}[e^{\frac{c}{\sigma}X(T(NB_{max}))-sT(NB_{max})}]=e^{\frac{c\alpha
NB_{max}}{\sigma}}.$

By definition of $T(NB_{max})$, we obtain,

$\displaystyle\mathbb{E}[e^{\frac{cNB_{max}}{\sigma}-sT(NB_{max})}]=e^{\frac{c\alpha
NB_{max}}{\sigma}}$
$\displaystyle\textstyle\implies\mathbb{E}[e^{-sT(NB_{max})}]=e^{-\frac{\sqrt{2s}NB_{max}(1-\alpha)}{\sigma}}.$

Further, note that for any $s>0$, we have, $\mathbb{P}[T(NB_{max})\leq
T_{f}]=\mathbb{P}[e^{-sT(NB_{max})}\geq e^{-sT_{f}}]$. Thus, applying Markov’s
inequality we get,

$\displaystyle\textstyle\mathbb{P}[T(NB_{max})$ $\displaystyle\textstyle\leq
T_{f}]=\mathbb{P}[e^{-sT(NB_{max})}\geq e^{-sT_{f}}]$
$\displaystyle\textstyle\leq e^{sT_{f}}\mathbb{E}[e^{-sT(NB_{max})}]$
$\displaystyle\textstyle=e^{-\frac{\sqrt{2s}NB_{max}(1-\alpha)}{\sigma}+sT_{f}}$

Thus,

$\displaystyle\textstyle\mathbb{P}[T(NB_{max})$ $\displaystyle\textstyle\leq
T_{f}]\textstyle\leq\inf_{s>0}e^{-\frac{\sqrt{2s}NB_{max}(1-\alpha)}{\sigma}+sT_{f}}.$
(39)

It can be shown that for any given $N\geq 0$ and $\alpha\in[0,1]$, the
function $e^{-\frac{\sqrt{2s}NB_{max}(1-\alpha)}{\sigma}+sT_{f}}$ reaches
global minima at
$s^{*}=\frac{N^{2}B_{max}^{2}(1-\alpha)^{2}}{2\sigma^{2}T_{f}}$. Plugging in
the expression of $s^{*}$ in (39), we obtain the following:

$\displaystyle\textstyle\mathbb{P}[T(NB_{max})$ $\displaystyle\textstyle\leq
T_{f}]\textstyle\leq
e^{-\frac{N^{2}B_{max}^{2}(1-\alpha)^{2}}{2\sigma^{2}T_{f}}}.$ (40)

Carrying out a similar procedure for the case $a=0$, to obtain an upper bound
for $\mathbb{P}[T(0)\leq T_{f}]$, we can derive the following:

$\displaystyle\textstyle\mathbb{P}[T(0)$ $\displaystyle\textstyle\leq
T_{f}]\leq e^{-\frac{\alpha^{2}N^{2}B_{max}^{2}}{2\sigma^{2}T_{f}}}.$ (41)

Combining both (40) and (41), we obtain the desired result. This completes the
proof.

##  Appendix B Proof of Theorem 1

Recall that

$f(N,\alpha):=e^{-\frac{N^{2}B_{max}^{2}(1-\alpha)^{2}}{2\sigma^{2}T_{f}}}+e^{-\frac{N^{2}B_{max}^{2}\alpha^{2}}{2\sigma^{2}T_{f}}}.$

For $\alpha=\frac{1}{2}$, we have
$f(N,\frac{1}{2})=2e^{-\frac{N^{2}B_{max}^{2}}{8\sigma^{2}T_{f}}}$. Note that,
$f(N,\frac{1}{2})$ is strictly monotonic decreasing in $N$, for $N>0$. Thus,
for $\alpha=\frac{1}{2}$, the solution to (11) is obtained when the constraint
$f(N,\frac{1}{2})\leq\delta$ is an equality. Solving $f(N,\frac{1}{2})=\delta$
we obtain
$N(\frac{1}{2})=N_{o}=\frac{\sqrt{8\sigma^{2}T_{f}\ln(2/\delta)}}{B_{max}}$.

We define $k:=\frac{2}{\delta}$. Thus, for any $\alpha\in(0,1)$, we have,

$\displaystyle\textstyle f(N_{0},\alpha)=\textstyle
e^{-4\ln(k)(1-\alpha)^{2}}+e^{-4\ln(k)\alpha^{2}}.$

We first prove that $f(N_{0},\alpha)$ achieves global minima at
$\alpha=\frac{1}{2}$. Differentiating with respect to $\alpha$, we have,

$\displaystyle\textstyle\frac{\partial f(N_{0},\alpha)}{\partial\alpha}$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle
8(1\mspace{-4.0mu}-\mspace{-4.0mu}\alpha)\ln(k)(k)^{-4(1-\alpha)^{2}}\mspace{-8.0mu}-\mspace{-4.0mu}8\alpha\ln(k)(k)^{-4\alpha^{2}}.$
(42)

Note, for any $\alpha\in(0,1)$ that satisfies $\frac{\partial
f(N_{0},\alpha)}{\partial\alpha}=0$, we have the following:

$\displaystyle\textstyle(k)^{4(1-2\alpha)}$
$\displaystyle=\textstyle\frac{1-\alpha}{\alpha}.$ (43)

Note that $k=\frac{2}{\delta}\geq 2.$ Clearly, $\alpha=\frac{1}{2}$ satisfies
(43). Double differentiation of $f(N_{0},\alpha)$ with respect to $\alpha$
leads to the following:

$\displaystyle\textstyle\frac{\partial^{2}f(N_{0},\alpha)}{\partial\alpha^{2}}$
$\displaystyle\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle(8(1\mspace{-4.0mu}-\mspace{-4.0mu}\alpha)\ln(k))^{2}(k)^{-4(1\mspace{-2.0mu}-\mspace{-2.0mu}\alpha)^{2}}\mspace{-8.0mu}$
$\displaystyle\textstyle-\mspace{-4.0mu}8\ln(k)(k)^{-4(1\mspace{-2.0mu}-\mspace{-2.0mu}\alpha)^{2}}$
$\displaystyle\textstyle+(8\alpha\ln(k))^{2}(k)^{-4\alpha^{2}}-8\ln(k)(k)^{-4\alpha^{2}}.$

For any $\alpha$ that satisfies $\frac{\partial
f(N_{0},\alpha)}{\partial\alpha}=0$, from (42), we get,

$\displaystyle\textstyle\frac{\partial^{2}f(N_{0},\alpha)}{\partial\alpha^{2}}\mspace{-4.0mu}=\mspace{-4.0mu}\textstyle(8\alpha\ln(k))^{2}(k)^{8(1-\alpha)^{2}-8\alpha^{2}}(k)^{-4(1-\alpha)^{2}}$
$\displaystyle\textstyle-8\ln(k)(k)^{-4(1-\alpha)^{2}}+(8\alpha\ln(k))^{2}(k)^{-4\alpha^{2}}-8\ln(k)(k)^{-4\alpha^{2}}$
$\displaystyle=\textstyle(8\alpha\ln(k))^{2}(k)^{-4\alpha^{2}}(1+(k)^{4(1-\alpha)^{2}-4\alpha^{2}})$
$\displaystyle-\textstyle
8\ln(k)(k)^{-4\alpha^{2}}(1+(k)^{4\alpha^{2}-4(1-\alpha)^{2}})$
$\displaystyle=\textstyle(8\alpha\ln(k))^{2}(k)^{-4\alpha^{2}}(1+(k)^{4(1-2\alpha)})$
$\displaystyle\textstyle-8\ln(k)(k)^{-4\alpha^{2}}(1+(k)^{4(2\alpha-1)})$
$\displaystyle=\textstyle(8\alpha\ln(k))^{2}(k)^{-4\alpha^{2}}(1+\frac{1-\alpha}{\alpha})-8\ln(k)(k)^{-4\alpha^{2}}(1+\frac{\alpha}{1-\alpha})$
$\displaystyle=\textstyle(8\ln(k))^{2}(k)^{-4\alpha^{2}}\alpha-8\ln(k)(k)^{-4\alpha^{2}}(\frac{1}{1-\alpha})$
$\displaystyle=\textstyle
8\ln(k)(k)^{-4\alpha^{2}}(8\ln(k)\alpha-\frac{1}{1-\alpha}).$ (44)

Note that, for $\alpha=\frac{1}{2}$, (B) can be simplified to
$16\ln(k)(\frac{1}{k})(2\ln(k)-1)$ which is positive, since
$k=\frac{2}{\delta}>2$. Thus, $f(N_{0},\alpha)$ achieves minima at
$\alpha=\frac{1}{2}$.

Next, we show that $f(N_{0},\alpha)$ achieves global minima at
$\alpha=\frac{1}{2}$, that is for $\alpha\neq\frac{1}{2},\alpha\in(0,1)$, we
have $\frac{\partial^{2}f(N_{0},\alpha)}{\partial\alpha^{2}}<0$, or
equivalently, from (B), $(8\ln(k)\alpha-\frac{1}{1-\alpha})<0$. We first
define
$g(\alpha):=2\ln(\frac{1}{\alpha})-2\ln(\frac{1}{1-\alpha})-\frac{1}{\alpha}+\frac{1}{1-\alpha}$.
Here we get, $\frac{\partial
g(\alpha)}{\partial\alpha}=(1-2\alpha)(\frac{1}{\alpha^{2}}-\frac{1}{(1-\alpha)^{2}})$.
In the region, $\alpha\in(0,\frac{1}{2})$, we have,
$0<\frac{1}{1-\alpha}<\frac{1}{\alpha}$ and $(1-2\alpha)>0$. Thus,
$\frac{\partial g(\alpha)}{\partial\alpha}>0$, hence, $g(\alpha)$ is strictly
increasing in $\alpha\in(0,\frac{1}{2})$. Similarly, in the region
$\alpha\in(\frac{1}{2},1)$, we have $(1-2\alpha)<0$, and
$0<\frac{1}{\alpha}<\frac{1}{1-\alpha}$. Thus, $\frac{\partial
g(\alpha)}{\partial\alpha}>0$, hence $g(\alpha)$ is increasing in
$\alpha\in(\frac{1}{2},1)$. Since, $g(\alpha)$ is a continuous function of
$\alpha\in(0,1)$, we have

$\displaystyle\textstyle g(\alpha)$
$\displaystyle\textstyle<g(\frac{1}{2})=0,\ \alpha\in(0,\frac{1}{2}),$
$\displaystyle\textstyle g(\alpha)$
$\displaystyle\textstyle>g(\frac{1}{2})=0,\ \alpha\in(\frac{1}{2},1).$ (45)

Next, we will show that
$(8\ln(k)\alpha-\frac{1}{1-\alpha})<0,\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$.
First consider the case $\alpha\in(0,\frac{1}{2})$. From (43), we have
$8\ln(k)=\frac{2}{1-2\alpha}\ln(\frac{1-\alpha}{\alpha})$, and since
$\alpha\in(0,\frac{1}{2})$, we have $(1-2\alpha)>0$. Now, suppose,
$(8\ln(k)\alpha-\frac{1}{1-\alpha})\geq 0$. Here we have,

$\displaystyle\textstyle 8\ln(k)\alpha-\frac{1}{1-\alpha}\geq 0$
$\displaystyle\implies$
$\displaystyle\textstyle\frac{2\alpha}{1-2\alpha}\ln(\frac{1-\alpha}{\alpha})-\frac{1}{1-\alpha}\geq
0$ $\displaystyle\implies$ $\displaystyle\textstyle
2\ln(\frac{1-\alpha}{\alpha})-\frac{1-2\alpha}{\alpha(1-\alpha)}\geq 0$
$\displaystyle\implies$ $\displaystyle\textstyle
2\ln(\frac{1}{\alpha})-2\ln(\frac{1}{1-\alpha})-\frac{1}{\alpha}+\frac{1}{1-\alpha}\geq
0$ $\displaystyle\implies$ $\displaystyle\textstyle g(\alpha)\geq 0.$

However, from (B), we have $g(\alpha)<0$ when $\alpha\in(0,\frac{1}{2})$, and
thus, $(8\ln(k)\alpha-\frac{1}{1-\alpha})<0$.

Next, consider the region $\alpha\in(\frac{1}{2},1)$. Here, we have
$(1-2\alpha)<0$. Suppose $(8\ln(k)\alpha-\frac{1}{1-\alpha})\geq 0$. Here, we
have,

$\displaystyle\textstyle 8\ln(k)\alpha-\frac{1}{1-\alpha}\geq 0$
$\displaystyle\implies$
$\displaystyle\textstyle\frac{2\alpha}{1-2\alpha}\ln(\frac{1-\alpha}{\alpha})-\frac{1}{1-\alpha}\geq
0$ $\displaystyle\implies$ $\displaystyle\textstyle
2\ln(\frac{1-\alpha}{\alpha})-\frac{1-2\alpha}{\alpha(1-\alpha)}\leq 0$
$\displaystyle\implies$ $\displaystyle\textstyle
2\ln(\frac{1}{\alpha})-2\ln(\frac{1}{1-\alpha})-\frac{1}{\alpha}+\frac{1}{1-\alpha}\leq
0$ $\displaystyle\implies$ $\displaystyle\textstyle g(\alpha)\leq 0.$

However, from (B), we have $g(\alpha)>0$ when $\alpha\in(\frac{1}{2},1)$, and
thus, $(8\ln(k)\alpha-\frac{1}{1-\alpha})<0$. Therefore, for any
$\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$ that satisfies (43),
$\frac{\partial^{2}f(N_{0},\alpha)}{\partial\alpha^{2}}<0$. Thus,
$f(N_{0},\alpha)$ achieves global minima at $\alpha=\frac{1}{2}$. Hence, for
any $\alpha\neq\frac{1}{2}$, we have
$f(N_{0},\alpha)>f(N_{0},\frac{1}{2})=2e^{-\ln(k)}=\delta$. Clearly, for an
$\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$, the tuple $(\alpha,N_{o})$ is not
a feasible solution to (11). Further, note that, $f(N,\alpha)$ is strictly
monotonic decreasing in $N$. Thus for any
$\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$, $M\leq N_{o},\ f(M,\alpha)\geq
f(N_{o},\alpha)>\delta$; thus such a $M$ remains infeasible for
$\alpha\not=\frac{1}{2}.$ Hence, for any
$\alpha\in(0,1)\setminus\\{\frac{1}{2}\\}$, we must have $N(\alpha)\geq
N(\frac{1}{2})$. This completes the proof.

##  Appendix C Proof of Theorem 2

Note that as $(N^{*},\alpha^{*},\pi^{*})$ solves (16), we have
$(N^{*},\alpha^{*},\pi^{*})\mspace{-4.0mu}\in\mspace{-4.0mu}S_{1}\mspace{-4.0mu}\subseteq\mspace{-4.0mu}F_{1}$,
and thus (V-A) is satisfied, $\pi^{*}\in\Pi$, and
$P(N^{*},\alpha^{*},\pi^{*})\geq 1-\delta$. Further, as $N^{*}\leq N^{*}$, it
follows that $(N^{*},\pi^{*})\mspace{-4.0mu}\in\mspace{-4.0mu}F_{2}$ as well
and thus $P(N^{*},\pi^{*},\alpha^{*})\leq\nu$, as $\nu$ is the optimal value
of the maximization problem (17). Further, as $(N^{\prime},\pi^{\prime})$
solves (17), we have $P(N^{\prime},\alpha^{*},\pi^{\prime})=\nu\geq
P(N^{*},\alpha^{*},\pi^{*})\geq 1-\delta$. Thus, in summary, we have
$P(N^{\prime},\alpha^{*},\pi^{\prime})\geq 1-\delta$ and as
$(N^{\prime},\pi^{\prime})\mspace{-4.0mu}\in\mspace{-4.0mu}S_{2}\mspace{-4.0mu}\subseteq\mspace{-4.0mu}F_{2}$
$\pi^{\prime}\in\Pi,N^{\prime}\leq N^{*}$, and (V-A) is satisfied. Hence,
$(N^{\prime},\alpha^{*},\pi^{\prime})\mspace{-4.0mu}\in\mspace{-4.0mu}F_{1}$
as well.

Note that, as (16) is a minimization problem, it follows that $N^{\prime}\geq
N^{*}$. However, as
$(N^{\prime},\pi^{\prime})\mspace{-4.0mu}\in\mspace{-4.0mu}S_{2}\mspace{-4.0mu}\subseteq\mspace{-4.0mu}F_{2}$,
we get $N^{\prime}\leq N^{*}$. Thus $N^{\prime}=N^{*}$.

We have established that, $(N^{\prime},\alpha^{*},\pi^{\prime})\in F_{1}$, and
$N^{\prime}=N^{*}$, thus $(N^{\prime},\alpha,\pi^{\prime})$ solves (16) as
well, that is $(N^{\prime},\alpha^{*},\pi^{\prime})\in S_{1}$. This completes
the proof.

##  Appendix D Proof of Proposition 1

Let $A_{1}:=\\{X_{1,T_{f}}^{\pi^{\prime},sup}(t)\geq
NB_{max}\\},A_{2}:=\\{X_{1,T_{f}}^{\pi^{\prime},inf}(t)\leq
0\\},A_{3}:=\\{X_{2,T_{f}}^{\pi^{\prime},sup}(t)\geq NB_{max}\\}$ and
$A_{4}:=\\{X_{2,T_{f}}^{\pi^{\prime},inf}(t)\leq 0\\}$. Therefore, the chance-
constraint of the problem (31) can be equivalently written as:

$\displaystyle\textstyle\mathbb{P}[A_{1}\cup A_{2}\cup A_{3}\cup
A_{4}]\leq\delta.$

In the subsequent paragraphs, we establish that a feasible solution to (33) is
also a feasible solution to (31).

Consider the given constant $\beta$, and let
$A_{d}:=\\{|X_{d,T_{f}}^{\pi^{\prime},sup}|<\beta$ and it’s complement,
$A_{d}^{\prime}:=\\{|X_{d,T_{f}}^{\pi^{\prime},sup}|\geq\beta\\}$.
Marginalizing over the event sets $A_{d}$ and $A_{d}^{\prime}$, we derive the
following:

$\displaystyle\textstyle\mathbb{P}[A_{1}\cup A_{2}\cup A_{3}\cup A_{4}]$
$\displaystyle\textstyle=\textstyle\mathbb{P}[(A_{1}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{2}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{3}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{4})\mspace{-2.0mu}\cap\mspace{-2.0mu}A_{d}]$
$\displaystyle\textstyle\mspace{-4.0mu}+\mspace{-4.0mu}\mathbb{P}[(A_{1}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{2}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{3}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{4})\mspace{-2.0mu}\cap\mspace{-2.0mu}A_{d}^{\prime}].$
(46)

First, we focus on the first term on the right-hand side of (D), and derive
the following:

$\displaystyle\textstyle\mathbb{P}[(A_{1}\cup A_{2}\cup A_{3}\cup A_{4})\cap
A_{d}]$ $\displaystyle\textstyle\leq\mathbb{P}[(A_{1}\cup A_{3})\cap
A_{d}]\textstyle+\mathbb{P}[(A_{2}\cup A_{4})\cap A_{d}].$ (47)

Now, let $\hat{A}_{d}:=\\{|X_{d}^{\pi^{\prime}}(t)|<\beta,\forall
t\in[0,T_{f}]\\}$. As,
$|X_{d,T_{f}}^{\pi^{\prime},sup}|<\beta\implies|X_{d}^{\pi^{\prime}}(t)|<\beta$,
for all $t\in[0,T_{f}]$, we have,
$\mathbb{P}[A_{d}]\leq\mathbb{P}[\hat{A}_{d}]$. Thus, $\mathbb{P}[(A_{1}\cup
A_{3})\cap A_{d}]\leq\mathbb{P}[(A_{1}\cup
A_{3})\cap\hat{A}_{d}]=\mathbb{P}[(A_{1}\cap\hat{A}_{d})\cup(A_{3}\cap\hat{A}_{d})]$.
Now, let $A_{c}:=\\{X_{c,T_{f}}^{\pi^{\prime},sup}\geq 2NB_{max}-\beta\\}$. It
can be shown that $(A_{1}\cap\hat{A}_{d})\subseteq A_{c}$ and
$(A_{3}\cap\hat{A}_{d})\subseteq A_{c}$, which leads to
$\mathbb{P}[(A_{1}\cap\hat{A}_{d})\cup(A_{3}\cap\hat{A}_{d})]\leq\mathbb{P}[A_{c}]$.
Thus, we have

$\displaystyle\textstyle\mathbb{P}[(A_{1}\cup A_{3})\cap
A_{d}]\leq\mathbb{P}[A_{c}].$ (48)

In a similar manner, we define
$\tilde{A}_{c}:=\\{X_{c,T_{f}}^{\pi^{\prime},inf}<\beta\\}$, and derive the
following:

$\displaystyle\textstyle\mathbb{P}[(A_{2}\cup A_{4})\cap
A_{d}]\leq\mathbb{P}[\tilde{A}_{c}].$ (49)

Hence, from (D) and combining (48) and (49), we have

$\displaystyle\textstyle\mathbb{P}[(A_{1}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{2}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{3}\mspace{-2.0mu}\cup\mspace{-2.0mu}A_{4})\mspace{-2.0mu}\cap\mspace{-2.0mu}A_{d}]\textstyle\leq\mathbb{P}[A_{c}]\textstyle+\mathbb{P}[\tilde{A}_{c}].$
(50)

Thus, from (50) and (D), we have

$\displaystyle\textstyle\mathbb{P}[A_{1}\cup A_{2}\cup A_{3}\cup A_{4}]$
$\displaystyle\textstyle\leq\mathbb{P}[A_{c}]\textstyle+\mathbb{P}[\tilde{A}_{c}]\textstyle+\mathbb{\mathbb{missing}}{P}[(A_{1}\cup
A_{2}\cup A_{3}\cup A_{4})\cap A_{d}^{\prime}]$
$\displaystyle\textstyle\leq\mathbb{P}[A_{c}]\textstyle+\mathbb{P}[\tilde{A}_{c}]\textstyle+\mathbb{\mathbb{missing}}{P}[A_{d}^{\prime}].$
(51)

Note that the chance-constraint of the problem (33) can be written as
$\mathbb{P}[A_{c}]+\mathbb{P}[\tilde{A}_{c}]+\mathbb{\mathbb{missing}}{P}[A_{d}^{\prime}]\leq\delta$.
Thus, we establish that a feasible solution to (33) is also a feasible
solution to (31). Thus $N^{*}\leq\hat{N}$. This completes the proof.