Optimal Microgrids in Buildings with Critical Loads and Hybrid Energy Storage

: This research aims to optimize and compare the annual costs of energy services in buildings with critical loads and analyze case studies for hospitals and higher education institutions in the United States. Besides electricity and natural gas costs, the study considers all the infrastructure costs of capital amortization and maintenance. In addition, it studies energy resilience improvement due to distributed generation, including solar photovoltaic, solar thermal, internal combustion engine, and fuel cell sources. The optimization considers the electrical consumption, the heating and cooling demands, and the operational strategy of the energy storage systems. To simulate real scenarios, energy tariffs were modeled and considered, and final optimization results were produced. Some of the microgrid load was considered critical to model resilience benefits. The results show that if favorable energy tariffs are applied, the benefits of increasing energy resilience represent a novel market with high potential in facilities with significant critical loads. This methodology can be used in similar scenarios, adapting each particular load profile and critical load to provide a combined optimal solution regarding resilience and economic benefits.


Introduction
This research presents a methodology to quantify the potential benefits of implementing distributed generation in critical buildings, such as higher education institutions, hospitals, and other health facilities.Several strategies have been proposed to improve building energy resilience, such as combined heat and power, thermal and electrical storage, and isolated electrical operation from the grid.As a consequence of the use of these systems, the improvement of building energy resilience has been calculated and evaluated.To achieve the above objective, the microgrid requires energy storage systems combined with distributed generation (offering a backup supply) [1].In this paper, a model which can be extensively applied to different buildings and facilities was used to consider facilities with critical loads that are electrically independent of the rest of the system and evaluate two different building typologies for locations in New York and California.The final objective of the research was to provide an accurate calculation of the improvement in energy resilience due to the use of distributed generation systems.For this purpose, the model quantified the specific values and characteristics of critical loads in comparison to the rest of the relevant non-critical loads.
A software tool developed by NREL, REopt [2], was used in the research to effectively minimize the total annual costs to supply the required energy services to final-use buildings of two different typologies.The strategy globally minimizes energy costs (purchasing electricity and natural gas) and capital costs, including maintenance costs, for distributed generation systems and the amortization of investments.To present real case studies and avoid artificial purchase and operational costs, commercially available generators for distributed generation, which provide the most accurate replication of the technical state of the art, were considered.
Considering the constraints, the REopt software calculated an optimal scheme for the distributed generation systems, including the required thermal and electrical storage.An hourly resolution was used in the calculation process, and the optimal dispatch strategy and economic parameters were calculated and a financial evaluation and analysis of the improvement in the microgrid were performed [3].The REopt software determined the optimal mix of conventional and renewable generation and electrical and thermal storage.Additional measures, such as load management and energy conservation measures, were also evaluated.Without an optimization strategy like the one presented in this research, achieving an optimal solution that increases resilience and combines energy optimization is impossible.Microgrids designed for distributed generation that integrate energy storage and combine the optimization of economic, energy resilience, and emission parameters require a more complex approach compared to the traditional sizing strategies used for system sizing in buildings [4].
For real-world applications, the end energy users cannot modify the tariff structure, which includes both energy and fixed payments, to contribute to the maintenance costs of the whole power grid infrastructure.However, the users can adopt a strategy that effectively reduces the peak of energy demand in their facilities and reduces their associated fees [5].The optimization strategy in the evaluated buildings considers several aspects, including operational constraints and energy balances, ensuring that an optimal combination of energy production and storage matches the load demand.

