## 4 Materials and Methods
### Storage Control Strategies and Sizing
#### 4.4.1 Single-Rate Tariff: Greedy  
The greedy control algorithm is a standard operation strategy in self-consumption scenarios. It works by determining the residual load (i.e., the difference between production and consumption) and actuating the battery accordingly, i.e. storing excess production until the upper SOC limit is reached or supplying the excess demand from the battery until the lower SOC is reached.  
For this algorithm, the maximum inverter size for each UPAC was selected based on the PV installation size. The maximum battery capacity was selected based on the smallest value between the daily average power demand from the grid (P\({}_{\text{G\_L}}\)) and grid injection from the PV (P\({}_{\text{PV\_G}}\)). The maximum battery capacity is given in the number of modules and is calculated using Equation (2), rounded to the next integer value. MNC refers to the nominal capacity of the battery modules, in this case 2.4 kWh.  
\[modules=ceil(\frac{min(P_{\text{G\_L}},P_{PV\_G})}{\text{MNC}\times\frac{\text{ SOC}_{max}-\text{SOC}_{min}}{100}}) \tag{2}\]  
Note that this formulation ensures that be battery capacity (after discarding the SOC limits) is never higher than the daily average energy needs, nor higher than the average daily amount of solar PV injected in the grid.  
The different storage options considered for each UPAC under this control strategy are listed in Table 6. The maximum values for the inverter size and battery capacity are underlined.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**ID**} & **PPC** & **PV** & **Daily** & **Average (kWh)** & \multicolumn{3}{c}{**Feasible Options**} \\  & **(kVA)** & **(kWp)** & **P\({}_{\text{G\_L}}\)** & **P\({}_{\text{PV\_G}}\)** & **Inverter** & **Battery** & **Combos** \\ \hline A & 6.9 & 0.5 & 4.84 & 0.66 & [1] & [2.4] & A1 \\ B & 6.9 & 0.75 & 4.58 & 1.34 & [1] & [2.4] & A1 \\ C & 6.9 & 1.5 & 12.37 & 1.64 & [1] & [2.4] & A1 \\ \hline D & 10.35 & 2.7 & 6.88 & 6.77 & [1, 2.4] & [2.4, 9.6] & A1-A4, B2-B4 \\ E & 6.9 & 3.0 & 6.61 & 4.08 & [1, 2.4] & [2.4, 7.2] & A1-A3 B1-B3 \\ F & 6.9 & 4.5 & 5.98 & 13.71 & [2.4, 4] & [4.8, 9.6] & B2-B4, C4 \\ \hline \hline \end{tabular}
\end{table}
Table 6: BESS configurations considered for each UPAC in the greedy control strategy.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Combo**} & \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Inverter/Charger**} & \multicolumn{3}{c}{**Battery**} & \multirow{2}{*}{**Total**} \\  & & **Power** & **Price** & **Modules** & **Energy** & **Price** & **(G)** & **(G)** \\ \hline A1 & & & & & 1 & 2.4 & 752.07 & 1499.07 \\ A2 & & & & 2 & 4.8 & 1504.14 & 2251.14 \\ A3 & & & & 3 & 7.2 & 2256.21 & 3003.21 \\ A4 & & & & 4 & 9.6 & 3008.28 & 3755.28 \\ \hline B2 & & & & 2 & 4.8 & 1504.14 & 2682.14 \\ B3 & & & & 3 & 7.2 & 2256.21 & 3434.21 \\ B4 & & & & 4 & 9.6 & 3008.28 & 4186.28 \\ B5 & & & & 5 & 12.0 & 3760.35 & 4938.35 \\ \hline C4 & & & & 1791.00 & 4 & 9.6 & 3008.28 & 4799.28 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Inverter/battery combinations considered in this work.