Evaluation Method for the Hourly Average CO2eq. Intensity of the Electricity Mix and Its Application to the Demand Response of Residential Heating

This work introduces a generic methodology to determine the hourly average CO2eq. intensity of the electricity mix of a bidding zone. The proposed method is based on the logic of input–output models and avails the balance between electricity generation and demand. The methodology also takes into account electricity trading between bidding zones and time-varying CO2eq. intensities of the electricity traded. The paper shows that it is essential to take into account electricity imports and their varying CO2eq. intensities for the evaluation of the CO2eq. intensity in Scandinavian bidding zones. Generally, the average CO2eq. intensity of the Norwegian electricity mix increases during times of electricity imports since the average CO2eq. intensity is normally low because electricity is mainly generated from hydropower. Among other applications, the CO2eq. intensity can be used as a penalty signal in predictive controls of building energy systems since ENTSO-E provides 72 h forecasts of electricity generation. Therefore, as a second contribution, the demand response potential for heating a single-family residential building based on the hourly average CO2eq. intensity of six Scandinavian bidding zones is investigated. Predictive rule-based controls are implemented into a building performance simulation tool (here IDA ICE) to study the influence that the daily fluctuations of the CO2eq. intensity signal have on the potential overall emission savings. The results show that control strategies based on the CO2eq. intensity can achieve emission reductions, if daily fluctuations of the CO2eq. intensity are large enough to compensate for the increased electricity use due to load shifting. Furthermore, the results reveal that price-based control strategies usually lead to increased overall emissions for the Scandinavian bidding zones as the operation is shifted to nighttime, when cheap carbon-intensive electricity is imported from the continental European power grid.


Introduction
A transition to a low-carbon energy system is necessary to reduce its environmental impact in the future. This implies a reduction of CO 2eq. emissions on the electricity supply side by making use of intermittent renewable energy sources. To fully exploit the electricity generated from these One country can have several BZs [33]. Norway consists of five BZs, each of them having physical connections to neighboring BZs that enables electricity imports and exports ( Figure 1). Sweden, Denmark, and Finland) and the Baltic TSOs (Estonia, Lithuania, and Latvia) [32]. In order to avoid bottlenecks in the transmission system, BZs are created with different electricity prices. One country can have several BZs [33]. Norway consists of five BZs, each of them having physical connections to neighboring BZs that enables electricity imports and exports ( Figure 1).

Figure 1.
Overview of the Scandinavian power market bidding zones, also including gas-fired power plants in Norway (adjusted from [30]).
The main contributions of this paper are twofold. Firstly, a methodology for calculating the hourly average CO2eq. intensity of the electricity mix in an interconnected power grid is developed. The methodology is generic and takes into account the hourly average CO2eq. intensities of the electricity traded between neighboring BZs (imports and exports). The proposed method resorts to the logic of multi-regional input-output models (MRIO) [34]. Input-output models are usually used to perform energy system modeling in combination with an economic analysis considering different industry sectors [35][36][37]. They are based on the assumption that there always is a balance between consumption and generation for the whole system. In the present work, this logic can be applied for electricity where BZs are used instead of industry sectors. As an example, this paper evaluates the hourly average CO2eq. intensity for several Scandinavian BZs using the electricity production data for the year 2015. Emissions related to an electricity generation technology are considered on a life-cycle perspective. Electricity losses in the transmission and distribution grid are neglected. The input data required to calculate the average CO2eq. intensity is not readily available. Therefore, this work does not only provide the methodology to determine the CO2eq. intensities but also guidelines on where to retrieve and how to structure the input data to apply the proposed methodology.
Secondly, studies that focus on the evaluation of hourly CO2eq. intensities usually do not consider the detailed control of the HVAC system, whereas most studies that specifically focus on the heating system control do not comment on the methodology for determining the CO2eq. intensity. Therefore, the paper investigates how the characteristics of the CO2eq. intensity used as control signal influence Figure 1. Overview of the Scandinavian power market bidding zones, also including gas-fired power plants in Norway (adjusted from [30]).
The main contributions of this paper are twofold. Firstly, a methodology for calculating the hourly average CO 2eq. intensity of the electricity mix in an interconnected power grid is developed. The methodology is generic and takes into account the hourly average CO 2eq. intensities of the electricity traded between neighboring BZs (imports and exports). The proposed method resorts to the logic of multi-regional input-output models (MRIO) [34]. Input-output models are usually used to perform energy system modeling in combination with an economic analysis considering different industry sectors [35][36][37]. They are based on the assumption that there always is a balance between consumption and generation for the whole system. In the present work, this logic can be applied for electricity where BZs are used instead of industry sectors. As an example, this paper evaluates the hourly average CO 2eq. intensity for several Scandinavian BZs using the electricity production data for the year 2015. Emissions related to an electricity generation technology are considered on a life-cycle perspective. Electricity losses in the transmission and distribution grid are neglected. The input data required to calculate the average CO 2eq. intensity is not readily available. Therefore, this work does not only provide the methodology to determine the CO 2eq. intensities but also guidelines on where to retrieve and how to structure the input data to apply the proposed methodology.
Secondly, studies that focus on the evaluation of hourly CO 2eq. intensities usually do not consider the detailed control of the HVAC system, whereas most studies that specifically focus on the heating system control do not comment on the methodology for determining the CO 2eq. intensity. Therefore, the paper investigates how the characteristics of the CO 2eq. intensity used as control signal influence the overall emission savings. This is done using the case study of residential heating where DR is performed using the CO 2eq. intensity of several Scandinavian BZs. A detailed description of the HVAC system and its control is provided which has been spotted as a major short-coming of the other existing approaches that primarily focus on the CO 2eq. intensity evaluation.