Literature Review and the State of the Art
In the past literature, it is possible to find many research papers that analyze the benefits of distributed generators in microgrids' economics and energy resilience.Among the most notable may be those carried out by Kobashi et al., who performed technoeconomic analyses on rooftop PV systems combined with stand-alone batteries or electric vehicles for residential and commercial districts in Japan from 2020 to 2040 [6]; Jin et al. who investigated the pricing and operation strategy with distributed resources for a microgrid retailer in an integrated energy system [7]; Hoang et al. who critically analyzed critical targets of a smart energy system, such as performance, costs, environmental benefits, and feasibility [8]; and the investigation conducted by Reynolds et al., who studied two different district energy management strategies to optimize the systems they considered: one that optimizes district heat generation from a multi-vector energy center and a second that directly controls building demand via the heating set point temperature in addition to the heat generation [9].
Nevertheless, evaluating load profiles, tariff structures, and available solar radiation impacts on energy costs and carbon emissions in buildings with critical loads from a resilience and financial perspective has not been given the same attention.Therefore, a study that addresses these issues is necessary.From a deep survey of the grey literature and the updated literature related to the topic addressed here, it was found that, although there are many different approaches, this research presents a methodology that contributes to the state of the art by proposing a resiliency perspective and financial perspective in the assessment of load profiles, tariff structures, and available solar radiation (to our knowledge, so far not addressed for energy microgrids).
Critical loads are systems or equipment required to sustain key social services, such as cellular base stations and hospitals.Critical loads demand a continuous power supply due to their societal relevance.National and international standards and regulations specify the powering requirements for critical loads [10].Typically, fossil fuel generators generate or support essential loads [11].In recent years, society has seen an exponential growth in critical loads, necessitating the search for sustainable and dependable alternatives to powering critical loads [12].
Microgrids with renewable regeneration and energy storage have received much attention as a viable solution for powering essential loads.Microgrids' flexibility and simplicity of installation, as well as their ability to operate independently of the utility grid, have made them an ideal alternative for replacing fossil fuel generators for essential load powering and backup [13,14].Furthermore, recent advancements in the cost and performance of photovoltaic (PV) modules have boosted renewable microgrids' standing in the competitive energy market [15].Renewable microgrids have two primary benefits over fossil fuel backup generators: they can generate electricity on site without fuel supply connections and they need less maintenance [16].
A microgrid should be carefully developed and optimized with respect to its economic feasibility while meeting essential load power requirements [17].There are two approaches to improving the overall performance of a microgrid: (1) system design, which is the appropriate configuration and sizing of microgrid components; (2) operations management, which is the best allocation of energy resources [18,19].Existing microgrid design tools and methodologies mainly focus on calculating the number of energy sources required to optimize the microgrid's financial performance [20].
A microgrid is a small-scale energy system with distributed generators, energy storage, load, and control units.It can operate in grid-connected or off-grid modes, ensuring power supply for a specific region [21].Microgrids can be essential in providing resilience at the neighborhood and community levels [22].Although microgrids may operate independently and are dependable, operation management is required to prevent uneven power supply and improve its quality in the event of grid loss.The control-based method that aids microgrid repair and mitigates the effects of catastrophic disasters may be deemed operationally resilient [23].To strengthen a system's operational resilience, the likelihood of loss should be reduced as much as feasible while considering the system's economic aspects.
Several sorts of research have been undertaken throughout the last decade.In particular, work closely related to this paper includes the study conducted by Afonaa-Mensah et al. [24], who investigated the impact of industrial loads on the efficiency of renewable energy-based off-grid rural electrification systems in Ghana; the study presented by Yuan et al. [25], who examined the influence of projected climate change on the energy usage of residential structures in Japan over the next five decades; and the study by Hervás-Zaragoza et al. [26], who explored how to increase the energy resilience of a hospital by the installation of a microgrid comprised entirely of a solar system functioning in tandem with a diesel generator.
Some additional previous studies have focused on the use of multi-energy systems at urban scales [27,28], and the most relevant research efforts are related to the design and evaluation of DER (Distributed Energy Resources) energy systems as available systems to enhance whole-grid resilience [29][30][31][32][33][34][35][36].Control strategies [37][38][39][40][41][42][43][44] and control systems have been deeply analyzed, and extensive research on the optimization and multi-objective optimization of control strategies has been applied to microgrids [45][46][47][48][49][50][51][52][53][54].Still, there need to be particular case studies of the influence of load profiles, tariff structures, and available solar radiation impacts on energy costs and carbon emissions in buildings with critical loads and of the impacts on resilience.The study performed by Mishra and Anderson [55] is the most relevant application of the REopt web tool in this research field.The authors presented a fixed design approach and proposed the simulation of an outage to calculate resilience improvement using DER systems.At the same time, the study by Manikandan and Cao [56] focused on the nature and duration of power outages, specifically on electric trains.
This research aims to integrate existing research and novel approaches to power outages to analyze critical buildings.These types of buildings require specific attention, as one outage can lead to severe economic, social, and technical damages.As an added novelty with respect to the current state of the art, this research includes a financial perspective to ensure that the whole problem is analyzed.The novelty of this paper and the method presented here are justified through a thorough literature review.
This first section has briefly discussed the scope of the paper and presented the software used to perform the simulations.In the second section, the method used to carry out the research will be described.The third section will present and discuss case studies on load profiles, tariff structures, and the impact of available solar radiation on energy costs and carbon emission reduction in commercial locales with critical loads.Section four is reserved for the conclusions.Finally, it should be mentioned that this paper includes additional relevant information in an appendix, including the inputs for the software used so that potential field researchers can replicate and adapt the methodology.

Materials and Methods
The study focuses on optimizing a microgrid applied to different types of buildings.The optimization uses the Renewable Energy Integration & Optimization tool called REopt-a web tool provided by the National Renewable Energy Laboratory (NREL).

Optimization Tool: REopt
Figure 1 presents the resources and technological options in the REopt tool.This software selects an optimal configuration combining the optimal electricity grid supply, thermal and electrical storage, cooling and heating systems, and distributed generators.
To optimize energy goals in terms of cost savings, resilience, and clean energy, the following potential technologies were used in the proposed microgrids: solar PV, batteries, diesel generators, wind energy, CHP (based on reciprocating engines, microturbines, combustion turbines, and fuel cells), chilled water storage, and geothermal heat pumps.
From here on, it will be understood that the critical load is the percentage, referred to as the maximum electricity demand that must be satisfied by the proposed technology after a failure occurs in the power grid [57] It is relevant to mention that, depending on the building's use, the critical load varies greatly, typically between 10% and 100% of the maximum electricity demand [3].Considering the references in the literature, it will be assumed that the critical load of the higher education center is 25% for the evaluations carried out in the research presented here.This assumption is based on the current state of the art in resilience analysis, as this value is fixed as the reference for international organizations and researchers in this field [58,59].In comparison and following the usual reference values in previous research and technical reports, the critical load of the hospital is 50% of the maximum electricity demand, a fixed value in various previous studies [60][61][62][63].This is in line with ensuring maximum resilience in hospitals, where the critical loads are relevant to ensure that the medical activities can be effectively carried out without putting patients at risk.
Model data show the inputs used to model the technologies evaluated (PV, batteries, grids, generators, wind, CHP, chilled water storage, and geothermal heat pumps) and optimize certain energy goals (cost savings, resilience, and clean energy).All inputs for the different component models of the systems are available in the Reopt User Manual [3].The research presented here evaluates the possibility of storing electrical and thermal energy.In this regard, the REopt software evaluates the maximum energy that can be stored hour by hour and the minimum capacity that must be satisfied to avoid damaging the relevant equipment.Following, respectively, [64,65], the minimum state of charge selected for the batteries to be evaluated is 20% and 10% for the chilled water storage.
With the REopt software, the user determines the outage period(s) the system must maintain by defining the start date, time, and length.Users have the option of modeling one or more downtime times.With the REopt software, the user determines the outage period(s) the system must maintain by defining the start date, time, and length.Users have the option of modeling one or more downtime times.
The REopt software's single-outage concept allows users to define one outage each year.The user can automatically populate the outage start date and time with the date and time corresponding to the maximum load hour.In general, choosing an outage start date when the site's demand is higher (as in this article) will result in bigger system sizes capable of supporting the essential load throughout more outages.Choosing an outage period during a time of year when the site's demand is lower may result in smaller system sizes that can support the essential load for fewer outages.However, solar and/or wind resources will influence system robustness.Outage occurrences may affect the size or DER types chosen in the optimization.However, outage times do not affect the lifetime costs of grid-purchased power, and any additional fuel burnt during outages is not included in the lifecycle costs.The REopt software's single-outage concept allows users to define one outage each year.The user can automatically populate the outage start date and time with the date and time corresponding to the maximum load hour.In general, choosing an outage start date when the site's demand is higher (as in this article) will result in bigger system sizes capable of supporting the essential load throughout more outages.Choosing an outage period during a time of year when the site's demand is lower may result in smaller system sizes that can support the essential load for fewer outages.However, solar and/or wind resources will influence system robustness.Outage occurrences may affect the size or DER types chosen in the optimization.However, outage times do not affect the lifetime costs of grid-purchased power, and any additional fuel burnt during outages is not included in the lifecycle costs.
The outage time used in this article, as shown in Table 1, is based on the IEEE 1366-2022-IEEE Guide for Electric Power Distribution Reliability Indices [66] For further information about typical outages in the United States, the reviewer might consult Electric Power Monthly [67], a monthly compilation of the locations, lengths, and descriptions of major electric disruptions published by the United States Energy Information Administration, and the information, if required, is available actualized up to the last available dates at [67].When a simulation is performed using the REopt web tool, the following warning will be displayed: "This optimized size may not be commercially available.The user is responsible for finding a commercial product closest to this optimized size".In this sense, a distinction should be made between continuously sized and discretely sized technologies [68].Continuously sized technologies do not have a rated capacity, and power units can be invested [68].Discretely sized technologies have a nominal capacity, and the investment has to be made per device [68,69].It should also be noted that, regardless of whether the technologies are continuously sized or discretely sized, the economies of scale in distributed generation (cost per kW vs. size of the unit in kW) [70] are considered (the research presented here took this circumstance into account when evaluating the inputs shown in the attached research data).As the REopt web tool optimizes the proposed scenarios, it has an objective function that minimizes the energy life cycle cost (i.e., capital, operation, maintenance, utility, and emission costs) while maximizing different economic aspects, such as energy exports and other incentives.The solver also includes various constraints:

