A Comparative Study between Traditional Backup Generator Systems and Renewable Energy Based Microgrids for Power Resilience Enhancement of a Local Clinic

Extreme weather events lead to electrical network failures, damages, and long-lasting blackouts. Therefore, enhancement of the resiliency of electrical systems during emergency situations is essential. By using the concept of standby redundancy, this paper proposes two different energy systems for increasing load resiliency during a random blackout. The main contribution of this paper is the techno-economic and environmental comparison of two different resilient energy systems. The first energy system utilizes a typical traditional generator (TG) as a standby component for providing electricity during the blackouts and the second energy system is a grid-connected microgrid consisting of photovoltaic (PV) and battery energy storage (BES) as a standby component. Sensitivity analyses are conducted to investigate the survivability of both energy systems during the blackouts. The objective function minimizes total net present cost (NPC) and cost of energy (COE) by considering the defined constraints of the system for increasing the resiliency. Simulations are performed by HOMER, and results show that for having almost the same resilience enhancement in both systems, the second system, which is a grid-connected microgrid, indicates lower NPC and COE compared to the first system. More comparison details are shown in this paper to highlight the effectiveness and weakness of each resilient energy system.


Introduction
Nowadays, extreme weather events which are originated from global climate changes, are widely studied and considered for their damaging effects on electrical networks and systems. As a matter of fact, weather-based power outages often have destructive impacts such as massive damages on transmission and distribution facilities. Thus, this results in the unavailability of power system components depending on the extent of the event. Weather-related events such as floods and storms have globally been increased in recent years. Several natural disasters occur each year in different places in the world such as African countries. These events threaten the critical infrastructures of each country [1]. For the past 40 years, there have been ten major events which seven of them have been occurred ten years ago [2]. In a particular case, severe flooding across Iran (mid-March to April 2019) caused damages in critical infrastructures during the disaster and significantly led to blackouts in different areas [3,4]. According to [5], destructive events based on the number of disconnected customers, the frequency and duration of the events are divided into five categories, namely, extreme, major, serious, moderate, and small impact events. In fact, a considerable percentage of the blackouts were recently caused by severe weather events [6]. From climate change expectations, the frequency and period of extreme weather will continuously rise in future [7,8]. Therefore, it is essential to increase the availability of electricity resources during outages to provide adequate power in emergencies.
There are major differences between resiliency and reliability in literature [2]. One of the definitions for resiliency, which used in recent studies, is the capability of systems to sustain high impact on low probability and extraordinary events, due to rapidly recover, and extreme weather from such destructive events and learn to adapt its structure and operation to mitigate or prevent the impact of similar events in the future [9][10][11].
Recently, traditional generators (TGs) are playing a significant role to provide energy, when an outage occurs, and they can be combined with energy storage systems to improve the power quality and reliability of the system. Although TGs have low initial cost in comparison with the renewable energy systems because they are inactive in most of the year. However, their reliabilities are lower than other modern technologies under normal condition [12]. Aforementioned extreme weather events have a beyond cost effect; for example, patients could be at risk in a clinic during the electricity outages. As a result, renewable energy resources receive individual attention to energy resiliency. Some reasons for utilizing renewable energy sources (RESs) for resilience enhancements are as follows [13]: (a) Climate changes increase the requiring of new regulations for future infrastructure. (b) In recent years, photovoltaic (PV) costs have been reduced and the efficiency of modules is enhanced [14]. (c) In [15], the authors presented islanded microgrid (MG) to supply critical loads, whereby the resiliency of the system improved. By using a TG, the availability of electricity modifies depending on the electricity outage duration. For instance, for a critical load such as an airport or a hospital, availability of electricity would typically be 100% during the first twenty-four hours of a power outage (assuming a sufficient amount of fuel is available). For renewable energy-based hybrid systems, the availability of hospital or airport electricity, as mentioned before, due to the power outages of longer duration, will be higher. The reason for this improvement is the capability of RESs to satisfy the electricity requirements of loads that were previously exclusively powered by TGs. There are many other benefits of using DERs energy-based, and battery energy storage (BES) in MGs include resilience enhancement of the system, energy quality improvement, peak power shaving, and availability of electricity in emergencies [16]. Battery energy storages (BESs) and traditional generators both can play the role of back-up energy sources in energy systems. Moreover, during electricity disruptions, both BES and TG can be considered as available energy sources for consumers [17,18]. TGs are fossil fuel-based energy resources which are usually utilized by conventional energy consumers. Furthermore, TGs are conventional backup energy resources while BESs are assumed as the new back-up source of energy during electricity disruption. BESs are mostly embedded in RES-based MGs, and consequently, are independent of fossil fuels [19]. Due to the development of BESs, more applications of them have been suggested in recent studies as back-up energy resources [17], and it has been expected to study more on BESs in resilient energy systems in the future. For this reason, this paper compares two different back-up energy sources in different aspects-techno-economic and environmental.
In literature, many studies provide a feasible MG solution to different areas of usage [20]. In addition, other studies discuss theoretical implications of resiliency in power systems [21] while the current paper focuses on the demand-side power resiliency enhancement rather than increasing the resiliency of the power grid. Reference [22] introduces a resiliency-based technique by using MGs to restore critical facilities on distribution feeders after a significant disaster. The proposed method is applied to the Washington State University campus, as a case study, to restore the hospital and city hall electricity during the blackout. In [23], the authors studied the optimal BES and backup generator sizing problem which considered the stochastic event occurrence duration on the grid-tied MG under off-grid operation. Authors in [17] utilized a methodology to quantify the resilience PV/BES benefits. In addition, a case study was performed, and results showed that the MG cost of energy (COE) was decreased for a grid-connected mode. In addition, by adding PV/BES to the MG, blackout survivability was extended. Research presented in [24] analyses a method for evaluating the feasibility of using MGs in three specific resiliency configurations: as a local resource, as a community resource, and as a black start resource. The ability of use MGs in these configurations has been evaluated against the impact of dynamic system frequency, in-rush, and the generated reactive power.
There have been a few types of research that are focused on the economic evaluation of resilient electrical systems. In addition, the concept of comparing modern and traditional energy systems for achieving the same resilience targets has not been approached in previous studies [15,21,23]. In contrast to [21], this paper tries to enhance the resiliency of demand-side loads rather than grid or feeder loads.
The main contributions of the research are as follows: 1. In this paper, two different systems have been designed for resiliency enhancement of a critical load during a blackout by considering the economic, technical and environmental aspects of each system. The two designed systems are: • System (I): TG, grid, electrical load • System (II): PV, BES, grid, electrical load 2.
Sensitivity analyses were carried out to indicate the effectiveness of using standby components (TG and BES) on the capacity shortages and unmet electrical loads in a random blackout.
To the best of the author's knowledge, there is no such combined techno-economic and environmental study as described in this paper to analyze and compare resilient energy systems.
Standby components in each case have improved the resiliency of the system. In addition, comparison between both systems will show that for having an identical power resiliency, system (II) is more economical than the system (I).
The rest of the paper is instructed as follows: Section 2 describes the standby redundancy concept and its application in this paper. In addition, economic and resiliency assessments are discussed. Section 3 provides data input for the system analyzing. Section 4 introduces electrical equipment and basic equations used in the optimization algorithm. Section 5 presents the case studies and discuses on simulation results, and the conclusion of this paper is explained in Section 6.

