DEVELOPMENT OF A TOOL CHAIN FOR COMPLEX CITY DISTRICT ENERGY 1 SYSTEM MODELING AND SIMULATION 2

Rapid urbanization leads to a concentration of energy consumption within cities. Therefore, city systems offer great potential for energy savings and greenhouse gas emission reduction. In this paper, we describe a methodology for city district energy system modeling and simulation. A PostgreSQL database (DB) builds the tool core. The DB is linked to a geographical information system (GIS) to combine spatial data with additional information. A Python interface enables a fast and automated generation of building models and profiles for whole city districts. The planning tool is used to generate a model of a reference city district. This model is calibrated via Quasi-Monte-Carlo (QMC) uncertainty analysis. Results show a sufficient fit between measurement data and simulation output.

needs for transportation, food, lodging and energy are concentrated within cities. Especially the demand for energy leads to high carbon dioxide emissions.Therefore, cities offer large potential to reduce greenhouse gas emissions.However, spatial planners try to promote a sustainable development of cities, while being challenged by the city complexity.First, analyses on city district scale lead to an increasing amount of objects.Second, city districts can be very heterogeneous according to their building types, such as residential or industrial buildings, or energy systems.All these different types, as well as their interdependencies, have to be taken into account.Third, input parameters are often uncertain.Hence, tools for dealing with city district complexity are required.According to Keirstead et al. urban energy systems are energy to satisfy the energy service demands of a (Keirstead, Jennings, & Sivakumar, 2012).Based on a literature review, they identified major challenges (such as complexity as well as uncertainty) and opportunities of city district energy system modeling.Besides standardization on building level, city districts standards and their application are getting more important.Romain et al. presented a tool, which is able to calculate heating demands of city districts based on the CityGML standard (Nouvel, Schulte, Eicker, Pietruschka, & Coors, 2013).Furthermore, the combination of geographic information systems (GIS) and simulations is used more often to analyze city districts.Mastrucci et al. worked on a GIS-based approach to estimate energy savings through retrofitting on building block scale (Mastrucci, Baume, Stazi, Salvucci, & Leopold, 2014).Lauster et al. investigated the influence of low-order thermal network models on city district simulations (Lauster, Teichmann, Fuchs, Streblow, & Mueller, 2014).They identified, that low-order building models are suitable for city district simulation, due to reduced runtime and sufficient output quality.Besides separated thermal and electrical analysis, coupled simulations gather more interest.Molitor et al. developed a simulation platform to perform cosimulations of multi-energy systems on city district scale (Molitor, Gross, Zeitz, & Monti, 2014).New approaches focus on potential of demand side management on city district level (Müller et al., 2015).Müller et al. developed the Dual Demand Side Management (2DSM) concept to control electrical and thermal energy flows on single building as well as on city district level.In this paper, we present an approach for an integral planning tool to enable city district energy system modeling and simulation.A PostgreSQL database (DB) defines the tool core.It includes an entityrelationship-scheme of a city information model (CIM).The DB is connected with a geographical information system (GIS) to link spatial and semantical data.A Python interface enables a fast and automated generation of building and energy system models within the multi-physics programming language Modelica.Furthermore, residential occupancy and electrical load profiles can be generated.The combination of profiles, building and energy system models enables thermal simulations on city district scale.The tool chain is used to generate profiles and building models of a reference residential building block within the city of Bottrop, Germany.An uncertainty analysis is performed with the building block model.Therefore, a Quasi-Monte-Carlo (QMC) approach is chosen.Finally, a reasonable reference model is selected, whose simulated thermal demand has a good fit with measurement data.

METHODOLOGY
First, the integral planning tool concept is described.Second, the modeling workflow for a mixed city area is shown.Third, the realized planning tool infrastructure is explained.

Integral planning tool concept
To reduce CO 2 emissions of buildings within cities, different actions can be taken into account, such as installation of new energy systems, modification of operation strategies or net energy demand reduction through altered user behavior or higher efficiency of energy using technology.However, in a lot of cases energetic optimization is performed on single building level only.The summation of optimized buildings is then defined as city district optimization.This approach does not account for building interconnection and possible synergetic effects, such as waste heat usage of neighbour buildings or photovoltaic sharing via microgrid.In our approach, we take option of building interconnection into account.Second, the tool chain should support city district data management and take the majority of building and energy system types into account.Third, thermal-electrical interaction is getting more important.For instance, the power to heat concept can increase the local usage of renewable energy sources and support grid stability.Therefore, we want to account for thermal and electrical elements in the simulation environment.The general planning tool concept is shown in figure 1.

Figure 1 Integral planning tool concept
To deal with city district complexity, a city information model (CIM) has been designed.It accounts for different types of buildings, such as residential, industrial, commercial and other nonresidential buildings as well as diverse types of thermal and electrical energy systems.The CIM is implemented into a relational database system (DB) to enable a simplified data management of city district data.Furthermore, the DB is connected with a geographic information system (GIS).Figure 2 shows a simplified version of the CIM entity relationship scheme (without energy systems).

