Using flexible energy system interactions amongst industry, district heating, and the power sector to increase renewable energy penetration

Sweden’s goal of 100% renewable electricity generation by 2040 requires investments in intermittent electricity production (e.g. wind power). However, increasing the share of intermittent electricity production presents challenges, including reduced flexibility of electricity production. A strategy for overcoming this issue is developing flexibility in electricity consumption. This study analyses the potential for using flexible industrial processes, heat pumps (HP), and combined heat and power (CHP) plants in Swedish district heating systems to increase the share of wind power capacity without compromising grid stability. The simulation tool EnergyPLAN was used to assess the potential contribution of these strategies. The analysis includes a range of annual wind power production between 45 and 60 TWh. The required electricity imports and critical excess electricity (that can neither be used nor exported due to transmission line limitations) were used to evaluate the system’s stability. Managing the operation of CHP plants, HPs, and industrial processes in a flexible way is challenging, but these strategies may still play a decisive role in increasing the share of renewable electricity production and reducing demand peaks in cities. Whilst HP regulation is better at reducing excess electricity production at lower wind power capacities (from 32 to 15% for the analysed interval of wind power production), CHP regulation becomes more relevant when wind power capacity increases (from 14 to 39%). Like HP regulation, flexibility in electricity demand in industrial processes had a greater percentage contribution at lower wind power capacities. Combining HP, CHP regulation, and flexible electricity demands in industry can reduce excess electricity production by 68–80% and electricity imports by 14–26%. Wind power contributing to grid stabilisation reduces excess electricity production but does not reduce electricity imports.


Introduction
There is significant interest in increasing the share of renewable electricity in Europe's electricity systems. In "Energy Roadmap 2050", the European Commission presents a future scenario consisting of 97% renewable energy (European Commission 2011). Sweden set an even more ambitious goal for its electricity generation, which is that it should be 100% renewable by the year 2040 (Swedish Government 2016). Moreover, in March 2017, the Swedish government proposed a climate policy framework according to which Sweden is to achieve net-zero greenhouse gas emissions by 2045 (Ministry of the Environment and Energy 2018). Some of the measures for achieving this goal are, e.g. an increased share of renewable heat and electricity generation and increased energy efficiency on the demand side. However, increasing the share of intermittent electricity (wind and solar power) production will result in several challenges, such as limited controllability, uncertainties regarding wind forecasts and cloud movements, and the fact that wind and solar power do not contribute to electric grid stabilisation (Söder et al., 2014).
This study focuses on challenges related to two specific situations, namely the surplus situation (when the electricity production of intermittent electricity sources is high whilst the electricity demand is low) and the deficit situation (when the electricity production of intermittent electricity sources is low whilst the electricity demand is high). These challenges can be overcome by (1) building a reserve power capacity (power plants) in the system, (2) improving the grid capacity and cross-border interconnections, and (3) developing flexibility in electricity consumption. All these strategies require investments. To find a way to increase renewable energy use (including intermittent electricity production), Lund et al., (2012) pointed to the integration between different sectors as a key approach and introduced the concept of "smart energy systems". A smart energy system is one in which all sectors are integrated, enabling a transition towards a 100% renewable energy system . This integration would allow storage across sectors, utilise flexible electricity demands, and increase utilisation of industrial excess heat (IEH), which otherwise would be lost.

Aim description
This study aims to investigate how the district heating (DH), electricity, and industrial sectors in Sweden can comprise a flexible platform that would allow an increased share of intermittent renewable electricity production. The study aims to answer the following specific research questions (RQ): (1) How can regulation strategies in the electricity, DH, and industrial sectors serve as flexibility services to help balance the electricity system? (2) What are the potentials of the various flexibility strategies to increase the share of intermittent renewable electricity production?
The focus of the study is on using local regulation strategies to increase flexibility in the Swedish energy system, although short-term stabilisation of the grid is also addressed by combining the proposed strategies with a sensitivity analysis that varies the share of wind power that can contribute to grid stabilisation.

