From Carbon Calculators to Energy System Analysis in Cities

: Energy systems in cities need to be decarbonized and are becoming more integrated via energy sector coupling. Today, cities often use simple methods to assess their low carbon targets, e.g., carbon calculators, and these methods use annualized carbon reduction potentials. For example, reductions from heat savings in buildings or fuel demand in transport. This is done because it is simple and fast. This paper describes a methodology that goes beyond carbon calculators and assesses highly renewable energy systems. The methodology is carried out for a case city—Sønderborg, Denmark. Using a national 100% renewable energy study and a suitable energy system analysis tool (EnergyPLAN), the method accounts for inter-sector coupling and energy system dynamics. The energy system is assessed by comparing the results from the analysis tool against numerous key sustainability factors for a Smart Energy System. The paper illustrates how the method delivers a sustainable 100% renewable Smart Energy System for Sønderborg, which can be part of the Danish energy system in 2050 based on local resources. The paper discusses the broader applicability of the method within strategic energy planning.


Introduction
Cities consume vast amounts of energy due to citizen activity in buildings and transport, and commercial activities such as industry. Energy is consumed either in the form of electricity, fuels, or heat, or a combination of these, which releases greenhouse gas emissions (GHGs). To address these emissions, the European Union set goals of 20% GHG reduction by 2020 and 40% by 2030 [1]. In response, 7755 European Cities have signed the Covenant of Mayors, with more than 6000 submitting Sustainable Energy Action Plans (SEAPs) [2]. In these plans, the current energy situation of each city is described in a Baseline Emission Inventory (BEI) which attaches CO 2 equivalent emissions to energy demand, and reduction potentials for these emissions [3]. SEAPs often look at the use of renewable energy, improved energy efficiency in buildings, optimizing public lighting, improving air conditioning, and improving the efficiency of other appliances [4]. Measures are planned with reduction targets attached to each and, when implemented, lead to reductions in GHGs. These reductions are often analyzed independently and on an annualized GHG reduction basis. Consequently, carbon calculators are used when preparing SEAPs for the Covenant of Mayors [5].

Shifting to 100% Renewable Energy
Shifting from a partial fossil fuel-based energy system to a 100% renewable energy system in a city involves numerous additional factors [6]. For example, the full integration of energy sectors and large number and variety of inter-linked production technologies, as presented for Denmark in Figure 1.
large number and variety of inter-linked production technologies, as presented for Denmark in Figure 1.
. Figure 1. Transition steps from the fossil fuel-based energy system to a 100% renewable energy system in Denmark (Reproduced with permission from Karl Sperling, Frede Hvelplund, Brian Vad Mathiesen, Energy Policy; Elsevier Ltd, 2010. [6]). The future energy system will be highly electrified and this requires that local energy sectors are integrated, creating numerous synergies via energy storages and flexibility [7]. Energy sectors are already beginning to become more integrated, with decentralized renewable energy, and sector coupling technologies such as electric vehicles [8]. Therefore, in the future when looking at a city as a whole, the energy sectors should be conceptualized as an energy system.
In order for a future 100% renewable energy system to be considered "smart" it needs to meet certain sustainability factors as well, including all energy sectors, improving efficiency and resource use, and improving the environment (Table 1). Addressing these factors ensures that socio-economic costs and biomass consumption are minimized, which are two critical aspects of the future energy system [9]. To achieve these sustainability factors, goals need to shift from focusing on the silo effects of individual measures on the energy supply chain, which are too simple, to complex effects in the  [6]). The future energy system will be highly electrified and this requires that local energy sectors are integrated, creating numerous synergies via energy storages and flexibility [7]. Energy sectors are already beginning to become more integrated, with decentralized renewable energy, and sector coupling technologies such as electric vehicles [8]. Therefore, in the future when looking at a city as a whole, the energy sectors should be conceptualized as an energy system.
In order for a future 100% renewable energy system to be considered "smart" it needs to meet certain sustainability factors as well, including all energy sectors, improving efficiency and resource use, and improving the environment (Table 1). Addressing these factors ensures that socio-economic costs and biomass consumption are minimized, which are two critical aspects of the future energy system [9]. Table 1. Smart Energy System sustainability factors to be considered in energy system analyses.

