Integration of renewable energy and optimization of energy use are key enablers of sustainable energy transitions and mitigating climate change. Modern technologies such the Internet of Things (IoT) offer a wide number of applications in the energy sector, i.e, in energy supply, transmission and distribution, and demand. IoT can be employed for improving energy efficiency, increasing the share of renewable energy, and reducing environmental impacts of the energy use.
Industrial revolutions can be divided into four phases. In the first revolution, new sources of energy were discovered to run the machines. The mass extraction of coal and the invention of steam power plants were significant development stages in this phase 
. The second revolution known as mass production and electricity generation was a period of rapid development in industry, distinguished by large-scale iron and steel production. During this phase, many large-scale factories with their assembly lines were established and formed new businesses 
. The third revolution introduced computer and the first generation of communication technologies, e.g., telephony system, which enabled automation in supply chains 
A wide variety of modern technologies such as communication systems (e.g., 5G), intelligent robots, and the Internet of Things (IoT) are expected to empower the fourth industrial revolution 
. IoT interconnects a number of devices, people, data, and processes, by allowing them to communicate with each other seamlessly. Hence, IoT can help improving different processes to be more quantifiable and measurable by collecting and processing large amount of data 
. IoT can potentially enhance the quality of life in different areas including medical services, smart cities, construction industry, agriculture, water management, and the energy sector 
. This is enabled by providing an increased automated decision making in real-time and facilitating tools for optimizing such decisions.
The global energy demand rose by 2.3% in 2018 compared to 2017, which is the highest increase since 2010 
. As a result, CO2 Compared to the pre-industrial temperature level, global warming is approaching 1.5 ∘C, most likely before the middle of the 21 Century 
. If this trend prevails, the global warming will exceed the 2 ∘C target, which will have a severe impact on the planet and human life. The environmental concerns, such as global warming and local air pollution, scarcity of water resources for thermal power generation, and the limitation of depleting fossil energy resources, raise an urgent need for more efficient use of energy and the use of renewable energy sources (RESs). Different studies have shown that a non-fossil energy system is almost impossible without efficient use of energy and/or reduction of energy demand, and a high level integration of RESs, both at a country level 
, regional 
, or globally 
Based on the United Nations Sustainable Development Goals agenda 
, energy efficiency is one of the key drivers of sustainable development. Moreover, energy efficiency offers economic benefits in long-term by reducing the cost of fuel imports/supply, energy generation, and reducing emissions from the energy sector. For enhancing energy efficiency and a more optimal energy management, an effective analysis of the real-time data in the energy supply chain plays a key role 
. The energy supply chain, from resource extraction to delivering it in a useful form to the end users, includes three major parts: (i) energy supply including upstream refinery processes; (ii) energy transformation processes including transmission and distribution (T&D) of energy carriers; and (iii) energy demand side, which includes the use of energy in buildings, transportation sector, and the industry 
. Figure 1
shows these three parts with their relevant components. Under the scope of this paper, we discuss the role of IoT in all different segments of the energy supply chain. Our aim is to show the potential contribution of IoT to efficient use of energy, reduction of energy demand, and increasing the share of RESs.
Figure 1. Energy supply chain.
IoT employs sensors and communication technologies for sensing and transmitting real-time data, which enables fast computations and optimal decision-making 
. Moreover, IoT can help the energy sector to transform from a centralized to a distributed, smart, and integrated energy system. This is a key requirement in deploying local, distributed RESs, such as wind and solar energy 
, as well as turning many small-scale end users of energy into prosumers by aggregating their generation and optimizing their demand whenever useful for the grid. IoT-based systems automate, integrate, and control processes through sensors and communication technologies. Large data collection and use of intelligent algorithms for real-time data analysis can help to monitor energy consumption patterns of different users and devices in different time scales and control that consumption more efficiently 
2. IoT in the Energy Sector
Today, the energy sector is highly dependent on fossil fuels, constituting nearly 80 % of final energy globally. Excessive extraction and combustion of fossil fuels has adverse environmental, health, and economic impacts due to air pollution and climate change to name a few. Energy efficiency, i.e., consuming less energy for delivering the same service, and the deployment of renewable energy sources are two main alternatives to diminish the adverse impacts of fossil fuel use 
In this section, we discuss the role of IoT in the energy sector, from fuel extraction, operation, and maintenance (O&M) of energy generating assets, to T&D and end use of energy IoT can play a crucial role in reducing energy losses and lowering CO2
emissions. An energy management system based on IoT can monitor real-time energy consumption and increase the level of awareness about the energy performance at any level of the supply chain 
. This section discusses the application of IoT in energy generation stages first. Then, we continue with the concept of smart cities, which is an umbrella term for many IoT-based subsystems such as smart grids, smart buildings, smart factories, and intelligent transportation. Next, we discuss each of the above-mentioned components separately. Finally, we summarize the findings of this section in Table 1
and Table 2
Table 1. Applications of IoT in the energy sector (1): regulation, market, and energy supply side.
|Regulation and market
||Providing access to the grid for many small end users for peer to peer electricity trade and choosing the supplier freely.
||Alleviating the hierarchy in the energy supply chain, market power, and centralized supply; liquifying the energy market and reducing the prices for consumers; and creating awareness on energy use and efficiency.
|Aggregation of small prosumers (virtual power plants)
||Aggregating load and generation of a group of end users to offer to electricity, balancing, or reserve markets.
||Mobilizing small loads to participate in competitive markets; helping the grid by reducing load in peak times; Hedging the risk of high electricity bills at peak hours; and improving flexibility of the grid and reducing the need for balancing assets; Offering profitability to consumers.
||Upstream oil and gas industry/utility companies
||Fault, leakage, and fatigue monitoring by analyzing of big data collected through static and mobile sensors or cameras.
||Reducing the risk of failure, production loss and maintenance downtime; reducing the cost of O&M; and preventing accidents and increasing safety.
||Upstream oil and gas industry/utility companies
||Identifying failures and problems in energy networks and possibly fixing them virtually.
||Improving reliability of a service; improving speed in fixing leakage in district heating or failures in electricity grids; and reducing maintenance time and risk of health/safety.
|Energy storage and analytics
||Industrial suppliers or utility companies
||Analyzing market data and possibilities for activating flexibility options such as energy storage in the system.
||Reducing the risk of supply and demand imbalance; increasing profitability in energy trade by optimal use of flexible and storage options; and ensuring an optimal strategy for storage assets.
|Digitalized power generation
||Utility companies & system operator
||Analyzing big data of and controlling many generation units at different time scales.
||Improving security of supply; improving asset usage and management; reducing the cost of provision of backup capacity; accelerating the response to the loss of load; and reducing the risk of blackout.
Table 2. Applications of IoT in the energy sector (2): energy grids and demand side.
|Transmission and distribution (T&D) grid
||Electric grid management
||A platform for operating the grid using big data and ICT technologies as opposed to traditional grids.
||Improving energy efficiency and integration of distributed generation and load; improving security of supply; and reducing the need for backup supply capacity and costs.
||Electric grid operation & management
||Using big data at different points of the grid to manage the grid more optimally.
||Identifying weak points and reinforcing the grid accordingly and reducing the risk of blackout.
|Integrated control of electric vehicle fleet (EV)
||Electric grid operation & management
||Analyzing data of charging stations and charge/discharge cycles of EVs.
||Improving the response to charging demand at peak times; analyzing and forecasting the impact of EVs on load; and identifying areas for installing new charging stations and reinforcement of the distribution grid.
|Control and management of vehicle to grid (V2G)
||Electric grid operation & management
||Analyzing load and charge/discharge pattern of EVs to for supporting the grid when needed.
||Improving the flexibility of the system by activating EVs in supplying the grid with electricity; Reducing the need for backup capacity during peak hours Control and management of EV fleet to offer optimal interaction between the grid and EVS.
||Platforms for managing a grid independent from the central grid.
||Improving security of supply; creating interoperability and flexibility between microgrids and the main grid; and offering stable electricity prices for the consumers connected to the microgrid.
|Control and management of the District heating (DH) network
||Analyzing big data of the temperature and load in the network and connected consumers.
||Improving the efficiency of the grid in meeting demand; reducing the temperature of hot water supply and saving energy when possible; and identifying grid points with the need for reinforcement.
||Residential/commercial & industry
||Central control (i.e., by shedding, shifting, or leveling.
||Reducing demand at peak time, which itself reduces the grid congestion.
|Demand response (demand side management)
||Residential/commercial & industry
||Central control (i.e., by shedding, shifting, or leveling; load of many consumers by analyzing the load and operation of appliances.
||Reducing demand at peak time, which itself reduces the grid congestion; reducing consumer electricity bills; and reducing the need for investment in grid backup capacity.
|Advanced metering infrastructure
||Using sensors and devices to collect and analyze the load and temperature data in a consumer site.
||Having access to detailed load variations in different time scales; identifying areas for improving energy efficiency (for example overly air-conditioned rooms or extra lights when there are no occupants), and reducing the cost of energy use.
|Battery energy management
||Data analytics for activating battery at the most suitable time
||The optimal strategy for charge/discharge of the battery in different time scales; improving energy efficiency and helping the grid at peak times, and reducing the cost of energy use.
||Centralized and remote control of appliances and devices.
||Improving comfort by optimal control of appliances and HVAC systems; reducing manual intervention, saving time and energy; increasing knowledge on energy use and environmental impact; improving readiness for joining a smart grid or virtual power plant; and improved integration of distributed generation and storage systems.
2.1. IoT and Energy Generation
Automating industrial processes and supervisory control and data acquisition systems became popular in the power sector in the 1990s 
. By monitoring and controlling equipment and processes, the early stages of IoT started to contribute to the power sector by alleviating the risk of loss of production or blackout. Reliability, efficiency, environmental impacts, and maintenance issues are the main challenges of old power plants. The age of equipment in the power sector and poor maintenance problems can lead to a high level of energy losses and unreliability. Assets are sometimes more than 40 years old, very expensive, and cannot be replaced easily. IoT can contribute to reducing some of these challenges in the management of power plants 
. By applying IoT sensors, Internet-connected devices are able to distinguish any failure in the operation or abnormal decrease in energy efficiency, alarming the need for maintenance. This increases the reliability and efficiency of the system, in addition to reducing the cost of maintenance 
. According to 
, a new IoT-based power plant can save 230 million USD during its lifetime and an existing plant with the same size can save 50 million USD if equipped with the IoT platform.
For reducing fossil fuel use and relying on local energy resources, many countries are promoting RESs. Weather-dependent or variable renewable energy (VRE) sources, such as wind and solar energy, pose new challenges to the energy system known as “the intermittency challenge”. In an energy system with a high share of VRE, matching the generation of energy with demand is a big challenge due to variability of supply and demand resulting in a mismatch in different time scales. IoT systems offer the flexibility in balancing generation with demand, which in turn can reduce the challenges of deploying VRE, resulting in higher integration shares of clean energy and less GHG emissions 
. In addition, by employing IoT, more efficient use of energy can be achieved by using machine-learning algorithms that help determine an optimal balance of different supply and demand technologies 
. For instance, the use of artificial intelligence algorithms can balance the power output of a thermal power plant with the sources of in-house power generation, e.g., aggregating many small-scale solar PV panels 
Table 2 summarizes the applications of IoT in the energy sector, from energy supply regulation and markets.
2.2. Smart Cities
Nowadays, the staggering rate of urbanization, as well as overpopulation, has brought many global concerns, such as air and water pollution 
, energy access, and environmental concerns. In this line, one of the main challenges is to provide the cities with clean, affordable, and reliable energy sources. The recent developments in digital technologies have provided a driving force to apply smart, IoT-based solutions for the existing problems in a smart city context 
. Smart factories, smart homes, power plants, and farms in a city can be connected and the data about their energy consumption at different hours of the day can be gathered. If it is found that a section, e.g., residential areas, consume the most energy in the afternoon, then automatically energy devoted to other sections, e.g., factories, can be minimized to balance the whole system at a minimum cost and risk of congestion or blackout.
In a smart city, different processes, i.e., information transmission and communication, intelligent identification, location determination, tracing, monitoring, pollution control, and identity management can be managed perfectly with the aid of IoT technology 
. IoT technologies can help to monitor every object in a city. Buildings, urban infrastructure, transport, energy networks, and utilities could be connected to sensors. These connections can ensure an energy-efficient smart city by constant monitoring of data gathered from sensors. For example, by monitoring vehicles with IoT, street lights can be controlled for optimal use of energy. In addition, the authorities can have access to the gathered information and can make more informed decisions on transportation choices and their energy demand.
2.3. Smart Grid
Smart grids are modern grids deploying the most secure and dependable ICT technology to control and optimize energy generation, T&D grids, and end usage. By connecting many smart meters, a smart grid develops a multi-directional flow of information, which can be used for optimal management of the system and efficient energy distribution 
. The application of smart grid can be highlighted in different subsectors of the energy system individually, e.g., energy generation, buildings, or transportation, or they can be considered altogether.
In traditional grids, batteries were recharged by adapters through electricity cables and AC/DC inverter 
. These batteries can be charged wirelessly in a smart grid, using inductive charging technology. In addition, in a smart grid, the energy demand pattern of end users can be analyzed by collecting data through an IoT platform, for example, the time of charging mobile phones or electric cars. Then, the nearest wireless battery charge station can allocate the right time slot and that device/vehicle can be charged. Another advantage is that the use of IoT will lead to better control and monitoring of the battery-equipped devices, and therefore, first, the energy distribution can be adjusted, and second, the delivery of electricity to these vehicles can be guaranteed. This will reduce unnecessary energy consumption considerably.
Moreover, IoT can be applied in isolated and microgrids for some islands or organizations, especially when energy is required every single moment with no exception, e.g., in databases. In such systems, all the assets connected to the grid can interact with each other. Also, the data on the energy demand of any asset is accessible. This interaction can assure the perfect management of the energy distribution whenever and everywhere needed. In terms of the collaborative impact of smart grids, as it is shown in Figure 2
, in a smart city equipped with IoT-based smart grids, different sections of the city can be connected together 
Figure 2. A centralized data connectivity in a smart city concept.
During the collaborative communication between different sectors, the smart grid can alert operators through smart appliances before any acute problem occurs 
. For example, through constant monitoring, it can be detected if energy demand exceeds the capacity of the grid. Therefore, by acquiring real-time data, different strategies can be adopted by authorities, and energy consumption can be rescheduled to a different time when there is lower expected demand. In some regions, smart (or dynamic) pricing tariffs have been considered for variable energy prices in this regard 
. Real-time pricing (RTP) tariffs as well as the energy price will be higher at a certain time when the consumption of energy is likely to be higher. Through the data gathered from the components of the smart grid, energy consumption and generation can be perfectly optimized and managed by far-sighted strategies. Reduction of transmission losses in T&D networks through active voltage management or reduction of non-technical losses using a network of smart meters are other examples of applying IoT 
2.4. Smart Buildings
The energy consumption in cities can be divided into different parts; residential buildings (domestic); and commercial (services), including shops, offices, and schools, and transport. The domestic energy consumption in the residential sector includes lighting, equipment (appliances), domestic hot water, cooking, refrigerating, heating, ventilation, and air conditioning (HVAC) (Figure 3
). HVAC energy consumption typically accounts for half of the energy consumption in buildings 
. Therefore, the management of HVAC systems is important in reducing electricity consumption. With the advancement of technology in the industry, IoT devices can play an important role to control energy losses in HVAC systems. For example, by locating some wireless thermostats based on occupancy, unoccupied places can be realized. Once an unoccupied zone is detected, some actions can be taken to lower energy consumption. For instance, HVAC systems can reduce the operation in the unoccupied zone, which will lead to a significant reduction in energy consumption and losses.
Figure 3. Share of residential energy consumption.
IoT can also be applied to manage the energy losses of lighting systems. For example, through applying IoT-based lighting systems, the customers will be alerted when the energy consumption goes beyond the standard level. Furthermore, by an efficient analysis of the real-time data, load from high-peak will be shifted to low-peak levels. This makes a significant contribution to optimal use of electrical energy 
and reducing related greenhouse gas emissions. Using IoT, the demand response will be more agile and flexible, and the monitoring and demand-side management will become more efficient.
2.5. Smart Use of Energy in Industry
IoT can be employed to design a fully connected and flexible system in the industry to reduce energy consumption while optimizing production. In traditional factories, a lot of energy is spent to produce the end product and control the quality of the end product. Moreover, monitoring every single process requires human resources to be involved. However, using an agile and flexible system in smart factories helps to recognize failures at the same time rather than recognizing them by monitoring the products at the end of the production line. Therefore, suitable actions can be taken promptly to avert wasteful production and associated waste energy.
In terms of monitoring processes during manufacturing, IoT, and its enabling technology play a crucial role. Gateway devices, IoT hub networks, web servers, and cloud platforms, which are accessible with smart mobile devices (e.g., smartphones or personal computers) can be examples of monitoring equipment. Wireless communications such as Wi-Fi, Bluetooth, ZigBee, Z-wave, or wired communications, such as Local Area Network (LAN) can be used to connect all pieces of equipment 
. Moreover, to use IoT more efficiently, by installing sensors on each component of an industrial site, the components that consume more energy than their nominal energy level can be detected. Thus, every single component can be easily managed, the faults of components can be fixed, and the energy consumption of each component can be optimized. This eminently results in reducing the energy losses in smart factories.
In a smart factory, data processing is the key element in the whole system, through which data in the cloud platform (acts as a brain) will be analyzed to help managers making more efficient decisions in time 
. In terms of monitoring and maintaining the assets of manufacturing, the big problem in factories is the depreciation of machines and mechanical devices. With an appropriate IoT platform and tools, the proper device size can be selected to reduce wear and tear and the associated maintenance costs. IoT-based conditional monitoring ensures the mechanical device never reaches its threshold limit. This simply means the device lasts longer and suffers fewer failures. Moreover, the failures that cause energy loss can be anticipated to be tackled.
IoT-based agile systems can provide a smart system for collaboration between customers, manufactures, and companies. Therefore, a specific product will be manufactured directly according to customers’ orders. Therefore, energy consumed during the process of storing spare parts as well as the energy wasted in warehouses to keep the spare parts will be dwindled significantly. Only a certain number of products in various kinds will be manufactured and stored, which enhances the management of energy consumption and production efficiency 
2.6. Intelligent Transportation
One of the major causes of air pollution and energy losses in big cities is the overuse of private vehicles instead of public transportation. As opposed to a traditional transportation system where each system works independently, applying IoT technologies in transportation, so called “smart transportation”, offers a global management system. Also, real-time data processing plays a significant role in traffic management. All the components of the transportation system can be connected together, and their data can be processed together. Congestion control and smart parking systems using online maps are some applications of smart transportation. Smart use of transportation enables passengers to select a more cost-saving option with a shorter distance and the fastest route, which saves a significant amount of time and energy 
. Citizens will be able to determine their arrival time and manage their schedules more efficiently 
. Therefore, the time of city trips will be shortened, and the energy losses will be reduced significantly. This can remarkably reduce CO2
emissions and other air polluting gases from transportation 
Table 2 summarizes the applications of IoT in the energy sector, from smart energy grids to the end-use of energy. The IoT-based digitalization transforms an energy system from a unidirectional direction, i.e., from generation through energy grids to consumers, to an integrated energy system. Different parts of such an integrated smart energy system are depicted in Figure 4.
Figure 4. Applications of IoT in an integrated smart energy system.