Standby Redundancy
The general concept of standby redundancy demonstrates that in some systems, one or more components may not be continuously operating while they remain in the system. The standby components will operate only during the unavailability of normal operating components [25].
During the blackout, distributed resources were usually used for compensating electricity. Some of these resources were utilized as standby components. Figure 1 shows a typical standby system where the active component is operating normally and the standby component is not connected and is waiting for a failure in order to connect the load. As automatic switch senses the power loss, electrical loads were connected to standby components. After the restoration of the grid, standby components turned back to their previous stages and waited for the next failure [26]. In this study, two main electrical equipment were assumed as standby components which were TG and BES coupled with PV. The utilized TG remained standby during regular operation of the system (I), which meant that the grid provided sufficient power for feeding loads. Within seconds of a blackout, the load was transferred to TG through a switch and then was supplied by TG by priority consideration of critical loads. In system (II), BES was considered as a standby component, and it stored surplus energy produced by PV and discharged during the grid failure or any other failure in the system in which the load was being unmet. Both TG and BES remained on standby during regular operation of the system. The capacity of BES for storing electricity was limited. Therefore, it was connected to a power generator source (PV) in order to supply the required electricity by critical loads.

Resilience Assessment
In this paper, the term survivability was used for measuring the resiliency of the system. Survivability was also introduced as the probability of having electricity continuously available during a power outage until it was re-established within t units of time after the interruption of the power grid supply had taken place [28]. For a critical facility such as a clinic, the survivability would typically be 100% for 24 hours of a blackout. By applying backup systems, the survivability of the clinic due to power cuts of longer duration would be higher due to their ability to satisfy the electricity requirements of the loads. In order to estimate the electrical resiliency enhancement, two cases were utilized based on RESs and TGs; the survivability was calculated by considering the performance of PV-BES and TG during a blackout. The grid was typically assumed to be 100% reliable; therefore, it could supply efficient electricity at any time [29]. However, in resilience investigations, by injecting a random series of failures, the ability of the system was evaluated for sustaining interruptions [29]. In an ideal situation, when the load was connected to the grid, and absence of power outages, HOMER (Distributed Generation and Distributed Energy Resources) software calculated the unmet electrical load and capacity shortage to zero. However, in the non-ideal state that power outage occurred, depending on the amount of load profile the values of the unmet electrical load and capacity shortage was higher than zero if generators could not supply the demanded electricity [30]. In this paper, two different systems (I) and (II) were used to minimize the values of the unmet electrical load and capacity shortage and to increase the survivability of load during the blackout.
Under the occurrence of blackouts, simulations were performed to analyze system resiliency. A blackout could have resulted from natural disasters such as floods, earthquakes, hurricanes, etc. In this study, a random blackout with mean outage frequency of one per year and mean repair time of 48 hours was assumed, which demonstrated the duration of the blackout. Both systems (I) and (II) were simulated under the same blackout duration ( Figure 2). Unavailability of the grid during the blackout would result in unmet electrical load and capacity shortage. Therefore, backup power In this study, two main electrical equipment were assumed as standby components which were TG and BES coupled with PV. The utilized TG remained standby during regular operation of the system (I), which meant that the grid provided sufficient power for feeding loads. Within seconds of a blackout, the load was transferred to TG through a switch and then was supplied by TG by priority consideration of critical loads. In system (II), BES was considered as a standby component, and it stored surplus energy produced by PV and discharged during the grid failure or any other failure in the system in which the load was being unmet. Both TG and BES remained on standby during regular operation of the system. The capacity of BES for storing electricity was limited. Therefore, it was connected to a power generator source (PV) in order to supply the required electricity by critical loads.