Figure 2 CIM entity relationship scheme
General buildings are defined by their GIS location, address and type.Buildings can be categorized into (SME: Small and medium sized enterprizes).The with high availability of building data respectively sufficient methods for data estimation.As one example, geometries and appliances of residential buildings can be estimated sufficiently, due to homogeneous building structure in a majority of cases.On the other hand, detailed information about industrial or other non-residential building is often hardly available.Therefore, they are primary taken into account via measured or estimated load profiles.Based on an initial data set, e.g. with information about building types, locations and occupants per apartment, an interface enables the automatized modeling of buildings, energy systems and profiles, such as occupancy or electrical load profiles.Models and profiles are exported into a city district simulation environment to perform thermal and electrial dynamic simulations.After a postprocesssing phase, results can be saved back into the database.Furthermore, new scenarios, such as implementation of different energy systems, can be modeled to enable further simulations.

Modeling workflow
We have chosen two approaches to model building objects: First, as physical building models in combination with appliance and user profiles.Second, as table based models with demand profiles.
The first approach is used to account for residential buildings.A low-order building model of Modelica AixLib is used to define residential buildings (RWTH-Aachen University, E.ON Energy Research Center, Institute for Energy Efficient Buildings and Indoor Climate, 2014).This model is based on the VDI 6007 standard (Verein deutscher Ingenieure (VDI), Oktober 2007) and consists of thermal resistances and capacities (R-C) for a single thermal zone.Lauster et al. have shown that these models are suitable for simulation on city district scale, due to low run time (Lauster et al., 2014).The buildings are parameterized based on a Python tool named TEASER, which has originally been developed by Hillebrand et al. (Hillebrand, Arends, Streblow, Madlener, & Mueller, 2014).This tool is able to generate typical building geometries, layer structures and material attributes related to basic parameters: -Building type -Year of construction -Net floor area -Number of floors -Floor height For example, the building ground floor area can be extracted from GIS.With number of floors and building ground floor area the net floor area can be estimated, which is used as one input for TEASER.The TEASER typical building setups are based on the German building typology by IWU (Institut für Wohnen und Umwelt -IWU, 2011).The used IWU building age classes are shown in table 1.With the basic parameters from the GIS-DB and with knowledge about IWU building types, TEASER can generate typical buildings.Typical building setups can be exported into Modelica records, holding necessary R-C-parameters for the low order model.DB-information about apartments per building and occupants per apartment serves as input.The Python tool generates occupancy, appliance and lighting profiles, which are used as input for thermal simulations in Modelica and load flow calculations within the commercial software NEPLAN.Figure 3 shows the modeling workflow for residential buildings.The second approach with table based models is chosen to take non-residential buildings into account.
The main reason is the heterogenity of nonresidential buildings related to their user behavior and installed appliance and lighting.Internal data of these buidings is often uncertain.To take different non-residential building types, such as metal companies, backeries or department stores, into account, thermal and electrical standardized load profiles (SLP) are generated (Bundesverband der Energie-und Wasserwirtschaft e. V., 2013; Stadtwerke Unna, 2014).Specific demand values of Fraunhofer ISI are used for thermal and annual demand estimation (Fraunhofer Institut für Systemund Innovationsforschung ISI, 2013).Futher information about the modeling process can be found in (Schiefelbein et al., 2014).

Planning tool infrastructure and simulation environment
The CIM structure respectively its entity-relationship scheme has been implemented within a PostgreSQL database with PostGIS.The PostGIS plugin enables the usage of geographic objects within PostgreSQL (PostGIS, 2015).Thus, building semantical data is linked with position data.QGIS is chosen as GIS software to visualize the city district structure.Furthermore, QGIS enables graphical data management within the DB.The implemented tool infrastructure is shown in figure 4.

Figure 4 Planning tool infrastructure
The modeling workflow has been realized via Python interface.It enables building and energy systems modeling and parametriziation in Modelica and model export to Dymola to perform thermal simulations on city district scale.Futhermore, the electrical grid is modeled within NEPLAN.Building demand and generation loads can automatically be generated and linked to nodes in NEPLAN.

CASE STUDY
First, the planning tool is used to model, simulate and calibrate a building block model of an existing city district.The calibration of the reference model is performed via uncertainty analysis.Therefore, a Quasi-Monte-Carlo approach has been chosen.Thermal demand statistics serve as reference point for comparison with simulation results.Second, the electrical grid of the reference district is modeled and load flow calculations of the reference state are performed.

