Main

The global climate crisis, highlighted by critical infrastructure damages and power disruptions from natural hazards1, has severely impacted the well-being of urban populations worldwide. Power outages pose especially severe consequences, particularly impacting vulnerable populations2,3,4 and revealing varying impacts across households5,6,7,8,9. Climate change-induced heatwaves and hurricanes underscore the urgency of comprehensive preparedness for cities. Moreover, cities grapple with the complex challenge of achieving economic productivity, social inclusivity and environmental sustainability.

In view of these challenges, in many world regions further aggravated by substantial urban informal settlements10, a shift towards decentralized renewable energy systems11 has brought the concept of so-called microgrids to the forefront. Microgrids12,13 are small, localized energy systems that can generate, store and distribute energy independently or in conjunction with the main energy grid. In this context, community power storage systems are gaining relevance14 and can serve as nuclei for microgrids in urban areas, offering potential interconnection possibilities13,15,16.

As a conclusion, microgrids potentially prevent critical service disruptions due to power failures and enhance urban resilience while laying the foundation for local energy communities and innovative energy democracy models17,18,19.

However, threat scenarios for urban utilities extend beyond natural hazards and physical damages to include cyber attacks20,21, illustrating that even microgrids can fail. This is a widely overlooked aspect in microgrid planning, which this study considers. Furthermore, most research on microgrids primarily focuses on economic feasibility, market designs22 or purely technical infrastructure resilience23,24, neglecting their long-term impact on urban resilience, well-being and equity. Consequently, this study addresses the following fundamental question in the context of planning urban clean energy systems:

How can urban microgrid design consider high levels of urban resilience and well-being with respect to multiple future hazards while considering fair democratic and equity-based decision-making processes?

Strategies recommended for household well-being during outages include addressing sanitation disruptions, prioritizing children’s needs and incorporating paediatric mental health services9. The literature emphasizes a tailored approach prioritizing essential services to meet household needs7,25. Despite the pivotal role of microgrid planning, current approaches often lack an integrative assessment of the social burden related to critical service availability and citizen participation17,25. Urban governance, rooted in the Capability Approach pioneered by the Nobel laureate Amartya Sen, emphasizes equity and resilience, especially during disasters2,26,27.

Furthermore, a major limitation in contemporary microgrid planning is the concentration of numerous critical services within individual microgrids17. If these microgrids fail, it would cause considerable burden, contrary to the primary objective of mitigation. Addressing these multifaceted issues from a microgrid planning perspective necessitates a comprehensive and inclusive approach, considering underlying social disparities and vulnerabilities26. Our study contributes to the research and policy discourse on sustainable urban transformation, emphasizing the need to account for a range of new hazards, irrespective of their current relevance, and the need for integrated policies to enhance urban resilience and overall well-being.

Building on the imperative of an inclusive approach and the consideration of well-being in urban microgrid planning, it is crucial to underscore the necessity for equitable participation in democratic processes within socioeconomic groups28. The concept of ‘energy democracy’ offers a promising avenue through various participatory mechanisms, allowing local populations the ‘right to the city’ and involving them in microgrid decision-making. This encompasses economic, societal, technical and legal aspects, emphasizing considerations such as profit optimization versus societal contribution, microgrid financing and energy technology selection28,29,30,31. Considering the districting of urban microgrids, determining the right number and boundaries of microgrids is crucial for the fair representation of social groups within microgrid communities. However, the literature often overlooks the diverse composition of these groups as a factor for fostering equitable participation. In conclusion, while participatory formats are essential for energy democracy, careful consideration of ‘who is in or out’ is needed to avoid inequities and the potential risk of ‘energy gerrymandering’ akin to partisan gerrymandering32, where votes are lost due to the way constituencies were defined, favouring one political party over others, thereby influencing election outcomes. This highlights the role of informed decisions on microgrid districting to ensure equitable outcomes. Hence, in the pivotal initial phase of urban microgrid districting, we advocate for a collaborative approach involving local governments, city planners, critical service providers and communities33. Urban leaders and community representatives can engage in so-called focus groups, fostering discussions with local governments to devise equitable solutions on an urban scale34. This collaborative endeavour seeks to enhance socially informed planning and active participation. By doing so, it aims to elevate energy literacy, fostering a deeper understanding of microgrid dynamics and empowering citizens to make well-informed judgements related to energy democracy35,36,37.

Our optimization study, conducted for New Hanover County, North Carolina, provides a transferable solution for microgrid districting. We first present a framework that mitigates the risk of ‘energy gerrymandering’ and promotes the understanding of basic needs of urban populations. By applying socially informed indicators that incorporate the Social Vulnerability Index38, the criticality of basic services as well as potential locations of energy technologies within microgrids, our study reveals cost-efficient, urban-resilient and equitable microgrid solutions to diverse threats encompassing both natural and man made, including cyber attacks. These solutions contribute simultaneously to clean energy access (SDG 7.1), income growth (SDG 10.1), basic services access (SDG 11.1), reducing the number of affected people due to disasters (SDG 11.5), mitigation, for example to climate change (SDG 11.b), and participatory urban planning (SDG 11.3)39. With a focus on these SDG targets, we provide a comprehensive overview of the innovative indicators and optimization approach in the Methods section.

Results

Our study conclusively supports a positive response to our primary research question. Through the specific case of New Hanover County, we demonstrate that participation, integrated decision-making and planning are instrumental in achieving equity-based and urban-resilient solutions.

Equitable participation and decision making

Our main findings rely on the fundamental observation that, very similar to electoral constituencies in politics, there exists a phenomenon, which we label as ‘energy gerrymandering’, where voices are systematically lost. In our study, microgrid districting, similar to the delineation of electoral borders, strives to establish fair and balanced ‘energy constituencies’28.