Resilience Assessment
In this paper, the term survivability was used for measuring the resiliency of the system. Survivability was also introduced as the probability of having electricity continuously available during a power outage until it was re-established within t units of time after the interruption of the power grid supply had taken place [28]. For a critical facility such as a clinic, the survivability would typically be 100% for 24 h of a blackout. By applying backup systems, the survivability of the clinic due to power cuts of longer duration would be higher due to their ability to satisfy the electricity requirements of the loads. In order to estimate the electrical resiliency enhancement, two cases were utilized based on RESs and TGs; the survivability was calculated by considering the performance of PV-BES and TG during a blackout. The grid was typically assumed to be 100% reliable; therefore, it could supply efficient electricity at any time [29]. However, in resilience investigations, by injecting a random series of failures, the ability of the system was evaluated for sustaining interruptions [29]. In an ideal situation, when the load was connected to the grid, and absence of power outages, HOMER (Distributed Generation and Distributed Energy Resources) software calculated the unmet electrical load and capacity shortage to zero. However, in the non-ideal state that power outage occurred, depending on the amount of load profile the values of the unmet electrical load and capacity shortage was higher than zero if generators could not supply the demanded electricity [30]. In this paper, two different systems (I) and (II) were used to minimize the values of the unmet electrical load and capacity shortage and to increase the survivability of load during the blackout.
Under the occurrence of blackouts, simulations were performed to analyze system resiliency. A blackout could have resulted from natural disasters such as floods, earthquakes, hurricanes, etc. In this study, a random blackout with mean outage frequency of one per year and mean repair time of 48 h was assumed, which demonstrated the duration of the blackout. Both systems (I) and (II) were simulated under the same blackout duration ( Figure 2). Unavailability of the grid during the blackout would result in unmet electrical load and capacity shortage. Therefore, backup power systems were designed to compensate for unmet electrical loads and capacity shortages. TG in the system (I) and PV-BES in the system (II) were utilized as backup power systems in this paper. systems were designed to compensate for unmet electrical loads and capacity shortages. TG in the system (I) and PV-BES in the system (II) were utilized as backup power systems in this paper.

Economic Assessment
HOMER energy software from NREL is utilized in the system simulations. The implemented algorithm in the HOMER used a non-derivative optimization to recognize the lowest-cost system among hundreds of design options. HOMER implemented multiple optimizations under a range of input presumption to evaluate the effects of uncertainty or changes in the model inputs. Optimization specified the optimal solutions of the variables over which the system designer had control namely the combination of components that constructs the system and the size or quantity of each [31]. Simulating using HOMER software had several merits. For instance, HOMER provided comprehensive results for evaluations and analyses. Moreover, it was possible to run a different combination of real-world components and technologies with a quite high simulation speed [32]. The main purposes of this paper are to investigate and evaluate the resiliency of suggested systems based on a techno-economic view by HOMER. The software is able to analyze the resiliency and reliability of any system that is connected to the grid. The economic comparison between system (I) and system (II) needs several parameters such as initial cost, operation cost, and maintenance cost. The software provided the most favorable technology to be used, its size, as well as the optimal dispatching approach considering a minimum net present cost (NPC). Total NPC indicated the present value of all costs, including capital costs, replacement costs, operation and maintenance (O&M) costs, fuel costs, emissions penalties, and the costs of purchasing power from the grid minus the present value of the achieved revenues. The revenues were salvage value and grid sales. The following equations were used to calculate total NPC by considering total annualized cost, discount rate, and project lifetime [33]: Another tool for analyzing economic parameters of different systems is the cost of energy (COE). The COE is calculated via total annualized cost, and various types of load served [34].

