## 2 Profit-Maximizing Several Revenue Streams for a BESS
### Major Objectives  
The developed mathematical formulation aims to maximize the battery revenue from several streams while minimizing the overall utility charges for the large customer who will adopt the battery solution. The problem is formulated on annual basis.  
* Objective function:  
The following objective function in (1) minimizes the utility charges and the battery cost while maximizing the battery revenue. Full description of each of these cost and revenue terms are provided in the following set of Equations (2)-(7).  
\[\textit{Minimize}\ \{ACC_{B}+AEC+AGAC+ADCC-ARV_{EA}-\ ARV_{DR}\} \tag{1}\]  
* Battery investment cost per year:  
The term of the battery investment cost on annual basis \(ACC_{B}\) is formulated in (2). This annual cost term counts for both the energy capacity of the battery and the power capacity of the interfacing converter unit as in (2). The annual battery cost takes into consideration the interest rate and the investment period in order to yield a present value of the cost.  
\[ACC_{B}\!=\!\left(R_{EB}\!\cdot\!\overline{EB}+R_{PB}\!\cdot\!\overline{PB} \right)\!\frac{r}{1-\left(1+r\right)^{-N_{y}}} \tag{2}\]  
* The total customer energy cost per year (AEC):  
The energy cost of the customer who adopts the battery solution is estimated based on the net exchange power at the point of common coupling between the customer and the distribution grid, and is formulated in (3) on annual basis. The cost function accounts for the hourly load profile and hourly spot price.  
\[AEC\ =\ \sum_{t=1}^{N_{t}}T_{t}\cdot P_{t}{}^{T}\!\cdot\!Rsp_{t} \tag{3}\]  
* Cost of global adjustment per year (AGAC):  
The global adjustment cost is a unique utility charges for the province of Ontario, Canada. It has been formulated in (4). It is evaluated on monthly basis such that representing the individual contribution of the customer into the five coincident peaks of the whole province. This cost depends on the monthly announced charges by the Independent Electricity System Operator (IESO) [24; 25; 26]:  
\[AGAC\ =\ \sum_{m=1}^{12}PDF\cdot R_{m}{}^{GAC} \tag{4}\]  
* The cost of demand charges per year (ADCC):  
The annualized cost of demand charges is formulated in (5). Based on monthly calculation the demand charge cost is estimated accounting for the peak demand load for this month:  
\[ADCC\ =\ \sum_{m=1}^{12}\max\!\left(P_{t}{}^{T}\right)_{m}\cdot R_{m}{}^{DC} \tag{5}\]  
* Energy arbitrage revenue per year (ARV\({}_{\text{EA}}\)):  
This energy arbitrage revenue is counting for the profit gained from the fluctuation of the energy price from hour to hour, where the battery can charge during the low-price hours and discharging during the high-price hours. This revenue is calculated on annual basis as shown in (6):  
\[ARV_{EA}=\ \sum_{t=1}^{N_{t}}T_{t}\cdot P_{t}{}^{B+}\!\cdot\!Rsp_{t} \tag{6}\]* Demand response revenue per year (ARVDR):  
The demand response revenue is formulated in (7). This revenue is gained based on two bases as shown in (7). First, the annual demand response contract. Second, the hourly demand response revenue which is calculated based on the corresponding energy price market. The formulation assumes participation in the winter demand response program of the IESO. During summer, the BESS is anticipated to operate mainly for GA peak shaving which more lucrative and comes at a higher priority.  
\[ARV_{DR}=\ \sum_{t=1}^{N_{t}}KDR\cdot\overline{PB}\ +\ T_{t}\cdot P_{t}^{DR}\cdot Rsp_{t} \tag{7}\]