Community Resilience-Oriented Optimal Micro-Grid Capacity Expansion Planning: The Case of Totarabank Eco-Village, New Zealand

<jats:p>In the grid-tied micro-grid context, energy resilience can be defined as the time period that a local energy system can supply the critical loads during an unplanned upstream grid outage. While the role of renewable-based micro-grids in enhancing communities’ energy resilience is well-appreciated, the academic literature on the techno-economic optimisation of community-scale micro-grids lacks a quantitative decision support analysis concerning the inclusion of a minimum resilience constraint in the optimisation process. Utilising a specifically-developed, time-based resilience capacity characterisation method to quantify the sustainability of micro-grids in the face of different levels of extended grid power outages, this paper facilitates stakeholder decision-making on the trade-off between the whole-life cost of a community micro-grid system and its degree of resilience. Furthermore, this paper focuses on energy infrastructure expansion planning, aiming to analyse the importance of micro-grid reinforcement to meet new sources of electricity demand—particularly, transport electrification—in addition to the business-as-usual demand growth. Using quantitative case study evidence from the Totarabank Subdivision in New Zealand, the paper concludes that at the current feed-in-tariff rate (NZ$0.08/kWh), the life cycle profitability of resilience-oriented community micro-grid capacity reinforcement is guaranteed within a New Zealand context, though constrained by capital requirements.</jats:p>

section_content: The past two decades have witnessed a remarkable evolution of micro-grids (MGs) from a nascent concept to a pivotal player in the transition to 100% renewable energy [1] [2] [3]. The power industry has accordingly seen an ever-increasing penetration of distributed energy resources into utility grids. The key drivers behind the stakeholders' willingness towards additional, often non-trivial, capital investments for resilience capacity are [4] [5] [6] : (1) the constantly falling costs of renewable energy technologies, which are transforming the economics of green energy, most notably solar photovoltaic (PV) panels and battery energy storage systems (BESSs), (2) the growing awareness about the inadequacy of current approaches to energy resilience at community-scale, specifically the use of diesel generators to provide backup power during utility grid outages, and (3) the growth of engaged prosumers, who place great value on their energy self-sufficiency for sustainable living. 

In the context of on-grid MGs, energy resilience is generally defined as "the amount of time that an MG can sustain critical loads during a grid outage", and often serves as a synonym for outage survivability [7]. A recent, growing strand of the literature has documented and emphasised the increasingly important role of planning for resilience within the context of grid-tied MGs, which, in turn, improves the resilience of a nation's entire power grid. For instance, Eskandarpour et al. [8] have formulated a mixed-integer linear programming problem for the optimal sizing and siting of MGs within power systems by considering the cost of unserved energy during utility grid outages as the objective function, while adhering to a limited budget for resilience improvements. In another instance, Barnes et al. [9] have revealed the potentially significant benefits of including energy resilience constraints in the long-term investment planning problem of networked MGs in terms of the prolonged outage survivability and overall cost-efficiency. Furthermore, Anderson et al. [7] have shown the economic and resilience benefits delivered by renewable energy technologies in a hybrid MG. More specifically, they have demonstrated that adding a 845-kW PV system together with a 172-kWh BESS to an existing 305 kW of backup diesel generators extends the time period the MG can sustain crucial loads by 1. 8 days, while generating savings of US$104,000 in energy costs over the reinforced MG life-cycle. Table 1 provides an overview of recent studies centred on the optimal capacity expansion planning of grid-tied renewable energy systems. Moreover, Table 2 presents a summary of the previous studies that focused on the long-term, integrated resource and resilience planning in the context of renewable and sustainable energy systems (in addition to the studies reviewed above). The reader is referred to [10] for a more detailed review of the methods and research trends in the MG resilience improvement literature. 

As Tables 1 and 2 indicate, no previous study, as far as can be ascertained, has introduced a systematic method to quantify the cost of insuring grid-tied renewable energy systems against sustained grid outages in the optimal equipment capacity expansion planning processes-to meet some desired minimum level of resilience. Accordingly, this paper bridges the gap between these two streams of literature by proposing a modelling framework to estimate the additional costs incurred to procure energy resilience in the optimal capacity expansion planning processes of grid-connected community MGs. The paper additionally presents a sensitivity analysis to highlight the impact of varying minimum degrees of energy resilience required by stakeholders on the optimal life-cycle costs associated with the capacity reinforcement of grid-connected MGs. 

The remainder of this paper is organised as follows. Section 2 describes the overall structure of the test-case, the fundamental assumptions underlying the study, and data requirements for the case study. Section 3 provides the modelling approach, while Section 4 presents the results and examines the robustness of optimal MG capacity configurations. Finally, conclusions are made and potential areas for future work are discussed in Section 5. 

Table 1. Summary of the recent previous work dealing with the cost-optimal capacity expansion planning of renewable energy systems.
section_name: Introduction

section_content: Technologies Considered in the Candidate Pool Optimisation Approach Key Contribution(s) Key Insight(s) from Case Study Analyses [11] Solar photovoltaic (PV), wind turbine, fuel cell, diesel generator, heat storage, and battery

Mixed-integer linear programming solved using the General Algebraic Modeling System (GAMS)

• Using interval linear programming to characterise the uncertainty associated with long-term weather projections.
section_name: Ref.

section_content: Taking a multi-period planning approach to improve the precision of decision-making in the allocation of renewable energy resources.
section_name: •

section_content: The technology diversity degree decreases, as the acceptable level of robustness against weather forecast uncertainties increases.
section_name: •

section_content: At present, fuel cells are not cost-competitive with mature battery technologies. 

[12] Solar PV, wind turbine, diesel generator, and battery
section_name: •

section_content: • Considering multiple conflicting objectives, namely the minimisation of life-cycle costs, greenhouse gas emissions, and the non-renewable fraction of power generation capacity.
section_name: Scenario-based stochastic optimisation

section_content: The total net present cost of capacity additions would have been underestimated by about 23% if the model-inherent uncertainties (forecasts of load demand and climatic variables) were not modelled. [13] Wind turbine, bi-directional electric vehicle charging infrastructure Semi-dynamic, semi-static programming
section_name: •

section_content: Formulating the utility generation expansion planning problem to determine the optimal additional capacity of wind generation and the optimal penetration of electric vehicles that maximise the utility's profits in the long run. 

• Integration of vehicle-to-grid technology can play a significant role in improving the economic viability of renewable energy capacity expansion decisions. Solar PV, wind turbine, diesel generator, battery, and utility line Mixed-integer nonlinear programming solved using meta-heuristic optimisation algorithms

• Simultaneous optimisation of long-term investment costs and short-term operating costs. 

• Co-optimisation of investment planning and energy scheduling problems reduces the total life-cycle costs by about 10%.
section_name: •

section_content: Increasing the capacity of the line connecting the micro-grid (MG) to the upstream grid results in lower costs of handling the uncertainties in load and weather forecasts. 

[15] Solar PV and wind turbine Multi-agent systems

• Bi-layer, agent-based simulation of the capacity expansion planning problem to aid MG operators in decision-making among a range of candidate investment plans to maximise their profits. The inner (operational) layer simulates the renewable energy market behaviour, the outputs of which are fed into the outer (planning) layer, which evaluates the profitability of each investment scenario.
section_name: •

section_content: Characterising the competitive behaviour of MG operators within an existing utility's territory makes the numeric simulation results more accurate and representative of real-world practice. Mixed-integer linear programming solved using GAMS
section_name: •

