A Review of Key Performance Indicators for Building Flexibility Quantiﬁcation to Support the Clean Energy Transition

: The transition to a sustainable society and a carbon-neutral economy by 2050 requires extensive deployment of renewable energy sources that, due to the aleatority and non-programmability of most of them, may seriously affect the stability of existing power grids. In this context, buildings are increasingly being seen as a potential source of energy ﬂexibility for the power grid. In literature, key performance indicators, allowing different aspects of the load management, are used to investigate buildings’ energy ﬂexibility. The paper reviews existing indicators developed in the context of theoretical, experimental and numerical studies on ﬂexible buildings, outlining the current status and the potential future perspective. Moreover, the paper brieﬂy reviews the range of grid services that ﬂexible buildings can provide to support the reliability of the electric power system which is potentially challenged by the increasing interconnection of distributed variable renewable generation.


Introduction
To achieve ambitious targets of a sustainable society by 2050 [1], various measures and pathways are being investigated by research communities. All parts of society and economic sectors will play a role in this transition, requiring a combination of economic, environmental and social challenges. In this context, the achievement of a carbon-neutral energy system with a high spread of renewable energy systems (RES) requires a paradigm shift in power systems [2,3].
Most of the current energy infrastructures have been designed to house large, centrally located, localized generation units that are managed to meet instantaneous energy demand. However, to facilitate the RES integration in the existing infrastructures, the flexibility of the power system must be increased, aiming to achieve the instant balance of temporal and spatial mismatches in a bi-directional decentralized system with a high penetration of smaller prosumers. Import and export of energy over the system boundaries, powerto-X technologies and energy storage technologies, as well as different demand response strategies, are examples of flexibility sources [4,5].
In this context, the building sector is a key enabler of future energy systems as it will help to facilitate a larger share of renewables, distributed supply and demand-side energy flexibility [6].
Although building design should be firstly based on the employment of passive design strategies to reduce energy requirements, implementation of energy efficient systems and adoption of RES to cover the building's energy demand, the successful building design should also take into account the flexibility of its energy systems. Future buildings should play a crucial role in transforming the energy markets, becoming interactive players in grid balancing [7][8][9].
Control strategies to deploy demand-side flexibility are crucial instruments to activate the energy flexibility of the buildings in order to improve grid interaction and load match, reduce energy demands, perform load shifting [10]. Several control strategies are reported in literature with the aim both of increasing demand shifting and offering solutions to use RES more efficiently [11].
The control strategies act upon certain control inputs' parameters, such as building envelope characteristics (e.g., active skin), climate properties, indoor temperature, occupancy and behavioral patterns, characteristics of the end-use equipment and their flexibility, load or generation profiles in the case of RES.
Moreover, future buildings can provide grid services and flexibility; thereby, they will be crucial players in the transition to a low-carbon energy system. Buildings can provide significant benefits to the grid through a combination of actions that reduce or adjust electricity consumption to avoid or reduce electricity system costs. They can supply flexibility services in different ways such as shifting of plug loads [12], utilization of thermal mass [13], adjustability of HVAC systems [14] and charging of electric vehicles [15]. This can enhance energy quality and security by offering faster responses to the changing levels of renewable generation or reducing transmission losses.
Despite the above-described potential and critical role in future energy grids, the role of buildings as active players in the grid is often neglected in definitions of low-or zeroenergy buildings, and undefined in relevant design standards. In this context, defining a methodology to assess and quantify the flexibility of a building is among the most important challenges of the research activities on this topic. A unique methodology to assess and quantify the building flexibility in literature is still lacking as a consequence of the different definitions of flexibility [16]. The experts participating in the International Energy Agency-Energy Buildings and Communities (IEA-EBC) Annex 67 defined the energy flexibility of a building as "the ability to manage its demand and generation according to local climate conditions, user needs and grid requirements". Moreover, it was stated that "Energy Flexibility of buildings will thus allow for demand-side management (DSM)/load control and thereby demand response based on the requirements of the surrounding energy networks" [17]. Other definitions of the flexibility of buildings reviewed in literature are listed in Table 1. Table 1. Some building energy flexibility definitions.