Economic Assessment
HOMER energy software from NREL is utilized in the system simulations. The implemented algorithm in the HOMER used a non-derivative optimization to recognize the lowest-cost system among hundreds of design options. HOMER implemented multiple optimizations under a range of input presumption to evaluate the effects of uncertainty or changes in the model inputs. Optimization specified the optimal solutions of the variables over which the system designer had control namely the combination of components that constructs the system and the size or quantity of each [31]. Simulating using HOMER software had several merits. For instance, HOMER provided comprehensive results for evaluations and analyses. Moreover, it was possible to run a different combination of real-world components and technologies with a quite high simulation speed [32]. The main purposes of this paper are to investigate and evaluate the resiliency of suggested systems based on a techno-economic view by HOMER. The software is able to analyze the resiliency and reliability of any system that is connected to the grid. The economic comparison between system (I) and system (II) needs several parameters such as initial cost, operation cost, and maintenance cost. The software provided the most favorable technology to be used, its size, as well as the optimal dispatching approach considering a minimum net present cost (NPC). Total NPC indicated the present value of all costs, including capital costs, replacement costs, operation and maintenance (O&M) costs, fuel costs, emissions penalties, and the costs of purchasing power from the grid minus the present value of the achieved revenues. The revenues were salvage value and grid sales. The following equations were used to calculate total NPC by considering total annualized cost, discount rate, and project lifetime [33]: Another tool for analyzing economic parameters of different systems is the cost of energy (COE). The COE is calculated via total annualized cost, and various types of load served [34].
According to assumptions, all components were installed and utilized from the first evaluated year. The project lifetime was considered as 25 years, which was used in Equation (2) for calculating capital recovery factor (CRF(i, N)). In addition, for electricity costs and system fixed O&M costs, an increased rate of 10%/year was considered for multi-year simulations. In May 2018, according to [35], Iran's discount and inflation rates were about 18% and 9.7% respectively, which were used in simulations. In addition, gasoline fuel cost were assumed to be $0.29/L [36].

Inputs
Inputs of the model are given as follows.

Electrical Load
As a case study, a small local clinic located in Tehran was chosen to evaluate systems (I) and (II). Load data was collected for one year from the site. Figure 3 shows the yearly load profile. The critical equipment considered included the lighting system, heating and cooling system, X-ray apparatus, and respiration equipment. Maximizing the survivability of critical equipment was one of the major the proposals of this study.
According to assumptions, all components were installed and utilized from the first evaluated year. The project lifetime was considered as 25 years, which was used in Equation (2) for calculating capital recovery factor ( ( , ) CRF i N ). In addition, for electricity costs and system fixed O&M costs, an increased rate of 10%/year was considered for multi-year simulations. In May 2018, according to [35], Iran's discount and inflation rates were about 18% and 9.7% respectively, which were used in simulations. In addition, gasoline fuel cost were assumed to be $0.29/Liter [36].

Inputs
Inputs of the model are given as follows.

Electrical Load
As a case study, a small local clinic located in Tehran was chosen to evaluate systems (I) and (II). Load data was collected for one year from the site. Figure 3 shows the yearly load profile. The critical equipment considered included the lighting system, heating and cooling system, x-ray apparatus, and respiration equipment. Maximizing the survivability of critical equipment was one of the major the proposals of this study.

Solar Radiation
Global average solar radiation (kW/m 2 ) data are shown in Figure 4, which are given from a site that is located in Tehran. The data were collected by NASA (National Aeronautics and Space Administration) surface methodology and are available online in [37]. The pattern illustrated in Figure 4 shows peak values of solar radiation from May to September while the lowest solar radiation is from November to January. In addition, June and July have maximum annual solar radiation with a value of 1.1 kW/m 2 .

Solar Radiation
Global average solar radiation (kW/m 2 ) data are shown in Figure 4, which are given from a site that is located in Tehran. The data were collected by NASA (National Aeronautics and Space Administration) surface methodology and are available online in [37]. The pattern illustrated in Figure 4 shows peak values of solar radiation from May to September while the lowest solar radiation is from November to January. In addition, June and July have maximum annual solar radiation with a value of 1.1 kW/m 2 .

