Integrated Optimization of Urban Energy System and EV Charging Infrastructure for Maximum Sustainability

Integrating the design of different infrastructure can result in designing more sustainable urban areas. This integration is especially critical for the energy, building, and transportation infrastructure, which correspond to a major part of the greenhouse gas emissions in the US and globally. This paper proposes a new method for integrating the design of energy system and building mix with the electric vehicle (EV) charging infrastructure in urban neighborhoods, and for optimizing these infrastructures for minimum life-cycle cost (LCC) and greenhouse gas emissions (GHG). This work uses archetypical building models, physics-based models of combined cooling, heating, and power plants as well as solar panels, and a novel approach to simulating the demand from EV charging infrastructure. For a sample study in San Francisco, CA, results show that the median GHG of neighborhoods where the energy system and building infrastructure are designed and optimized concurrently with the EV charging infrastructure is 54% lower than neighborhoods where these infrastructures are designed separately. Further, when the level of integration between these infrastructures is taken as a decision variable, optimized neighborhoods with higher integration levels seem to prefer a higher solar rooftop coverage to supply the higher electricity demand from the EV chargers. Git Repository at https://github.com/PouyaREZ/Integrated_EV_Energy_Sys/tree/master


Motivation
Year 2020 witnessed a 43% increase in the global sales of electric vehicles (EVs) compared to 2019, with 10 million EVs on the road globally ("Global EV Outlook 2021" 2021). EV sales are projected to comprise 13% of global light-duty vehicle sales by 2030 (International Energy Agency 2018). This growing market penetration of electric vehicles is altering the demand for electricity. Davidson (2018) concluded that complete electrification of the light-vehicle fleet in the US would increase the country's total electricity consumption by 29%. The International Energy Agency has also predicted that EVs will account for 20% of electricity consumption in the US by 2030 (International Energy Agency 2018). These increases in electricity consumption due to EVs will impose pressure on local and regional electricity grids. Hence, considering the influence of EVs will be essential for designing future urban energy systems (Lyden, Pepper, and Tuohy 2018; International Energy Agency 2018; Tu et al. 2020). Along this line, the present paper studies the effects of integrated design of urban energy system and EV charging infrastructure on the sustainability metrics of urban neighborhoods.

Prior Research
An energy system can be defined as "the combined processes of acquiring and using energy in a given society or economy" (Jaccard 2006). Manfren, Caputo, and Costa (2011) and Keirstead, Jennings, and Sivakumar (2012) investigated a total of 350+ papers from the literature on modeling of urban energy systems and identified no frameworks able to endogenously model and optimize both supply and demand at a district scale. Allegrini et al. (2015) also conducted a comprehensive literature review on 100+ articles and tools for demand and supply modeling in urban energy systems. Manfren et al. (2011) and Allegrini et al. (2015) both concluded that frameworks must be developed to concurrently optimize energy supply and demand technologies at an urban scale. Such frameworks could facilitate the design of urban energy systems that are more efficient and more sustainable than those resulting from existing design methods (Allegrini et al. 2015;Manfren, Caputo, and Costa 2011;Best 2016;Mancarella 2014;Liu et al. 2020).
In response to this need, Best, Flager, and Lepech (2015) studied the simultaneous optimization of energy supply and demand for an urban neighborhood. Best et al. developed a framework to endogenously model and optimize the community building mix and energy supply technologies (generating electricity, heating, and cooling) for a neighborhood of size 100-1000 adjacent buildings. Using this framework, Best et al. designed an optimized neighborhood in San Francisco to achieve an energy system with 70% overall efficiency, while minimizing life cycle cost and carbon emissions. In a follow-up work, for a case study in downtown Oakland, CA, Best (Best 2016) showed that neighborhoods designed with this approach result in lower operational emissions and energy efficiency compared to neighborhoods designed using a segregated approach. Best, et al. developed an important foundation for integrating energy supply and demand optimization and quantitatively assessing the urban and infrastructure planning. However, this and similar studies (e.g., Waibel, Evins, and Carmeliet 2019;Wu et al. 2018;Best 2016) have not yet considered in the simultaneous optimization of supply and demand, the EV infrastructure which is a growing source of demand for electricity.