Review of Existing Evaluation Methods for CO 2eq. Intensity
Generally, evaluation methods for the hourly CO 2eq. intensities of the electricity mix can be categorized as presented in Table 1. In a de-coupled approach, the electricity demand and supply sides do not influence each other. On the contrary, in a coupled approach, the interaction between the demand and supply sides is taken into account. For example, if a large number of buildings would apply the average CO 2eq. intensity as a penalty signal, the resulting electric load could be affected and thus the predicted generation would not be optimized for this load anymore. Ideally, a coupled approach should be used to take into account DR in the prediction of the electricity generation and the respective CO 2eq. emissions [26,38,39]. Furthermore, average and marginal CO 2eq. intensities are two distinct concepts. Marginal emissions are the emissions from one additional kWh generated/consumed and, consequently, it results from a single power plant. On the contrary, the average CO 2eq. intensity is the CO 2eq. /kWh emitted on average from the entire electricity generation of the BZ. It thus results from a mix of power plants. On the one hand, it could be argued that the marginal CO 2eq. intensity is most coherent for the control of a limited number of buildings because they will rather affect a single plant than the overall production. On the other hand, average CO 2eq. intensities (or factors) have been used extensively in the past for buildings exporting electricity to the grid, e.g., Zero Emission Buildings or Nearly Zero Energy Buildings. Studies mostly focusing on the life-cycle assessment (LCA) of buildings often use average CO 2eq. intensities rather than marginal intensities. Table 1. Categorization of methodologies to evaluate CO 2eq. intensities of the electricity mix (marked as 'CO 2 ') or determine the optimal dispatch and unit commitment in electricity grids (marked as 'EL').

De-Coupled Approach
The evaluation methodology of the TSO Energinet for determining the CO 2eq. intensity of the Danish electricity mix has two distinct simplifications: (1) the methodology considers only the operational phase (meaning without the life-cycle perspective) and (2) the CO 2eq. intensity of the imports from neighboring countries are assumed to be constant. For example, electricity imports from Norway are assumed to be 9 g/kWh, from Germany 415 g/kWh and from Sweden 28 g/kWh [40].
Vandermeulen et al. [9] aim at maximizing the electricity use of residential heat pumps at times of high shares of renewable energy generation in the Belgian power grid. Data from the Belgian TSO, Elia, is used. It is not stated whether electricity imports are considered.
Milovanoff et al. [41] determine the environmental impacts of the electricity consumption in France for the years 2012 to 2014. They calculate 'impact factors' for electricity generation and consumption, where the impact factor for consumption agrees with the environmental impacts per kWh consumed including country-specific electricity production and trades. Regarding the electricity trades with neighboring BZs, it is assumed that the impact of the electricity imports to France equals the impact of the electricity generated in the BZ France is importing from, without taking exports and imports between France' neighboring BZs into account. Even though the methodology does not take into account the electricity trades between neighboring BZs, it is pointed out that dynamic data of electricity imports and exports should be considered for calculating CO 2eq. intensities of the electricity consumption. Milovanoff et al. as well as Roux et al. [42] make use of the Ecoinvent data base version 3.1 which provides CO 2 factors for electricity generation technologies considering the whole life-cycle of a technology. Roux et al. calculate hourly average CO 2eq. intensities of the electricity generation and consumption in France for the year 2013. Their study focuses on the magnitude of errors when a yearly-average factor for the electricity mix is used instead of an hourly-average factor varying throughout the year. However, it is not stated how the CO 2eq. intensities of the imports are considered in the study.
The company Tomorrow launched a website which shows the hourly average CO 2eq. intensity for most European countries in real time [50]. Data on the electricity generation per production technology in a BZ is taken from ENTSO-E. Furthermore, trading between BZs as well as time-varying CO 2eq. intensities are considered in their models , but a license has to be purchased to get access to the data. Their method is based on the electricity balance between the supply and demand side. The hourly CO 2eq. intensities of each BZ are considered as vectors in a linear equation system, which is solved for the CO 2eq. intensity for each hour of year.
Bettle et al. [44] calculate marginal emission factors for Wales and England for the year 2000, based on 30 min data of a full year for all generating power plants considering all plants individually. Imports are not considered in their study. They found that the marginal emission factor is usually higher than the average emission factor (up to 50% higher). Thus, the average factor is likely to underestimate the carbon-savings potential.
Hawkes [45] estimates marginal CO 2 emission rates for Great Britain, based on data from 2002 to 2009. The emission rate is termed marginal emission factor and corresponds to the CO 2 intensity of the electricity not used as a result of a DR measure. The approach follows a merit-order approach and thus applies only to countries where the electricity generation is primarily based on fossil-fuel technologies. The methodology does not consider electricity imports from neighboring BZs. They point out a clear correlation between the total system load and the marginal emission factor, showing high emission factors during times of high system loads.
Peán et al. [25] determine marginal emission factors for Spain for the year 2016 based on the methodology proposed by Hawkes [45]. Similar to Hawkes, electricity imports are not considered.
Corradi [46] aims at calculating the marginal CO 2eq. intensity of the electricity using machine learning. Flow tracing [51] is used to trace the flow of the electricity back to the area where the marginal electricity is generated. Following Corradi's approach, in the end, the total marginal emissions of a BZ are the weighted average of the emissions from the marginal electricity generation plant of that BZ and the marginal electricity generation plant of the imports (in case of imports), using the percentage of origin as a weight.