Reference city district
A residential building block within the city of Bottrop, Germany, is chosen as reference district.It consists of 55 residential buildings with around 170 occupants.Statistics about final energy demands of the Innovation City Ruhr area as well as years of construction of different building blocks were available.Datasets about the electrical grid were provided by the local grid operator.Necessary building data has been extracted from open source systems, such as openstreetmaps (OpenStreetMap -Deutschland) and been imported into the database.
Figure 5 shows an areal picture of the reference building block.

Uncertain parameters
Altough the number of buildings, building locations as well as the years of construction are known, the majority of building parameters is uncertain, mainly related to user behavior and building physics.Since these uncertain parameters influence the simulation output, such as thermal energy demand, their influence has to be quantified.We chose a Quasi-Monte-Carlo (QMC) approach to perform an uncertainty analysis to quantify this influence.
According to Stinner et al., a systematic variation of input parameters if performed within a QMC method (Stinner, Streblow, & Mueller, 2014).The probabilistic distributions of uncertain parameters are known (or estimated) and random numbers are selected from the distribution to generate parameter sets.However, in comparison to Monte-Carlo method, the numbers are selected systematically within QMC method.One option for systematical selection is the Sobol algorithm (Burhenne, Jacob, & Henze, 2011).According to Burhenne et al., the Sobol method is promising for achieving sufficient output data with less simulation runs.Therefore, we chose the Sobol algorithm to generate the input parametersets.The following quantities are chosen as uncertain parameters: -Desired indoor temperature (DIT) -Year of modernization/retrofit -Occupancy -Weather (Outdoor temperature) The majority of buildings within the reference district has been constructed before 1948.Therefore, especially the unknown state of retrofitting can have a major impact on building thermal demand.

Modeling process for buildings
First, physical building models are generated via tool chain.While the geometrical basic parameters were kept constant, different years of retrofitting are set, according to IWU building typology (shown in table 1) (Institut für Wohnen und Umwelt -IWU, 2011).Thus, the Python building tool generates building sets with different layer structures and material properties, according to the last year of retrofit respectively year of construction (if no retrofit year is defined).Based on a nominal heat load calculation, every building is equiped with a gas fired boiler system (efficency factor < 1).Second, the Richardson-Python tool is used to generate a pool of random user profiles for every building.Therefore, the total number of occupants has been distributed over all apartments within the building block, based on statistics by DESTATIS (Statistisches Bundesamt, 2011).The number of apartments per building and the number of occupants per apartment serve as input for the Richardson-Python tool.

Modeling of electrical grid
The electrical low and medium voltage grid of the reference city district is modeled within NEPLAN.Residential building loads as well as photovoltaic generation curves are automatically generated via tool chain.However, currently transmission line modeling still requires manual work within this approach.Based on grid infrastructure data sets, provided by grid operator, as well as GIS data, the modeling is performed.Cable length and positions are estimated via GIS, while transformator data is taken from the grid operator data.

Thermal building simulation parametrization
The initial desired indoor temperature (DIT) is chosen separately for every simulation run and every building.For simplification, it is assumed to be constant during simulation run.The DIT probability function is assumed to have a normalized distribution with an arithmetic mean of 18.5 °C and a standard deviation of 4 °C, according to Stinner et al. (Stinner et al., 2014).The DIT sets are chosen via Sobol algorithm.The occupancy, appliance and lighting profile combinations are chosen randomly for every building out of the generated pool of profiles.The external loads are defined through test reference year (TRY) weather file for region 5 by the German weather service (Deutscher Wetterdienst, 2015).According to Stinner et al., an interpolation between standard TRY file and warm respectively cold TRY files is performed, to take weather uncertainty into account (Stinner et al., 2014).Therefore, a random number is chosen of the intevall [0,1] with an equal distribution.Resulting, a linear interpolation between cold and normal TRY is performed for chosen numbers within [0, 0.5] respectively between normal and warm TRY for chosen numbers within (0.5, 1].The air exchange rate is assumed to be constant at 0.2 per hour.Due to the fact that the thermal simulation only covers space heating demand, assumptions for domestic hot water usage have to be made.According to Umweltbundesamt, the share between thermal demand for domestic hot water and total thermal demand is assumed to be 15% (Umweltbundesamt, 2015).Table 2

Grid simulation parametrization
NEPLAN is used to perform a static load flow analysis with the reference city district grid.The load flow analysis is performed with a timestep of one minute.In every time step the actual consumption and generation per node respectively building, is used to calculate the voltage profile per node and the power flow of the cables and transformers.The node voltage should not exceed the lower bound of 0.36 kV as well as the upper bound of 0.44 kV.The load flow calculation is mainly used to detect errors within the grid model.Under the assumption, that the existing grid infrastructure is stable under current conditions, overload elements might be an indicator for wrong parametrization.After defining a sufficient grid reference state, the impact of future scenarios, such as higher share of renewables or heat pump usage, can be investigated.