Electricity Tariff
Tariffs vary based on customer types in Iran, e.g., agricultural, commercial, and residential buildings are containing different price rates. In this paper, the local clinic was considered a residential consumer. Table 1 demonstrates part of the electricity tariff utilized in residential sectors in Iran. Single-tariff metering devices were replaced with triple-rate time-of-use (TOU) devices which measured three different power rates: peak hours with the highest price rates due to high power demand, and off-peak demand where the demand as well as the price, was less, and night hours where the demand and price were at their lowest rates. These triple-rate TOU devices reported three separate energy consumption values corresponding to each of the three power pricing rates [38]. The guaranteed electricity purchase tariff for solar PV with a capacity of 10 megawatts is 4900 IRRs/kWh ($0.12/kWh) [40].

External Power Grid
It is assumed that the national power grid had an unlimited amount of power, although it suffered from the blackout during random durations [41]. It was supposed that the utility had no capital nor operation and cost of management, and that the only related expenditures were the energy flows from the grid [42]. Grid emission was also considered in this study. The values of carbon dioxide, sulfur dioxide, and nitrogen oxides were considered as 632 g/kWh, 2.74 g/kWh, 1.34 g/kWh, respectively [43,44].

PV
The output power of PV, which was introduced in the following equations, were affected by environmental conditions such as irradiation and temperature [45]:

Electricity Tariff
Tariffs vary based on customer types in Iran, e.g., agricultural, commercial, and residential buildings are containing different price rates. In this paper, the local clinic was considered a residential consumer. Table 1 demonstrates part of the electricity tariff utilized in residential sectors in Iran. Single-tariff metering devices were replaced with triple-rate time-of-use (TOU) devices which measured three different power rates: peak hours with the highest price rates due to high power demand, and off-peak demand where the demand as well as the price, was less, and night hours where the demand and price were at their lowest rates. These triple-rate TOU devices reported three separate energy consumption values corresponding to each of the three power pricing rates [38]. The guaranteed electricity purchase tariff for solar PV with a capacity of 10 megawatts is 4900 IRRs/kWh ($0.12/kWh) [40].

External Power Grid
It is assumed that the national power grid had an unlimited amount of power, although it suffered from the blackout during random durations [41]. It was supposed that the utility had no capital nor operation and cost of management, and that the only related expenditures were the energy flows from the grid [42]. Grid emission was also considered in this study. The values of carbon dioxide, sulfur dioxide, and nitrogen oxides were considered as 632 g/kWh, 2.74 g/kWh, 1.34 g/kWh, respectively [43,44].

PV
The output power of PV, which was introduced in the following equations, were affected by environmental conditions such as irradiation and temperature [45]: The supplied energy by the solar PV system was [46,47]: In this study, 250W HTSOLAR Solar panels were used for simulation. The technical specifications of used solar PVs are presented in Table 2. The installation, replacement, and maintenance costs for a 1 kW solar PV system were considered as $350/kW, $350/kW, and $10 per year, respectively [48].

BES
Generally, BES was used to store the surplus generated electricity than the load requirements and provide the load with the stored electricity for times when electricity was not sufficient. The battery state of the charge (SOC) after a specific period of time (∆t) in the charging and discharging process (SOC (t + ∆t)) is defined in (7) and (8), respectively. It is evident from these equations that the SOC equation includes two main parts: (1) SOC at the previous period and (2) the generation and consumption power at ∆t.
These two equations were used only when the SOC of BES was within the allowable limits as demonstrated in (9) [46].
Maximum and minimum limits that the battery can store were SOC max and SOC min , respectively. The SOC of BES should be between these two limits. The utilized control system stopped the charging process when the SOC of the battery reached SOC max and also stopped discharging when the SOC reached SOC min .
The lithium battery was utilized as a storage device. The technical data for the battery is given in Table 3. The cost of each battery was considered to be $124, whereas replacement and operation and maintenance costs were taken to be $124 and $10/yr, respectively [49].

Converter
By using a converter, energy flow between AC and DC, buses became available. In this study, an ETN10K converter was used for simulations. The value of efficiency was about 95% in both directions from AC to DC or from DC to AC. Technical data for the converter is shown in Table 4: Capital cost, replacement cost and operation and maintenance (O&M) cost for converter was estimated as $137.50/kW, $137.50/kW, and $10/yr, respectively [33].