Coupled Approach
Graabak et al. [47] determine yearly average marginal emission factors for the European power grid and marginal emission factors for the Norwegian power grid based on a European Multi-area Power-market Simulator (EMPS). EMPS is a stochastic optimization model for hydro-thermal electricity markets where the electricity market is arranged so that electricity prices balance supply and demand in each area and time step. It is used by all main actors in the Nordic power market, such as the TSOs, and for energy system planning, production scheduling, and price forecasting. Average emission factors are estimated for several scenarios of production portfolio for the European power grid. They point out that an average emission factor should be used for the control of a large number of buildings while a marginal emission factor should be applied for the control of a limited number of buildings.
Patteeuw et al. [26], Arteconi et al. [38], Askeland et al. [48] and Quoilin et al. [49] determine optimal dispatch and unit commitment in electricity grids. None of the models calculates CO 2eq. intensities. Nevertheless, their models could determine the carbon intensity by considering CO 2 factors for each electricity generation technology. Patteeuw et al. [26] developed an approach to model active demand response with electric systems while considering both the supply and demand sides. The model takes thermal comfort and techno-economic constraints of both sides of the power system into account. Formulated as an optimization problem, it minimizes the overall operational cost of the electricity generation. The case study is based on the Belgian power system using the year 2010. This model enables to investigate the influence of different levels of market penetration of DR on the decision of the marginal generation technology. The approach does not consider imports. Arteconi et al. [38] apply the same model for the choice of the generation technology and use a low-order resistance-capacitance building model as a case study to investigate the DR potential of a building.
Askeland et al. [48] developed an equilibrium model for the power market that couples the demand and supply sides. The model provides time series for the electricity demand as well as for the renewable energy generation. A case study for the Northern European power system is performed where the effect of DR on the potential shift in the generation mix is studied. Quoilin et al. [49] developed a model called Dispa-SET, which is an open-source model that solves the optimal dispatch and unit commitment problem at the EU level, applying one node per country, instead of per BZs.

Evaluating the Hourly Average CO 2eq. Intensity
In the following, the sources for required input data are first presented. The assumptions for processing the data are then stated. Finally, a step-by-step guidance is given to determine the hourly average CO 2eq. intensity of the electricity mix per BZ. In the case study, hourly average CO 2eq. intensities are calculated for Scandinavia, meaning Norwegian, Swedish, and Danish bidding zones, but also for Finland, Germany, and the Netherlands.

Electricity Use per Bidding Zone
Data regarding the electricity generation per production type within a BZ can be retrieved from ENTSO-E, which is the European Network of TSOs for Electricity. The European TSOs are supposed to provide data to ENTSO-E to promote market transparency and closer cooperation across the TSOs. A free user account at ENTSO-E has to be set up to download the data. Furthermore, data may also be retrieved directly from national TSOs, if the dataset from ENTSO-E is incomplete for specific BZs. For instance, hourly electricity generation data for the Swedish BZs was here obtained from the Swedish TSO (as this data was not available from ENTSO-E).
The ENTSO-E dataset contains hourly values for the total electricity generated per production type within a BZ. Thermal power plants are included as a production type. In practice, these power plants can consume most of the generated electricity onsite. Therefore, it is necessary to have knowledge about the sales licenses to the grid of these power plants. When onsite-generated electricity is not sold to the grid, it should ideally not be considered for the average CO 2eq. intensity of the electricity mix. Information regarding sales licenses can usually be obtained from either the TSO, state directorates or directly from the company owning the power plant. For our case study of Scandinavia, these sales licenses were only determined for Norway. The Norwegian thermal power plants with the highest installed capacities are shown in Figure 1. Only the power plant of Mongstad sells electricity to the grid. Comprehensive information on data treatment and assumptions is provided in [39].
The input data can be arranged in the following way: where • i is the "index of EGTs" ranging from 1 to m • j is the "index of a specific BZ" • g is the "hour of the year" ranging from 1 to 8760 (or 8784) The matrix BZ (where 'BZ' stands for bidding zone) includes the electricity generation from each electricity generation technology (EGT i ) at every hour of the year (t g ). EGT i represents electricity generation from each technology in the BZ, but, by extension, it also includes the imports from first tier BZs. In other words, imports from other BZs are considered as an EGT in the matrix.

Emission Factors per Electricity Generation Technology
The average CO 2eq. intensity of a BZ depends directly on the CO 2 factor that is associated to each EGT. This choice of the CO 2 factor strongly affects the final result of the evaluation. Two possible ways of acquiring CO 2 factors of a given EGT are the IPCC report [52,53] or the Ecoinvent database [54]. Ecoinvent provides a vast variety of CO 2 factors for electricity generation from a given fuel type depending on the type of power plant and the specific country. A license is necessary to use Ecoinvent, whereas the IPCC report is available free of charge. CO 2 factors can differ between references mainly due to different allocations of emissions, especially for combined heat-and-power plants. More detailed information regarding emission allocations are given in [52][53][54]. Regarding annual average CO 2eq. intensities of a country (see Table A1 in Appendix A), they can be calculated from Ecoinvent or taken from the website of the European Environment Agency [55].
For the sake of the simplicity, our case study considers a same CO 2 factor per EGT for every country. Therefore, it assumes that the CO 2 factor is independent of the country and the specific power plant as long as it uses the same EGT (disregarding the thermal efficiency or the age of the power plant). The proposed methodology is however more general. If a different CO 2eq. factor should be considered for a same EGT but for a different plant efficiency, plant age, or country, a new EGT should be defined for each different CO 2eq. factor considered.
In this study, data from the Ecoinvent database has been used. The phases that were considered in the CO 2 factor per EGT are the extraction of fuels, the construction of the power plant (including infrastructure and transport), its operation and maintenance as well as the end of use of the power plant. The CO 2 factor for hydro pumped storage is here assumed constant in time, 62 gCO 2eq. /kWh. In fact, it is dependent on the CO 2eq. intensity of the electricity mix used when pumping water into the storage reservoir. Unlike Norway, this assumption can be critical for BZs that usually have a relatively high CO 2eq. intensity. Strictly speaking, if the constant CO 2 factor considered for hydro pumped storage is much lower than the CO 2eq. intensity of the electricity mix when water is pumped into the storage, it would correspond to a 'greenwashing' of the electricity mix. Furthermore, ENTSO-E defines an EGT category called 'other' with no further specifications. It is thus difficult to allocate a CO 2 factor for this production type and it could also differ among different countries. In this work, the factor is assumed to be the average of the fossil fuel technologies. Table A1 gives an overview of typical CO 2 factors for different fuel types.

