## 4 Materials and Methods
### Storage Control Strategies and Sizing
#### 4.4.2 2-TOU Tariff: Greedy with Pre-Charge Heuristic  
This control algorithm uses the Greedy strategy during peak hours, i.e., from 9 AM to 11 PM. During the off-peak hours, 11 PM to 9 AM, the battery is charged to a pre-calculated SOC and is not allowed to discharge until the peak period starts.  
The amount of pre-charge depends on the battery's capacity and on the electricity demand during the peak periods. It is calculated using Equation (3), rounded to the next multiple of 5. P\({}_{\text{G\_L}}\)(PH) is the average consumption from the grid during the peak hours (PH), and BNC is the nominal battery capacity in kWh.  
\[SoC_{PC}=\text{min}(\frac{P_{G\_L}(PH)-P_{PV\_G}}{BNC}+SOC_{min},SOC_{max}) \tag{3}\]  
The maximum battery capacity was selected based on the daily average grid consumption during the peak-hours. The number of battery modules is given by Equation (4), rounded to the next integer.  
\[modules=ceil(\frac{P_{G\_L}(PP)}{\text{MNC}\times\frac{SOC_{max}-SOC_{min}}{100}}) \tag{4}\]  
Finally, the feasible inverters were selected based on the maximum number of modules and the amount of time required to achieve the percent pre-charge, considering that the batteries are pre-charged at half of the inverter power, which provides the maximum efficiency.  
The different storage options considered for this control strategy are listed in Table 7. The maximum values for the inverter size and battery capacity are underlined.  
Table 8 shows the percent of pre-charge (%PC) and the time required to reach that value in hours (T), for each of the considered BESS combinations. Note that, since the SOC\({}_{\text{min}}\) is set to 10%, UPACs 6, 9 and 12 cannot pre-charge. Thus, this control strategy behaves similarly to the Greedy, with the difference of using the 2-ToU Tariff.  
To summarize this section, Table 9 lists the different parameters of the simulations and the respective values used in this work.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**ID**} & **PPC** & **PV** & \multicolumn{3}{c}{**Daily Average (kWh)**} & \multicolumn{3}{c}{**Feasible Options**} \\  & **(kVA)** & **(kWp)** & **P\({}_{\text{G\_L}}\)** & **P\({}_{\text{G\_L}}\)** & **(PP)** & **P\({}_{\text{PV\_G}}\)** & **Inverter** & **Battery** & **Combos** \\ \hline A & 6.9 & 0.5 & 4.84 & 3.35 & 0.66 & [1, 2.4] & [2.2, 4.4] & A1-A2, B2 \\ B & 6.9 & 0.75 & 4.58 & 2.57 & 1.34 & [1, 2.4] & [2.2, 4.4] & A1-A2, B2 \\ C & 6.9 & 1.5 & 12.37 & 7.79 & 1.64 & [1, 2.4] & [2.2, 11] & A1-A2, B2-B5 \\ D & 10.35 & 2.7 & 6.88 & 4.02 & 6.77 & [1, 2.4] & [2.2, 6.6] & A1-A3, B2-B3 \\ E & 6.9 & 3.0 & 6.61 & 3.47 & 4.08 & [1, 2.4] & [2.2, 4.4] & A1-A2, B2 \\ F & 6.9 & 4.5 & 5.98 & 3.13 & 13.71 & [1, 2.4] & [2.2, 4.4] & A1-A2, B2 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Installation inverter/battery considered for 2 ToU (Greedy + Pre-Charge) Algorithm.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**ID**} & \multicolumn{2}{c}{**A1**} & \multicolumn{2}{c}{**A2**} & \multicolumn{2}{c}{**A3**} & \multicolumn{2}{c}{**B2**} & \multicolumn{2}{c}{**B3**} & \multicolumn{2}{c}{**B4**} & \multicolumn{2}{c}{**B5**} \\  & **PC** & **T** & **PC** & **T** & **PC** & **T** & **PC** & **T** & **PC** & **T** & **PC** & **T** & **PC** & **T** \\ \hline A & 90 & 3.5 & 70 & 5.3 & - & - & 70 & 2.2 & - & - & - & - & - & - \\ B & 65 & 2.2 & 40 & 2.6 & - & - & 40 & 1.1 & - & - & - & - & - & - \\ C & 90 & 3.5 & 90 & 7 & - & - & 90 & 2.9 & 90 & 4.4 & 80 & 5.1 & 65 & 5 \\ D & 10 & NA & 10 & NA & 10 & NA & 10 & NA & 10 & NA & - & - & - & - \\ E & 10 & NA & 10 & NA & - & - & 10 & NA & - & - & - & - & - \\ F & 10 & NA & 10 & NA & - & - & 10 & NA & - & - & - & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 8: Pre-charge percent and time required to charge in each of the inverter/battery combinations per UPAC.