## 4 Discussion  
This study set out to identify and analyze HES configurations capable of enhancing reliability and economic feasibility in a rural community with existing grid constraints. Technical and economic outcomes were evaluated by integrating PV, a BG fueled by livestock waste, and BES alongside the main grid. A special focus was on leveraging \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Quantity**} & \multicolumn{2}{c}{**Base System**} & \multicolumn{2}{c}{**Proposed System**} & \multicolumn{1}{c}{**Decrease**} \\ \cline{2-4}  & & **kg/yr** & **\%** \\ \hline Carbon Dioxide & 350,237 & 243,127 & 30.6 \\ Carbon Monoxide & 4.47 & 4.45 & 0.4 \\ Sulfur Dioxide & 1497 & 1033 & 31.0 \\ Nitrogen Oxides & 735 & 508 & 30.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Annual emissions reduction in the Proposed System. Figure 16: The power distribution of the Proposed System on August 15 th in Scenario II. local resources--particularly biomass--to reduce greenhouse gas emissions, promote rural development, and strengthen energy independence. Two primary scenarios were investigated. Scenario I involved a minimal capital investment strategy featuring PV and the main grid. This configuration achieved an NPC of approximately USD 3.27 M, yielding about USD 90,000 in cost savings compared to the baseline setup. PV contributed 16% of the total energy supply, reducing operational expenses while relying on the grid for peak loads and backup. In contrast, Scenario II introduced a biogas generator fueled by livestock waste, PV, and grid connectivity. Although its overall costs rose by USD 1.66 M, the BG supplied 55.8% of the total energy demand, reducing grid dependence to 28.6%--a 55.5% drop relative to Scenario I--and cutting key emissions by roughly 30%. These results can be explained by the specific design choices and resource characteristics in each scenario. PV requires no ongoing fuel costs once installed, providing electricity at relatively stable long-term prices. Even modest PV capacity offsets grid consumption and lowers operational expenses, particularly when site-specific solar irradiance data and HOMER's optimization algorithms are used to size the system effectively. Meanwhile, the BG utilizes locally available livestock waste, offering a steady fuel source that does not depend on seasonal variation. BG significantly reduces emissions and improves resilience by displacing a portion of the grid supply--often generated by fossil fuels. Although this approach demands higher capital and infrastructure costs, it provides greater energy independence, fewer power disruptions, and better long-term sustainability. Grid connectivity remains essential to both scenarios, ensuring reliable backup during peak demand or low solar output periods. In Scenario II, the share of grid-supplied electricity drops to 28.6%. However, the grid still allows for surplus export--albeit limited by modest extra generation and low incentives--and prevents supply shortfalls should the BG or PV fail to meet sudden spikes in demand. The balanced interplay of renewable inputs (PV and BG), supported by the grid, ensures a robust and flexible power system that adapts to seasonal variations and load fluctuations. Scenario I proves more cost-effective through solar self-consumption. In contrast, Scenario II offers improved reliability and significantly lower emissions, reflecting the inevitable trade-off between economic feasibility and energy security. Compared to the existing literature, LCOE ranging from 0.18 to 0.28 USD/kWh aligns with reported values for PV-grid hybrids in rural areas. Studies on biomass-based microgrids confirm similar trends of improved dispatchability, reduced reliance on external energy markets, and notable emissions cuts [49; 50]. The roughly 30% decline in carbon dioxide, sulfur dioxide, and nitrogen oxides aligns with research [51] showing a 25-40% drop when bioenergy displaces conventional fuel sources.