References
Paper Indexed Keywords Building Energy Flexibility Definitions [18] Electricity; power plant fleet optimization; renewable energy; flexibility; market design The capability to balance rapid changes in forecast errors and renewables generation within a power system. [19] Cogeneration; distributed multi-generation; electric heat pumps; flexibility; multi-energy systems; thermal storage The capability to react to price signals almost in real time. [20] Buildings; flexibility; demand response; optimal control; case study The ability to switch from a reference electric load profile in a certain time interval.
[21] Optimal control; model predictive control; black box modelling; grey box modelling The ability to adapt energy demand to follow the local energy generation. [22] Flexibility; heat pumps; thermal storage; cooling; demand-side management; smart grid The ability to modify energy consumption or generation in response to external signals.
[23] Demand flexibility; flexibility grid integration of the demand side; building energy simulations The ability to adapt dynamically the electrical power consumption patterns, either voluntary or mandatory, in response to external signals.
[24] Energy flexibility; demand response; flexibility function; smart building; flexibility index; smartness The ability to respond to an external signal. [25] Demand-side management; energy flexibility; heat storage; Heat conservation; thermal mass; radiator; underfloor heating The ability to shift the energy consumption from high price periods to low price periods. [27] Not reported The ability to shift the electric loads from peak to off-peak hours. [16] Energy flexible buildings; demand-side management; smart grid; load control; demand response The ability to shift electricity load without compromising users' comfort. [28] Load matching; grid interaction; net zero energy building; load management; self-generation self-consumption The ability to contribute positively to the context of a system with RES high share.
[29] Not reported The ability to respond to smart grids signals, price signals or to some users 'actions, and accordingly adjust generation, load and storage control strategies aiming to serve the building needs, the grid, or adjust to profitable market prices for energy imports or exports. [30] Cogeneration; flexibility; smart grids; thermal energy storage; district heating; demand-side management The ability to shift energy in time in order to have a better match between the on-site energy generation and the load.
[31] Energy flexibility; building cluster; energy efficiency; indicators; smart readiness indicator The capacity to react to forcing factors aiming to minimize CO 2 emissions and maximize the use of RESs. [32] Flexibility; storage capacity; thermal energy storage; building energy systems; renewable energy integration The energy that can be delivered by his energy systems (such as a combined heat and power system coupled to storage devices).
The building's flexibility is influenced by several factors, for example: from its physical characteristics, such as thermal mass and architectural layout; from its energy systems, such as ventilation, heating, and energy storage systems; from its control system; from the users' behavior and the thermal or visual comfort requirements and from many other boundary conditions, such as the climate conditions and its interaction with the energy infrastructures. Lund et al. [33] defined three main properties for the flexibility: time, energy and costs. All quantification methods and their corresponding performance indicators in literature have typically revolved around these three metrics. Reynders et al. [16], through a review of buildings energy flexibility definitions, stated that the reviewed studies focus on specific aspects or properties of energy flexibility, grouping the different areas of focus into five categories: energy infrastructure [34], electricity [22], costs [25], possibility of compromising other performances of the building (e.g., the impact on thermal comfort or on energy performance) [13] and interaction between the energy systems and the building [35].
Energy Flexibility represents a key issue to be addressed not only at a single level but also at a cluster level to achieve performance enhancement and cost optimization due the mutual collaboration among buildings and their generation, storage and consumption units [36,37]. At a district level, it can be considered not only the aggregation of individual buildings comprising the district, but also the distribution grids and the energy generation plants. To the best knowledge of the authors, most existing studies have been focused on the energy flexibility of individual buildings rather than clusters. Among the few studies regarding clusters, Vigna et al. [31,38] evaluated the flexibility of a four-building cluster, and Taniguchi et al. [39] focused at a neighborhood level on developing a bottom-up energy performance model to assess the energy flexibility of 5000 residential households. The energy flexibility potential on a large scale has the advantage of helping system operators to establish if it is financially worthwhile to provide flexibility services [40]. Moreover, within the cluster concept it is possible to obtain a decrease in the cost of electricity consumption, a larger load shift in time and a better improvement of the local use of renewable energy.
In literature, different approaches have been previously employed for the quantification of the flexibility of buildings. Key Performance Indicators (KPIs) provide the tools for measuring and managing progress for further learning and improvement. As a result, the KPI approach's functionality has made it one of the most popular and valuable approaches in the reviewed literature regarding the investigation of building flexibility. For example, this approach has been used to investigate the energy flexibility of case study buildings in the North America [41], South America [42], Asia [28,43] and Europe [28,44].
KPIs are indispensable for quantifying a building's energy flexibility and estimating how different features influence the sharing of renewable energies and the reduction of peaks of the energy loads. Indicators are useful to effectively show the energy flexibility concept, providing a common language between energy players. Moreover, the use of energy KPIs can contribute to determining the proper technologies for systems able to store energy and to improve buildings' load shifting potential [17]. Considering the explanations above, the present work contributes to the research question on the role of the flexible buildings on future energy systems by investigating the relevance and usefulness of KPIs already existing in the literature. In detail, an analysis of the current literature concerning existing indicators developed in the context of theoretical, experimental and numerical studies on flexible buildings is presented. In detail, although in the literature there are different groups of KPIs that address different issues related to buildings' performances (e.g., thermal or visual comfort [45], users' behavior [46], RES sizing [47], HVAC energy efficiency [48], etc.) and although very often some of these KPIs are used jointly to examine buildings' performances in a multidisciplinary way, in this paper only the KPIs that directly and explicitly take into account the issues of energy flexibility are investigated. In this context, the goal of the paper is to review different KPIs used to quantify the main aspects of building energy flexibility allowing the analysis and comparison of the strengths and weaknesses of each investigated KPI. This will also lead to the definition of the current literature gaps, suggesting the aspects to address in future research.
Finally, since by exploiting its flexibility, the built sector can participate in new markets providing grid services for sustainable and cost-effective energy supply, in order to establish if the investigated KPIs can be deployed in the evaluation and analysis of grid services, the paper provides a background on these and on the strategies to deliver them with flexible building loads.
This review is structured as follows: Section 2 reviews energy flexibility indicators from a building perspective, classified into: load matching indicators, grid interaction indicators and energy flexibility indicators. Section 3 describes grid services provided by flexible buildings. Discussion and final remarks are reported in Section 4.