Modeling EV Demand
Modeling the electricity demand for charging EVs has recently gained traction among scholars as an essential part of integrating EV into the vehicle fleet. Harris and Webber (2014) used the data from the National Household Travel Survey (NHTS) (US Department of Transportation 2009) and Monte Carlo simulation to model the EV charging demand for the states of New York and Texas, and the New England region. Harris and Webber verified their model with actual vehicle charging data from the Pecan Street Project (Smith 2009) to achieve a ca. 7% deviation compared to realworld vehicle charging data. Xydas et al. (2016) used data-mining techniques and fuzzy-based characterization to construct typical models for an EV charging profile. Xydas et al. built several profiles using 22,000 charging events from 255 stations in the UK. They then used the characteristic profiles to predict the effects of EV charging demand on the energy consumption in three regions in the UK. Xydas et al. also examined correlations between environmental data, such as ambient temperature and wind speed, with the developed profiles over the course of the day and found a strong correlation between charging demand and ambient temperature (Xydas et al. 2016). Arias and Bae (2016) conducted a similar study using clustering, correlation, and regression analyses, historical traffic and weather data, and models of battery charging behavior to create forecasting models for EV charging demand in South Korea. They also included the state-of-charge of the battery and charging start times as variables within their model. In a more recent and more extensive study, the US National Renewable Energy Laboratory (NREL) developed the tool "EVI-Pro" to predict county-level demand profiles for EV charging facilities throughout the US for year 2025 (E. Wood et al. 2017;E. W. Wood et al. 2018;Lee et al. 2021). NREL constructed the EV charging profiles for two representative 24-hour periods, 'weekend' and 'weekday,' and provided a breakdown of the predicted electricity demand by the types of charging stations. The present paper makes use of this last study for modeling the demand from the EV charging infrastructure.

Integrating EV and Energy System
Regarding the integration of EVs into the electric grid, Lyden, Pepper, and Tuohy (2018) studied 51 tools for planning community-scale energy systems and identified only two that included vehicle-grid integration; EnergyPLAN and EnergyPRO. Both of these tools model the energy demand by EVs based on the time-series of demand, specifications of batteries, and charging/discharging characteristics of the vehicles. However, these tools do not optimize the demand or supply for electricity. In a more recent study, Tu et al. (Tu et al. 2020) optimized the EV charging behavior for minimizing the marginal emissions of the electric grid throughout a single day. Tu et al. built a bottom-up model for simulating the charging behavior of the EVs based on energy consumption models of EVs, and assumed arbitrary control over the charging behavior when they optimized the EV charging for minimal grid emissions. The majority of literature on grid-EV integration studies smart charging, demand side management, vehicle-to-grid transmission of electricity, and control strategies for EV-grid integration, (e.g. Vasirani et al. 2013;Rahbari et al. 2017;García-Villalobos et al. 2014;Mwasilu et al. 2014;Aliasghari et al. 2018;Tu et al. 2020).
Simultaneous optimization of energy supply and demand at the community-scale is missing from the EV literature.

Objective
This paper devises and studies an integrated approach to designing the energy system and EV charging infrastructure at the neighborhood scale, which can be particularly useful during earlystage design as well as developing existing neighborhoods. This approach uses prototypical models for the demand and supply of electricity, heating, and cooling at the neighborhood scale, and focuses on the gains of integrating the optimization of the supply and demand of these energy forms across buildings, central power, cooling, and heating plants, solar panels, and EV chargers. These gains will be measured in terms of the life-cycle cost and greenhouse gas emissions of the designed neighborhoods. The contributions of this paper are two-fold: 1. Method for modeling hourly EV charging demand profile at neighborhood scale: This paper is the first in the literature to create the hourly demand profiles of EV charging infrastructure based on the building mix of an urban neighborhood. This method is essential in integrating the design of transportation infrastructure with the other infrastructure systems at the neighborhood scale with little information about the expected EV charging demand in the neighborhood under consideration.
2. Integrated approach to designing the EV charging infrastructure and energy system: This paper introduces the first framework in the literature for integrating the design and optimization of the supply and demand across the EV charging infrastructure and the energy system at the neighborhood scale. This novel framework is key in planning and designing the future urban energy systems given the growing demand for electrified transportation and the ever-increasing loads imposed on the regional grids because of this trend.