Smart Energy System Sustainability Factors [10]
Explanation [11] Includes all energy sectors Decarbonize all energy sectors. Synergies are maximized and resource consumption is minimized Technically feasible design and analysis Energy imbalances are minimized and unit capacity factors are sufficient The method in this article is focused on developing a local energy system that includes, at minimum, the sustainability factors of: 1) all energy sectors, and 2) a technically feasible design and analysis. In the future energy system, it is assumed that numerous technologies will be local and distributed in many sectors, and the results from the method will develop an understanding of both their interrelations in an integrated energy system and the combination of these technologies with energy savings and energy storages. This requires the use of urban energy system models. Keirstead [13] reviewed the state of the current practice of urban energy system models. The conclusion was that there are four main challenges, which include understanding model complexity, data quality and uncertainty, model integration, and policy relevance. They suggest improvements to the current practice in urban energy systems modeling by focusing on sensitivity analysis and cloud computing, data collection, and integration techniques, and using activity-based modeling as an integrating framework. This article advances from this research by focusing on the sustainability factors of the energy system as well as data quality and verification, as described in [13]. Allegrini [14] investigated numerous district level models and tools for district energy systems and renewable energy. The present article focuses on the broader scope of the city rather than districts, and smaller scale systems in buildings, which apply different methods and tools.
Urban energy system modeling should not be an isolated activity. It should be relevant and done within a planning process. Mirakyan [15] describe integrated energy planning (IEP), which involves city energy system modeling and analysis coupled with the engagement of stakeholders. IEP partly addresses the challenge of policy relevance mentioned in [13]. Mirakyan [15] present numerous options for methods and models for energy system analysis but no clear methodological procedure around assessing the sustainability factors is presented, which is described in this article. The method in this article is focused on developing a local energy system that includes, at minimum, the sustainability factors of: 1) all energy sectors, and 2) a technically feasible design and analysis. In the future energy system, it is assumed that numerous technologies will be local and distributed in many sectors, and the results from the method will develop an understanding of both their interrelations in an integrated energy system and the combination of these technologies with energy savings and energy storages. This requires the use of urban energy system models. Keirstead [13] reviewed the state of the current practice of urban energy system models. The conclusion was that there are four main challenges, which include understanding model complexity, data quality and uncertainty, model integration, and policy relevance. They suggest improvements to the current practice in urban energy systems modeling by focusing on sensitivity analysis and cloud computing, data collection, and integration techniques, and using activity-based modeling as an integrating framework. This article advances from this research by focusing on the sustainability factors of the energy system as well as data quality and verification, as described in [13]. Allegrini [14] investigated numerous district level models and tools for district energy systems and renewable energy. The present article focuses on the broader scope of the city rather than districts, and smaller scale systems in buildings, which apply different methods and tools.
Urban energy system modeling should not be an isolated activity. It should be relevant and done within a planning process. Mirakyan [15] describe integrated energy planning (IEP), which involves city energy system modeling and analysis coupled with the engagement of stakeholders. IEP partly addresses the challenge of policy relevance mentioned in [13]. Mirakyan [15] present numerous options for methods and models for energy system analysis but no clear methodological procedure around assessing the sustainability factors is presented, which is described in this article.
Numerous studies have focused on future energy systems in cities. Aalborg Municipality, Denmark was investigated for how it could rely on renewable energy sources in all the energy sector-electricity, heating, and transportation [16]-specifically using low-temperature geothermal heat, wind power, and biomass. The study was designed to have a self-sustained internal power balance to the highest extent possible, called the "inter-connected island mode", which helps lower transmission losses and avoid transmission grid expansion [17]. This study looked at local resources and applied local expert judgment to build a technically feasible model. The study followed the sustainability factors, however the method is uniquely related to the Aalborg case and is based on local expert judgment. A similar study was performed in the Frederikshavn municipality, which utilized low-temperature geothermal energy for district heating, and modeling was done with expert judgment [18]. Bačeković and Østergaard [19] analyzed Zagreb, Croatia as a traditional renewable energy system and an integrated smart energy system. The analysis modeled numerous technologies in the city as an isolated energy system. For determining the energy supply, the approach followed five criteria: 100% renewable heat and electricity and fossil free transport and industry; 2.
Technically feasible technologies.
The study followed the sustainability factors, however, to gather data, and to determine the technically feasible technologies, local expert judgment was used. Prina [20] developed a specific method for Bressanone-Brixen, Italy, and analyzed the city as a single node, minimizing the exchange of electricity with surrounding areas. Electricity exchange was limited by using electric and thermal storages, large heat pumps, seasonal thermal storage, and batteries. De Luca et al. [21] developed a method for Altavilla Silentina, Italy to become zero GHG by 2030. They considered all the energy sectors, and the exchange of electricity with surrounding areas was limited. The study also considered the neighboring regions in a scenario analysis. The study demonstrated the potential to share excess electricity between neighbouring regions, which is possible if coordinated. However, some studies have shown that there are potential imbalances in the exchange and balance of electricity between a city and the rest of the country, which poses new challenges [22,23].

Aim of this Article
The aim of this article is to present a simple approach to determine the configuration of a sustainable energy system of a case city that has been derived from a national 100% renewable energy system ( Figure 3). The article provides a systematic methodology and efficient data collection approach, which minimizes the need for detailed local expert knowledge. Such an approach can provide information on which technologies to use in the city within the national context and how a 100% renewable city energy system can be designed in order to contribute to long-term national energy goals. Numerous studies have focused on future energy systems in cities. Aalborg Municipality, Denmark was investigated for how it could rely on renewable energy sources in all the energy sector-electricity, heating, and transportation [16]-specifically using low-temperature geothermal heat, wind power, and biomass. The study was designed to have a self-sustained internal power balance to the highest extent possible, called the "inter-connected island mode", which helps lower transmission losses and avoid transmission grid expansion [17]. This study looked at local resources and applied local expert judgment to build a technically feasible model. The study followed the sustainability factors, however the method is uniquely related to the Aalborg case and is based on local expert judgment. A similar study was performed in the Frederikshavn municipality, which utilized low-temperature geothermal energy for district heating, and modeling was done with expert judgment [18]. Bačeković and Østergaard [19] analyzed Zagreb, Croatia as a traditional renewable energy system and an integrated smart energy system. The analysis modeled numerous technologies in the city as an isolated energy system. For determining the energy supply, the approach followed five criteria: 1. 100% renewable heat and electricity and fossil free transport and industry; 2. Sustainable biomass; 3. Isolated energy system; 4. System balances itself; 5. Technically feasible technologies.
The study followed the sustainability factors, however, to gather data, and to determine the technically feasible technologies, local expert judgment was used. Prina [20] developed a specific method for Bressanone-Brixen, Italy, and analyzed the city as a single node, minimizing the exchange of electricity with surrounding areas. Electricity exchange was limited by using electric and thermal storages, large heat pumps, seasonal thermal storage, and batteries. De Luca et al. [21] developed a method for Altavilla Silentina, Italy to become zero GHG by 2030. They considered all the energy sectors, and the exchange of electricity with surrounding areas was limited. The study also considered the neighboring regions in a scenario analysis. The study demonstrated the potential to share excess electricity between neighbouring regions, which is possible if coordinated. However, some studies have shown that there are potential imbalances in the exchange and balance of electricity between a city and the rest of the country, which poses new challenges [22,23].

Aim of this Article
The aim of this article is to present a simple approach to determine the configuration of a sustainable energy system of a case city that has been derived from a national 100% renewable energy system ( Figure 3). The article provides a systematic methodology and efficient data collection approach, which minimizes the need for detailed local expert knowledge. Such an approach can provide information on which technologies to use in the city within the national context and how a 100% renewable city energy system can be designed in order to contribute to long-term national energy goals. In this study, the term "city" is used, which refers to either a city-i.e., urban area-or municipalities, villages, or towns. Sønderborg municipality in Denmark is used as the case study in  In this study, the term "city" is used, which refers to either a city-i.e., urban area-or municipalities, villages, or towns. Sønderborg municipality in Denmark is used as the case study in this article-herein called Sønderborg. The area includes a medium sized city, a few villages, and rural areas. The energy system for Sønderborg is determined based on the Danish 100% renewable energy system for 2050. In the case study, the method determines: • The 100% renewable city energy system configuration and role of the technologies within the national 100% renewable energy system; • The implications for Sønderborg for bioenergy, wind, and solar resources within the context of the national energy system and key sustainability factors.
The methodology is a two-staged approach of: 1) energy data collection and 2) sustainability assessment. In relation to the sustainability factors shown in Table 1, the energy system is refined around local technical feasibility, socio-economic costs, better resource use. This is done by analyzing the results from an energy system analysis tool against the sustainability factors.
The study is presented in five sections. In Section 2, the methodology for the study is described. In Section 3, the case study of Sønderborg is presented. In Section 4, the results for the 100% renewable energy system in Sønderborg are presented and described. In Section 5, the methodology is discussed in terms of its broader applicability within strategic energy planning, including some limitations, and some conclusions are presented.