The comprehensive assessment of essential service needs, household criticality and resilience factors largely hinges on the active involvement and contribution of local communities and urban participation (Fig. 1). Planning urban microgrids must consider the possibility of outages affecting critical services at both city and municipal levels, hence decision-making processes in a city must entail assessing social vulnerabilities, household needs and the criticality of critical services (Fig. 2). Practically, community leaders represent communities and relay local needs and views to local government, identifying infrastructure criticalities and vulnerable group needs; ongoing assessments adapt to changing vulnerabilities and needs to strategically place new critical and basic services2,8,17,40,41, supporting the achievement of SDG target 11.1 (Ensure access to basic services for all) and SDG target 11.5 (Reduce the number of people affected by disasters).

Fig. 1: Fostering interaction, a cornerstone for inclusive microgrid communities.
figure 1

A participatory approach to enhance microgrid sustainability and well-being involves ongoing community and urban-level assessments. These assessments consider criticality and social vulnerability, culminating in a clear understanding of current needs and technology investments. Fostering interaction among social groups within local communities promotes information exchange, enhances energy literacy and drives increased participation.

Fig. 2: Criticalities and social vulnerabilities.
figure 2

Left: criticalities of all critical infrastructures in New Hanover County, assessed via stakeholder survey; the larger the dots, the more critical the infrastructure. Centre: only RHS infrastructure; the blue dots are so-called community lifeline facilities. Right: vulnerabilities of households depending on socioeconomic status and mobility constraints derived from the Social Vulnerability Index, from green (less critical) to red (highly critical).

In the long term, promoting equitable participation within microgrid communities enhances energy literacy and ensures fair decision-making, especially benefitting the vulnerable groups42. Moreover, fair microgrid districting can safeguard against exclusion, ensuring that all social groups, particularly the vulnerable, can engage in the microgrid development process without large hindrances42.

Through a ‘learning by doing’ approach43, there is huge potential for energy literacy to increase naturally as all social groups engage (Fig. 1). Conversely, if minorities reside within microgrids, their participation and inclusion may be systematically limited. This can occur as coalitions of different social groups may dominate decision-making processes, potentially excluding socially vulnerable minorities, despite democratic principles. Such limitations on participation and inclusion can undermine the fairness of decision making, thereby impacting SDG target 11.3 (Enhance inclusive and sustainable urbanization).

To foster fairness in urban microgrid planning, our proposal involves assessing equity in the spatial layout of microgrids in terms of understanding the representation of socially vulnerable groups by considering specific factors tailored to planned microgrid layouts. Avoiding highly uneven distributions of these groups within microgrid districts mitigates the risk of ‘energy gerrymandering’. We use the Social Vulnerability Index38 from 2018 (Fig. 2, right) in our case study for New Hanover County, providing a positive answer to our research question (Fig. 5).

Inclusive decision-making within local microgrid communities goes beyond assessing criticality, household vulnerability and service needs. It also encompasses critical considerations such as ownership of local solar power systems, optimal locations for neighbourhood energy storage and equitable distribution of emergency energy resources during crises. Discussions should also address equitable surplus energy utilization, whether through market sales or supporting low-income households, and reinvestment of potential local profits into further energy district development. These multifaceted and integrated decisions empower communities to shape resilient and sustainable urban energy systems in the long term, effectively promoting SDG 11.b (Integrated policies and plans for urban resilience).

Sustainable futures based on well-being and resilience

To identify future-proof and resilient urban microgrids, we examine a wide range of potential threats. This encompasses natural disasters affecting physical infrastructure and microgrid failures, such as those induced by cyber attacks. We term this composition of potential future threats as our baseline scenarios.

In our specific case study, the baseline scenarios involve variations in physical damages and resulting power outages, inspired by the impacts of Hurricane Florence. Hurricane Florence was a severe and prolonged hurricane that caused catastrophic damage in the Carolinas in September 2018. In particular, high winds in New Hanover County caused numerous trees and power lines to fall, leaving more than 90% of the county without power44. We also account for potential microgrid failures. Given that microgrids rely on existing distribution grids, damages akin to those caused by Hurricane Florence would impact microgrids similarly. This impact results in diverse combinations of damage coupled with microgrid failures, forming the baseline scenarios for our case study.

Similar to the social burden described in refs. 17,40, we relate well-being to socioeconomic status and proximity of functioning immediate post-shock critical services, especially those that are related to relief, health and security (RHS). In finer detail, our concept of well-being establishes a connection between, on the one hand, low socioeconomic status, substandard housing conditions and mobility constraints, as gauged by the Social Vulnerability Index, and, on the other hand, reduced accessibility of currently functioning RHS infrastructure. Evaluation of well-being losses for a given microgrid districting is visualized in Fig. 3. With regard to the baseline scenarios, we say that a particular microgrid districting increases urban resilience more than another if the loss of well-being is relatively lower.

Fig. 3: Microgrid districting and well-being losses.
figure 3

Left: some microgrid districting with three microgrids. Right: accumulated impact on well-being. Due to power outages, which lasted longer than 8 hours. Here, loss of nutrition and basic services (heat, tap water) that restricted availability of RHS infrastructure in conjunction with low socioeconomic status of households (with respect to the census data of 2018) are considered; darker red indicates higher well-being losses. This was done with a Monte Carlo simulation based on the characteristics of the baseline scenarios including microgrid failures and physical damages.

In conclusion, these baseline scenarios establish the foundation for planning resilient urban energy systems within a multiscenario framework. They highlight damages and their immediate effects on the population, thereby specifically addressing SDG target 11.b (Climate change adaptation, disaster resilience) at the local level. As an interim result, the fact that individual microgrids can fail makes it clear that the risk for lack of well-being and urban resilience in a city can be reduced with the use of multiple microgrids instead of one. These points are ultimately confirmed by our study (Fig. 5).