•
Fuel constraints: burning rates per technology and electricity and thermal outputs.• Thermal production constraints: nominal equipment thermal power and its production per hour.

•
Storage system constraints: state of charge for different moments and the nominal powers of the system.

•
Production constraints: minimum and maximum values which should be maintained throughout production.

•
Production incentives: economic incentives per technology.

•
Power rating: this ensures that the equipment's power is within the imposed limits.

•
Load balancing and grid sales: balance between the microgrid system and the sales with the grid.

•
Rate tariff constraints: net metering and peak power demand charges per month or per time of use.

•
Minimum utility charge: the minimum payment made to the utility.

•
Operating reserves: unused power for each time step.

•
Emissions and renewable production targets: if the user provides the relevant information, the tool will optimize performance to achieve the emissions and renewable energy targets.

•
Non-negativity: ensures that all variables are positive or zero.

Buildings Analyzed
This paper analyzed two types of buildings to compare the microgrids in different scenarios: hospitals and high schools.Hospital microgrid configurations must fulfill 40% to 50% of their loads at any time, as they are critical for the buildings' operations.Conversely, high schools and educational centers have a different operation profile.They operate during workdays, and the loads are not as critical as in hospitals, as they only need to meet the occupants' comfort requirements.Nevertheless, the study aims to optimize the operations of both sets of microgrids while suffering an electric outage.
The work studied two locations in the US for the proposed buildings: New York and California.Both areas have lately suffered numerous blackouts and brownouts.According to the National Grid, New York usually suffers during the colder months due to winter storms, such as the one on 9 January 2024, which isolated more than 70,000 people in western and central New York.In California, the summer is the most critical season for its electrical grid, since heat waves considerably increase the use of air conditioning (AC) devices and numerous wildfires put stresses on the electrical grid and cause line cuts.In 2020, Pacific Gas and Electric (PG&E) and Southern Californian Edison (SCE) reported over 9000 power outages in California.
Considering the different types of buildings and locations, the following buildings based in the states of California and New York were used to carry out the optimization: California:

•
Palomar Medical Center Escondido (hospital) [71]; New York: • Golisano Children's Hospital (hospital) [73]; Regarding the energy loads, the study focused on analyzing power, heating, and cooling loads.The following subsection displays the different loads.

Power Loads
Figures 2-5 show the annual power loads for the four cases: to 50% of their loads at any time, as they are critical for the buildings' operations.Conversely, high schools and educational centers have a different operation profile.They operate during workdays, and the loads are not as critical as in hospitals, as they only need to meet the occupants' comfort requirements.Nevertheless, the study aims to optimize the operations of both sets of microgrids while suffering an electric outage.
The work studied two locations in the US for the proposed buildings: New York and California.Both areas have lately suffered numerous blackouts and brownouts.According to the National Grid, New York usually suffers during the colder months due to winter storms, such as the one on 9 January 2024, which isolated more than 70,000 people in western and central New York.In California, the summer is the most critical season for its electrical grid, since heat waves considerably increase the use of air conditioning (AC) devices and numerous wildfires put stresses on the electrical grid and cause line cuts.In 2020, Pacific Gas and Electric (PG&E) and Southern Californian Edison (SCE) reported over 9000 power outages in California.
Considering the different types of buildings and locations, the following buildings based in the states of California and New York were used to carry out the optimization: Regarding the energy loads, the study focused on analyzing power, heating, and cooling loads.The following subsection displays the different loads.to 50% of their loads at any time, as they are critical for the buildings' operations.Conversely, high schools and educational centers have a different operation profile.They operate during workdays, and the loads are not as critical as in hospitals, as they only need to meet the occupants' comfort requirements.Nevertheless, the study aims to optimize the operations of both sets of microgrids while suffering an electric outage.

