## 2 Remarks on the Topology of Microgrid
### Cost Framework in Microgrid Energy Planning  
Defining the cost function is crucial in microgrid energy planning as it guides the objectives influencing the microgrid's sizing and energy management. Researchers commonly employ indicators such as the levelized cost of energy (LCOE) and the levelized carbon emission (LCE), which provide insight into the cost per unit of energy generated and the  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Sector** & **Applications** & **Benefits** \\ \hline Rural & Electrification of remote areas. & Reduces dependence on fossil fuels, improves quality of life. \\ Industrial & Efficient energy management, integration of DER. & Reduces operational costs, increases energy efficiency. \\ Military & Energy independence, security. & Reliable operation in critical situations, risk reduction. \\ \hline \hline \end{tabular}
\end{table}
Table 2: Applications of microgrids in some sectors.  
environmental impact per unit of energy generated. These objectives are typically tailored to each case [41]. From a general perspective, it is often more practical to calculate the annualized cost of a microgrid \(C_{annual}\) during the planning phase [11]. This section focuses on that approach, with (1) detailing \(C_{annual}\).  
\[C_{annual}=CRF\cdot C_{total} \tag{1}\]  
Here, \(CRF\) is a capital recovery factor, and \(C_{total}\) is the total cost over the project lifetime. \(CRF\) is a financial metric used to determine the annual capital cost from the project lifetime cost [42]. \(CRF\) and \(C_{total}\) are outlined in (2) and (3), respectively.  
\[CRF=\frac{d\cdot(1+d)^{Q}}{(1+d)^{Q}-1} \tag{2}\]  
\[C_{total}=C_{inv}+C_{O\&M}+C_{rep}+C_{EG}-C_{sv}+C_{special} \tag{3}\]  
Here, \(d\) is the annual rate of return, and \(Q\) is the project's lifetime. \(C_{inv}\), \(C_{O\&M}\), \(C_{rep}\), \(C_{EG}\), and \(C_{sv}\) are the investment, maintenance, replacement, grid, and salvage value costs, respectively, which are calculated in (3)-(7). \(C_{special}\) encompasses special costs such as component degradation, transport in difficult-to-access areas, and other specific factors depending on the case under study.  
\[C_{inv}=\sum_{k=1}^{K}C_{inv}^{k}\cdot N^{k}+C_{dep} \tag{4}\]  
\[C_{O\&M}=\sum_{k=1}^{K}C_{O\&M}^{k}\cdot N^{k}\cdot\sum_{q=1}^{Q}\biggl{(} \frac{1+\varepsilon}{1+d}\biggr{)}^{q} \tag{5}\]  
\[C_{rep}=\sum_{k=1}^{K}C_{rep}^{k}\cdot N^{k}\cdot\sum_{r=1}^{NOR}\left(\frac{ 1+\varepsilon}{1+d}\right)^{r} \tag{6}\]  
\[C_{EG}=\left(C_{sub}-\Delta t\cdot\sum_{t_{0}}^{t_{f}}\left(p_{EG}^{s}(t) \cdot\lambda^{s}(t)+p_{EG}^{in}(t)\cdot\lambda^{in}\right)\right)\cdot\sum_{q =1}^{Q}\biggl{(}\frac{1+\varepsilon}{1+d}\biggr{)}^{q} \tag{7}\]  
Here, \(N^{k}\) is the total number of the \(k\)-th microgrid component, and \(k\) is the index representing the \(k\)-th microgrid component. \(C_{inv}^{k}\) and \(C_{dep}\) are the \(k\)-th component investment and the deployment cost, respectively. The microgrid deployment cost includes installing the microgrid components such as wiring, concrete, steel, wood, and electrical connections, along with labor and indirect costs associated with the microgrid installation. \(C_{O\&M}^{k}\) is the operation and maintenance cos for the \(k\)-th component; \(\varepsilon\) is the escalation rate; and \(C_{rep}^{k}\) is the replacement cost. \(NOR\) is the number of \(r\)-th component replacements over the project lifetime, and \(q\) and \(r\) are the year and replacement indices, respectively. \(\lambda^{s}\) and \(\lambda^{in}\) are the grid tariffs for power supply when buying from the grid and injection selling to the grid, respectively. Finally, \(C_{sub}\) represents a fixed subscription cost for the power grid, a fixed annual fee imposed by electrical energy provider companies [42]. The salvage cost \(C_{sv}\) is considered a cost in favor of the installed capacity of renewable energy. It is generally determined as a percentage of the acquisition cost [41].