Model Development
A common example of "integrated infrastructure" is district-level provision of cooling, heating, and power via a Combined Cooling, Heating, and Power (CCHP) plant. Compared to segregated supply systems, CCHPs have shown up to 30% higher total energy efficiency (DOE n.d.; Rezaie and Rosen 2012; . This paper proposes a framework that can simulate the demand from several building types along with EV charging infrastructure, and the supply of electricity, heating, and cooling by a CCHP plant, while optimizing these systems concurrently for minimum life-cycle emissions (GHG) and life-cycle cost (LCC) at the neighborhood scale. Figure   2.1 provides a simplified overview of the proposed framework. In reality, the optimization module looks at a multitude of neighborhood designs and their performance metrics at the same time, when modifying the specifications of those neighborhoods to get to designs with better metrics.
The proposed framework introduces a new method for modeling the demand from EV charging infrastructure based on the building mix of the neighborhood, and for optimizing the EV charging infrastructure at the neighborhood scale. This framework leverages the supply models (32 CHP engines and 17 chillers) and the building models (21 building archetypes) introduced by Best et al. (Best, Flager, and Lepech 2015), and also uses a solar panel model developed by Best (Best 2016) to model a source of renewable energy in the modeled energy system. "Appendix A: Specifications of Supply and Demand Models" lists the specifications of the CHP engines, chillers, building prototypes, and the solar panel model used in this study. The analysis period was selected as 20 years (from 2021 to 2040) with a discount rate of 3.5% for future cash flows. To simplify the analysis, building demand profiles were considered constant over the analysis period. This can be justified given that buildings normally have longer lifetimes than 20 years, so the demand is expected to stay relatively constant over the selected analysis period.
However, to account for the significant temporal changes in EV demand, the EV charging demand profiles were derived for the mid-year of the analysis, i.e., year 2031, and used throughout the analysis. The EV charging demand data for the midyear of the analysis was selected as a proxy for the entire 20 years of the study given the near linear change in the EV charging demand as a function of time (E. W. Wood et al. 2018).
The following subsection describes the method proposed for modeling the demand profiles of the EV chargers for the different charging facilities considered in this paper, namely, home, work, and public chargers. Next, the parameters used in the modeling related to the electric grid, weather, and the solar panel model will be explained.

EV Charging Demand Profiles
To compose the demand profiles of EV charging infrastructure in this paper, the projected EV shows the predicted hourly consumption of the charging facilities for City and County of San Francisco (SF) for a 'weekday' day in year 2025. EVI-Pro also provided a similar profile for a 'weekend' day. Subsections below explain how these demand profiles were scaled both locally and temporally to be made eligible for assigning to the designed neighborhoods.

Local Scaling of EV Charging Profiles
The hourly demand profiles extracted from EVI-Pro were associated with the entire City and County of San Francisco and needed to be scaled down to the neighborhood level for this study.
The ratio between the annual electricity consumption of the different building types in the designed neighborhood, i.e., residential and commercial buildings, and those of the same building types for San Francisco were used as a proxy to scale the EV demand. For this purpose, the electricity demand of residential and commercial buildings in San Francisco were extrapolated for year 2031 (midyear of analysis) using data from Table 2.1. The 'non-residential sector' in Table 2.1 was used as a proxy for 'commercial buildings' in the designed neighborhoods, and 'residential' sector as a proxy for 'residential buildings.' To assign the EV charging profiles from EVI-Pro to the designed neighborhoods, "Home L1" and "Home L2" charger categories (also shown in Figure 2.2) were considered to be associated with the residential buildings in the designed neighborhoods, i.e., with high-rise condo, midrise apartment, townhouse, single-family house, and mixed-use condo and retail building types (Table   A.1). Next, as Equation 2.3 shows, the sum of these two hourly demands ( , ,ℎ 1 and , ,ℎ 2 ) were scaled proportional to the ratio between the electricity demand from residential buildings of the neighborhood ( ,   ℎ , ) and , , ,2031 .
The "Work L2" charger category from EVI-Pro (also shown in Figure 2.2) was considered to be associated with all the remaining building types not associated with Home L1 and L2 chargers. As Equation 2.5 shows, the hourly demand from Work L2 chargers ( , , 2 ) was scaled proportional to the ratio between the electricity demand from commercial (i.e., non-residential) buildings of the neighborhood (   ,  ℎ , ) and , , ,2031 . The demand from "Public DC Fast" and "Public L2" chargers (c.f. Figure 2.2) were considered to be associated with the entire San Francisco County, and as a result, with the entire neighborhood.
In this way, the total electricity consumption of San Francisco was taken as a proxy to scale the EV demand from public chargers which would serve this area. As Equation 2.5 shows, the combined hourly demand from Public DC Fast ( , , ) and L2 chargers ( , , 2 ) was then scaled proportional to the ratio of the total electricity consumption of the neighborhood ) and the projected total electricity consumption of San Francisco for year 2031  The hourly EV charging demand profiles from subsection 2.