Results of uncertainty analysis
To make simulation and measuremant data comparable, the final thermal energy demand of the reference city district has been weather-adjusted and the share of domestic hot water demand has been cleared out.Factors of German weather service for region 5 and year 2010 are taken for weatheradjustment (Deutscher Wetterdienst, 2013).This calculation results in a reference value for the final thermal energy demand for space heating.Simulation result values have been normalized with this reference value.Figure 6 shows the normalized, median thermal load values for the building block and for all simulation runs.In general, the load curve follows the seasonal trends of higher demand within winter month as well as lower demand within summer month.However, due to high desired indoor temperature values within some buildings, space heating is also required during summer month.
Figure 7 shows an histogram of number of simulation runs and classes of normalized annual thermal demands of the city district.The histogram includes simulation result values that are up to five times higher than reference value.These simulation runs include combinations of old buildings with high desired indoor temperatures, which leads to high thermal energy demand values, resulting in an higher distribution within the histogram.
The relative interquartil range (RIQR) is chosen for further analysis.According to Stinner et al. the RIQR is the difference between 25-quantil and 75-quantil, which holds 50% of the results, related to the median (Stinner et al., 2014): (1) The RIQR is 1.31 for the uncertainty analysis.This relatively high values shows, that the real thermal demand value on building block scale can hardly be predicted with the given input and parameter assumptions.Especially simulation runs with a high share of old respectively non-retrofited buildings, led to overrated thermal demand values.However, the median value is close to the real demand value.Therefore, the analysis is sufficient to define an input dataset as reference state.Thus, only DIT values within [17 °C, 21 °C] interval are considered.Furthermore, retrofitings according to IWU classes G, H, I and J are assumed to be realistic (last year of retrofiting > 1979).For simplification, all buildings with unkown state of retrofit should have the same last year of retrofiting within the reference state.The combination of a DIT of 19.9 °C with the IWU class H (last year of retrofit between 1984 1994) led to a difference of only 0.23% between reference and simulation value.Therefore, these input parameters are chosen for the reference state of the city district.

Results of grid simulation
Figure 8 shows the span of load values for grid nodes for a January day within the reference city district.

Figure 8 Load profiles at building nodes
The analysis shows that the voltage stays between the limits of 360 to 440 Volts.The slightly increasing voltage during the noon is related to PV production whereby the lower voltage in the evening is caused by higher consumption.Figure 9 shows the relative load of a transformer, which is connected to the all buildings of one building block side.The maximum power limit of the transformer is not exceeded.The increasing power flow during the evening, according to higher consumption, matches the decreasing voltage profile per node in Figure 8.The load flow calculation of the modeled grid showed robust grid behavior.This is essential for a reference model, but not sufficient.However, under the assumption that the chosen grid model is able to represent the reference state, it can be used to investigate the impact of new energy systems or higher fluctuation of renewable generation.

CONCLUSION AND OUTLOOK
In this paper we presented a tool chain for complex city district modeling and simulation.A city information model (CIM), representing the building and energy infrastructure of the city district, has been implemented into a PostgreSQL database (DB).The DB has been connected to a geographic information system (GIS) to simplify data management and enable visualization of the city district structure.A Python interface enables the automatized generation of building models and user profiles, which can be used for thermal simulations within Modelica as well as load flow calculations in NEPLAN.The tool chain is used to model, simulate and calibrate the thermal building model of a reference city district within the city of Bottrop, Germany.Therefore, a Quasi-Monte-Carlo approach (QMC) has been chosen.The results show, that a number of 128 parameter sets in combination with 55 buildings did not lead to a precise prediction of the real thermal energy demand.Especially parameter sets of old buildings with high desired indoor temperatures led to overrated thermal demand estimation on building block scale.However, the median results were close enough to the reference state.Therefore, sufficient model input parameters could be chosen for reference model.Furthermore, the electrical grid of the reference city district has been modeled in NEPLAN.Static load flow analysis has been performed to detect possible errors within the grid model.The chosen grid model showed robust behavior.This does not necessarily proof a good reference model.However, the chosen model is assumed to be suitable for further investigations, especially with focus on higher fluctuation of renewables and higher share of decentralized energy systems.The tool chain is advantageous according its ability to generate multiple building models and profiles in a short amount of time.This is supportive for the analysis of large districts or the performing of uncertainty respectively sensitivity analyses.So far, the thermal and electrical simulations do not have a direct interaction.A future aim is to enable thermo-electrical co-simulations on city district scale.Furthermore, the automated modeling of thermal and electrical networks could be of interest as future application.Therefore, the GIS database could hold graph node positions and edge values, which could be handed over to a modeling interface.Moreover, first optimization approaches for the optimized distribution of thermal energy systems on city district scale could be linked with the database to provide necessary building location and load data.

Figure 3
Figure 3 Modeling workflow