A New Concept of Active Demand Side Management for Energy Efficient Prosumer Microgrids with Smart Building Technologies

Energy efficient prosumer microgrids (PMGs) with active and flexible demand side management (DSM) mechanisms are considered to be crucial elements of future smart grids. Due to an increasing share of renewable energy and the growing power demand, appropriate tools to manage not only the loads but also small generation units, heating and cooling systems, storage units and electric vehicles should be provided for them. Therefore, this paper proposes an innovative approach to both physical and logical organization of an active DSM system for future building-integrated prosumer microgrids (BIPMGs), based on standard building automation and control systems (BACS) as well as Internet of Things (IoT) paradigm. New event-triggered control functions with developed universal, logical interfaces for open BACS and IoT network nodes are presented and their implementation in smart metering as well as fully integrated energy management mechanisms is analyzed. Finally, potential energy efficiency improvements with proposed BACS functions are discussed, based on BACS efficiency requirements defined in the EN 15232 standard.


Introduction
The modern power system is more and more penetrated by distributed generation (DG) resources and it is evolving into the Smart Grid (SG).The basis of this process is the development and increasing availability of renewable energy sources (RES) like photovoltaic panels (PV), solar collectors and wind turbines.In practice, they are mostly combined into local small power grids defined as microgrids [1][2][3].Moreover, some RES are installed near buildings or households and locally connected to energy supply networks, providing not only electrical but thermal energy as well [4,5].It is necessary to highlight that buildings are one of the most energy-intensive sectors.Buildings account for approximately 40% of the total energy consumed around the world, including up to 65% of electricity.They are responsible for almost 40% of the European Union CO 2 emissions as well [6][7][8][9].In this context buildings play a pivotal role in the SG concept, being perceived first of all as consumers, but a progressive implementation of RES in buildings and households provides opportunity to change them into prosumers.Prosumers equipped with appropriate technical infrastructure as well as generation and storage technologies are able to build individual or local microgrids.A prosumer microgrid (PMG) is a form of decentralized energy production with the possibility to control generation on-site and manage power demand to meet the requirements of providing local power and conditions allowing to the injection of power into the grid if required.This concept works in both the alternating current (AC) and direct current (DC) electric power systems as well as in thermal energy generation and distribution systems [8,10,11].
Taking into account the increasing share of RES and the growing power demand, PMGs require reliable and effective mechanisms to manage on-site power and energy flows, forecast energy demand and support demand response (DR) services, allowing them to cooperate with other microgrids as well as to participate in energy management programs realized in the SG.The demand side management (DSM) mechanisms, technologies and tools can help to achieve these goals.Several DSM concepts for microgrids have been proposed and researched considerably in the last years.They are mainly focused on the optimal scheduling of the loads (such as washing machines) when the power is cheaper as well as changes in use of loads taking into account the consumer activities and preferences [2,[12][13][14][15][16].However, besides that, the DSM for the PMGs should consider the RES and storages availability, with their limited predictability, greatly affected by variability of the weather (sun, wind) and other changing conditions.Bearing in mind all the aforementioned aspects, a new active DSM concept has been proposed for prosumer microgrids.It provides flexibility and interaction between all loads and energy sources on-site (local level) as well as between Distribution System Operators (DSOs) and prosumers, with the possibility to exchange data and actively respond to requests for information like energy pricing (tariffs), incentive or demand reduction signals [10,[17][18][19][20].These features are important in perspective of a transactive energy (TE)-a relatively new paradigm for the microgrids and the SG, combining information and energy to enable transactions which implements highly coordinated self-optimization and possibility for retail customers-prosumers to effectively participate in mechanisms of the purchase and sale of power and energy [21][22][23].
In order to organize the active DSM, all devices, energy sources and storages in PMG should be equipped with smart modules and commutation interface, allowing them to exchange data in real-time.Therefore, the real-time communication plays a pivotal role in both microgrids and SG developments.It allows end-users and prosumers to operate on real-time signals (parameters from sensors, electricity prices, incentive signals, alarms, etc.).This approach gives them possibility to manage the energy and choice either to consume or to sell it to the grid.Hereby PMGs become real, active and flexible sources of energy on-site and from the SG perspective.Moreover, they provide effective means for energy savings by active energy management strategies, improving overall energy efficiency [24,25].Since buildings or households with their infrastructure are often an integral part of the PMGs, it is possible to use their infrastructure, in particular communication and fieldbus automation networks, to provide effective, real-time communication platform for the active DSM.New challenges in Information and Communication Technologies (ICT) as well as building automation and control systems focus on the methods and tools to monitor, control and optimize the use of energy and the data management flow [26].Nowadays, crucial element of a control and monitoring infrastructure in modern buildings and households are Building Automation and Control Systems (BACS).They integrate on a field level various controllers, sensors and actuators distributed in buildings.With Technical Building Management (TBM) functions, the BACS provide effective control and monitoring of heating, ventilation, air conditioning (HVAC), cooling, hot water, lighting and energy sources.However, the BACS with TBM have an impact not only comfort and safety in buildings, but on their energy performance as well [4,19,[27][28][29][30].With the BACS and TBM as well as a new Internet of Things (IoT) technology which is considered as one of new communication standards in the BACS, all of the aforesaid equipment and subsystems could be easily integrated into the active DSM, providing new features and possibility to build fully integrated, flexible and adaptive structure to manage energy in the PMG.In this respect, the active DSM is a very important feature of Building Energy Management Systems (BEMSs), which are integrated within the BACS [4,26,31,32].Moreover, Home Energy Management Systems (HEMS) based on the BACS standards are considered to improve the operation utility of households in the microgrid concept.The HEMS are usually used to collect data and signals from household appliances, smart meters, various sensors and to optimize power supply and energy demand with this information [20,[33][34][35].
Bearing in mind all the issues and challenges discussed above, in this paper author proposes a novel approach to organize an active DSM system for building-integrated prosumer microgrids (BIPMGs), based on standard BACS as well as IoT technology, with their event-driven control mechanisms as well as event-triggered control and monitoring functions.First of all, this approach is focused on active control of various RES and energy storages available in PMGs.The paper has the following goals: 1.
To review DSM concepts proposed for PMGs considered as essential, distributed parts of the SG. 2.
To review energy and demand management solutions based on the BACS in perspective of BIPMGs requirements.

3.
To propose a new active DSM concept with TBM functions and augmented demand elasticity model, focused on effective control of the RES and energy storages within the PMGs.4.
To discuss potential energy efficiency improvements in prosumer microgrids with the BACS.
A new active DSM concept proposed in the paper takes into account TBM control and monitoring functions proposed in the EN 15232 standard [28] and introduces new universal logical interfaces for open BACS and IoT network nodes.Since the mentioned standard discusses impact of the BACS on buildings energy performance, demand management functions proposed in the paper can be considered in this context as well.The main contributions of this work are given as follows: 1.
The paper presents an original concept of an event-based energy and demand management solution for PMGs with universal, real-time communication platform based on the BACS and IoT technology.

2.
Author proposes an augmentation of a demand elasticity model proposed in [36,37], in the context of the RES and energy storages control in PMGs.

3.
New universal functional blocks have been developed and presented in this paper.They include standard network variables and configuration properties of control and monitoring functions, essential for active energy and demand management within PMGs.

4.
A new application field of the EN 15232 standard guidelines in BIPMGs has been proposed, providing potential energy efficiency improvements.
The rest of this paper is organized as follows: Section 2 discusses related work.In Section 3 the proposed concept of an active DSM system for BIPMG is discussed with subsections of the PMG model, universal real-time communication platform and smart metering concept, demand elasticity model extensions and developed new functional blocks.In Section 4, information about control and monitoring functions having impact on energy performance of BIPMGs is provided and potential energy efficiency improvements are discussed as well.Section 5 gives the conclusions and suggests future works.

Related Work
In order to clarify contributions of this paper, an overview of reported research on SG, microgrids and DSM mechanisms, in particular via the BACS, BEMS and HEMS is outlined in this section.It is divided into three subsections, according to the main technical and organizational aspects of various research and development activities in the field of microgrids and the SG.

Smart Grid, Microgrids, Prosumers
Along the last two decades the electrical energy systems have been going through a substantial transformation.This generates new challenges of a technological, social, and policy-rated nature.First of all, these are: (i) growing energy demand; (ii) distributed applications of the RES; (iii) optimal energy and assets management; (iv) activity and engagement of consumers and prosumers as well as; (v) the need to support data flows and information exchange between devices and sub-systems in the SG.In this context, the modern SG unifies recent developments in the electrical power area (distributed nature of electricity power systems) with those in the ICT and field-level automation networks, to bring to bear changes to business practices as well as life styles of consumers and prosumers [38].The transition of power grids towards distributed and renewable energy generation leads to a concept of autonomous polygeneration microgrids and poses new challenges with respect to the stability and operation of this kind of distribution power grids [12,39].In this context microgrid can be seen as a small-scale power system comprising and integrating generators, loads and storages.In [40] Gupta et al. mention that since the beginning of 21st century AC microgrids have been considerably investigated because of their natural interface with the power grid.However, the increase in RES applications and development of energy storage systems (ESS) with their DC interfaces, has encouraged a lot of studies on DC and hybrid AC/DC microgrid systems [40,41].They provide end-users, consumers and prosumers with new kinds of devices (loads), energy sources, EES, energy management devices and communications equipment, to achieve a higher level of energy management and readiness for the SG integration.All the mentioned challenges have to be tackled with adequate, reliable real-time communication systems and technologies.However, at least two aspects should be considered: (i) data exchange between microgrid and the SG (enabling the distribution of commands and information within the power system) as well as (ii) internal communication among microgrid components, since both need different ICT solutions and standards [38,40,42].Considering these aspects, in [25,43,44] various holistic communication infrastructures for the SG and microgrids as the SG's sub-systems have been presented and discussed.They are based on the Internet Protocol (IP) and the wired and wireless communication technologies dedicated to: (i) real-time control and the state estimation of the distribution grid; (ii) support the interconnection of local area networks (LAN) with the smart grid communication backbone (IP); and (iii) implement the data management services to efficiently handle the large amount of data collected in the distribution grid (sets of microgrids).Since with the SG idea and tools implementation the intelligence of the energy distribution and control system is expected to spread from some central core to many peripheral sub-systems and nodes, according to a new fog computing paradigm [45][46][47][48], to more precisely manage energy in the power grid, in [21,49] the IP networks with IoT paradigm are proposed as base to organize so-called Enernet.The Enernet will open the way to convergence of the SG with the IoT.In this platform the utilities, their customers and prosumers will find it necessary to plan, engineer and operate in presence of magnitude more devices, sources and systems, creating billions of new points-network nodes, that require monitoring, analysis and management [18,21,50].On the other hand, field-level network standards based on IP or other open communication protocols are proposed in mentioned papers to: (i) enable real-time information flows between customers, prosumers and the SG energy management systems as well as (ii) allow them to play an active role in the electricity market and the energy management strategies, in particular locally within BIPMG [26].Moreover, since the European Standard EN 15232 [28] and the Energy Performance of Building Directive 2010/31/EU [51], promote the adoption of the BACS and the HEMS technologies to reduce energy consumption in the residential sector, network standards of the BACS with TBM functions are proposed to be implemented in PMGs control and management applications.Additionally, development and integration of the IoT technologies in the BACS are recognized as having significant potential to create an active, fully open and integrated energy management systems for buildings and households on the field level as well [11,25,43,52,53].

Building-Integrated Prosumer Microgrid and Active Demand Side Management
Most PMGs are arranged within buildings or households' infrastructure (building-integrated PVs, small building-mounted wind turbines, solar collectors).At the same time the BACS are becoming more and more popular in buildings, especially in public and commercial ones [27,54].In order to integrate the distributed local RES and provide an advanced local energy management acting on both loads and renewables, a building-integrated microgrid (BIMG) has been proposed by Sechilariu et al. in [10], with an appropriate system configuration as well as energy management rules.Additionally, the BACS and HEMS with their distributed network approach and advanced control and monitoring functions (TBM and supervisory control and data acquisition-SCADA) have been proposed to be communication and integration platforms for the BIMGs and PMGs [10,55].The modern BACS are based on various built-in actuators and embedded sensing techniques with the context-aware automation concept and mechanisms.In this respect, the BEMS could be implemented on the field level and easy integrated within the BACS with their control and TBM functions, to monitor occupants' activities, electrical energy consumption, active control of electrical loads and various, distributed RES as well as buildings' infrastructure management.In the last decade, many of research and studies have been focused on developing of new functions and devices for the BEMS as well as various communication technologies have been considered to provide reliable connections and flexibility in the BACS field-level networks.In particular, in [19,25,53,[56][57][58][59], international, non-proprietary (open) standards dedicated for distributed building automation networks-EN 14908 (LonWorks) [60] and EN 13321 (KNX) [61]-have been proposed for the BEMS in microgrids and the SG.A New paradigm in BACS networks based on these standards is the implementation of the IoT technology with IPv6 protocol [26], providing a direct data exchange between network's nodes on the field-level, regardless of communication medium type (fieldbus or IP channels).This opens a way for deeper and full integration as well as implementation of new BACS and BEMS control and monitoring functions [4,19,52,62].
In a BIPMG with implemented BEMS control and monitoring functions, the BACS with TBM are able to collect information about power demand and energy consumption, and control loads in buildings, dynamically interacting with the SG [26].A demand value is one of the crucial parameters for organizing of BEMS with the active DSM.Two main goals of the DSM mechanism in respect to BIPMG applications are introduced in [15,17,19,32]: (i) to reduce electric energy consumption and improve energy efficiency of building by measure and monitoring power demand, active control of electric devices and other subsystems of building's infrastructure; and (ii) to match present RES generation levels and energy supply with real demand in microgrid, controlling the energy consumption of appliances and devices in buildings, depending on real-time signals from sensors, occupancy, time schedule as well as information from the supply grid-DSO (energy price-tariffs, energy reduction request).Various DSM strategies have been considered and proposed in numerous research and studies.Most of them are concentrated on reducing and minimizing energy costs as well as loads scheduling to reduce peak-demands during the day.But, taking into account changes in energy price as well as the variability of user behavior and weather conditions affecting the efficiency of the RES, in [2] Verschae et al. have proposed two categories of DSM strategies: (i) event-based and event-triggered DSM as well as (ii) price-based.The first one depends on remote sensing and control of devices and appliances in buildings.The control actions take place only at particular events, based on signals from sensors [63].To provide effective management of the events and control actions, an online energy management algorithm based on event-triggered mechanism has been proposed by Liu et al. [35].For the second price-based DSM strategy, there are two load scheduling techniques proposed in [64]: reactive scheduling, with dynamic electricity tariff changes analysis, and proactive, with day ahead electricity tariff information before time and schedule made a day ahead.Two additional criteria-user comfort and cost reduce-are proposed for this DSM strategy in [7].In PMGs with different kinds of the RES implemented, it is important to take into account not only real energy demand value, but also forecasts of the power produced by the RES, to address the challenges stemmed from the sporadic nature of wind and solar power generation [65].To tackle these challenges in [12] a multi-agent system (MAS) has been proposed for intelligent DSM of a polygeneration microgrid topology, including grey prediction algorithms for better energy management.It has been validated as well.Moreover, in [66] a new integrated DR program has been proposed, considering integration of different types of energy sources.Bahrami et al. validated that coupling between different energy carriers enables customers and in particular prosumers to effectively participate in the DR and DSM programs, not only by active devices control and of load shifting, but also by switching and management of the energy sources.
Last but not least, the concept of Agile Demand Response based on the MAS has been introduced by Babar et al. in [36].It is defined as the ability of power system or PMG to prosper and survive in the competitive energy market, by reacting to its needs fast and effectively.This concept is supported by development of a demand elasticity model, implementing a market-based control mechanism (MCM), in which the DR and DSM programs of consumers or prosumers are traded as commodity in retail market.Since the introduction of smart energy meters and both mentioned earlier the ICT and the BACS advances have enabled the prosumers to bid easily against the energy at its disposal, the demand elasticity model presented in [37] and taking into consideration the electrical energy price changes, could be proposed to help in the development of future active RES control, energy manage and bidding mechanisms for BIPMG.An extended implementation of the demand elasticity model, including other important parameters (signals from the BACS representing events and affecting energy demand value, like the presence of persons-occupancy or number of persons in the room) in addition to the energy price has been presented and analyzed in [4].It has taken into account energy meter and data logger functions with analysis of various parameters from the BACS affecting energy demand and supply.In this context, in [67] the concept and standardize design of Energy Flexometer has been presented by Babar et al.The Energy Flexometer implements the mentioned demand elasticity model and an IoT ready logical interface developed by the authors according to the open BACS standard.Moreover, it is proposed to be used in PMGs to effectively manage energy demand value, considering various factors and parameters (events) available via the BACS and BEMS.All the mentioned aspects are especially important in respect to the TE paradigm as well.The TE mechanisms with other cost-effective and reliable management solutions, permit users to respond to economic incentives or new market policies and allows prosumers and other subjects to gain economic advantages as well as save energy [68][69][70][71].

Energy Efficiency of Building-Integrated Prosumer Microgrids with the BACS and TBM
Overall energy performance of the BIPMG depends on several factors, in particular: (i) the presence and variability of energy generation from the RES; (ii) the presence and state of Combined Heat and Power (CHP) systems as well as (iii) the presence of the BACS with TBM functions.The first two have been discussed in numerous research and studies.However, the third factor is not so obvious, but in recent years it has been taken into consideration especially by building automation engineers [27,56,[72][73][74][75][76][77].As a result, the mentioned EN 15232 standard has been introduced in 2007 and revised in 2012 [28].According to it the BACS provide effective control functions of various buildings' subsystems leading to improve operational and energy efficiencies.The BACS based on distributed, field-level networks allow to configure advanced and integrated energy saving routines and functions, based on the actual use of a buildings and their infrastructure, depending on real user needs.Additionally, the TBM functions as a tool of Building Management (BM), provide information about operation, maintenance and services of buildings.They are especially useful for energy management services-measurement, recording trends and alarming capabilities as well as diagnosis of unnecessary energy use [28,78].
The EN 15232 standard provides a list of BACS control and TBM functions having an impact on the energy performance of buildings, including energy sources control and monitoring functions as well.Moreover, four different BACS efficiency classes (A, B, C, D) are defined in the standard, both for non-residential and residential buildings: (i) Class A: High energy performance BACS and TBM systems; (ii) Class B: Advanced BACS and TBM systems; (iii) Class C: Standard BACS and (iv) Class D: Non-energy efficient BACS.These classes directly depend on the BACS control and TBM functions and their logical binds as well as level of integration [27,73].The role and importance of the BACS in buildings energy efficiency improvements, with key elements of a demand-led control strategies, which could be realized in buildings and BIPMGs are discussed in [73,75].Moreover, in [74] Ippolito M.G. et al. are focused on evaluation of the impact of the BACS and TBM on residential buildings.They provide results of a residential building case study with detail analysis of energy performance and potential energy savings, cash flows and payback periods.The authors concluded that the BACS with TBM functions should be taken into consideration in future regulations and in national law on the energy performance of buildings.Similar suggestions with introduction of appropriate tools supporting buildings design process and taking into account the EN 15232 requirements are provided by the author of this paper in previous publications [27,56].Moreover, in [79] the author presents a case study focusing on experimental verification of the impact of the BACS with TBM functions organized according to the EN 15232 guidelines on the energy performance of a typical university classroom.In that study, the EN 15232 requirements have been applied and examined in real infrastructure, to illustrate how proper implementation of the BACS and TBM functions can affect the overall buildings energy efficiency and related to different subsystems of building's infrastructure (lighting, HVAC, heating system).

Active Energy and Demand Management in Prosumer Microgrid-Proposed Solution
BIPMGs can have a varied structures and architectures, depending on devices, RES and storages as well as other infrastructure modules they use.For definiteness, a prosumer microgrid model proposed in this paper is demonstrated in Figure 1.Its technical infrastructure consists of various energy sources, group of energy converters (electrical energy into a heat/cool), loads and ESS.There is a DSO part presented there, with additional external factors and parameters affecting energy demand in the PMG.Since overall energy performance of the PMG is considered in this paper, there are three "energy channels" distinguished there as well.
Energies 2017, 10, 1771 7 of 22 the overall buildings energy efficiency and related to different subsystems of building's infrastructure (lighting, HVAC, heating system).

Active Energy and Demand Management in Prosumer Microgrid-Proposed Solution
BIPMGs can have a varied structures and architectures, depending on devices, RES and storages as well as other infrastructure modules they use.For definiteness, a prosumer microgrid model proposed in this paper is demonstrated in Figure 1.Its technical infrastructure consists of various energy sources, group of energy converters (electrical energy into a heat/cool), loads and ESS.There is a DSO part presented there, with additional external factors and parameters affecting energy demand in the PMG.Since overall energy performance of the PMG is considered in this paper, there are three "energy channels" distinguished there as well.

A Universal Communication Platform and Smart Metering Concept with the BACS
To provide effective management mechanisms and tools for the PMG, the reliable and standardized real-time communication platform is needed.But as it has been mentioned in Section 2.1, there are two main aspects of communication infrastructure dedicated for PMGs.The first one is data exchange between microgrid and the SG.It is commonly based on the classic ICT and networks being in common use and based on the TCP/IP protocol.The second one is internal data exchange among devices and modules connected on the field level within the microgrid structure.To this end, numerous communication protocols and control systems have been developed at international level, among others: KNX, LonWorks, BACnet, ZigBee, X-10, EnOcean, M-Bus, DALI, etc. [25,78].The first three of them are international and open standards of the BACS.They are dedicated for distributed field-level networks and they are very popular in the BEMS and Building Management Systems (BMS) applications.For this paper the LonWorks standard (EN 14908) has been selected as a universal communication platform for proposed solution, with its new Industrial Internet of Things (IzoT) platform.It has been introduced by Echelon Corp. as a next generation of the LonWorks technology [53,67].The IzoT provides capability to use IP communication channel all-the-way in communication among field-level network nodes.These solution is ready to use in the Enernet concept mentioned in Section 2.1.The IzoT platform offers a comprehensive development environment, allowing to build universal network nodes compatible with other nodes and devices in LonWorks networks.Moreover, according to the LonWorks standard requirements, universal functional profiles can be used, providing full interoperability of the IzoT network nodes [60].It allows to easy integrate other devices with interfaces to different communication channels available in the LonWorks standard (e.g., Twisted Pair, Power Line, Radio Frequency) [19,67].Therefore, by implementation of the LonWorks standard with its IzoT new feature, it is possible to propose very universal and unified

A Universal Communication Platform and Smart Metering Concept with the BACS
To provide effective management mechanisms and tools for the PMG, the reliable and standardized real-time communication platform is needed.But as it has been mentioned in Section 2.1, there are two main aspects of communication infrastructure dedicated for PMGs.The first one is data exchange between microgrid and the SG.It is commonly based on the classic ICT and networks being in common use and based on the TCP/IP protocol.The second one is internal data exchange among devices and modules connected on the field level within the microgrid structure.To this end, numerous communication protocols and control systems have been developed at international level, among others: KNX, LonWorks, BACnet, ZigBee, X-10, EnOcean, M-Bus, DALI, etc. [25,78].The first three of them are international and open standards of the BACS.They are dedicated for distributed field-level networks and they are very popular in the BEMS and Building Management Systems (BMS) applications.For this paper the LonWorks standard (EN 14908) has been selected as a universal communication platform for proposed solution, with its new Industrial Internet of Things (IzoT) platform.It has been introduced by Echelon Corp. as a next generation of the LonWorks technology [53,67].The IzoT provides capability to use IP communication channel all-the-way in communication among field-level network nodes.These solution is ready to use in the Enernet concept mentioned in Section 2.1.The IzoT platform offers a comprehensive development environment, allowing to build universal network nodes compatible with other nodes and devices in LonWorks networks.Moreover, according to the LonWorks standard requirements, universal functional profiles can be used, providing full interoperability of the IzoT network nodes [60].It allows to easy integrate other devices with interfaces to different communication channels available in the LonWorks standard (e.g., Twisted Pair, Power Line, Radio Frequency) [19,67].Therefore, by implementation of the LonWorks standard with its IzoT new feature, it is possible to propose very universal and unified communication structure for local network (within microgrid) and for connection of the microgrid to the SG.An example of the PMG with communication and technical infrastructure arranged in accordance to these assumptions is presented in Figure 2.  As shown in Figure 2 implementation of the IzoT provides a new added value to the field-level control and monitoring networks of PMG, where all devices like sensors, actuators and meters, both with legacy communication channels and with the IP channel interfaces, could be easy integrated within one logical structure with unified, standardized data formats.Moreover, with the IzoT platform it is possible to implement various control and monitoring functions on universal modules like Smart Home Micro-Computers (SHMC)-Raspberry Pi and BeagleBone Black [25,53].
An example of the IzoT platform implementation for an universal IoT Energy Meter has been proposed and evaluated by author in [53].Both physical and logical aspects of the implementation have been discussed there.An appropriate functional profile for the IoT Energy Meter has been developed as well, with two functional blocks (an IoT Energy Meter and an IoT Energy Logger) and sets of the standard network variables (NVs) as well as configurations properties (CPs).Both functional blocks introduced there have been considered only in the context of electricity.According to the LonWorks standard [60], the NVs and CPs represent data and settings respectively and they could be easy bind with other NVs and CPs in the BACS based on the LonWorks standard.This way the IzoT platform allows to build unified communication platform for the BACS and BEMS in prosumers microgrids, however the functional blocks with sets of the NVs and CPs are essential for integration process, providing a unified logical and functional interface [80][81][82][83][84].

An Event-Based Control Strategy with a Demand Elasticity Model
As seen in Figure 1, all the main actors involved in the energy management process in the proposed PMG model are classified into four groups.All of them are important to provide an effective control of energy flows within the microgrid, taking into account all the internal parameters and signals affecting the demand and supply levels as well as external information and requirements form the SG side.Therefore, as it has been mentioned before, the effectiveness of the control process depends on real-time information about the state of all the mentioned actors in the BIPMG, in particular the loads, storages and RES.This approach is essential and characteristic for the BEMS with the active DSM, implemented with the BACS control and TBM functions.Herein, it is possible to provide information about even not so significant events in the building and in the microgrid.It allows for better tracking the power consumption as well as users activities, habits [19,85,86].This As shown in Figure 2 implementation of the IzoT provides a new added value to the field-level control and monitoring networks of PMG, where all devices like sensors, actuators and meters, both with legacy communication channels and with the IP channel interfaces, could be easy integrated within one logical structure with unified, standardized data formats.Moreover, with the IzoT platform it is possible to implement various control and monitoring functions on universal modules like Smart Home Micro-Computers (SHMC)-Raspberry Pi and BeagleBone Black [25,53].
An example of the IzoT platform implementation for an universal IoT Energy Meter has been proposed and evaluated by author in [53].Both physical and logical aspects of the implementation have been discussed there.An appropriate functional profile for the IoT Energy Meter has been developed as well, with two functional blocks (an IoT Energy Meter and an IoT Energy Logger) and sets of the standard network variables (NVs) as well as configurations properties (CPs).Both functional blocks introduced there have been considered only in the context of electricity.According to the LonWorks standard [60], the NVs and CPs represent data and settings respectively and they could be easy bind with other NVs and CPs in the BACS based on the LonWorks standard.This way the IzoT platform allows to build unified communication platform for the BACS and BEMS in prosumers microgrids, however the functional blocks with sets of the NVs and CPs are essential for integration process, providing a unified logical and functional interface [80][81][82][83][84].

An Event-Based Control Strategy with a Demand Elasticity Model
As seen in Figure 1, all the main actors involved in the energy management process in the proposed PMG model are classified into four groups.All of them are important to provide an effective control of energy flows within the microgrid, taking into account all the internal parameters and signals affecting the demand and supply levels as well as external information and requirements form the SG side.Therefore, as it has been mentioned before, the effectiveness of the control process depends on real-time information about the state of all the mentioned actors in the BIPMG, in particular the loads, storages and RES.This approach is essential and characteristic for the BEMS with the active DSM, implemented with the BACS control and TBM functions.Herein, it is possible to provide information about even not so significant events in the building and in the microgrid.It allows for better tracking the power consumption as well as users activities, habits [19,85,86].This way information and data exchanged in the BACS provide opportunity to estimate a real energy demand value as a result of the analyses and advanced algorithms in a negotiation process, taking into account the energy price as well.This idea of data and information exchange is presented in Figure 3. into account the energy price as well.This idea of data and information exchange is presented in Figure 3.To tackle these challenges in practice, availability and real-time flow of data are pivotal for a proactive DSM mechanism in PMG.Therefore, the BACS with their event-driven control mechanisms as well as event-triggered control and monitoring functions are proposed in this paper to organize an active and flexible DSM platform.The event-driven mechanism implemented in the BACS provides an opportunity to organize various scenarios of energy monitoring for more accurate measure and estimate a real energy demand value in the microgrid.[19,[87][88][89][90]. Various sensors in the BACS provide signals related to events and leading to a certain reaction, for example switching the lights on upon an incoming motion event.These events represent changes of parameters in the BACS and reflect the states/operating modes of devices, current power level of the RES, users' activities, etc.Finally, they could be correlated with energy demand and supply levels, providing trigger signals for meters, data loggers as well as control modules in the BEMS [19,52,86].Therefore, in BIPMGs, with a high number of sensors and monitoring modules, the event-driven mechanism is a key requirement to develop the active DSM and to provide real-time, reliable data communication as well.
Another part of the effective event-based control strategy for the active energy management in BIPMG is aforementioned algorithm needed in the negotiation process to evaluate the elasticity of energy demand, by predicting the energy price and demand value, based both on real-time and aggregated historical data.As it is mentioned in Section 2.2, the appropriate demand elasticity model taking into account only the electrical energy price changes, has been proposed by Babar et al. in [37] and extended in [4,67].These extensions allow to implement in the model other important parameters changing in time (occupancy and number of persons in the room) and affecting the energy demand as well.In this paper, the author proposes another extension of that model, essential for the BIPMGs applications.
Among the many factors and parameters influencing the effect of microgrids presented in [91], two of them have been selected for solution presented in this paper: (i) readiness of the RES and (ii) state of the energy storages, in particular the state of charge (SOC).Due to the unpredictable nature of the distributed RES and possible different states of charge of energy storage during the day, these factors are important for more accurate demand value forecast and consequently better demand and supply balance within the microgrid.
According to the problem formulation and developments of the demand elasticity model presented in [4,37], the demand elasticity has been defined as the change in demand   at the given time interval   due to the change in the electrical energy price   during the same interval as well as other time intervals {  ∈  ∶  ≠ }, and could be given mathematically as an elasticity coefficient: To tackle these challenges in practice, availability and real-time flow of data are pivotal for a proactive DSM mechanism in PMG.Therefore, the BACS with their event-driven control mechanisms as well as event-triggered control and monitoring functions are proposed in this paper to organize an active and flexible DSM platform.The event-driven mechanism implemented in the BACS provides an opportunity to organize various scenarios of energy monitoring for more accurate measure and estimate a real energy demand value in the microgrid.[19,[87][88][89][90]. Various sensors in the BACS provide signals related to events and leading to a certain reaction, for example switching the lights on upon an incoming motion event.These events represent changes of parameters in the BACS and reflect the states/operating modes of devices, current power level of the RES, users' activities, etc.Finally, they could be correlated with energy demand and supply levels, providing trigger signals for meters, data loggers as well as control modules in the BEMS [19,52,86].Therefore, in BIPMGs, with a high number of sensors and monitoring modules, the event-driven mechanism is a key requirement to develop the active DSM and to provide real-time, reliable data communication as well.
Another part of the effective event-based control strategy for the active energy management in BIPMG is aforementioned algorithm needed in the negotiation process to evaluate the elasticity of energy demand, by predicting the energy price and demand value, based both on real-time and aggregated historical data.As it is mentioned in Section 2.2, the appropriate demand elasticity model taking into account only the electrical energy price changes, has been proposed by Babar et al. in [37] and extended in [4,67].These extensions allow to implement in the model other important parameters changing in time (occupancy and number of persons in the room) and affecting the energy demand as well.In this paper, the author proposes another extension of that model, essential for the BIPMGs applications.
Among the many factors and parameters influencing the effect of microgrids presented in [91], two of them have been selected for solution presented in this paper: (i) readiness of the RES and (ii) state of the energy storages, in particular the state of charge (SOC).Due to the unpredictable nature of the distributed RES and possible different states of charge of energy storage during the day, these factors are important for more accurate demand value forecast and consequently better demand and supply balance within the microgrid.
According to the problem formulation and developments of the demand elasticity model presented in [4,37], the demand elasticity has been defined as the change in demand ∂D i at the given time interval t i due to the change in the electrical energy price ∂P i during the same interval as well as other time intervals t j ∈ T : i = j , and could be given mathematically as an elasticity coefficient: where: T = {t 1 , t 2 , . . .t i , . . .t I }-the analyzed timeframe divided into I equal intervals, d 0 -initial demand value, p 0 -initial electrical energy price.
The extensions taking into account other parameters (not only the price) affecting the demand value and its elasticity, should be considered and proposed in the same way.A general concept of an extended demand elasticity model with the mentioned factors essential for the BIPMGs is shown graphically in Figure 4.The extensions taking into account other parameters (not only the price) affecting the demand value and its elasticity, should be considered and proposed in the same way.A general concept of an extended demand elasticity model with the mentioned factors essential for the BIPMGs is shown graphically in Figure 4.It is necessary to highlight that the mathematical implementation and evaluation of this concept it is not the main aim of this work, and hence it is not addressed in this paper.Since all discussed factors and coefficients can be considered as events in the time domain, the author focused on their implementation in the BACS as universal network variables and standardized control and monitoring functions for the active DSM mechanisms [4,53].Moreover, it should be emphasized that in many solutions proposed and discussed in other scientific works, such functions are implemented as integral elements of dedicated controllers [90], aggregators [17] or power managers.Unlike them, in this paper all the control functions and network variables are defined as open, universal elements of the international LonWorks standard with the IzoT technology and in this way, they could be implemented in any controller or device.They are not integral parts of any dedicated controller or other automation module.Moreover, this concept is ready for implementation in the MAS concept preferred in many energy and demand management solutions [12,67,92,93].

A Standardized Logical and Functional Interface for the Proposed Active DSM in Prosumer Microgrid
In order to integrate control and monitoring functions of various actors in the BIPMG, a unified and standardized logical interface should be provided for the BACS and other automation networks.
As it has been mentioned in Section 3.1, the functional blocks with sets of the NVs and CPs are essential to integrate control and monitoring functions of units within the active DSM platform based on the BACS standard.
Since there are different kinds of energy available in the BIPMG according to the PMG model proposed at the beginning of Section 3, considering implementation of the active DSM with demand elasticity model for the BIPMG, in this paper author propose three new, separate functional blocks for an IoT Demand Elasticity Learner nodes or agents.These blocks are based on general concept of implementation of the demand elasticity model in BEMS presented in [4,67] with new standardized It is necessary to highlight that the mathematical implementation and evaluation of this concept it is not the main aim of this work, and hence it is not addressed in this paper.Since all discussed factors and coefficients can be considered as events in the time domain, the author focused on their implementation in the BACS as universal network variables and standardized control and monitoring functions for the active DSM mechanisms [4,53].Moreover, it should be emphasized that in many solutions proposed and discussed in other scientific works, such functions are implemented as integral elements of dedicated controllers [90], aggregators [17] or power managers.Unlike them, in this paper all the control functions and network variables are defined as open, universal elements of the international LonWorks standard with the IzoT technology and in this way, they could be implemented in any controller or device.They are not integral parts of any dedicated controller or other automation module.Moreover, this concept is ready for implementation in the MAS concept preferred in many energy and demand management solutions [12,67,92,93].

A Standardized Logical and Functional Interface for the Proposed Active DSM in Prosumer Microgrid
In order to integrate control and monitoring functions of various actors in the BIPMG, a unified and standardized logical interface should be provided for the BACS and other automation networks.
As it has been mentioned in Section 3.1, the functional blocks with sets of the NVs and CPs are essential to integrate control and monitoring functions of units within the active DSM platform based on the BACS standard.
Since there are different kinds of energy available in the BIPMG according to the PMG model proposed at the beginning of Section 3, considering implementation of the active DSM with demand elasticity model for the BIPMG, in this paper author propose three new, separate functional blocks for an IoT Demand Elasticity Learner nodes or agents.These blocks are based on general concept of implementation of the demand elasticity model in BEMS presented in [4,67] with new standardized NVs and CPs for electrical energy, heating and cooling demand management respectively.New developed functional blocks are presented in Figure 5.All the network variables represent data and control signals.They are defined as open communication objects according to the list of standard network variable types (SNVT) provided in the EN 14908 standard [60], and they are ready to be integrated and bound with NVs from any other control devices, meters, sensors, etc., compliant to the open LonWorks standard and IzoT technology [82,94,95].In particular, the NVs of functional blocks from Figure 5 can cooperate with the NVs of the IoT Energy Meter and IoT Energy Logger functional blocks mentioned in Section 3.1.For example, the NVs nviEEDemand, nviHeatDemand and nviCoolDemand from the developed functional blocks represent actual electrical energy, heating and cooling demand values respectively.They could be bind with the nvoDemand NVs from smart meters with the IoT Energy Meter functional blocks implemented.This nvoDemand NV contains the registered value of the demand from measurements of the electricity, heating or cooling consumption [53].Other input NVs (with "nvi" prefix in the names) from the developed IoT Elasticity Learner functional blocks presented in Figure 5 correspond to the various events representing changes of parameters, device states or energy price level, having an impact on energy demand.An estimated energy demand value is calculated as a result of an algorithm with a Markov Decision Process (MDP) and a Q-learning machine implemented in the IoT Elasticity Learner agent, according to detail information provided in [4,37].Herein the selected input and output NVs with proposed CPs are in particular related to the energy sources, storages, converters as well as to the DSO signals, available in PMGs as shown in Figure 1.

IoT Electrical Energy Elasticity Learner
In the IoT Electrical Energy Elasticity Learner presented in Figure 5a, the NV nviEEPrice allows one to provide information about changes in an electrical energy price, according to information from the DSO.For example, a higher energy price can stimulate changes in load profile for the BIPMG and load shifting by switching different electrical loads on or off in particular periods.The next NV nviOccupancy is related to the presence of persons in rooms in the buildings and affects calculated value of expected energy demand depending on occupancy.The NVs nviPV ready and nviWT ready are correlated with the CPs cpPVPowerLevel and cpWTPowerLevel, providing event-triggered information about appropriate power level from the PV and wind turbine as well as its availability in the microgrid power supply system.This information significantly affects the estimated energy demand value in a context of energy sources diversification within the BIPMG and reducing external (from the main grid) energy consumption.The next NV nviEEStorageState in correlation with the CPs cpEEStorageMax and cpEEStorageMin provides event-triggered information related to the SOC of the electrical energy storage and its availability in the BIPMG.The both CPs allow to set maximum and minimum values for the SOC of the storage module.Additionally, the cpEESOCdelta provides send condition for the NV, depending on significant change of the SOC of the electrical energy storage.Last but not least two NVs nviACDemand and nviDCDemand are designed to support data from additional (optional) smart energy meters dedicated to the AC and DC electrical energy supply systems, separated within the microgrid.It is important since various AC and DC components (sources, loads, storages) are often and often connected directly to subgrids and microgrids, primarily to avoid unnecessary power conversion stages and to increase the overall efficiency.Thus, the hybrid AC-DC power architecture implemented in microgrids improves the reliability and power quality of the overall system [18,40,41].
There are three separated output NVs for expected (estimated) energy demand values in the IoT Electrical Energy Elasticity Learner.The first one nvoEEExpDemand is related to the overall expected electrical energy demand, based on information from the input data and events.The next two-nvoACExpDemand and nvoDCExpDemand-represent expected electrical energy demand for the AC and DC supply systems respectively.The nvoEEStorageSwitch is proposed for direct control of storage module, according to demand analysis results, taking into account among others the input NV nviEEStorageState and providing the state of the relay actuator to connect or disconnect the storage module.The last one output NV nvoStatus is implemented to provide information about activated demand calculation algorithm as well as control and operating mode, etc.It has the same meaning for all of the proposed functional blocks.

IoT Heating Elasticity Learner
In the next functional block-the IoT Heating Elasticity Learner presented in Figure 5b, the NV nviEEPrice provides information about changes in the electrical energy price, according to information from the DSO.It is important, since the heat is generated in energy converters as well and it should be taken into account in heating demand management.The next input NV nviOccupancy is related to the presence of persons in rooms in the buildings affecting a calculated value of expected heating demand.The input NVs nviSolColl_ready and nviBoiler_ready are correlated with the CPs cpSolColTempTrigg and cpBoilerTempTrigg respectively and provide event-triggered information about appropriate temperature levels of heat generated by the solar collectors and boiler, indicating their availability in the microgrid heating system.The next two NVs nviHeatPump_ready and nviGasT_available have been proposed to provide signals about availability of the heat pump and gas turbine in the BIPMG as well as their readiness to provide heat into the heating system.The last one input NV nviThermStorageState correlated with the CPs cpTHStorgaeMax and cpTHStorageMin provides an event-triggered information related to the thermal storage capacity and its availability in the BIPMG to control and balance the heating demand value.Additionally, the cpTHSCdelta provides send condition for the NV, depending on significant change of the thermal storage capacity.
The main output NV nvoHeatExpDemand provides a calculated value of expected heating demand taking into account appropriate input NVs and CPs.The next output NV nvoHeatStorSwitch is proposed for direct control of thermal energy storage module, according to demand analysis results and taking into account the input NV nviThermStorageState.

IoT Cooling Elasticity Learner
In the last functional block-the IoT Cooling Elasticity Learner presented in Figure 5c, the NV nviEEPrice provides information about changes in the electrical energy price, according to information from the DSO.Like in the previous functional block it is important data, since the cool is generated in energy converters and the electrical energy price should be taken into account in cooling demand management.The next input NV nviOccupancy like previously represents the event-people presence, affecting a calculated value of expected cooling demand.Another two input NVs nviVapChill_available and nviAbsChill_available provide information about availability of the vapor compression chiller and absorption chiller as well as their readiness to provide a cool into the cooling system.These NVs are correlated with the two CPs cpVapChillTempTrigg and cpAbsChillTempTrigg proposed to set the highest temperatures possible to generate by the chillers as the triggers for events affecting cooling demand.The last one input NV nviThermStorageState correlated with the CPs cpTHStorgaeMax and cpTHStorageMin provides event-triggered information related to the thermal storage capacity and its availability in the BIPMG to control and balance the cooling demand value.Like previously, the cpTHSCdelta provides send condition for the NV, depending on significant change of the thermal storage capacity.
The main output NV nvoCoolExpDemand provides a calculated value of expected cooling demand taking into account input NVs and CPs.The next output NV nvoCoolStorSwitch is proposed for direct control of thermal energy storage module.
All these input and output NVs and CPs discussed above are only selected groups of possible sets of data, signals and settings that could be implemented in various BIPMGs, depending on their architectures, installed devices, energy sources, converters and storages.A selection of the NVs and CPs as well as related control functions should be discussed and analyzed individually for each application.However, the NVs and CPs proposed in this paper, with their functional blocks showed in Figure 5, build advanced, open and universal data exchange environment, allowing to control and monitor various parameters, events and finally to organize a fully integrated, active and flexible DSM platform for the BIPMGs.In particular, they could be used to improve effectiveness and energy efficiency of the BIPMGs discussed in the next section.

Energy Efficiency Improvements in the Prosumer Microgrid with the BACS
An active and flexible DSM provides tools and procedures for effective energy management within BIPMGs as well as for cooperation with external SG services.However, an implementation of the active DSM in BIPMGs with the BACS and their control and TBM functions as well as with the developed functional blocks proposed in the previous section, offers new additional possibilities in energy efficiency improvements discussed in this section.Moreover, these potential improvements can be roughly estimated to simplify the active DSM design and evaluation procedures.

BACS and TBM Functions Affecting Energy Efficiency of Prosumer Microgrids
According to the EN 15232 standard, an implementation of the BACS control and TBM functions in the BIPMG, provides an effective control of its infrastructure and has an impact on its energy performance.The most common BACS and TBM functions having an impact on the energy performance of buildings have been mentioned in Section 2.3.They are described and discussed in detail in the EN 15232 standard.In this paper, the author is focused on thermal and electric energy performance, taking into account the BACS control and TBM functions of energy sources/generators.Therefore, lists of selected BACS control functions with assignment to the BACS efficiency classes introduced in the EN 15232 and described in Section 2.3 are given in Tables 1 and 2 [28].Control functions of electrical energy sources are not discussed in the EN 15232 standard.All electrical energy efficiency improvements discussed there consider only the control functions of electrical loads and they are not in main focus of this paper.Nevertheless, it can be assumed that implementation of the proposed active and flexible DSM with the electric energy demand estimation and control, provides additional value and affects the energy performance of the BIPMG.It allows to better control electrical loads in buildings as well, taking into account for example occupancy and energy price (tariff) signals.
As seen in Table 2 the interlock between heating and cooling control functions is crucial to obtain the highest BACS efficiency class.The functional blocks proposed in Section 3.3 provide standardized NVs to organize logical bindings and feedbacks to interlock not only the heating and cooling, but other subsystems in the BIPMG.These features allow to build a fully distributed and integrated energy management platform within the BIPMG.Moreover, the EN 15232 standard provides guidelines for the TBM functions with respect to the BACS.There are two kinds of the TBM mentioned in the standard: (i) detecting faults of building or home systems and providing tools to support the diagnosis of these faults as well as (ii) reporting information regarding energy consumption, work parameters of devices, indoor conditions and improvement possibilities.In this respect, the TBM functions can provide information about operation, maintenance as well as management of the BIPMG, in particular for energy management-measurement, recording trending, alarming, and diagnosis of unnecessary energy use [28].Implementation of these features is possible with the solution proposed in this paper and allows to obtain the BACS efficiency class A (the highest class) according to the EN 15232 guidelines.

An Estimated Impact of BACS and TBM Functions on Thermal and Electric Energy Performance
As mentioned in previous subsections, the EN 15232 standard introduces four different BACS efficiency classes with the list of the BACS and TBM functions that can affect the energy performance of BIPMGs.Moreover, this standard introduces a simplified BACS factor method for estimating the energy savings due to the application of the BACS and TBM functions.This method gives a rough estimation of the impact of BACS and TBM functions on thermal and electrical energy performance of buildings according to the efficiency classes A, B, C and D defined in the standard [28].The BACS factor method is especially appropriated to the early design stage of the BIPMGs to evaluate potential improvements and savings in energy consumption.
The BACS efficiency factors defined and described in detail in the EN 15232 standard are classified depending on the building type as well as the BACS efficiency classes related to [28].Since there are various building types discussed in the standard, in this paper the author selected a few of them having the greatest potential to improve energy efficiency.It is important to note that the factors for the BACS efficiency class C are defined with the value 1 (reference class) and this class correspond to a standard functionality of BACS and TBM system, according to requirements defined in the standard.Moreover, the BACS efficiency class D (the lowest class) is defined in the EN 15232 standard and it corresponds to non-energy efficient BACS.All existing buildings with such systems should be retrofitted and new buildings should not be built with such systems [28].Overall BACS efficiency factors related to the selected building types and the BACS efficiency classes are presented in Table 3.Since the heating and cooling systems are usually the most energy-intensive ones, additional and more detailed BACS efficiency factors are provided in the EN 15232 standard with respect to them.They have a significant share in the aforementioned overall factors and strictly depend on the BACS control and TBM functions discussed in previous subsection.To compare and identify this share, the selected BACS efficiency factors for heating and cooling are given respectively in Table 4.As seen in Table 4, in some cases the factors for cooling are not provided in the EN 15232 standard.It should be mentioned that according to the standard the BACS efficiency factors were calculated based on the results delivered from a large set of simulation runs, conducted with the TRNSYS tool (Thermal Energy System Specialists, Madison, WI, USA) for building energy simulations.The impact of different BACS and TBM functions on the energy performance of buildings has been determined by comparing the annual energy consumptions of a standardized room (according to the Energy Performance and Building Directive EPBD 2006) for different BACS and TBM functions and control scenarios representing the BACS efficiency classes, described in the EN 15232 standard [28].

A Discussion of Potential Energy Efficiency Improvements in Prosumer Microgrids with the BACS
The BACS efficiency factors presented in the Tables 3 and 4 show a great potential in energy efficiency improvements as a consequence of appropriate implementation and integration of the BACS with control and TBM functions.Potential energy savings are the greatest for these building types where the energy consumption and heating/cooling demand are significantly changing in time and directly depend on users' activities, occupancy level and other changeable parameters (daylight level, indoor/outdoor temperature).In general, overall energy consumption can be reduced by 20% to 25% for the control and monitoring systems with the BACS efficiency class A. With respect to heating, a potential reduction may be about 20%.Very interesting are the BACS efficiency factors for cooling in hotels and offices approaching level 25% even up to 40% of energy savings.These results sound great, but they are not obligatory and should be evaluated and validated for each application individually as it is described and explained in [74,79,96].
Moreover, to obtain the presented potential savings, various technical and engineering conditions must be met.First of all, the full integration both on the physical layer (hardware, communication interface, etc.) and the functional layer (types of functions, network variables, etc.) should be provided for all the actors (sensors, actuators, controllers) in the BIPMG.All the sensors, actuators and controllers should be able to interact, communicate their signals and parameters in real time as well as realize most of the control and monitoring functions directly on the field level, in fully distributed control architecture.This approach is in line with a fog computing paradigm mentioned in Section 2.1.These are the main assumptions to organize the BACS control and TBM functions in accordance to the BACS efficiency class A requirements and to provide the best results in energy efficiency improvements.The controllers of rooms, devices and energy generators integrated within the BIPMG control network should be able for demand controlled HVAC (e.g., adaptive set point based on sensing of occupancy, air quality, etc.) and energy generators, including additional integrated functions for multi-discipline interrelationships between the HVAC and various BIPMG services (e.g., electricity, lighting, solar shading, energy storage, AC and DC supply, etc.) [28].The functional blocks proposed in Section 3.3 are ready to address these challenges.All the NVs and CPs have been selected and developed according to the BACS control and TBM functions requirements for the BACS efficiency classes.It opens the way to obtain the mentioned improvements in energy performance within BIPMGs.
Note that according to the EN 15232 standard the best and the greatest energy efficiency improvements are defined for the BACS efficiency class A. However, to obtain this class in the BIPMG, all the control functions (not discussed in this paper) should be organized according to the requirements defined in the standard, since if any of them is not-it determines lower BACS efficiency class for the whole system.Therefore, the energy sources with appropriate control functions are considered in the standard as well and they should be taken into account in overall BACS design and integration process.The functional blocks developed in this paper can help to integrate appropriate NVs and CPs as well as advanced control and monitoring functions.

Conclusions and Future Works
Along with the growing penetration of the RES and distributed energy generation with BIPMGs in the SG structure, effective demand side management mechanisms that can actively monitor and control the energy use and power flows within the microgrids have also received more attention.In this paper, a novel approach to organize an active, event-based DSM mechanism, dedicated to BIPMGs, with universal communication platform based on the BACS and IoT technology has been presented.A BACS-specific event-triggering control mechanism has been adapted to effectively trigger control and monitoring functions of devices, energy sources and storages within the BIPMG.This adaptation allowed to use a demand elasticity model as well as to extend its application field, taking into account various parameters and signals provided by all the main actors involved in the energy management process within the BIPMG.
Furthermore, in order to implement learning and calculating algorithms of the augmented demand elasticity model, in the context of RES and energy storages control and monitoring functions, three new universal functional blocks have been developed, according to the requirements of the building automation standards.This concept of a universal and standardized logical interface including standard NVs and CPs, simplifies application as well as integration of the proposed control and monitoring functions into the BACS networks and opens the way to interact with other devices of building and BIPMG infrastructure.The mentioned integration allows automation engineers to organize more advanced, automated, active and flexible DSM platforms, ready for introduction of new SG services, IoT technology as well as TE mechanisms.Moreover, since the BACS with their control and TBM functions have an impact on the energy performance of buildings, potential energy efficiency improvements in BIPMG with the active DSM based on the BACS have been discussed, in the context of a new application field of the EN 15232 standard guidelines.According to the BACS efficiency factors defined in the EN 15232 standard, the proposed approach and the concept of active DSM based on the BACS with TBM, offer significant potential energy savings, but they strictly depend on advancement of the control and monitoring functions as well as their integration level.As it is mentioned in Section 4.3 they should be always analyzed individually.Therefore, the concept presented in the paper is still being developed and the BACS efficiency factors related to it are going to be verified for specific applications.
Future works include: (i) development of various control and management strategies with the proposed functional blocks; (ii) realization and field testing of the developed active DSM strategies in specifically designed experimental microgrid, equipped with the controllers and sensors integrated within the BACS as well as (iii) experiments in selected real microgrids.

Figure 1 .
Figure 1.A model of a prosumer microgrid architecture with technical infrastructure and power (energy) flow channels.

Figure 1 .
Figure 1.A model of a prosumer microgrid architecture with technical infrastructure and power (energy) flow channels.

Energies 2017 ,
10, 1771 8 of 22 communication structure for local network (within microgrid) and for connection of the microgrid to the SG.An example of the PMG with communication and technical infrastructure arranged in accordance to these assumptions is presented in Figure 2.

Figure 2 .
Figure 2. A communication and technical infrastructure of prosumer microgrid with its connection to the external smart grid and services.

Figure 2 .
Figure 2. A communication and technical infrastructure of prosumer microgrid with its connection to the external smart grid and services.

Figure 3 .
Figure 3. Data flows and processing in the active DSM with a negotiation mechanism dedicated for a prosumer microgrid.

Figure 3 .
Figure 3. Data flows and processing in the active DSM with a negotiation mechanism dedicated for a prosumer microgrid.

Figure 4 .
Figure 4.An extended demand elasticity model with selected factors pivotal for prosumer microgrids.

Figure 4 .
Figure 4.An extended demand elasticity model with selected factors pivotal for prosumer microgrids.

Figure 5 .
Figure 5. Developed IoT Demand Elasticity Learner functional blocks: (a) for electrical energy DSM; (b) for heating DSM; (c) for cooling DSM.

Table 1 .
The selected BACS control and TBM functions of heating sources/generators.

Table 2 .
The selected BACS control and TBM functions of cooling sources/generators.

Table 3 .
The selected overall BACS efficiency factors-non-residential and residential buildings.

Table 4 .
The selected BACS efficiency factors for heating and cooling-non-residential and residential buildings.(Heat-Heating, Cool-cooling).