section_content: Treating the uncertainty associated with the occurrence of extreme weather events using information gap decision theory.
section_name: •

section_content: Proposing a resilience planning model for active distribution grids to produce optimal trade-offs between the added capacity of backup distributed generation and hardened utility lines within certain budget constraints.
section_name: •

section_content: Information gap decision theory is an effective approach for supporting decision-making in the planning of distribution electricity networks for resilience.
section_name: •

section_content: The best-compromise solution between additional distribution generation allocation and distribution line hardening highly relies on the acceptable degree of conservativeness for the resilience of the system. 

[17] Hydro, wind, solar, geothermal, nuclear, coal, natural gas, and oil Multi-objective optimisation of the national-level, energy infrastructure capacity expansion problem
section_name: •

section_content: Assessing the resilience of the U. S. national energy and transportation systems to a set of extreme events.
section_name: •

section_content: Considering cost, sustainability, and resilience as three independent objectives.
section_name: •

section_content: Proposing a resilience measure to quantify the ability of the energy and transportation systems to recover from the consequences of a large-catastrophic event. 

• Investment and operating costs, sustainability degree, and resilience level are competing objectives, which cannot be improved at the same time, when jointly planning national energy and transportation systems. 

[18] Electric power system and natural gas system Two-stage robust optimisation

• Proposing an integrated expansion planning framework for electricity and natural gas systems, which aims at improving power grid resilience against extreme events. 

• Joint investment planning of electricity and natural gas networks provides the opportunity to significantly reduce the cost of resilience as compared to the case where resilience requirements are met alone through additional power grid resources. 

[19] Solar PV, battery, and combined heat and power HOMER software
section_name: •

section_content: Characterising the desired resilience preferences of a site based on the battery bank's duration of autonomy. Specifically, battery banks were sized to serve the peak load demand for 4 h in cases of a grid outage.
section_name: •

section_content: The expected costs for the additional battery bank to meet the resilience requirements scale with the size of the project (that can be measured by the mean load demand).
section_name: •

section_content: Achieving resilience requirements using additional battery arrays incurs sizable capital, replacement, and operation and maintenance costs. 

[20] Unspecified distributed generation technologies Two-stage robust optimisation

• Proposing an optimal distributed generation placement model that minimises the total load shedding in extreme events, whilst additionally characterising the uncertainty coupled with the time of occurrence and duration of natural disasters.
section_name: •

section_content: Increasing the penetration of distributed generation resources within distribution networks significantly improves the cost-efficiency of procuring resilience provisions. 

[21] Solar PV, wind turbine, diesel generator, and battery Two-stage robust optimisation
section_name: •

section_content: The computational time increases exponentially with the maximum number of simultaneous contingencies considered. 

[22] Battery and diesel generator Mixed-integer linear programming solved using GAMS
section_name: •

section_content: Developing a framework to optimise the type and size of backup power equipment for critical services in islanded operation modes of grid-tied MGs.
section_name: •

section_content: Measuring the end-consumer preferences for resilience to grid outages using the average critical customer interruption index.
section_name: •

section_content: Quantification of the stochasticity associated with extreme weather events in terms of occurrence time and duration.
section_name: •

section_content: Capturing the stochasticity of extreme weather events could reduce the cost of MG capacity reinforcement-through dedicated additional backup power capacity-to meet the resilience requirements by up to about 12%, as compared with deterministic models. 

1 N-k contingency criterion guarantees that N critical components within a power network can continue normal operation in cases any k components simultaneously suffer a failure. 

Energies 2020, 13, 3970 8 of 29
section_name: •

section_content: The Totarabank Subdivision consists of eight freehold residential lots (ranging in size from 1200 m 2 to 2100 m 2 ) and a communal building (on the ninth, common lot) with a large area of around 6 ha held in common ownership [23]. Located in central Wairarapa, New Zealand (GPS coordinates: 41 • 1 4" S 175 • 40 0" E), the subdivision adheres to sustainability design criteria to suggest ways for resilience integration. Figure 1 shows the geographical location and description of the case study subdivision Totarabank. As of May 2020, Totarabank has 14 inhabitants, and an existing installed grid-integrated power generation capacity of 11. 4 kW, 100% from solar PV modules, which have an average remaining life span of 19. 25 years. Accordingly, the load power demand is met through electricity importing from the main grid at night when the onsite PV system is not delivering, while any surplus electricity is sold back to the grid during the day. However, the primary issue of the current power dispatching strategy is its failure to serve the crucial loads at night if the upstream network fails or requires maintenance. This, together with the anticipated growth in demand (led by the electrification of transport), reveals the necessity for the reinforcement of the current energy system-to improve the site's energy resilience, self-sufficiency, and security of supply.
section_name: Test-Case System: Totarabank, New Zealand

section_content: The considered site is richly endowed with renewable energy resources, particularly solar and wind. The candidate technologies included in the model for optimisation are (1) PV modules, (2) wind turbines (WTs), and (3) a BESS. Furthermore, an unreported preliminary techno-economic study suggested that a BESS is the most cost-effective technology for onsite energy storage among feasible options for Totarabank, namely hydrogen storage system (electrolyser, hydrogen reservoir, and fuel cell), batteries, flywheels, and super-capacitors. More specifically, a Li-ion battery system was chosen, as it offers the best combination of energy density, low self-discharge, and manufacturing cost, compared with other mature battery technologies [24]. Accordingly, the selected components were assembled in an AC-coupled configuration to form the grid-connected MG shown in Figure 2. As of May 2020, Totarabank has 14 inhabitants, and an existing installed grid-integrated power generation capacity of 11. 4 kW, 100% from solar PV modules, which have an average remaining life span of 19. 25 years. Accordingly, the load power demand is met through electricity importing from the main grid at night when the onsite PV system is not delivering, while any surplus electricity is sold back to the grid during the day. However, the primary issue of the current power dispatching strategy is its failure to serve the crucial loads at night if the upstream network fails or requires maintenance. This, together with the anticipated growth in demand (led by the electrification of transport), reveals the necessity for the reinforcement of the current energy system-to improve the site's energy resilience, self-sufficiency, and security of supply.
section_name: Candidate Technologies

section_content: The considered site is richly endowed with renewable energy resources, particularly solar and wind. The candidate technologies included in the model for optimisation are (1) PV modules, (2) wind turbines (WTs), and (3) a BESS. Furthermore, an unreported preliminary techno-economic study suggested that a BESS is the most cost-effective technology for onsite energy storage among feasible options for Totarabank, namely hydrogen storage system (electrolyser, hydrogen reservoir, and fuel cell), batteries, flywheels, and super-capacitors. More specifically, a Li-ion battery system was chosen, as it offers the best combination of energy density, low self-discharge, and manufacturing cost, compared with other mature battery technologies [24]. Accordingly, the selected components were assembled in an AC-coupled configuration to form the grid-connected MG shown in Figure 2.
section_name: Candidate Technologies

section_content: The power output from each PV module in time is obtained from Equation (1) as a function of solar irradiance and the module's temperature, which is estimated from Equation (2) [25]. 

where,, ,,, and denote the module's rated power, efficiency, derating factor, temperature coefficient, and nominal operating cell temperature, respectively; is the global horizontal irradiance in time ;, and represent the solar irradiance and temperature at the standard test conditions, respectively; and is the ambient temperature.
section_name: PV Modules