Power Loads
The work studied two locations in the US for the proposed buildings: New York and California.Both areas have lately suffered numerous blackouts and brownouts.According to the National Grid, New York usually suffers during the colder months due to winter storms, such as the one on 9 January 2024, which isolated more than 70,000 people in western and central New York.In California, the summer is the most critical season for its electrical grid, since heat waves considerably increase the use of air conditioning (AC) devices and numerous wildfires put stresses on the electrical grid and cause line cuts.In 2020, Pacific Gas and Electric (PG&E) and Southern Californian Edison (SCE) reported over 9000 power outages in California.
Considering the different types of buildings and locations, the following buildings based in the states of California and New York were used to carry out the optimization: Regarding the energy loads, the study focused on analyzing power, heating, and cooling loads.The following subsection displays the different loads.Both hospitals have an almost constant power load throughout the year, slightly increasing during the summer months for Golisano Children's Hospital.On the contrary, the high schools have a slightly more significant power load difference between winter and summer.Camino Nuevo High School reduces its load between July and September.Beacon High School slightly increases its load from May to November, while having some days with consumption rates similar to the rest of the year.

Power Loads
For further details, Tables 2 and 3 display the average, maximum, and minimum power loads per building: The three load parameters (average, minimum, and maximum) show that the hospitals have a greater power demand than the high schools.Specifically, the Paloma Medical Center's demand is much larger than the low demand of the Camino Nuevo High School.
The lowest demands occur during winter for the hospitals and in August for the high schools.Camino Nuevo High School usually has summer vacation in August, while Beacon High School's is in July.Regarding the maximum demands, these occur between June and September.The hospitals reach their peak loads in August, Beacon High School Both hospitals have an almost constant power load throughout the year, slightly increasing during the summer months for Golisano Children's Hospital.On the contrary, the high schools have a slightly more significant power load difference between winter and summer.Camino Nuevo High School reduces its load between July and September.Beacon High School slightly increases its load from May to November, while having some days with consumption rates similar to the rest of the year.
For further details, Tables 2 and 3 display the average, maximum, and minimum power loads per building: The three load parameters (average, minimum, and maximum) show that the hospitals have a greater power demand than the high schools.Specifically, the Paloma Medical Center's demand is much larger than the low demand of the Camino Nuevo High School.
The lowest demands occur during winter for the hospitals and in August for the high schools.Camino Nuevo High School usually has summer vacation in August, while Beacon High School's is in July.Regarding the maximum demands, these occur between June and September.The hospitals reach their peak loads in August, Beacon High School reaches its peak load at the end of June, and Camino Nuevo High School reaches its peak load at the end of September.reaches its peak load at the end of June, and Camino Nuevo High School reaches its peak load at the end of September.The plots display the space heating demand in green and the domestic hot water (DHW) demand in blue, which is lower than the space heating demand in all the cases.In addition, the DHW is constant during the year, while the space heating demand drops during the summer months.

Heating Loads
Tables 4-6 show further details about the average, minimum, and maximum heating demands per case:     The plots display the space heating demand in green and the domestic hot water (DHW) demand in blue, which is lower than the space heating demand in all the cases.In addition, the DHW is constant during the year, while the space heating demand drops during the summer months.
Tables 4-6 show further details about the average, minimum, and maximum heating demands per case:     The plots display the space heating demand in green and the domestic hot water (DHW) demand in blue, which is lower than the space heating demand in all the cases.In addition, the DHW is constant during the year, while the space heating demand drops during the summer months.
Tables 4-6 show further details about the average, minimum, and maximum heating demands per case: The plots display the space heating demand in green and the domestic hot water (DHW) demand in blue, which is lower than the space heating demand in all the cases.In addition, the DHW is constant during the year, while the space heating demand drops during the summer months.
Tables 4-6 show further details about the average, minimum, and maximum heating demands per case: In all four cases, the maximum heating demand occurs during winter (between December and January).The high schools are remarkable for their minimum heating demands, since their minimum space heating and DHW demands, which are null, occur in the first days of January.The null demands might be due to the high schools' closure during the winter vacation.On the contrary, the hospitals have their lowest heating demands in summer, when the space heating demands are at their lowest.

Cooling Plant Thermal Loads
The microgrid configurations include a cooling plant.Figures 10-13  In all four cases, the maximum heating demand occurs during winter (between December and January).The high schools are remarkable for their minimum heating demands, since their minimum space heating and DHW demands, which are null, occur in the first days of January.The null demands might be due to the high schools' closure during the winter vacation.On the contrary, the hospitals have their lowest heating demands in summer, when the space heating demands are at their lowest.

Cooling Plant Thermal Loads
The microgrid configurations include a cooling plant.Figures 10-13 show the annual thermal loads of the cooling plants per case:    In all cases, the cooling plant thermal load grows from May to November.The build-   In all cases, the cooling plant thermal load grows from May to November.The build- In all cases, the cooling plant thermal load grows from May to November.The buildings located in New York (Golisano Children's Hospital and Beacon High School) have the most significant cooling plant thermal demands.They exceed 400 and 4000 tons of demand, respectively.In contrast, Palomar Medical Center and Camino Nuevo High School, located in California, peak at around 3 and 400 tons of cooling plant thermal load, respectively.In all cases, the cooling plant thermal load grows from May to November.The buildings located in New York (Golisano Children's Hospital and Beacon High School) have the most significant cooling plant thermal demands.They exceed 400 and 4000 tons of demand, respectively.In contrast, Palomar Medical Center and Camino Nuevo High School, located in California, peak at around 3 and 400 tons of cooling plant thermal load, respectively.
Tables 7-9 show further details about the cooling plant thermal loads per case:  Tables 7-9 show further details about the cooling plant thermal loads per case: As previously mentioned, the cases located in New York have the most significant cooling plant thermal demands.Regarding the high schools, Beacon High School's average demand is almost 3000 times higher than Camino Nuevo High School's average demand.
It is also remarkable that the minimum load in the high schools reaches 0. In contrast, the hospitals always have a minimum cooling demand due to their different energy needs.The maximum cooling plant thermal demands occur during the warmest months (between July and September).
Table 10 shows the main characteristics of the buildings and sites evaluated.Table 11 shows the geographical data and average horizontal daily global solar irradiation of the locales selected for this work.The outage period was chosen considering the historical outage duration for these locations, but this parameter can be adapted for different regions with less robust power systems.