TG
In this analysis, a TG has been used to operate gasoline fuel. Generally, gasoline generators are quieter than diesel generators, and for a place such as a clinic, silence is an important criterion [50]. TGs are mainly used for the off-grid generation, and TGs will operate if the grid is unavailable [51].
Technical specifications of this TG are listed in Table 5. The initial capital cost of the TG was taken to be $500/kW. The replacement and operational costs were assumed to be $500/kW and $0.030/h, respectively [52]. Emission produced by TG was also considered in this study. The values of carbon monoxide, unburned hydrocarbons, particulate matter, proportion of fuel sulfur converted to particulate matter and nitrogen oxides were considered to be 16.34 g/L of fuel, 0.72 g/L of fuel, 0.098 g/L of fuel, 2.2 g/L of fuel, and 15.359 g/L of fuel, respectively.

Case Studies and Discussion
Case studies and the discussion are presented in this section.

Grid-Connected Load without Backout Power System
To assess the values of capacity shortages and unmet electrical load, the current basic system was designed. Here, the load was connected directly to the grid network, and there were no backup power systems ( Figure 5). The grid was available all the time and provided required electricity by the load, while a random blackout made the grid network unavailable. A blackout started at 4:00 am and lasted for 48 hours (between 6079 and 6127 hours). Since no backup system was assigned, the load was unmet during the blackout. A sensitivity analyses show in Figure 6, unmet electrical load, as well as capacity shortage, were increasing as the blackout continued and for each of them, the total values were 41.2 kWh/yr and 45.3 kWh/yr, respectively.
In this system total, NPC was $1955, and because the system did not include additional equipment, the initial cost was $0. Other economic and electrical results are presented in Table 6. Results of the under-study system were criteria for evaluation of further systems (I) and (II) that will be introduced later.   The grid was available all the time and provided required electricity by the load, while a random blackout made the grid network unavailable. A blackout started at 4:00 a.m. and lasted for 48 h (between 6079 and 6127 h). Since no backup system was assigned, the load was unmet during the blackout. A sensitivity analyses show in Figure 6, unmet electrical load, as well as capacity shortage, were increasing as the blackout continued and for each of them, the total values were 41.2 kWh/yr and 45.3 kWh/yr, respectively. The grid was available all the time and provided required electricity by the load, while a random blackout made the grid network unavailable. A blackout started at 4:00 am and lasted for 48 hours (between 6079 and 6127 hours). Since no backup system was assigned, the load was unmet during the blackout. A sensitivity analyses show in Figure 6, unmet electrical load, as well as capacity shortage, were increasing as the blackout continued and for each of them, the total values were 41.2 kWh/yr and 45.3 kWh/yr, respectively.
In this system total, NPC was $1955, and because the system did not include additional equipment, the initial cost was $0. Other economic and electrical results are presented in Table 6. Results of the under-study system were criteria for evaluation of further systems (I) and (II) that will be introduced later.  . Survivability diagram for grid-connected load with no backup power system. Figure 6. Survivability diagram for grid-connected load with no backup power system.
In this system total, NPC was $1955, and because the system did not include additional equipment, the initial cost was $0. Other economic and electrical results are presented in Table 6. Results of the under-study system were criteria for evaluation of further systems (I) and (II) that will be introduced later.

System (I)
In this system, standby TG was connected to the load as a backup source for emergencies. A simple schematic for system configuration is shown in Figure 7. The same random blackout was used in the current case (between hours 6079 and 6127). As mentioned before, it was assumed that the grid was capable of providing an unlimited amount of electricity at normal conditions. However, by the occurrence of a blackout, the grid was unavailable. The TG sensed the outage through the switch and compensated for the capacity shortage and unmet electrical load (Figure 8).

System (I)
In this system, standby TG was connected to the load as a backup source for emergencies. A simple schematic for system configuration is shown in Figure 7. The same random blackout was used in the current case (between hours 6079 and 6127). As mentioned before, it was assumed that the grid was capable of providing an unlimited amount of electricity at normal conditions. However, by the occurrence of a blackout, the grid was unavailable. The TG sensed the outage through the switch and compensated for the capacity shortage and unmet electrical load (Figure 8).  Therefore, the load survived during the blackout, and the output power of the generator over a year is shown in Figure 9a. As expected, TG was switched off in most hours of the year, and it was turned on as the failure occurred. Figure 9b demonstrates the output power of TG during the blackout. Alternative output power was because of load consumption, which differed from one hour to another. Figure 10 shows the average monthly electric production at which the grid provided all electricity of the system except the hours of blackout. The priority of electricity compensation was by critical loads located at the clinic. Economic and electrical parameters for the system (I) are shown in Table 7 .

