## 3 Mathematical Modeling and Design Methodology
### Uncertainty Analysis  
Uncertainty analysis measures the robustness of the system when one or more of the input data are varying. This includes different parameters, such as temperature, diode ideality factors, series, and leakage loss resistances. In this subsection, the uncertainty of the aforementioned parameters was tested for the TD realistic model as shown in Tables 7 and 8. This is to present the impact of increasing or decreasing these parameters on RES. In Section 4.1, it was concluded that the solutions of both PSO and WOA are close to each other. Therefore, uncertainty assessment will be performed using PSO as a case validation. Table 7 shows that the diode ideality factor has a major impact on the design of the RES. When \(\alpha\) for diode 2 is equal to 1.8, the PV panel percentage difference will be 4.63%. Moreover, the series loss influences the RES more than the \(\mathrm{R_{sh}}\) as shown in Table 8. This is because the second diode current, affected by the \(\mathrm{R_{s}}\) as shown in Equation (4), will make the loss much larger if this resistance becomes larger. Furthermore, when the temperature increases, the PV energy will slightly decrease and vice versa. Moreover, Table 9 shows the percentage change of the TD model at \(\alpha_{2}=1.5\) and \(\alpha_{2}=1.8\) from the other two models. As can be seen, this slight change in \(\alpha\), due to recombination losses, has a large impact on the system sizing. The \(\mathrm{N_{PV}}\) and PV energy difference between the TD model at \(\alpha_{2}=1.8\) and the ISD model are 20.36% and 7.65%. Additionally, the GHG emissions will increase by 9.19%, when \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Energy \& Emissions** & \multicolumn{2}{c}{**TD**} & \multicolumn{2}{c}{**SD**} & \multicolumn{2}{c}{**ISD**} \\ \hline  & **PSO** & **WOA** & **PSO** & **WOA** & **PSO** & **WOA** \\ \hline \(\mathrm{E_{renewable}}\) (GWh) & 33.41979 & 33.43471 & 32.72878 & 31.78129 & 31.30045 & 31.44661 \\ \(\mathrm{E_{brown}}\) (GWh) & 8.87292 & 8.811006 & 9.02589 & 9.33188 & 9.51146 & 9.45935 \\ ER (Gg/year) & 21.51982 & 21.52942 & 21.07486 & 20.4648 & 20.15512 & 20.24923 \\ \(\mathrm{GHG_{emissions}}\) (Gg/year) & 6.68792 & 6.641253 & 6.80322 & 7.03387 & 7.16922 & 7.129937 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Detailed energy and emission results corresponding to the optimal value of IR. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Uncertainty of \(\alpha\)** & **Uncertainty of \(\mathit{Ta}\)** \\ \hline  & \(\alpha_{2}=1.5\) & \(\alpha_{2}=1.8\) & **Ta (+10\%)** & **Ta (\(-\)10\%)** \\ \hline IR & \(-0.05\) & \(-0.07\) & \(0.04\) & \(0.03\) \\ \(\mathrm{N_{PV}}\) & 2.7 & \(4.63\) & \(-3.08\) & \(0.77\) \\ \(\mathrm{V_{LR}}\) & 0.04 & \(0.04\) & \(0.04\) & \(0.04\) \\ EENS & \(-1.13\) & \(-1.23\) & \(2.63\) & \(1.0\) \\ LOLP & \(-1.07\) & \(-1.16\) & \(2.27\) & \(1.16\) \\ LPSP & \(-3.33\) & \(-4.72\) & \(2.43\) & \(1.94\) \\ \(\mathrm{E_{PVg}}\) & 1.02 & \(1.31\) & \(-1.81\) & \(0.58\) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Percentage difference in % from the TD model for \(\alpha\), Ta. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Uncertainty of \(\mathit{R_{s}}\)** & **Uncertainty of \(\mathit{R_{sh}}\)** \\ \hline  & \(\mathit{R_{s}}\) **(+10\%)** & \(\mathit{R_{s}}\) **(\(-\)10\%)** & \(\mathit{R_{sh}}\) **(+10\%)** & \(\mathit{R_{sh}}\) **(\(-\)10\%)** \\ \hline IR & \(-0.03\) & \(0.03\) & \(0.03\) \\ \(\mathrm{N_{PV}}\) & 0.79 & \(-1.21\) & \(-1.16\) & \(0.77\) \\ \(\mathrm{V_{LR}}\) & 0.04 & \(0.04\) & \(0.04\) & \(0.04\) \\ EENS & 0.57 & \(0.58\) & \(1.09\) & \(-0.45\) \\ LOLP & 0.71 & \(0.7\) & \(1.3\) & \(-0.42\) \\ \(\mathrm{LPSP}\) & \(1.94\) & \(2.22\) & \(1.94\) & \(1.94\) \\ \(\mathrm{E_{PVg}}\) & \(-0.16\) & \(-0.23\) & \(-0.86\) & \(0.41\) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Percentage difference in % from the TD model for \(\mathit{R_{sh}}\), \(\mathit{R_{s}}\). using the ISD solar PV model.