Background
Most of the challenges involved in increasing the share of intermittent power will not be energy related, but rather power related (i.e. matching electricity demand and production at a particular moment). The problems will be different in two operational situations: (1) high intermittent electricity production during low-demand periods and (2) low intermittent electricity production during high-demand periods (Söder et al., 2014).
Traditional electricity systems, with their large share of centrally controlled condensing and hydropower plants, are characterised by flexibility on the supply (production) side. This flexibility will be significantly reduced with an increased share of intermittent electricity generation. Building new cross-border interconnections between countries and increasing capacities in the existing networks can partly solve this problem. Besides the deficit or surplus in supply, the matter of grid stability must be solved as well (Connolly and Mathiesen 2014a;Söder et al., 2014). Grid stability can be classified as (1) the capability of maintaining the steady state of all bus voltage under different operating conditions (voltage stability), (2) the capability of keeping the balance between the power generation and demand (frequency stability), and (3) the capability of dampening power oscillations (Kundur et al., 1994;Domínguez-García et al., 2012). In a traditional power sector, transmission system operators (TSO) deal with power balancing and frequency control mainly by using conventional thermal and hydropower plants and grid interconnections. Distribution system operators handle reverse power flows (occurs when the power generation exceeds the load demand) and network management (new congestion issues and voltage issues) (Villar et al., 2018).
Wind power plants could be designed and operated in a way that contributes to grid stability (Domínguez-García et al., 2012;Sorknaes et al., 2013). However, both Söder et al., (2014) and Sorknaes et al., (2013) pointed out that these strategies would be challenging in terms of market organisation. Furthermore, increased wind power capacity in the electricity system may also increase balancing costs (Holttinen et al., 2009;Albadi and El-Saadany 2010;Tarroja et al., 2012).
To avoid dependency on cross-border interconnections, flexibility must be improved on the demand side of the system without compromising the grid stabilisation requirements. Demand-side flexibility (DSF) is recognised as one of the key strategies for overcoming the challenges related to the integration of intermittent power sources (European Commission 2019). It has been shown that the most effective and the most profitable DSF measures are those that are based on integrating the power, heating, and cooling sectors (e.g. power-to-heat and power-to-cooling), the transportation sector (e.g. power-to-transport), and the power and gas infrastructure (e.g. power-to-gas) .
Operation strategies for flexible power-to-heat and CHP production Bloess et al., (2018) provided a general categorisation of residential power-to-heat (P2H) solutions by distinguishing between centralised and decentralised P2H options, i.e. centrally controlled large-scale heat pumps (HP) or electric boilers connected to a DH network, or direct electric heating, small-scale HP, and small-scale electric boilers. Their literature review of model-based studies which analysed the potential of residential P2H options for renewable energy integration revealed that most studies had a focus on countries located in northern and western Europe, which have well-developed district heating systems (DHS) and ambitious policies on long-term decarbonisation targets. More than half the studies were case studies of Denmark and Germany, two countries where policies on the decarbonisation targets are focusing on intermittent renewable energy sources (Bloess et al., 2018). The main findings of the literature review were that P2H solutions can contribute to the decarbonisation of the heating and power sectors, and to the cost-efficient integration of intermittent renewable electricity into the existing power sector. These potentials rely on (1) cost savings related to fuel consumption, (2) a higher capacity utilisation of the intermittent renewable power plants, and (3) lower investments in peak-load capacities and power storage (Bloess et al., 2018).
Depending on the operational strategies of P2H solutions, the provided flexibility can be used for different purposes. The centralised P2H production can (1) increase the energy efficiency of the DHS by extending the operating time of combined heat and power (CHP) units (Lepiksaar et al., 2021) or by (2) improving CHP flexibility to enable electricity-pricebased operation of CHP plants (Mollenhauer et al., 2018). Both centralised and decentralised P2H solutions can be used for power balancing services in the power sector (Åberg et al., 2019;Yu et al., 2019;.

Power-to-heat solutions providing benefits for DH systems
Coupling CHP units with P2H facilities and thermal energy storage (TES) has the potential to reduce the unused heat rejection from CHP production and to extend the operating time of CHP units. This would improve the energy efficiency of a local DHS by increasing the share of heat supplied by CHP units and therefore would reduce the total fuel consumption in the system (Lepiksaar et al., 2021).
Another operational strategy is when P2H production and TES are integrated with CHP production to improve CHP flexibility so that electricity can be produced when the electricity market conditions are favourable (Mollenhauer et al., 2018). In this operation strategy, the focus is primarily on increasing the revenues from electricity sales. Considering German market conditions, Mollenhauer et al., (2018) identified the potential of HP and TES to make the electricity production from CHP plants more responsive to the electricity price signal, i.e. to shift the electricity generation from hours with low electricity prices to hours with high prices. The total capacity of TES facilities in Germany is considerable, so there is a theoretical potential to use this solution for increasing intermittent electricity production. However, to unlock this potential, future investments in HPs should be encouraged by, e.g. changing taxes and surcharges for electricity use (Mollenhauer et al., 2018).
Power-to-heat solutions providing balancing services for the power sector P2H solutions can provide both negative powerbalancing services (by increasing P2H production to "shave" intermittent electricity production peaks) and positive balancing services (by reducing P2H production). Furthermore, P2H solutions can be integrated as components (i.e. controllable loads) within so-called virtual power plants (VPP). A VPP usually consists of many small, decentralised facilities (e.g. CHP plants, HP, TES) whose operation strategy is to supply flexibility (Sowa et al., 2014).
Active TES that allows for controlled charging and discharging, particularly inter-seasonal TES, is crucial for increasing the potential of VPP and P2H solutions to provide power balancing services (Bloess et al., 2018;Åberg et al., 2019). Aside from active TES, both centralised and decentralised P2H options involve the extent of time of storage as well. The extent of storage for centralised P2H options is usually related to the thermal inertia (i.e. thermal storage capacity) of the DH network, whilst decentralised P2H solutions may utilise the thermal inertia of the building mass, so-called passive thermal storage (Bloess et al., 2018;Yu et al., 2019). However, the potential is lower compared to the potential of active TES facilities.
The potential for using P2H production for power balancing services is limited by fluctuations in the heat demand  and by the installed capacity of the P2H facilities (Mollenhauer et al., 2018;Åberg et al., 2019). When CHP production is included in the VPP, the balancing power supply is constrained by the operating limits of the CHP facility as well (Yu et al., 2019). Moreover, even though active TES is crucial for increasing the potential of VPP and P2H solutions to provide power balancing services (Åberg et al., 2019), the balancing power supply depends on the CHP production capacity rather than the access to TES . If the capacity of the TES is too large, the utilisation of TES may also limit the ability of the CHP units  for power balancing at a later stage. The optimal size of the TES depends on the characteristics of the intermittent electricity generation  in the power sector and on the characteristics of the heat demand.
Another limitation is related to the electricity price model. For instance, despite the considerable capacity of active TES facilities in Germany, the potential for using P2H solutions to provide power balancing services is limited since electricity market conditions are insufficient to encourage large-scale investments in HP (Mollenhauer et al., 2018). Furthermore, to engage the electricity users (e.g. DH companies) to improve the matching between power supply and demand, the correlation between intermittent electricity production and electricity price level must be strong. However, this is not always the case. Åberg et al., (2019) analysed the impact of intermittent electricity production on electricity prices in Sweden and whether Swedish electricity prices act as an incentive to control centralised P2H production to shave intermittent production peaks. The results showed that despite the theoretical potential, the current pricing mechanism on the Nord Pool electricity market is insufficient. The current overall correlation between intermittent electricity production and electricity price levels is weak in Sweden. Even if the electricity price would be more influenced by intermittent electricity production, an increase in P2H production in DHS would not necessarily coincide with the peaks of intermittent electricity production (Åberg et al., 2019).  identified a potential for using DHS for power balancing services (both positive and negative) in the Swedish electricity price area SE3 when assuming a future scenario with a high share of intermittent electricity production. However, at the same time, they identified a trade-off between power-balancing production in CHP units and demand for biomass. Whilst using P2H production in combination with TES to reduce heat rejection from a CHP unit reduces fuel consumption in the DHS (Lepiksaar et al., 2021), integrating P2H, TES, and CHP for power balancing may have the opposite effect due to an increased CHP generation . Compared to a business-as-usual scenario, where the goal of DHS production is primarily to meet a heat demand, integrating P2H facilities, TES, and CHP units for power balancing purposes implies an increased fuel consumption. How much the fuel consumption in the DHS system would increase depends on the mix of the intermittent power production technologies in the system. For instance, having a larger share of wind rather than solar power results in a greater increase in fuel consumption . The reason for this is that an increased solar power share increases the demand for negative power balancing by heat production (by HP and electric boiler) during the daytime. This heat would be stored in TES facilities for later use, which limits the production in CHP units for power balancing purposes at a later stage. This results in lower fuel consumption compared to the scenario where the share of wind power is larger than the share of solar power ). This conclusion is in line with a conclusion presented by .
Industrial demand-side flexibility providing balancing services for the power sector Due to its high electricity demand, of 38% of total electricity demand in Sweden and 27% in EU-27 (Swedish Energy Agency 2021a; Eurostat 2022), the industrial sector can offer great potential for DSF to facilitate the integration of intermittent electricity sources into the power sector. Production in industries usually consists of processes with different response times and flexibilities (Golmohamadi 2022). Industrial processes can be classified into interruptible (processes which can be interrupted on advance notice without causing damage to equipment or interrupting the production flow) and uninterruptable (processes which should not be interrupted, either because of technical constraints or production management and scheduling constraints) (Golmohamadi 2022;Asadi and Golmohamadi 2022). Depending on the possible time response, the interruptible processes can be further classified as processes which require short, medium, or long advance notices (Golmohamadi 2022). To meet power system requirements for flexibility, the flexibility potentials of different demands across sectors should be aggregated before being integrated into the power system (Golmohamadi 2022;Asadi and Golmohamadi 2022). Asadi and Golmohamadi (2022) and Golmohamadi (2022) surveyed the whole demand flexibility potential, including the residential, commercial, agricultural, and industrial sectors (focusing on oil refineries, metal, and cement industries). Several benefits for the power sector related to the flexibility potential of industrial processes were identified, e.g. providing peak-load shaving, supplying flexibility to the power grid, reducing the strain on the power grid, and improving grid operation overall (by increasing reliability and resilience) (Asadi and Golmohamadi 2022). Heffron et al., (2020) also pointed out that industrial DSF may be beneficial for the industrial company as well. They highlighted that the industrial DSF may play a crucial role in sustainable industrial development, i.e. for low-carbon production, since whilst providing up-and down-regulation for the power market, the company is also reducing the GHG emissions caused during production by using more electricity from renewable energy sources (Heffron et al., 2020). Furthermore, providing balancing services for the power sector is also a potential new revenue stream for industrial companies.
However, finding the flexibility potential of an industrial company is a challenging task. The flexibility potential is not only different across industrial sectors but also differ from one company to another within the same sector (Heffron et al., 2020). Bruns et al., (2021) developed a multi-step framework for assessing the DSF potential for large-scale chemical processes, whilst Heffron et al., (2020) developed a fourstep monitoring approach that allows to continuously measure the progress made on the flexibility transition pathway. The four steps proposed are (1) definition of policy goals, (2) measurement of the actual state and progress, (3) stakeholders dialogue, and (4) implementation of countermeasures. Golmohamadi (2022) analysed the compatibility of the flexibility of different industrial processes with the flexibility requirements of the power sector to identify processes appropriate for real-time frequency control, as well as the processes which have the potential to provide peak-shaving and valley-filling roles.
Energy-intensive industrial sectors are the most promising when it comes to exploiting demand flexibility (Golmohamadi 2022). Turning up and down the power demand during smelting processes in metal smelting plants and switching off on short advance notice or scheduling on long advance operation of crushers in a cement manufacturing plant are two possible ways to provide power flexibility (Asadi and Golmohamadi 2022). Investing in material storage for the processes which follow the crushers would increase the flexibility potential without causing production delays (Asadi and Golmohamadi 2022). The processes with the highest flexibility potential are usually the supporting processes like cooling or heating (Heffron et al., 2020). Some concrete examples are refrigeration and cooling in the food industry, as well as electric furnaces in glass manufacturing (Siddiquee et al., 2021). However, even though many industrial processes can provide flexibility to support the transition of the power sector, there are many challenges which should be addressed to reach the whole potential of these flexibilities.
First, industrial companies need to change their production pattern to provide flexibility whilst at the same time not reducing product quality, not causing delays, or not negatively affecting the production process in some other way, e.g. by increasing waste (Heffron et al., 2020). Another coordinating issue that can make the control schemes even more complex is the requirement to aggregate processes with different response times and flexibility (Asadi and Golmohamadi 2022). This is followed by technological challenges as well, e.g. requirements for sophisticated information and communication technologies (Körner et al., 2019). Lack of regulations, lack of appropriate market mechanisms, and lack of incentives (e.g. financial) are barriers which should be addressed by policymakers (Siddiquee et al., 2021;Asadi and Golmohamadi 2022). Policymakers are responsible to develop appropriate energy, industrial, environmental, and social policy measures that would benefit all stakeholders (Heffron et al., 2020;Siddiquee et al., 2021). To overcome these challenges, expert knowledge in each sector is crucial in identifying flexibility potentials, defining policy measures, encouraging dialogue between stakeholders, and training employees to manage and coordinate the process (Heffron et al., 2020;Asadi and Golmohamadi 2022).

