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

: In the grid-tied micro-grid context, energy resilience can be deﬁned 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 speciﬁcally-developed, time-based resilience capacity characterisation method to quantify the sustainability of micro-grids in the face of di ﬀ erent levels of extended grid power outages, this paper facilitates stakeholder decision-making on the trade-o ﬀ 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 electriﬁcation—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-tari ﬀ rate (NZ$0.08 / kWh), the life cycle proﬁtability of resilience-oriented community micro-grid capacity reinforcement is guaranteed within a New Zealand context, though constrained by capital requirements.


Introduction
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. • Using interval linear programming to characterise the uncertainty associated with long-term weather projections.

•
Taking a multi-period planning approach to improve the precision of decision-making in the allocation of renewable energy resources.
• The technology diversity degree decreases, as the acceptable level of robustness against weather forecast uncertainties increases. • At present, fuel cells are not cost-competitive with mature battery technologies.
[12] Solar PV, wind turbine, diesel generator, and battery Scenario-based stochastic optimisation • Considering multiple conflicting objectives, namely the minimisation of life-cycle costs, greenhouse gas emissions, and the non-renewable fraction of power generation capacity.

•
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 • 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.
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%.

•
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.
• 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. Table 2. Summary of the previous work focused on the integration of resilience constraints into the long-term investment planning processes of renewable energy systems. [16] Unspecified distributed generation

Ref. Technologies/Resources/Systems Considered in the Candidate Pool Optimisation Approach Key Contribution(s) Key Insight(s) from Case Study Analyses
Mixed-integer linear programming solved using GAMS • Treating the uncertainty associated with the occurrence of extreme weather events using information gap decision theory.

•
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.
• Information gap decision theory is an effective approach for supporting decision-making in the planning of distribution electricity networks for resilience.

•
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 • Assessing the resilience of the U.S. national energy and transportation systems to a set of extreme events.

•
Considering cost, sustainability, and resilience as three independent objectives. • 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 • 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.
• 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). • 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.
• Increasing the penetration of distributed generation resources within distribution networks significantly improves the cost-efficiency of procuring resilience provisions.

Test-Case System: Totarabank, New Zealand
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.

Candidate Technologies
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.

Candidate Technologies
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.

PV Modules
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.

Wind Turbines
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].  [26].
where represents wind speed measured at the height of ℎ in time , and is the wind shear exponent.

PV Modules
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.

Wind Turbines
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].

PV Modules
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.

Wind Turbines
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].  [26].
where represents wind speed measured at the height of ℎ in time , and is the wind shear exponent.  where V re f represents wind speed measured at the height of h re f in time t, and γ is the wind shear exponent.

Battery Arrays
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 ].

Hybrid Inverter
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.

Utility Grid
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.

Electric Vehicle Charging Station
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.

Key Assumptions
The following simplifying assumptions were made:

•
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.

•
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.

•
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.

•
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-34]. • 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. • 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.

•
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.

Data
The techno-economic specifications of the selected components and the associated sources are summarised in Table 3. 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.  [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.
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.
, 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.  Table 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].   Table 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].
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.
, 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.  Table 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].  Table S2 in Supplementary Material.  Table S2 in Supplementary Material.
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. 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.

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

Modelling Approach
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.

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

Modelling Approach
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

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

Modelling Approach
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 optimum 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.

Characterisation of Energy Resilience
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.
Energies 2020, 13, x FOR PEER REVIEW 13 of 27 Figure 8. Illustration of the proposed method to determine the load partitioning threshold on a representative load duration curve presented in [62]. (The load curve was taken from the cited reference, and then adapted to describe the proposed load partitioning process.) 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. Figure 8. Illustration of the proposed method to determine the load partitioning threshold on a representative load duration curve presented in [62]. (The load curve was taken from the cited reference, and then adapted to describe the proposed load partitioning process.) Table 5 lists further input data for the model parameters and their respective sources.  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. Energies 2020, 13, x FOR PEER REVIEW 14 of 27 Figure 9. Flowchart of the research methodology.

Results and Discussion
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.

Feasibility and Optimal Capacity Configuration
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.

Results and Discussion
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.

Feasibility and Optimal Capacity Configuration
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.   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. 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.  Table S3 in Supplementary Material.  Table S4 in Supplementary Material.

The Cost of Energy Resilience
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.  dispatchable renewables for sale at more valuable times of day. This, additionally, helped reduce peak demand charges.  Table S3 in Supplementary Material.  Table S4 in Supplementary Material.

The Cost of Energy Resilience
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.  Table S4 in Supplementary Material.

The Cost of Energy Resilience
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.   Table S5 in Supplementary Material.  Table S6 in Supplementary Material.   Table S5 in Supplementary Material.  Table S6 in Supplementary Material.  Table S5 in Supplementary Material.   Table S5 in Supplementary Material.  Table S6 in Supplementary Material.  Table S6 in Supplementary Material.  Table S7 in Supplementary Material. Figure 17. Sensitivity of the total annual energy imports to variations in grid reliability parameters.
The numerical values belonging to this figure are listed in Table S8 in Supplementary Material.
The two-way sensitivity analyses, shown in Figures 14-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.  Table S7 in Supplementary Material.  Table S8 in Supplementary Material.
The two-way sensitivity analyses, shown in Figures 14-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.  Table S8 in Supplementary Material.
The two-way sensitivity analyses, shown in Figures 14-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. • 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. 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.

Optimal MG System Type
Energies 2020, 13, x FOR PEER REVIEW 19 of 27 • 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. 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.  Table S9 in Supplementary Material.  Table S9 in Supplementary Material.

Indicative Resilient System Optimisation Analysis
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.

Capital Budgeting Metrics
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.

Return on Investment
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.

Internal Rate of Return
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.

Discounted Payback Period
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. 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.

Conclusions
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 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.

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

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