Tariff Structures
This section discusses the tariff structure applied for the different cases.The buildings located in California use the Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) tariff and the cases in New York use the SC-9-General Large TOD Service [NYC] tariff.

Tariff Structures
This section discusses the tariff structure applied for the different cases.The buildings located in California use the Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) tariff and the cases in New York use the SC-9-General Large TOD Service [NYC] tariff.Figures 14 and 15 show the TOU weekday and weekend periods, respectively, for the selected Californian tariff:  Table 12 displays the rates per TOU period.Period Rate ($/kW)   During the hottest months, between June and September, the TOU period rates are great from 8 a.m. to 10 p.m. on weekdays, since the electrical power consumption increases due to the growth of cooling device loads.As the temperature tends to rocket in the middle of the day (from 12 p.m. to 5 p.m.), the TOU Period 3 rates are almost quadruple the Period 2 rates.This TOU rate distribution promotes electricity consumption during Period 1, when the overall electric load in the Californian grid is lower.Regarding the weekends, Period 1 is defined for every hour.Table 13 shows the rates per TOU period.Table 13 shows the rates per TOU period.Table 13 shows the rates per TOU period.During weekdays, the SC-9-General Large TOD Service [NYC] tariff includes TOU Period 2 between October and May from 8 a.m. and 9 p.m., which are the hours with higher activity throughout the year.From June to September, Period 4 and Period 3 replace Period 2. TOU Period 4 rates apply from 8 a.m. to 5 p.m., which coincides with the regular working hours of most of the active population and the hours with higher temperatures for those months in New York state.The following hours until 9 p.m. have Period 3 rates.As for weekends, the TOU tariff period is Period 1, as it is for less active hours during weekdays (from 10 p.m. to 7 a.m.).

Results and Discussion
This section discusses the various scenarios analyzed and the achieved results.

Palomar Medical Center Escondido (Hospital)
This section analyzes the study for the Palomar Medical Center Escondido.Table 14 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.System Performance Figure 18 presents the dispatch strategy optimized using the REopt software for the defined outage period.It can be noticed that the microgrid is resilient enough to fulfill the critical electric load with the electricity generated by the diesel generator and the CHP unit.
In addition, the total electric load peaks that appear just between a bit before 8:00 and 16:00 have been reduced.In the Business-as-Usual case, the peaks passed 4000 kW, whereas in this scenario, they are under that threshold, and solar PV and CHP technologies run to fulfill the new demand peaks.Due to the electric-peak reduction, the load shifted after

Camino Nuevo High School (High School)
This section analyzes the study for the Camino Nuevo High School.Table 15 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.

Camino Nuevo High School (High School)
This section analyzes the study for the Camino Nuevo High School.Table 15 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.System Performance Figure 20 depicts the dispatch strategy considering the optimization strategy using the REopt web tool for the outage period.
Buildings 2024, 14, x FOR PEER REVIEW 19 of 30 Figure 20 depicts the dispatch strategy considering the optimization strategy using the REopt web tool for the outage period.
During daylight, solar PV can supply most of the load, and on some occasions (24 September at midday and 26 September at 8:00), it charges the battery system of the microgrid.Notably, the excess PV electricity was curtailed on the 24 September because the battery was already full.Nevertheless, the electricity provided by solar PV and the battery system is enough to fulfill the demand peaks that coincide with the highest electricity rates.The battery system in the microgrid allows it to charge at low electricity rates so that the energy can be consumed at a later stage at higher prices.
Regarding the electrical outage, solar PV provided the necessary energy to meet the minimum load, and some solar energy was still generated to charge the battery.Hence, this microgrid configuration promotes the integration of renewable energies and increases the system's electrical resilience. in peak load that occurs when the technologies recommended by the REopt web tool are implemented and the subsequent peak reduction.Appendix Figure A3 shows the thermal dispatch strategy optimized by the REopt web tool, which is mainly met by the heating system serving and slightly by the CHP, and Appendix Figure A4 depicts the cooling thermal dispatch strategy optimized by the REopt web tool.In this case, the CHP unit fulfills all the cooling load, and the peaks are slightly reduced compared to the Business-as-Usual case. Figure 21 shows the reduction in peak load that occurs when the technologies recommended by the REopt web tool are implemented and the subsequent peak reduction.

Golisano Children's Hospital (Hospital)
section analyzes the study of the Golisano Children's Hospital.Table 16 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.It is relevant to mention that in REopt, the battery power (kW-AC) and capacity (kWh) are independently optimized for economic performance (and resiliency, if resiliency requirements are specified)-a power-to-energy ratio is not predefined [3].Thus, it is possible to have scenarios where the battery's capacity or power is null while the other parameter is not.

