The feasibility of energy autonomy for municipalities: local energy system optimisation and upscaling with cluster and regression analyses

The sheer number of alternative technologies and measures make the optimal planning of energy system transformations highly complex, requiring decision support from mathematical optimisation models. Due to the high computational expenses of these models, only individual case studies are usually examined. In this article, the approach from the author’s PhD thesis to transfer the optimisation results from individual case studies to many other energy systems is summarised. In the first step, a typology of the energy systems to be investigated was created. Based on this typology, representative energy systems were selected and analysed in an energy system optimisation model. In the third step, the results of the representative case studies were transferred to all other energy systems. This approach was applied to a case study for determining the minimum costs of energy system transformation for all 11,131 German municipalities from 2015 to 2035 in the completely energy autonomous case. While a technical potential to achieve energy autonomy is present in 56% of the German municipalities, energy autonomy shows only low economic potential under current energy-political conditions. However, energy system costs in the autonomous case can be greatly reduced by the installation and operation of base-load technologies like deep-geothermal plants combined with district heating networks. The developed approach can be applied to any type of energy system and should help decision makers, policy makers and researchers to estimate optimal results for a variety of energy systems using practical computational expenses.


Introduction
In the context of the energy system transformation to limit global warming by reducing greenhouse gas emissions, more and more projects (van der Schoor et al. 2016) and studies (Weinand 2020b) are conducted at the local level of neighbourhoods and municipalities. Thereby, several objectives are pursued with regard to the local energy system, such as cost-efficiency, equity (Patrizio et al. 2020) or becoming more independent of central markets and Jann Michael Weinand jann.weinand@kit.edu 1 Chair of Energy Economics, Karlsruhe Institute for Technology, Karlsruhe, Germany 2 Chair of Energy Transition, University of Aberdeen, Aberdeen, UK structures through 100% renewable energy systems (Mathiesen et al. 2015) or complete energy autonomy (Weinand et al. 2020d). Completely energy autonomous systems are disconnected from the gas and electricity grid and supply themselves with energy from plants owned and operated by the local stakeholders 1 . In Germany, for example, there are already many municipalities that strive to become energy autonomous (Engelken et al. 2016), some of which aim for complete autonomy. Fig. 1 shows the strong increase in the number of these municipalities: in 2016, 12% of all municipalities in Germany were already aiming for energy autonomy, accounting for 15% of the German population (Weinand et al. 2019e;Weinand 2020a).
In this respect, local decision-makers want to achieve the best possible energy system in terms of their objectives (e.g. cost-efficiency or environmental sustainability) by developing climate protection or energy plans. However, these optimal energy plans for individual local systems cannot be determined without difficulty, as the design and operation of energy systems is highly complex. This is related to the fact that supply and demand must be spatially and temporally matched, with a wide range of alternative technologies and measures. The determination of the optimum in such cases is not possible analytically but requires the use of mathematical optimisation models (Kotzur et al. 2020). For this reason, research on energy system optimisation usually focuses only on individual case studies (Weinand et al. 2020d), while research on the transfer of optimisation results from these case studies is still lacking. If the latter would be possible, the results of individual case studies could be used to transfer the findings to a very large number of other energy systems, which would greatly reduce computational expenses for energy system analyses. A methodology for this purpose has been introduced in the author's PhD thesis "Energy system analysis of energy autonomous municipalities" (Weinand 2020a), which incorporates seven original research articles (Weinand et al. 2019a(Weinand et al. , b, c, d, e, 2020c, whose overarching methodological approach and results are summarised in this article. The methodology is exemplarily demonstrated by means of a case study of all 11,131 German municipalities. The objective of the case study is to determine the cost-minimal, completely energy autonomous systems of these municipalities. In the first step, a typology of the municipal energy systems is created (Weinand et al. 2019a, b). Based on this typology, representative municipalities are selected and analysed in an energy system optimisation model for the period between 2015 and 2035 (Weinand et al. 2020c). In the third step, the results for the representative municipalities are transferred to all other municipalities by means of a regression (Weinand et al. 2020c).
The present article first shows the overarching methodology of the thesis (Sect. 2). Subsequently, the results of the application of the methodology for the case study of all German municipalities are demonstrated (Sect. 3). Finally, Sect. 4 discusses the approach and results.

