Internet of Things Applications as Energy Internet in Smart Grids and Smart Environments

: Energy Internet (EI) has been recently introduced as a new concept, which aims to evolve smart grids by integrating several energy forms into an extremely ﬂexible and e ﬀ ective grid. In this paper, we have comprehensively analyzed Internet of Things (IoT) applications enabled for smart grids and smart environments, such as smart cities, smart homes, smart metering, and energy management infrastructures to investigate the development of the EI based IoT applications. These applications are promising key areas of the EI concept, since the IoT is considered one of the most important driving factors of the EI. Moreover, we discussed the challenges, open issues, and future research opportunities for the EI concept based on IoT applications and addressed some important research areas.


Introduction
The most recent data [1][2][3] show that fossil-based resources are going to fade away in the near future.Therefore, it has led to a variety of concerns in both academia and industry to discover efficient ways of ensuring sustainable energy in the future.These concerns are generally originated from greenhouse gas emission [4], energy cost [5], and security of distributed generation (DG) systems [6][7][8].A new concept called "Energy Internet" has been recently introduced to deal with these challenges.Energy Internet (EI) vision tends to overcome some important challenges, such as improving sustainable and eco-friendly energy sources, new models for hybrid energy sources, more secure and effective energy management, and control systems [9].The EI that is also considered as the smart grid evolution purposes a sustainable computing platform by combining different energy types in an extremely flexible grid structure.The idea behind EI is similar to the internet concept and is inspired by the essential principles of internet development for the energy field.
Even though EI was first introduced more than a decade ago, a wide consensus has not been achieved about the concept [10].The EI is considered an energy management system (EMS), covering conventional power grids and DG sources in [11].The E-energy concept combines information and communication technologies (ICT) with energy systems to create the EI, according to the study presented in [12].As a general definition, an EI system is composed of the combination of three important components that are energy systems, network systems, and ICT systems.In addition, these subsystems are connected to each other over energy routers, which comprise the main section of EI infrastructure.The energy routers are able to manage data and energy flow between these systems.The energy router idea is firstly proposed in [13], where they have two significant targets.While one of these targets is to perform dynamic scheduling of energy flows, the other is to enable communication with power devices.Different proposals related to system designs are reported in [14][15][16][17].The use of communication technologies in EI is quite crucial to accomplish the goals of this vision.Therefore, ICTs are intensely adapted for enabling monitoring, controlling, and management processes in the EI concept.The wired and wireless communication technologies, such as ZigBee, WiMAX, cognitive radio, cellular communications, and the software-defined network (SDN), which are managed via the network system, are applied in the EI system to carry out monitoring, controlling, and management transactions in real-time [10].One of the most recent communication technologies is the Internet of Things (IoT) [18,19] that has provided the development of numerous different communication protocols.The IoT can be exploited to ensure communication between devices employing dissimilar data types.Moreover, in order to present a communication platform in both machine-to-machine (M2M) and human-to-machine (H2M) environments, IoT technologies utilize several communication mediums, protocols, and layer architectures.
A number of studies researching EI are available in the literature, which is only focused on the architecture of energy routers, techniques for system integration, SDNs, and big data analysis in the EI.To the best of our knowledge, any study surveying IoT applications in smart grids and smart environments has not been presented so far.We intend to present a comprehensive analysis of IoT applications in smart grids, smart cities, smart homes, smart metering, and EMSs to provide a further understanding of the EI concept.It is expected that these application areas will be promising key areas of the EI since IoT will be one of the most important driving factors of the EI.In light of this vision, our primary aim is to analyze IoT applications in the smart grids and smart environments and examine their potential contributions for the EI.Furthermore, the main contributions of our paper can be summarized as follows:

•
We provide a comprehensive discussion for IoT applications in smart grids and give a comparison for ICTs utilized in these applications.

•
We investigate IoT applications for smart cities, several challenges, and their potential solutions.

•
We discuss smart home applications based on IoT technologies and highlight communication structure and security background.

•
We provide a detailed discussion for smart metering and energy management applications in IoT systems.

•
We also provide a detailed discussion for open research topics of future IoT systems.
The rest of our paper is organized as follows.Section 2 provides a detailed analysis of IoT-based smart grid applications.Section 3 presents the application backgrounds of IoT systems in smart cities by providing practical application examples.While Section 4 investigates IoT applications for smart homes, Section 5 discusses IoT for smart EMSs.Section 6 presents research challenges and future trends of IoT systems.Conclusions are given in Section 7.