Parameters of the Electric Grid
Although in this study the data for the demand (both for the buildings and the EV charging infrastructure) was created for year 2031, the purchase price and emissions of the electric grid were taken from the data for year 2020 and were assumed to be valid for year 2031. The literature was perused to find predicted values of the hourly price and emissions of the grid for a point in time closer to year 2031, but no consistent methods or resources were found to feasibly create such data.
Thus, the mentioned assumption was made to make the modeling of the sample study possible.
The hourly purchase price of electricity from the grid was set as the average price of California

Experiment and Results
A sample study was designed to examine the impact of optimizing the EV charging infrastructure (i.e., the EV chargers) at the same time as the energy system (i.e., the CCHP plant) and the building infrastructure (i.e., the building mix). The sample study conducted in this paper comprises three scenarios: 1. In the first scenario, the building infrastructure and the energy system were designed and optimized simultaneously for minimum life-cycle cost and emissions, while the EV charging infrastructure was designed separately and was supplied by the electric grid instead of the designed energy system. The cost and emissions associated with operating the EV charging infrastructure, while attributed to the designed neighborhoods, were not included in the optimization objectives in this scenario.
2. In the second scenario, the building infrastructure, the energy system, and the EV charging infrastructure were designed and optimized concurrently for minimum life cycle cost and emissions. The cost and emissions associated with the EV charging infrastructure were included in the optimization objectives in this scenario.
3. In addition to these two main scenarios, a third scenario was run where the portion of the electric load from the EV chargers that was assigned to the designed energy system was considered as a decision variable to be optimized. This scenario would provide insight into the effects of assigning none to all of the load from EV chargers to the energy system and optimizing the two systems at the same time.
All scenarios were designed for minimum life cycle cost (LCC) and minimum greenhouse gas