System Performance
Figure 22 shows the optimal dispatch strategy using the REopt web tool for a year and the specified outage period.As in the Palomar Medical Center Escondido hospital, in Golisano Children's Hospital, the electrical load peaks are slightly reduced compared to the Business-as-Usual case.Again, the load has been shifted from the high-price hours (between 7:00 and 17:00) to the lower-price hours of the evening and night.The remaining load peaks have been fulfilled with solar PV and CHP generation, while the electrical grid serving has been reduced during the periods with the highest electricity rates.
Figure 22 shows the optimal dispatch strategy using the REopt web tool for a year and the specified outage period.As in the Palomar Medical Center Escondido hospital, in Golisano Children's Hospital, the electrical load peaks are slightly reduced compared to the Business-as-Usual case.Again, the load has been shifted from the high-price hours (between 7:00 and 17:00) to the lower-price hours of the evening and night.The remaining load peaks have been fulfilled with solar PV and CHP generation, while the electrical grid serving has been reduced during the periods with the highest electricity rates.
Regarding the outage period, the diesel generator supplied most of the electricity needed with a small proportion of the CHP.Appendix Figure A5 shows the thermal dispatch strategy optimized by the REopt web tool.In this case, the CHP contributes more than the heating system serving.The hot water TES tank also provides great flexibility to the system, since it is charged by the CHP Regarding the outage period, the diesel generator supplied most of the electricity needed with a small proportion of the CHP.
Appendix Figure A5 shows the thermal dispatch strategy optimized by the REopt web tool.In this case, the CHP contributes more than the heating system serving.The hot water TES tank also provides great flexibility to the system, since it is charged by the CHP most of the time and even fulfills the complete thermal load for some hours.Appendix Figure A6 depicts the cooling thermal dispatch strategy optimized by the REopt web tool.During the hours when the electricity price is lower, the chilled water TES is charged.On the contrary, when the electricity price is higher (in the middle of the day), the chilled water TES is discharged to reduce the energy consumption cost.
Figure 23 shows the reduction in peak load when the technologies recommended by the REopt web tool are implemented.As shown in Figure 6, the peak load has been reduced due to the electrical load shift to minimize the electricity purchase cost.During the hours when the electricity price is lower, the chilled water TES is charged.On the contrary, when the electricity price is higher (in the middle of the day), the chilled water TES is discharged to reduce the energy consumption cost.
Figure 23 shows the reduction in peak load when the technologies recommended by the REopt web tool are implemented.As shown in Figure 6, the peak load has been reduced due to the electrical load shift to minimize the electricity purchase cost.

Beacon High School (High School)
This section analyzes the study for Beacon High School.Table 17 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.

Beacon High School (High School)
This section analyzes the study for Beacon High School.Table 17 summarizes the most cost-effective combination of PV, battery storage, wind, and CHP designed to sustain the defined critical load for the specified conditions obtained by the REopt web tool.System Performance Figure 24 shows the dispatch strategy optimization used by the REopt web tool for the outage period.During the outage, the battery coped with approximately half the critical load, and the CHP unit covered the rest.Once the electrical grid service has been recovered, the CHP and the battery will continue to meet the demand as electricity prices remain high.Recharging the battery is cost-efficient after the load is reduced during the evening and night.Appendix Figure A7 shows the thermal dispatch strategy optimized by the REopt web tool that the CHP and the regular heating system cover.Appendix Figure A8 depicts the cooling thermal dispatch strategy optimized by the REopt web tool that the CHP system meets.Figure 25 shows the reduction in peak load when the technologies recommended by the REopt web tool are implemented.

Discussion
This section presents a comparative analysis of the results and analyzes the most relevant outcomes of the research.This research has presented case studies of two building typologies: hospitals and high schools, including critical loads.The critical loads In this case, the electric load peaks are similar to the Business-as-Usual scenario.Still, electricity purchases from the grid have been reduced thanks to solar PV, CHP generation, and the battery system.
During the outage, the battery coped with approximately half the critical load, and the CHP unit covered the rest.Once the electrical grid service has been recovered, the CHP and the battery will continue to meet the demand as electricity prices remain high.Recharging the battery is cost-efficient after the load is reduced during the evening and night.
Appendix Figure A7 shows the thermal dispatch strategy optimized by the REopt web tool that the CHP and the regular heating system cover.Appendix Figure A8 depicts the cooling thermal dispatch strategy optimized by the REopt web tool that the CHP system meets.Figure 25 shows the reduction in peak load when the technologies recommended by the REopt web tool are implemented.

Discussion
This section presents a comparative analysis of the results and analyzes the most relevant outcomes of the research.This research has presented case studies of two building typologies: hospitals and high schools, including critical loads.The critical loads were established as 25% and 50% of the maximum electricity demand for high schools and hospitals, respectively.Appendix Figure A7 shows the thermal dispatch strategy optimized by the REopt web tool that the CHP and the regular heating system cover.Appendix Figure A8 depicts the cooling thermal dispatch strategy optimized by the REopt web tool that the CHP system meets.Figure 25 shows the reduction in peak load when the technologies recommended by the REopt web tool are implemented.

Discussion
This section presents a comparative analysis of the results and analyzes the most relevant outcomes of the research.This research has presented case studies of two building typologies: hospitals and high schools, including critical loads.The critical loads were established as 25% and 50% of the maximum electricity demand for high schools and hospitals, respectively.
The results show that using microgrids is an effective solution to provide the required electricity needed in case of a power supply disruption using a combination of diesel generation and CHP.It is relevant to remark that for the presented cases in hospitals, the resilience was improved, and, at the same time, the use of PV energy systems enhanced the economic benefits, as the daily production, when the power rates were higher, reduced the global daily cost.Therefore, this system provides increased resilience and enhances The results show that using microgrids is an effective solution to provide the required electricity needed in case of a power supply disruption using a combination of diesel generation and CHP.It is relevant to remark that for the presented cases in hospitals, the resilience was improved, and, at the same time, the use of PV energy systems enhanced the economic benefits, as the daily production, when the power rates were higher, reduced the global daily cost.Therefore, this system provides increased resilience and enhances the deployment of renewable energy sources.Hospitals are critical facilities where the energy supply is the most essential aspect.Still, the results show that it is possible to effectively achieve a reduction in energy costs combined with better energy resilience.The peak load was reduced for the year analysis in all three scenarios.In the case of the high schools, the critical load was lower, and battery storage was used as an energy supply system.Similarly, in hospitals, the energy supply was maintained, and the economic optimization showed that this is an optimal solution because when the outage has finished, the excess energy in the batteries is used when the purchase costs are high.They are recharged in low-demand periods when the costs are lower.
Therefore, it has been shown that using microgrids in buildings with critical loads is a technical and economically optimal solution that can be applied in different locations, scenarios, and building typologies and that optimizing both the microgrid design and the dispatch strategy ensures maximum resilience and profitability.
The reader should note that investment choices should not be based on the REopt web tool outcomes.These findings are based on precise forecasts of solar irradiation, wind speed, and electrical and thermal loads.Actual savings may be lower, depending on the capacity to precisely estimate solar irradiance, wind speed, load, and the system's control tactics.Nevertheless, a user of the REopt web tool could use the results obtained as a preliminary study for proposed microgrids.Before making a final investment decision, it is recommended that the user gathers further information on the proposed microgrids and applies a safety coefficient to reduce the possible deviations.
When simulating a grid outage, the findings assume complete foresight of the approaching outage, enabling the battery system to charge in the hours preceding the outage.If a natural gas-fueled CHP system is included, the resilience findings assume that the natural gas supply is not interrupted during an electrical grid outage.
The findings include predicted energy and demand reductions.However, the hourly model does not account for intra-hour variations in PV and wind resources.Because demand is often calculated using the maximum 15 min peak, the predicted savings from demand decrease may be overestimated.Hourly simulations are based on one year of load data and one year of solar and wind resource data.Actual demand charges and savings will fluctuate yearly as load and resource levels change.