Energy Flexibility from Buildings Perspective
From buildings' perspective, flexibility is crucial in the context of the goals of decarbonization, energy saving and high-RES integration, including thermal and electricity storage, to achieve the nZEB target. The large amount of information regarding building flexibility and its quantification can be easily dealt with through the use of KPIs. Despite several indicators concerning several aspects of energy flexibility being available in literature, the research regarding the flexibility and the methodologies to quantify it is still widely investigated (i.e., Annex 83 [49]). Reviewed KPIs are discussed together with their definition in the following subsections, while nomenclature and subscripts are reported at the end of the paper. In detail, the reviewed indicators were divided into three main groups: load matching (LM) indicators, grid interaction (GI) indicators and flexibility energy flexibility indicators. Although the LM and GI KPIs do not directly address energy flexibility, they have been included in this review because LM KPIs take into account the building flexibility in terms of on-site energy generation in response to the change of load, while GI KPIS take into account the flexibility in terms of interaction with the grid. In this context, all these KPIs allow for building a complete framework to assess and quantify the energy flexibility of buildings.
In literature, load matching and grid interaction indicators are not used to optimize the building flexibility [28,50,51], but they are often used to improve the control of the building's load. Usually, the building's flexibility is evaluated by comparing the behavior of a building to a reference case or by comparing different strategies for the same building [47]. In this context, the flexibility of a building is studied by results comparison. Although these indicators are not directly linked to the building's energy flexibility, these KPIs have been examined since they are crucial for investigating the coupled performance among the grid, RES and building and to assess the degree of success of grid control strategies, sizing or investment decisions. In fact, indicators for load match and grid interaction are considered relevant with time and research progress on the nearly zero energy building (nZEB) concept, providing a better understanding of the interplay between generation and demand [52,53]. Since such buildings play the dual role of being producers and consumers of energy, providing for the energy demand by coordinating on-site generation with energy imports from the utility grid, considerations about self-consumption are becoming more and more important, both at a design and operation level.

Load Matching Indicators
Load match indicators account building flexibility in terms of on-site energy generation in response to the change of load. In detail, they refer to how the on-site energy production compares with the building's energy demand. These indexes accounting at the same time this dual aspect could be more useful in the context of a common framework to assess and quantify the flexibility of buildings. In the research field, aiming at the developments of nZEBs, LM indicators may help in comparing different design alternatives [54]. Moreover, they could be useful in choosing the size of RES and energy storage systems or in optimizing control strategies.
The simplicity of their mathematical definition makes LM indicators a useful tool for a first performance evaluation. If calculated using high-time-resolution data, LM KPIs show in full the correlation between energy supply and on-site demand, illustrating hourly, daily and seasonal effects, the correspondence between load and generation, the production pattern of different renewable energy technologies and the effects of applied control strategies. However, without full knowledge of the features of the investigated energy systems, it cannot be concluded which are the optimal KPI values for the investigated systems.
Load match indicators reviewed from literature are reported in Table 2. Moreover, for each KPI, the table shows the main strengths or weaknesses, highlighted from the literature analysis.
The load cover factor (γ load , Equation (1)) is defined as the percentage of the electrical demand covered by on-site electricity generation. In periods with no on-site generation the load cover factor value is zero, while the highest values are reached when there is a coincidence between the profile shape of electricity load and self-generation [28,29]. On the other hand, the supply cover factor (γ supply , Equation (2)) is defined as the percentage of the on-site generation that is used by the building [28,29]. It is the complementary index of the load cover factor. These two KPIs are widely used in literature [44,55,56]. They are used to study different types of energy systems both at the single-building level and at the neighborhood level. For example, Salom et al. [28] use these KPIs to study zero energy residential buildings equipped with PV systems, while Tumminia et al. [44] analyzed an nZEB case study equipped with a grid-connected PV system, energy storage system and a programmable fuel cell. On the other hand, Baetens et al. [56] investigated the load match of a residential zero-energy neighborhood equipped with building integrated photovoltaic system. Moreover, they are mostly suited to evaluate control strategies aimed at decreasing grid dependence [43]. However, they have the disadvantage of to giving no direct information on net energy, consumption or supply, no information on peaks in power exchange and no information on connection capacity usage.
The loss of load probability (LOLP b , Equation (3)) is defined as the time share during which the local generation does not cover the building demand [28,29], and thus how often energy must be supplied by the grid. It is useful in order to evaluate different load control strategies in a building and when the aim is increasing the suitability of a distributed generation system for covering the local load profile decreasing the need to consume power from the grid. It can be achieved by controlling demand with or without the inclusion of a storage system or adjusting the local generation, for instance, by changing the orientation of PV panels, increasing generation during morning and evening peaks in power demand. As with the previous two KPIs, it has the disadvantage of showing no indication on net energy, consumption or generation, no information on peaks in power exchange or on use of capacity connection. Therefore, referring at the loss of load probability, a generation system could be oversized leading to higher peaks in supply [57]. The energy autonomy KPI (A b , Equation (6)) is the complementary index of the LOLP b index. It is defined as the fraction of the time when 100% of the load can be matched by on-site electricity generation.