IoT-Based Applications for Smart Grids
The IoT is one of the most recent emerging communication technologies, which is composed of data acquisition, processing, transmission, and storage stages to provide a more robust and efficient communication system.The information societies desire an immediate of the latest state of technologies concerned with their life to control energy sources, electric vehicles (EVs), and homeappliances and observe consumption rates of electricity, water, and gas.The IoT technology has several advantages compared to other communication technologies.One of them is its ability to provide several specific communication and network structures for complex and heterogeneous communication scenarios.Another is that it can provide a more efficient use of devices by decreasing power consumption and cost.Furthermore, service providers also need ICT technologies for ensuring service sustainability.The recent developments acquired on the IoT have encouraged operators, service providers, and developers to utilize IoT technology in smart grids and other smart environments, such as smart cities, smart buildings, smart homes, and so on [20][21][22][23][24][25][26].In this section, we have comprehensively analyzed communication and network structures of IoT technologies.A number of novel communication technologies containing a low power wide area network (LPWAN), LTE, LTE-A, and narrowband IoT (NB-IoT) have been proposed, as well as ZigBee and Bluetooth low energy (BLE) technologies.The major improvement of these technologies is a long-range communication opportunity over unlicensed bands.The most important LPWAN technologies are LoRa, provided by Semtech, Ultra Narrow Band (UNB) improved by SigFox, Weightless, improved by Neul, LTE machine-type communications (LTE-M), and NB-IoT, provided by 3GPP [27][28][29][30].The detailed comparison schemes for the popular communication technologies that are used in IoT are illustrated in Figure 1a,b.As can be seen from the schemes, it is obvious that the LPWAN presents remarkable advantages in terms of cost, coverage area, number of station requirements, range, and power consumption.These outstanding advantages of LPWAN make it convenient for end-user IoT applications with low cost, low power consumption, and increased coverage areas.The LoRa and UNB are the most widely utilized LPWAN technologies, due to exploiting unlicensed frequency bands.The LoRaWAN, which is designed as a specific protocol for LoRa, supports star and cellular topologies.The end-devices connected to the network over gateways are run in call mode for reducing energy consumption [29,30].The development of this technology is essentially based on two layers;the physical (PHY) layer and media access control (MAC) layer [31,32].While the chirp spread spectrum (CSS) modulation method is utilized in the PHY layer, LoRaWAN protocol is designed for the MAC layer.Due to these advantages, LoRa has been widely preferred in several metering, monitoring, and management applications.As mentioned before, another developing technology is UNB, whichis widely utilized in smart meters (SMs) and home appliances, due to its low-power end device supporting advantage.The UNB adopts cellular technology running in either sub-GHz frequencies with BPSK modulation or differential BPSK (D-BPSK) modulations at 868/902 MHz frequencies.It can support 400 channels by splitting the spectrum into sub-channels [30,31].
Contrary to LoRa and SigFox, 3GPP has focused on IoT machine-type communication (MTC) technologies operating in the licensed cellular frequency band.The first IoT technology provided by 3GPP was LTE-M in Release 12.After the LTE-M, a new technology called NB-IoT was introduced in Release 13.In NB-IoT technology, while orthogonal frequency-division multiplexing access The end-devices connected to the network over gateways are run in call mode for reducing energy consumption [29,30].The development of this technology is essentially based on two layers;the physical (PHY) layer and media access control (MAC) layer [31,32].While the chirp spread spectrum (CSS) modulation method is utilized in the PHY layer, LoRaWAN protocol is designed for the MAC layer.Due to these advantages, LoRa has been widely preferred in several metering, monitoring, and management applications.As mentioned before, another developing technology is UNB, whichis widely utilized in smart meters (SMs) and home appliances, due to its low-power end device supporting advantage.The UNB adopts cellular technology running in either sub-GHz frequencies with BPSK modulation or differential BPSK (D-BPSK) modulations at 868/902 MHz frequencies.It can support 400 channels by splitting the spectrum into sub-channels [30,31].
Contrary to LoRa and SigFox, 3GPP has focused on IoT machine-type communication (MTC) technologies operating in the licensed cellular frequency band.The first IoT technology provided by 3GPP was LTE-M in Release 12.After the LTE-M, a new technology called NB-IoT was introduced in Release 13.In NB-IoT technology, while orthogonal frequency-division multiplexing access (OFDMA) is utilized for downlink, single-carrier frequency division multiple access (SC-FDMA) is exploited for uplink connections.The maximum data rate of the NB-IoT is typically 1 Mbps over 1.08 MHz bandwidth, which is approximately six-fold of the LTE systems.In spite of LTE-M, NB-IoT serves by employing tail-biting convolutional coding for the downlink connections, which eliminates complex decoding requirements at the user equipment [29,30,33,34].The main characteristics and detailed comparisons of leading LPWAN technologies are listed in Table 1.Furthermore, we have depicted EI infrastructure combining with the IoT and SG concepts in Figure 2. The presented EI infrastructure covers the combination of several application scenarios, where smart city operations, smart home automation systems, and energy-harvesting systems are included by considering metering, monitoring, and management processes.Furthermore, this figure covers all layers of the IoT technology.