Calculation Methodology
The electricity mix is assumed homogeneous in each BZ, meaning that a same CO 2eq. intensity is used for the entire BZ at each hour of the year. For neighboring countries where the CO 2eq. intensities are not evaluated (here called 'boundary BZ'), a yearly-averaged CO 2eq. intensity is considered. In our case study, these countries are Great Britain, Belgium, Poland, Estonia, and Russia. It is nonetheless reasonable to assume that they have a limited impact on the Norwegian electricity mix. They are either 2nd tier countries (i.e., which do not have a direct grid connection to Norwegian BZs) or have limited electricity export to Norway (which is typically the case for Russia). By extension, BZs for which the average CO 2eq. intensity is calculated for every hour of the year are hereafter called computed BZs.
Matrix T(t) (where 'T' stands for technology) includes the electricity generation from all EGTs in all BZs and is calculated for each hour of the year (t): where • i is the "index of EGTs" ranging from 1 to m • j is the "index of BZs" ranging from 1 to n The size of matrix T(t) depends on the number of EGTs and number of BZs that are considered in a respective study.
The next step is a normalization to 1 MWh by dividing by the total hourly electricity generation (i.e., summing on all the EGT i , also considering imports) in a bidding zone (BZ j ) during each hour (t) of the year. This step will be necessary to determine the CO 2eq. intensity for 1 MWh of generated electricity in a respective BZ. Matrix N(t) (where 'N' stands for normalization) is set up as follows: where • i is the "index of EGTs" ranging from 1 to m • j is the "index of a specific BZ" ranging from 1 to n The matrix P(t) (where 'P' stands for production) is the share of each EGT on the total hourly electricity generation in a respective BZ, still considering electricity imports as an EGT. Regarding the electricity imports to a BZ, it is distinguished between imports from boundary BZs with a fixed CO 2eq. intensity of the electricity mix (P Import,fix,t ) and imports from computed BZs with a variable electricity mix (P Import,var,t ). At this stage, P(t) only considers the share of each EGT in the electricity mix of a specific BZ, but does not consider the share of each EGT in the imports. P(t) is calculated by multiplying T(t) and N(t). The share of EGTs (located inside the BZ j) in the generation mix is called P EGT,t .
P EGT,t and P Import, f ix,t can be combined to define the matrix P EGT, f ix : The next steps show how to include the share of each EGT in the electricity imports; in other words, how the electricity mix of a neighboring BZ influences the electricity mix of a BZ through imports. In general, the balance between electricity consumption and electricity generation has to be satisfied at all times for each BZ. This idea is further generalized in MRIO models, where interdependencies within the whole system can be captured, while preserving regional differences [56]. For each BZ, the sum of electricity import and generation by a specific EGT should be consumed in the BZ, or exported. This complies with the logic of MRIO models which can be used to calculate consumption-based emissions for an entire country or region [34]. The electricity balance can then be expressed as with M (where 'M' stands for mix) representing the share of each EGT on the electricity use of BZ j and the exports from BZ j . Solving Equation (6) for M is done by where I is an identity matrix. Matrix M(i,j) contains the share of each EGT i (and boundary BZ) on the electricity use and exports from BZ j . A new matrix is computed for each hour of the year. The average CO 2eq. intensity of a BZ for every hour of the year is calculated by where t is the hour of the year, i is the index of the EGT ranging from 1 to m, j is the index of a specific BZ ranging from 1 to n and e f EGT i is the emission factor of the EGT of index i.

Applicability of the Methodology
Comparing the proposed methodology with the other existing methodologies presented in Table 1, its major advantage is its simplicity. Nevertheless, it also has limitations. As a decoupled approach, the method can be used as long as the number of buildings participating in DR schemes is low; in other words, as long as the level of the market penetration of DR in buildings is still limited. This limitation counts for all decoupled approaches, not only for the proposed method. Furthermore, this approach is representative for most simulation-based studies in building energy flexibility. Yearly average CO 2eq. intensities of the electricity mix have been used extensively in the past to calculate the emission balance of buildings that export electricity to the grid [57]. Studies mostly focusing on the LCA of buildings often use average CO 2eq. intensities rather than marginal intensities. The use of hourly average CO 2eq. intensities as a control signal for DR is thus remaining coherent with that approach. Also, in the EPBD method, average primary energy factors are often used to evaluate the performance of buildings.