section_content: The power output from each WT is obtained from the manufacturer-provided power curve, shown in Figure 3 [26]. Additionally, the wind speed data is hub height normalised using the powerlaw, which is expressed in Equation (3) [27]. 

where represents wind speed measured at the height of ℎ in time, and is the wind shear exponent.
section_name: Wind Turbines

section_content: The power output from each PV module in time t is obtained from Equation (1) as a function of solar irradiance and the module's temperature, which is estimated from Equation (2) [25]. 

where P PV,r, η PV, f PV, k p, and NOCT denote the module's rated power, efficiency, derating factor, temperature coefficient, and nominal operating cell temperature, respectively; G t T is the global horizontal irradiance in time t; G T,STC and T STC represent the solar irradiance and temperature at the standard test conditions, respectively; and T t a is the ambient temperature.
section_name: PV Modules

section_content: The power output from each WT is obtained from the manufacturer-provided power curve, shown in Figure 3 [26]. Additionally, the wind speed data is hub height normalised using the power-law, which is expressed in Equation (3) [27].
section_name: Wind Turbines

section_content: The power output from each WT is obtained from the manufacturer-provided power curve, shown in Figure 3 [26]. Additionally, the wind speed data is hub height normalised using the powerlaw, which is expressed in Equation (3) [27]. 

where represents wind speed measured at the height of ℎ in time, and is the wind shear exponent. V

Energies 2020, 13, 3970 10 of 29

where V re f represents wind speed measured at the height of h re f in time t, and γ is the wind shear exponent.
section_name: Wind Turbines

section_content: The energy content of the battery bank, comprising of battery packs connected in parallel, in time t can be calculated from Equation (4) [28]. 

where ∆t denotes the operating time increment and P t B is the charging/discharging power of the battery bank in time t that can be calculated based on the system-wide supply-demand balance constraint from Equation (5) [29]. 

where P t WT is the power output from WTs in time t, P t g is the exchanged power with the utility grid, a positive (negative) value of which represents an imported (exported) power, and P t L is the total residential load power demand. A positive value of P t B represents the charging state, whereas negative values signify the discharging state. 

Moreover, the energy stored in each battery pack is constrained to lie within the feasible range of values, [E B,min, E B,max ].
section_name: Battery Arrays

section_content: A grid-interactive inverter (also called multi-mode battery inverter/charger, or bidirectional dual-mode hybrid inverter) is used in an AC-coupled configuration, which is capable of managing inputs from multiple sources in both on-and off-grid operating modes. The hybrid inverter is modelled by its overall efficiency.
section_name: Hybrid Inverter

section_content: The cost of importing/exporting electricity from/to the utility grid in time t is obtained from Equation (6) [30]. 

where π t ex is the wholesale power price in time t and FiT represents a fixed feed-in-tariff.
section_name: Utility Grid

section_content: AC level 2 charging, which is the most common home charging solution, is considered in this project [31]. Accordingly, a level 2 electric vehicle supply equipment (EVSE) is employed, which is modelled by its efficiency. It is connected directly to the MG's hybrid inverter via a dedicated circuit and provides charging through a 240 V AC plug.
section_name: Electric Vehicle Charging Station

section_content: The following simplifying assumptions were made:
section_name: Key Assumptions

section_content: The MG capacity expansion planning was carried out from a macro (centralised) perspective. 

Accordingly, this study does not focus on how to optimally assign the equipment capacity to each lot.
section_name: •

section_content: The costs associated with the replacement and operation and maintenance (O&M) of the existing installed solar inverters were not reflected in the model. The reason lies in the fact that these assets are privately owned, while the new capacity additions were assumed to be shared by the community. That is, accounting for the replacement and O&M costs of the currently privately held solar inverters will require more sophisticated market designs (such as peer-to-peer markets) for the intra-community electricity exchanges to establish a fair playing field-which are currently cleared under a pure flat-rate tariff structure. Note that the rationale behind making this assumption stems from the difference in the service life of PV panels and solar inverters.
section_name: •

section_content: The energy stored in the stationary battery bank is not allowed to be used for electric vehicle (EV) charging purposes-allowed only for critical loads to address the resilience of the community and to improve the service life of the stationary battery bank.
section_name: •

section_content: The case study site's mobility requirements were assumed to be 40 km/day/lot, while the EVs' average efficiency was assumed to be 0. 12 kWh/km, considering a Nissan Leaf, which is New Zealand's most popular EV [32] [33] [34].
section_name: •

section_content: A cooperative energy scheduling strategy (for example the one proposed in [35] ), to be materialised in the implementation phase, was assumed to be able to coordinate the flexible charging of EVs, such that the daily periods of time the EV charging infrastructure sits unused is minimised.
section_name: •

section_content: Vehicle-to-grid (V2G) services [36], as well as the effect of load growth due to the eco-village's population growth, were not taken into consideration. Rather, the system expansion is planned to meet the expectation of growing loads from the existing number of inhabitants.
section_name: •

section_content: The product models were chosen, based on the authors' judgement of both efficiency and cost-effectiveness, from the options available in the Australia and New Zealand renewable energy markets, while costs are always cited in New Zealand currency.
section_name: •

section_content: The techno-economic specifications of the selected components and the associated sources are summarised in Table 3. 1 Photovoltaic (PV) module costs include the cost associated with the solar inverter. 2 WT costs include the cost of the required guyed tower. 3 The replacement and O&M costs were adjusted in accordance with the capital-to-replacement and capital-to-O&M cost ratios used in [44] [45] [46]. 4 The approximate average operational service life of small and micro WTs is 120,000 h. However, since they do not operate at wind speeds below cut-in, their service life is typically considered as 20 years [47]. 5 N/A: Not applicable, since the WT's performance is modelled by its characteristic power-speed curve, in the same way as in [48]. 6 The battery bank's efficiency represents its round-trip efficiency. 

Moreover, in view of the study objectives and simplifying assumptions outlined above, the costs associated with the EVSE were exogenously treated. More specifically, they were taken into account through cost premiums imposed on the optimised MG whole-life cost solutions. Specifically, the Delta AC Mini Plus EVSE, was chosen in this analysis to serve the level 2 charging. It has the following techno-economic specifications [49, 50] : capital and replacement costs = $2564/unit, O&M cost = $17/unit/year, service life = 25 years, efficiency = 99%, maximum output power = 7. 36 kW, and input rating = 230 V AC. Accordingly, the EV charging load was classified as deferrable, the monthly average value of which was assumed to be constant throughout the year, with an average value of 48 kWh/d, and a peak value of (n × 7. 36) kW, in compliance with the maximum power output from n EV chargers. 

Table 4 presents the data and sources for the parameter settings of the conceptualised MG system. Figure 4 shows the average wholesale power price for each hour across the five-year period of 2015 to 2019 [57], which were considered as forecasts of utility power price. 

Energies 2020, 13, x FOR PEER REVIEW 10 of 27

Table 4 presents the data and sources for the parameter settings of the conceptualised MG system. 1, denotes the maximum usable capacity of each module. 2 By definition,, = (1 -) ×,, where is the depth of discharge [%] [35]. 

Figure 4 shows the average wholesale power price for each hour across the five-year period of 2015 to 2019 [57], which were considered as forecasts of utility power price. S1 in Supplementary Material. 

Figure 5 depicts the forecasted residential load power demand profile. The time-series data were synthesised from the GREEN Grid household electricity demand data [58] through downscaling the GREEN Grid study's sample of dwellings to the Totarabank's household population according to the proportionate scaling method described in [59]. S1 in Supplementary Material. 

