## 4 Results and Analysis
### Solution of the Stochastic Planning Problem
#### 4.2.2 Example of Results for the Stochastic Planning Model (Case 1)  
Before presenting results for hundreds of microgrids, Table 8 shows, as an example, the solutions for four microgrids of sizes 1, 10, 20 and 100 residential households, brought as an example to show the configuration alternative that optimally selects the stochastic optimization tool developed. For the determination of these microgrids, a single optimization exercise was carried out.  
In the stochastic planning problem, the solutions found in relation to the size and type of assets for each microgrid guarantee the protection of users for all established fault scenarios, determining the same capacity and assets type (i.e., the investment decision is the same). This can be seen in Figure 12, where the operation graphs, for two days (during and after fault, i.e., 48 h) of a household's microgrid, are presented for the three stochastic fault scenarios described in Table 7.  
In all three scenarios, the microgrid sells energy to the power grid, but in some cases, power injection is limited because the optimization algorithm decides to charge the batteries in anticipation of the upcoming fault hours. In particular, for Scenarios 2 and 3 with faults that occur during the day (11 h and 16 h, respectively), the optimization decides to charge the batteries and supply the demand during the fault mostly with solar energy (Scenario 2), or with the combination of panels and batteries, as happens in stochastic scenario 3. It is possible to evidence that the batteries continue to be used after the fault hours, with an SOC that optimally varies between 20% and 90% of the storage system capacity.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Scenario** & \begin{tabular}{c} **Fault Energy** \\ **Demand [kWh]** \\ \end{tabular} & \
\begin{tabular}{c} **Annual Fault Start** \\ **Time (Daily Hour)** \\ \end{tabular} &
\begin{tabular}{c} **Probability of** \\ **Energy Loss** \\ \end{tabular} \\ \hline
**1** & 1.06 & 526 h (22 h) & 66\% \\
**2** & 2.36 & 2651 h (11 h) & 28\% \\
**3** & 4.25 & 232 h (16 h) & 6\% \\ \hline \hline \end{tabular}
\end{table}
Table 7: Detail of the identified scenarios for the stochastic planning problem of a residential client.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Clients by Microgrid** & **1** & **10** & **20** & **100** \\ \hline Panel power [kW] & 2.17 & 18.8 & 34.9 & 158.3 \\ Panel power per household [kW] & 2.17 & 1.88 & 1.75 & 1.58 \\ Inverter technology & Hybrid & Hybrid & Hybrid & Hybrid \\ Battery capacity per household [kWh] & 5.69 & 2.24 & 2.43 & 1.61 \\ Investment cost per client (with EoS) [USD/year] & 302.8 & 197.0 & 187.8 & 162.0 \\ Cost function per household (with EoS) [USD/year] & 235.3 & 170.1 & 163.3 & 156.5 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Results for microgrids of 1, 10, 20 and 100 residential clients (Case 1).  
Now, if the decision were to solve the planning problem in a deterministic and independent way for each residential client scenario in Table 7, the results are presented in Table 9.  
It is observed that scenario three presents a solution similar in size and type of assets to the solution obtained with the stochastic planning approach (microgrid of one-client). Therefore, as a hypothesis, it is possible to think that the solution of the stochastic planning problem with reliability requirements is similar to the deterministic solution that is solved for the worst scenario; this will be explored in Section 4.2.3.  
Figure 12: Operation graphs of a household’s microgrid, for three stochastic 8 h fault scenarios (Case 1).