CO 2eq. Intensities in Scandinavian Bidding Zones
As a case study, the hourly average CO 2eq. intensities for all Norwegian BZs are evaluated for the year 2015. Results are plotted in Figure 2a. NO5 has the highest annual average CO 2eq. intensity which is due to the electricity generation from the thermal power plant in Mongstad (see Figure 1 and Table 2). Furthermore, it is obvious that the highest CO 2eq. intensity peaks occur in NO2. Figure 2b presents the average CO 2eq. intensities for NO2, NO3, SE1, SE4, DK1, and FIN. It is clear that the Norwegian electricity mix has low average CO 2eq. intensities compared to non-Norwegian BZs. Resulting from the large differences in CO 2eq. intensity, the average CO 2eq. intensity in NO2 usually increases when electricity is imported from DK1, which also explains the CO 2eq. peaks in the BZ. The impact of fossil fuel-based electricity imports on the average CO 2eq. intensity is particularly strong for the case of Norway because the electricity generation in Norway is almost entirely from hydropower. The impact of carbon-intensive electricity imports on the average CO 2eq. intensity of other countries, like Finland or Denmark, is usually lower. A more detailed analysis of the correlation of the average CO 2eq. intensity and electricity imports to Norway is provided in [39].    An overview of the annual average CO 2eq. intensities is provided in Table 2. DK1 has the highest annual average CO 2eq. intensities, followed by FIN and SE4. Figure 3 illustrates the relation between the average CO 2eq. intensity and the electricity spot price for six Scandinavian BZs for an exemplary five-day period. For the Norwegian BZs NO2 and NO3 (see Figure 3a,b) it is shown that the average CO 2eq. intensity is low, when the electricity spot price is high. In Norway, electricity is produced from hydropower in times of high demands. Electricity spot prices are high during high electricity demands, thus typically leading to low CO 2eq. intensities. In general, the Norwegian hydropower reservoirs are operated in a cost-optimal way, so that electricity is imported during the night when electricity is cheap and exported to continental Europe during the day, when electricity is expensive [39]. This operation strategy can also be used to explain the CO 2eq. intensities in the BZs shown in Figure 3. The correlation between the carbon intensity and the spot price for the Swedish BZs is similar to the Norwegian BZs. SE1 (Figure 3c) is the northernmost Swedish BZ and relies primarily on electricity generation from hydro reservoirs and on-shore wind as well as on electricity imports from SE2. Thus, average CO 2eq. intensities are generally rather low. Regarding the correlation with electricity spot prices, CO 2eq. intensities are low when spot prices are high. This relation is also similar for SE4 (see Figure 3d) but to a lower extent. The average CO 2eq. intensities in SE4 are several times higher compared to SE1 because SE4 trades a lot of electricity with Denmark, Poland, and Germany.
A rather weak correlation between the carbon intensity and the spot price can be seen for DK, which is in accordance with the findings from Knudsen et al. [24] who found that a low CO 2eq. intensity does not necessarily occur concurrent with low costs. A difference between day and night is also visible for the CO 2eq. intensity in DK1. A correlation between the carbon intensity and the spot price on an hour-by-hour basis is not obvious because the CO 2eq. intensity varies much faster than the spot price. A clear relationship between the CO 2eq. intensity and the spot price is not visible for FIN.

Case Building
To represent a large share of the Norwegian residential building stock, a single-family detached house built according to the building standard from the 1980s, TEK87, is chosen as a case [58]. The geometry of the building is based on the ZEB Living Lab which is a zero emission residential building located in Trondheim [59]. The envelope model of the real Living Lab has been calibrated with the help of dedicated experiments for the building performance simulation tool IDA ICE. However, the thermal properties of the building envelope for this case study comply with TEK87. The Living Lab has a heated floor area of 105 m 2 , the floor plan being shown in Figure 4. An overview of the building properties is provided in Table 3. For the sake of the simplicity, natural ventilation, which was usually applied in TEK87 buildings, is modeled as balanced mechanical ventilation with a heat recovery effectiveness η HR of 0%. This study considers the U-values of the building walls, but it should be noted that the building insulation level [15] as well as the thermal capacity of a building [60][61][62] influences the flexibility potential. The climate of Trondheim is also relevant for Norway in general.  The internal heat gains from electrical appliances, occupants and lighting are defined according to the Norwegian technical standard, SN/TS 3031:2016 [71]. The daily DHW profiles are taken from the same standard. Schedules for electrical appliances are also based on SN/TS 3031:2016, whereas the schedules for occupancy and lighting are taken from prEN16798-1 and ISO/FDIS 17772-1 standards [72,73]. The internal heat gains are distributed uniformly in space. All profiles presented in Figure A1 have an hourly resolution and are applied for every day of the year.
The energy flexibility potential is evaluated for four different PRBCs by comparing them to the reference scenario that applies constant TSPs for SH (21 °C) and DHW (50 °C). The TSP for the bathroom is 24 °C. All doors are closed at all times. DR measures are applied to the common rooms only (meaning the living room, kitchen, and living room north). All cases use the weather data of 2015 (retrieved from [74]) for Trondheim, independent of the BZ considered. NordPool provides hourly day-ahead spot prices for each bidding zone [75]. They are used as an input signal for the price-based control and to calculate energy costs for heating. An electricity fee for the use of the distribution grid is not considered in the cost evaluation.