KPI Definition Strengths (S)/Weaknesses (W)
Load cover factor [28,29] Percentage of the electrical demand covered by on-site electricity generation Supply cover factor [28,29] Percentage of the on-site generation that is used by the building Loss of load probability [28,29] Time share during which the building energy demand is not covered by the on-site energy generation Energy autonomy [28,29] It reports the time share during which the entire local load can be covered by on-site generation factor [58] Capacity of the local energy generation system for which the annual net exported energy is equal to zero divided by the capacity of the same system for which the economic value of annual import and export of electricity is the same MCF = C cost,balance C energy,balance (7) (S) Even if it is used regard to economic balance, it could also refer to the CO 2 emission or the primary energy consumption of the system. (S) It can be used in the sizing of generation systems.
(W) It is calculated using an annual time resolution. On the other hand, higher temporal resolution, such as hourly resolution, could provide more useful information.
On-site energy ratio [59] Ratio between energy supply from local renewable sources and energy demand (S) For its calculation it requires only the load and generation profiles.
(W) In case of multiple renewable energy sources, it does not take into account the different energy types separately.
The LOLP b and A b , indexes are a function of the time resolution used in the calculations. The time resolution based on the net exported to the grid is affected by the energy balance of the building. Due to the complexity of knowing in real time the changes in this balance, the LOLP b and A b , indexes could be an underestimated / overestimated in flexibility quantifications [44].
The mismatch compensation factor (MCF, Equation (7)), defined as capacity of the local energy generation system for which the annual net exported energy is equal to zero divided by the capacity of the same system for which the economic value of annual import and export of electricity is the same [58], allows accounting for the benefits, in terms of cost savings, due to the use of different control strategies. Moreover, it could be useful to calculate how much to increase the production unit, aiming to compensate for the influence of the mismatch on the electricity supply system outside the building. If the system that compensates for the mismatch is smaller than the system that gives a net zero energy balance, generated electricity is, on average, worth more than demanded electricity so the MCF value is >1. As an example, if MCF is 1.2, it means that the mismatch has a negative influence on the system and has to be compensated, i.e., by increasing the capacity of the PV installation by 20%.
For the deployment of RESs, which fluctuates on the time scale of minutes/hours, it is crucial to define flexibility indicators based on these time intervals. The mismatch compensation factor, defined on yearly base, is not useful from this point of view.
Finally, the on-site energy ratio (OER, Equation (8)) is defined as the ratio between energy supply from local renewable sources and energy demand [59]. This KPI, rather than considering only the generation of more exported energy versus its importation to the grid or individual buildings, emphasis shifting to the maximization of energy performance in a system-based approach. If OER has a value of 1 it means that, considering a net annual balance, the energy demand is completely covered by RES supply. A value higher than 1 implies that the annual energy demand is lower than the annual energy supply from local renewable energy sources. OER does not take into account the different energy types separately. It expresses the condition for which demand is covered by on-site production without accounting for the energy mismatch for each energy type.