IoT Applications in Smart Cities
Recently, the smart city concept has been enabled in several application areas in which this concept aims to improve life quality by decreasing costs [21,35].Generally, the urban IoT expression is employed to define the smart city concept for some situations.The application areas of the IoT, urban IoT, and EI are mainly focused on public services, such as intelligent monitoring and management of transportation systems, EMSs, healthcare services, and structural health monitoring (SHM) systems, etc. [21,25,[35][36][37].On one hand, the requirements for predicting, monitoring, and management systems have intensely increased in recent years due to environmental concerns.On the other hand, urban IoT systems have provided some developments to cope with these requirements, covering geographical information systems (GISs), management information systems (MISs), environmental information systems (EISs), and global positioning systems (GPSs).The EIS is analyzed and an integrated information system (IIS) is recommended for observing environmental conditions in [38].Kelly et al. have suggested a monitoring system for home appliances in [39], where they have utilized ZigBee communication systems for creating WSN infrastructure.A systematical approach for IoT applications of smart cities has been proposed in [21,25,[35][36][37], where authors classified smart city application areas into five categories: Governments, buildings, mobility, energy, and water.These studies related to IoT applications are realized by adapting the system configuration structure similar to the depicted in Figure 2. SHM is a novel application type developing currently, and this application combines available systems for estimating risk levels.This categorization process is carried out by five important steps called detection, localization, classification, assessment, and prediction, respectively [21,36].The urban classified smart city application areas into five categories: Governments, buildings, mobility, energy, and water.These studies related to IoT applications are realized by adapting the system configuration structure similar to the depicted in Figure 2. SHM is a novel application type developing currently, and this application combines available systems for estimating risk levels.This categorization process is carried out by five important steps called detection, localization, classification, assessment, and prediction, respectively [21,36].The urban IoT applications are generally focused on monitoring and controlling industrial plants, houses, and so on.A patented web-based automation system operating for urban IoT applications is Building Automation and Control Networks (BACnet), which is presented as an alternative technique to ZigBee or WSN-based applications.It is pointed out in [35] that BACnet can present some additional IP technology options, according to ZigBee systems.For instance, BACnet exploits virtual link layers (VLLs) to integrate network and transport protocols.
The smart city concept needs to cope with various important challenges as mentioned before.Lynggaard and Skouby suggested a layer structure model for the smart city concept in [40], where this model is called a smart city infrastructure (SCI) and is established based on four major layers.The first layer defined is based on IoT to fulfill several processes, such as context management, computational procedures, and ICT infrastructures.The second layer includes a smart home system, which combines smart devices with user interfaces by means of a server.The third layer is characterized as the Cloud of Things (CoT), which integrates smart home and smart city services placed in the final layer of the SCI.The last layer comprises further service structures, resource management infrastructure, and integration with communication systems [40].This system is described as the cyber-physical system (CPS) enabling IoT (IoT-CPS) in [41], in which authors have taken into account several application scenarios for air traffics, traffic control systems, and environmental monitoring and control systems.It is important to specify that a well-designed CPS system can remarkably improve both the energy efficiency and safety of the smart city concept and the comfort of smart homes.Energy-based smart city applications are considered in [42], which authors analyzed energy-related applications of smart cities depending on several parameters, such as energy generation, storage, infrastructure, facilities, and transport (mobility).An energy management and test system for analyzing novel control policies in the smart city concept is presented in [43], in which the combination case of heterogeneous data sources are also considered.
The recommended middleware in this study ensures interoperability of heterogeneous systems containing building information models (BIMs), GISs, and system information models (SIMs).On the other hand, when practical applications of the smart city concept are analyzed, it is shown that various urban IoT applications are developed in several locations.A set of IoT applications related to lighting, mobility, and public applications are launched in Amsterdam, The Netherlands to enhance living and working quality.New concepts and innovations based on network-enabled LED lightning have been proposed by Philips and Cisco for smart city applications [44].Another smart city application is the City 24/7 smart screen project, which is being developed in New York, USA to present an information platform.In this project, smart screens that can be connected over Wi-Fi systems are utilized to broadcast associating audio, voice, and touch screen technologies.In addition, another application of smart cities is realized in Nice, France.In this application, four major services are considered that are related to smart transportation, smart lighting, smart waste management, and smart environmental monitoring [44].

IoT-Enabled Applications for Smart Homes
A smart home management system (SHMS) is composed of many numbers of smart devices and smart things that are able to communicate with a central system.This central system can be characterized through various terms called, for example, the home gateway, distributed services middleware, gateway, and integrator, the ZigBee-based intelligent self-adjusting sensor (ZiSAS), and so on [23,45].Although different terms are utilized in applications, the procedures realized by SHMS systems are the same, and they collect observing data from sensors and smart things, then control devices by conveying commands.In addition, if a crucial change occurs, the SHMS systems inform users about this situation.Hafidh et al.,in [23], analyzed some SHMS systems integrating hardware and software infrastructures.The control structure of SHMS systems is generally conducted based on two types of systems, which are composed of mobile applications and IoT middleware structure [45][46][47][48].
Owing to the energy consumption levels of residential users, the US government has enforcedmaintainence of an important insistence on the demand response (DR) management.Because of this persistence, home load management systems (HLMSs) have been developed.Hence, consumers can benefit from DR programs while reducing waste consumptions.In addition, integrating HLMS modules to users' SMs can provide obtaining autonomous agents of the framework [49].The SHMS and HLMS systems authorize customers to increment efficiency.Moreover, customers can obtain several benefits from service providers by joining their special programs to reduce energy costs.On the other hand, governments and service providers can obtain benefits from DR programs because of SHMSs and HLMSs [50,51].
The SHMS contains a particular management type which is occasionally defined as the home energy management system (HEMS).The main goals of the HESM are related to demand side management (DSM) and DR control.Even though both of these systems are generally considered the same, this assumption is not true.While the DSM aims to increment the efficiency of electricity consumption, the DR's target is to vary users' habits in order to decrease electricity consumption indirectly.The DR methods can generally be classified into two categories: Price-based programs (PBPs) and incentive-based programs (IBPs).The IBP contains well-known methods fir direct load control and capacity market categories.On the other hand, the PBP includes critical peak pricing (CPP), time-of-use (TOU), and real-time pricing (RTP), which are indirect methods affecting electricity consumption habits.
The network communication in smart home systems is conducted through serial area networks, such as a neighborhood area network (NAN).A neighborhood area contains smart home groups and data aggregators in a specified area.The combination of smart devices such as SMs, distributed energy resources (DERs), loads, and energy storage devices form a typical NAN structure.The SMs that offer the two-way wireless communication feature are very important components of the NANs [50,52,53].As can be seen from Figure 2, the collected data from several networks are conveyed to monitor and control centers, thanks to gateways.It is important to note that SHMSs can be set up in a layer form similar to the other IoT applications.The combination of PHY and MAC layers are generally introduced as device layers, where sensors, actuators, smart things, and gateways are intensely exploited [54].The network layer is comprised of various wired and wireless communication networks, HAN, and NAN structures, as can be depicted in Figure 2. In addition, Figure 3 illustrates the protocols and services explained above, which are exploited to carry out data acquisition and collecting operations.The management layer is a special layer that combines cloud and management services.The last layer, the application layer, ensures necessary services and interfaces to end-users.This layer also covers energy-based management applications required for DSM, DR, and dynamic pricing.There are several studies in the literature related to the security of IoT-based smart home applications.The study in [55] analyzed security and authentication issues of smart home systems.A constrained application protocol (CoAP)-based non-IP SHMS structure is recommended in [56].Entire devices and applications available in smart home applications can utilize secure IoT protocols, such as a CoAP, a hypertext transfer protocol secure (HTTPS), message queue telemetry transport (MQTT), and an extensible messaging and presence protocol (XMPP).

Smart Energy Metering and Management Applications Based on IoT
Metering and monitoring applications of SG are taken into account as one of the first and most important application areas of IoT infrastructure [57].The SG concept aims to present a cost-effective, more secure and reliable system by combining IoT infrastructures.In order to integrate SG stages with IoT networks, a plenty number of researches have been conducted [22,26,[58][59][60][61][62][63][64][65][66][67][68][69][70].Several estimation algorithms, which can be employed to monitor intermittent energy sources, are investigated to present the microgrid model, including the IoT communication method in [22,71].A wind energy conversion system (WECS) integrating the SCADA system with the IoT-CPS system is reported in [67].When the studies related to each stage of the SG systems, such as generation, transmission, and distribution, are clearly indicated, it means that traditional communication methods are still being exploited in the SG applications.The WAN backbones are widely utilized for a large part of SG generation and transmission stages.However, it is expected that the emerging IoT system will take over the communication network structure of the SG in the near future.Contextaware sensor technology is one of the developing topics providing interactive network communication between the whole subsystems of the IoT network.In order to improve DSM efficiency, Chiu et al. reported a time-dependent dynamic pricing approach for SG systems in [69], in which authors have taken into account the environmental benefits of renewable energy sources.The SMs have the ability to provide customer and service providers for observing consumed energy values efficiently by the help of the two-way communication feature.Advanced metering infrastructure (AMI) networks consist of a great number of SMs and a number of gateways that are set up for operating in single or multi-hop networks.The AMI is included in the NAN structure, where it is adopted as an element of the SG customer side.The self-organization and selfconfiguration advantages of wireless mesh networks (WMNs) are important inspirations for the

Smart Energy Metering and Management Applications Based on IoT
Metering and monitoring applications of SG are taken into account as one of the first and most important application areas of IoT infrastructure [57].The SG concept aims to present a cost-effective, more secure and reliable system by combining IoT infrastructures.In order to integrate SG stages with IoT networks, a plenty number of researches have been conducted [22,26,[58][59][60][61][62][63][64][65][66][67][68][69][70].Several estimation algorithms, which can be employed to monitor intermittent energy sources, are investigated to present the microgrid model, including the IoT communication method in [22,71].A wind energy conversion system (WECS) integrating the SCADA system with the IoT-CPS system is reported in [67].When the studies related to each stage of the SG systems, such as generation, transmission, and distribution, are clearly indicated, it means that traditional communication methods are still being exploited in the SG applications.The WAN backbones are widely utilized for a large part of SG generation and transmission stages.However, it is expected that the emerging IoT system will take over the communication network structure of the SG in the near future.Context-aware sensor technology is one of the developing topics providing interactive network communication between the whole subsystems of the IoT network.In order to improve DSM efficiency, Chiu et al. reported a time-dependent dynamic pricing approach for SG systems in [69], in which authors have taken into account the environmental benefits of renewable energy sources.
The SMs have the ability to provide customer and service providers for observing consumed energy values efficiently by the help of the two-way communication feature.Advanced metering infrastructure (AMI) networks consist of a great number of SMs and a number of gateways that are set up for operating in single or multi-hop networks.The AMI is included in the NAN structure, where it is adopted as an element of the SG customer side.The self-organization and self-configuration advantages of wireless mesh networks (WMNs) are important inspirations for the creation of NAN structures.According to these characteristics, any node in the NAN network can set up its connection automatically and can communicate with other nodes in a secure and reliable way.One of the most commonly utilized standards for the NAN structures is the IEEE 802.11s, which can develop the single-hop function of IEEE 802.11a/b/g/n standards to the multi-hop function.Moreover, it can improve MAC capacities and internet connection performance [58,59,72].When the studies related to the IoT-based SM systems are analyzed, it is shown that these studies are intensely investigated to develop the performance of SMs by analyzing data acquisition, gateway placement, and implementation, WSN, PLC communication, wireless energy monitoring, real-time pricing, automatic billing, and privacy [47,48,58,66,[72][73][74][75][76].An architecture for last-meter SG systems is developed in [58], in which authors considered a consumer-centric approach and reported an implementation embedded into an IoT platform.In this study, several novelties are provided as integrating SG and smart home applications, obtaining data from heterogeneous sensor networks, secure data access.and mapping data to a separated layer.In addition, the TCP/IP server model is utilized to ensure communication between sensor nodes and IoT servers, where sensors convey measurement results over encrypted connection links [58].
Load control and energy efficiency abilities of the SG can be advanced by increasing synergy between DSM and AMI systems.Real-time pricing and smart billing software for managing DSM can be improved by service providers owing to two-way communication features provided by the AMI systems.The combination of AMI and DSM systems provides an important opportunity to identify instant load demand that allows service providers to control energy price and tariff according to demands and load analyses.As explained before, the dynamic price management is based on the DR vision, in which this process is separated into three types, called the CPP, TOU, and RTP.The most efficient approach among these is the RTP technique, which reduces peak consumption demand better than others.In addition, RTP can be realized by adapting the AMI system into the distribution network.Inga et al. proposed a heterogeneous AMI structure in [48], in which authors considered and analyzed the AMI system containing various wireless communication systems.Authors also developed several heuristic models to figure out handicaps of the existing AMI networks.Resource numbers, universal data aggregation points (UDAPs), optimum routes between SMs, and base stations can be specified by the developed model in [48].Another AMI system proposal, called the interface mitigated ZigBee for high-traffic AMI (HTAMI), is proposed by Chi et al. in [74].In addition to studies related to low-traffic AMI applications, HTAMI especially investigated interference problems for routing control cases, network initialization, and address distribution.The communication background of the AMI systems is very much alike to communication methods of the other IoT applications.While the most popular wired communication method is PLC, wireless technologies are LTE, LTE-A, Wi-Fi, Bluetooth, WiMAX, and so on.However, wireless communication methods are widely utilized in AMI applications due to their advantages, such as increased coverage area, low error rate, wider bandwidth opportunity, and security [47,73].

Open Research Topics for Future IoT
Our study clearly indicated that IoT systems still continue to be developed, depending on the available ICT technologies.In addition, several SG structures are being transformed into IoT technologies.It is shown via examined studies that the development of IoT systems cannot be exactly foreseen due to their massive structures.The most important advantage of the IoT systems is that a huge network containing billions of devices, which are supported by better connectivity and enhanced communication technologies, will communicate and share data with each other by means of WAN and LPWAN infrastructures.It is also expected that the development of IoT systems will call for enormous advances in data clouds, CPS systems, WSN, ICT systems, and WMN.The WSNs are regarded as the most important part of the IoT and SG systems since they manage all system data.Furthermore, it is Electronics 2019, 8, 972 10 of 16 clear that the distinguishing features of wireless devices will cause the WSNs to transform into general technology.As a result of this, it is supposed that numerous applications will be improved for enabling IoT systems in several application areas.The most crucial topics to be investigated in the near future are regarded as the issues related to the quality of service (QoS) and support capabilities of WSNs.A summarization list for the open research areas is given in Table 2.The communication background of the SG systems is generally considered a system of systems due to the complexity of infrastructure.We notice that the challenges originating from combining the electricity grid and communication technologies may be satisfied through analyzed SG researches, including modeling, analysis, and application issues.Wired and wireless communication methods are highly required to maintain operation, management, and monitoring stages of SG systems in an efficient and robust way.Therefore, new studies covering ICT and CPS interaction can be considered to advance the entire stages of SG infrastructures.The important challenging issues encountered in each stage of the SG infrastructure can be sorted out as load management, remote monitoring, developing EVs, integration of microgrids and DERs, DSM, DR, and interoperability.The physical sections of the CPS infrastructure should be integrated with data processing stages by using wired and wireless communication methods.Moreover, the big data and security requirements should be taken into account.The integration of cyber and physical components through an IoT-based SG infrastructure has been illustrated in Figure 4, where the titles and application areas are depicted clockwise from generation to security.
In addition to application types of physical systems given in Table 2, the big data applications can include data processing, metering data management, decision support, and data processing techniques.The big data tackles the intelligent processing and storage requirements of IoT-based systems that generate huge data stacks due to connections of massive device numbers.The obtained data stacks should be processed to generate meaningful information by using data filtering, signal processing, and similar analytic methods.These methods are required to be improved with the help of middleware software and applications, which are assumed to be one of the most widely researched areas in the near future [9,15,17,77].Munshi et al. presents big data processing steps in SG, such as data generation, data acquisition, data storing and processing, data querying, and data analytics in [78], in which all these steps are also suggested as novel research areas of IoT and SG interaction.On the other hand, Schuelke-Leech et al. have expressed big data application of electrical utilites in [79], where the big data applications in generation to consumption cycles are required to ensure the reliability of modelling and simulations of the utility grid to improve prediction and integration levels of DG resources in conventional and renewable types and to provide knowledge for system planners and engineers.Another important issues in IoT-based SG applications are related to machine learning and deep learning approaches in big data analytics, as researched in [80].The data analysis methods improved by using middleware can be developed with the aid of deep learning methods to overcome colossal data sizes, heterogeneity, high volumes, and massive structures of acquired data.In addition to application types of physical systems given in Table 2, the big data applications can include data processing, metering data management, decision support, and data processing techniques.The big data tackles the intelligent processing and storage requirements of IoT-based systems that generate huge data stacks due to connections of massive device numbers.The obtained data stacks should be processed to generate meaningful information by using data filtering, signal processing, and similar analytic methods.These methods are required to be improved with the help of middleware software and applications, which are assumed to be one of the most widely researched areas in the near future [9,15,17,77].Munshi et al. presents big data processing steps in SG, such as data generation, data acquisition, data storing and processing, data querying, and data analytics in [78], in which all these steps are also suggested as novel research areas of IoT and SG interaction.On the other hand, Schuelke-Leech et al. have expressed big data application of electrical utilites in [79], where the big data applications in generation to consumption cycles are required to ensure the reliability of modelling and simulations of the utility grid to improve prediction and integration levels of DG resources in conventional and renewable types and to provide knowledge for system planners and engineers.Another important issues in IoT-based SG applications are related to machine learning and deep learning approaches in big data analytics, as researched in [80].The data analysis methods improved by using middleware can be developed with the aid of deep learning methods to overcome colossal data sizes, heterogeneity, high volumes, and massive structures of acquired data.
On the other hand, the security researches include private networking, cloud control centers, substations, local control applications, and CPS intelligence [77].The cyber security and privacy concerns are met by improved use of authorization-, encryption-, authentication-, identification, and public key infrastructure (PKI)-based approaches.The IoT-based devices used in the management environment should ensure the security requirements of the entire system to increase the reliability of IoT-based SG infrastructure.Therefore, authorization and identification researches are assumed as one of the core topics of security and privacy studies in the near future [25,77].The IoT applications enabled in SG systems include various communication technologies, protocols, and frameworks.Therefore, it is foreseen that security and privacy issues will be deeply taken into account for On the other hand, the security researches include private networking, cloud control centers, substations, local control applications, and CPS intelligence [77].The cyber security and privacy concerns are met by improved use of authorization-, encryption-, authentication-, identification, and public key infrastructure (PKI)-based approaches.The IoT-based devices used in the management environment should ensure the security requirements of the entire system to increase the reliability of IoT-based SG infrastructure.Therefore, authorization and identification researches are assumed as one of the core topics of security and privacy studies in the near future [25,77].The IoT applications enabled in SG systems include various communication technologies, protocols, and frameworks.Therefore, it is foreseen that security and privacy issues will be deeply taken into account for enhancing communication secrecy.In addition, coding and encryption methods developed for IoT systems will gain great attention in future works.The conducted studies on security and privacy issues pointed out that the use of PKI may be a good way to improve the security features of IoT systems.
On the other hand, security and privacy concerns have led to the creation of potential research areas, such as IP and LPWAN security, routing security, security for PHY, MAC, and network layers, and end-to-end security in IEEE 802.15.4 networks.The wide area communicaitons with low power requirements are one of the other emerging communication methods that are assumed as open research areas in IoT.The LPWANs provide a comprehensive approach to support a new concept meeting these requirements.Despite the traditional communication methods that are not adequate to provide long distance communication with low power consumption, the LPWAN-based communication systems have been paid intensive interest [77,81].
Our study also indicated that smart environments, such as smart cities, smart homes, smart metering, and smart EMSs, profoundly need secure communication links similar to the SG applications.Hence, all of these applications (SG and other smart environments) which contain massive heterogeneous network structures require ensuring secure frameworks that are compatible with entire system elements.Even though there are several types of research available in the literature on realizing ICT and CPSs for massive networks of smart environments, the automation of substations and AMI networks will be the most challenging research areas of the EI concept.Because of this, it is foreseen that there are numerous potential research areas for future IoT networks based on the SG applications.Moreover, we believe that the analyzed challenges and developments in our study will assist the progress of future IoT applications in terms of connectivity, interoperability, and security.

Conclusions
The EI is an emerging concept for future grids constituted by smart grids, communication systems, intelligent systems, and smart elements.Communication infrastructure is of the most important components of the EI concept.A widespread and secure communication framework has vital importance for both forming and operating the EI systems.On the other hand, IoT is an emerging technology coming up with several advantages, such as supporting wide application areas and heterogonous network structures, providing special security features, and ensuring the ability to communicate among many devices.Moreover, the IoT provides a suitable cyber physical interface to integrate the communication and data management systems with conventional and recent generation, transmission, distribution, and consumption levels of utility.The two-way transmission of energy and communication signals are ensured with highly reliable applications of IoT-based communication infrastructures.In this paper, we presented a complete overview for IoT applications that are regarded as promising key applications for the EI concept in the near future.We investigated researches related to IoT applications for smart grids and smart environments, such as smart cities, smart homes, smart metering, and smart energy management systems.In addition, we analyzed challenges and opportunities originating from these applications.Finally, we highlighted open issues and future research directions of IoT applications for the EI infrastructure.

Figure 1 .
Figure 1.Communication technologies utilized in IoT applications: (a) Data rate versus range comparison of wireless technologies, (b) comparison of a low power wide area network (LPWAN) with IEEE 802.15.4 and 3G/4G/5G cellular communication technologies.

Figure 1 .
Figure 1.Communication technologies utilized in IoT applications: (a) Data rate versus range comparison of wireless technologies, (b) comparison of a low power wide area network (LPWAN) with IEEE 802.15.4 and 3G/4G/5G cellular communication technologies.

Figure 2 .
Figure 2. Interaction of Internet of Things (IoT) applications with the Energy Internet (EI) concept.Figure 2. Interaction of Internet of Things (IoT) applications with the Energy Internet (EI) concept.

Figure 2 .
Figure 2. Interaction of Internet of Things (IoT) applications with the Energy Internet (EI) concept.Figure 2. Interaction of Internet of Things (IoT) applications with the Energy Internet (EI) concept.

Figure 3 .
Figure 3. Layers and several applications of IoT for smart environments.

Figure 3 .
Figure 3. Layers and several applications of IoT for smart environments.

Figure 4 .
Figure 4. Open research topics in the context of IoT-based SG and applications [77].

Figure 4 .
Figure 4. Open research topics in the context of IoT-based SG and applications [77].
Electronics 2019, 8, x FOR PEER REVIEW 3 of 16 several advantages compared to other communication technologies.One of them is its ability to provide several specific communication and network structures for complex and heterogeneous communication scenarios.Another is that it can provide a more efficient use of devices by decreasing power consumption and cost.Furthermore, service providers also need ICT technologies for ensuring service sustainability.The recent developments acquired on the IoT have encouraged operators, service providers, and developers to utilize IoT technology in smart grids and other smart environments, such as smart cities, smart buildings, smart homes, and so on [20-26].In this section, we have comprehensively analyzed communication and network structures of IoT technologies.A number of novel communication technologies containing a low power wide area network (LPWAN), LTE, LTE-A, and narrowband IoT (NB-IoT) have been proposed, as well as ZigBee and Bluetooth low energy (BLE) technologies.The major improvement of these technologies is a long-range communication opportunity over unlicensed bands.The most important LPWAN technologies are LoRa, provided by Semtech, Ultra Narrow Band (UNB) improved by SigFox, Weightless, improved by Neul, LTE machine-type communications (LTE-M), and NB-IoT, provided by 3GPP [27-30].The detailed comparison schemes for the popular communication technologies that are used in IoT are illustrated in Figure 1a,b.As can be seen from the schemes, it is obvious that the LPWAN presents remarkable advantages in terms of cost, coverage area, number of station requirements, range, and power consumption.These outstanding advantages of LPWAN make it convenient for end-user IoT applications with low cost, low power consumption, and increased coverage areas.The LoRa and UNB are the most widely utilized LPWAN technologies, due to exploiting unlicensed frequency bands.The LoRaWAN, which is designed as a specific protocol for LoRa, supports star and cellular topologies.

Table 2 .
Current potential research topics for IoT systems.Advanced metering infrastructure (AMI); demand side management (DSM).