Methods
This section presents the methods, approaches and tools, used in the study. Applying a system approach when dealing with the challenges that will be caused by an increased share of intermittent electricity capacity is strongly recommended. This approach offers the possibility to develop strategies based on cross-sectoral interactions, e.g. using energy storage across sectors and flexible energy demand in other sectors (Mathiesen et al., 2015).
The issues related to an increased share of intermittent electricity capacity are contemporary complex phenomena, and what strategies for dealing with these issues are the most relevant depends on the local conditions. For this reason, dealing with these issues requires a case study approach. Figure 1 presents a diagram of the method and procedure for obtaining a baseline scenario used in modelling the relevant sectors, validating the model, and implementing the subsequent scenario and analysis presented in this study. All analyses were performed using the EnergyPLAN tool, as detailed in the "National energy system modelling" section. The data for the study were collected from multiple sources (see the "Data collection" section).
In this study, a single case study was performed, within which several scenarios were analysed. The baseline scenario in EnergyPLAN (step 1 in Fig. 1) used data for the contemporary Swedish energy system (for the year 2019) and had a descriptive purpose. The main purpose of this scenario was to validate the model by comparing the output data from the model with existing statistics (step 2 in Fig. 1). After validation, this baseline model for 2019 was adapted to model expected changes in the Swedish energy system in the future, particularly concerning increased intermittent renewable generation. The new model, incorporating the necessary changes, was used as the reference model (the reference scenario) for further analysis, shown as the remaining steps in Fig. 1. This included the analysis of how different regulation strategies and the introduction of electricity demand flexibility options would affect the share of wind power production, the excess electricity production, and the need for electricity imports. During the analysis, several scenarios with exploratory purposes were developed, which are explained in the "Scenarios for the development of the energy system" section.
Vol.: (0123456789) These scenarios investigated how the share of intermittent electricity production can be increased and the effects those increases would have on the overall system, highlighting the challenges related to excess electricity production, the balancing of heat and electricity demands, and the opportunities for energy storage.