Grid Interaction Indicators
Grid interaction indicators are used to measure how a building utilizes the grid connection [54]. As the load match indicators, these indicators are widely used in literature. However, in contrast to LM indicators that give an indication of the total amount of the exchanged energy with the grid, the GI indicators include also information about the quality of the energy exchange between the building and the grid [60]. Grid refers both to the physical utilization of the infrastructure and to the upstream energy system and market [61].
GI indicators can be used successfully in evaluating and designing the operation limits of the grid and in improving voltage regulation in the case of high RES penetration [62]. Some KPIs require only the generation and load profiles, while others involve in the calculation also additional data (e.g., energy market prices). Table 3 shows the grid interaction indicators reviewed from literature concerning the matching of grid export and grid stability and quality requirements [63].
The grid interaction index (GI I, Equation (9)) is defined as the variability of the exchanged energy between the building and the grid within a year, normalized for the maximum absolute value [29]. This KPI accounts the variation over time of the energy exchange of the building with the grid but not the amount of grid electricity needed. It describes the average interaction between the building and the grid, showing how the building works in synergy with the grid. Moreover, it is useful for expressing the variation over time of the energy exchange between the grid and a building.

KPI Definition Strengths (S)/Weaknesses (W)
Grid interaction index [29] Standard deviation of the net exported energy within a year GI I = STD ne(t) max|ne(t)| (9) (S) It describes the average grid stress and it can be used to analyze the variation of the electricity interchange between a building and the grid.
No grid interaction probability [29] Probability that the building is acting autonomously of the grid Capacity factor [29] Ratio between the energy exchanged between the building and the grid and the energy exchanged that would have occurred at nominal connection capacity Connection capacity credit [28,29] Percentage of grid connection capacity that could be saved compared to a reference case (building with no local energy supply) (S) Decreasing this indicator could be a way to decrease the grid impact.
(W) It does not give any information neither on net energy exchange, consumption or supply nor on match between load and generation.
One percent peak power [64] Mean power of the one percent highest quarter hourly peaks (S) They are useful to monitor power peaks. (S) They could be used to evaluate controls, aimed at limiting peaks, thereby limiting grid losses and facilitating keeping the grid within operational limits. (W) They do not to give any information neither on net energy exchange, consumption or supply nor on match between load and generation.
Peaks above limit [64] Percentage of time during that net exported energy exceeds a certain limit Absolute Grid Support Coefficient [61] A measure of how a consumer's electricity consumption profile matches the availability of electricity assessed using a grid bases reference quantity (S) They are metrics to 'weight" the electricity consumption profile with a time-resolved reference quantity expressing the availability of electricity in the public grid. (S) These metrics are useful for the grid support of shiftable electricity producers or consumers. (S) The grid signals could also refer to the CO 2 emission or the primary energy consumption. (S) They allow an evaluation of the grid impact of a building from the energy system perspective.
(W) They require a grid signal per kWh for time-steps t so they are not suitable for design analysis, but they are useful for ex-post performance considerations.
Relative Grid Support Coefficient [61] GSC rel = 200 * GSC abs (lowerPB)−GSC abs (achieved) The no grid interaction probability (P E=0 , Equation (10)) is defined as the probability that the building is acting autonomously of the grid [29]. However, it describes the interaction between the building and the grid without any information about the magnitude of the exchanged power with the grid.
The capacity factor (CF b , Equation (11)) is defined as total energy exchange with the grid divided by the exchange that would have occurred at nominal connection capacity [28]. This KPI has the advantage of accounting for energy exchange with the grid, concurrence of load and generation and information on use of connection capacity. In contrast, it shows no indication about the on-site generation and consumption, or indication of peaks in power exchange with the grid.
The connection capacity credit (E c , Equation (12)) is defined as the percentage of grid connection capacity that could be saved compared to a reference case (building with no local energy supply) [28,29]. It is useful to monitor the highest power peak when a specific limit should never be exceeded. Positive values of E c indicate a saving potential; negative values a need to increase the grid connection capacity with respect to the reference case. Moreover, decreasing this indicator could be a way to decrease the grid impact. A limit in the use of this indicator is that when it decreases it does not show if peaks are exceeded, so another indicator should be used to monitor peaks.
The one percent peak power (OPP, Equation (14)) is defined as the mean power of the one percent highest quarter hourly peaks [64]. In detail, given loads measured at regular intervals one may sort them by decreasing values. This KPI is then the k th of these values, with k equal to 1% of the measured values. Values of the indicator can only be compared if the measurement interval is the same. Since this indicator is useful to monitor power peaks, it could be used to evaluate controls aimed at limiting them, thereby limiting grid losses and facilitating keeping the grid within operational limits. It has the disadvantage of not giving any information either on net energy exchange, consumption or supply or on matches between load and generation.
The absolute grid support coefficient (GSC abs , Equation (16)) weights a time-resolved electricity consumption profile with a time-resolved reference quantity (e.g., the residual load) [61]. It is used to evaluate the grid impact either of the heat supply system or the building (energy system view). From its definitions emerges that GSC abs cannot be calculated for an instant of time, but a period consisting of at least two-time steps. As an example of the meaning of this KPI, a value of GSC abs of 0.9 means that electricity is, on average, consumed when the residual load assumes 90% of its mean value in the evaluation period. This KPI indicates whether additional loads occur at times with a relative electricity demand above or below average. Moreover, it allows an evaluation of the grid impact of a building from the energy system perspective. This metric can be used to analyze the electricity consumption profiles of energy generators, such as heat pumps, since load shifting is typically restricted to a few hours. On the other hand, the relative grid support coefficient (GSC rel , Equation (18)) reports the achieved value of the GSC abs to the worst and best possible potential boundaries on a scale of −100 to 100. In particular, the lower potential boundaries are referred to the least favorable grid conditions and the upper ones to the most favorable grid conditions. The grid support coefficients require a grid signal so they are not suitable for design analysis, but they are useful for ex-post performance considerations. They are referred to mean conditions of the grid so there is a limitation in their use for extreme situations, e.g., when grid operation is jeopardized.
Finally, the equivalent hours of storage (N hS , Equation (19)) corresponds to the storage capacity expressed in hours. This index should be explored as potential indicator of flexibility in buildings with storage system.