Methodology
The methodology of the thesis Weinand (2020a) to transfer optimisation results to a large number of energy systems can be divided into three steps (cf. Fig. 2). First, due to the large number of municipalities in Germany, a typology of these energy systems is required in order to investigate a large number of energy systems. Therefore, a typology for German municipalities (cf. left part of Fig. 2) is created on the basis of 38 socio-energetic indicators by means of a hierarchical agglomerative cluster analysis (Weinand et al. 2019a).
In the second step, energy systems that represent this typology have to be selected and optimised. The selection of these representative municipalities is performed on the basis of the above-mentioned indicators (Weinand et al. 2020c). For the energy system optimisations, the RE 3 ASON (Renewable Energies and Energy Efficiency Analysis and System Optimization) model is used. This model is suitable for optimising different municipalities, since it is completely based on public data and can be applied without manual input collection or input processing (Mainzer 2019). The model consists of two parts: the input determination in Java, e.g. potentials for renewables based on open data sources like OpenStreetMap (OpenStreetMap contributors 2020), and the optimisation implemented in the General Algebraic Modeling System (GAMS) (cf. Fig. 3). In the optimisation, the optimal technology investment as well as energy flows between districts can be identified. The optimisation can cope with the complexity resulting from the number and combinations of the individual measures and their dependencies. The spatial resolution of the model consists of municipal districts as nodes to which the input, like heat and power demand, is assigned. Furthermore, the optimisation model applies the macroeconomic perspective of    (Weinand et al. 2020c)) as well as the industrial and commercial sectors (Weinand et al. 2020c). In Weinand (2020c), the model is used to perform a long-term energy system optimisation from 2015 to 2035, whereby each 5th year (i.e. 2015, 2020, 2025 and 2030) is modelled explicitly and divided into 108 time slices (4 seasons, 3 day types, 9 time slices within each day). This means that investment decisions could be made every fifth year, as a trade-off between model accuracy and model complexity. The RE 3 ASON model is employed for minimising the total discounted system costs. In the case study on complete municipal energy autonomy, the electricity demand of all consumption sectors as well as the heat demand of the residential sector has to be covered by local generation in every time step and imports are not allowed. The heat demand of the industrial sector is neglected due to poor data availability. For the transport sector, only private vehicles are considered, and it is assumed that all private vehicles will be replaced by electric cars.
In the third step, the optimisation results of the representative municipalities are transferred to all other 11,131 municipalities by means of a regression analysis (cf. right part of Fig. 2). This transfer becomes more accurate, the more energy system optimisation results are included in the regression analysis. The indicators used to create the typology in step one are selected as independent variables. The dependent variable is the levelized cost of energy (LCOE). For identifying an appropriate regression model, the regression learner from MATLAB is used. Thereby, a k-fold cross validation is applied, due to the small number of representative energy system results (cf. Weinand et al. 2020c).

Results
The resulting ten municipal clusters (cf. left part of Fig. 2) differ significantly with regard to the employed indicators, such as population density, building age classes or technical renewable energy potentials. Table 1 summarises these distinguishing characteristics for all clusters. For example, Cluster 2 contains all major German cities and most of the other cities in Germany and has a low potential for renewable energies. Clusters 3, 4, 7 and 8, on the other hand, show a high potential for renewable energies and Cluster 9 comprises all German municipalities without inhabitants. The indicators and resulting clusters are published open access in Weinand et al. (2019b) and this dataset can support in answering a wide range of energy related research challenges.
The energy system optimisations in Weinand et al. (2019e) and Weinand et al. (2020c) using the RE 3 ASON model show that the optimal energy systems in the complete energy autonomy case change significantly compared to the reference case without autonomy. In the autonomy case, storage technologies as well as base-load capable renewable energy plants are increasingly used. Thereby, the latter can significantly reduce the otherwise necessary high storage requirements. Especially the new technologies implemented in the PhD thesis, deep geothermal plants and district heating, can significantly reduce the costs to achieve complete energy autonomy in some municipalities (Weinand et al. 2019e). On the other hand, deep geothermal systems are not used in the reference case without autonomy due to the high installation costs.
In Weinand et al. (2020c), 15 representative German municipalities are investigated using the extended RE 3 ASON model. These 15 municipalities are selected from 6314 (56%) identified municipalities in which complete energy autonomy could be technically feasible. The optimisations show that complete energy autonomy is associated with a high increase in total discounted system costs. The results of the optimisations are finally transferred to the 6314 municipalities by using a stepwise linear regression model with a Mean Absolute Percentage Error of 12.5% (Weinand et al. 2020c).
The regression demonstrates that the additional LCOEs (LCOEs) in the autonomy case amount to about 0.41 C/kWh on average compared to the reference minimal cost case (with LCOEs of about 0.16 C/kWh on average). The right part of Fig. 2 shows the distribution of these additional LCOEs across all German municipalities. The highest mean LCOEs are reached in Cluster 2 (0.58 C/kWh). This seems plausible, as this cluster mainly contains cities with low renewable energy potential. On the other hand, the lowest mean LCOEs are achieved in Clusters 3 (0.35 C/kWh), 4 (0.35 C/kWh) and 8 (0.38 C/kWh), which contain mainly rural municipalities with particularly high potentials for renewable energies and particularly deep geothermal energy. The greatest impact on the LCOE show base load capable bioenergy and deep geothermal energy (Weinand et al. 2020c). In comparison to 84 other case studies on energy autonomy in different countries (Weinand et al. 2020d), the average LCOEs in the autonomy case calculated in the PhD thesis are rather above average. This may be due to different price structures in the various countries. On the other hand, not only particularly suitable case studies but instead all German municipalities are examined in the PhD thesis.