Figure 5 depicts the forecasted residential load power demand profile. The time-series data were synthesised from the GREEN Grid household electricity demand data [58] through downscaling the GREEN Grid study's sample of dwellings to the Totarabank's household population according to the proportionate scaling method described in [59]. 1, denotes the maximum usable capacity of each module. 2 By definition,, = (1 -) ×,, where is the depth of discharge [%] [35]. 

Figure 4 shows the average wholesale power price for each hour across the five-year period of 2015 to 2019 [57], which were considered as forecasts of utility power price. S1 in Supplementary Material. 

Figure 5 depicts the forecasted residential load power demand profile. The time-series data were synthesised from the GREEN Grid household electricity demand data [58] through downscaling the GREEN Grid study's sample of dwellings to the Totarabank's household population according to the proportionate scaling method described in [59]. Forecasts of wind and solar resources were determined using the NASA Surface Meteorology and Solar Energy database [52]. Accordingly, the monthly-averaged wind speed values over a 10-year historical period, and monthly-averaged insolation and air temperature values over a 22-year historical period were retrieved from the database. Monthly mean forecasts of wind speed and solar radiation are shown in Figure 6, while Figure 7 displays monthly mean temperature [52]. In general, an annual average wind speed value of 5 m/s, and an annual insolation value of 4 kWh/m 2 /d are commonly considered acceptable thresholds for the commercial viability of wind and solar projects, while seasonal variations of resources can also affect the optimal resource combination of a PV/WT renewable energy system [60]. As can be seen from Figure 6, not only is wind energy a more reliable source of power than solar in the considered area, but it also shows a more constant trend than solar energy. 

Energies 2020, 13, x FOR PEER REVIEW 11 of 27

Forecasts of wind and solar resources were determined using the NASA Surface Meteorology and Solar Energy database [52]. Accordingly, the monthly-averaged wind speed values over a 10year historical period, and monthly-averaged insolation and air temperature values over a 22-year historical period were retrieved from the database. Monthly mean forecasts of wind speed and solar radiation are shown in Figure 6, while Figure 7 displays monthly mean temperature [52]. In general, an annual average wind speed value of 5 m/s, and an annual insolation value of 4 kWh/m 2 /d are commonly considered acceptable thresholds for the commercial viability of wind and solar projects, while seasonal variations of resources can also affect the optimal resource combination of a PV/WT renewable energy system [60]. As can be seen from Figure 6, not only is wind energy a more reliable source of power than solar in the considered area, but it also shows a more constant trend than solar energy.
section_name: Data

section_content: This section presents the methodology developed for the resilience-constrained capacity expansion planning of MGs.
section_name: Methodology

section_content: The U. S. National Renewable Energy Lab's Hybrid Optimization of Multiple Energy Resources (HOMER) Pro software (version 3. 13. 8) [61] was used to minimise the project's life-cycle cost subject to techno-economic design constraints for different levels of energy resilience. The software features two algorithms to search for the cost-optimal design configuration: (1) an original grid search algorithm that simulates all of the feasible resource combinations that meet the loads, and (2) a new proprietary derivative-free optimisation algorithm, called "HOMER Optimizer", which frees the user from the need to define the search space. Additionally, the conceptualised MG's life-cycle cost reflects all of the cost components associated with supplying energy to the considered site in present value, namely, the capital, replacement, and O&M costs of new energy infrastructure, as well as the net cost of energy exchange with the utility grid. At each time-step of the MG operation, an energy dispatch Forecasts of wind and solar resources were determined using the NASA Surface Meteorology and Solar Energy database [52]. Accordingly, the monthly-averaged wind speed values over a 10year historical period, and monthly-averaged insolation and air temperature values over a 22-year historical period were retrieved from the database. Monthly mean forecasts of wind speed and solar radiation are shown in Figure 6, while Figure 7 displays monthly mean temperature [52]. In general, an annual average wind speed value of 5 m/s, and an annual insolation value of 4 kWh/m 2 /d are commonly considered acceptable thresholds for the commercial viability of wind and solar projects, while seasonal variations of resources can also affect the optimal resource combination of a PV/WT renewable energy system [60]. As can be seen from Figure 6, not only is wind energy a more reliable source of power than solar in the considered area, but it also shows a more constant trend than solar energy.
section_name: Modelling Approach

section_content: The U. S. National Renewable Energy Lab's Hybrid Optimization of Multiple Energy Resources (HOMER) Pro software (version 3. 13. 8) [61] was used to minimise the project's life-cycle cost subject to techno-economic design constraints for different levels of energy resilience. The software features two algorithms to search for the cost-optimal design configuration: (1) an original grid search algorithm that simulates all of the feasible resource combinations that meet the loads, and (2) a new proprietary derivative-free optimisation algorithm, called "HOMER Optimizer", which frees the user from the need to define the search space. Additionally, the conceptualised MG's life-cycle cost reflects all of the cost components associated with supplying energy to the considered site in present value, namely, the capital, replacement, and O&M costs of new energy infrastructure, as well as the net cost of energy exchange with the utility grid. At each time-step of the MG operation, an energy dispatch
section_name: Modelling Approach

section_content: The U. S. National Renewable Energy Lab's Hybrid Optimization of Multiple Energy Resources (HOMER) Pro software (version 3. 13. 8) [61] was used to minimise the project's life-cycle cost subject to techno-economic design constraints for different levels of energy resilience. The software features two algorithms to search for the cost-optimal design configuration: (1) an original grid search algorithm that simulates all of the feasible resource combinations that meet the loads, and (2) a new proprietary derivative-free optimisation algorithm, called "HOMER Optimizer", which frees the user from the need to define the search space. Additionally, the conceptualised MG's life-cycle cost reflects all of the cost components associated with supplying energy to the considered site in present value, namely, the capital, replacement, and O&M costs of new energy infrastructure, as well as the net cost of energy exchange with the utility grid. At each time-step of the MG operation, an energy dispatch analysis is carried out, whereby the load demand is served by the least-cost combination of dispatchable and non-dispatchable distributed energy generation units, released energy from storage devices, traded energy with the upstream grid, and load shifting. Additionally, deferrable loads are placed in second priority, and supplied using the surplus power (to the needs of primary loads) from non-dispatchable micro-generation units-solar PV and WT technologies-ahead of charging the storage devices. The energy scheduling problem is solved for each time-step of the baseline year and is repeated for the remaining years of the planning horizon, while discounting future cash flows to adjust the results for inflation. HOMER Pro is also equipped with the "Multi-Year" module, which allows for modelling the dynamic characteristics of the economic MG planning problem by running a simulation for each ensuing year of the project lifetime. However, since the HOMER Optimizer does not support multi-year planning, first, the optimal capacity configuration was determined using the HOMER Optimizer without considering the dynamic characteristics of the problem, and then the search space was defined based on the preliminary results obtained, with adequate margins, in size steps of 1 unit. Finally, the model was re-run using the HOMER's original grid search algorithm-which simulates all of the feasible equipment capacity combinations with respect to the defined design space. This enabled avoiding sub-optimal solutions, while retaining computational tractability. The conceptualised MG system was simulated under both the cycle-charging and load-following energy dispatch strategies in each simulation case, and the strategy that resulted in a lower levelised cost of energy (LCOE) was selected as the solution. 

