PROCEEDINGS OF ECOS 2016 - THE 29TH INTERNATIONAL CONFERENCE ON EFFICIENCY, COST, OPTIMIZATION, SIMULATION AND ENVIRONMENTAL IMPACT OF ENERGY SYSTEMS JUNE 19-23, 2016, PORTOROŽ, SLOVENIA
Clustering of Buildings within City Districts to reduce Runtime for Energy System Placement Optimization Jan Schiefelbeina, Stefan Klaska, Tobias Beckhöltera, Marcus Fuchsa and Dirk Müllera a
Institute for Energy Efficient Buildings and Indoor Climate, E.ON Energy Research Center, RWTH Aachen University, Aachen, Germany,
[email protected]
Abstract: Modern energy systems, such as combined heat and power (CHP) units, can play an important role to efficiently cover energy demands in urban areas. Optimization supports the placement of thermo-electrical energy systems. However, runtime increases progressively with rising number of buildings. This results in limitations of city system size for optimization. Clustering of buildings is a possible solution to enable optimization of large scale systems. Thus, buildings are clustered into smaller input groups. In this paper, we describe a building clustering algorithm based on street patterns. The street clustering algorithm has been applied to a test city district and has been compared to other clustering algorithms. The building clusters served as input for an optimization program. Results show that the optimization with clustering preprocessing might have lower objective function values compared to whole city district optimization. However, runtime can be decreased significantly. Therefore, clustering methods enable energy system optimization of large city districts in feasible runtime.
Keywords: City district, clustering, MILP, optimized placement, energy systems, street topology, runtime reduction
1. Introduction Cities are responsible for more than 70 % of global greenhouse gas emissions [1]. Therefore, urban areas can be expected to offer great potential for CO2 emission reduction and efficiency enhancement. In addition to heuristic optimization approaches engineers and planers use rigorous mathematical optimization to identify optimized placement and dimensioning of thermo-electrical energy systems, such as combined heat and power (CHP) units. CHP implementation can increase overall energy efficiency, especially in combination with local heating networks (LHN) or decentralized electrical grids (DEG). However, as presented by [2] mixed integer linear programming (MILP) problems for optimized energy system placement can lead to impractical runtime on city district scale. An increasing number of buildings leads to a progressive increase in runtime, because of a larger number of possible energy system configurations and building interconnections. Clustering methods can be a solution to reduce runtime effort for optimization. In general, clustering can be defined as grouping objects into homogeneous classes based on similarity of object attributes [3]. A common method to cluster objects into a specific number of sets is the k-means algorithm [4]. It aims at the minimization of the within-cluster sum of squares, respectively the Euclidian distance between the cluster points and the cluster center. In contrast, the mean shift algorithm does not require number of clusters as input [5]. However, its methodology is comparable to k-means clustering. Mean shift algorithm moves every object to the ‘average’ object in its neighborhood, until the distances between ‘average’ object and further cluster points, the mean shift distance, is minimized. 1
One typical application in energy system optimization is the clustering of demand days, as used by [6], [7] and [8]. Annual load profiles are clustered into groups of typical demand days or periods, until a specific number of clusters is reached and the typical demand periods sufficiently represent the original annual profiles. Thus, a smaller amount of demand days or periods serves as input for energy system dimensioning or optimization, which reduces overall runtime. However, using demand periods sets limitations for representing thermal storage usage within the model, especially for long-term storage effects. Besides demand period clustering, building objects can be clustered by position. As [9] demonstrate, buildings can be grouped into integrated zones to reduce optimization runtime for regional energy system planning. Furthermore, clustering can be used for building energy benchmarking and evaluation, as shown by [10]. Optimization with clustering can be advantageous compared to overall city district optimization. Smaller clusters lead to smaller optimization subproblems and, therefore, to reduced runtime. Furthermore, clustering optimization still enables LHN or DEG connections between buildings, which would not be possible for single building optimization. However, clustering also reduces the amount of possible energy system configurations. Thus, clustering could eliminate optimal solutions. A trade-off between runtime and quality of solution should be attained. Clustering exclusively based on building position can have one disadvantage: It does not account for street patterns. However, LHN or DEG connections are often installed along street networks, while direct building connections are often hindered by physical or legal constraints. Thus, clustering based on street networks might be supportive. In this paper, we describe a building clustering method based on city district street typology. The algorithm loops over street routes and looks for buildings within a specific range. If certain criteria are met, the buildings are added to an open cluster, until a maximum cluster size is reached or a clustering criterion is violated. The output is a list of building groups, which can be used as input for energy system placement optimization. K-means and mean shift clustering have been implemented next to the street search algorithm. A case study with a virtual city district has been performed to compare optimization results for the overall city district with results for cluster optimization.
2. Methodology 2.1. City district model The city district has been modeled with the Python package networkx [11]. Thus, the city district is represented by a mathematical graph with building nodes as well as street nodes and edges. Every node holds a specific position attribute. Furthermore, every building node can hold a building object with different attributes, such as building type, year of construction or thermal and electrical demands. Thermal and electrical load curves are generated as standardized load profiles [12,13]. The resulting graph serves as input for clustering.
2.2. Clustering algorithm In general, three main clustering methods are of interest to preprocess buildings for energy system optimization: - Geographical clustering (by position) - Energy demand clustering - Combination of geographical and energy demand clustering (energy density clustering)
2
Fig. 1. Street clustering algorithm flowchart Geographical clustering defines building groups exclusively by position, respectively distance values, while energy demand clustering accounts for energy demand values, independent from building positions. In contrast, energy density clustering can unite both methods. An exclusively geographical clustering puts buildings with low distance to each other into groups, which is advantageous for LHN connections due to lower capital cost and lower heat losses. However, LHN investment might be unattractive, if buildings of low demand are clustered. In contrast, clustering based on total building energy demand values might lead to clusters of high total energy demand, while the distances might be uninteresting for investments in local grid structure. A combination of both methods can produce clusters with specific energy demand and limited distance values between buildings. In this paper, we will only compare geographical clustering methods. Thus, the comparability to existing clustering algorithms, based on position attributes, is higher. K-means and mean shift algorithms have been chosen for comparison. The developed clustering algorithm takes street patterns into account to guarantee clusters within a specific range to street nodes and edges. The calculation is done via Euclidean distance between building and street nodes. If a street edge is closest to the processed point, the distance is calculated via perpendicular connection of point and street edge. Street clustering enables better routing options for LHN or DEG connections along 3
streets. Shorter street paths within clusters lead to reduced installation cost and heat losses within heating networks. The following inputs have to be defined for the street clustering algorithm: - Maximum number of buildings per cluster - Maximum distance between street and building node Furthermore, the user has to choose a criterion for adding the building node candidate to a cluster, such as a maximum allowed distance between the building node candidate to one cluster node or all cluster nodes. Figure 1 shows the street clustering algorithm workflow. The clustering is initialized with a street node of low degree, i.e. the clustering process starts with a street node with a low number of neighbor street nodes. The algorithm searches for building nodes, which are close to the currently processed street node. The building is added to the closest cluster, if the building node is within a specific range to the street node, the closest cluster has not reached the maximum cluster size and the cluster criteria are met. The clustering goes on until all street nodes and edges have been processed. Because of assigning all building nodes to their closest street node or edge, all buildings nodes are going to be processed, too. The algorithm returns clusters and corresponding building node numbers.
2.3. Case study First, the street search algorithm is compared with two standard clustering methods, the k-means [14] and the mean shift algorithm [15]. The k-means algorithm requires a user defined number of clusters, while mean shift method does not. Both methods perform clustering based on building node positions. However, in contrast to the street clustering algorithm they do not account for the street topology. Second, the results of the clustering algorithm usage are used as input for an energy system optimization. In this case, the optimization of the unclustered city district is used for comparison. Figure 2 shows the reference city district.
Fig. 2. City district topology The district consists of 12 multi-family, residential buildings (grey squares), located around a street graph composed of 6 nodes and 6 edges. The following parameters are defined for street clustering: - Maximum number of buildings per cluster: 4 - Maximum distance of building to street: 12 meters - Cluster criterion: One building within cluster is within range of 25 meters to building candidate 4
To make the chosen clustering methods comparable, the number of desired clusters for k-means algorithm is set to 6, because of 6 clusters as output of street clustering and mean shift usage. The clustering results are used as input for energy system optimization. The aim is an optimized placement and dimensioning of energy systems within a city district to minimize annual cost or greenhouse gas emissions. The optimizer can choose from a range of different thermal and electrical energy systems, such as CHP, boiler, PV or thermal storage systems, with different nominal powers or capacities. Thus, the optimization model is formulated as a mixed integer linear programming (MILP) problem. Detailed information about the optimization model can be found within [2]. The minimization of annual cost is chosen as objective function for our case study. Boilers, CHP systems and thermal storage systems can be selected. Furthermore, LHN connections between single buildings as well as DEG connections between all buildings are possible. Thermal and electrical energy demands have to be covered for every time step. Moreover, LHN connections can only be installed along streets. The reference state for the optimized scenarios is boiler installations without LHN or DEG between buildings. 5 demand days are chosen for further runtime reduction. Further optimization settings and city district parameters can be found in the appendix. In addition to the optimization of every cluster, a whole city district optimization is performed with the same objective function and constraints. Thus, cluster optimization results can be compared to results of unclustered city district optimization.
3. Results Figure 3 shows the clustering results. Street
K-means
Mean shift
Fig. 3. Clustering results (left – Street; middle – K-means, right – Mean shift) All clustering methods add building 1001 (position: -20 / 130) into an own cluster. The remainig clusters are all defined differently. While the street clustering algorithm sorted all clusters strictly along street edges, k-means and mean shift algorithm does not. This also results in 4 single building clusters by street clustering. However, for the chosen city district all chosen clustering methods generate comparable clusters. Furthermore, street clustering and mean shift generated the same number of clusters, as it has been defined for k-means algorithm. Table 1 shows the optimization results with percent change related to the reference state, which is defined by boiler systems within every building without LHN connections. 5
Table 1. Optimization results Parameter Unclustered city optimization Annual cost in 92,491 Euro / a (-8.72 %) CO2 emissions 186 in tons / a (-16.44 %) Runtime in 260,364 seconds ( 3 days)
Street clustering optimization 98,809 (-2.48 %) 201 (-9.4 %) 87
K-means clustering optimization 99,653 (-1.65 %) 211 (-4.99 %) 239
Mean shift clustering optimization 101,333 ( 0 %) 193 (-12.95 %) 61
Reference (Boilers; no local grids) 101,323 222 -
Figure 4 shows the recommended energy system placement for complete city district and cluster optimization.
Fig. 4. Energy system placement results The optimization problem for the whole city district reaches the highest objective value with 8.72 % annual cost reduction compared to the reference state. In this case, the optimizer recommends two LHN grids with two bivalent CHP feeders as well as a DEG connection to all buildings. Further buildings have a boiler supply. Street and k-means clustering optimization results in a lower cost reduction, which is still better than reference value, while mean shift clustering optimization holds 6
the same annual cost as reference state. All chosen clustering methods disable the central LHN connection, which has been chosen by the unclustered city district optimization. However, all clustering methods lead to a runtime reduction of around 99 % in comparison to the unclustered city district optimization.
4. Discussion Results for street, k-means and mean shift clustering are very close to each other. A possible explanation is the fact that buildings at the same street edge are often closer to each other than buildings of other street edges. In this case, the clustering algorithms all tend to cluster in a comparable way. Thus, the street clustering is not dominating k-means and mean shift method. However, the user has to define a fixed number of clusters for k-means clustering, what makes kmeans usage less flexible. On the other hand, mean shift clustering does not require a defined number of clusters, but for large object structures it might lead to large number of objects per cluster, which is undesirable for city district optimization. The street clustering implementation can limit the cluster size. Furthermore, at concentrated building blocks k-means and mean shift method might define clusters on building block sides, not along streets. In reality, this can limit LHN and DEG options. In this case, the street clustering method can be advantageous. The street clustering leads to a highly reduced optimization runtime. However, the objective function value is also reduced, compared to the optimization of the unclustered city district. The main reason for a lower objective function value is the limitation of LHN and DEG connection options by pre-clustering of buildings. Thus, the clusters cannot be interconnected. Therefore, a smart way of performing clustering is essential to identify system configurations with sufficient objective function value in practicable runtime. Currently, the street cluster algorithm only accounts for building node position in relation to street networks. An extension to account for building energy demands is necessary to improve clustering.
5. Conclusion and outlook In this paper, we describe a clustering algorithm based on street topology. The algorithm groups buildings into clusters along street networks. This methodology is interesting to account for possible local heating network (LHN) or decentralized electrical grid (DEG) connections, which might be installed along street routes. Clusters with shorter inner street paths, respectively shorter grid infrastructure, can reduce capital cost and heat losses of heat networks. The street clustering algorithm has been compared to k-means and mean shift clustering of a virtual city district. The clustering results are similar, although k-means and mean shift do not account for street patterns. However, street clustering enables a distinct limitation of clustersize and does not require a fixed number of clusters, what makes the street clustering method easier to apply. The clusters serve as input for energy system placement optimization. The smaller number of buildings per optimization problem reduced the overall runtime for city district optimization around 99 % in comparison to the unclustered city district optimization. However, the clustering process also limits possible LHN or DEG connection options within the city district. This leads to a lower objective function value for all cluster optimizations compared to an optimization run of the unclustered city district. In the future, the street clustering algorithm will be extended with clustering criteria based on building energy demand values. Thus, clusters with a specific energy density or power level can be formed, which is interesting for LHN and/or DEG applications. Further clustering criteria, such as building types or different load curve characteristics, may be taken into account.
Acknowledgments We gratefully acknowledge the financial support for this project by BMWi (German Federal Ministry of Economics and Energy) under promotional reference 03ET1381A. 7
Appendix Table A.1. System configuration Parameters Processor Cores Random-access memory Solver Interface Gurobi MIPGap
Value Intel Xeon(R) CPH 2.7 GHz 8 Cores 24 Gurobi 6.5 gurobipy (Python) 1%
Table A.2. Reference city district data Building ID Thermal net space heating demand in kWh 1001 45000 1002 67500 1003 56250 1004 45000 1005 67500 1006 56250 1007 45000 1008 67500 1009 56250 1010 45000 1011 67500 1012 56250
Unit
GB
Electrical demand in kWh
x-coordinate in m
y-coordinate in m
7500 12000 9600 5100 11400 10500 5700 13500 9000 6000 9600 9000
-20 -10 -10 10 10 50 50 30 20 50 50 40
130 70 50 70 50 70 50 90 30 30 10 -10
Table A.3. Parameters of demand period clustering Parameters Value Clustering method k-medoids Period size 24 Number of demand periods 5
8
Unit hours
Table A.4. Parameters of energy system optimization Parameters Value Observation period 10 Interest factor 1.05 Boiler th. capacity range 10 – 90 Boiler minimum part load 0.03 Number of possible CHP units 4 (capacity dependent on chosen city district / cluster) CHP minimum part load 0.5 Buffer storage stand-by losses 1 % (Loss of stored energy per timestep (hourly)) Price change factor capital 1 Price change factor demand 1.038 Price change factor operations 1.017 Spec. gas price (residential) 0.0671 Spec. el. price (residential) 0.2661 Spec. CO2 emissions (gas) 0.244 Spec. CO2 emissions (electr.) 0.604
Unit years kW
€ / kWh € / kWh kg / kWh kg / kWh
Table A.5. Optimization results (unclustered city district – only CHP and LHN configuration) System type Configuration CHP (Building 1011) 10 kW (el.); Boiler: 17.37 kW; LHN (1011 – 1012); TES: 1211.28 l CHP (Building 1010) 10 kW (el.); Boiler: 46.88 kW; LHN (1003 – 1007 – 1009 – 1010); TES: 1264.14 l Table A.6. Optimization results (street cluster city district – only CHP and LHN configuration) System type Configuration CHP (Building 1005) 5 kW (el.); Boiler: 49.13 kW; LHN (1002 – 1004 – 1005); TES: 812.56 l CHP (Building 1010) 10 kW (el.); Boiler: 41.57 kW; LHN (1007 – 1010 – 1011); TES: 749.98 l Table A.7. Optimization results (k-means cluster city district – only CHP and LHN configuration) System type Configuration CHP (Building 1005) 5 kW (el.); Boiler: 48.8 kW; LHN (1003 – 1005 – 1009); TES: 881.73 l Table A.8. Optimization results (mean shift cluster city district – only CHP and LHN configuration) System type Configuration CHP (Building 1004) 5 kW (el.); Boiler: 24.68 kW; LHN (1002 – 1004); TES: 684.14l CHP (Building 1005) 5 kW (el.); Boiler: 28.4 kW; LHN (1005 – 1009); TES: 683.67l CHP (Building 1012) 5 kW (el.); Boiler: 28.49 kW; LHN (1011 – 1012); TES: 706.32l
9
References [1] United Nations, Cities and Climate Change: Global Report on Human Settlements 2011, 2011. [2] J. Schiefelbein, J. Tesfaegzi, R. Streblow, D. Müller, Design of an Optimization Algorithm for the Distribution of Thermal Energy Systems and Local Heating Networks within a City District, in: LaTEP laboratory (Ed.), Proceedings of ECOS 2015 - The 28th International Conference on Efficiency, Cost, Optimization, Simulation and Environmental Impact of Energy Systems, Pau, 2015. [3] K.D. Bailey, Typologies and taxonomies: An introduction to classification techniques, Sage Publications, Thousand Oaks, Calif., 1994. [4] J. MacQueen, Some Methods for Classification and Analysis of Multivariate Observations, in: University of California Press (Ed.), Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, 1st ed., Berkeley, 1967, pp. 281–297. [5] Y. Cheng, Mean shift, mode seeking, and clustering - Pattern Analysis and Machine Intelligence, IEEE Transactions on, in: IEEE (Ed.), Transactions on Pattern Analysis and Machine Intelligence, 1995, pp. 790–799. [6] F. Domínguez-Muñoz, J.M. Cejudo-López, A. Carrillo-Andrés, M. Gallardo-Salazar, Selection of typical demand days for CHP optimization, Energy and Buildings 43 (2011) 3036–3043. [7] S. Fazlollahi, S.L. Bungener, P. Mandel, G. Becker, F. Maréchal, Multi-objectives, multiperiod optimization of district energy systems: I. Selection of typical operating periods, Computers & Chemical Engineering 65 (2014) 54–66. [8] J. Ortiga, J.C. Bruno, A. Coronas, Selection of typical days for the characterisation of energy demand in cogeneration and trigeneration optimisation models for buildings, Energy Conversion and Management 52 (2011) 1934–1942. [9] S. Fazlollahi, L. Girardin, F. Maréchal, Clustering Urban Areas for Optimizing the Design and the Operation of District Energy Systems, in: 24th European Symposium on Computer Aided Process Engineering, Elsevier, 2014, pp. 1291–1296. [10] X. Gao, A. Malkawi, A new methodology for building energy performance benchmarking: An approach based on intelligent clustering algorithm, Energy and Buildings 84 (2014) 607–616. [11] NetworkX developer team, Overview — NetworkX, available at https://networkx.github.io/ (accessed on January 27, 2016). [12] M. Hellwig, Entwicklung und Anwendung parametrisierter Standard-Lastprofile, München, 2003. [13] KommEnergie, Standardlastprofile (SLP), available at http://www.kommenergie.de/unsernetz/standardlastprofil/standardlastprofile-slp.html (accessed on June 11, 2014). [14] The Data Science Lab, Clustering With K-Means in Python, available at https://datasciencelab.wordpress.com/2013/12/12/clustering-with-k-means-in-python/ (accessed on January 27, 2016). [15] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, E. Duchesnay, Scikit-learn: Machine Learning in Python, Journal of Machine Learning Research 12 (2011) 2825–2830.
10