Designing sustainable and integrated urban microgrids

Managing a few neighbourhood energy storages tends to be less vulnerable and more stable than managing a large number of distributed batteries45,46 in individual households, infrastructure or business corporations. In addition, we operate on the assumption that the majority of RHS infrastructure lacks independent backup power, except for hospitals, which widely corresponds to the current situation. Moreover, it is important to note that numerous households might face financial constraints preventing them from installing personal energy storage. We also explore the potential of urban renewable energy generation, such as utilizing rooftops for solar power47 (Fig. 4, left). This approach allows solar energy to contribute to filling neighbourhood energy storages or powering critical loads48 in smart grids.

Fig. 4: Spatial analysis for energy technology integration.
figure 4

Top left: buildings (pink) and empty areas with building permits (green); this is important for questions related to energy storage integration. Bottom left: raster information on the rooftop geometries coming from LiDAR datasets as a base for assessing the potential for photovoltaics installations on roof tops. These data allow identifying azimuth and thus the photovoltaic potential of rooftops. Right: there exist 64 medium voltage circuit boundaries and within each, the potential for integrating neighbourhood energy storages in unbuilt area is displayed in square metres; the same was done for photovoltaics installations on roof tops.

Thus, methodically incorporating neighbourhood energy storages into the creation of economic, equitable and resilient microgrids within urban or community settings aligns not only with the targets of SDG 11 but also with SDG 7 (Affordable and clean energy), which aims to ensure universal access to sustainable and clean energy for all. These storages play a pivotal role in achieving practical and dependable microgrid management. A crucial factor for implementing neighbourhood energy storages is the availability of space (Fig. 4, right), contingent on the type and size of the storage. While spatial conditions vary across the built environment, maintaining consistency in the siting potentials and renewable energy capabilities from one microgrid to another is essential when integrating neighbourhood energy storages. This not only ensures practicality but also safeguards urban equity and promotes equal development opportunities within microgrids at the local level, thereby contributing to SDG 10 (Reduce inequality), particularly target 10.1 (Achieve and sustain income growth for the bottom 40 percent of the population). Balancing the integration potential of neighbourhood energy storage and photovoltaics between the microgrids is another aspect that we consider in equity-based microgrid districting (Fig. 5).

Fig. 5: Microgrid districting solutions and well-being losses.
figure 5

Top left: example of a microgrid districting, with economic feasibility being prioritized (three microgrids). Top right: microgrid districting solution, where urban resilience, fair democratic participation, equitable distribution of renewable energy and energy storage potentials as well as costs were considered (six microgrids). Bottom: aggregated view of two types of well-being losses (left: referring to socioeconomic status; right: referring to type of housing and transportation) coming from Monte Carlo simulations based on baseline scenarios against the corresponding microgrid districting (top right). Darker red indicates higher well-being losses.

In microgrid districting, we estimate costs by assuming that microgrids are technically developed using existing distribution grid structures, inherently a cost-efficient approach. In our case study, beyond the costs for technical equipment of microgrids17,49, we also consider how medium voltage circuits can be fed from multiple substations and interconnected.

Towards energy resilience and equity

This study links urban resilience with post-catastrophe declines in well-being, with a focus on power outages in cities, within the framework of equity-based and clean energy system planning. Our concept for urban-resilient microgrid districting applies infrastructure and household criticality (Fig. 2, right), depending on socioeconomic status and mobility constraints derived from the Social Vulnerability Index (2018).

A guiding question in our study for urban-resilient microgrid districting concerns the consequences for well-being in the aftermath of a disastrous event or during an energy failure, thereby focusing on the case that single microgrids fail as described in our baseline scenarios. The following basic observations are quite intuitive and form a basis for the assessment of the impact of microgrid districting on urban resilience applied in our optimization study:

  1. 1.

    Concentrating critical infrastructure in single microgrids can lead to simultaneous failures of essential services during microgrid outages, impacting urban well-being substantially more strongly compared with scenarios with lower concentrations of such infrastructure.

  2. 2.

    When many vulnerable households are concentrated in a single microgrid, urban well-being drops considerably if basic services fail during a microgrid outage, especially compared with lower concentration scenarios.

  3. 3.

    Optimally distributing all types of RHS infrastructure across urban microgrids prevents citywide unavailability during a microgrid failure. Districting microgrids in such a way that as many types of RHS services as possible can be found in each microgrid ensures high citywide availability of services even in the event of isolated microgrid failures, thereby increasing well-being.

Addressing (1) and (2), we assess high-criticality and large peak load infrastructure density within microgrids similar to ref. 50. Measuring this assists in identifying microgrid districting with fewer high-criticality infrastructures and large peak loads, facilitating load restoration51,52 in times of microgrid failure and avoiding concentration of very critical services in one microgrid. This perspective would favour many microgrids with less critical infrastructure per microgrid to avoid such concentrations.

Referring to (3) and aligning with the 15-minute city concept53, we argue that each microgrid should ideally host at least one representative for all types of RHS infrastructure. Hence, we measure RHS infrastructure distribution per microgrid. This perspective on microgrid planning would favour larger and thus less microgrids, each accommodating all RHS types, which seems incompatible with the goal of avoiding a lot of very critical services with high peak loads per microgrid, preferring smaller and thus more microgrids, as mentioned above.

Again, based on these considerations and as a quick interim conclusion, an urban-resilient microgrid districting should result in more than one microgrid, because in the case of baseline scenarios with non-functioning microgrids, there is a high probability that residents will be able to access all RHS services despite non-operating microgrids, which would lead to a higher level of well-being.