Discussion
While the main focus of this article is to summarise the methodology of Weinand (2020a), some suggestions for improvement for future studies can be identified regarding the case study of German municipalities. First, municipal borders do not necessarily represent optimal energy system boundaries. Tröndle et al. (2020) show, for example, that a coordinated development of an energy system on a continental scale (Europe) is associated with up to 20% lower costs than in the case of exclusively regional systems. On the other hand, in the case of continental-scale energy supply, a higher expansion of cross-border transmission infrastructure is necessary (Tröndle et al. 2020), which is often not well accepted by the local public due to landscape modification (Bertsch et al. 2016).
In addition, some important future technologies are not considered, such as long-term storages. For example, many nations plan to have a large share of hydrogen in their future energy systems: in Germany, for example, hydrogen demand is expected to reach 90 to 110 TWh by 2030 (BMWi 2020). Especially in the case of energy autonomous municipalities, long-term storages could lead to further cost reductions compared to the reference case without autonomy. Another important avenue for future studies should be the use of higher temporal resolution or improved time series aggregation in the optimisations of energy autonomous systems. There is already an established stream of research focussing on identifying the optimum time series resolution/aggregation for specific research questions, which includes all necessary information for designing the energy system without increasing complexity (e.g. energy systems with significant renewable generation fractions Kotzur et al. 2018).
Furthermore, the representative municipalities are a good choice if there is a need to perform as few optimisations as possible, due to computational restrictions. Nevertheless, the results of the regression become more accurate, the more optimisation results are included in the determination of the regression model. Therefore, the regression demonstrated in Weinand (2020a) does not result in the real optimal LCOEs and instead determines approximate values. However, also individual optimisations with energy system models are subject to uncertainties and only give good estimates of costs or emissions. The LCOEs determined in Weinand (2020a) should therefore not be considered as absolute values, but rather for comparison in relative terms between different municipalities.
Thus, the methodology from the dissertation project Weinand (2020a) is well suited for estimating which municipalities are particularly suitable for energy autonomy and how their energy systems might be designed. The methodology can also be applied to any other problem in which optimisation results from computationally expensive problems should be transferred to an entire population of these problems. One example is the recent study by Weinand et al. (2021), in which the methodology is applied to determine the cost-optimal energy systems of all German municipalities in relation to public acceptance for onshore wind. Therefore, the approach developed in Weinand (2020a) should help decision makers, policy makers and researchers to estimate optimal results for a variety of energy systems using practical computational expenses.
In addition to these approaches, which are important for the scientific community and further scientific work, the thesis Weinand (2020a) shows one thing above all: from an economic point of view, energy autonomy is not (yet) economically attractive in Germany under current energypolitical and market framework conditions. Nevertheless, there are efforts of municipalities to achieve this state of energy autonomy. The results of the thesis can be used to identify the municipalities in which achieving energy autonomy could be associated with particularly low costs. In addition, the findings regarding the optimal system composition can be used in their energy system planning. Building on this, autonomy efforts could be promoted by decisionmakers precisely where this would be of most benefit to the power grid or generally beneficial to the overall energy system.