In addition, HOMER employs specifically-developed algorithms to synthesise one-year of hourly time-series insolation, air temperature, and wind speed data from the corresponding monthly average values to reflect the characteristics of real data (of the same level of granularity) in terms of seasonal, daily, and hourly patterns. Accordingly, hourly-basis, year-round profiles for weather data were derived based on the corresponding monthly average data, shown in Figures 6 and 7.
section_name: Modelling Approach

section_content: To quantify the resilience capacity of the MG system to prolonged utility grid outages, the simulation was executed multiple times with varying values of grid reliability. Three built-in parameters in HOMER Pro were used to characterise the grid reliability, namely, (1) mean outage frequency, (2) mean repair time, and (3) repair time variability. Each random outage was injected into the model at a pseudo-random time-step throughout the year-long operational period, while the associated failure duration was determined by independent sampling from a normal distribution defined by mean repair time and repair time variability. Accordingly, the mean outage frequency was varied from 1 to 20 in steps of 1, the mean repair time was varied from 1 h to 168 h (2 weeks) in steps of 4 h, while the repair time variability was fixed at 1 h-which adds a stochastic dimension to the model. That is, 840 ((168 h/4 h) × 20 frequencies) independent outage time-series were produced for the optimisation model. Moreover, to improve the cost-efficiency of the optimal MG capacity configuration solutions, the model was designed to sustain only the critical loads during extended utility grid outages. 

In this light, the total load on the MG system was partitioned into critical and non-critical loads, and non-critical loads were turned off when the grid was off. To this end, first, the residential load duration curve was derived by sorting the hourly-basis, one-year residential load curve, as illustrated in Figure 8. Accordingly, the average value of intermediate loads was determined and set as the threshold criterion for residential load partitioning. More specifically, the residential load profile was clipped at this point to form the critical residential load profile. The amounts of residual residential demand that was left from the peak being clipped established the profile of time-stamped non-critical residential load demand, which was only active under the normal, grid-connected operation regime. Additionally, in the grid outage events, the deferrable load was limited to as much as the energy needed to fully charge one EV (Nissan Leaf, battery capacity = 30 kWh [34] )-to meet the emergency management needs at the site.
section_name: Characterisation of Energy Resilience

section_content: Table 5 lists further input data for the model parameters and their respective sources. 1 The time-based autarky ratio indicates the self-sufficiency degree of the MG and can be determined by dividing the yearly number of time-steps where no electricity is purchased from the grid (to meet the full demand) by the total number of time-steps considered for the representative year of the optimisation [66]. 

Figure 9 shows a flowchart of the research methodology to include energy resilience criteria in the long-term MG optimisation model implemented in HOMER, which is illustrated by means of the considered case study example. As Figure 9 shows, first, the HOMER model is run for each of the above-described 840 outage time-series for the test-case under investigation and the solutions are recorded. Then, the model results of the numerical case example at each simulation run are aggregated to obtain the sensitivity of the total discounted system costs, energy exchange levels with the national grid, and the optimal MG configuration to the variations of the key grid outage parameters.
section_name: Model Assumptions and Design Standards

section_content: This section presents and discusses the numerical simulation results obtained for the test-case MG laid out in Section 2 by applying the method described in Section 3.
section_name: Results and Discussion

section_content: The optimum equipment capacity configuration was determined first with the grid reliability level set at 100%. Table 6 presents the optimisation results for this baseline scenario. (It should be noted that all the simulation results are based on the manufacturer-provided equipment specifications and technical data, which represent the performance of the equipment under standard test conditions. ) The table demonstrates that a WT is a more economically viable power generation technology than solar PV for generation expansion at the considered site, as it could be expected from the historical meteorological data (see Figure 6 ). However, given the complementary daily and seasonal cycles of wind speed and insolation, the existing installed capacity of solar PV is still expanded in the cost-optimal solution, albeit by a small margin. This not only validates the viability of the existing PV generation system, but also indicates its sizeable impact on the diversification of the feasible future generation mix for the site.
section_name: Feasibility and Optimal Capacity Configuration

section_content: The optimum equipment capacity configuration was determined first with the grid reliability level set at 100%. Table 6 presents the optimisation results for this baseline scenario. (It should be noted that all the simulation results are based on the manufacturer-provided equipment specifications and technical data, which represent the performance of the equipment under standard test conditions. ) The table demonstrates that a WT is a more economically viable power generation technology than solar PV for generation expansion at the considered site, as it could be expected from the historical meteorological data (see Figure 6 ). However, given the complementary daily and seasonal cycles of wind speed and insolation, the existing installed capacity of solar PV is still expanded in the cost-optimal solution, albeit by a small margin. This not only validates the viability of the existing PV generation system, but also indicates its sizeable impact on the diversification of the feasible future generation mix for the site. 1 The optimal equipment capacity was determined as multiples of the selected components' nameplate capacities. 2 The optimal PV capacity represents the newly added capacity of the site's PV plant. 3 The electric vehicle supply equipment (EVSE) did not take part in the optimisation procedure. The optimal size of the EVSE was determined outside the model by finding the total minimum EV charging capacity that meets the peak EV charging demand of the site under cooperative EV charging conditions. The obtained total minimum capacity was then divided by the maximum charging capacity of each charger and rounded up to the nearest integer to obtain the optimal number of chargers. 4 The optimal size of the EVSE is defined based on the maximum charging capacity of each charger. 5 TNPC represents the conceptualised MG's "total net present cost". The reader is referred to [67] [68] [69] for a detailed description of the net present value method and levelised cost of energy (LCOE) calculations. 

The total net present cost (TNPC) of the system is broken down into the main cost components in Figure 10. Three key observations emerge collectively from Table 6 and Figure 10, which can be generalised to any MG capacity reinforcement problem: (1) the system's low O&M costs helped offset its relatively high capital costs, which were mainly generated by new WT and BESS capacity additions, (2) a comparison of the obtained LCOE with the current average price of domestic electricity in the Wairarapa region, New Zealand, where the site is located ($0. 34/kWh [70]) indicates that an optimally planned community-based renewable power generation system even surpasses retail grid parity, and (3) the negative value obtained for the net energy purchased from the utility grid suggests that not only did energy exchange with the utility grid provide power quality benefits and help avoid energy spillage (which was often carried out through a dedicated dump load to balance supply and demand), but it also contributed to the profitability of the project, albeit slightly. The optimal equipment capacity was determined as multiples of the selected components' nameplate capacities. 2 The optimal PV capacity represents the newly added capacity of the site's PV plant. 3 The electric vehicle supply equipment (EVSE) did not take part in the optimisation procedure. The optimal size of the EVSE was determined outside the model by finding the total minimum EV charging capacity that meets the peak EV charging demand of the site under cooperative EV charging conditions. The obtained total minimum capacity was then divided by the maximum charging capacity of each charger and rounded up to the nearest integer to obtain the optimal number of chargers. 4 The optimal size of the EVSE is defined based on the maximum charging capacity of each charger. 5 TNPC represents the conceptualised MG's "total net present cost". The reader is referred to [67] [68] [69] for a detailed description of the net present value method and levelised cost of energy (LCOE) calculations. 