Methodology
The methodology in this article took inspiration from Sperling [6], who suggested that the energy visions and concrete focus areas of municipalities should be provided based on a 100% renewable national strategy. Based on analyzing Danish cases, they suggested that long term national objectives (i.e., 100% renewable energy) should be linked with relevant, sector-specific goals (i.e., for heating, electricity, transport, urban planning, energy savings, and efficiency), where municipalities are given relevant responsibilities and tasks. In other words, a national energy system analysis for 100% renewable energy in 2050 needs to align with city level energy system analyses and actions. National highly renewable energy system scenarios are often detailed and analyzed in their entirety, including all interconnecting sectors and often hour-by-hour [24]. National renewable energy visions can provide useful insights for city energy systems. This approach can ensure that renewable resources are shared between cities and one city does not hinder another city in also converting to 100% renewable energy.
Based on Sperling [6], the methodology derived the 100% renewable energy system of Sønderborg from the Danish 100% renewable energy system in 2050. In this section, the steps for deriving and analyzing the city energy system of today and in the future are described. The method involved four main steps and each step will be described in detail. Steps 1-3 determined the nationally-derived local energy system, and Step 4 was about analyzing the local energy system regarding the sustainability factors. The results from applying the methodology in Sønderborg are presented in Section 3 (steps 1-3) and Section 4 (step 4). The steps included: 1.
City energy system diagnosis today: Define boundary conditions for the city and gather energy dataset for the city for a recent year; 2.
National long-term energy study and per capita data: Locate a national study that has both an energy system scenario for a recent year and that looks at 100% renewable energy in the long-term, i.e., 2050. The scenarios should meet specific characteristics, which are described in more detail below; 3.
Per capita energy data for the city in the future: Quantify per capita energy data for city energy system based on the national long term 100% renewable system (2050); 4.
Analyze and balance the city energy system: Using the per capita data for the city in 2050 and an energy system analysis tool, assess the city energy system in 2050 with regards to the sustainability factors. In summary, the approach required three sets of data: (1) recent city energy data, (2) recent national energy data, and (3) long-term (2050) national energy data.

Step One: City Energy System Diagnosis Today
The first step of the method was gathering the city energy data from a recent year. The data collected in this step was only used for comparing the current (recent year) city per capita data with the country per capita data in Step 2. The city dataset was based on numerous data points for the energy system, which were derived from Figure 2. (Table 2).

Hour by hour
The city energy system was not separate from the national energy system, for instance, vehicles cross the boundaries, i.e., cars, air travel, and electricity flows through the national grid. Therefore, there were two main considerations when collecting this data: (1) the geographical boundaries of the energy system being analyzed, and (2) the exchange of energy across these boundaries. Assumptions could be made for transport for what was accounted for and what was not. Table 2 is a tool for data collection and presents all the basic data collection components required for the energy system analysis. When reporting the data for Sønderborg, the data type number was used, e.g., resource inputs is 1. Data in one category are connected to all the other categories, for instance, resource inputs are quantified with data from conversion technologies, end-user demands and distribution, and storage losses (if any). See [25] for a template example for data connections. Energy conversion technology data (data type 3) are the capacities and efficiencies of the technologies doing the energy conversion of fuels or electricity into end-use energy. Distribution of electricity and district heat were assigned an energy loss. The final energy demands (data type 5) were an aggregate of end-user demands and provided sufficient data for an energy system scenario. The final energy demands contributed to the total energy sector demands (data type 6). The final energy demands included only the end-use energy requirement and excluded the energy losses from conversion and distribution. Resource inputs were entered into the system to supply the total energy sector demands, and during conversion and distribution, resource inputs increased due to losses.
To effectively analyze the sustainability of the Smart Energy System of the city, the total energy sector demands were provided at a temporal resolution higher than annualized data. For instance, hour by hour. This enabled the analyst to understand and analyze the dynamics of the energy system with energy storages and to identify imbalances in the energy system.
Data sources for the city could include local and national databases (energy statistics), e.g., industry fuel consumption, which provides an up to date account of the energy demand and supplies, or private heating fuel demands. For data type 7, average local data could be used or national hour by hour demand and supply data.

Step Two: National Long-Term Energy Study and Per Capita Data
The second step of the method was identifying a national 100% renewable study (or similar) which provided data for the current energy system and for the future energy system in the city. The study was used for two purposes. The first purpose was to determine per capita national data that fitted the data types in Table 2. This per capita data could be compared with the per capita data in the city in a recent year to understand the differences between the two datasets. The second purpose was to provide future 2050 per capita data that could be used for determining the future city energy system data in Step 3. The national study needed to have the same types of data as the city, including final energy demands (data type 5), and it needed to provide a rough estimate of technologies to use in the city. It needed to have at least conversion technology data (data type 2) and a list of storage technologies and efficiencies (data type 3) that could be used in the analysis.
Per capita energy data from the city and country was calculated and compared for the closest year the data was collected for each energy system (i.e., 2016). This comparison was informative and helped the energy system balancing in Step 4. Both demand and supply data were determined using a per capita approach. However, a few electricity demands changed due to the energy system analysis, for example, the tool determined the electricity demand for large-scale heat pumps and electric boilers, since they are used for system balancing. Most energy demand data remained the same from Step 3 to Step 4. Some energy supply data were influenced by the energy system analysis and balancing in Step 4. The formula for calculating the per capita energy data for the city and country is: Per capita energy data value = data in recent year data type 2,3,5 population city/country .
Per capita energy data were calculated for: (1) recent city energy data, (2) recent national energy data, and (3) long term (2050) national energy data. These data were entered into a spreadsheet.