Energy Flexibility Indicators
These indicators focused on flexibility quantification with respect to energy or power can be shifted as response to external signals in the power grid context. They can be used to investigate the building's reaction to external signals (e.g., electricity price) within the context of the power grid or to analyze the physical characteristics of a building's energy systems (e.g., storage capacity). Moreover, since they are often price-based, they can report whether energy is withdrawn or fed into the grid during low or high price periods.
Due to their generic structure, these KPIs can be applied to different building typologies, climates and energy systems.
Whilst the reviewed KPIs show the available energy flexibility of the building and its energy systems, they don't capture the cost of providing it [65]. An economic index might be useful to allow a financial contract to be settled between users and network operators. Table 4 shows the energy flexibility KPIs reviewed from literature.
The flexibility factor (FF, Equation (20)) is defined as the ability to shift energy use from periods with high energy prices to periods with low energy prices [25]. It gives an indication of when energy is consumed. In particular, if no demand load occurs during low price time its value is −1, if no demand load occurs during high price time its value is 1 and if demand load is similar during both price time its value is 0. It can be used to quantify the energy can be shifted in terms of heat stored by thermal mass.
The flexibility index (FI, Equation (21)) is used in literature to quantify the flexibility in terms of reduction of the heating energy demand not covered by RES [38]. For example, in [38] the authors use this KPI to assess the energy flexibility of a cluster of buildings connected to a district heating system.
The procurements cost avoided flexibility factor (FF PC , Equation (24)) is used to quantify the building flexibility in terms of procurement costs avoided (cost savings) [66]. The minimum value 0 is reached when the electricity required is used at the time with the highest price while the maximum value 1 is achieved at the time with the lowest price. Although the authors use this KPI to evaluate the ability to shift the heat pump electric load, it can be used to investigate the flexibility of any other electrical equipment.
The volume shifted flexibility factor (FF VS , Equation (25)) is used to account for the flexibility in terms of energy shifted compared to a reference profile [66]. It can be used to investigate the flexibility of any other electrical equipment.
The available structure storage capacity (C ADR , Equation (26)) is defined as the amount of heat that can be added to the thermal mass of a building, in the timeframe of an active demand response (ADR) event, without jeopardizing thermal comfort. Moreover, in [61] the same authors defined the storage efficiency (η ADR , Equation (27)) as the fraction of heat that can be stored during an ADR event in order to be used subsequently to reduce the heating power needed to maintain thermal comfort. Although the authors use these indicators to investigate the heat that can be accumulated in the thermal mass of buildings, they are also useful for any other type of thermal storage systems, as proposed by Oldewurtel et al. [67]. As these KPIs refer only to thermal power they cannot be directly used by grid operators [68]. Table 4. Energy flexibility indicators.

KPI Definition Strengths (S)/Weaknesses (W)
Flexibility Factor [25] Ability to shift the energy use during time with high prices to low energy price periods

Flexibility
Index [38] Ability of the building to minimize the heating energy usage during the absence of renewable energy sources production and maximize it during periods of available renewable production