Demand Response Strategies
The reference scenario, termed BAU (for business as usual), maintains constant TSPs for SH and DHW heating at 21 °C and 50 °C respectively. Using constant TSP is the most common way to control the heating system in Norwegian residential buildings. These TSPs are varied for the DR strategies. The DHW TSP can be increased by 10 K or decreased by 5 K depending on the control signal. The limit for DHW temperature decrease is chosen with regards to Legionella protection. Regarding SH, the TSPs are increased by 3 K or decreased by 1 K. According to EN15251:2007 [76] indoor temperatures between 20 °C and 24 °C correspond to a predicted percentage dissatisfied (PPD) < 10% and −0.5 < PMV < +0.5 in residential buildings for an activity level of 1.2 MET and a clothing factor of 1.0 clo.
The control signal for the CO2-based control is determined based on two principles. The first principle, hereafter called CSC-a, aims at operating the energy system in times of lowest CO2eq. intensities by increasing TSPs for SH and DHW during these periods. For Norway, this principle may in practice lead to extended periods with high TSPs because of the typical daily CO2eq. intensity profile (Figure 3a,b). This may lead to an unnecessary increase in annual energy use for heating. Therefore, the second principle-hereafter called CSC-b-does not aim at operating the heating system during  Table 3. Building envelope properties and energy system characteristics of the case study building (EW-external wall; IW-internal wall; n 50 -air changes per hour at 50 Pa pressure difference; U Total -the total U-value of the windows including the glazing and the frame; HR-heat recovery; ER-electric radiator; AHU-air handling unit; HDS-heat distribution system). A detailed multi-zone model of the building is created using the software IDA ICE version 4.8, which is a dynamic building simulation software that applies equation-based modeling [63]. IDA ICE has been validated in several studies [64][65][66][67][68].
Electric radiators are used for SH as it is the most common space-heating system in Norwegian houses [69]. One electric radiator is placed in each room with a power equal to the nominal SH power of the room at design outdoor temperature (DOT) of −19 • C. DHW is produced in a storage tank. An electric resistance heater with a capacity of 3 kW is used for DHW heating and is installed in the lower third of the tank. IDA ICE has a one-dimensional model of a stratified water tank that accounts for the heat conduction and convection effects in the tank. The DHW storage tank is here divided into four horizontal layers to account for stratification effects. The DHW storage volume is calculated by where S is the safety margin and n people the number of occupants. S is set to 125% for a low number of people [70]. The charging of the DHW storage tank is controlled by two temperature sensors that are installed in the bottom and the top of the tank. The electric resistance heater starts heating as soon as the temperature in the upper part of the tank drops below the set-point and it continues until the set-point for the temperature sensor in the lower part of the tank is reached. The DHW start temperature is called the DHW TSP here. The DHW stop temperature is always taken 3 • C above to start temperature. The internal heat gains from electrical appliances, occupants and lighting are defined according to the Norwegian technical standard, SN/TS 3031:2016 [71]. The daily DHW profiles are taken from the same standard. Schedules for electrical appliances are also based on SN/TS 3031:2016, whereas the schedules for occupancy and lighting are taken from prEN16798-1 and ISO/FDIS 17772-1 standards [72,73]. The internal heat gains are distributed uniformly in space. All profiles presented in Figure A1 have an hourly resolution and are applied for every day of the year.
The energy flexibility potential is evaluated for four different PRBCs by comparing them to the reference scenario that applies constant TSPs for SH (21 • C) and DHW (50 • C). The TSP for the bathroom is 24 • C. All doors are closed at all times. DR measures are applied to the common rooms only (meaning the living room, kitchen, and living room north). All cases use the weather data of 2015 (retrieved from [74]) for Trondheim, independent of the BZ considered. NordPool provides hourly day-ahead spot prices for each bidding zone [75]. They are used as an input signal for the price-based control and to calculate energy costs for heating. An electricity fee for the use of the distribution grid is not considered in the cost evaluation.

Demand Response Strategies
The reference scenario, termed BAU (for business as usual), maintains constant TSPs for SH and DHW heating at 21 • C and 50 • C respectively. Using constant TSP is the most common way to control the heating system in Norwegian residential buildings. These TSPs are varied for the DR strategies. The DHW TSP can be increased by 10 K or decreased by 5 K depending on the control signal. The limit for DHW temperature decrease is chosen with regards to Legionella protection. Regarding SH, the TSPs are increased by 3 K or decreased by 1 K. According to EN15251:2007 [76] indoor temperatures between 20 • C and 24 • C correspond to a predicted percentage dissatisfied (PPD) < 10% and −0.5 < PMV < +0.5 in residential buildings for an activity level of 1.2 MET and a clothing factor of 1.0 clo.
The control signal for the CO 2 -based control is determined based on two principles. The first principle, hereafter called CSC-a, aims at operating the energy system in times of lowest CO 2eq. intensities by increasing TSPs for SH and DHW during these periods. For Norway, this principle may in practice lead to extended periods with high TSPs because of the typical daily CO 2eq. intensity profile (Figure 3a,b). This may lead to an unnecessary increase in annual energy use for heating. Therefore, the second principle-hereafter called CSC-b-does not aim at operating the heating system during periods with the lowest carbon intensities but rather charges the storages just before high-carbon periods in order to avoid the energy use during these critical periods. Using CSC-b, the TSPs are increased for shorter time periods compared to CSC-a, thus improving the energy efficiency.
The carbon-based PRBC uses a 24 h sliding horizon to determine a high-CO 2eq . intensity threshold (HCT) and low-CO 2eq. intensity threshold (LCT). At each hour, the current CO 2eq. intensity (CI) is compared to these thresholds. Taking CI max and CI min as the maximum and minimum intensities for the next 24 h, LCT has been selected to CI min + 0.3 (CI max -CI min ) and HCT to CI min + 0.7 (CI max -CI min ). Regarding CSC-a, if the CO 2eq. intensity of the current hour is below the LCT, the TSPs are increased. If the current CO 2eq. intensity is above the HCT, the set-points are decreased to delay the start of the heating, whereas if the CO 2eq. intensity of the current hour is between the LCT and HCT, the TSPs remain equal to the reference scenario. Regarding CSC-b, the control signal is also determined based on the three price segments, as defined for CSC-a, but, additionally, the control considers if the current CO 2eq. intensity is increasing or decreasing with time. If the current CO 2eq. intensity is between the LCT and HCT and the CO 2eq. intensity increases in the next two hours, TSPs are increased. Both principles, CSC-a and CSC-b, are presented in Figure 5. (HTSP is high temperature set-points, RTSP is reference temperature set-points, LTSP is low temperature set-points). Figure 6 illustrates the principle of the CSC-a control during 48 h of the heating season exemplary for DK1. Figure 6a shows the CO2eq. intensity and both thresholds, LCT and HCT. Figure  6b presents the measured temperatures in the DHW tank and the start and stop TSPs of the DHW hysteresis control. These TSPs vary depending on the CO2eq. intensity signal. The same principle is shown for SH in Figure 6c. It is visible from Figure 6d that the electric radiators and the electric resistance heater for DHW heating are operated depending on the CO2eq. intensity signal and according to the proposed temperature hysteresis. The performance of the control with regards to emission savings is sensitive to the selection of thresholds, LCTs and HCTs. The influence of LCTs and HCTs on the number of hours per TSP-segment has been evaluated for BZ NO3. An LCT of 30% and an HCT of 70% have been chosen for calculating the control signal. The LCTs and HCTs for the other five BZs considered in the simulation study are chosen so that the number of hours in the three respective segments is equivalent to the case of NO3. An overview of the different scenarios is presented in Table 4. In fact, there is an optimum LCT and HCT for each BZ to minimize carbon emissions. However, in the case study, the two thresholds are rather chosen to have a similar number of hours in the respective TSP segments. This is done to investigate the influence of the CO 2eq. intensity profile on the carbon emissions rather than optimizing the control principle thresholds. Table 4. Influence of the low-carbon and high-carbon thresholds (LCT and HCT) on the number of hours per temperature set-point segment (LTSP-low-temperature set-points; RTSP-reference temperature set-points; HTSP-high temperature set-points).