Our optimization study’s key finding involves leveraging the current network structures through the connection or disconnection of medium voltage zones (Fig. 4, right) using switching devices. This process defines microgrid boundaries, emphasizing a cost-effective approach grounded in existing infrastructure.

Considering criticality data and the Social Vulnerability Index, and despite the aforementioned contradictory perspectives, we have identified a microgrid districting solution for New Hanover County answering our research question (Fig. 5). This solution proves to be cost efficient, showcasing minimal well-being losses against baseline scenarios. It also ensures equitable conditions, offering similar potentials for integrating neighbourhood energy storages and rooftop photovoltaics. In addition, it establishes a well-balanced distribution of socially vulnerable groups, mitigating the risk of ‘energy gerrymandering’.

In conclusion, our study implies that addressing individual targets in isolation, as infrastructural measures, may inadvertently hinder progress towards other SDG objectives. Nonetheless, we emphasize that there exist urban energy system designs that concurrently promote multiple SDG targets, including clean energy access (SDG 7.1), access to basic services (SDG 11.1), participatory urban planning (SDG 11.3), reducing the number of people affected by disasters (SDG 11.5), promoting mitigation and adaptation to climate change (SDG 11.b), and income growth (SDG 10.1).

Discussion

Microgrids play a pivotal role in enhancing urban resilience; however, their effective implementation involves crucial decisions regarding the number of microgrids to be installed and their districting within urban settlements. If economic considerations are not checked, providers may at early stages of urban microgrid implementation introduce the risk of ‘cherry-picking’ by prioritizing economically promising urban areas, potentially leading to biased microgrid districting and energy gerrymandering54,55.

A key implication of our work underscores the necessity for planning based on an integrated analysis, considering the long-term impact of microgrid districting on urban resilience, sustainability and equity. While our case study in New Hanover County provides valuable insights, it is essential to acknowledge that urban situations are highly site specific and often not comparable. In instances where critical infrastructure is dispersed across the city but vulnerable households cluster in peripheral areas, identifying microgrid districts that balance the representation of socially vulnerable groups, prevent energy gerrymandering, and ensure high levels of urban resilience and well-being can be challenging. However, our findings strongly advocate for the integration of sustainable urban development projects with microgrid planning, applicable across diverse contexts, including industrialized countries, emerging economies and developing nations. Even in situations such as those with vulnerable populations in peripheral areas, mentioned above, or with already existing microgrids, our measurements facilitate the identification of optimal locations for integrating new or relocating existing critical services, ultimately enhancing urban resilience and well-being. In developing countries, this can substantially improve access to basic services and thus promote SDG 11.1 in particular.

The varied dataset used in our study was derived from publicly available data on grid infrastructure obtained through a research project in New Hanover County. While this dataset sufficed to illustrate the added value of our integrated approach to microgrid districting, it suggests that, in a planning context involving multiple stakeholders, an improved and more comprehensive database could enhance the accuracy and efficacy of the analysis. Furthermore, advancing the development of inclusive formats that acknowledge diverse needs and cater to varying levels of energy literacy plays a crucial role in fostering more informed democratic decisions within established microgrid communities.

Moreover, there is an urgent need for further exploration and adaptation in characterizing and quantitatively measuring social vulnerability, customizing these approaches to specific local circumstances. Addressing inquiries related to integrating new data sources to assess household vulnerability and refining well-being definitions is crucial for advancing our understanding in this field, as emphasized in previous work8, which is an integral part of ongoing research.

The growth of energy literacy not only enhances political engagement but also fortifies community and urban resilience35,36. In addition, delving into the intricate correlations among Social Vulnerability Index criteria, limitations in adaptive capacity and energy literacy is a focus of current and future studies. This exploration takes into consideration factors outlined in existing research6,56.

Furthermore, ongoing research is dedicated to refining optimizers capable of efficiently managing heightened complexity, a critical aspect for large-scale urban environments, including big or mega cities. Our proposed approach is universally applicable to the implementation of microgrid projects coupled with sustainable urban development in any city. It facilitates the resilient integration of critical services into existing urban microgrids, emphasizing the importance of thoughtful planning over increased investment in additional technologies.

Methods

The results in this work were developed on the basis of an extensive spatial and infrastructural data, new indicators or metrics that require those data as input, and an evolutionary algorithm for finding optimal clusters. In the following, we describe the data sources, the data used and the metrics for measuring the different aspects and dimensions.

Social Vulnerability Index

The Centers for Disease Control and Prevention Social Vulnerability Index, created by the US Agency of Toxic Substances and Disease Registry’s Geospatial Research, Analysis and Services Program, aids public health officials and emergency planners in identifying vulnerable communities during hazardous events38. This index assesses the relative vulnerability of US census tracts based on 15 social factors, grouping them into four themes. In this study, we focused on theme 1 (socioeconomic conditions, especially education and income) and theme 4 (housing conditions), crucial for household criticality, using percentiles specific to New Hanover County. The data were derived from the US Department of Energy’s project ‘Planning an Affordable, Resilient, and Sustainable Grid in North Carolina’57 focusing on New Hanover County Community and Energy Security, where the University North Carolina at Charlotte (UNCC) is a project partner. This project was extended until the end of 2023. Publications on details will be available in June 202458.

Focus groups in New Hanover County

Emergency preparedness in North Carolina involves collaboration between county-level emergency management organizations and the state’s Department of Public Safety, specifically the North Carolina Emergency Management agency59. The EPIC team from UNCC partnered closely with New Hanover County Emergency Management to enhance resilience following major storms such as Hurricane Florence and Hurricane Dorian in 2020 and 202144,60,61. In the aftermath of Hurricane Florence, which severely impacted the county, an after-action report was prepared by New Hanover County officials in collaboration with focus groups from various Wilmington neighbourhoods52. These neighbourhoods, chosen for their high Social Vulnerability households and critical services (Supplementary Material), engaged community leaders to assess past recovery efforts and propose improvements. Focus group discussions focused on sheltering, community feeding, volunteers, fuel and emergency generators, and better inclusion of the faith-based community. The outcome identified potential locations for Community Lifeline Facilities to reduce well-being losses in high Social Vulnerability Index households.

