An integrated framework for optimal infrastructure planning for decarbonising heating

Graphical abstract


Sets
Planning periods [

Introduction
Energy system models are integrated frameworks that provide quantitative insights into alternative energy systems. They provide structured stories about future developments through scenario analysis and based on an organised exploration of data and assumptions [ 2 ]. Whole energy system models have played a major role in informing energy policy and shaping the energy strategy discourse over the past two decades. As decision support tools, they have been widely used to explore the solution space for decarbonisation and provide insights into the costs, feasibility, path dependency, and energy security implications of possible transition pathways to a low carbon energy system [ 3 ].
Achieving climate change mitigation targets will require decarbonisation efforts across all sectors of the economy, particularly the energy sector. Decarbonising heating in buildings is central to this energy transition challenge. Heat is one of the largest energyconsuming sectors and a major source of emissions in many countries with a cold climate. The scale of the heat challenge differs significantly from state to state depending on various factors, such as climate conditions, building stock, energy prices, the heating technology portfolio mix in buildings and the current structure of the energy system in a country. There is a wide range of options for decarbonising heating, with different pathways leading to very different energy systems. Modelling the future heat system is complex, and an effective representation of different heat decarbonisation pathways requires capturing the interactions across many domains, including buildings, heating systems, the electricity sector, and the existing fuel supply infrastructure such as the gas and electricity grids [ 3,4 ]. This paper presents the HEGIT (Heat, Electricity and Gas Infrastructure and Technology) model for optimal infrastructure planning for decarbonising heating in buildings. HEGIT is a multi-scale integrated electricity and gas systems' unit commitment, economic dispatch and capacity expansion planning optimisation model based on Mixed Integer Linear Programming (MILP). The model is designed to investigate the coordinated transition of electricity and gas grids and assess the impacts of different policies and decisions for decarbonising heating in buildings on the operation and long-term investment planning of these networks. HEGIT is implemented in GAMS and uses CPLEX as the mixed integer linear programming solver. The model co-optimises the short-term operations and long-term investment planning of electricity and gas grids as well as the individual heating technologies in buildings while ensuring the security of supply and subject to different environmental, operational and system-wide constraints. The main outputs of the model are the portfolio mix and cost-optimal operation schedule of heating technologies in buildings, the cost-optimal dispatch schedules, the optimal technology mix and the evolution over the planning horizon for both gas and electricity grids. Such a coordinated approach is crucial for understanding the interaction between major components of the system, exploring cross-system solutions and identifying trade-offs between infrastructure requirements and investments in heating technologies at the consumer side for decarbonising heating. It also provides insights into the necessary levels of deployment of different options, the likely levels of investment required, key periods when strategic decisions need to be made, and the system-wide impacts of different choices [ 3 ].
To have a more accurate representation of heating technologies' cost and performance, such as variations in heat pump performance with outside temperature, and to study the impacts of different heat pump designs features on the operation and planning of the electricity grid, we soft-linked HEGIT with the thermodynamic and component-costing models developed by Olympios et al. [ 5 ] that capture the variations in cost and performance of heating options such as heat pumps. The cost and performance equations of heating technologies were derived from the thermodynamic and component cost models developed at Imperial College London's Clean Energy Processes laboratory (CEP). These cost and performance curves are validated using the cost and performance characteristics of different technologies collected from an in-depth analysis of domestic and commercial technologies available on the market [ 6 ]. Figure 1 shows a simple structure of the HEGIT model, and Fig. 2 shows the input data, data processing and software integration used in the HEGIT framework. Three main features of the HEGIT models are:    3. Multi-scale system engineering analysis using HEGIT for system-informed heating technology design, identifying optimal operational setups at the consumer end, and assessing trade-offs between consumer investment in heating technologies and infrastructure requirements in different heat decarbonisation pathways.
• It incorporates an integrated unit commitment and capacity expansion planning problem for coordinated operation and long-term investment planning of the electricity and gas grids. This enables the model to assess different scenarios regarding the future of the gas grid and its role in providing low-carbon heating, quantify the system-wide implications of different pathways for decarbonising heating in buildings, identify the most efficient and effective use of available resources and technologies, identify strategies for maximising synergies between system planning goals and minimise trade-offs and provide technical evidence for policy making. • It incorporates the flexible operation of heating technologies and demand response in coordinated planning of gas and electricity grids for decarbonising heating. This will allow the user to conduct simultaneous multi-scale system analysis for system flexibility planning and assess the potential benefits of access to a wider set of flexibility options through demand side management, and coordinate the planning of heating and electricity decarbonisation in order to avoid expansive stop-gap measures and long-term lock-in. • It incorporates a multi-scale techno-economic representation of design features of heating technologies into whole energy system modelling and capacity planning ( Fig. 3 ).

HEGIT model scope and methodology
Models are usually tailored for a specific application or research question, which determines their complexity, modelling scope, and temporal and spatial resolutions [8] . Therefore, trade-off decisions should be made about these features to make the model computationally traceable. This section reviews the methodology, key features, main assumptions and input data in the HEGIT model. The HEGIT model is a least-cost optimisation (MILP) model and is designed to evaluate how different policies and decisions for decarbonising heat might impact the transformation and operation of electricity and gas grids over the planning horizon to 2050.
Modelling scope. The 'whole system' scope includes all major gas and electric flows, detailed representations of technologies (including their flexibility attributes) for electricity generation and supply, gas production and supply, as well as decentralised heating generation technologies in buildings. Therefore, the model captures the interaction between electricity and gas grids and the heating in buildings through the conversion of energy vectors to each other and emission exchange/offsetting. Fig. 4 shows the list of technologies included in HEGIT mode. The high-level cost-optimisation process in the model analyses different combinations of technologies in each network and selects those that minimise the total system cost while meeting specified sustainability and security targets under technologies/networks' operation and capacity expansion constraints.
Long-term capacity planning. HEGIT considers pathways from 2020 to 2050 by taking into account long-term trends in energy technologies, electricity and heating demands, fuel prices and carbon tax. The model considers annual time steps of 5 years over the planning horizon. The end of the planning horizon in the model can be modified based on the application and research questions.
Temporal factors. The energy system design is strongly influenced by temporal variations in demand and supply as well as peak levels of demand, especially as more variable renewable energy sources are integrated into the system. HEGIT accounts for seasonal and diurnal changes in demand and supply and explores the trade-offs between various ways to manage peak demand (e.g. supply, storage and demand-side measures). HEGIT has an adjustable temporal resolution. In order to reduce computational expenses, and because the full hourly version of the model takes a long time to solve, representative time steps can be used to reflect seasonal and diurnal variations in demand and supply. In our analysis, we use 13 representative days (12 representative days and one peak day), each with 24 consecutive hours. To identify the representative days for our analysis, we used k-means clustering with an energy-preserving approach 1 proposed in Ref. [8] .
Spatial factors. Geographic resolution is another important aspect to consider when designing energy systems, especially as distributed renewable resources are added to the system. the current version of the model represents a country as a single node, and the geographical distribution of resources and demand is not taken into account.
Input data. Large-scale bottom-up models typically require extensive data sets, which leads to a compromise between a highly disaggregated and detailed model on the one hand and data availability and model complexity on the other hand. The current version of HEGIT takes four types of data, as shown in Fig. 2 : • Temporal data: This includes demand profiles for heating and electricity, renewable energy sources availability, air and ground temperatures, and imported electricity prices.
• Technology data: This data includes capital investment, fixed operating costs, variable operating costs, and start-up costs, as well as the flexbility attributes and performance parameters such as economic lifetime, emission rate, efficiency, minimum safe operating level, uptime, downtime, ramp rates, inertia provision, and reserve provision for different technologies. • System data: This includes resource price projections, resource availability data, discount rates, carbon tax projections, population data, number of households, emission budgets, as well as electricity and gas grids operating constraints. • Heating technology data: This includes market cost and performance data on different domestic heating technologies, cost and performance data for various heat exchangers and compressors, thermodynamic parameters and specifications for different working fluids.

Assumption and simplifications
The other key assumptions considered in the model are: • We used a central planner perspective, and our results do not take into account consumers' preferences for heating technologies.
• Heating demand is population-adjusted, and detailed segmentation of housing stock is not considered in this version of the model.
• The regular electricity demand and the additional electricity demand from electrifying other sectors (such as transportation) are exogenously considered. • Uncertainties in the input parameters are not considered, and the model is deterministic.
• A perfect market and perfect foresight over the planning horizon (2020-2050) is assumed.
• Energy efficiency improvements in buildings are assumed to be independent of the heating technology and vice versa.
• It is assumed that fuel switching occurs only if demand for heating is supplied by the direct burning of fossil fuels.
• To ensure the grid security for capacity planning and to take into account extreme events such as sustained periods of low wind and the risks from renewable sources' intermittency; we assume that renewable sources will not be available on the peak day.

Model formulation
As shown in Fig. 1 , the HEGIT framework has four main parts: heating demand, heating technologies in buildings, gas and electricity grids and resources. In this section, we discuss the main constraints and assumptions for each part. 2

Heating demand and fuel switching in buildings
The key constraint on the demand side in each planning year a is the balance between heating demand (both space heating and hot water) and the demand supplied by the conventional energy vector v in the existing system and the sum of demands supplied by alternative low-carbon energy vectors l that replace the energy vector v , , as shown in Eq. (1) . For each conventional energy vector used for heating, the demand [ ] is estimated using the average conversion factor ( Eq. (3) ). Eq. (4) indicates the constraint on the total direct annual emissions from heating in buildings at the consumer end.
The system is limited to only relying on electricity and gas grids and energy efficiency measures to decarbonise heat. Other options, such as solar thermal and heat networks, were not considered in our study since assessing the value of these distributed options requires a finer spatial resolution and regional energy system modelling. Furthermore, we assume that fuel switching occurs only if demand for heating is supplied by the direct burning of fossil fuels in individuation heating technologies in buildings. Consequently, if demand is already supplied by biomass, electricity or renewable sources, fuel switching does not occur ( Eq. (5) ).
A number of factors affect the demand for heating in buildings, including energy efficiency measures, household size, consumer behaviour, heating technology, etc . Thus, there are many uncertainties in estimating and projecting the heat demand profile and, more importantly, the peak demand for heating [9][10][11] . Our analysis of the transition in the heat sector is based on a whole-systems perspective, and heating demand is exogenously considered in our study.
The methodology shown in Fig. 5 (adopted with minor modifications from the contribution of Eyre et al. [10] ) was used to project the heating demand over the planning horizon and create a baseline for heating demand. To account for energy efficiency uptake in buildings, we used average discount rates based on estimates reported in the literature [12][13][14] ( Eq. (2) ). Upon retrofitting energy efficiency measures into buildings, we assume the demand for heating will decline linearly by about 8% until 2030 and further by 22% until 2050. However, we do not take into account the impact of energy efficiency measures on heating demand profiles. We incorporated the building's space heating and hot water demand profile for general cold weather as proposed by Sansom et al. [15] . Heating demand has been adjusted for population taking into account the changes in the population over the planning horizon in the UK as reported in Ref. [16] . Additionally, average household size was used to size the heating technologies [17] , and detailed household segmentation was not considered. We differentiate, however, between gas grid-connected buildings and those not connected to the gas grid.

Heating technologies
Heating technologies in buildings convert the service demand for heating into demand for different energy vectors. Therefore, these technologies' performance and operational features affect the operation and transition of both the gas and electricity networks and, ultimately, the cost of low-carbon energy carriers used for domestic heating. The HEGIT model implements five alternative low-carbon heating technologies to replace conventional fossil fuel boilers: air-source heat pump (ASHP) with electric backup, ground-source heat pump (GSHP) with electric backup, hybrid air-source heat pumps with natural gas boilers, hybrid air-source heat pumps with hydrogen boilers, and hydrogen boilers.
The main constraints for heating technologies are the heat demand balance as indicated in Eq. (6) and the energy and mass balances for the hot water cylinder and the heating technologies in each building, as shown in Eqs. (7) to (10) . An electric or gasfueled backup heater can be used for heat pumps depending on the scenario. For natural gas and hydrogen boilers, backup is not considered.
The output from each heat pump unit type hp at each time step t and day c is constrained by the coefficient of performance (COP) of the heat pump at that time step and its installed capacity ( Eqs. (11) and (12) ).
For gas boilers, the thermal output is constrained by the installed capacity and the demand for gas (natural gas or hydrogen) is calculated based on the boiler's efficiency, which is assumed to be the same for both hydrogen and gas boilers [18] .
With respect to heat pumps, we use the empirical cost and performance equations from the integrated heat pump thermodynamic and component-costing model (discussed in Section "Introduction " and Fig. 2 ) to calculate the performance of heat pumps at each time step based on the outside air and ground temperatures 3 . For gas boilers single cost and performance estimations from market research and literature are used [ 6,19 ]. As indicated in Eq. (15) , the total consumers' capital investment in fuel switching is calculated as the sum of the costs associated with purchasing heat pumps and their integrated hot water tanks, purchasing gas boilers, grid integration via smart meters, and installation costs. The costs of low-carbon alternative fuels are endogenously calculated in the model and therefore not included in the fuel switching cost.

Gas and electricity grids
This part reviews the integrated capacity expansion planning and unit commitment optimisation problem in HEGIT that has been developed for modelling the coordinated operation and investment planning of the gas and electricity grids.

Gas network
Gas flow model nonlinearity (introduced by Weymouth gas equation) significantly impacts the computational time of the gas network models [20][21][22][23] . One common approach to addressing this challenge is converting dynamic technical characteristics such as pressure and volume into a static energy unit, which is our preferred approach for HEGIT. With this simplification a linear model of the gas grid can be developed [24][25][26] . This section reviews the problem definition and main constraints considered for modelling the gas network.
System-wide constraints . We assume that two different types of gases can be injected into the gas grid: methane and hydrogen. The main uses of methane in the electricity and heating sectors are for gas-fired power plants, hydrogen production using methane reforming, the direct use of methane in gas boilers in buildings and other demand from other sectors such as industry (shown in Eq. (73) ). Equation (16) shows the demand/supply balance for methane for heating and power, which can be supplied either by natural gas (from domestic production and import) or biomethane.
Demand for hydrogen in each planning year is calculated based on the decarbonisation pathway adopted for heating as well as the system-wide and operational constraints in each scenario ( Eq. (17) ). In the hydrogen network, Eq. (18) ensures the hydrogen demand and supply balance at each time step t , representative day c in the planning year a . Equation (19) denotes the operating and supply margin requirements (to account for 1 in 20 demand ( OM coefficient) and − 1 condition ( SM coefficient) [27] ) in the hydrogen network. Hydrogen import is not taken into account in the current version of the model, and it was assumed that all hydrogen would be produced domestically [ 28 ]. Therefore hydrogen storage facilities, linepacks, and production flexibility are the only mechanisms we considered for operating margin provision.
Gas production plants operation: Hydrogen production units' output can be used to meet demand or to charge storage units, including linepack ( Eqs. (20) and (21) ). The hydrogen output from production units is limited by their capacity, and in the case of renewable hydrogen production units, the output is also limited by the availability of renewable resources ( Eqs. (22) to (25) ). The same equations apply to biomethane production units. To avoid repetition we haven't listed them here.
Equation (26) represents the electricity demand from the grid-integrated electrolyser units at each time step: Gas storage units operation . Equation (27) to (40) represents the operational constraints of underground gas storage units. The inventory balance, the minimum and maximum storage capacity of each storage unit are described by Eqs. (27) , (28) and (29) respectively. Equations (30) to (34) constrains the injection and withdrawal rates from storage units. Constraint (35) ensures sufficient reserve hydrogen storage to meet minimum days of average hydrogen demand, represented by the parameter Res .
In the current version of the model, we only consider underground gas storage in salt caverns 4 for bulk hydrogen storage. Nonetheless, we distinguish between different types of salt caverns based on the rock formation and depth of the caverns. Prospective areas and sites are, however, constrained by the presence of salt beds, the depth and salt thickness required for the safe design, construction and operation of caverns, as well as their proximity to demand clusters [ 29 ]. The cushion gas 5 capacity of all caverns is considered to be 30% of the storage capacity of the cavern. Investment and operating costs, the capacity of each cavern, the maximum available capacity for each formation, and their operating characteristics for the case study of the UK are gathered from the following Ref. [29][30][31][32][33][34][35] . Furthermore, we used the maximum injection and withdrawal rates based on expert interviews 6 , which are consistent with the figures reported by ETI [32] and Ref. [ 30 ].
The calculation of the available linepack 7 within the gas network is complex and requires combining spatial modelling of gas demand with spatial modelling of the gas transmission and distribution network. Since in the current version of HEGIT, we use a single node representation of the electricity and gas networks in the UK, and to simplify the analysis and avoid nonlinearities of gas flow equations, we did not incorporate the gas flow through the pipeline into the current version of the model. Instead, we use the approach for rating different pipelines' capacities, proposed by Vega et al. [25] to estimate the available linepack in the gas network. Thus, the effective linepack within the gas network was modelled as a storage technology (the balances were calculated in static energy units instead of volume). In the steady-state condition, linepack within a pipeline is proportional to average pressure along it [ 36 ]. Using the gas equation of state and Boyle's law [ 36,37 ], the linepack's maximum and minimum state of charge was calculated using maximum and minimum pressure limits, length and diameter of different gas distribution and transmission pipelines, and the calorific value of gases, based on the UK's gas network data available in References [38][39][40]. The balance of the hydrogen stored as linepack in the pipelines is represented in Eqs. (37) to (39) . Equation (39) ensures the balance of the gas stored as a linepack in a gas day. The linepack capacity is constrained by the degree of conversion of the gas grid to hydrogen as denoted in Eq. (40) .

Model objective function and key performance indicators
The objective function of the model is the total system transition cost. The total system cost is calculated as the sum of the capital investment required the electricity and gas networks, cost of fuel switching at the consumer side and operating costs over the planning horizon ( Eq. (74) ). The operating cost takes into account the ongoing cost of generation units including resource costs, startup and shutdown cost, emission costs, and the cost of loss of load ( Eq. (77) ). The total operating cost over the planning horizon is calculated using the Trapezoidal rule [ 44 ] The total system emission is also calculated the sum of emissions from the electricity, gas and heat systems as presented bellow: Cost of avoided CO 2 emissions Cost of avoided CO 2 is an indicator of the costs incurred in the system for each tonne of CO 2 emission avoided. It is calculated as the ratio of the difference in total system cost in a low carbon scenario (here we considered the net-zero emission scenarios (Net0)) and the business as usual scenario (BAU) to the total avoided emissions, as represented in Eq. (78) . In the BAU scenario, there are no emissions mitigation targets for heating in buildings and the transition of the electricity and gas grids is driven by changes in demand and electricity grid decarbonisation targets.
( £ ∕t CO 2 ) = 0 − − 0 (78) Shannon Weiner Diversity Index (SWDI) . SWDI is a quantitative measure that reflects the diversity of the members of a set and is widely used in long-term energy planning and security of supply studies. Higher index values indicate a more diverse mix [ 45,46 ]. According to Jenson et al. it is the best single indicator of diversity for long-term energy supply security as it reflects on both variety and balance of categories [ 46 ]. Equation (79) shows the general equation for the Shannon index where y(n) is the proportion of each category. In this study, we use the Shannon index to evaluate the diversity of the primary resources used for supplying electricity and heating.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Data availability
The data used for this model is available as supplementary data in the related research paper: https://doi.org/ 10.1016/j.enconman.2022.115952 .