The total net present cost (TNPC) of the system is broken down into the main cost components in Figure 10. Three key observations emerge collectively from Table 6 and Figure 10, which can be generalised to any MG capacity reinforcement problem: (1) the system's low O&M costs helped offset its relatively high capital costs, which were mainly generated by new WT and BESS capacity additions, (2) a comparison of the obtained LCOE with the current average price of domestic electricity in the Wairarapa region, New Zealand, where the site is located ($0. 34/kWh [70]) indicates that an optimally planned community-based renewable power generation system even surpasses retail grid parity, and (3) the negative value obtained for the net energy purchased from the utility grid suggests that not only did energy exchange with the utility grid provide power quality benefits and help avoid energy spillage (which was often carried out through a dedicated dump load to balance supply and demand), but it also contributed to the profitability of the project, albeit slightly. To understand in more detail the active power flow pattern between the MG and the main grid, the year-round profiles for energy purchased from the grid and energy sold to the grid, obtained for the cost-minimal solution under normal, grid-connected conditions, are plotted in Figures 11 and 12, respectively. The trends visible when comparing the figures are revealing. The battery bank in the optimal equipment combination enabled the MG to engage in energy arbitrage, by charging when utility rates were low and discharging during more remunerative times of day, (The buy-back rate is fixed at NZ$0. 08/kWh. However, given the availability of long-term data forecasts, the optimisation protocol incorporates some degree of forward-looking behaviour into the energy exchange decisionmaking process with respect to the load on the MG in the medium to longer term-identifying the more profitable time-steps for feeding power back into the grid. That is, the profitability is measured independently of the single rate feed-in tariff. ) and/or by shifting the excess power from non- To understand in more detail the active power flow pattern between the MG and the main grid, the year-round profiles for energy purchased from the grid and energy sold to the grid, obtained for the cost-minimal solution under normal, grid-connected conditions, are plotted in Figures 11 and 12, respectively. The trends visible when comparing the figures are revealing. The battery bank in the optimal equipment combination enabled the MG to engage in energy arbitrage, by charging when utility rates were low and discharging during more remunerative times of day, (The buy-back rate is fixed at NZ$0. 08/kWh. However, given the availability of long-term data forecasts, the optimisation protocol incorporates some degree of forward-looking behaviour into the energy exchange decision-making process with respect to the load on the MG in the medium to longer term-identifying the more profitable time-steps for feeding power back into the grid. That is, the profitability is measured independently of the single rate feed-in tariff. ) and/or by shifting the excess power from non-dispatchable renewables for sale at more valuable times of day. This, additionally, helped reduce peak demand charges. 

dispatchable renewables for sale at more valuable times of day. This, additionally, helped reduce peak demand charges. S3 in Supplementary Material. S4 in Supplementary Material.
section_name: Feasibility and Optimal Capacity Configuration

section_content: Using the methodology described in Section 3 for the planning for energy resilience, the optimal MG capacity expansion problem was solved independently to global optimality for a series of different scenarios defined by mean grid outage frequency and mean grid repair time. As an example, Figure 13 shows the one-year outage database (with hourly intervals) built stochastically for the middle-case scenario, with a grid outage frequency of 10 per year and a mean repair time of 84 h. Accordingly, Figures 14 and 15 respectively depict the resulting TNPC and the corresponding LCOE of the MG expansion under varying degrees of grid reliability characterised by the above two parameters. Moreover, the total annual amount of electricity sold to the grid [kWh] and the total annual amount of electricity purchased from the grid (kWh) at different grid reliability levels are displayed in Figures 16 and 17, respectively. Note that all of the results presented in this sub-section are adjusted for the EVSE costs, which were determined outside the model by matching the charging station's capacity to the peak EV charging demand of the site subject to the cooperative use of the charging infrastructure. Such cooperative behaviour within the community is expected to uphold the installation of only two EV chargers at the site (as indicated in Table 6 ) to fit for the considered multifamily community's energy demand for mobility. S3 in Supplementary Material. 

dispatchable renewables for sale at more valuable times of day. This, additionally, helped reduce peak demand charges. S3 in Supplementary Material. S4 in Supplementary Material.
section_name: The Cost of Energy Resilience

section_content: Using the methodology described in Section 3 for the planning for energy resilience, the optimal MG capacity expansion problem was solved independently to global optimality for a series of different scenarios defined by mean grid outage frequency and mean grid repair time. As an example, Figure 13 shows the one-year outage database (with hourly intervals) built stochastically for the middle-case scenario, with a grid outage frequency of 10 per year and a mean repair time of 84 h. Accordingly, Figures 14 and 15 respectively depict the resulting TNPC and the corresponding LCOE of the MG expansion under varying degrees of grid reliability characterised by the above two parameters. Moreover, the total annual amount of electricity sold to the grid [kWh] and the total annual amount of electricity purchased from the grid (kWh) at different grid reliability levels are displayed in Figures 16 and 17, respectively. Note that all of the results presented in this sub-section are adjusted for the EVSE costs, which were determined outside the model by matching the charging station's capacity to the peak EV charging demand of the site subject to the cooperative use of the charging infrastructure. Such cooperative behaviour within the community is expected to uphold the installation of only two EV chargers at the site (as indicated in Table 6 ) to fit for the considered multifamily community's energy demand for mobility. S4 in Supplementary Material.
section_name: The Cost of Energy Resilience

section_content: Using the methodology described in Section 3 for the planning for energy resilience, the optimal MG capacity expansion problem was solved independently to global optimality for a series of different scenarios defined by mean grid outage frequency and mean grid repair time. As an example, Figure 13 shows the one-year outage database (with hourly intervals) built stochastically for the middle-case scenario, with a grid outage frequency of 10 per year and a mean repair time of 84 h. Accordingly, Figures 14 and 15 respectively depict the resulting TNPC and the corresponding LCOE of the MG expansion under varying degrees of grid reliability characterised by the above two parameters. Moreover, the total annual amount of electricity sold to the grid [kWh] and the total annual amount of electricity purchased from the grid (kWh) at different grid reliability levels are displayed in Figures 16 and 17, respectively. Note that all of the results presented in this sub-section are adjusted for the EVSE costs, which were determined outside the model by matching the charging station's capacity to the peak EV charging demand of the site subject to the cooperative use of the charging infrastructure. Such cooperative behaviour within the community is expected to uphold the installation of only two EV chargers at the site (as indicated in Table 6 ) to fit for the considered multi-family community's energy demand for mobility. S8 in Supplementary Material. 

The two-way sensitivity analyses, shown in Figures 14 15 16 17, are revealing in the following ways:

• The values of total annual energy imports and exports indicate that the MG's net purchased electricity from the grid was approximately a monotonically decreasing function of the grid unreliability. That is, as the failure frequency of the grid and/or its mean repair time increased, the total power sold back to (purchased from) the grid increased (decreases) or remained constant. The underlying reason responsible for this model behaviour is the increase in the excess non-dispatchable power generation capacity of the MG during normal, grid-connected operations, as the grid reliability decreases. However, the increase in revenues generated from trading with the grid, as the MG's resilience to grid outages improved, only partially offset the additional costs incurred. This emphasises the necessity to include a minimum acceptable limit for the target community's energy resilience-to be derived from specifically-developed surveys to estimate the value of lost load-in the resilience-oriented MG capacity expansion planning processes to improve the accuracy of results.
section_name: The Cost of Energy Resilience

section_content: Non-surprisingly, increasing the unreliability level of the grid through dedicated parameters, increased the TNPC of the MG capacity expansion, which, in turn, increased the LCOE associated with the cost-minimal system. S8 in Supplementary Material. 

The two-way sensitivity analyses, shown in Figures 14 15 16 17, are revealing in the following ways:

• The values of total annual energy imports and exports indicate that the MG's net purchased electricity from the grid was approximately a monotonically decreasing function of the grid unreliability. That is, as the failure frequency of the grid and/or its mean repair time increased, the total power sold back to (purchased from) the grid increased (decreases) or remained constant. The underlying reason responsible for this model behaviour is the increase in the excess non-dispatchable power generation capacity of the MG during normal, grid-connected operations, as the grid reliability decreases. However, the increase in revenues generated from trading with the grid, as the MG's resilience to grid outages improved, only partially offset the additional costs incurred. This emphasises the necessity to include a minimum acceptable limit for the target community's energy resilience-to be derived from specifically-developed surveys to estimate the value of lost load-in the resilience-oriented MG capacity expansion planning processes to improve the accuracy of results.
section_name: •

section_content: Non-surprisingly, increasing the unreliability level of the grid through dedicated parameters, increased the TNPC of the MG capacity expansion, which, in turn, increased the LCOE associated with the cost-minimal system. S8 in Supplementary Material. 

The two-way sensitivity analyses, shown in Figures 14 15 16 17, are revealing in the following ways:

• The values of total annual energy imports and exports indicate that the MG's net purchased electricity from the grid was approximately a monotonically decreasing function of the grid unreliability. That is, as the failure frequency of the grid and/or its mean repair time increased, the total power sold back to (purchased from) the grid increased (decreases) or remained constant. The underlying reason responsible for this model behaviour is the increase in the excess non-dispatchable power generation capacity of the MG during normal, grid-connected operations, as the grid reliability decreases. However, the increase in revenues generated from trading with the grid, as the MG's resilience to grid outages improved, only partially offset the additional costs incurred. This emphasises the necessity to include a minimum acceptable limit for the target community's energy resilience-to be derived from specifically-developed surveys to estimate the value of lost load-in the resilience-oriented MG capacity expansion planning processes to improve the accuracy of results. 

• Non-surprisingly, increasing the unreliability level of the grid through dedicated parameters, increased the TNPC of the MG capacity expansion, which, in turn, increased the LCOE associated with the cost-minimal system.
section_name: •

section_content: The failure frequency of the grid and its mean repair time show almost the same degree of negative effect on the system's life-cycle cost when normalised to the same scale (e. g., in the range of (0 to 1)). Additionally, there seems to exist a front of solutions with respect to the grid reliability parameters, beyond which the whole-life cost of the system grows exponentially. For example, in the middle case scenario, where the grid's mean repair time and failure frequency were respectively considered to be 84 h and 10 per year, the system's TNPC was increased only by about 48%. However, a further 10% increase of either of the above two parameters raised the MG's TNPC by a further 26%. This observation can be rationalised by the change in the MG architecture when the grid unreliability level reaches a critical point, which is discussed in the next sub-section.
section_name: •

section_content: Figure 18 provides the resulting optimal system architecture for different levels of the failure frequency of the grid and the associated mean repair time. As this figure shows, the MG design space is divided approximately equally across two grid-connected system structures, namely, (1) existing PV/added PV/added WT/added BESS, and (2) existing PV/added WT/added BESS. Notably, the figure indicates that it is cost-optimal to add new PV generation capacity for a system resilient to relatively low-frequency, long-duration outages, or high-frequency, short-duration outages, or any combination in between. However, for grid outage scenarios that lie inside the region enclosed by the upper pseudo-triangle shown in Figure 18, the optimally reinforced MG structure excludes additional PV panels. This can be explained by the increase in the probability of occurrence of sustained outages during the night-time hours, where solar panels produce no electricity. Thus, it is more economical to only add WT and BESS capacity, in view of the lower diurnal variations of wind speed and dispatchability of the BESS. It is also worth noting that while the considered bounds for the two-dimensional sensitivity analyses might far exceed the local utility grid's reliability (especially the scenarios that lie in the region enclosed by the upper pseudo-trainable in Figure 18 ), the results of such sensitivity analyses are important in evaluating the robustness of the baseline system costs and architecture. Accordingly, Figure 18 demonstrates that the obtained grid-connected MG configuration of existing PV/added PV/added WT/added battery in the baseline scenario (100% reliable grid) is highly robust to variations in grid reliability. 

Energies 2020, 13, x FOR PEER REVIEW 19 of 27
section_name: Optimal MG System Type

section_content: Figure 18 provides the resulting optimal system architecture for different levels of the failure frequency of the grid and the associated mean repair time. As this figure shows, the MG design space is divided approximately equally across two grid-connected system structures, namely, (1) existing PV/added PV/added WT/added BESS, and (2) existing PV/added WT/added BESS. Notably, the figure indicates that it is cost-optimal to add new PV generation capacity for a system resilient to relatively low-frequency, long-duration outages, or high-frequency, short-duration outages, or any combination in between. However, for grid outage scenarios that lie inside the region enclosed by the upper pseudo-triangle shown in Figure 18, the optimally reinforced MG structure excludes additional PV panels. This can be explained by the increase in the probability of occurrence of sustained outages during the night-time hours, where solar panels produce no electricity. Thus, it is more economical to only add WT and BESS capacity, in view of the lower diurnal variations of wind speed and dispatchability of the BESS. It is also worth noting that while the considered bounds for the two-dimensional sensitivity analyses might far exceed the local utility grid's reliability (especially the scenarios that lie in the region enclosed by the upper pseudo-trainable in Figure 18 ), the results of such sensitivity analyses are important in evaluating the robustness of the baseline system costs and architecture. Accordingly, Figure 18 demonstrates that the obtained grid-connected MG configuration of existing PV/added PV/added WT/added battery in the baseline scenario (100% reliable grid) is highly robust to variations in grid reliability. S9 in Supplementary Material.
section_name: Optimal MG System Type

section_content: According to the results presented in Figure 14, addressing energy resilience is possible at comparably small total discounted cost increases of about 16% for a sufficiently resilient system (within a New Zealand context), tolerable of two sustained outages per year with each duration of the outage lasting up to four days (or, nearly equally, tolerable of four outages per year each with a maximum outage duration of up to two days), while optimally planning the capacity additions for the site under study. To indicate the effect of planning for energy resilience on the added MG equipment capacity, and in turn, the MG's life-cycle cost, this sub-section details the results obtained for the MG system resilient to two extended outages per year each with a maximum outage duration of up to four days. Moreover, all the analyses presented hereafter are based on this scenario. Table 7 details the capacity expansion planning results obtained for the case considered in this paper under the grid unreliability scenario outlined above. The table demonstrates that the only change in the optimal capacity configuration of the MG with respect to the baseline case (refer to Table 6 ) is the addition of one more battery module to cater for the prolonged grid outages, which will need to be replaced in year 15 of the project.
section_name: Indicative Resilient System Optimisation Analysis

section_content: This section measures the profitability of the investigated MG capacity expansion project based on three key investment appraisal metrics, namely the return on investment (ROI), internal rate of return (IRR), and discounted payback period (DPP). HOMER calculates theses economic sustainability metrics with reference to a base case, which is normally the system with the lowest capital cost that can meet the load demand on the MG. Accordingly, given the presence of the utility grid at the considered site, the base case in this analysis is the existing PV/grid architecture, which incurs no capital costs in view of the presence of a 50 kVA transformer at the site.
section_name: Capital Budgeting Metrics

section_content: The ROI is defined as the yearly cost savings an investment project generates for the injection of the financial capital, which can be calculated from Equation (7) [71] [72] [73] :