National energy system modelling
EnergyPLAN is a widely used technical and economic simulation tool that has been in development since 1999 (Østergaard 2015;Lund et al., 2021). Computer tools for energy system modelling are usually developed for a specific type of application (e.g. to deal with a specific sector or for analysing specific research questions) (Lund 2014), and EnergyPLAN is no exception. The tool was first developed for the analysis of future large-scale (e.g. national) energy systems that are characterised by large shares of intermittent energy sources, e.g. wind and solar power (Lund and Thellufsen 2022).
EnergyPLAN allows users to capture the complexity of an energy system that includes electricity, transport, industrial, and heating and cooling sectors, and it also allows users to study strategies enabling an increased share of intermittent electricity production, with a focus on the possibility of converting renewable electricity into other energy carriers (e.g. heat and hydrogen). An EnergyPLAN model includes different types of energy sources, conversion, and storage technologies, as well as demands and interactions within the model. The starting point for the modelling process is introducing the data by defining the amount of each available energy source, the capacities of the available energy conversion and storage technologies, and the electricity, heating, cooling, and fuel demand across sectors (Lund and Thellufsen 2022).  The main purpose of EnergyPLAN is to assist in the design of national energy planning strategies. The tool has been used for this purpose in several studies, for example to design energy planning strategies for China (Liu et al., 2011), Denmark (Connolly and Mathiesen 2014b), Sweden (Fischer et al., 2020), and Ireland (Connolly et al., 2011). In general, the tool can be applied to any region as long as all data necessary for modelling are available, including the electricity import and export. The model requires that the user provide yearly supplies and demands (for electricity, heating, cooling, etc.) together with their distributions on an hourly basis for one entire year (see the "Data collection" section). The resolution of 1 h in the simulation is a limitation of the tool, so that more complex analysis of short-term grid stabilisation is not possible (see the "Balancing and storage" section). Another limitation is that the annual heat demand for the three DH groups modelled and the heat load profile can only be specified as a total for the system being modelled, which is further detailed in the "The heating and cooling sectors" section. This can become an issue for countries with very different heat demand patterns in different regions.

Data collection
Data for the industrial, transport, DH, cooling, and electricity sectors were collected from official national statistics and reports by various other actors in the energy sector, which are detailed in this section. Modelling of the Swedish energy system started with a baseline scenario for validation of the model. The baseline scenario was modelled for the reference year 2019, which is the last year for which these data are completely available (and before the COVID-19 pandemic, which was an atypical period in terms of energy use). Most of the inputs required for the model were available in the national energy balance for 2019 compiled by the Swedish Energy Agency (Swedish Energy Agency 2021) and other statistics published by the same agency (Swedish Energy Agency 2022). Where appropriate, other national statistics published by national bodies were used, for example the Swedish TSO Svenska Kraftnät (Kraftnät 2020), the electricity market Nord Pool (Nord Pool 2022), and the interest organisation in the energy sector Swedenergy (Swedenergy 2020). Most of the inputs to Energy-PLAN are given as a total demand for 1 year, combined with a normalised distribution (with values Fig. 2 Representation of the EnergyPLAN model. Adapted from Lund and Thellufsen (2019) between 0 and 1) for each hour of a year (8784 h). In this way, the total annual energy demands of different types may be changed without affecting the dynamic behaviour of the demands and supplies throughout the year.