Thresholds Kept Constant
Adjusted Price-based control signals, hereafter called CSP-a and CSP-b, are also determined similar to CSC-a and CSC-b, to also investigate DR measures based on the electricity spot price of each of the BZs. This means that the case study is performed for four DR signals applied to six Scandinavian BZs. In general, any form of penalty signal could be used for the control and optimization. If a proper penalty signal is chosen, a building can be controlled so that it is either energy efficient, cost efficient or CO 2 efficient. It would also be possible to select a combination of the different penalty signals for the building control [11]. Figure 6 illustrates the principle of the CSC-a control during 48 h of the heating season exemplary for DK1. Figure 6a shows the CO 2eq. intensity and both thresholds, LCT and HCT. Figure 6b presents the measured temperatures in the DHW tank and the start and stop TSPs of the DHW hysteresis control. These TSPs vary depending on the CO 2eq. intensity signal. The same principle is shown for SH in Figure 6c. It is visible from Figure 6d that the electric radiators and the electric resistance heater for DHW heating are operated depending on the CO 2eq. intensity signal and according to the proposed temperature hysteresis.

Case Study Results
The energy use, CO 2eq. emissions and costs are compared to the reference cases for each respective BZ. The relative difference in total annual emissions (Em.) for each BZ is calculated by Equation (10) can also be applied to determine the relative changes for annual energy use and annual costs, respectively. Results are presented in Table 5.
In general, the energy use increases for all DR cases. Regarding CSC, annual CO 2eq. emissions decrease for NO2 while they remain rather close to the reference case for the other BZs. For NO3, the daily fluctuations in average CO 2eq. intensity are too low to benefit from DR measures. Comparing results for NO2 and NO3 regarding overall emission savings, it demonstrates that electricity imports should be properly considered as they influence significantly the variations of CO 2eq. intensities. These variations have shown to be important to make the CO 2eq -based DR effective.
Regarding CSP, costs increase slightly for NO2 and NO3 while they decrease for SE4, DK1, and FIN. For SE4, DK1, and FIN, cost savings can be achieved as daily price fluctuations are sufficient. High daily fluctuations of prices do usually not occur in Norway and northern Sweden. Therefore, for NO2, NO3, and SE1, consuming during slightly decreased electricity spot prices is outbalanced by an increase in total energy use. Furthermore, using price-based control, overall emissions increase significantly for NO2, NO3, SE1, and SE4 as a result of typically high CO 2eq. intensities at low-price periods (as shown Figure 3).
It is obvious, that reductions of CO 2eq. emissions and costs are possible, but that they are very dependent on the characteristics of the CO 2eq. intensity and the electricity spot price. Savings could be increased, if different thresholds (LCT and HCT) were applied, not taking NO3 as a reference regarding the number of hours per segment. Absolute savings depend on the LCT and HCT as well as the principle used to obtain the respective control signals. In addition, the maximum absolute savings should ideally be evaluated using MPC. Therefore, here, the performance of each control should be considered relative to each other rather than in absolute terms. 19 Table 6 presents CO 2eq . emission and cost savings for DHW heating and SH, separately. It can be seen that SH is the main contributor to total emission or cost savings because, for such a building with limited thermal insulation, the share of electricity use is much more significant for SH than for DHW heating. This will be different for buildings with better insulation levels. For example, regarding CSC-a in DK1, it can be seen that, even though DR measures for DHW heating lead to 12% emission savings, the overall emissions increase by 1% because the emissions resulting from SH increase by 3%.
Furthermore, CO 2eq. emissions for DHW heating are decreased significantly in most of the zones using CSC-a. On the contrary, in the Norwegian and Swedish BZs, these emissions increase significantly using CSC-b. Using CSC-b, the water storage tanks are typically charged during late evenings whereas the next peak for DHW withdrawal only occurs the next morning. These peaks of DHW withdrawal happen when the CO 2eq. intensities of the electricity mix are rather low. In other words, CSC-b shifts the operation from low CO 2eq. intensities (meaning peaks of DHW withdrawal) to higher CO 2eq. intensities (meaning late evenings). Regarding costs, these DR strategies applied to DHW heating are very promising to decrease the operational costs. Operational costs are decreased for all BZs for both CSP-a and CSP-b considering DHW heating. In conclusion, efficient DR measures using PRBC can be implemented for the DHW heating. However, the performance of these controls are moderate for SH. The price-based controls did not manage to decrease operational costs for SH for most cases. On the one hand, this can be due to the low daily fluctuations of the electricity spot prices. On the other hand, this can be due to the low insulation level and thermal mass of the building as well as the inherent limitations of PRBC compared to MPC.