Criticality

Criticality, a relative measure for assessing infrastructure and service provider relevance, ranges from 0 to 1, with a higher value indicating greater criticality62. Urban-centric criticality assessments rely on technical analysis methods and stakeholder participation63. In New Hanover County, criticalities were identified using focus groups and a direct weighting approach (Supplementary Material).

For household criticality, a range of 0.1 to 0.2 was assigned, with greater social vulnerability impacting preparedness for power outages. Factors in the assessment include socioeconomic status (RPL_THEME1) and housing/mobility (RPL_THEME4), both ranging from 0 to 1 (equation (1)). Original notation from the Social Vulnerability Index (RPL_THEME1 and RPL_THEME4) was retained to avoid misunderstandings.

$$c\left({\rm{Household}}\right):=0.1+({\rm{RPL}}\_{\rm{THEME}}1+{\rm{RPL}}\_{\rm{THEME}}4)/20$$
(1)

This equation can use different themes from the Social Vulnerability Index separately, other ways of aggregation or other factors of social vulnerability of households that can be modelled numerically. Also, depending on the relevance of considering household criticality, the interval 0.1 to 0.2 can be adapted.

Since this work was not concerned with the specific technical implementation of microgrids, the potential interconnections among them and energy management issues, but rather with microgrid districting, relative and normalized information on the potential peak load of infrastructure was primarily sufficient (Supplementary Material). We assumed that the relative peak load for households is the same. For all other infrastructure, the information on relative peak load was based on the type and size of the infrastructure, where the information was derived from the NREL GitHub repository64 containing timeseries on energy consumption (OpenEI Data Lake).

Built environment and photovoltaics potential of roof tops

The analysis utilizes building permits and potential rooftop areas for photovoltaics to assess neighbourhood energy storage and photovoltaics integration per microgrid, addressing an aspect of equity. Building information for 2021, including critical infrastructure, was obtained from cadastral data, along with data on green areas with building permits60. Solar panel efficiency is influenced by the North–South orientation (Aspect), with studies suggesting a quantitative estimate of electrical power production based on spatial orientation and vertical angle65.

Estimates of Aspect classes were derived from the 2014 NCFMP LiDAR dataset, allowing reconstruction of triangle roof structures with precision. A three-dimensional (3D) Digital Elevation Model (DEM) based on LiDAR points and building permits was created, producing an Aspect grid indicating the North–South direction of the 3D surface. This grid was refined to eliminate synthetic DEM data between buildings, providing accurate Aspect information. Each grid cell was multiplied by the corresponding solar power efficiency coefficient, yielding the integral roof solar potential for each Social Vulnerability Index region.

An acknowledged inconsistency arises from the temporal misalignment between LiDAR data and building permits. This issue is expected to be resolved in concrete urban microgrid planning projects with more up-to-date measurements. The methodology contributes to assessing the solar potential of rooftops and neighbourhood energy storage integration, considering equity aspects in microgrid planning60,65,66.

Customers affected by blackouts induced by Hurricane Florence

Duke Energy, the energy provider in North Carolina, provided power feeder information from 2021, which was used to approximate the medium voltage circuit boundaries. Furthermore, Duke Energy provided timeseries aggregated data on customers per circuit boundary affected by power outages due to Hurricane Florence. From these data, we extracted per circuit boundary CBx an estimate \({P}_{l}^{{\rm{blackout}}}({{\rm{CB}}}_{x})\) of the maximum share of electricity of customers who were affected by blackouts for at least l hours.

Well-being losses

Loss of short-term well-being can be represented in terms of disbursements, such as those made by the government to compensate for food losses due to lack of refrigeration, such as the Supplemental Disaster Nutrition Assistance Program (DSNAP), where households with low income were considered67. In addition, the unavailability of critical infrastructure, especially RHS infrastructure, contributes immediately to a worsened situation with respect to critical services. Moreover, the farther away blackout-impacted households with low socioeconomic status or with limited mobility are from functional critical services, and the more affected they are across the city, the greater the loss of well-being at city level. The latter implies the fact that critical services are then prone to congestion and limited operation, which in turn negatively affects well-being68.

Hence, we applied two types of well-being unitless assessments, which are based on the Social Vulnerability Index data: type 1 applies information on low socioeconomic status, type 2 considers poor housing conditions and mobility constraints.

Let CBx be a circuit boundary in which \({P}_{\!l}^{\,{\rm{blackout}}}({\rm{CB}}_{x})\), percentage of households, were affected by a blackout lasting longer than l hours. For well-being assessment of type 1, we applied \({P}_{{\rm{HH}}}^{\,{\rm{se}}}\left({{\rm{CB}}}_{x}\right)\) that estimates the relative number of RPL_THEME1 larger than a given threshold within the circuit boundary CBx. For well-being assessment of type 2, we applied \({P}_{{\rm{HH}}}^{\,{\rm{ph}}\_{\rm{mc}}}\left({{\rm{CB}}}_{x}\right)\) that estimates the relative number of households with RPL_THEME4 larger than a given threshold within the circuit boundary CBx. The threshold value can be adjusted, and we used 0.3.