The electricity sector
Electricity production in Sweden in 2019 was 165.5 TWh, with a net electricity export of 26.2 TWh, which means that the national demand was 139.3 TWh, including losses (Swedish Energy Agency 2022). Hourly electricity generation distributions, both total and by type of generation, were obtained from statistics published by Svenska Kraftnät and Nord Pool on their official web pages (Kräftnät 2020; Nord Pool 2022). Figure 3 shows the normalised distribution of electricity demand for January and August 2019, the months in which the highest (24,250 MW) and lowest (9142 MW) hourly demands occurred. The highest power export and import were in June (7395 MW) and January (1932 MW), respectively. Figure 4 shows the normalised electricity exchange (import/export) for these months.
The power-producing units were input into the model with their actual installed capacities (Swedish Energy Agency 2022), as shown in Table 1. These installed capacities were evaluated by comparing the resulting electricity productions for each type of plant with the annual productions reported by Nord Pool (2022). A maximum grid interconnection of 7400 MW was considered (Nord Pool 2022).

The heating and cooling sectors
Heat demand was modelled separately for DH and for buildings with individual heat production. Data for the individual heating demand and production are shown in Table 2. A standard demand distribution   (2022), most of the total electricity used for space heating and preparation of tap hot water in the residential and services sector (20.9 TWh in 2019) was individual heating in oneand two-dwelling buildings (15.3 TWh). Based on the results presented by Jonasson and Gehlin (2018), it was assumed that 70% of this electricity (14.6 TWh) was used in heat pumps with a coefficient of performance (COP) of 3. For modelling purposes, the DH demand in Ener-gyPLAN was divided into three groups: 1. DH1: DH demand in DH systems with heat-only boilers (HOB); 2. DH2: DH demand in DH systems with heat-only boilers and back-pressure CHP plants, which cannot operate without a heat demand; 3. DH3: DH demand in DH systems with heat-only boilers and CHP plants which can operate in condensing mode, i.e. produce only electricity.
EnergyPLAN was developed specifically based on the Danish energy system, and this division into DH groups is based on the Danish triple electricity tariff system, which serves as an economic incentive for DH producers to increase condensing power production in their CHP plants during periods when peak electricity demands occur, which is not the case in Sweden. Therefore, modelling the typical Swedish DH systems required making adaptations to the data and assumptions.
In this study, two typical Swedish DH systems were considered (Werner 2017). The first typical DHS in Sweden is one in which a biomass-fuelled CHP serves as the base-load production plant, whilst biomass-and oil-fuelled boilers serve as middlemerit and peak-load plants, respectively. The second typical DHS is one in which the base-load production is a waste incineration CHP plant. These systems were considered representative DH systems because 25% of Sweden's DH is produced in such CHP plants (Statistics Sweden 2018).
According to the statistics published by Swedenergy (2020), the DH delivered in 2019 was 47.9 TWh (24.7 TWh produced in CHP plants with electricity production of 8.2 TWh). It was assumed that the total DH network losses were 12.5%. The required DH production in HO systems was 26.3 TWh. This was included as the DH1 group in the model. The required DH production in CHP-based systems was 28.1 TWh. This was included in the model as DH2 group. These heat loads add up to 54.4 TWh, which, considering the network losses, is consistent with the DH delivered in 2019 (Swedenergy 2020). This assumed division between the DH demands was based on a previous study using EnergyPLAN to analyse the Swedish energy system (Maya-Drysdale and Hansen 2014) and estimations based on statistics for 2019 (Swedenergy 2020). Since the statistics do not show any electricity production in CHP plants in condensing operation, the DH3 group was not used in the model. The normalised distribution of the DH demand was based on the DH production in Linköping in 2015, a typical medium-size DHS in Sweden (Fig. 5).
The boiler capacity in HOB-based systems (DH1) is determined by the model for covering the resulting heat demand. Boiler capacity in CHP-based (DH2) DH systems was set to a number high enough to cover heat demands on a national level and let the model balance the demand in the reference model. An efficiency of 0.9 was assumed for boilers.
In Sweden, there exists only a relatively small installed capacity of condensing power plants, 905 MW in 2019, corresponding to 2.2% of installed electricity generation capacity. The production from condensing units, however, was only equivalent to 0.6% of the annual production in 2019 (Swedish Energy Agency 2022). This is a pattern in the annual statistics, including the previous and following years, which indicates that condensing units have a minor role in the system. Additionally, the scenario for the future electricity system considered (see the "Scenarios for the development of the energy system" section) highlights that condensing power is not an alternative because of higher costs and lower cycle efficiency (IVA 2017). For modelling purposes, it was assumed that only a small capacity (200 MW el ) is available in CHP plants operating in condensing mode, in order to reach the reported annual generation from these units in the baseline scenario for 2019. A further assumption was a total installed capacity of 3100 MW el in CHP plants in back-pressure operation, with electrical and thermal efficiencies of 0.25 and 0.7, respectively (Maya-Drysdale and Hansen 2014). Finally, 6.2 TWh of electricity produced in CHP plants in industry is fed to the grid, and 4.9 TWh of industrial excess heat (IEH) is delivered to DH networks. An annual cooling demand of 1.1 TWh is included in the base scenario. It is assumed that 0.52 TWh of this demand is covered by DH-driven absorption cooling integrated with DH2 group and that 0.59 TWh is supplied by heat pumps and compression chillers (Fig. 6). The cooling demand profile used was a standard demand distribution available in EnergyPLAN.

The industry and transport sectors
The final input required by the model is the fuel demand of the industry and transport sectors (Table 3). It is important to include these demands in the baseline scenario to allow analyses of future scenarios that consider fossil fuel substitution so that the potential for the industry and transport sectors to contribute to flexibility in the electricity sector can also be analysed (e.g. by maximising wind power production by utilising P2H options, such as electrolysers for hydrogen production or biomass conversion plants). Due to the lack of detailed data, these fuel demands are modelled as constant energy demands over the entire year.

Balancing and storage
The EnergyPLAN model performs an hourly calculation to balance electricity demand and the production share of units used to supply the given demand for that hour. Short-term grid stability can be assured by setting a "minimum grid stabilisation share", which imposes a requirement that a certain percentage of the electricity supply comes from grid-stabilising units. The model includes the option of choosing in which way this minimum grid stabilisation share requirement should be achieved. The minimum grid stabilisation requirement was set to 30%  for the scenarios considered in this study. By setting the stabilisation share at 30%, the model is forced to guarantee that, for every hour, at least 30% of the electricity is produced in the grid stabilisation units. These, in traditional electricity systems, are usually condensing and hydropower plants. EnergyPLAN considers these units the grid-stabilizing units. When analysing a future energy system, other balancing strategies can be applied, such as smart charging of electric vehicles and vehicle-to-grid options, as well as allowing CHP plants and renewable energy plants to contribute to this grid stabilisation requirement.
When wind and solar power production is high, the short-term grid stabilisation requirement may result in excess electricity production for an hourly step in the simulation, because a certain share of the supply must be supplied by condensing or hydropower units. Similarly, if demand is high and not enough production capacity exists from grid-stabilising units, the deficit is solved with electricity imports. Electricity can be imported or exported up to the limits set for the transmission lines. The limit set for the transmission lines was 7400 MW (Nord Pool 2022). In this study, the increase of the electricity import compared to the baseline scenario (for 2019) and the excess electricity production, which is the electricity production that can neither be used nationally nor exported due to the current capacity of the cross-border transmission lines, was used to assess the possibility of increasing the intermittent electricity generation capacity in the system without compromising the grid stabilisation requirements.
Scenarios for the development of the energy system After model validation, the baseline model (for 2019) was adapted to model expected changes in the future Swedish energy system. This new model was based on the future scenarios proposed by the Crossroads report commissioned by the Royal Swedish Academy of Engineering Sciences (IVA 2017), and it was used as the reference model for further analysis.
The report presents four sustainable scenarios for the Swedish electricity system beyond 2030. These scenarios present how electricity production capacities can develop between 2030 and 2050. The estimated annual electricity demand for all scenarios is in the range of 140 to 180 TWh, whilst the aggregated peak load on the system is in the range of 26 to 30 GW. For this study, we chose to use the middle values from these ranges, i.e. an electricity demand of 160 TWh and a peak power demand of 28 GW. In the scenarios, it is assumed that the electricity sector will be fossil-fuel-free and that domestic resources will meet the annual need for electricity. IVA's Crossroads report (IVA 2017) also presents Sweden's potential for using various technologies for electricity generation (e.g. the potential for annual electricity production is estimated at over 100 TWh from wind power plants, over 50 TWh from solar power plants, and 60 TWh from bioenergy; the estimate for bioenergy is relevant for future development of CHP plants). Out of the four scenarios proposed by IVA, the scenario that considers the widespread adoption of wind and solar power was chosen as the reference for modelling future developments. A summary of the assumptions for modelling this reference scenario is shown in Table 4. In this scenario, a variable amount of installed wind power capacity was analysed separately from the base value shown in Table 4 as well. Additionally, it was assumed that no fossil fuels would be used, except for the transport sector.
This reference model for the future was used to analyse the potential of different regulation strategies to contribute to the increased share of intermittent renewable electricity production. Three regulation strategies were considered: (1) flexible operation of CHP units, (2) flexible operation of HPs, and (3) flexible electricity demands.
However, since the minimum electric grid stabilisation requirement was set to 30% (Section 3.2.4), electricity production that cannot contribute to grid stabilisation (including wind power) cannot rise above 70% of the total electricity demand without resulting in excess electricity production. To overcome this 70% limitation imposed the by grid stabilisation requirement, some of the wind power plants must be able to contribute to grid stabilisation. Therefore, a sensitivity analysis was performed with different shares (25%, 50%, and 75%) of installed wind power plants that can contribute to grid stabilisation.
Because electricity demand flexibility becomes an important factor in a scenario with high shares of intermittent renewable electricity production, the reference model included three types of electricity demand flexibility. These demand flexibilities are modelled as demands that are flexible within a day, within a week, or within 4 weeks. The total flexible demands are chosen to be 10% of the peak power demand and also correspond to 10% of the total annual electricity demand. This results in a flexible power demand of 2264 MW with an annual electricity demand of 15.6 TWh. The flexible electricity demands are integrated into the model as a maximum power capacity and an annual energy total. For the simulation, for each period type (1 day, 1 week, 4 weeks), a normalisation of the variation ensures that the average demand for the period equals the yearly average. In this way, e.g. when a flexible demand within 1 day is considered, the yearly average is used within 1 day, considering the maximum power for a given demand specified to the model. A demand flexible within a day can be, for example battery electric vehicles (BEV). The same applies to flexible demands within 1-and 4-week intervals, in which case such flexibilities can be obtained in heating and cooling systems with thermal storage or green hydrogen production.