Decision Variables
Number of each building type (21 integers

Constraints
Sum of all building footprints must be less than 1 km 2 Sum of all building gross floor areas must be larger than 0.1 km 2 but less than 5 km 2 The genetic algorithm (GA) "NSGA-II" (Deb et al. 2002) was used to solve the optimization problem described above. The following optimization parameters were used with the optimization algorithm partly following the parameters proposed by Best et al. (Best, Flager, and Lepech 2015):

Results
Each of the three scenarios ran approximately in 3.5 hours on 12 cores of Intel Xeon E5-2640v4 (@2.40 GHz) processors using roughly 650 MB of memory. The optimization algorithm found ca.
156k valid neighborhoods (aka solutions) for each of scenarios 1 and 2 and ca. 161k valid neighborhoods for scenario 3. Those neighborhoods were considered valid that satisfied the constraints of the optimization problem and were not duplicates of the other neighborhoods. Table 3.1 shows the mean as well as several quantiles of the two objective functions, i.e., GFAnormalized life-cycle cost (LCC) and green-house gas emissions (GHG), across the neighborhoods designed for scenarios 1 and 2. The distribution of the LCC values are very similar between the two scenarios, while the GHG values of solutions found for scenario 2 seem to be generally smaller than those of scenario 1. In particular, the median value of GHG for scenario 1 is ca. 54% higher than the median GHG from scenario 2. Two-sample z-test on the mean values of the objective functions, with a p-value of 0.05, shows that the mean LCC of scenario 1 is 71 $/m 2 lower than the mean LCC of scenario 2, while the mean GHG of scenario 2 is 5.22 kg-CO2eq/m 2 lower than the mean GHG of scenario 1.          Most of the CHP engines selected by the optimization algorithm for both scenarios (ca. 99% of all designs) are bio-fueled or fuel-cell engines which are assumed to cause zero (for bio-fueled engines) or negligible (for fuel-cell engines) operating emissions as they use renewable fuels (Best, Flager, and Lepech 2015); thus, the electricity these engines provide to the EV chargers is almost emission-free unlike the electricity purchased from the grid.

Scenarios 1 and 2: 0 and 100% Integration of EV and Energy System
(2) Further, the EV demand sometimes peaks at times of the day when the electric load from the grid does not peak; thus, the less efficient and more pollutant electricity generators of the grid need to supply the demand from the EVs at those times in the scenario where the grid supplies the EVs. Although the EV demand is much smaller than the electricity demand from the buildings in scenarios 1 and 2, e.g., electric energy demand of EV charging is on average 1/38 th of the demand from the buildings in the neighborhoods of scenario 1, reasons (1) and (2)

. Normalized profiles of the EV charging demand for a sample neighborhood (blue line) and the marginal grid emissions (black line) for (a) January 1 st , (b) May 1 st , and (c) September 1 st
In another analysis, the ratios of the different building types (namely, residential, office, commercial, industrial, hospitality, medical, and educational) for neighborhoods of scenarios 1 and 2 were compared.

Scenario 3: Extent of Integration as a Variable
Scenarios 1 and 2 looked at the extreme cases of integrating the EV charger infrastructure with the local energy system, i.e., zero integration or complete integration. Scenario 3, however, examined the cases between these two extremes by setting the percentage of integration between the local energy system and the EV charging infrastructure as a decision variable to be optimized by the optimization algorithm.
Among all neighborhoods designed for scenario 3, i.e., 161k neighborhoods, the 50 th percentile in terms of GHG were selected for plotting Figure 3.6, i.e., 80k designs. This specific percentile was chosen to leave out the outliers and to focus the analysis on the better-performing designs in terms of the objective functions. The median value of GHG was calculated for those among these 50 th percentile neighborhoods that had the same percentage of EV load ratio assigned to the CCHP.  Figure 3.6 shows that the median GHG almost linearly decreases with an increase in the EV load ratio. This indicates that complete integration, i.e., scenario 2, seems to be the most desirable level of integration between the energy system and the EV infrastructure in terms of reducing the emissions of the designed neighborhood.  EV load ratio, then the median value of the PV rooftop coverage ratio for these grouped neighborhoods was plotted against the EV load ratio in Figure 3.8. Figure 3.8 shows that the optimization algorithm has desired slightly higher ratios of PV rooftop coverage for larger percentages of EV load assigned to the CCHP. The median PV rooftop ratio for most of the grouped neighborhoods with EV load ratios higher than 50% was 17%, while the median PV for grouped neighborhoods with less EV ratios was 15%. This is reasonable given that assigning more of the EV demand to the CCHP increases the total electricity load on the local energy system, and more PV can respond to this increase in the electricity demand, thus reducing the need for additional CHP engines to supply this excessive electricity demand. That PVs respond to this demand instead of CHP engines is desirable both in terms of reducing the life-cycle cost and the life-cycle emissions of the neighborhoods. allows the neighborhoods to purchase electricity from the grid and sell excess electricity back to the grid. Demand is modeled in this paper as (1) the electricity, heating, and cooling demands from 21 building archetypes that represent more than 70% of the buildings in the United States (Deru et al. 2011;Best, Flager, and Lepech 2015), and (2) the electricity demand from five types of EV charging infrastructure projected for year 2025 (E. W. Wood et al. 2018).
Three scenarios are devised based on an example greenfield neighborhood located at San Francisco, CA. These scenarios are analyzed over a lifetime of 20 years, and in all the scenarios, the EV charging demand is added to the total neighborhood demand proportional to the magnitude of the demand from different building types in the neighborhood; for example, demand from the home EV chargers in a neighborhood is considered to be proportional to the total residential electric demand from that neighborhood. Scenario 1 designs and optimizes buildings and energy system simultaneously, while supplying the EV charging demand using electricity purchased from the grid.
In the first scenario, a genetic algorithm (GA) tries to find the neighborhood specifications that lead to the least possible life-cycle greenhouse gas emissions (GHG) and life-cycle cost (LCC). These neighborhood specifications include the number of each of the 21 building types, the type of the CHP engine, the type of the chiller, and the portion of building rooftops covered by PVs. These two objective functions are normalized by the sum of the gross floor areas of all buildings in each neighborhood to decouple them from the size of the neighborhood. Scenario 2 solves a similar optimization problem, but designs and optimizes buildings, energy system, and EV charging infrastructure at the same time, with the EV charging demand is fully supplied by the local energy system. A third scenario is also considered where the percentage of integration between the EV charging infrastructure and the local energy system is optimized as a decision variable.
Results show that scenario 2, which integrates the design and optimization of the EV infrastructure and energy system, leads to neighborhoods with significantly lower life-cycle emissions compared to scenario 1, where the grid supplies the EV charging demand and the optimization does not consider the cost and emissions of the EV charging infrastructure. The median GHG of scenario 1 is 54% higher than that of scenario 2. Analysis shows that around 99% of the CHP engines selected for both scenarios by the optimization algorithm are either biomass-based or hydrogen-based engines, which are assumed to consume renewable energy and thus have near zero operational emissions. The emissions associated with the electricity purchased from the grid to supply the EV charging demand in scenario 1, as opposed to using the emission-free electricity from the local energy system in scenario 2, along with the fact that the EV demand peaks at times when the grid is at its dirtiest, cause this stark difference between the life-cycle emissions of scenarios 1 and 2.
On the other hand, the life-cycle costs of the neighborhoods designed for scenarios 1 and 2 are similar, with the median LCC of scenario 1 being only 1% lower than that of scenario 2. Urban planners and infrastructure designers can benefit from the approach proposed in this study to embrace local urban energy systems for responding to the ever-increasing electric demand from the EV charging infrastructure, without needing to make any costly expansions of the electric grid.

Results
The multi-objective approach to the optimization taken in this study provides the decision-makers with a variety of neighborhood designs to choose from based on their design criteria for creating greenfield projects. The proposed framework can also be used for renovating/developing the existing neighborhoods by imposing constraints on the components of the neighborhoods, e.g., on the number of buildings of each type or on the type of CHP engines and chillers, to comply with the existing infrastructure in a neighborhood.
This paper uses a specific set of supply and demand models. Future work can focus on different sets of supply and demand models, including all-electric systems, geothermal energy sources, etc., to see whether the conclusions drawn from this study can be applied to neighborhoods designed with those alternative systems. Changing the supply and demand models, from CHP engines to the the EV infrastructure and the energy system than those obtained in this work.
The purchase price and emissions of the electric grid in this paper were taken from the data for year 2020 and were assumed to be valid for year 2031, i.e., the midyear of the analysis. Developing methods to reliably predict the hourly price and emissions of the grid for the midyear of the analysis can make the proposed framework more suitable for real-world designs.
Adding spatial optimization can also be an important addition to the analysis done in this work, especially given the importance of network configuration in the life-cycle performance of energy systems (Best, Rezazadeh Kalehbasti, and Lepech 2019). This added piece can also help with including other network-dependent infrastructure in the proposed framework for the integrated infrastructure, including water treatment and distribution, wastewater collection and treatment, and food distribution infrastructure.
Appendix A: Specifications of Supply and Demand Models   (Best 2016). These models were created based on LBNL's Modelica buildings library (Wetter et al. 2014).  (Best 2016). This model was created based on the NREL's PV Watts Calculator (Dobos 2014) and NREL's study on soft costs of solar panels (Ardani et al. 2013 Table below shows the input parameters of the neighborhood for which the normalized daily profiles are provided: