Active Participation of Buildings in the Energy Networks: Dynamic/Operational Models and Control Challenges

: New advances in small-scale generation and consumption technologies have shifted conventional buildings’ functionality towards energy-efﬁcient active buildings (ABs). Such developments drew the attention of researchers all around the world, resulting in a variety of publications, including several review papers. This study conducts a systematic literature review so as to analyse the concepts/factors enabling active participation of buildings in the energy networks. To do so, a relatively large number of publications devoted to the subject are identiﬁed, introducing the taxonomy of control and optimisation methods for the ABs. Then, a study selection methodology is proposed to nominate potential literature that has investigated the role of ABs in the energy networks. The modelling approaches in enabling ﬂexible ABs are identiﬁed, while the potential challenges have been highlighted. Furthermore, the citation network of included papers is illustrated by Gephi software and analysed using “ForceAtlas2” and “Yifan Hu Proportional” algorithms so as to analyse the insights and possibilities for future developments. The survey results provide a clear answer to the research question around the potential ﬂexibility that can be offered by ABs to the energy grids, and highlights possible prospective research plans, serving as a guide to research and industry.


Introduction
Increasing worldwide population, and changing patterns of energy use, are creating substantial challenges for the energy system operators.On the one hand, it is essential to provide people with their energy needs.On the other hand, increasing generation capacity results in more environmental pollution and requires more investment costs.In this regard, a precise plan is essential to reduce the need for more generation investment, while satisfying consumption criteria of consumers.Among the available plans, the management of demand-side consumption patterns have been regarded as a viable solution.This paradigm shift has changed the viewpoints towards the role of buildings in the energy networks.As the end-users of the energy networks, buildings are responsible for 30% of the global energy consumption, excluding the construction industry, which consumes 6% of total energy [1].At the same time, the proportion of carbon dioxide (CO 2 ) emission caused by the building sector is about 38% worldwide [1].These figures clearly indicate potential needs for enabling active participation of buildings in the energy network.
The flexibility in the buildings side can be enabled by adding small-scale generation [2] and/or managing their demand [3].The generation assets, meanwhile, should not impose environmental pollution and comply with the current trends in the decarbonization of energy networks.Thanks to their potential in providing clean energy with almost zero emission [4], the building occupants can benefit from renewable energy sources (RESs) to cover some of their energy needs.The variability of RESs, however, is a considerable issue.A viable solution for dealing with such variability is employing the battery energy storage system (BESS), which is one of the most efficient technologies that can increase the penetration of RESs [5].Therefore, optimal management of RESs and different storage technologies, BESS, and thermal energy storage for instance, can create flexibility in the building side [6].Further flexibility in the buildings can be enabled by optimal management of their consumption, which is achieved by controlling the operation of various house appliances [7].
Application of the aforementioned programs in the buildings sector, nonetheless, is subject to the preferences of buildings' occupants.Although people's lifestyle can play a decisive role in energy usage improvement, most building occupants find it difficult to change their behaviour plan [8].Therefore, control and optimisation methodologies which investigate flexibility in buildings should be adopted for operational strategies which concern occupants' comfort [9].These strategies could be applied to the new forms of technologies, storage units, photovoltaic (PV) generation, and wind turbines, for instance, or can modify the consumption pattern of household appliances, taking into account different applications of demand-side response (DSR).
Due to the importance of flexibility in buildings, a wide variety of research works have been conducted to cover various aspects, such as communication, operation, and data transfer, engaging researchers with various fields of study worldwide, e.g., civil engineering, computer science, sustainable engineering, mechanical and energy engineering, and electrical engineering.Consequently, several literature reviews have been published to emphasise the current potentials and future possibilities.Table 1 summarises the main highlights of available review papers in various fields.As can be seen in this table, different concepts, applications, and methodologies related to the buildings have been reviewed in the literature.However, a systematic literature review that explores the control and optimisation methods for enabling the flexibility of buildings in the energy networks, while concerning building or/and the main network operational criteria/dynamics is lacking in the literature.The main research questions of these studies are formed based on datadriven methods.Although the importance of data-driven methods cannot be denied, it is essential to concern the dynamics and operational criteria that affect the performance of buildings in the energy networks.

Ref. Main Highlight(s) Year
The aim of this survey is to investigate the analytical concepts in control and optimisation of active buildings (ABs) that enable/affect them as a potential service provider for the energy networks.Conceptually, AB refers to the grid integrated buildings that can exchange energy and information with the main network(s), efficiently, while they can provide services for the grid(s) [2].Accordingly, a wide range of publications related to the control and optimisation of ABs in the energy networks are browsed.Then, a review methodology based on the PRISMA checklist [29] is introduced so as to identify and evaluate a specific number of related research works.The selected papers are evaluated through a concept-based framework to analyse the current issues of ABs, and the way that a single building or cluster of buildings can communicate effectively together or/and with the utility grid(s), focusing on the challenges that can be brought about by this integration.A citation network overview is provided by Gephi software and analysed using "ForceAtlas2" and "Yifan Hu Proportional" algorithms so as to discuss and explore the future challenges in the area.Therefore, this study could be a stepping stone for research and industry to utilise the available knowledge of flexibility in ABs.In brief, this systematic review tries to investigate the answers to the following question: What are the flexibility approaches in buildings for providing various grid services?Furthermore, what are the main challenges?
The content of this paper is organised in five sections: Section 2 explains the research methodology.Section 3 presents the results.The citation network overview is provided and analysed in Section 4. Discussion and future challenges are given in Section 5. Finally, Section 6 concludes the study.

Review Methodology
A systematic literature review should aim at identifying, evaluating, and interpreting specific issues in a particular field of study [30].In this study, a systematic review is carried out so as to accelerate the development of a discipline, through investigating the role of ABs in the energy networks.The available databases have been browsed and an architecture is proposed for selecting the potential literature to be analysed in details.This review process follows the PRISMA checklist [29].The search strategy and study selection has been defined in the following subsections.

Search Strategy
The key-terms, related to the subject area and review question are used for searching available research in different databases.The following search terms have been used: "smart/active building/home", "nanogrid", "energy service", "application for the network", "virtual power plant", "review", "prosumer", "sustainable/smart cities", "electricity/heat/cooling consumption", " emission", "operation", "flexibility", "optimisation and control", and "energy management".It is noteworthy that the mentioned keywords are used in various combinations.
Furthermore, the methodology of [31], known as backward and forward search, is used in some cases; to further identify the papers which were recognised as high quality publications.Several related keywords are selected, and the search has been conducted based on them; then, the key-terms that have not resulted in more related materials are removed and search re-started with new terms.

Eligibility Criteria
Eligibility criteria are introduced in this study for selecting the final research works for inclusion in the review.Based on such criteria, a framework is suggested for study selection in the review, shown in Figure 1.The first round enquiry results in selecting all available publications based on the search strategy.These studies are evaluated by three subsequent rounds, at which some articles are extracted due to the designed filters for each round.The extracting process starts from the second round, in which the general criteria are applied to total publications.At first, the language of all manuscripts is evaluated; then, in the next level, the extraction is continued by screening the title of research works.The third round screens the title and abstract of the papers, while in a more precise process, round four screens the whole text of the papers that are included in this stage.This process is followed step-by-step, until the fifth round at which the total included papers have been classified.

Classification and Research Analysis
For the classification process, different perspectives are investigated for the available research works.Then, the included studies are evaluated according to their concepts and approaches, and gaps are identified, to show possible pathways for prospective research.In-depth review is carried out to cover all required classification data, such as: journal, year of publication, aims and objectives, model, test systems, solver, results, and references.
Finally, the quality and potential of selected publications have been illustrated in Gephi software, separately.

Results
The mentioned study selection criteria have been applied to all research works.446 publications have been selected in the first enquiry, consisting of 325 journal papers, 10 books, 101 conference papers, and 10 grey literature such as PhD thesis and project reports.Additionally, 45 review papers have been extracted after the first search, of which 26 papers have been removed based on simple criteria of the second round in Figure 1, whereas the remaining ones are summarised in Table 1.
The titles of all publications have been screened in the second round, resulting in the exclusion of 186 cases by different measures.The summary of the first and second review process is given in Table 2.The main factor for extracting such papers in the second level is the fourth criterion, in which the publications that were generally irrelevant to the main topic of the survey have been removed.It is worth mentioning that the main reason for applying the year limit is the recognition that the key developments have taken place in building technologies over the last decade.Consequently, the publications before the year 2010 have been removed in this step.Meanwhile, it is notable that only a small number of papers have been published before 2010, demonstrating that the last decade could be considered as the emergence of the AB era [14].* Detail of each abbreviation can be found in Figure 1.
A total of 208 papers have progressed to the third round, of which 81 papers were removed by screening their title and abstract.During the extraction process, 32 publications have been removed since they mainly focused on other concepts in the AB; 35 research works have been deleted since the operation of AB (either autonomous or grid-connected) was not evident in their study description; the energy conservation/consumption criterion is another filter for extraction of 14 publications.The summary of this level is given in Table 3.The fourth round of the evaluation process was more critical since all parts of the papers have been analysed.To do so, the included papers in this level have been evaluated by various conceptual measures.In the first criterion, the publications that were presented by the same authors and were similar in methodology have been removed.Then, the papers that were mainly focused on the theory of AB have been excluded, while the experimental papers have been removed since they fail to comply with the research question, and their authors mainly investigate the technical aspects.The research works that considered flexibility from a grid viewpoint have not been considered for the next level.Since the evaluation of building operation requires detailed information, those papers that have not provided enough detail on this issue have been removed.The control and optimisation criteria were another important factor.The papers that have not focused on the operation of an AB and its energy optimisation have been excluded in this level.In the final level of study extraction, the papers that marginally covered the research question have been removed.
Finally, in the fifth round, the included papers have been classified.Overall, 54 papers are included in the final round and processed from different viewpoints, based on the concept-based survey.The included papers are analysed in two dependent phases.In the first phase, the selected papers are analysed by various concepts, while the second phase of analysis presented a citation network so as to organise various concept-based clusters of the first phase and highlight the future investigation paths.In the following, a general overview of the selected papers is given; then, the main concept of flexibility is discussed based on the system structures and building assets enabling flexibility.Finally, the dynamic/operational modelling of building-to-grid integration is investigated, followed by the major challenges in enabling building-to-grid services.

General Overview of Selected Articles
Figure 2 illustrates the rate of interest in the control and optimisation of AB between years 2010 and 2021.Note that since this review was undertaken in the first months of 2021, this year is considered as a partial year.It is evident from this figure that the AB integration with the energy grids is rising in popularity, especially after the year 2017, with almost 74% of publication among total selected papers occurring in this period.A wide range of terms have been utilised to distinguish the ABs from the conventional passive ones.For example, in [32], the term "nanogrid" has been used, while "smart building" and "smart home" are other popular terms that have been widely used separately [33,34], or interchangeably [35].Overall, 72% of selected papers either used "smart building" or "smart home".In a different terminology, Borou et al. [36] introduced the term "domotic home", meaning "automation of the various facilities of the house and the application of automation techniques for the comfort and security of its dwellers".The main keyword in the majority of these papers is the term "smart", which has been utilised with different building types such as "commercial" [37], and "office" [38].
Although the term "smart" is a suitable keyword for identifying the new buildings from the conventional ones, it cannot clearly show the role of buildings and can misinterpret the application.Therefore, this study utilises the term "Active Building (AB)" to highlight the role of buildings in the energy network, which means that they can actively exchange energy and information with the main grid.

System Structure and Flexibility Services
The overview of selected articles shows that two structures have been utilised to integrate ABs into the grid.These structures are shown in Figure 3.The first group (Figure 3a) mainly focused on the operation and energy management of the buildings.In this framework, different small-scale generation assets (e.g., PV and CHP units) are considered along with different controllable appliances (e.g., washing machine, and dishwasher) for the ABs, while they are able to send/receive energy and information to/from grid(s).The grid structure has been neglected in this type of architecture and the main focus is on the energy management of building(s).Furthermore, the HVAC loads are mainly concerned with heat demand (without consideration for temperature set points) in this group.This layout has been utilised by 81.5% (e.g., references [39][40][41]) of selected studies.This group will be referred as "Building-Oriented Structure" in the rest of this paper.The second architecture (Figure 3b), which accounts for 18.5% of selected publications, has mainly focused on a grid that aggregates the different types of loads including AB loads.In the majority of articles in this category, an AB [42] or a cluster of buildings (CoBs) [34] has been connected to the distribution network.However, references [33,43] neglected the distribution network and connected the CoBs to the transmission system.The on-site capacity of ABs has been neglected, and the HVAC loads are the only controllable assets in this category.This group will be referred to as "Grid-Tied Structure".In both structures, the main goal is to analyse different flexibility services that could be enabled by the ABs. Figure 4 shows various flexibility services that could be provided for the grid by ABs based on the selected articles.As can be seen in this figure, regardless of economic benefits for the ABs, which is mainly observed in energy bills, these units can provide several services for the grid.The major point in this figure is economic advantages, which has been investigated in the operational [44] and investment costs of the grid [45].This major advantage of building flexibility is achieved by energy exchange between the grid and ABs.The other services have mainly focused on the technical characteristics of the grid such as frequency regulation and other ancillary services.The mathematical formulation for enabling each type of services will be explained in Section 3.3.1.

Reactive power support
Frequency regulation AB Flexibility Services The building flexibility services can be divided into two groups: (a) slow services, which are enabled through building thermal capacity and can affect the operational cost of the grid as a slow DSR, and (b) fast services, which can provide both technical and economical services for the grid.Enabling the flexibility in the latter group can be done through controlling various AB assets.Table 4 summarises the main technologies that have been utilised to actualise flexibility in the ABs.The internal AB components are mainly supervised by a controller that optimises the energy transaction based on the available data transfer.According to Table 4, the means of flexibility based on the technology is mainly enabled through controlling demand, especially those which have considered large-scale integration of ABs into the grid.This table also shows the importance of storage devices in enabling different types of flexibility.However, the potential of on-site generation capacity of ABs cannot be neglected.They can provide more flexibility and postpone the need for new generation investments [45].The introduced structures, however, can be improved in several ways.With regard to technologies, integration of the electrical network and other structures (e.g., transport system) can bring about more flexibility in the AB side.Furthermore, more research can be conducted on the thermal energy management, which requires more investigation on the effects of thermal energy storage, while enabling the CHP units as a linking technology between different forms of energy (e.g., cooling, heating, and electricity) for improving quality measures.With regard to the energy and data transaction, the ABs can form a cluster, which enables the energy and information exchange between these units, locally.Such CoBs can co-operate with other communities and even provide service for the grid.
Thus, this study introduces the structure illustrated in Figure 5 that shows the energy transaction between CoBs together, while highlighting the exchange of energy with the utility grid.

Dynamic Modelling Approaches for Flexible ABs
Based on their structure, the flexibility in ABs is investigated by two different approaches.In the building-oriented structures (i.e., Figure 3a), the main focus is on the controlling of different assets and tasks.The grid-tied structures (i.e., Figure 3b), however, focused on AB behaviour in the grid.According to [42], three modelling approaches can be utilised for investigating the AB behaviour, namely, data-driven models, high fidelity physical formulation, and thermodynamic models.While the first group provides good operation data, they fail in giving accurate results outside the trained set.Furthermore, the size and complexity of physical models is a stumbling block, regardless of their accuracy, especially in real-time methods, which require reliable and frequent processing of the model in a short period of time.For example, in [85], a detailed model is presented for investigating thermal dynamics of a buildings and the way it can interact with various storage devises.Nevertheless, the high processing time is the main disadvantage of this model.Therefore, the thermodynamic models enjoy a considerable popularity among the literature thanks to their simplified performance and accurate evaluation of system states.This section discusses the system dynamics, operation mode, and control variables which are three important concepts that define the flexibility of ABs in the modelling approaches.

System Dynamics
In order to analyse the integration of ABs into the energy grids, it is of utmost importance to build a dynamic model for both sides.The model should cover vital perspectives of energy transactions, with consideration for important constraints that limit such interactive energy scheduling.Such mathematical models are mainly assembled around one or a set of objective functions.The outcome of this optimisation problem defines the decision variables that control the system elements.As aforementioned, the modelling approaches of flexible ABs can be discussed based on their structure.The building-oriented models (i.e., Figure 3a) mainly focus on the operational characteristics, while grid-tied models (i.e., Figure 3b) are concerning AB and the grid dynamics simultaneously.
The building-oriented operational models mainly proposed an optimisation problem that considered flexibility in the AB tasks (depending on the type of building) and smallscale generation units such as roof-top PVs.In the selected papers (e.g., [35,46]), the AB demand and generation has been modelled as follows: where constraint (1) is mainly used for controlling the AB tasks based on their operation (i.e., cooking, washing, heating, etc.).By optimally controlling the on/off status of each task (i.e., χ Ap i,t ) at time period t, the controller can create flexibility in each AB's load.The optimal load of each AB (i.e., P AB t ) can be obtained in (2) based on the consumption power of each task (i.e., P Ap i,t ).Constraint (3) shows the capacity limits of AB-installed generation units.As aforementioned, flexibility in the AB side is defined by controlling the generation and load of each building.This flexibility can be provided by introducing load balance in each building, defined by [71]: where the variables P import t and P export t , respectively, show the imported and exported power from/to the utility grid at time period t.The interaction between different forms of energy, such as heating and electricity, can be applied through consideration of technologies such as heat pumps that convert energy from one form (electricity) to another (heat) [59].Note that in the selected papers, the electrical sector plays the main part in control and optimisation, as electricity can be converted to other forms of energy for supplying demand and creating flexibility in all energy sectors.Generally, the imported and exported power are the main control variables that enable flexibility from the ABs.These control actions are mainly applied through definition of a binary variable (e.g., χ Grid t ) as follows [6]: However, it has been shown in [34] that neglecting the energy grid constraints in building-oriented operational models can create critical challenges for the energy grids, such as affecting the voltage profile of distribution networks.This problem has been addressed in the building-integrated dynamic models by considering the grid constraints through optimal power flow method [44].The grid dynamics are mainly modelled as follows: where P f mn,t and Q f mn,t are active and reactive power flow at time period t through the grid feeder connecting the n, and m buses.The energy system load consists of the building demand (i.e., P AB t ) and the feeder demand (i.e., P L t ).These constraints are supported by other physical and operational limits of the electricity grid such as voltage and feeder limits.Consideration of reactive power in this form of optimisation is another positive aspect in relation to the scope of work undertaken in the literature.The non-linear nature of these equations, however, can create a computational challenge.In this regard, the majority of selected studies have sacrificed the accuracy by simplifying the model [43,44].The important grid constraints, such as voltage profile of electricity grid, have been neglected in some papers [33].
In the building-integrated dynamic models, and the power consumed by HVAC units P HVAC t .The latter is mainly obtained based on the thermodynamics of the ABs, which is basically modelled by a resistance and capacitance network as follows [42,43,51]: where, in ( 9), the thermal load can be modelled as , in which COP is the coefficient of performance of HVAC systems.Rth (in • C/kW) and Dth (in • C/kWh), respectively, represent the thermal reactance and capacitance of of ABs.These parameters are defined for each individual building based on the thermal resistance and capacitance of rooms, walls, and windows [33].
In order to summarise the important characteristics of mathematical models, Table 5 is provided, which gives a taxonomy of selected articles based on the properties of their mathematical models, including objective function, constraints, model type, and solvers.The main observations are:

•
It is a well-known fact that customers are concerned about their bills and the economic perspectives of their controller.Accordingly, 100% of the papers considered cost/profit-based objective functions for their model.In the majority of research works, economic aspects of the energy exchange, which includes the cost of energy imported from the main grid and the income of selling energy back to the grid, has been taken into account as the main part of any cost minimisation function, highlighting the key-role of optimised energy transaction with the grid, and re-emphasising the concept of ABs as the active players of energy optimisation.

•
Based on Table 5, considering or not considering the grid constraints is an important denominator of the models.Meanwhile, the similar point in both types of optimisation problems is the flexibility that can be activated in the ABs through the optimal control of their assets.This flexibility has been reflected in the variable that defines the exported power to the main grid.In addition to the exported power to the main grid, however, new load control mechanisms can be applied to the ABs.For instance, the consumption pattern of AB tasks (i.e., P Ap i,t in Equation ( 1)) can be considered as a variable rather than a parameter.This can add more flexibility to the AB loads in addition to the shifting mechanism that is controlled by on/off status of each task.Meanwhile, interaction among the ABs needs more investigation.This idea can be adopted based on the concept of peer to peer energy markets [86].However, the occupants' preferences should not be neglected in such a paradigm.Thus, the control models should be modified to make trade-off between cost and occupants' comfort.

•
Only a small proportion of the papers considered other objective functions rather than the operational cost, such as occupants' comfort or/and environmental aspects.
In [51], the authors have integrated different goals in the formulation of one objective function, and the problem has been solved as a single-objective optimisation.In some cases [40], focusing on the comfort level, the economic factors in the objective function are considered for the energy transaction between building and grid, which limits the energy exchange based on the comfort level.Despite the importance of the economic targets, there is a need to consider other aspects in the objective function(s) and solve the model as a multi-objective optimisation.Of the selected papers, only 18.5% of them have solved the models as a multi-objective; almost all have used the weighted sum method [87] for handling the problem as a multi-objective.However, the weighted sum method cannot sufficiently handle non-convex optimisation problems [88].

•
The majority of articles focusing on the operation of ABs have proposed a MILP model, which is a common practice for control and optimisation purposes in the building sector [89,90].This kind of optimisation model can be solved by commercial solvers, like CPLEX.Meanwhile, 42.5% of the papers proposed MINLP models.It is generally a difficult task to obtain a global optimal solution from such typically NP-hard problems.The types of solvers that have been used for each optimisation problem is given in Table 5, which have been applied using GAMS, MATLAB, Python, Julia, and EnergyPlus software packages.

Flexibility Modelling
Regardless of the model type (i.e., dynamic or operational), the flexibility services given in Figure 4 can be activated through the variables representing the power exchange with the grid.In the selected articles, these services are embedded in the objective functions or model constraints.
Cost reduction: the cost reduction flexibility models mainly focused on adjusting the exchange of power between the grid and ABs according to the price signals.Therefore, they have embedded the following terms in the objective functions [71]: (10) where, the imported and exported power from/to the grid are adjusted based on the market price signals (i.e., λ t ).This mechanism contributes to the cost reduction in both grid and building sides, and can be referred to as incentive-based DSR.
Frequency regulation: the frequency regulation AB services can mainly be enabled in the grid-tied models [83] and require support from the building assets that participate in fast flexibility services (see Table 4).Based on [84], deviation of the grid frequency out of the threshold value activates frequency support in the ABs.Depending on the frequency deviation mode, one of the following constraints is taken into account by the controller.(11) where, g AB is the drop gain of AB, and f t is the system frequency, which is regulated based on the operation mode, i.e., the frequency support of ABs is changed between 0 and P import t − P Export t base to support system frequency.Voltage and reactive power support: the distribution systems are the linking part of connecting the majority of building loads.Considering the high rate of R/X in these networks, the idea of voltage support can be modelled as follows [39]: where, ∆V is the voltage variation over a feeder, and V base is the base reference voltage.
In distribution system, high rate of R/X indicates that the active power can have a considerable impact on the voltage regulation.Therefore, by adjusting the value of power exchange with the grid, this voltage support can be provided by the ABs.Due to the direct relationship of reactive power and bus voltage, the reactive power support can also be provided by the ABs, which is modelled as follows [81]: where, S V∆Q sensitivity of bus voltage to reactive power.Therefore, adjusting the value of Q can provide reactive power support for the grid.Note that this requires the active and reactive power flow equation of the grid in Equations ( 7) and ( 8), respectively.Peak shaving: concerning the capacity of line between the ABs and the distribution transformer, it is not economical to enhance feeder capacity.Therefore, constraint ( 14) is introduced in [63] to prevent extra power consumption and consider penalty for those ABs that consume more power than agreed-upon threshold.This formulation can help in peak shaving.

Operation Mode
As previously stated, the energy and data transaction with the main grid is the most important feature of ABs.Accordingly, their operation is mainly defined based on their connection with the grid.The summary of operation mode (off-grid, grid connected) and the involvement of multi-energy carriers in the selected papers is given in Table 6.This table clearly shows that all available works studied the operation mode as grid connected.Although the off-grid characteristic could be a significant feature for buildings, it has not been considered in the literature to any depth.This option can add more resilience characteristics to the ABs.Being able to operate in off-grid mode is regarded as an important characteristic of well-managed ABs [32].It has been shown in [41] that the building can benefit from the available installed wind and solar capacity efficiently in both on-and off-grid modes, and it has been shown that the majority of building load is supplied by RESs in both situations.In [61], an economic analysis is performed to show the effect of electricity tariffs on the decision of the home owner to stay connected with the grid or operate in off-grid mode.
As shown in Table 6, another important characteristic of ABs is their capability to deal with various energy carriers.Despite the importance of the multi-carrier energy concept [91], in a wide range of papers, there is no evidence of dealing with other forms of energy except for electricity.The majority of those articles which have investigated different forms of energy, belong to the first architecture of integration, which has been shown in Figure 3a.However, those which have concerned the grid dynamics mainly focused on the electric networks and neglected the potential of other energy systems in enabling more flexibility.It has been shown in Reference [44] that more flexibility can be provided by ABs through coupling the heating and electricity systems.

Control Variables
In both types of building-oriented operational and grid-tied dynamic models, providing the flexibility is actualised based on the decision variables that are sent by the controller to the ABs or CoBs.The share of various control variables in enabling energy exchange with the main grid is shown in Figure 6.This figure clearly shows that controlling the energy interaction between the grid and ABs accounts for 100% of the selected papers, putting emphasis on the significance of the flow of energy between the main grid and buildings.Note that the double-headed arrows demonstrate the energy exchange with the grid, based on the control signals.It is evident from Figure 6 that the main control signal in enabling flexibility is general load control, accounting for 90.7% of selected articles.With 74% of share, the second in this list is energy storage, which can enable energy transaction with the grid through charge and discharge mechanism.However, a lower percentage (e.g., 31%) of the articles focused on enabling flexibility through home appliances.Besides, despite the importance of on-site generation units in enabling flexibility, this group accounts for the lowest proportions of interests among the selected studies, with 11.1%.
It is evident from Figure 6 that various control variables are needed to enable flexibility in the ABs.One of the main targets in control methodologies is on controlling the various components in the ABs, to operate them efficiently while enabling potential energy exchange with the network.Accordingly, ABs should communicate with the main grid efficiently, with consideration for the techno-economic targets.Therefore, more decisive control variables can be taken into account for ABs' integration into the grid, such as decision variables that enable the communication between CoBs, as well as the main grid technologies and the ABs.After adding more decision variables, the role of the ABs in the network will be changed and they become a player in the energy markets.This could be a new role for the ABs, and is a new interesting research area to be investigated.

Flexibility Challenges
Energy systems have been enjoying a centralised control mechanism for a long period of time.Enabling the flexibility in the ABs requires the decentralisation of control architectures.Decentralising the control mechanisms and embedding control systems in the conventionally passive buildings cannot be an easy task and brings about several challenges.Regardless of technical and operational challenges, three important issues should be considered precisely.The first challenge is how to integrate millions of buildings into the energy systems.Designing a control mechanism that can handle the time-scale discrepancy is the second issue, while the variability of input data which are under the influence of external factors is the third in the list.This section discusses these three issues, and investigates the main approaches in the selected articles for dealing with them.

Scalability of Integration
Despite the importance of data-driven methods in predicting the building load demand [92], it is of utmost importance to investigate the dynamics of building integration to the grid through a precise analytical method rather than a prediction method.To do so, a critical question arises here, which is how to achieve an optimal control decision for a relatively large number of ABs?
Table 7 shows the proportion of various numbers of ABs in the case study of selected articles.As can be seen in this figure, the majority of articles focused on a small number of ABs and tried to investigate the concept of flexibility.Different types of load and generation control techniques are evident in these papers [37,38].However, it has been shown in [93] that increasing the number of ABs affects the quantified participation of buildings in the grid.In Table 7, the papers that have concerned the large-number integration models are mainly grouped as the building-tied structures (i.e., Figure 3b).Some of the articles benefited from data driven methods for their integration [56,58,61], and focused on the exploring the different scenarios of flexibility that could be provided by ABs.The other group [44] utilised the thermodynamic models for large-scale integration.They have simplified their model in two ways so as to achieve acceptable computational efficiency.Firstly, they have simplified the dynamics of the grid, which brought about neglecting important measures such as voltage profile of electricity grid [33,43].On the AB side, as shown in Figure 3b, they have only focused on the thermal loads and considered other building loads as a constant parameter.The thermal loads are modelled with thermodynamic load model given in Equation ( 9).Those which have considered the other characteristics of ABs have mainly focused on a small proportion of properties [34,42].
Table 7.The number of ABs in the integration models of selected articles.

Number of ABs
Popularity (%) To conclude, a realistic large-scale integration needs to consider other characteristics of the buildings such as flexible loads.Besides, it is not necessary to consider hundreds of zones for a large-scale integration model.Finally, the large-scale analytical integration methods can benefit from the data-driven methods to achieve computational efficiency while concerning considerable number of ABs.

Time-Scale Discrepancy
The issue of time-scale discrepancy is another major challenge in the integration of ABs into the energy grids.The models that are designed for energy management of ABs concentrated on controlling the buildings' operation, which is considered as a part of the tertiary controller.The main task of the tertiary controller is to send an optimal operation schedule to the secondary controller [94,95].The tertiary controller, which has the slowest time-scale, considers the economic aspects of operation and manages an optimal energy scheduling problem [96].An energy management with fast update rate is intended to work in a five to fifteen minutes time resolution.In the literature, this type of energy scheduling schemes mainly have been on a day-ahead basis.However, including the dynamic behaviour of the energy grid, which is of the order of seconds for synchronous machines and hundreds of milliseconds for inverter-based ones, seems to be another challenge for integration of ABs.This issue creates a time-scale discrepancy between building operation demand/generation pattern (minutes to hours) with the energy grid control mechanism which is in order of milliseconds to seconds.The challenge lies not only in the load, but also in different generation technologies which involve a lot of inverter-based equipments.In order to tackle this issue, the existing literature suggested the utilisation of hierarchical control methodologies, and benefiting from the real-time control algorithms.Through this method, the time-steps of energy grid are resided in those of ABs through real-time energy management techniques [43].The popularity of real-time and day-ahead techniques among the selected studies is illustrated in Figure 7.Despite the importance of time-scale discrepancy, this figure shows lower interest among the selected literature for solving the integration problems as a real-time optimisation.Nonetheless, this issue can clearly affect the results of energy management strategies, as it has been demonstrated in [42], by solving the energy management strategy with and without real-time simulation.Therefore, it is of utmost importance to concern the time-scale discrepancy in the integration models and benefit from a real-time control approach.Figure 7 also shows the share of different control algorithms is dealing with the real-time optimisation problems.Among the selected studies which have concerned the real-time controlling, the look-ahead algorithms, which mainly operate based on the idea of the model predictive controller (MPC) [62,74], are enjoying considerable popularity.Another efficient approach to deal with time-scale discrepancy is to proceed an online dynamic simulation, which has been utilised in several articles [57,76,80], as shown in Figure 7.

Real-time MPC-based
Regardless of the efficiency of the real-time control approaches, there are several important issues that should be taken into account.Firstly, these approaches should be able to deal with large-scale integration of ABs.The importance of this issue has been explained in the preceding section.Secondly, increasing the simulation resolution (i.e., decreasing the time-scale to seconds) increases the computational time exponentially, especially for largescale problems.This can demand powerful processing and creates a substantial challenge for control designs.The data-driven methods can be utilised to tackle this challenge.Finally, the input data is the last but not the least in the potential challenges of the control systems.The real-time data transfer between different parts requires the involvement of the concept of the Internet of Things [14] in this process.Besides, the uncertainty in the prediction of future data for processing look-ahead control signals creates substantial challenges.The influence of uncertainty on the flexibility will be explained in the next section.

Uncertainty of Input Data
Similar to any other analytical methods, the control and optimisation methods that are suggested for the integration of ABs into the grid require data handling.Regardless of the control mechanism (i.e., real-time or day-ahead), the acquisition of data into the simulation is another challenge for enabling grid-aware buildings.Although the datadriven methods, which mainly operate based on machine learning approaches [22], have been proven as an efficient approach, the issue of uncertainty in the prediction cannot be ignored.In the selected literature, different sources of uncertainty such as renewable energy resources [7,32], market price [35,65], and system demand [38,77] have been taken into consideration.As shown in [37], however, there is some possibility of violation between actual and real-time input data, even for real-time methods.These algorithms are less capable of predicting sudden changes in generator output, and therefore, can have possible prediction errors.The issue of uncertainty can influence the flexibility of ABs, which is the main target of this paper.To show the significance of uncertainty in control and optimisation of ABs, the main results obtained from uncertainty management in the selected papers are summarised in Table 8.According to this table, it is clear that a key factor that could be affected by uncertainty is optimal cost of transaction with the main grid.Therefore, in the ABs, in which the energy/information transaction with the main grid would happen, it is of great importance to account for uncertainty and its effect on decision making.

#Ref Main Results
[6] There is a need to raise operation cost to improve the system robustness.[7] Expected operation cost is higher in stochastic environment.[32] More investment cost for ESS planning is required in an uncertain environment.[35] Energy bill of building increased so as to improve the robustness of system.[37] Operation cost is affected by uncertainty.[38] Expected energy cost is increased.[41] Total operation cost needs to be increased.[53] Demand uncertainty affects forecast errors.[63] Cost saving is more usual in the winter season.[64] Considerable difference between buying energy from grid with and without consideration for uncertainty.[65] The scheduling pattern of home appliances' usage is changed [68] Operation cost would increase in uncertain environment.[72] The CHP should increase its generation capacity [74] Operation cost increased.[77] Importing power from main grid is more likely to be affected compared with the exported power.
Different methodologies have been adopted in the literature to deal with the uncertainty of input data in the integration of ABs into the grid.The summary of uncertainty handling methodologies and different sources of uncertainty, based on the selected literature, is given in Figure 8.As can be seen in this figure, a high proportion of research works utilised the scenario based (SB) method for uncertainty management.One of the main disadvantages of stochastic techniques is their computation time, however [97].Information gap decision theory, chance constrained optimisation, conditional value at risk, robust optimisation, and normalised root mean square error are other methods that have been regarded as uncertainty management tools for building optimisation problems.The summary of different uncertainty handling techniques and their advantages/drawbacks have been reviewed in [98].
Based on these observations, there are several important points that can be highlighted.

I.
According to Table 8, one of the main factors that could be affected by different sources of uncertainty is the energy exchange with the main grid, which affects the cost of ABs/CoBs.On the other hand, it has been observed (Figure 6) that this factor is an important criterion in enabling the role of ABs in the energy networks.Therefore, it is essential to consider the effect of uncertain input data on the flexibility of ABs.II.Based on Figure 8, uncertainty in the renewable generation output and market price are the main concerns of energy management schemes.On the other hand, the power exchange with the grid is highly under the influence of market price and renewable generation.Therefore, it is essential to consider uncertainty when investigating flexibility in the ABs.III.Of the selected papers, 27.8% of them considered uncertainty in their investigations, which is concerning given that decision making under uncertainty can affect the control variables significantly [99].Furthermore, it is evident from Figure 8 that un-certainty of PV/wind power generation and system demand are considered in many cases either separately or simultaneously.Meanwhile, other forms of uncertainty, such as weather forecast, and occupants' behaviour, have not been investigated widely; so, they can be taken into account in future works.[38] [39] [42] [78] [64] [65] [66] [73] [75] [6] [54] [54] Market price Load demand PV/wind generation [7] [73] [33] [42] [39] [36]

Citation Network Overview
To further analyse the included papers and provide a visual overview, a citation network is illustrated in this section.Such a visualisation tool builds a graph based on the layout and modularity algorithms, showing the existing path between relevant references and demonstrating the possible community structures that could be designed.The citation network is built based on the included papers, and they have been considered as the core of citation network, while their structure is developed based on the backward and forward methods [31] in Scopus citation database.Accordingly, the papers that cited the included papers as well as those which have been cited by the core nodes are added to the network.Gephi software package [100] is used in building the database, and the graph layout is analysed by "ForceAtlas2" [101] and "Yifan Hu Proportional" [102] algorithms, which provide a spatial mapping of the citation network.Figure 9 represents the citation network overview, which was actual for May 2021.
Different communities are observed in Figure 9, which have been shown with various colours.The connection nodes that drew a path between nodes of the same concept-based community are larger in the graph, which demonstrate how a specific concept is directed by other research works.Following each community is more likely to result in a research direction.The graph is explained in three layers as follows: First layer: Regarded as the core layer of the graph, since the basic concepts are mainly taken into account in this layer.It accounts for the publications that mainly solved the model in day-ahead mode, with ABs connected to the main grid.These two concepts, that are mainly observed in the core layer, could be considered as the starting point of developing the optimisation and control of the AB operation.Consequently, the articles in this layer, Ref. [76] for instance, are connected to several nodes in the middle, and even outer layers.In addition, there are considerable interconnections between nodes of this layer.For instance, Reference [6], is connected to several of the nodes in the core layer, meaning that backward and forward citations of this work are mainly constructed based on the core concepts.Second layer: This layer, the middle layer, mainly consists of significant works that have been developed from the core layer, and could be regarded as the starting points of a wide variety of important subjects, such as occupants' comfort, real-time simulation, and islanded operation of ABs.Note that the majority of core nodes, separated by circular windows in the graph, are located in this layer.Therefore, the middle layer could be considered as the starting point of the developments that have taken place in the third layer.
Third layer: This layer, which is the outer part of the graph, shows the less developed subjects that could be worthy of further research.It is evident from this graph that real-time models have been developed in recent years and could be continued.Furthermore, papers which considered the grid constraints are a key part of the upper layer, demonstrating the significance of this concept in recent years.Examining the operation of ABs in off-grid mode is another development which has been investigated and could be extended through further research.Finally, the concept of multi-carrier ABs has been developed in several directions in the graph, mainly in the outer layer.Note that the interconnection between nodes from different clusters in this layer demonstrates the idea of combining various concepts for future investigations.
Based on the citation network graph overview, it is recommended that the basic concepts be investigated in six windows as: W1: This window, which is located in the core layer, continued the path of those works which solved the model in day-ahead, by solving the model in real-time.This idea has been explored in several articles, such as references [62,80,83], which are directed by connection nodes (i.e., large red nodes) to the basic node.W2: As aforementioned, decision making under uncertainty is a critical issue in the operation and control of ABs.Accordingly, the node captured in this window investigated this subject, which has been followed by other works in this area (e.g., [39,77]), into the outer upper layer.W3: It has been shown in the previous phase that carbon footprint reduction has not been widely investigated in the literature.This window shows that the work on this issue, presented in [79], has been continued by some new articles recently, proving the importance of the issue for further work.W4: Optimal scheduling of household appliances is a basic concept, which has been captured in this window, that started from the first layer, and was continued by [46] and in the middle and outer layers, respectively.The interconnection point in this window (i.e., large black node) is directed to many nodes, with various subjects in the outer layer.W5: The idea of occupant's comfort is developed in this window, in [54], which has been connected to significant works in the outer layer.In addition to those works from the same cluster, this window includes other issues such as operation in islanded mode [41] and adding the grid constraints to the model [40].W6: The idea of this window is around grid-tied ABs.The core of this window is Reference [34], which has been continued by other articles in [43].These references show the importance of including grid constraints in the model.

Future Challenges
The research works that have been reviewed in this study demonstrated that ABs can play a decisive role in the energy network.A large proportion of publications presented between 2017 and 2020, as well as projects established in the recent years [103], clearly show the potential value of this area of research.Nonetheless, the role of this concept in research and industry can be more crucial in the future.

Overview of Future AB-Integrated Architectures
Different forms of technologies and structures can be linked to the ABs.For instance, adding EVs into the AB design can be a promising solution for improving flexibility.The mobility is a complex challenge when considering EVs for providing energy services for the grid.However, the challenges of integrating the transport structure into available systems should be studied and analysed.Furthermore, ABs can form many clusters and then exchange energy/information together.Co-operation between clustered ABs and the utility grid can decrease the need for additional generation sources on the main grid.

Enabling More Flexible ABs
Changing the role of conventional passive building towards energy efficient ABs can create a wide range of services that can be provided to associated energy networks.Despite the significance of data-driven models [104] in exploring the behaviour of ABs, analytical methods are essential in studying the flexibility of ABs in the energy networks, especially when considering grid constraints.This requires use of the state of the art analytical methods such as the optimal power flow.In an integrated grid and AB model, there will be several challenges that need exploration.
Objective function: in an integrated AB and grid model, the grid operator and AB objectives are more likely to affect each other inversely.Consequently, the objective function(s) of such optimisation problem should be defined based on grid and AB goals simultaneously.Furthermore, in addition to economic models, there are other important criteria for controlling the buildings' operation, such as environmental objectives of reduction in carbon dioxide emissions.
Load aggregation: in the majority of previous literature, the interaction between ABs and the utility grid is studied with a small number of AB units.However, the aggregation of a large number of ABs in a big city or concentrated across a small area of energy network could be a challenging issue.
Occupants' comfort: the operation of ABs is highly influenced by occupants, and it is essential to consider occupant comfort either as a problem constraint or an objective function.Available comfort models mostly consider three main indices, which are visual, thermal, and air quality factors, while more lifestyle related measures can also be added to this category.
Services: creating the flexibility in the ABs can enable a wide range of services to be provided to the utility grids.Consideration for reactive power flow in the grid side creates different challenges and opportunities for activating reactive power support from the AB side.Furthermore, enabling resilient ABs can create the possibility of providing resilience/security/reliability services in critical conditions.
Model type: the type of mathematical models applied in the research is an important point in defining the practical application of ABs.For example, for cost reasons, an AB controller should not demand an expensive powerful processor.Therefore, the MILP mathematical models should be developed for the AB controllers.Such models can be solved by commercial solvers and do not demand expensive processors.
Operation mode and energy vectors: integrating and communicating with different energy networks should be enabled in future ABs efficiently.Furthermore, the ABs should have the ability to co-operate with each other in grid-connected and autonomous modes.The latter mode can be crucial in contingency conditions when the distribution grid is disconnected from the upstream network.
To conclude, mathematical models that will be developed for ABs should be computationally efficient, while considering the occupants' comfort as an indispensable criteria in the integration of ABs into the energy networks.The control variables that are defined for technologies and devices within the building could be subject to the type of buildings (i.e., residential, commercial, or industrial), with consideration for the main lifestyle criteria, weather-related changes, and seasonal patterns [63].Available control models, explored in this study, can be adopted by real-life experiences and data mining approaches.Therefore, the adaptation of data-driven models in defining this real-life information can help in developing the analytical models.

Control Mechanisms
An important challenge that should be considered in the implementation of different control algorithms to the ABs is the design of the primary controller.The works presented in the literature mainly focused on the optimisation models which control the decision variables according to objective function.However, online or real-time control methodologies are an important part of the primary controller, in which the interaction between input and output values are obtained.Both primary and tertiary control schemes can be co-operative.The model that is designed in the tertiary controllers can be considered as the main part of a primary controller.The building controller should take into account the characteristics of the network, such as voltage and frequency, especially when operating in on-grid mode.This issue can address the frequency and voltage services that can be provided by ABs.
On the other hand, the decisive role of input data in evaluating the effectiveness of simulation models has to be emphasised.Accordingly, utilisation of prediction data in model evaluation is common among available research.Even the methods that benefit from MPC-based approaches adjust their current operation point based on the prediction of the future data.However, variables can change suddenly, especially those which are under the influence of human decisions such as energy market prices.Thus, there is a need to investigate the role of ABs in the energy networks under the influence of uncertainty.Decision making under uncertainty is a challenging issue in the ABs due to the range of uncertainties in generation and consumption data, which can affect the outputs significantly.It is therefore necessary to take into account those decisive uncertainties in the forecasted inputs, like uncertainty of RES generation, and demand.There are other types of uncertainty which can also be added to forecast inputs, such as weather or occupants' lifestyle, providing a more realistic outcomes for decision makers.Regarding the uncertainty modelling techniques, the majority of present literature utilised stochastic methods which suffer from several drawbacks.One of the main disadvantages of these methods is their computation time, which is an important issue for the control of buildings.Therefore, there is a need to utilise better methodologies, such as robust optimisation, which requires less information about uncertain parameters and has a significantly lower computation time compared to stochastic methods [105].

Conclusions
Buildings as the end-users of energy networks are responsible for a sizeable amount of energy consumption and environmental pollution.Therefore, it is crucial to revise their role in the energy networks.A large number of publications have been delivered in the past decade, investigating the alternative tools in enabling flexibility in the buildings.This has engaged the various researchers and industries from different fields of engineering and science so as to find alternative control, optimisation, management, communication, and construction approaches for activating grid-aware buildings.This paper presents work undertaken to identify and analyse relevant literature in the area of control and optimisation of ABs, through a systematic review.Firstly, all available research materials are obtained.Then, a sequential study selection criteria is introduced to identify potential literature which can comply with the research question.The included papers are evaluated based on a conceptual process so as to specify the current knowledge in the area and suggest future challenges for research and industry.Finally, a citation network is illustrated based on the included papers and backward/forward methods so as to show the interconnection between various papers and highlight the possible research pathways.

Figure 2 .
Figure 2. Growth of interests in the concept of active buildings.

Figure 3 .
Figure 3. Different architectures in integration of ABs into the grid: (a) building-oriented structure, and (b) gridtied structure.

Figure 4 .
Figure 4. Various building flexibility services for the grid.

Figure 5 .
Figure 5. Proposed framework for CoBs energy exchange.

Figure 6 .
Figure 6.Share of control variables in enabling flexibility.

Figure 7 .
Figure 7. Popularity of different control mechanisms among the selected studies.

Figure 8 .
Figure 8. Different uncertainties and the methodologies for handling them in ABs.

Figure 9 .
Figure 9. Citation network overview of selected papers.

Table 1 .
Summary of available review papers.

Table 2 .
Summary of first and second rounds' study selection.

Table 4 .
Technologies in the AB.

Table 5 .
Mathematical model characteristics of selected articles.

Table 6 .
Operation modes and energy carrying in included papers.

Table 8 .
Effect of uncertainty on the flexibility based on the selected literature.