System (I)
In this system, standby TG was connected to the load as a backup source for emergencies. A simple schematic for system configuration is shown in Figure 7. The same random blackout was used in the current case (between hours 6079 and 6127). As mentioned before, it was assumed that the grid was capable of providing an unlimited amount of electricity at normal conditions. However, by the occurrence of a blackout, the grid was unavailable. The TG sensed the outage through the switch and compensated for the capacity shortage and unmet electrical load (Figure 8).  Therefore, the load survived during the blackout, and the output power of the generator over a year is shown in Figure 9a. As expected, TG was switched off in most hours of the year, and it was turned on as the failure occurred. Figure 9b demonstrates the output power of TG during the blackout. Alternative output power was because of load consumption, which differed from one hour to another. Figure 10 shows the average monthly electric production at which the grid provided all electricity of the system except the hours of blackout. The priority of electricity compensation was by critical loads located at the clinic. Economic and electrical parameters for the system (I) are shown in Table 7 . Therefore, the load survived during the blackout, and the output power of the generator over a year is shown in Figure 9a. As expected, TG was switched off in most hours of the year, and it was turned on as the failure occurred. Figure 9b demonstrates the output power of TG during the blackout. Alternative output power was because of load consumption, which differed from one hour to another. Figure 10 shows the average monthly electric production at which the grid provided all electricity of the system except the hours of blackout. The priority of electricity compensation was by critical loads located at the clinic. Economic and electrical parameters for the system (I) are shown in Table 7.

System (II)
In this system, the suggested MG includes a PV, BES, grid, and load. A simple schematic for the configuration of the system is presented in Figure 11. Unlike system (I) where TG had no interactions with grid, in the system (II) solar PV is involved with the grid by electricity sales (Figure 12).

System (II)
In this system, the suggested MG includes a PV, BES, grid, and load. A simple schematic for the configuration of the system is presented in Figure 11. Unlike system (I) where TG had no interactions with grid, in the system (II) solar PV is involved with the grid by electricity sales (Figure 12).

Load AC DC
Converter BES PV Figure 11. Schematic of the deigned network for the system (II). According to simulation results, PV generated 15,708 kW/yr power and also provided most of the required power by the load during the day, as shown in Figure 13. However, the grid provided power when the energy from PV was not available ( Figure 14). As mentioned in section 2, BES was assumed as a standby component, which meant that it was inactive during regular operation, but

System (II)
In this system, the suggested MG includes a PV, BES, grid, and load. A simple schematic for the configuration of the system is presented in Figure 11. Unlike system (I) where TG had no interactions with grid, in the system (II) solar PV is involved with the grid by electricity sales (Figure 12).