Further let \({P}_{l,{\rm{total}}}^{{\rm{blackout}}}\) be the share of all households in New Hanover County affected by blackouts lasting longer than l hours, \((\left({c}_{1},{d}_{1}\left({{\rm{CB}}}_{x}\right)\right),\left({c}_{2},{d}_{2}\left({{\rm{CB}}}_{x}\right)\right),\ldots ,({c}_{e},{d}_{e}({{\rm{CB}}}_{x})))\) all e RHS infrastructure in New Hanover County that are still running with criticality and distance to the affected households in CBx, J the index set of RHS critical infrastructure types (Supplementary Material) having no functional entity in New Hanover County, and \({\left({c}_{j}\right)}_{j\in J}\) their criticalities.

We introduce the following functions:

$${C}_{J}:=\prod _{j\in J}1/(1+{c}_{j})$$
(2)
$$\hat{A}({\rm{CB}}_{x}):=\left\{\begin{array}{ll}\quad1,\;if \;e=0\\ {({a}^{\mathop{\sum }\nolimits_{i=1}^{e}\frac{1}{{c}_{i}{d}_{i}}})^{{C}_{J}}},\;\rm{else}\end{array}\right.$$
(3)

where 0 < a < 1.

$$\hat{B}({\rm{CB}}_{x}):=\left\{\begin{array}{ll}0,\;if\,{P}_{\!l,{\rm{total}}}^{\,{\rm{blackout}}}=0\\ {b}^{1/{P}_{\!l,{\rm{total}}}^{\,{\rm{blackout}}}},\;{\rm{else}}\end{array}\right.$$
(4)

where 0 < b < 1.

The assessment of the two types of well-being per circuit boundary is given as follows, and for the sake of simplicity, we neglected the argument CBx in the above-mentioned objects:

$${\rm{wl}}_{{\rm{type}}1}({\rm{CB}}_{x}){\rm{:= }}{P}_{\!l}^{\;{\rm{blackout}}}\times {P}_{{\rm{HH}}}^{\;{\rm{se}}}\times \hat{A}\times \hat{B}$$
(5)
$${\rm{wl}}_{{\rm{type}}2}({\rm{CB}}_{x}){\rm{:= }}{P}_{\!l}^{\;{\rm{blackout}}}\times {P}_{{\rm{HH}}}^{\;{\rm{ph}}{{\_}}{\rm{mc}}}\times \hat{A}\times \hat{B}$$
(6)

For the qualitative behaviour, it does not matter what specific values a and b have as long they are between 0 and 1. For our study, we set a to be 0.5 and b to be 0.9.

The factor \(\hat{A}\) is attributed to well-being losses referring to the reachability of still running RHS infrastructure and their criticalities in the aftermath of a shock event; if an RHS critical infrastructure type has no functional entity, well-being decreases since this particular RHS service cannot be provided.

Metrics for assessing microgrids in built environments

Here, urban resilience refers to the functioning of critical services despite power outages due to baseline scenarios.

The following metrics always refer to the evaluation of a microgrid districting solution S. The greater their values, the better the evaluation. IS is the index set referring to all microgrid boundaries in S. J is the index set referring to all infrastructure, including households, in New Hanover County and \({J}_{A}\subset J\) is the index set referring to all infrastructure belonging to a microgrid \(A\in {I}_{S}\). Railroads, roads and highways were not included because these infrastructures span the entire urban area and microgrids are primarily concerned with serving local infrastructure. Drinking water infrastructure and shelters were also not considered, as there was only one unit for each of these infrastructures. Furthermore, let cj and pj be the criticality and the peak load, respectively, of an infrastructure \(j\in J\).

Resilience referring to critical infrastructure: In the following, we refer to two metrics addressing the concentration of high-criticality, high peak load infrastructure in a microgrid and the distribution of RHS infrastructure per microgrid.

Equation (7) evaluates the density of high peak load, high-criticality infrastructure50 in a microgrid A:

$${\rm{C{D}}}_{A}^{x,y}:=\sum _{j\in {J}_{A}}{\left(\frac{{c}_{\!j}}{{\sum }_{k\in J}{c}_{k}}\right)}^{1-x}\cdot {\left(\frac{{p}_{\!j}}{{\sum }_{k\in J}{p}_{k}}\right)}^{1-y}$$
(7)

where 0 ≤ x, y ≤ 1 and x + y = 1. The coefficients x and y may be adjusted according to how criticality is relatively ranked compared to the peak load. The metric that measures the criticality and peak load density of critical infrastructure for a microgrid solution S is given in equation (8).

$${R}_{1}(S):=\left(\mathop{\rm{max}}\limits_{{A}\in{S}}{\rm{CD}}_{A}^{x,y}\right)^{-1}$$
(8)

Let \({J}_{A}^{\,{\rm{RHS}}}\) be the index set of all RHS infrastructure in A and \({{\rm{RHS}}}_{A}(i)\) the number of RHS infrastructure \(i\in {J}_{A}^{\,{\rm{RHS}}}\) in A.

\({\rm{Let}}\,{R}_{2}^{A}:=\mathop{\prod}\limits_{i\in {J}_{A}^{\rm{RHS}}}\mathop{\prod}\limits_{j\in {J}_{A}^{\rm{RHS}}\backslash \{i\}}\frac{\min ({\rm{RH{S}}}_{A}(i),{\rm{RH{S}}}_{A}(j))}{\max ({\rm{RH{S}}}_{A}(i),{\rm{RH{S}}}_{A}(j))}\) and \(f\in (0,1)\), \(\widehat{{I}_{S}}:=\left\{A\in {I}_{S}\right.\) \(:\left.{R}_{2}^{A}=0\right\}\) and \(n:=|\widehat{{I}_{S}}|\).

Equation (10) defines the metric that evaluates the homogeneous distribution of RHS infrastructure in S.

$$\overline{{R}_{2}}(S):=\left\{\begin{array}{ll}\quad0,\;if\,\;n=|{I}_{S}|\\ {f}^{\;n}\cdot \mathop{\min }\limits_{A{\epsilon }{I}_{S}\backslash \widehat{{I}_{S}}}{R}_{2}^{A},\;{\rm{else}}\end{array}\right.$$
(9)
$${R}_{2}(S):={d}^{|{\log }_{10}\overline{{R}_{2}}(S)|}$$
(10)

where 0 < d < 1, and is set to be 0.8 for our optimization studies.

The more microgrids there are that do not have all RHS infrastructure, the lesser R2 (S) gets.

Cost factors for microgrid implementation: Solutions should always be economically feasible. Here we explain the factors of costs associated with microgrid districting that we used to measure cost efficiency of microgrid districting.

In our case study, we used an estimation of existing medium voltage circuit boundaries in New Hanover County. Medium voltage circuits can be fed from more than one substation controlled by switches and tie breakers. To connect two medium voltage circuits that are not fed by one substation would mean expensive infrastructure measures. We can directly infer that if planning is too small scale, that is, a large number of microgrids are to be installed, then correspondingly large investments in microgrid technology, power electronics, information and communication technology infrastructure, and energy management centres must be made17,49.

Let h be the number of substations that belong to the circuit boundaries that were utilized for defining the boundaries of microgrid A and were not connected with each other in the medium voltage grid. The more substations are involved, the more expensive it gets; this is described with equation (11).

$${F}_{1}(S):=\prod _{A{\epsilon }{I}_{S}}{s}^{h-1}$$
(11)

where 0 < s < 1.

The more microgrids there are, the more expensive it will be to set them up and equip them with the appropriate management units and the necessary information and communication technology infrastructure, which is evaluated via equation (12).

$${F}_{2}(S){\rm{:= }}{f}^{\;{{|}}{I}_{S}{{|}}}$$
(12)

where 0 < f < 1.

Implementing microgrids that cover areas that are not geographically connected is a costly endeavour, as they require connecting cables, which is measured with equation (13).

$${F}_{3}(S):=\prod _{A{\epsilon }{I}_{S}}{p}^{\hat{a}-1}$$
(13)

where \(\hat{a}\) is the number of path components of A.

Since we were only interested in relative comparison, we did not need explicit cost calculations for microgrids. However, estimated implementation costs as in ref. 17 are implicitly considered in equation (12).

Distribution of potentials for photovoltaics and neighbourhood energy storage location over all microgrids: Equal photovoltaics installation potential and neighbourhood energy storage location potentials were assessed with equations (14) and (15).

$${\rm{SST}}(S):=\prod _{A\in {I}_{S}}\prod _{B\in {I}_{S}\backslash \{A\}}\frac{{\min}({\rm{bP}}(A),{\rm{bP}}(B))}{{\max}({\rm{bP}}(A),{\rm{bP}}(B))}$$
(14)

where bP(A) and bP(B) is the aggregated area of building permits in microgrid A and B, respectively.

$${\rm{SPV}}(S):=\prod _{A\in {I}_{S}}\prod _{B\in {I}_{S}\backslash \{A\}}\frac{{\min}({\rm{pv}}(A),{\rm{}}pv(B))}{{\max}({\rm{pv}}(A),{\rm{pv}}(B))}$$
(15)

where pv(A) and pv(B) is the aggregated rooftop-photovoltaics potential in microgrid A and B, respectively.

Representation of socially vulnerable groups in a microgrid: Let \(0 < {s}_{1} < \ldots < {s}_{p} < 1\) define equidistant Social Vulnerability Index-intervals that fully cover [0,1] and which are indexed by \(P:= \{1,\ldots ,p+1\}\) and let l P.

$$\begin{array}{l}{{{\rm{SVI}}H}}_{A}\left(l\right){{:= }}\\\left\{\begin{array}{c}{\bf{1}},\quad{{\rm{if}}\; {\rm{there}}\; {\rm{are}}\; {\rm{no}}\; {\rm{households}}\; {\rm{with}}\; {\rm{SVI}}\; {\rm{value}}\; {\rm{in}}\; {\rm{the}}\; l{\rm{th}}\; {\rm{interval}}}\\ {{{\rm{the}}\; {\rm{number}}\; {\rm{of}}\; {\rm{households}}\; {\rm{with}}\; {\rm{SVI}}\; {\rm{value}}\; {\rm{in}}\; {\rm{the}}\; l{\rm{th}}\; {\rm{interval}}}},{\rm{else}}\end{array}\right.\end{array}$$
(16)

be the metric that evaluates whether a microgrid contains households belonging to a certain Social Vulnerability Index-interval.

Let

$$\begin{array}{l}{\rm{F{D}}}_{A}(S):=\\\left\{\begin{array}{l}1,\quad{\rm{if}}\,A\,{\rm{contains}}\,{\rm{only}}\,{\rm{households}}\,{\rm{belonging}}\,{\rm{to}}\,{\rm{exactly}}\,{\rm{one}}\,{\rm{SVI}}\,{\rm{interval}}\,\\\qquad\qquad\qquad\mathop{\prod}\limits_{i\in P}\mathop{\prod}\limits_{j\in P\backslash \{i\}}\frac{{\min}({\rm{SVI}}{H}_{A}(i),\,{\rm{SVI}}{H}_{A}(j))}{{\max}({\rm{SVI}}{H}_{A}(i),{\rm{SVI}}{H}_{A}(j))},{\rm{else}}\end{array}\right.\end{array}$$
(17)

be the degree of homogeneous distribution of households with respect to their Social Vulnerability Index within microgrid A.

An overall evaluation of solution S referring to the homogeneous distribution of households with respect to their Social Vulnerability Index per microgrid is given by equation (17)

$${{\rm{FD}}}\left(S\right){\rm{:= }}{\min }_{A\in {I}_{S}}{\rm{F{D}}}_{A}\left(S\right)$$
(18)

Pareto optimization and evolutionary algorithm

The metrics R1, R2, F1, F2, F3, SST, SPV, FD represent different criteria or objective variables for assessing microgrid districting. A weighted sum of these metrics is the objective function being applied for finding optimal spatio-topological solutions for microgrid planning. To give a positive answer to the research question, we chose the weights in such a way that all criteria were considered (Supplementary Material). Here, finding an optimal solution had a maximized objective function. This is a districting problem with multiple objective variables similar to the districting problem in the context of gerrymandering32. This type of optimization problem is considered to be at least non-deterministic polynomial time hard69. Underlying this problem are so-called building blocks, in this work, the medium voltage circuits or the geographic extent of the respective service areas associated with them, which cover the city without overlap and combinable metrics that make this problem a Pareto optimization problem. Here, microgrid districting involved assigning building blocks, such as medium voltage circuits, to clusters, forming microgrid boundaries. Solutions ranged from each block in a separate cluster to all blocks in one. Evolutionary algorithms70 offer feasible solution approaches, with complexity based on block number and a weighted sum fitness function. Realistic constraints limit microgrid numbers, focusing on a fixed upper limit. The solution space reduces to partitions with a maximum number of subsets71. This approach ensures practicality in considering mathematically conceivable microgrid numbers in urban planning. In our case, with 64 building blocks, considering only five microgrids would still lead to a very large number of possible solutions—more than 1042.

The implemented evolutionary algorithm was based on the following assumptions:

  1. 1.

    For economic reasons, there is a maximum number of clusters/microgrids specified; this drastically limits the solution space, which can be specified case by case (Supplementary Material).

  2. 2.

    The microgrids are geographically interconnected.

Monte Carlo simulations and baseline scenarios

To assess how urban-resilient microgrid districting is against multiple baseline scenarios, we used Monte Carlo simulations of these scenarios and aggregated well-being losses using equations (5) and (6). The less aggregated well-being losses are, the more urban resilient the microgrid districting is.

Variation of different blackout scenarios based on the power outage data we have for Hurricane Florence: Of interest here is the maximum percentage of affected customers per circuit boundary who were without power from the grid for at least x hours; we chose 8 hours for our calculations. For studies regarding the impact of comparable or larger outages in the distribution grid, higher outage rates, for example, beyond the 95% quantile, were randomly assigned to selected circuit boundaries within defined parameter bounds. Since hybrid hazards were addressed, certain microgrids might suffer a total outage due to cyber attacks. These were randomly selected within appropriate parameter limits that relate to the number of affected microgrids, and the number of affected customers was set to 100%. In addition, the number of affected RHS infrastructure, aligned with the number of affected customers, was also randomly determined. The parameters and their intervals are given as follows:

The number of affected circuit boundaries getting assigned another rate of affected customers:

\({\rm{c{b}}}_{b}\in \left[{A}_{{{\rm{cb}}\_}\min },{A}_{{{\rm{cb}}\_}\max }\right]\), \({a}_{{r\_\rm{hh}}}\in [{P}_{{{\rm{hh}}\_}\min },{P}_{{{\rm{hh}}\_}\max }]\) and \({a}_{{r\_cci}}\in\left[{P}_{{cci\_}\min },\right.\) \(\left.{P}_{{cci\_}\max }\right]\) for households, commercial customers and critical infrastructure, respectively.

The number of affected RHS infrastructure, depending on the total outage rate in the corresponding circuit boundary:

$${{\rm{rhs}}}_{r}\in [{P}_{{\rm{rhs}}{\rm{\_}}\min },{P}_{{\rm{rhs}}{\rm{\_}}\max }]$$

The number of affected microgrids:

$${{\rm{mg}}}_{b}\in \left[{A}_{{\rm{mg}}{\rm{\_}}\min },{A}_{{\rm{mg}}{\rm{\_}}\max }\right]$$

The selection of each parameter was based on a uniform distribution. For a selected microgrid solution, a Monte Carlo simulation was run and per-run well-being losses for both types (equations (5) and (6)) were calculated per circuit boundary and added to the previous results. The higher the values, the worse the protection of the microgrid against losses of well-being.

For our Monte Carlo simulations (100,000 runs), we applied the following parameter setting:

\({A}_{{\rm{cb}\_}\min }=2\), \({A}_{{\rm{cb}\_}\max }=5\), \({P}_{{\rm{hh}\_}\min }=0.9\), \({P}_{{\rm{hh}\_}\max }=1\), \({P}_{{cci\_}\min }=0.9\), \({P}_{{cci\_}\max }=1\), \({P}_{{\rm{rhs}\_}\min }=0.9\), \({P}_{{\rm{rhs}\_}\max }=1\), \({A}_{{\rm{mg}\_}\min }=1\), \({A}_{{\rm{mg}\_}\max }=3\).

Model limitations

Due to the large problem complexity, which is even larger for bigger cities with more medium voltage circuits than in New Hanover County, the evolutionary algorithm implemented here has to be used with additional strategy parameters and on high performance computers. A further complexity aggravation arises if instead of the medium voltage circuits, the low voltage networks are taken as building blocks. This would provide a spatially finer granularity and thus a more accurate (that is, less aggregated) projection of social vulnerability to households. The space of possible solutions would thus be drastically increased, while better solutions would also become possible. Furthermore, enhanced computational efficiency can be achieved through the refinement of equations, particularly those related to FD (equation (18)). In addition, the normalization process can be improved to facilitate a more comprehensive and integrated treatment of the metrics.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.