Step Three: Per Capita Data for the City in the Future
The third step of the method was quantifying the energy system data for the city in 2050 based on the national study. In this step, the rough 100% renewable energy system in the city was determined (before analysing it in Step 4). The future city energy system data were determined based on the 2050 per capita data of the country, except for some values dependent on Step 4, such as electricity demand for large-scale heat pumps and electric boilers. The main aim of this step was to get per capita final energy demand, conversion, and storage data (data types 2, 3, and 5), which were used in the analysis in Step 4. The future city per capita data were calculated by following a simple formula: Country2050 demand/supply = Country2050 demand/supply × % of city population of national population. (2) Cost data (i.e., investment costs, lifetime, and operation and maintenance could be assigned to the energy technologies and other system costs-such as district heating grids and related technologies-that will be implemented until 2050.

Step Four: Analyze and Balance the City Energy System
The fourth step was analysing and balancing the future city energy system to meet the Smart Energy System sustainability factors. Some final energy demands and energy supply data were adjusted as a consequence of this analysis. To analyze the energy system, a tool was required, which included the entire energy system and could model a 100% renewable energy system in a high-resolution temporality (i.e., hour-by-hour). The appropriate data collected from Steps 1-3 were entered into the energy system analysis tool. When the tool was run, a set of results were delivered that were entered into a spreadsheet for visualization, analysis, and decision making. A small selection of tools could achieve the requirements-Mesap PlaNet, H2RES, SimREN, EnergyPLAN [26]. Other factors were also considered, including the speed to respond to energy planning processes at city level with numerous stakeholder feedbacks, price of the tool, ease of use, tutorials, and accessibility. Based on these factors, EnergyPLAN was used in this study.
The analysis in Step 4 was based on the three previous steps and was an iterative process going back and forth, considering: • The local energy system that exists today, e.g., district heating network (Step 1); • The energy system of the country in 2050 and the technologies that can be used locally (Step 2 and 3); • The sustainability factors are met, for example all energy sectors are included and energy demands are met, resource consumption is low and energy is efficiently used, i.e., district heat is not being overproduced (Step 4)

EnergyPLAN
EnergyPLAN (Version 14.2, Aalborg University, Aalborg, Denmark) is freeware and it provides results fast (within a second) and transparently. EnergyPLAN is a deterministic simulation model that does partial optimization of the energy system using the energy system inputs and outputs entered by the user (Figure 4). When the user enters all the energy system data, i.e., energy demands and capacities and efficiencies of the conversion and storage technologies, the tool determines which energy supply technologies and which energy storages should be utilized in different energy grids in each hour during the year in order to achieve the lowest fuel consumption, or socio-economic cost, in the system. This helps to model, and identify, opportunities for flexibility in the different energy grids. This inter-grid connection and integration with energy storages is a key element of the Smart Energy System [7]. selection of tools could achieve the requirements-Mesap PlaNet, H2RES, SimREN, EnergyPLAN [26]. Other factors were also considered, including the speed to respond to energy planning processes at city level with numerous stakeholder feedbacks, price of the tool, ease of use, tutorials, and accessibility. Based on these factors, EnergyPLAN was used in this study. The analysis in Step 4 was based on the three previous steps and was an iterative process going back and forth, considering: • The local energy system that exists today, e.g., district heating network (Step 1); • The energy system of the country in 2050 and the technologies that can be used locally (Step 2 and 3); • The sustainability factors are met, for example all energy sectors are included and energy demands are met, resource consumption is low and energy is efficiently used, i.e., district heat is not being overproduced (Step 4)

EnergyPLAN
EnergyPLAN (Version 14.2, Aalborg University, Aalborg, Denmark) is freeware and it provides results fast (within a second) and transparently. EnergyPLAN is a deterministic simulation model that does partial optimization of the energy system using the energy system inputs and outputs entered by the user (Figure 4). When the user enters all the energy system data, i.e., energy demands and capacities and efficiencies of the conversion and storage technologies, the tool determines which energy supply technologies and which energy storages should be utilized in different energy grids in each hour during the year in order to achieve the lowest fuel consumption, or socio-economic cost, in the system. This helps to model, and identify, opportunities for flexibility in the different energy grids. This inter-grid connection and integration with energy storages is a key element of the Smart Energy System [7].  EnergyPLAN has been used in numerous energy system studies, including city energy system analyses [28]. Further details about EnergyPLAN are found here: [29].

Balancing the National Energy System with Power Plants
To balance the future renewable energy system, it is expected that power plants will be utilized in times of limited renewable electricity to balance the electricity system, producing around 5-10% of the total production during the year. Smaller regions do not usually have a local power plant and they import most of their electricity. Thus, it can be argued that these cities have virtual power plants. It is assumed that this will also be the case in 2050, and the city analysis for 2050 should include a virtual power plant in EnergyPLAN. The upstream resource input to produce the electricity in these power plants should be considered in the total resource input into the city. In 2050, the resources would be gasified biomass and biogas.

Using the Simulation Tool
The appropriate data from Steps 1-3 should be entered into EnergyPLAN. When running EnergyPLAN, the energy system is arranged to meet all electricity and heat demands locally to the extent possible, and imports electricity when necessary. It quantifies the additional energy demands for large-scale heat pumps and electric boilers. EnergyPLAN is a fast tool and via heuristic analysis with numerous iterations the sustainability factors for the Smart Energy System can be addressed, for example, resource consumption is limited, all energy demands are met, and the district heating system is balanced.

Applying the Methodology in Sønderborg
In this section, the results for Sønderborg from the first three steps are presented. The results from Step 4 are presented in Section 4.

Step One: City Energy System Diagnosis Today
The Sønderborg municipality as defined by the Danish Government defines the boundary of the energy system analysis, and this includes the main city of Sønderborg, a few villages, and some rural settlements ( Figure 5). These are governed by a single municipal authority. Sønderborg has a population of around 75,000 inhabitants, with around one third living in Sønderborg city. EnergyPLAN has been used in numerous energy system studies, including city energy system analyses [28]. Further details about EnergyPLAN are found here: [29].

Balancing the National Energy System with Power Plants
To balance the future renewable energy system, it is expected that power plants will be utilized in times of limited renewable electricity to balance the electricity system, producing around 5-10% of the total production during the year. Smaller regions do not usually have a local power plant and they import most of their electricity. Thus, it can be argued that these cities have virtual power plants. It is assumed that this will also be the case in 2050, and the city analysis for 2050 should include a virtual power plant in EnergyPLAN. The upstream resource input to produce the electricity in these power plants should be considered in the total resource input into the city. In 2050, the resources would be gasified biomass and biogas.

Using the Simulation Tool
The appropriate data from Steps 1-3 should be entered into EnergyPLAN. When running EnergyPLAN, the energy system is arranged to meet all electricity and heat demands locally to the extent possible, and imports electricity when necessary. It quantifies the additional energy demands for large-scale heat pumps and electric boilers. EnergyPLAN is a fast tool and via heuristic analysis with numerous iterations the sustainability factors for the Smart Energy System can be addressed, for example, resource consumption is limited, all energy demands are met, and the district heating system is balanced.

Applying the methodology in Sønderborg
In this section, the results for Sønderborg from the first three steps are presented. The results from Step 4 are presented in Section 4.

Step One: City Energy System Diagnosis Today
The Sønderborg municipality as defined by the Danish Government defines the boundary of the energy system analysis, and this includes the main city of Sønderborg, a few villages, and some rural settlements ( Figure 5). These are governed by a single municipal authority. Sønderborg has a population of around 75,000 inhabitants, with around one third living in Sønderborg city. The first step of the method was gathering regional energy data from a recent year. In Sønderborg, data were collected for the year 2016. Data sources included numerous local and national databases. Data were collected for data types 1, 2, 3, 4, and 7 (from Table 2). End-use data were The first step of the method was gathering regional energy data from a recent year. In Sønderborg, data were collected for the year 2016. Data sources included numerous local and national databases. Data were collected for data types 1, 2, 3, 4, and 7 (from Table 2). End-use data were collected for end uses such as lighting in households. Heat and electricity production data were collected from industry. The region has three main district heating systems and data were collected for each system. The distribution losses for electricity and district heating were estimated. Data types 1 and 6 were aggregated based on all other data inputs ( Figure 6). All the data collected for Sønderborg were presented in an energy balance in a Microsoft Excel file, similar to [25]. The structure of the data in this file is similar to Table 2. collected for end uses such as lighting in households. Heat and electricity production data were collected from industry. The region has three main district heating systems and data were collected for each system. The distribution losses for electricity and district heating were estimated. Data types 1 and 6 were aggregated based on all other data inputs ( Figure 6). All the data collected for Sønderborg were presented in an energy balance in a Microsoft Excel file, similar to [25]. The structure of the data in this file is similar to Table 2. The total energy sector demands are the energy required to achieve the end-use, excluding the conversion and distribution losses. The efficiency of the energy system was determined based on resource inputs and total energy sector demands. The embedded energy of imported electricity was 922 GWh (assuming a power plant efficiency of 40%). The efficiency of the energy system was 50%, based on a total resource input of 3079 GWh and total energy sector demand of 1542 GWh.
Local energy conversion technologies in 2016 included electricity production units, private and district heating units, industrial boilers, and vehicles. For each conversion technology, the production of energy, and their efficiency, are presented in Table 3.  The total energy sector demands are the energy required to achieve the end-use, excluding the conversion and distribution losses. The efficiency of the energy system was determined based on resource inputs and total energy sector demands. The embedded energy of imported electricity was 922 GWh (assuming a power plant efficiency of 40%). The efficiency of the energy system was 50%, based on a total resource input of 3079 GWh and total energy sector demand of 1542 GWh.
Local energy conversion technologies in 2016 included electricity production units, private and district heating units, industrial boilers, and vehicles. For each conversion technology, the production of energy, and their efficiency, are presented in Table 3.

Step Two: National Long-Term Energy Study and Per Capita Data
The second step of the method was identifying a national 100% renewable study (or similar) which has data for the current national energy system and for the future energy system. This study provided data to make a per capita comparison, as described in Section 3.2.2. The latest study carried out for Denmark becoming 100% renewable was used in this study: IDA Energy Vision 2050 [30]. IDA Energy Vision 2050 was completed in 2015. This study provided sufficient data required for Table 3, providing data for final energy demands and conversion and storage technologies for 2015 and 2050 (Table 4).

TWh/Year Energy Component 2015 2050
Resource inputs (1) Biomass 5 Transport (Total energy sector demands excluding conversion and distribution losses were not provided for transport so they were estimated based on efficiencies of vehicles today. Efficiencies were 25% light vehicles, 33% for heavy vehicles, 33% for aviation and shipping, and 85% for electric vehicles.) 16 13

Danish Changes to 2050
IDA Energy Vision 2050 integrates numerous energy supply technologies and storages, such as wind power, heat pumps, thermal storage, and electrolyzers. The report provided the capacities and efficiencies of these technologies. Regarding the change in energy demands from 2015 to 2050, the main assumptions of the study included:

•
Heat demand in buildings was reduced by 40%, which was based on the cost of renovations against the cost of supplying heat.

•
Household electricity savings were reduced by 25%, which was based on three factors: The future increase of equipment of 10%; Technical savings of 15%; Behavioral savings of 20%.
• Industry and service sectors, including agriculture and construction, assumed business as the usual growth of 40%. This energy demand was reduced via savings for fuel and electricity and a coordinated implementation of district heating and cooling, electric heat pumps, and replacement of fossil fuels with electricity, biomass, and upgraded hydrogen (methanated biogas).
All these changes in energy demands were assumed for Sønderborg.

Comparing the Per Capita Energy Data of Denmark and Sønderborg
In this step, the Danish per capita energy data was compared to the Sønderborg per capita energy data. Note that in the study these comparative results were only informative. To make the comparison easier, the per capita data were scaled up to represent the population of Sønderborg instead of being per capita. Firstly, the per capita data for Denmark and Sønderborg were calculated using Formula 1. Secondly, the per capita data in Denmark in 2015 were multiplied by the population of Sønderborg, and these results were compared to actual data collected in Sønderborg in 2016 (Table 5). In 2015, the population of Denmark was 5,669,081 and the population of Sønderborg was 75,000-around 1.3% of the Danish population.

Step Three: Per Capita Energy Data for the City in the Future
The third step of the method was quantifying the city energy system data for 2050 based on the national study. By using formula 2-multiplying the future population of Sønderborg by the Danish per capita energy system data in 2050-the final energy demands for Sønderborg in 2050 were calculated (Figure 7). The final energy demand data provided numerous key values for EnergyPLAN. All capacities and efficiencies for conversion technologies and storages were also provided by the IDA Energy Vision 2050 and these data were entered into the energy system analysis tool in Step 4.
Step 4 was carried out to ensure the technologies were at the appropriate level, considering the sustainability factors. In 2050, the population of Denmark is expected to be 6,229,193 [31] and it is assumed Sønderborg would still account for 1.3% of this, therefore having a population of 80,979.

Results: Step Four-Analyze and Balance the City Energy System
The fourth step was analyzing and balancing the energy system in EnergyPLAN and ensuring the sustainability factors were met. In this section, the final results from this step are presented for a selection of the data types.

Data Type 1-Resource Inputs
The final resource inputs for Sønderborg in 2016 and 2050 are presented in Figure 8. Resource inputs include local and imported resources. Figure 8 shows the connection of the Sønderborg energy system with the national electricity grid via the import and export of electricity. Electricity import is minimized in 2050 due to the energy sector coupling and an increase in the efficient use of energy, a key sustainability factor, and in this study the imported electricity was 89 GWh (5% of the total energy supply). Electricity export is limited to minimize the risk of not being able to integrate electricity into neighbouring regions and due to limited synergy effects between the regions [23,32].

Data Types 2 and 3-Conversion Technologies (Production) and Storages and Exchange
Conversion technology capacities and efficiencies were determined for all energy system components, including electricity, district heating, private heating, electric vehicles, electrofuel production, and energy storages. Data can be presented for all these units. However, for brevity, in this section only electricity, heating, and transport production results are presented-the associated energy storage capacities and efficiencies are not presented.

Electricity Production
Electricity is produced locally, and a large production is from offshore and onshore wind ( Figure   -  In Sønderborg in 2016, the total energy supply was 3079 GWh, and was mostly from imported fossil fuels and electricity supplemented with biomass and waste. Electricity import was also high, which added 922 GWh of embedded energy (based on assumed 40% power plant efficiency), mostly sourced from coal and biomass. In 2050, the total energy supply could be decreased to 1907 GWh and largely be composed of wind electricity, biomass, and waste, sourced locally. Imported electricity from Sustainable biomass in Sønderborg, based on a proportion of the Danish potential for livestock manure, biofuel, and energy crops, straw, firewood, and wood chips, should be approximately 600 GWh. In 2050, although locally sourced biomass demand is 489 GWh and local biogenic waste is 94 GWh, which is within the sustainable range, the embedded biomass in imported electricity from power plants is 162 GWh. These values indicate that to have a sustainable biomass consumption nationwide there would need to be coordination between the regions around biomass production, distribution, and consumption.

Data Types 2 and 3-Conversion Technologies (Production) and Storages and Exchange
Conversion technology capacities and efficiencies were determined for all energy system components, including electricity, district heating, private heating, electric vehicles, electrofuel production, and energy storages. Data can be presented for all these units. However, for brevity, in this section only electricity, heating, and transport production results are presented-the associated energy storage capacities and efficiencies are not presented.

Electricity Production
Electricity is produced locally, and a large production is from offshore and onshore wind (Figure 9). There is less imported electricity than in 2016 and a minimal amount is exported.

Data Types 2 and 3-Conversion Technologies (Production) and Storages and Exchange
Conversion technology capacities and efficiencies were determined for all energy system components, including electricity, district heating, private heating, electric vehicles, electrofuel production, and energy storages. Data can be presented for all these units. However, for brevity, in this section only electricity, heating, and transport production results are presented-the associated energy storage capacities and efficiencies are not presented.

Electricity Production
Electricity is produced locally, and a large production is from offshore and onshore wind ( Figure  9). There is less imported electricity than in 2016 and a minimal amount is exported. To understand the technical feasibility of the energy system, hour by hour electricity production data was analyzed. A small sample of the quantified results for the 8760 hours during the year is presented (Figure 10 and Figure 11). Electricity demand was met mostly by internally produced electricity and supplemented by the imported electricity. In the first two days of January, offshore wind and imported electricity accounted for the majority of electricity supply, whereas in the first two days of July, offshore wind and solar photovoltaic provided most of the electricity. To understand the technical feasibility of the energy system, hour by hour electricity production data was analyzed. A small sample of the quantified results for the 8760 hours during the year is presented (Figures 10 and 11). Electricity demand was met mostly by internally produced electricity and supplemented by the imported electricity. In the first two days of January, offshore wind and imported electricity accounted for the majority of electricity supply, whereas in the first two days of July, offshore wind and solar photovoltaic provided most of the electricity.

District Heating and Private Heating.
District heating in Sønderborg consists of the three district heating grids, but since Sønderborg city accounts for most of the consumption (85%), all the grids have been aggregated in these results ( Figure 12). From 2016 to 2050 district heating is expanded to cover 66% of the heat demand, but total heat demand is reduced. Total heat demand in 2016 is 743 GWh and in 2050 is 559 GWh. This is due to private heating, which reduces from 384 GWh to 190 GWh. In 2050, private heating is produced mostly with heat pumps. All heating demands are met sufficiently and all three district heating grids are in balance throughout the year, with minimal heat surplus or deficit, and this is a key indication of better resource use. A large share of district heating is supplied by large-scale heat pumps.  District heating in Sønderborg consists of the three district heating grids, but since Sønderborg city accounts for most of the consumption (85%), all the grids have been aggregated in these results ( Figure 12). From 2016 to 2050 district heating is expanded to cover 66% of the heat demand, but total heat demand is reduced. Total heat demand in 2016 is 743 GWh and in 2050 is 559 GWh. This is due to private heating, which reduces from 384 GWh to 190 GWh. In 2050, private heating is produced mostly with heat pumps. All heating demands are met sufficiently and all three district heating grids are in balance throughout the year, with minimal heat surplus or deficit, and this is a key indication of better resource use. A large share of district heating is supplied by large-scale heat pumps.

District Heating and Private Heating
District heating in Sønderborg consists of the three district heating grids, but since Sønderborg city accounts for most of the consumption (85%), all the grids have been aggregated in these results ( Figure 12). From 2016 to 2050 district heating is expanded to cover 66% of the heat demand, but total heat demand is reduced. Total heat demand in 2016 is 743 GWh and in 2050 is 559 GWh. This is due to private heating, which reduces from 384 GWh to 190 GWh. In 2050, private heating is produced mostly with heat pumps. All heating demands are met sufficiently and all three district heating grids are in balance throughout the year, with minimal heat surplus or deficit, and this is a key indication of better resource use. A large share of district heating is supplied by large-scale heat pumps. Hour by hour district heating data is presented for a sample of the 8760 hours ( Figure 13). In the first week in of January, in Sønderborg city, large scale heat pumps provided the most district heat, with a few hours of oversupply being stored. This stored heat was utilized later in the year. The remaining district heat was produced by boilers, geothermal, industry, and waste incineration.

Data types 4, 5, and 6-Final Energy Demands, End-Use Demands and Total Energy Sector Demands
A mixture of final electricity demands (conventional demand) and end-use electricity demands (household heat pumps) are presented in Figure 14 and Figure 15. Total electricity demand is the sum of all individual demands. Conventional electricity demand is an aggregation of lighting and appliances for residential and office buildings, and industry. From 2016 to 2050, conventional electricity demand remains largely the same. However, new end-use demands add to the total electricity demand, for instance electrified transport and electrolyzers. Hour by hour district heating data is presented for a sample of the 8760 hours ( Figure 13). In the first week in of January, in Sønderborg city, large scale heat pumps provided the most district heat, with a few hours of oversupply being stored. This stored heat was utilized later in the year. The remaining district heat was produced by boilers, geothermal, industry, and waste incineration. Hour by hour district heating data is presented for a sample of the 8760 hours ( Figure 13). In the first week in of January, in Sønderborg city, large scale heat pumps provided the most district heat, with a few hours of oversupply being stored. This stored heat was utilized later in the year. The remaining district heat was produced by boilers, geothermal, industry, and waste incineration.

Data types 4, 5, and 6-Final Energy Demands, End-Use Demands and Total Energy Sector Demands
A mixture of final electricity demands (conventional demand) and end-use electricity demands (household heat pumps) are presented in Figure 14 and Figure 15. Total electricity demand is the sum of all individual demands. Conventional electricity demand is an aggregation of lighting and appliances for residential and office buildings, and industry. From 2016 to 2050, conventional electricity demand remains largely the same. However, new end-use demands add to the total electricity demand, for instance electrified transport and electrolyzers. The consumption of electricity by different types of electricity demands is shown for a selection of hours in the first two days of January ( Figure 15). The electricity demand of heat pumps in the district heating system is constant, which provides the heat shown in Figure 13. Smart charging vehicles charge during the night, as seen in hours 1-7. Electrolyzers operate when there is cheaper electricity, for instance when wind power is high (see Figure 7 and Figure 15). Conventional electricity demand fluctuates between day and night. The total transport energy demand is reduced from 720 GWh to 510 GWh. Transport fuels shift from being sourced from fossil fuels to being sourced from electrofuels and electricity ( Figure 16).  The consumption of electricity by different types of electricity demands is shown for a selection of hours in the first two days of January ( Figure 15). The electricity demand of heat pumps in the district heating system is constant, which provides the heat shown in Figure 13. Smart charging vehicles charge during the night, as seen in hours 1-7. Electrolyzers operate when there is cheaper electricity, for instance when wind power is high (see Figure 7 and Figure 15). Conventional electricity demand fluctuates between day and night. The total transport energy demand is reduced from 720 GWh to 510 GWh. Transport fuels shift from being sourced from fossil fuels to being sourced from electrofuels and electricity ( Figure 16). The consumption of electricity by different types of electricity demands is shown for a selection of hours in the first two days of January ( Figure 15). The electricity demand of heat pumps in the district heating system is constant, which provides the heat shown in Figure 13. Smart charging vehicles charge during the night, as seen in hours 1-7. Electrolyzers operate when there is cheaper electricity, for instance when wind power is high (see Figures 7 and 15). Conventional electricity demand fluctuates between day and night.
The total transport energy demand is reduced from 720 GWh to 510 GWh. Transport fuels shift from being sourced from fossil fuels to being sourced from electrofuels and electricity ( Figure 16).

Potential Investments Towards 2050
Investment cost data for technologies and energy efficiency initiatives could be entered into EnergyPLAN, and based on this the tool calculated the total potential investments. Potential investment costs for the technologies, or efficiency improvements, such as building retrofitting or district heating expansion, in the Sønderborg energy system were an important factor in determining their sustainability and for project implementation (Figure 17). The total investment costs were based on predicted unit costs in the future and the present value of money, and not total cost of ownership. Annualized costs based on lifetimes can be calculated but it is uncertain when these energy system changes will be implemented, which influences the annualized cost calculations. With more local knowledge, a roadmap can be combined with these investment costs to create annual expenditures.

Discussion and conclusions
The aim of this article was to present a methodology to determine the renewable energy system of a city derived from the national 100% renewable energy system. This was tested with the case study of Sønderborg. It was a two-staged approach of: 1) data collection and 2) sustainability