Procurements
Cost avoided Flexibility Factor [66] Ability to shift the heat pump electric load from peak to off-peak hours in terms of electricity price FF PC = PC max −PC PC max −PC min (24) (S) It takes into account the operational cost savings. (S) Although, the authors use this KPI to evaluate the ability to shift the heat pump electric load, it can be used to investigate the flexibility of any other electrical equipment.
Volume Shifted Flexibility Factor [66] Ability to shift the heat pump electric load from peak to off-peak hours in terms of energy shifted compared to a reference profile (S) It can be used to investigate the flexibility of any other electrical equipment.
Available structure storage capacity [69] Amount of heat can be added to the mass of a building, over time of an ADR event It takes into account climate condition, occupant behavior and HVAC system. (S) It is not useful only for thermal mass but also for every kind of storage system. Storage efficiency [69] Fraction of heat that can be stored in the timeframe of an ADR event in order to be used subsequently aiming to reduce the heating power needed Available electrical energy flexibility efficiency [70] It shows the storage efficiency based on whether upward or downward flexibility is provided Flexible energy efficiency [65] It measures of how much energy was shifted taking into account the rebound effect (S) It takes into account the rebounds effects. (S) Since any kind of rebound behavior is seen as less than ideal, it gives priority to the grid operator's point of view.
Finally, Kathirgamanathan et al. [65] defined the flexible energy efficiency KPI (η f , Equation (31)) as a measure of how much energy can be shifted relative to a rebound effect. Since any kind of rebound behaviour is seen as less than ideal, it gives priority to the grid operator's point of view.