Discussion of Related Research
In comparison to previous specific studies focusing on the analysis of power outages using DER systems and the REopt web tool [55] as analysis tools, the present paper presents an evaluation of the economic and technical feasibility of the use of DERs to improve the resilience of critical buildings and, at the same time, enhance the use of alternative energy sources, distributed generation, and energy storage.Instead of fixing a system design and an outage period to simulate and calculate the resilience potential of a DER system to supply fixed loads in the outage period, this study analyzed specific building typologies with critical loads.It optimized, from a technical and economic point of view, DER systems to supply the required critical loads.The results and the main methodology can be applied to different buildings, locations, and scenarios for future research and establish a reference scheme in this field.

Conclusions
The research presented here demonstrates the benefits of distributed generation and electrical and thermal storage with respect to energy resilience and microgrid emissions in California and New York.The results for the case studies evaluated (hospitals and higher education institutions) demonstrate a high level of complexity to obtain an optimal overall result in terms of finance, emissions, and energy resilience.Once the case studies have been evaluated, it can be inferred that the load profiles, the energy tariff used, and the available solar radiation significantly impact a microgrid's economic feasibility and emissions reduction.The fact that each end user and the energy tariff used are unique must be considered.Due to the complexity of each case studied, obtaining an optimum through a trial-and-error evaluation is virtually unfeasible.In this sense, evaluating electrical and thermal storage is particularly complex because evaluating its effects at later instants will be necessary to make decisions at a specific instant.Peak demand coinciding with high solar radiation could be observed, which impacts the minimization of energy costs and the operation of an installation (batteries will have to be charged from the grid during off-peak hours instead of hours during peak demand).As a consequence of this operation, the batteries are used to consume the stored electricity during periods when electricity is more expensive and will compete with solar PV generation.This circumstance and inefficiencies in energy storage decrease potential reductions in emissions released into the atmosphere.

Figure 1 .
Figure 1.Steps of the general research methodology in a summary of the main inputs and outputs of the REopt model.Source: Adapted from [2].

Figure 1 .
Figure 1.Steps of the general research methodology in a summary of the main inputs and outputs of the REopt model.Source: Adapted from [2].

Figures 2 -
Figures 2-5 show the annual power loads for the four cases:

Figure 2 .
Figure 2. Power load for Palomar Medical Center.

Figure 3 .
Figure 3. Power load for Camino Nuevo High School.

Figure 2 .
Figure 2. Power load for Palomar Medical Center.

Figures 2 -
Figures 2-5 show the annual power loads for the four cases:

Figure 2 .
Figure 2. Power load for Palomar Medical Center.

Figure 3 .
Figure 3. Power load for Camino Nuevo High School.

Figure 3 .
Figure 3. Power load for Camino Nuevo High School.

Figure 5 .
Figure 5. Power load for Beacon High School.

Figure 5 .
Figure 5. Power load for Beacon High School.

Figures 6 -
Figures 6-9 display the annual heating loads per building:

Figures 6 -
Figures 6-9 display the annual heating loads per building:

Figure 6 .
Figure 6.Heating load for Palomar Medical Center.

Figure 6 .
Figure 6.Heating load for Palomar Medical Center.

Figure 6 .
Figure 6.Heating load for Palomar Medical Center.

Figure 7 .
Figure 7. Heating load for Camino Nuevo High School.

Figure 9 .
Figure 9. Heating load for Beacon High School.

Figure 7 .
Figure 7. Heating load for Camino Nuevo High School.

Figure 6 .
Figure 6.Heating load for Palomar Medical Center.

Figure 7 .
Figure 7. Heating load for Camino Nuevo High School.

Figure 9 .
Figure 9. Heating load for Beacon High School.

Figure 6 .
Figure 6.Heating load for Palomar Medical Center.

Figure 7 .
Figure 7. Heating load for Camino Nuevo High School.

Figure 9 .
Figure 9. Heating load for Beacon High School.

Figure 9 .
Figure 9. Heating load for Beacon High School.

Figure 10 .
Figure 10.Cooling thermal load for Palomar Medical Center.

Figure 13 .
Figure 13.Cooling thermal load for Beacon High School.

Figure 13 .
Figure 13.Cooling thermal load for Beacon High School.

Figure 13 .
Figure 13.Cooling thermal load for Beacon High School.

Figure 13 .
Figure 13.Cooling thermal load for Beacon High School.