Potential Investments Towards 2050
Investment cost data for technologies and energy efficiency initiatives could be entered into EnergyPLAN, and based on this the tool calculated the total potential investments. Potential investment costs for the technologies, or efficiency improvements, such as building retrofitting or district heating expansion, in the Sønderborg energy system were an important factor in determining their sustainability and for project implementation (Figure 17). The total investment costs were based on predicted unit costs in the future and the present value of money, and not total cost of ownership. Annualized costs based on lifetimes can be calculated but it is uncertain when these energy system changes will be implemented, which influences the annualized cost calculations. With more local knowledge, a roadmap can be combined with these investment costs to create annual expenditures.

Potential Investments Towards 2050
Investment cost data for technologies and energy efficiency initiatives could be entered into EnergyPLAN, and based on this the tool calculated the total potential investments. Potential investment costs for the technologies, or efficiency improvements, such as building retrofitting or district heating expansion, in the Sønderborg energy system were an important factor in determining their sustainability and for project implementation (Figure 17). The total investment costs were based on predicted unit costs in the future and the present value of money, and not total cost of ownership. Annualized costs based on lifetimes can be calculated but it is uncertain when these energy system changes will be implemented, which influences the annualized cost calculations. With more local knowledge, a roadmap can be combined with these investment costs to create annual expenditures.