Results
In this section, results for the baseline model for 2019 are presented and validated, and results for the future scenario are presented and analysed.
Model validation for 2019 Table 5 shows the resulting fuel demands for the baseline model for 2019 and compares these to Sweden's energy balance in 2019 (Swedish Energy Agency 2021b, 2022). The model calculated these resulting fuel demands based on the input data (e.g. electricity, heat, and transportation demands and the characteristics of the electricity and heat production plants, such as installed capacities and efficiencies; see Section 3.2). The calculated fuel consumptions are close to the actual values from the Swedish energy balance (see Table 5), which is a good indication that this  Figure 7 shows the results from the model for the electricity demand and supply for three consecutive days in January, which show the typical large demand variation during the winter. The total demand (the red line) excludes electricity exports and imports. Figure 8 shows the DH heat demand and production for the same 3 days in January as Fig. 7. Note that in Fig. 8, the summer period is shown with 3 days in July, as it is the period with the lowest heat demand. The model prioritises IEH for DH production, and because the heat demand in DH is modelled for the country as a whole, IEH becomes the base load. Nevertheless, the total annual heat production of these units is similar to the numbers reported for 2019 (Swedenergy, 2020;Swedish Energy Agency, 2022).
Increasing intermittent electricity production in the future energy system by using different regulation strategies In this study, excess electricity and electricity imports were used to assess the potential for increasing the intermittent electricity production capacity in the system without compromising the grid stabilisation requirements and supply security (as discussed in the "Balancing and storage" section). Figure 9 shows the excess electricity generated in three regulation alternatives aimed at increasing intermittent electricity production: a scenario with HP regulation, a scenario with CHP regulation, and a scenario including regulation of both HP  3 GW, the excess electricity production varied between 2.7 and 7 TWh. Applying CHP regulation to the model reduces the excess electricity by 26% at 55 TWh of wind power production. With increasing wind power capacity, the reduction in excess electricity by CHP regulation improves to a 29% reduction (when the annual wind power electricity production increases from 55 to 60 TWh). If HPs are used for regulation, the excess electricity is reduced by 21% (1 TWh) at 55-TWh wind power production compared to the reference future scenario. The ability of HP regulation to reduce excess electricity with varying amounts of wind power production is relatively constant in absolute terms (Fig. 9), which makes its contribution more relevant for lower wind power production. The combination of both regulation strategies (CHP + HP regulation; Fig. 9) is the most beneficial in reducing excess electricity, with a 43% reduction (compared to the reference scenario) at 55-TWh wind power production. Another way to reduce excess electricity and electricity import is to have flexible electricity demands. Figure 10 shows the contributions of flexible electricity demands that can be shifted within 1 day, 1 week, or 4 weeks. These demand flexibilities are, for each case, 10% of the power and energy demand. For 55 Reference future scenario showing the results of adding HP regulation, CHP regulation, and CHP + HP regulation, and the impact on excess electricity production for varying amounts of wind power production TWh of wind power production, flexible demand within 1 day reduces the excess electricity by 36% and electricity import by 5.5%. A combination of flexible demands within 1 day and 1 week reduces excess electricity by 50% and electricity imports by 11%. A combination of flexibility within 1 day, 1 week, and 4 weeks reduces excess electricity by 61% and electricity import by 17%. The individual contribution of each of these flexibility options is similar in absolute numbers when taken alone (for clarity, these individual contributions are not presented in Fig. 10). For example, if these flexibility options are taken individually for 55 TWh of wind power production, regulation with 1-day flexibility reduces 1.79 TWh of excess electricity and 1.16 TWh of electricity imports, whilst regulations with 1-and 4-week flexibilities each result in 1.85-TWh excess electricity reductions. However, the combination of these flexibility options achieves lower reductions than the sum of the individual options (3.1-TWh excess electricity and 3.6-TWh electricity imports at 55-TWh wind power production). Figure 11 shows the potential to reduce the excess electricity and electricity imports by combining the previously discussed regulation strategies (Figs. 9 and 10). CHP + HP regulation increasingly contributes to the reduction of excess electricity with increasing wind power production. In contrast, flexibility in electricity demand in industrial processes contributes more to reducing excess electricity for lower amounts of wind power production. The combined effect of CHP + HP regulation and flexible electricity demands of 10% of the peak power demand reduces excess electricity by 74% and electricity import by 21% for 55-TWh annual wind power production. When these regulation strategies are combined, the reductions in excess electricity and electricity import vary from 80 and 13% at 45-TWh wind power to 68 and 26% at 60-TWh wind power.

The effect of balancing contributions from wind power
The scenarios presented in the "Increasing intermittent electricity production in the future energy system by using different regulation strategies" section considered the conventional ways to stabilise the grid, i.e. using mostly hydropower and condensing power plants. A minimum requirement of 30% of power production from these power plants  Excess electricity (left) and electricity import (right) for a reference scenario without CHP + HP regulation and flexible electricity demands, but with varying amounts of wind power contributing to grid stabilisation (dashed lines), and excess electricity production with CHP + HP regulation and flexible electricity demands and the potential for varying amounts of wind power to contribute to grid stabilisation (solid lines) at any hour was set in the model. Setting this minimum results in more excess electricity during the hours with high wind power production. Therefore, to allow the share of intermittent electricity production to increase without compromising grid stability or depending on the potential to export or import the electricity, wind power plants must also be able to contribute to grid stabilisation. Figure 12 shows the effect that stabilisation with wind power plants (25%, 50%, and 75% of the total wind power capacity) can have on the results.
The dashed lines show the reference scenario in which CHP units, HPs, and flexible electricity demands do not contribute to the regulation of the system, and in which different shares of wind power can act as grid stabilisation units. The second group scenarios (the solid lines in Fig. 12) are scenarios where CHP units, HPs, and flexible electricity demands contribute to the regulation of the system, and in which the different shares of wind power can act as grid stabilisation units. In both scenarios mentioned above, 50% of the installed capacity of CHP units can contribute to grid stabilisation.
If the annual wind power production is lower than 55 TWh, regulation by CHP units, HPs, and flexible electricity demands (the red solid line in Fig. 10) results in lower excess electricity than scenarios without regulation where up to 50% wind power can contribute to stability (the red, yellow, and blue dashed lines). However, as annual wind electricity production increases, the shares of 50% and 75% of wind power contributing to grid stabilisation (the blue and green dashed lines) result in reductions of excess electricity that are higher than the reduction when CHP, HP, and flexible electricity demand regulations are applied (the red solid line). For example, 60 TWh of wind power annual production and 50% of wind power contributing to grid stabilisation (blue dashed line in Fig. 12) result in less excess electricity than with regulation of CHP, HPs, and flexible electricity demands (solid red line in Fig. 12).
For an annual wind electricity production of 60 TWh, the excess electricity is 56% lower when all regulation strategies are applied and when 75% of wind power can contribute to grid stabilisation (the green solid line in Fig. 12) than when all regulation strategies are applied and the wind power does not contribute to grid stabilisation (the red solid line).
Looking only at electricity import, the importance of wind power's contribution to grid stabilisation is smaller (comparing the dashed lines), whilst the contributions of flexible demands are greater (comparing the red dashed line to the red solid line).