Conclusions
This work consists of two distinct but complementary parts. Firstly, a generic methodology is proposed to determine the hourly average CO 2eq. intensity of the electricity mix of a bidding zone (BZ) also considering time-varying CO 2eq. intensities of electricity imports. Northern Europe is taken as a case. Secondly, this case study is extended to investigate the performance of demand response measures based on the evaluated CO 2eq. intensity. These measures aim at decreasing the environmental impact of the heating system operation of a typical Norwegian residential building.
The proposed methodology to evaluate the hourly average CO 2eq. intensity of the electricity mix is an adaptation of multi-regional input-output models (MRIO). For each electricity generation technology (EGT), the method enforces the balance between electricity generation plus imports and electricity consumption plus exports. This balance is satisfied for both EGT and BZ at each hour of the year. Regarding the CO 2 factor for a specific EGT, it is shown that they can vary significantly among references depending on their respective assumptions. Among different possible applications, the average CO 2eq. intensity that is determined using this methodology can be used as a control signal in predictive controls for building energy systems. The average CO 2eq. intensity can actually be predicted using the forecast on hourly electricity generation provided by ENTSO-E.
Firstly, the methodology is applied to Northern Europe using CO 2 factors per EGT from the Ecoinvent database. It enables to highlight some important characteristics of this power market. Especially in Norway and northern Sweden, the electricity generation is characterized by a high share of hydropower in the electricity mix. These plants are typically operated when the price for electricity is high which happens during periods of high electricity demand. Therefore, the average CO 2eq. intensities are usually low at times of high electricity demand. On the contrary, for countries where the electricity generation relies more on fossil fuels, average CO 2eq. intensities are typically high at times of high electricity demand. In this respect, it is also important to consider electricity imports and their varying CO 2eq. intensity when evaluating the average CO 2eq. intensity. As soon as Norway imports electricity from neighboring BZs (typically in periods with low electricity demands), the CO 2eq. intensity can increase significantly because electricity generation is usually more carbon-intensive in Norway's neighboring countries.
Secondly, the average CO 2eq. intensity evaluated for Northern Europe is implemented into a predictive rule-based control (PRBC) to operate the electric heating system of a typical Norwegian residential building. The demand response measures based on the average CO 2eq. intensity aim at decreasing the environmental impact of the heating system. Results prove that carbon-based controls can achieve emission reductions if daily fluctuations of the CO 2eq. intensity are large enough to counterbalance for the increased electricity use generated by load shifting. As an example, the potential for emission reductions is higher in NO2 compared to NO3 because the daily fluctuations in the CO 2eq. intensity in NO2 are much larger than in NO3. As these fluctuations in NO2 are mainly generated by imports, it further confirms the need to account for these imports in demand response analysis. If the heating system is controlled according to spot prices, results also confirm that price-based controls lead to increased emissions in the Scandinavian countries as operation is usually shifted towards night-time (for the case of Norway) when cheap but carbon-intensive electricity is indirectly imported from Germany, Poland, or the Netherlands (via Denmark and Sweden).
Demand response using PRBC applied to DHW heating show a strong potential for cost and emission savings. Conclusions regarding SH are more balanced. Depending on the control strategy and BZ, the PRBC manages to decreases the SH costs or the related CO 2eq. emissions. The case building was taken representative for the Norwegian building stock and it results to a relatively low-level of thermal insulation. Energy use for SH is thus dominant over DHW. Consequently, the overall performance of DR using PRBC for heating (i.e., SH and DHW) is also balanced. Conclusions regarding SH may be different for buildings with better insulation as they have a higher storage efficiency. In addition, PRBC relies on predefined control rules which may not always be optimal. It should be explored whether advanced controls, such as model-predictive control (MPC), would lead to significant improvements regarding overall cost and emission savings.
Author Contributions: Regarding the methodology to evaluate the hourly average CO 2eq. intensity, conceptualization was done by L.G. and J.C.; methodology and software were handled by C.S. and J.C.; validation, formal analysis, investigation, data curation, and visualization were the work of S.S. and J.C.; writing and original draft preparation was done by J.C. Regarding the case study on demand response using the CO 2eq. intensity as a control signal, J.C. developed the building simulation model, implemented the control, ran the simulations, analyzed the data, visualized the results, and wrote the original draft of the article. Conceptualization and methodology were done by L.G. and J.C. All authors contributed to reviewing and editing the original article. The work was supervised by L.G.
Funding: This research received no external funding.

Acknowledgments:
The authors would like to acknowledge IEA EBC Annex 67 "Energy Flexible Buildings", IEA HPT Annex 49 "Design and Integration of Heat Pumps for nZEBs" as well as the Research Centre on Zero Emission Neighbourhoods in Smart Cities (FME ZEN). Sebastian Stinner gratefully acknowledges that his contribution was supported by a research grant from E.ON Stipendienfonds im Stifterverband für die Deutsche Wissenschaft (project number T0087/29896/17).

Conflicts of Interest:
The authors declare no conflict of interest. Appendix A Figure A1. Daily profiles for DHW use and internal heat gains from electrical appliances, occupancy and lighting [15].  Figure A1. Daily profiles for DHW use and internal heat gains from electrical appliances, occupancy and lighting [15].