Discussion and conclusions
The aim of this article was to present a methodology to determine the renewable energy system of a city derived from the national 100% renewable energy system. This was tested with the case study of Sønderborg. It was a two-staged approach of: 1) data collection and 2) sustainability

Discussion and Conclusions
The aim of this article was to present a methodology to determine the renewable energy system of a city derived from the national 100% renewable energy system. This was tested with the case Energies 2019, 12, 2307 19 of 21 study of Sønderborg. It was a two-staged approach of: (1) data collection and (2) sustainability assessment. The four-step methodology was able to analyze the complex renewable energy system locally. The method included all potential components of the future energy system and analyzed this on an hour-by-hour basis to understand the energy system dynamics from a Smart Energy System perspective. This showed how the technologies operate and interact.
This study advances the research field by focusing on the sustainability of the Smart Energy System rather than on improving energy data collection, which is often the focus [13,33]. Furthermore, the approach advances from focusing on silo measures in individual energy sectors, for instance, electricity measures in the electricity sector, which use particular models. Furthermore, to understand the dynamic energy system and the real need for energy storages, the method depends on higher resolution hourly data during the year rather than annualized data, as used in other methods and models, such as SEAPs.
The method was not simply focused on the modeling tool. EnergyPLAN was used as the tool in this study, but other tools can be utilized. However, other tools should be able to measure the sustainability factors. The method was focused on how the tool is used to understand how the city can go to 100% renewable energy in a sustainable way, i.e., in the scenario design. The article applies key sustainability factors for Smart Energy Systems to ensure the energy system is sustainable-utilizing energy locally and maximizing energy own-use (feasible energy security), maximizing technology synergies (better efficiency), and reducing biomass consumption (better resource use).
The methodology is not unique to Sønderborg and can be replicated in other countries and cities. By leveraging the national study, the method allows one to do rapid analysis, providing insights into the synergies and resource use in the energy system and potential technologies in the future. This can lead to long term goals and to understanding the potential of the energy system. The methodology avoids time consuming local energy system data collection, i.e., trend analysis and forecasting. In cities today, as part of SEAPs, the first step in the method of this article is usually undertaken, but to determine long term visions and goals within strategic energy planning, steps 2-4 can be undertaken ( Figure 18). The methodology can be applied by one or two energy planners, and results can be visualized, communicated, discussed, and updated later by stakeholders, as is done in strategic energy planning [34]. The methodology, analysis, and results should be seen as an initial framework for future iterations-to analyze different actions, the detailed analyses can be continually adjusted in ongoing revisions. New iterations should consider if the planned energy system is "smart" by analyzing it in terms of the sustainability factors, as described in this article. assessment. The four-step methodology was able to analyze the complex renewable energy system locally. The method included all potential components of the future energy system and analyzed this on an hour-by-hour basis to understand the energy system dynamics from a Smart Energy System perspective. This showed how the technologies operate and interact. This study advances the research field by focusing on the sustainability of the Smart Energy System rather than on improving energy data collection, which is often the focus [13,33]. Furthermore, the approach advances from focusing on silo measures in individual energy sectors, for instance, electricity measures in the electricity sector, which use particular models. Furthermore, to understand the dynamic energy system and the real need for energy storages, the method depends on higher resolution hourly data during the year rather than annualized data, as used in other methods and models, such as SEAPs.
The method was not simply focused on the modeling tool. EnergyPLAN was used as the tool in this study, but other tools can be utilized. However, other tools should be able to measure the sustainability factors. The method was focused on how the tool is used to understand how the city can go to 100% renewable energy in a sustainable way, i.e., in the scenario design. The article applies key sustainability factors for Smart Energy Systems to ensure the energy system is sustainableutilizing energy locally and maximizing energy own-use (feasible energy security), maximizing technology synergies (better efficiency), and reducing biomass consumption (better resource use).
The methodology is not unique to Sønderborg and can be replicated in other countries and cities. By leveraging the national study, the method allows one to do rapid analysis, providing insights into the synergies and resource use in the energy system and potential technologies in the future. This can lead to long term goals and to understanding the potential of the energy system. The methodology avoids time consuming local energy system data collection, i.e., trend analysis and forecasting. In cities today, as part of SEAPs, the first step in the method of this article is usually undertaken, but to determine long term visions and goals within strategic energy planning, steps 2-4 can be undertaken ( Figure 18). The methodology can be applied by one or two energy planners, and results can be visualized, communicated, discussed, and updated later by stakeholders, as is done in strategic energy planning [34]. The methodology, analysis, and results should be seen as an initial framework for future iterations-to analyze different actions, the detailed analyses can be continually adjusted in ongoing revisions. New iterations should consider if the planned energy system is "smart" by analyzing it in terms of the sustainability factors, as described in this article. This study does not consider the implementation of specific projects in the city, which will require a more detailed understanding of certain aspects of the energy system, and further analysis using other methodologies or tools. Furthermore, the study does not include analyses on the need to change concrete policies and taxes, or the changes that will occur for the re-distribution of costs and power between stakeholders. The overall economic consequences were assessed and prove to be level with the current costs, but the transactions between individuals, the government, and other stakeholders need to change in order to implement such changes. Furthermore, it is unknown what the energy system will look like in the future, some technologies may not be located in Sønderborg, This study does not consider the implementation of specific projects in the city, which will require a more detailed understanding of certain aspects of the energy system, and further analysis using other methodologies or tools. Furthermore, the study does not include analyses on the need to change concrete policies and taxes, or the changes that will occur for the re-distribution of costs and power between stakeholders. The overall economic consequences were assessed and prove to be level with the current costs, but the transactions between individuals, the government, and other stakeholders need to change in order to implement such changes. Furthermore, it is unknown what the energy system will look like in the future, some technologies may not be located in Sønderborg, however the purpose of this approach is to present an initial analysis and results for one sustainable scenario from which to make new iterations.
Author Contributions: D.D. wrote the original draft of the article. B.V.M. and H.L. contributed with methodology input, review, comments and validation of the paper.
Funding: The work was funded by the SmartEnCity project (grant number: 691883), which received funding from the H2020 programme of the European Commission.