Discussion
This research has revealed two major practical issues that must be solved if the goal of increasing the contribution of wind power generation is to be achieved. The first issue involves the interactions amongst DH production, HPs, and CHP plants. Using DH production units to serve as flexible electricity producers (CHP plants) and flexible electricity users (HPs) implies the production of electricity (and DH) in CHP plants during periods with low wind power production and DH production in HPs during periods with high wind power production. Other studies confirm such results (Mathiesen and Lund 2009;Lund et al., 2010;Mathiesen et al., 2012). However, this strategy is influenced by trade-offs related to conditions within each DHS (e.g. DH demand variation). Due to these trade-offs, changing the operating patterns of the CHP plants and HPs will not necessarily be profitable for DH producers, and will depend on which DH production plant is affected. In general, whether it is profitable or not to use the DHS as a flexible platform depends on the ratio between incomes from providing balancing services for the power sector and possible costs and reduced income related to changes in DH production. Managing the operation of the CHP plants and HPs to serve as flexible electricity producers/users profitably requires good insight into the dynamic changes in both the DHSs and the power sector. Trade-offs related to the operation of industrial processes to increase flexibility in the electricity system can present even greater challenges. The strategies would also concern organisational aspects (e.g. collaboration agreements), which means that the benefits of all involved parties would need to be considered (Johansson and Djurić Ilić 2022).
The second issue that this research revealed is related to the potential for CHP plants to contribute to grid stabilisation, which in theory is possible, but in practice can be limited. All large-scale CHP units need a day or more to start up production, which means that even when there is no need for heat production, some CHP units are running at a minimum load to avoid shutdown (Lund and Thellufsen 2022). Waste and biomass plants are also usually running constantly to achieve the best efficiency and to avoid the issues that can occur when operations are quickly regulated up and down. Thus, to use DH systems as flexible platforms for increasing intermittent electricity production, investments in CHP plants with smaller capacities would be required (Cruz et al., 2022).
However, despite these challenges and uncertainties, the strategies analysed in this study may play an important role in increasing the share of renewable electricity production in Sweden. Particularly in the case of industrial flexible electricity demands, the model adopted includes flexibilities that can be utilised in 1-day, 1-week, and 4-week periods. In practice, these flexibilities could be implemented with a range of different technologies and strategies, as discussed in the "Industrial demand-side flexibility providing balancing services for the power sector" section. However, many of these solutions require technology development and increased adoption to reduce the costs associated. In combination with the utilisation of electric vehicles as flexible demands, these strategies may play a decisive role by reducing demand peaks in cities, which would consequently reduce the stresses on the grid connections to the centralised electricity system, as well as the bottlenecks in the electricity system. Another important aspect in this context is that electricity price trends and increased price volatility may provide incentives for individuals and organisations to pursue energy self-sufficiency. For example, households with solar power production could benefit from increasing self-consumption by switching to electric vehicles, utilising HPs, or with local battery storage, thus avoiding feeding electricity into the grid in moments of low prices, and possibly contributing to supply in moments of high demand.
The solutions outlined above may represent a starting point for increasing the use of renewable energy sources, but additional solutions will be needed to achieve these goals. One possible solution is the increased use of hydrogen, which several studies have recognised as key for the decarbonisation of our energy systems (Salgi et al., 2008;Mathiesen 2008;Meibom and Karlsson 2010;Tzamalis et al., 2013). Production of green hydrogen (e.g. with solar and wind power), hydrogen storage, and electricity production from hydrogen during periods with low intermittent electricity production can enable a transition towards a 100% renewable electricity system without compromising the supply security.

Conclusions
An EnergyPLAN model of a future Swedish energy system with increased wind power capacity was used as the reference model for analysing the potentials of three strategies to increase the flexibility of the electricity system: (1) using CHP plants as flexible producers in DHSs, (2) using HPs as flexible users in DHSs, and (3) using flexible industrial processes as a demand response (10% of the peak power demand in Sweden). The potentials of these regulation strategies were evaluated and compared by focusing on the required electricity import and the excess electricity that exceeds the maximum electricity that can be exported with today's capacity of the transmission lines.
Different demand-side flexibility measures are more suitable for different shares of intermittent renewable power capacity. Whilst HP regulation was shown to be better at reducing excess electricity production at lower wind power capacities (the potential decreased from 32 to 15% when the annual wind power production increased from 45 to 60 TWh), CHP regulation became a more attractive alternative with increasing wind power capacity (the potential increased from 14 to 39%). By combining both strategies, the excess electricity was reduced by approximately 42% for all wind power capacities analysed. Like HP regulation, flexibility in electricity demand in industrial processes had a greater percentage contribution at lower wind power capacities. This shows that the utilisation of flexible electricity demands in industry may currently have the potential to enable an increased share of intermittent renewable electricity generation. However, the contribution of this measure becomes less relevant for increasing shares of intermittent electricity capacity. When combining CHP and HP regulation with the utilisation of flexible electricity demands in industry, the excess electricity could be reduced by 68-80% and electricity import by 14-26% for the wind power capacities analysed (45 to 60 TWh).
Wind power contributing to grid stabilisation reduces excess electricity production but does not reduce electricity imports significantly. When all three regulation strategies were implemented, the add-on of wind power contributing to grid stabilisation resulted in relatively small additional reductions in electricity imports.
Excess electricity generation in the electricity network is in reality curtailed to maintain grid stability. Relying heavily on electricity imports to cover periods of high demand and low production from intermittent renewable sources raises the issue of security of supply for the electricity system of a country. Future works could analyse the additional flexibility requirements to address both these issues, as well as seek to quantify the suitability of different strategies to provide flexibility to the system taking into account regional differences and the value of local energy self-sufficiency.