Energy Flexibility from Grid Service Perspective
Building energy flexibility can be exploited to respond to the needs of energy networks [71].
At the building level, demand-side management could enable different grid services, as reported in Figure 1. In Section 2 the analysis of KPIs shows how the building flexibility to provide these grid services is affected by several aspects, such as on-site energy generation systems, thermal storage systems, electric storage systems, thermal mass of the building, building envelope characteristics, control strategies, and energy management strategies.
A definition of the grid services reported in the Figure 1 follows: • frequency regulation: control of the active power supply in order to contribute in regulating the grid frequency; • voltage support: control of the reactive power supply in order to contribute in regulating the grid voltage; • peak shaving: modulation of the active power delivered/adsorbed to tone down high rate of power due to the renewables in the power network; • renewable balance: compensation of renewable energy sources fluctuations; • black-start: ability to re-start the power network or portions of power networks; • intentional islanding: ability to operate in off-grid configuration; • self-consumption: control of the active power and of the loads, to maximize the use of the local renewable energy source, minimizing the grid interaction; • demand response: control of DSM and storage to perform load profiles, based on programs coming from signals of system operators.
Reductions in peak energy demand help avoid investments in infrastructure that would have been needed otherwise. Moreover, the large-scale use of distributed energy storage systems would allow buildings to provide energy flexibility and at the same time would increase the network resilience. This aspect could be crucial for town planning and urban design. The increasing share of renewable energy sources together with an extensive electrification of the energy demand are imposing new challenges to the management of energy systems due to the high stress of the electrical grid. Flexible buildings can contribute to reducing grid stress, creating a more resilient and reliable grid from with lowering costs for consumers. To flatten their demand curve, consumers are encouraged to use less energy during peak hours and to move the time of energy use to off-peak times such as night [72,73]. In this way, the energy system is improved at the side of the end-user in terms of consumption and cost effectiveness [74]. In this context, flexible buildings could benefit the operation of the electric grid and owners and occupants simultaneously, thus benefiting utilities and grid operators, customers and society at-large [75]. From the perspective of building owners, they can offer customer cost savings through more effective reduction in peak loads, taking advantage of utility time-of-use rates and additional revenues from demand response program participation while also enhancing building performance and occupant comfort.
A grid service provided depends, for example, on the type of service offered and its timing, the location within the grid and the avoided cost compared to a less expensive alternative resource providing a comparable service.
For grid operators, in order to manage grid services, certain features, such as the duration of the service, the response time and the frequency of events [76], are of paramount importance. Therefore, from grid operators' point of view, the flexibility KPIs should allow the taking into account of these aspects.
The KPIs should provide information on some key aspects of flexibility, such as: • quantity and timing of demand flexibility provided to the grid; • quality of demand flexibility provided (e.g., time required to achieve the desired change in demand); • impacts on users and building non-energy services (e.g., occupants' comfort).

Discussion and Final Remarks
The design and the control of nZEBs is challenging in many ways, due to the high and complex performance required in terms of energy efficiency, economic feasibility, environmental sustainability and occupant satisfaction. However, the successful design of any type of building, and even more so of in the case nZEBs, should also take into account the energy flexibility of its energy systems, the interaction with the infrastructure to which the building will be connected and the provision of services to this infrastructure.
Benefits in terms of cost savings for building owners and benefits in terms of recognition of how much generation for demand response can be activated for grid operators are among the advantages in the utilization of buildings' flexibility. The quantification of energy flexibility is a complex process, dealing with the requirements both of the costumers and of the grid operators. However, there is still a lack between the definition of building flexibility and its quantification. This dissimilarity among the two aspects gives rise to a diversity of interpretations regarding the building flexibility concept.
In this context, this paper reviews and compares different building performance indicators existing in literature, developed in the context of the demand-side management strategies to quantify the main aspects of building flexibility. In detail, after analyzing a total of 28 indicators, they were divided into three categories as follows: The load matching indicators are useful to study and compare different types of energy systems based on the coincidence between the profile shape of electricity load and selfgeneration or to evaluate different load control strategies. Most of these indicators have the disadvantage showoff not showing indication of net energy, consumption or generation, and no information on peaks in power exchange or on use of capacity connection. A further disadvantage is the mathematical dependence from the time of resolution affected by the energy balance of the building. Due to the complexity of knowing, in real time, the changes in this balance, with the use of these indicators flexibility quantification could be underestimated or overestimated.
The grid interaction indicators are useful for expressing the variation over time of the energy exchange between the grid and a building and to evaluate control strategies to limit peaks in power in order to limit grid losses and facilitate keeping the grid within operational limits. As a further advantage, these indicators allow evaluation of the grid impact from the energy system perspective, including also information about the quality of the energy exchange between the building and the grid. Most of these indicators have the disadvantage of not giving any information either on net energy exchange, consumption or supply or on matches between load and generation.
The energy flexibility indicators are useful for evaluating how the energy demand is distributed as response to a demand response event or a grid external signal. They allow investigation of the energy flexibility on the basis of the potential flexibility, going from individual energy systems' components (HVAC, CHP, HPs or other appliances). They are widely used in the context of the storage technologies whose implementation is among the most developed DSM options to provide building flexibility. These indicators depend on several parameters, such as the physical/technological properties of the building, flexibility control strategies implemented and climate conditions. As a consequence, it is more difficult to compare different buildings based on their use. A comparison it is possible or among energy flexibility systems and dynamic strategies used in the same building or among similar buildings with the same climate conditions. The strong dependency from the climate conditions of the energy indicators is currently the strongest limitation in their utilization.
The research allowed the analysis and comparison of the strengths and weaknesses of each investigated KPI. On the other hand, the KPI review also led to highlighting some of the current literature gaps. For example, one of the research gaps identified concerns the limited availability of real monitored data used to calculate these KPIs. Moreover, whilst the reviewed KPIs show the available energy flexibility of the building and its energy systems, they do not capture the cost of providing it. In this context, an economic KPI might be useful to allow a financial contract to be settled between users and network operators.
The study also pointed out that all the KPIs examined take into account energy flexibility only on the side of the buildings. In particular, although DSM strategies are already widely used to reduce buildings' energy consumption and increase their energy efficiency [34,37], in future they can be used to optimize the interaction between the buildings and the grid, opening up new market opportunities. In this context there is also a need for metrics and indicators to assess demand flexibility performance for grid services.
From the point of view of grid operators, the flexibility KPIs should be those related to the provision of services, which make it possible to take into account the duration of the service, the response time, the frequency of events and other requirements, for example, in a similar way to the monitoring of battery energy storage systems' state of charge and identifying the energy of flexible buildings and the amount of energy that they can exchange with the grid, both by feeding energy and withdrawing it (a sort of dynamic state of charge of buildings). This indicator could lead to an improvement of the interactions between the buildings and the power grids.
Metrics beyond the simple quantity of any impact may become increasingly important, due to the fact that the flexibility of building demand will become more commonly implemented and buildings will provide more ancillary services. For example, the grid owner may require as services a load reduction within a specified time frame or with a specified response time, the duration of the load change, or the level of reliability or persistence as the percentage of time available in one year. Therefore, new KPIs may include metrics that show the quality of demand flexibility provided by a building as a grid service.
In this context, the KPIs should provide information such as: • realization rate: fraction of the expected reduction in load reduction or shift and energy generation that the building is able to provide in a given period of time; • compliance rate: how constantly the building provides the expected network services; • technical feasibility: acceptable range of voltage and frequency support.
To conclude, the research has highlighted that there is an opportunity for developing new KPIs to address the challenges within the reviewed KPIs. In addition, future works will be undertaken to test the performance of these indicators on real case studies. Funding: This research received no external funding.

Conflicts of Interest:
All authors declare no conflicts of interest.

A b
Energy autonomy C ADR Available structure storage capacity C cost,balance Capacity of the local energy generation system for which the annual net exported energy is equal to zero C energy,balance Capacity of renewable installation for which the cost of annual export and import of electricity is the same CF b Capacity factor DR Sizing rate DSM Demand-side management d(t) Delivered energy E Shifted energy