2. 3 . 1 .
Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) Tariff Southern California Edison provides the Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) tariff.Its basic charges cover the Time-of-Use (TOU) energy charges, Facilities-Related Demand (FRD) charges, and Time-Related Demand (TRD) charges.TOU charges consider the cost per kilowatt-hour per TOU period, FRD costs charge for the highest recorded demand per month regardless of the TOU period, and TRD charges cover the on-peak periods during summer weekdays and mid-peak TOU periods on winter weekdays.Figures14 and 15show the TOU weekday and weekend periods, respectively, for the selected Californian tariff:

2. 3 . 1 .
Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) Tariff Southern California Edison provides the Time-of-Use-General Service-Large: TOU-8 CPP (2-50 kV) tariff.Its basic charges cover the Time-of-Use (TOU) energy charges, Facilities-Related Demand (FRD) charges, and Time-Related Demand (TRD) charges.TOU charges consider the cost per kilowatt-hour per TOU period, FRD costs charge for the highest recorded demand per month regardless of the TOU period, and TRD charges cover the on-peak periods during summer weekdays and mid-peak TOU periods on winter weekdays.

Figure 19 .
Figure 19.Reduction in peak load using REopt web tool optimization and the technologies recommended for Palomer Medical Center Escondido.Source: Own elaboration.

Figure 19 .
Figure 19.Reduction in peak load using REopt web tool optimization and the technologies recommended for Palomer Medical Center Escondido.Source: Own elaboration.

Figure 20 .
Figure 20.Dispatch strategy optimized using Reopt for Camino Nuevo High School.Source: Own elaboration.

Figure 20 .
Figure 20.Dispatch strategy optimized using Reopt for Camino Nuevo High School.Source: Own elaboration.

Figure 21 .
Figure 21.Peak load reduction that occurs when the technologies recommended by the REopt web tool are implemented at Camino Nuevo High School.Source: Own elaboration.

Figure 21 .
Figure 21.Peak load reduction that occurs when the technologies recommended by the REopt web tool are implemented at Camino Nuevo High School.Source: Own elaboration.
Buildings 2024, 14, x FOR PEER REVIEW 21 of 30 most of the time and even fulfills the complete thermal load for some hours.Appendix FigureA6depicts the cooling thermal dispatch strategy optimized by the REopt web tool.

Figure 23 .
Figure 23.Reduction in peak load that occurs when the technologies recommended by the Reopt web tool are implemented at Golisano Children's Hospital.Source: Own elaboration.

Figure 23 .
Figure 23.Reduction in peak load that occurs when the technologies recommended by the Reopt web tool are implemented at Golisano Children's Hospital.Source: Own elaboration.

Figure 24 .
Figure 24.Dispatch strategy optimization at Beacon High School.Source: Own elaboration.

Figure 25 .
Figure 25.Peak load reduction occurs when the technologies recommended by the REopt web tool are implemented at Beacon High School.Source: Own elaboration.

Figure 24 .
Figure 24.Dispatch strategy optimization at Beacon High School.Source: Own elaboration.

Figure 24 .
Figure 24.Dispatch strategy optimization at Beacon High School.Source: Own elaboration.

Figure 25 .
Figure 25.Peak load reduction occurs when the technologies recommended by the REopt web tool are implemented at Beacon High School.Source: Own elaboration.

Figure 25 .
Figure 25.Peak load reduction occurs when the technologies recommended by the REopt web tool are implemented at Beacon High School.Source: Own elaboration.

Figure A2 .
Figure A2.Cooling thermal dispatch strategy optimized by Reopt web tool for Palomer Medical Center Escondido.Source: Own elaboration.Camino Nuevo High School (High School)

Figure A2 . 30 Figure A2 .
Figure A2.Cooling thermal dispatch strategy optimized by Reopt web tool for Palomer Medical Center Escondido.Source: Own elaboration.Camino Nuevo High School (High School)

Figure A3 .
Figure A3.Thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.Figure A3.Thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.

Figure A3 .
Figure A3.Thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.

Figure A4 .
Figure A4.Cooling thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.Figure A4.Cooling thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.

Figure A4 .Figure A5 .
Figure A4.Cooling thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.Figure A4.Cooling thermal dispatch strategy optimized by Reopt web tool for Camino Nuevo High School.Source: Own elaboration.Golisano Children's Hospital (Hospital)

Figure A7 . 30 Figure A8 .
Figure A7.Thermal dispatch strategy optimization for Beacon High School using REopt web tool.Source: Own elaboration.Figure A7.Thermal dispatch strategy optimization for Beacon High School using REopt web tool.Source: Own elaboration.Buildings 2024, 14, x FOR PEER REVIEW 27 of 30

Figure A8 .
Figure A8.Cooling thermal dispatch strategy optimized by REopt web tool for Beacon High School.Source: Own elaboration.

Table 6 .
show the annual thermal loads of the cooling plants per case: Maximum heating loads: total, space heating, and DHW.

Table 7 .
Average cooling plant thermal loads.

Table 8 .
Minimum cooling plant thermal loads.

Table 7 .
Average cooling plant thermal loads.

Table 8 .
Minimum cooling plant thermal loads.

Table 9 .
Maximum cooling plant thermal loads.

Table 11 .
Geographic coordinates and available solar radiation in the locales selected for this work.

Table 11 .
Geographic coordinates and available solar radiation in the locales selected for this work.

Table 12
displays the rates per TOU period.

Table 13 .
Rates per TOU period for SC-9-General Large TOD Service [NYC] tariff.

Table 14 .
The economic viability of PV, wind, battery storage, and/or CHP results at Palomar Medical Center Escondido.Source: Own elaboration.

Table 15 .
Economic viability results for Camino Nuevo High School.Source: Own elaboration.

Table 15 .
Economic viability results for Camino Nuevo High School.Source: Own elaboration.

Table 16 .
Economic viability results for Golisano Children's Hospital.Source: Own elaboration.

Table 17 .
Economic viability at Beacon High School (high school).Source: Own elaboration.

Table 17 .
Economic viability at Beacon High School (high school).Source: Own elaboration.