where CC and CC re f represent the capital cost of the suggested system and the reference system, respectively; CC(i) and CC re f (i) denote the nominal cash flow for the proposed system and the reference system in year i; and PL represents the project lifetime.
section_name: Return on Investment

section_content: Considering the base case defined above, the IRR is defined as the discount rate at which the net present value of all cash flows from the proposed investment equals to that of the base case. Accordingly, the IRR can be calculated as follows [71, 72] :

where dr is the real discount rate, and the term (PV(NCI re f (i) -NCI(i)) indicates the present value of the difference of the two net cash inflow sequences (for the proposed project and the base case) during the period i, while the net cash inflow represents the system's income from selling electricity to the grid and assets' salvage value minus the components' capital, replacement, and O&M costs, and the costs associated with the purchase of electricity from the grid.
section_name: Internal Rate of Return

section_content: The DPP refers to the time required to recover the difference in the discounted cash flow difference between the proposed system and the base case system, which can be expressed mathematically as [71, 72, 74 ]

where ln represents the natural logarithm.
section_name: Discounted Payback Period

section_content: Table 8 lists the obtained cash flow metrics for the proposed MG capacity expansion programme with reference to the case where any shortfalls in meeting the growing residential load power demand and EV charging loads-arising from the shortage in the existing PV generation capacity-is drawn from the utility grid. Table 8 demonstrates that the project yields relatively high ROI and IRR values through cost savings realised by building an at least 80% energy self-reliant community energy system, which is able to exploit the differences between the feed-in-tariff rate and wholesale power prices during off-peak periods of energy-use-by making effective use of a battery bank. The table also shows that the conceptualised resilient community MG for critical services would pay for itself in as little as 4. 74 years, which provides further support for the financial sustainability of the proposed development plan. Finally, the results of this cost-benefit analysis collectively indicate that not only is the proposed capital project economically feasible without any subsidies delivered as tax incentives (e. g., renewable energy investment tax credits or production tax credits), but it also represents an attractive investment opportunity, which is capable of generating moderate to substantial savings in the community's energy bills in the medium to long run.
section_name: Resulting Cash Flow Metrics

section_content: Radial electricity distribution networks have historically been designed to reduce unplanned, equipment failure-induced outages. However, the combination of multi-day outages as a result of many of the recent extreme weather events, and the improved cost-efficiency of distributed energy resources-including renewable energy generation and storage technologies-have stimulated considerable interest in deploying community-led sustainable energy systems that are capable of meeting critical loads if the upstream network fails. This study developed the first grid-connected community MG equipment capacity expansion planning method that integrates energy resilience constraints without creating redundant capacity. The proposed method yields robust decision-making support by evaluating the trade-off between life-cycle costs and the resilience of energy supply. Specifically, to quantify the resilience of the proposed MG, a time-series of random outages throughout the year were generated for a range of outage frequencies of certain durations and incorporated into the HOMER Pro model. 

The numerical simulation results obtained from the application of the model to the case example of Totarabank eco-village, New Zealand, have provided several novel insights:

1. 

Over the 25-year project life-cycle (planning horizon), the optimally expanded MG system can gain resilience against two outages per year, each up to four days in length, at relatively small discounted cost increases of 16% (equating to NZ$5892). This lends support to the idea that at current costs of renewable energy technologies, it is financially feasible for a community-level site to achieve a sufficient degree of survivability against sustained grid outages. 2. 

The optimal architecture (component type combination), namely grid-connected existing PV/added PV/added WT/added BESS MG system, determined for the case with a 100% reliable grid, seems to be highly robust against a wide range of grid unreliability values. Much of the reason for this lies in the fact that solar resource tends to complement wind resource at the site. However, the evidence from this study shows that in high wind, low solar regions it is not cost-optimal to add PV capacity when the degree of grid unreliability passes certain limits. This can mainly be attributed to the lower capacity factor of the PV plant.
section_name: Conclusions

section_content: With an IRR of about 55%, the initial investment required for the capacity expansion of the site's energy infrastructure to meet the projected energy consumption growth (driven primarily by the decarbonisation of the transport), can be recouped in less than five years, while additionally ensuring backup power supply to critical loads for two outages per year, each up to four days in length. This, together with the capital affordability of the project, suggests that it can be financed completely by the local community. Moreover, given the demonstrated evidence of the cost-efficiency of such programmes, it is expected to be attractive to many third-party investors. 

Although this paper has focused particularly on the capacity expansion planning of grid-tied community MGs, the proposed framework of planning for resilience can be generalised to handle various types of sustainable energy systems of different scales. Moreover, the area of application of the proposed framework is not restricted to the expansion planning problems. It can be easily extended for application to the general renewable energy system capacity planning problem of greenfield sites having access to the national grid. 

The study has a number of limitations, namely:

1. 

All the estimates were based on defining energy resilience in terms of sustained grid outages. 

That is, the study has not accounted for the impact of extreme weather episodes on the operability of the considered site's renewable energy generation assets.
section_name: 3.

section_content: The proposed method does not account for the planned extended power outages related to grid capacity additions or equipment maintenance and repair.
section_name: 2.

section_content: The study did not include any inputs from the site on the value the community places on the unserved energy during non-grid-connected operations. It is not implausible that the average annual loads that are deemed critical by end-consumers be different from the adjusted threshold criterion for load partitioning in this study. 4. 

While the integration of unidirectional EV charging infrastructure is shown to be both technically feasible and economically viable, no attempt is made in this study to investigate the role that bidirectional charging (powered by V2G technology) can play in improving the profitability of the project.
section_name: 3.

section_content: To address the limitations outlined above, future work needs to develop a more detailed resilient-oriented MG capacity expansion planning modelling framework that: (1)
section_name: Future Work

section_name: Acknowledgments:

section_content: Funding: This research received no external funding.

section_content: The authors would like to gratefully acknowledge suggestions and contextual input provided by the Totarabank Subdivision developer Andy Duncan.
section_name: Acknowledgments:

section_name: Supplementary Materials:

section_content: the local extreme weather impact on the MG's own onsite renewable energy generation equipment and expands the proposed resilience quantification method to include the hours of the autonomy of the storage bank; (2) integrates scheduled outages into the resilience-oriented MG capacity planning processes by combining them with those of the random unplanned outages to generate an integrated outage time-series to be fed into the optimisation problem; (3) considers the true value of lost load perceived by end-consumers that can be derived from specifically-developed surveys, whilst additionally reflecting the seasonal differences in the elasticity of non-critical loads; and (4) harnesses the potential of EV batteries in facilitating the integration of renewable energy sources, which may provide the opportunity to reduce the total discounted system costs and improve the cost-efficiency of planning for resilience, security, and autonomy of community energy systems.

section_content: The following are available online at http://www. mdpi. com/1996-1073/13/15/3970/s1, Table S1 : numerical values underlying Figure 4 ; Table S2 : numerical values underlying Figure 5 ; Table S3 : numerical values underlying Figure 11 ; Table S4 : numerical values underlying Figure 12 ; Table S5 : numerical values underlying Figure 14 ; Table S6 : numerical values underlying Figure 15 ; Table S7 : numerical values underlying Figure 16 ; Table S8 : numerical values underlying Figure 17 ; and Table S9 : numerical values underlying Figure 18.
section_name: Supplementary Materials:

section_content: The authors declare no conflict of interest.
section_name: Conflicts of Interest:

section_name: Nomenclature