Load AC DC
Converter BES PV Figure 11. Schematic of the deigned network for the system (II). According to simulation results, PV generated 15,708 kW/yr power and also provided most of the required power by the load during the day, as shown in Figure 13. However, the grid provided power when the energy from PV was not available ( Figure 14). As mentioned in section 2, BES was assumed as a standby component, which meant that it was inactive during regular operation, but According to simulation results, PV generated 15,708 kW/yr power and also provided most of the required power by the load during the day, as shown in Figure 13. However, the grid provided power when the energy from PV was not available ( Figure 14). As mentioned in Section 2, BES was assumed as a standby component, which meant that it was inactive during regular operation, but was active during a failure condition. Therefore, BES was inactive in most hours of the year (Figure 15). was active during a failure condition. Therefore, BES was inactive in most hours of the year ( Figure  15).    was active during a failure condition. Therefore, BES was inactive in most hours of the year ( Figure  15).    was active during a failure condition. Therefore, BES was inactive in most hours of the year ( Figure  15).   During the blackout, PV and BES ran in autonomous mode and supplied the load for minimizing capacity shortage and unmet electrical load. The system (I) blackout started at 4:00 am and lasted for 48 hours (between hours 6079 and 6127). The charging and discharging pattern during the blackout During the blackout, PV and BES ran in autonomous mode and supplied the load for minimizing capacity shortage and unmet electrical load. The system (I) blackout started at 4:00 a.m. and lasted for 48 h (between hours 6079 and 6127). The charging and discharging pattern during the blackout is depicted in Figure 16b. It was evident that in some hours (mainly peak hours) the SOC of BES is in its minimum value (27.71%), due to high load consumption. Results of the sensitivity analyses show that all critical loads survived in this system, and no capacity shortage was seen ( Figure 15). Economic and electrical parameters for the system (II) are shown in Table 8. Other results of BES are shown in Table 9. is depicted in Figure 16b. It was evident that in some hours (mainly peak hours) the SOC of BES is in its minimum value (27.71%), due to high load consumption. Results of the sensitivity analyses show that all critical loads survived in this system, and no capacity shortage was seen ( Figure 15). Economic and electrical parameters for the system (II) are shown in Table 8. Other results of BES are shown in Table 9.    The main objective of all simulations is to enhance the resiliency by providing higher survivability of critical loads during a blackout. For this reason, different optimized systems were proposed in systems (I) and (II). As mentioned before, using TGs is ordinary in electrical resiliency studies; however, in recent years, RES-based MGs are considered as an excellent tool for increasing the resiliency of a power system. A comparison has been made between a traditional and a modern system for analyzing resiliency and economy over a long period of time. According to Figures 8 and 15, results of the sensitivity analyses for both systems (I) and (II) showed enhancement in power resiliency through the survivability of critical loads. The reason for this increment is that both systems were included as standby components which were active in the blackout period. As a result of optimal design, the resiliency enhancement of both systems (I) and (II) almost was the same in this study. However, economic results for both systems (I) and (II) were different. The total NPC for electricity supply over the lifetime of the system (I) was estimated at $3240. It had an annual operating cost of $166.03/yr, and a COE of $0.396/kWh (Table 8), while for the system (II) total NPC, operation cost, and COE were $−678.75, $−724.90, and $−0.00324, respectively (Table 1). Although the initial cost was higher ($7355) in the system (II), the negative NPC determined that revenues (mostly from electricity selling to the grid) were higher than costs. In addition, the levelized COE of the system (II) was predicted to be −0.013 USD/kWh (the negative sign suggests that producing electricity out of solar PV conversion system creates money). As mentioned before, by dividing the total annualized costs of the system by the total electric energy production, levelized cost of energy (COE) was obtained. Since the total revenue of selling power to the grid exceeded total costs, the total annualized costs of the system had a negative value, and thus a negative COE [34]. Therefore, system (II) has better economic results with almost the same resilience enhancement as the system (I).
The studied clinic in this paper contained some critical loads that must be operated during the blackout. The suggested MG in the system (II) provided adequate electricity during the blackout and also included economic benefits that were not available in the system (I). Besides, one of the primary reasons for climate change is emission produced by burning fossil fuels [53]. The system (I), which included a TG, produced emission by consuming gasoline, whereas system (II) was based on RESs and did not produce emissions as much. Simulation results indicated that total emission produced by the system (I) was 4707 kg/yr while system (II) produced 2592 kg/yr. Renewable energy systems are considered as eco-friendly resources because they do not use fossil fuels for producing energy. Using RES based MGs on a large scale will reduce emission produced by conventional energy systems, and it will have a positive effect on climate change and global warming which are the main reasons for extreme weather events.
Based on economic results mentioned in the paper, if the decision-makers of the local clinic want to benefit from both resiliency enhancement and economic advantages of the proposed modern system, firstly, they must allocate sufficient and suitable places for installing electrical components. Secondly, they must provide initial costs such as purchasing system components (PV, BES, electrical converter, control system). Thirdly, they must install equipment in determined locations. Finally, operation and maintenance costs must be provided by the owners of the clinic and sign a contract with utility for electricity sales by PV.

Conclusions
In this comparison paper, two different energy systems were analyzed in case of economic and resilience aspects during blackout situations. The aim of this paper was designing a local clinic with a minimum cost of critical loads during damaging events. Both systems benefit from standby components, which are TG in the system (I), and BES coupled with PV in the system (II). Although, resiliency enhancement of both systems are almost the same, the economic parameters and the initial costs of system (II) such as NPC and COE are more satisfying than system (I). According to simulation results, the values of NPC, COE and initial cost for the system (I) reached $3240, $1400 and $0.396/kWh, respectively. Similarly, for system (I), the values of NPC, COE and initial cost reached −678.75, −324 × 10 −5 and 7355, respectively. As an important factor in climate change, emission produced by both systems was calculated, and it was shown that RES-based systems produced less emission (2592 kg/yr) in comparison with the system included TG (4707 kg/yr). The current work has been studied in Iran, however, it is possible to perform similar research in other countries of the world by considering the different design parameters such as economic and weather conditions.

Conflicts of Interest:
The authors declare no conflicts of interest.

NPC
Total net present cost ($) C NPC,tot Total annualized cost ($/yr) COE Cost of energy ($) E prim,AC AC primary load served (kWh/yr) E prim,DC DC primary load served (kWh/yr) E de f Deferrable load served (kWh/yr) E grid,sales Total grid sales (kWh/yr) P PV (t) PV production (kW/h) G t (t) Total solar radiation (W/m 2 ) T c (t) PV cell temperature ( • C) T a (t) Ambient temperature ( • C) E PV (t) Supplied energy by solar PV system (kWh) SOC(t) State of charge battery (%) P L (t)