1 Introduction

In the current world scenario, IoT devices have been incorporated into our everyday lives, in the form of multimedia, home appliances, health gadgets, wearable devices, and industrial sensors. These devices detect, capture, and transfer a massive amount of data from the environment. IoT devices frequently require to communicate wirelessly together to deliver the significant information to the Internet. To exchange a large amount of data over the internet, an IoT device consumes a lot of energy. Therefore, to achieve a balanced ecosystem and minimize energy consumption for IoT networks, green computing has been brought into IoT [1]. Wi-Fi/IEEE 802.11 is one of the most commonly used wireless networking technology which provides good bandwidth, high performance, and universal IP availability. Wi-Fi does not support green technology in energy constraint IoT due to more power consumption. Although several protocols have been developed to decrease the energy consumption and improve the network endurance of Wi-Fi networks, however, these protocols are frequently plagued by long transmission delays. In [2], the scheme for reducing energy consumption is proposed which compromises the size of data transmission. ZigBee/IEEE 802.15.4 is one of the current low-power radio technology, and it is widely recommended as one of the most successful emerging communication technique in IoT. In many schemes, ZigBee radio has been adopted as a helpful technique that enables high-power Wi-Fi radios and saves energy usage during Wi-Fi idle mode. This low power consumption nature of ZigBee is utilized efficiently with the high transmission rate of Wi-Fi to make the system more energy efficient.

The main objective of the proposed work is to minimize the power consumption using the cross-interface of Wi-Fi and ZigBee and to detect and resolve the interference problem between them during data transmission. In the proposed scheme, the Power Saving Mechanism (PSM) concentrates on overall energy saving for device-to-gateway communications as well as device-to-device communications. Figure 1 depicts the gateway to device communication using ZigBee and Wi-Fi. Each IoT device in the proposed system is integrated with the pair of Wi-Fi and ZigBee radios. The complete data transfer cannot be performed using only the ZigBee protocol because of its unreliable nature. Therefore, a reliable Wi-Fi interface that consumes high power is utilized for data transmission and to save energy, it goes to sleep state during the idle phase. The low-power ZigBee is used to control the data transmission process and for waking up Wi-Fi. A scheduling algorithm is used to wake up Wi-Fi radios at the gateway using ZigBee radios for energy-efficient operations [3]. Since ZigBee and Wi-Fi generally use the identical frequency spectrum that is 2.4 GHz, thus the problem of interference arises. In the proposed work, we are detecting and avoiding the interference problem using the proposed Interference Avoidance (IA) algorithm with efficient gateway scheduling.

The main contribution of proposed work is given as:

  • The proposed EES scheme is used for the wake-up of Wi-Fi and ZigBee. The Wi-Fi interface is used by the network coordinator to communicate with other network coordinator and gateway. All the nodes of the network are communicating with each other using the ZigBee interface which improves the overall energy efficiency.

  • Interference Avoidance algorithm is proposed to resolve the interference problem. As the ZigBee and Wi-Fi interfaces work parallelly which causes the interference problem.

  • Combinedly EES-IA algorithm is used to resolve the interference problem while improving the overall throughput with low power consumption.

  • The implementation of the proposed work is performed using the Omnet++ simulator inet framework. The implementation results indicate the overall throughput improvement with low power consumption.

Fig. 1
figure 1

Gateway to device communication using ZigBee and Wi-Fi

1.1 Overview of ZigBee/IEEE 802.15.4 and Wi-Fi/IEEE 802.11 g

The IEEE 802.15.4 standard covers the 2.4 GHz, 915 MHz, and 868 MHz frequency ranges. There are 16 ZigBee channels in the 2.4 GHz range; all of them have a 5 MHz bandwidth. Full Function Devices (FFDs) and Reduced Function Devices (RFDs) are the two main categories of ZigBee devices. RFDs simply facilitate some of the ZigBee device tasks, keeping them easy and inexpensive. FFDs can perform network formation, navigation and maintenance. A ZigBee network typically includes a ZigBee coordinator, more than one ZigBee router and several devices. FFD can perform several tasks, while the end devices are usually RFDs. The ZigBee coordinator is in charge of setting up and maintaining the network. When implementing ZigBee technology, routers are often used to control access between the communications channel and network nodes.

IEEE 802.11 g is a Wi-Fi standard that is commonly used and follows the same carrier sense multiple access approach as the basic IEEE 802.11 g technology and has the highest communication range of 54 Mbps. In the ISM 2.4 GHz frequency spectrum, it defines 13 overlappings channels with 22 MHz broad range. IEEE 802.11 and IEEE 802.15.4 support CSMA/CA for channel access. Through the backoff technique, the CSMA/CA may coordinate channel access among multiple heterogeneous wireless networks since carrier sensing uses signal strength to detect the channel state. In order to minimize Wi-Fi interference in a ZigBee network, the number of Wi-Fi devices in the ZigBee range is increased. But it is hard to maximize the range overlapping without knowing the locations of ZigBee coordinators and ZigBee end devices. The closest coordinator is chosen to accomplish the task. In the proposed work, we assume that the ZigBee network is only one data-gathering network. The controller periodically scans the Wi-Fi channels, gathers data from the ZigBee beacon frames, and creates a Received Signal Strength Indicator (RSSI) to calculate the separation between multiple ZigBee coordinators. The ZigBee coordinator with the highest RSSI is chosen by the gateway.

The succeeding sections are as follows: Sect. 2 briefly discusses the related work of energy-efficient IoT. Section 3 addresses the interference problem between Wi-Fi and ZigBee technologies with a detailed analysis of how the presence of Wi-Fi degrades the performance of ZigBee. Section 4 presents the preliminaries of the proposed system with analysis of scheduling and energy consumption. Sections 5 and 6 explain the proposed interference avoidance and detection scheme and scheduling algorithms, respectively. Section 7 presents the implementation and results. Finally, the concluding remarks and recommendations are given in Sect. 8 for future study.

2 Related work

To reduce the power consumption of Wi-Fi networks, many protocols and strategies have been used. In [4], bidirectional cross-interface scheduling has been used for low-power transmissions in IoT networks. The basic concept of scheduling is to use a proactive scheme and a reactive scheme. The ZigBee wireless interface is utilized to transmit wake-up frames to a sleeping Wi-Fi radio, allowing data communication on request and lowering Wi-Fi power consumption. In [5], a dual interface dual-pipeline scheduling technique is presented to improve network energy usage while maintaining the network delay requirements. It facilitates multi-node data delivery in IoT using a ZigBee strategy for activating a Wi-Fi data service. This scheme combines the benefits of both pipelined and cross-interface approaches. In [3], a Green IoT Gateway (GIG) approach is presented that intends to reduce the gateway’s energy usage while guaranteeing that all devices’s latency requirements through cross-interface cooperation. GIG scheme has effectively coordinated both Wi-Fi and ZigBee wake-up behaviors with constrained latency for optimum power consumption of the gateway on both Wi-Fi communication and ZigBee controls. The heuristic algorithms used in [6] provide effective scheduling but increases the computational complexity. In [7], the algorithm uses the Time Division Multiple Access (TDMA) protocol that allocates a time slot into very small pieces.

To avoid interference problem due to the coexistences of Wi-Fi in the ZigBee working environment, many schemes have been introduced. In [8], a collaborative system for efficient interference management and avoidance has been developed to ensure efficient ZigBee communication by structured channel scheduling that works even when Wi-Fi is present. In [9], a hidden Markov Model-based training scheme is used for predicting channel state. Based on the prediction results, the Wi-Fi access point sends a simulated Wi-Fi fault frame to prevent the nearby Wi-Fi transmission and guarantee ZigBee transmission. The scheme faced the issue of how to suppress Wi-Fi by choosing the right access point position and time span. In [10], a theoretical framework to assess the efficiency of ZigBee in the presence of Wi-Fi interference has been designed. Because the existence of Wi-Fi seriously hindered the ZigBee performance, a decent distance and suitable offset wavelength have been identified to guide ZigBee deployment. Although it avoids interference using the developed framework, it is a theoretical concept. The Non-Orthogonal Multiple Access (NOMA) [11] algorithm can only make decisions based on the current state of the network. It manages cross-interference and works at the problem of adaptive scheduling and power allocation. A hierarchical network architecture [12] is presented to address the energy problem. An energy-aware routing strategy is devised to manage reduced-power devices. A consistency-guaranteed and energy-efficient sleep scheduling algorithm [13] is established using a Markov Decision Process (MDP) for energy efficiency in IoT devices. The algorithm maintained the network data traffic and data consistency. Data-driven methods [14] tend to reduce the amount of processed data to avoid transmission of redundancy. To decrease the volume of data processed, the measuring precision is set to an appropriate standard. The mobility technique includes moving mobile nodes closer to the source object. This process will save time and money in terms of communication when carried out effectively. The energy-aware heuristic-based routing [15] protocol provides a systematic evaluation based on artificial intelligence to achieve a sustainable and intelligent learning strategy. It improves the system performance in terms of data forwarding and secure transmissions by utilizing residual energy link quality parameters. Energy-Aware Mac Protocol with Adaptive Individual Duty Cycle (EAMP-AIDC) [16] implements a device service time optimization model. It allows seamless single duty-cycle scheduling for nodes in its different groups to adjust their remaining energy, position and network traffic. The protocol tries to keep each node’s active time as short as possible. As a result, the amount of energy generated and the number of sleep time are also increased. In [17], an approach based on estimating density ratios using given data at the resource manager is presented. This approach detects the status of interference among various systems in order to facilitate frequency channel allocation, although it carries high training overhead. In [18], the Energy-Efficient Scheme for IoT (EES4IoT) is proposed. The strategy is based on an energy-saving scheme and addresses connectivity problems such as energy-hole problems, packet drop, transmission delay and network duration. The transmission latency is not considered in this strategy. In [19], the resource allocation is considered an important aspect of resource management for the optimization of IoT networks. The optimal human–computer interaction integrates sustainable power with the development of low energy consumption. In [20], a framework based on IoT technology is introduced for identifying workload nonlinearity. It resolves problems such as the degradation of the power factor and the presence of distortions. Huge reductions in voltage harmonic distortion level have been observed with the use of harmonic filters and capacitors. SmartWAZ [21] is an efficient Wi-Fi access method with ZigBee for smart devices that include both Wi-Fi and ZigBee functionalities. The most significant characteristic of this method is the use of distinct Wi-Fi beacon intervals to distinguish between publicly available and privately owned Wi-Fi access points. SmartWAZ detects the presence of the designated Wi-Fi beacon interval employed by the publicly available access point using the received signal strength indication of the ZigBee receiver. A revolutionary Cross-Technology Communication (CTC) architecture ZigFi [22] is used to connect ZigBee to Wi-Fi communication. In ZigFi, the Channel State Information (CSI) of overlapping packets is being used to send data across multiple wireless protocols. A receiver-initiated protocol is also introduced in this architecture. Support Vector Machine (SVM) is utilized to convert the decryption problem into a CSI classification. In [23], author presented a method of physical-level simulation known as WEBee (Wi-Fi Emulated ZigBee). WEBee simulates the desired physical-layer ZigBee transmissions by modifying the data bits in the Wi-Fi payload data. One Wi-Fi frame can imitate two ZigBee frames concurrently due to WEBee’s simultaneous cross-technology communication. The performance of WEBee in a noisy environment is not satisfactory. In [24] PolarScout, a Wi-Fi interference-resistant method for ZigBee transmission is introduced. It seeks to directly extract tainted ZigBee samples from Wi-Fi interference that includes a wide variety of power levels and unpredictable impact on a ZigBee signal. The shell-shaping technique needs a specially designed sample series to isolate ZigBee samples from Wi-Fi interference. In [25], the author designed a multiple-input multiple-output method that aims to secure the ZigBee network packets from interference. The essential point is to bridge the gap between desired data and cross-technology signals. The cross-communication improves by collecting the Wi-Fi and ZigBee channel parameters. This scheme could be improved by using a combined access point for Wi-Fi and ZigBee networks. In [26], a simple and self-adapting cross-technology Interference avoidance method is used to measure channel idleness and increase communication packet reception rates. This technique also measures the statistics of the dynamic spectrum state in the time domain based on the ambient Received Signal Strength Indicator (RSSI). When Wi-Fi traffic is 3 Mbps, only then this method consumes less energy. In [27], author introduced a technique for the identification of interference and the addition of a timespan between the Wi-Fi data packets to enhance the performance of ZigBee networks. This method needs to be improved by using an appropriate interference avoidance technique to reduce interference levels and boost the performance. In [28], author presented FAVOR (Frequency Allocation for Versatile Occupancy of spectRum) and P-CSMA (Probabilistic CSMA) which form the framework known as ART (Adaptive fRequency-Temporal coexisting). The aim of this method is to improve the coexistence of Wi-Fi and ZigBee from both a frequency and a time standpoint. FAVOR ingeniously transforms the task into a spatial geometric problem in a unified frequency-spatial space and allocates continuous frequencies to nodes in an optimal way.

In the related work, we have studied different categories of previously proposed technologies which are based on power-saving mechanisms, energy aware, energy efficient and cross-interface technologies. In contrast to previous works, which aim to reduce the power consumption of IoT devices for device-to-device communications, our proposed scheme concentrates on overall energy savings for device-to-gateway communications as well as device-to-device communications. The fact that most energy-saving schemes concentrate primarily on reducing energy for downstream communication to users which is a common drawback. They basically enable a soft access point to routinely start waking up and broadcast polling frames to each client (through high-power Wi-Fi) in order to support upstream communication from clients. This consumes a lot of energy, particularly when the inter-packet arrival time or the required latency is large. The proposed scheme effectively solves the aforementioned drawbacks of the current Wi-Fi tethering approaches with the use of an added ZigBee interface. The proposed scheme also uses the Interference Avoidance algorithm along with the EES algorithm for efficient ZigBee transmission in the presence of Wi-Fi.

3 Interference between ZigBee and Wi-Fi

3.1 Coexistence of Wi-Fi and ZigBee

Both ZigBee and Wi-Fi run on the ISM 2.4 GHz band, which is the most usable frequency band, and more than a million devices and systems use this band [10]. Figure 2 depicts the ZigBee and Wi-Fi channel distribution in the 2.4GHz frequency band, and most of the ZigBee channels are overlapped with Wi-Fi. The transmitting capacity of Wi-Fi is much greater than ZigBee which can diminish the efficiency of ZigBee. Due to channel overlapping network performance affect severely, therefore, ZigBee’s efficiency in the coexisting environment of Wi-Fi is analyzed. The ZigBee channels are divided into three groups as shown in Fig. 2 based on offset frequency to minimize the detection time and energy usage of the system. Channels 15, 20, 25, and 26 in class 1 (shown by green line) have an offset frequency greater than 12 MHz; channels 11, 14, 16, 19, 21, and 24 in class 2 (shown by red line) have an offset frequency greater than 7 MHz but less than 12 MHz; and channels 12, 13, 17, 18, 22, and 23 in class 3 (shown by blue line) have an offset bandwidth less than 3 MHz [29]. ZigBee channels from class 1 and class 2 are used to overcome the interference problem.

Fig. 2
figure 2

ZigBee and Wi-Fi channel distribution in 2.4 GHz frequency band

3.2 Theoretical ZigBee analysis

The impact of Wi-Fi interference on ZigBee is examined in terms of Bit Error Rate (BER) and Packet Error Rate (PER). The evaluations are used to calculate PER from BER and conflict period. In intense Wi-Fi traffic situations, both coexistence output evaluations show that ZigBee can be adversely affected by Wi-Fi [29]. Figure 3 depicts the interference between ZigBee and Wi-Fi. When ZigBee and Wi-Fi are used simultaneously, the contention window remains unchanged. Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is used by both ZigBee and Wi-Fi, although ZigBee only uses Clear Channel Assessment (CCA) twice after back-off time to determine the existence of a channel. \(U_z\) and \(U_w\) are back off time of ZigBee and Wi-Fi, respectively. If the back-off time is evenly distributed between zero and their minimum contention window, we can divide these evenly distributed back-off times nearly in half. The inter-arrival time between two ZigBee and Wi-Fi data packets is Tz and Tw, respectively. \(T_{SIFS}\) is the inter-frame space, and \(T_c\) is the collision time. \(T_{ACK,Z}\) and \(T_{ACK,W}\) are the time period of acknowledgement packet of ZigBee and Wi-Fi, respectively. Offset Quadrature Phase-Shift Keying (OQPSK) modulation is used in the physical layer of ZigBee. The BER can be determined using the equation given below for an Additive White Gaussian Noise (AWGN) channel:

$$\begin{aligned} BER=Q(\sqrt{((2E_b)/N_0 )} \end{aligned}$$
(1)

Where \((E_b)/N_0\) is the generalized Signal-to-Noise Ratio (SNR) and Q is the Gaussian distribution function [10]. Q is calculated using given equation:

$$\begin{aligned} Q(x)=1/(\sqrt{2\pi })\int _{x}^{\infty } \exp \left( \dfrac{\text{- }u^2 }{2} \ \hbox {d}u\right) \end{aligned}$$
(2)

When a ZigBee channel overlaps with a Wi-Fi channel, the Wi-Fi signal might be considered partial channel blocking interference for the ZigBee signal, and the SNR is substituted by the Signal-to-Interference-plus-Noise Ratio (SINR), which is defined as:

$$\begin{aligned} SINR=\dfrac{\text{P}_{\textrm{signal}}}{\text{P}_{\textrm{noise}}+P_{\textrm{interference}}} \end{aligned}$$
(3)

Where \(P_{\textrm{signal}}\) is the desired signal power at ZigBee receiver. \(P_{\textrm{noise}}\) is the noise power, and \(P_{\textrm{interference}}\) is the received Wi-Fi signal interference power at ZigBee receiver. The in-band interference level of Wi-Fi cannot be computed by dividing 11, because the power range of Wi-Fi is 11 times more than that of ZigBee and is not equally distributed. The in-band power factor r is applied to the \(P_{\textrm{interference}}\) as a modification parameter as follows:

$$\begin{aligned} SINR=\dfrac{\text{P}_{\textrm{signal}}}{\text{P}_{\textrm{noise}}+r.P_{\textrm{interference}}} \end{aligned}$$
(4)

Here, \(r.P_{\textrm{interference}}\) indicates the addition of power factor r with \(P_{\textrm{interference}}\). The power factor r is calculated using the Wi-Fi power spectral density and the offset frequency between the center frequencies of ZigBee and Wi-Fi. The value of power factor r increases when the offset frequency lowers because it is localized around the core frequency. The Packet Error Rate (PER) is denoted by PER and calculated as follows:

$$\begin{aligned} PER=\frac{NEM}{NAM}* 100 \end{aligned}$$
(5)

where NFM and NAM are the numbers of failed messages and the number of attempted measurements, respectively. In Eq. (5), 100 is multiplied to convert the unit of PER into a percentage. In this analysis, we have seen that BER is influenced by the amount of noise and interference in the overlapping channel. The interference power is completely dependent on the offset frequency and distance. If ZigBee devices can notice interference at the early phase, then the performance can be improved by allocating non-overlapping channels and shifting the complete Personal Area Network (PAN) to a safe channel. To detect and avoid the problem of interference, some modifications are required in ZigBee. To achieve energy efficiency while avoiding interference, an Interference Avoidance (IA) algorithm is proposed in this paper. IA algorithm follows the mesh topology for high reliability. Interference detection and avoidance are the two most important aspects of the IA algorithm. Each sender node calculates its PER on a regular basis. If the PER reaches a certain level \(PER_{\textrm{threshold}}\) which is 25% of PER, then the sender will notify the router about the threshold value and the router will inspect its Link Quality Indicator (LQI). The coordinator orders all devices within the network to execute interference detection on accessible channels whenever the LQI falls below the minimum specified value, i.e., 100, which maps to 75% PER. Interference is detected using the ZigBee network’s Energy Detection (ED) scans. The coordinator recommends a channel that has adequate value and is not occupied by other ZigBee networks based on information from all of the ED scans. Finally, all the devices are relocated to the secure channel.

Fig. 3
figure 3

Interference model between ZigBee and Wi-Fi

4 Preliminaries

4.1 System model and design objective

A network of IoT devices and a linked gateway is defined as a set of V IoT devices, each device called a node and represented by \(v_i \in V\). The neighbor of any node is defined by \(n_i \in N\), a set of neighbors. Each node consists of the ZigBee interface as shown in Fig. 1. All nodes use the ZigBee interface to communicate with each other. All nodes which are in the range of one ZigBee coordinator \(C_i\) form a group \(G_z\) (Table 1).  Each ZigBee coordinator consists of both ZigBee and Wi-Fi terminals. One ZigBee coordinator is assigned to one group. The ZigBee coordinator collects data from all its devices through the ZigBee interface. By using the Wi-Fi interface, the coordinator passes the collected data to the gateway. To save power consumption, the Wi-Fi radio is only used to send data from devices to the gateway, while the ZigBee radio is used for device to device communication. As ZigBee radio works on low power as compared to Wi-Fi radio, therefore, we have used Wi-Fi radio only for reliable and fast transmission. The gateway’s Wi-Fi gets turned on and off to prevent more power consumption. To save energy, the gateway turns on its Wi-Fi interface at a predefined beacon interval to send beacon messages and acquire packets from nodes.

Table 1 Symbols and description

Let E is the total gateway’s energy consumption. \(E_z\) is the energy required by the gateway when communicating with the group \(G_z\). The packet arrival rate denoted by \(R_i\) is the rate at which each node \(v_i\) produces a definite number of data packets per second. The aim of the proposed work is to reduce the energy consumption at the gateway and individual nodes, and avoid interference due to cross-interface utilization. The value of minimum energy consumed by the proposed method can be defined as below:

$$\begin{aligned} \min {E} = \min { \sum _{\forall G_{z}} E_{z}} = \min {\sum _{\forall G_{z}} f([{wt_i}]_{C_i\in G_z},[{zt_{i}}]_{v_{i}\in G_{z}})} \end{aligned}$$
(6)

Where \(E_z\) is defined as a result of applying wt-interval of the ZigBee coordinator and \(zt_i\) interval of each node \(v_{i} \in G_z\) for proactive scheduling and reactive scheduling, respectively. wt-interval represents the number of BIs for reactive wake-up. zt is the time interval to send the data frame to the ZigBee coordinator. The value of zt-interval is equal to the number of wake-up slots for proactive wake-up. To achieve this minimum energy, we need to find the optimal value of wt and zt jointly with efficient \(PER_{\textrm{threshold}}\) and \(R_{\textrm{threshold}}\) to resolve the interferences problem.

The objective of the proposed work is to reduce power consumption by using efficient routing and cross-interface of Wi-Fi and ZigBee. While applying the cross-interface approach for improving energy efficiency, the interference problem arises. To resolve the problem of interference during data transmission using both Wi-Fi and ZigBee interfaces, an interference avoidance algorithm is proposed. Because of the unreliable nature of ZigBee, it is used for device-to-device communication only. A reliable Wi-Fi interface is utilized for data transmission to the gateway. Throughout the entire communication, interference is detected and resolved using the proposed IA algorithm.

4.2 Analyzing scheduling and energy consumption

To achieve the defined objective, some analysis needs to be performed. In respect of corresponding nodes, to obtain a desired wt-interval value the actual delay demands of nodes and the power usage by the gateway are examined. The transmission of data between any ZigBee coordinator C and the gateway G is depicted in Fig. 4. The time duration is supposed to be from 0 to \(wt*B\), where B represents the duration of the Beacon Interval (BI). Once the gateway wakes up, a node’s data packets are delivered in one BI duration. The wt time interval consists of two consecutive intervals for reactive and proactive wake-ups. In wt-1 beacon intervals, the gateway can be woken up in a reactive manner, and for the rest 1 beacon interval, it wakes up in a proactive manner. For a node, it takes a maximum of one BI time to send its data packets just after the gateway wakes up (suppose traffic at the gateway is not congested), as additional nodes may be served concurrently. Using proactive wake-up, the delay limit of node \(v_i\)’s data packets travelling in a timeframe between \(wt*B - D_i\) and \(wt*B\) (in Fig. 4 between t8 and t11) can always be maintained, and the maximum count of these data packets is \(D_i*R_i\). The arrival time of the initial packet can be calculated as 1/Di by modelling the inter-packet arrival rate of any node \(v_i\) as an exponential function with a rate parameter of \(D_i\). The value of wt should satisfy the following equation:

$$\begin{aligned} wt \ge {\dfrac{\text{D}_i}{\text{B}}} \end{aligned}$$
(7)

Where B represents the duration of the Beacon Interval (BI) and \(D_i\) is the desired delay bound for data packets generated by node. As a result, we may obtain the wt-interval range as follows:

$$\begin{aligned} w_{\textrm{min}}\le wt\le w_{\textrm{max}} \end{aligned}$$
(8)

Where \(w_{\textrm{min}}\) and \(w_{\textrm{max}}\) are minimum and maximum value of wt. \(w_{\textrm{max}}\) can be chosen as \(w_{\textrm{max}}=255\) (Assume one byte in beacon frame) and \(w_{\textrm{min}}\) [4] can be defined as:

$$\begin{aligned} w_{\textrm{min}} = \min _{\forall {v_i \in V}} {\dfrac{\text{D}_i}{\text{B}}} \end{aligned}$$
(9)

When the gateway initially turns on, it transmits a beacon message to all nodes before allowing nodes to transfer their buffered data packets to the gateway. The gateway remains inactive till the end of the BI after all data packets have been transferred. As a result, the energy spent by the gateway’s Wi-Fi interface during one BI given by \(E_{\textrm{wifi}}\) is calculated as:

$$\begin{aligned} E_{\textrm{wifi}}=E_{\textrm{br}}+E_{\textrm{data}}^{BI}+C \end{aligned}$$
(10)

Where \(E_{\textrm{data}}^{BI}\) is the gateway energy used to broadcast a beacon frame and C is the Wi-Fi power used for transmitting, collecting, and idle monitoring.

Fig. 4
figure 4

Reactive and Proactive wakeup strategy

The ZigBee coordinator uses energy to exchange ZigBee frames which are divided into two halves. The total energy consumed by the coordinator’s ZigBee interface is the sum of two energy \(E_{\textrm{rx}}\) and \(E_{\textrm{idle}}\). Where \(E_{\textrm{rx}}\) and \(E_{\textrm{idle}}\) are the energy to collect a beacon frame and idle monitoring for a slot, respectively. The average energy consumed by the ZigBee interface of ZigBee nodes, coordinator and gateway (\(E_{\textrm{zb}}\)) is calculated as:

$$\begin{aligned} E_{\textrm{zb}}=E_{\textrm{rx}}+E_{\textrm{idle}} \end{aligned}$$
(11)

Therefore, the complete energy usage E can be calculated as follows:

$$\begin{aligned} E = \dfrac{\text{ E}_{\textrm{wifi}}+E_{\textrm{zb}}}{\text{ S}_D \cdot p B \cdot p \sum _{\forall vi\in V} D_i} \end{aligned}$$
(12)

Where \(S_D\) is the data packet size.

5 Interference detection and avoidance scheme

5.1 Interference detection

The ZigBee network employs a PER-LQI-based interference detection system. A node can effectively deliver most of its packets using forwarding due to ZigBee’s small duty cycle, which needs a very short time to transmit packets. We use standard packets instead of specifically transmitting packets like specialized beacons or regular packet transmissions to perform interference detection, which increases packet transmission rate and network battery life. Over a transit time of at least 20 packets, each end system calculates its PER. Whenever the PER reaches 25%, an interference identification notification is sent to the end router. If the LQI between the router and the sink node is less than 100 (that translates to PER 75%), the router assumes that the packet drop is caused by poor link quality rather than power outages or other issues at the end device. In this situation, the router will perform ED scans on the related channel to ensure that the deterioration is caused by interference. When the Received Signal Strength Indicator (RSSI) crossed the limit of threshold (\(R_{\textrm{threshold}}\)), interference is detected. Here, we considered \(R_{\textrm{threshold}}=35\), which is equivalent to a noise level. Then, the node sends an interference notification to its router and the router sends information to the coordinator. The coordinator then initiates the corresponding interference avoidance process. Although the end device cannot efficiently notify the interference to the router, the router can still identify it because it continuously tracks the link LQI between itself and all of its end devices on a regular basis. If the LQI falls below a certain value over a time interval and the router gets no response from its end devices for the specified time out span, an energy detection scan will be performed.

5.2 Interference avoidance

An IA algorithm is proposed to avoid interference in the presence of many ZigBee Personal Area Networks (PANs) shown in Algorithm 1. The PAN receives more interference switches to a different channel via beacon requests. Based on the information about a safe channel from the beacon messages, the PAN coordinator decides which channel to activate. The coordinator device also works as a router. The router is using dual interfaces: ZigBee and Wi-Fi. For the ZigBee interface, the router works as a coordinator and router both and for the Wi-Fi interface, the router works as a coordinator and Wi-Fi station. To avoid interference, all end devices switch to the same safe channel. In the proposed algorithm, the cause of interference and the location of the rest channels are not kept in mind, rather the random channel selection and interference detection is replicated. All ZigBee channels are classified in Fig. 2 as per their offset frequency to perform efficient energy detection scans in minimum time. Class 3 has all overlapping channels assigned the lowest priority while class 1 with non-overlapping channels has the highest priority. Based on the channel’s class priority, network topology and position of the router from Wi-Fi access point, each router has assigned a weight. This weight is used when the coordinator selects a channel from available channels. A group of the channel which is defined as a class can be identified by a variable. Let i is the class number and \(i_1\), \(i_2\), \(i_3\ldots , i_k\) are the channels that belong to a particular class. k is the maximum number of channels of the corresponding channel class.

figure a

IA algorithm identifies which channel is suitable and safe to switch for all of the devices. The algorithm uses energy detection and continuous monitoring of channels. The interference level of Wi-Fi is insignificant when both ZigBee and Wi-Fi operate on non-overlapping channels. These non-overlapping channels are determined by checking the available channels based on their PER and LQI values. While performing an energy detection scan when LQI is smaller than the predefined value (value = 100), then a channel is selected as a safe channel within the current channel class, if available. Otherwise, a scan is performed for the channel selection based on their power weight value.

6 Wakeup strategy and gateway scheduling

To achieve the design objective, the network parameters and wakeup structure are considered to define the wake-up strategy and scheduling. The changes in network parameters may lead to subsequent changes of the wake-up structure, which may cause unexpected violations of delay constraints and inappropriate usage of resources. Because of unexpected modifications in network parameters at certain periods, the wake-up structure can only be determined based on regular monitoring. Two scheduling schemes are used to resolve short-term wake-up complexities of system parameters and achieve the proposed design objective. Firstly, flexible incorporation of reactive wake-up, which aims to further reduce gateway energy consumption. Reactive scheduling effectively decides wake-up operator and collect reactive wakeup demands from the nodes in each group. Secondly, dynamic adaptation of proactive wake-up, which aims to ensure delay criteria by adaptively adjusting proactive wake-up.

According to Power Saving Management (PSM), each node sends a data frame at the start of each beacon interval. To save energy, the gateway turns on its Wi-Fi interface at a predefined beacon interval to send beacon messages and acquire packets from nodes. If a node finds that it has no packets to broadcast or receive, it must hibernate for the remainder of the beacon interval. [6]. The coordinator sends the collected data from all devices to the gateway at a certain time interval. Two wake-up scheduling used in this proposed work are as follows:

6.1 Reactive scheduling

The reactive scheduling is utilized to make the gateway energy-efficient. ZigBee radio is used to transmit data frames from device-to-device communication. The ZigBee coordinator receives data frames via ZigBee radio and switches to a Wi-Fi radio for data transfer to the gateway. Based on the existing traffic condition, the ZigBee coordinator forwards the collected data to the gateway and reduces the power usage by Wi-Fi radio. The devices within ZigBee’s transceiver proximity from one another create a group to lower the energy consumption of the ZigBee coordinator. Because of the unreliable nature of ZigBee, a node requires to send the data frame at regular intervals in repetitive mode. zt is the time interval to send data frame, and the coordinator will turn on its ZigBee interface for this specific time interval to receive the data frame. The smallest time unit in the proposed method is a wake-up slot (defined by t) and equal to the corresponding time expected to transfer or receive a ZigBee message. The switching time is considered for sleep and wake-up states.

6.2 Proactive scheduling

Adopting only reactive wake-up can save energy as the coordinator only utilizes its Wi-Fi interface whenever it is requested. Because of ZigBee’s unstable behavior and irregular availability, the prerequisites for delay will not always be fulfilled. To satisfy the delay requirement, proactive scheduling is used which wakes up the coordinator’s Wi-Fi interface for a specific time interval wt. The coordinator’s Wi-Fi interface assesses the network requirements for this specific amount of BIs (wt-interval) and collects stored packets of data. While this approach can fulfil delay requirements by fixing wt to a modest number, it may also waste energy. By using proactive scheduling, a balance between energy consumption and delay constraints is maintained. A dynamic aggregation method is used which enables the nodes to send their wake-up frames sequentially in accordance with ascending order to prevent potential collisions [3]. Therefore, we can establish an energy-efficient model without interference by combining reactive and proactive scheduling with the IA algorithm.

figure b

Algorithm 2 shows EES which uses all group information with all network parameters to evaluate the minimum value of zt and \(R_j\). The algorithm calculates the optimum energy requirement (E) for each possible wt-interval (in the flexible range of (\(w_{\textrm{min}}\le wt\le w_{\textrm{max}}\))) and generates the suitable wake-up structure that yields the minimum optimum value.

For the routing, we have used hybrid routing as per the type of interface. All the ZigBee devices use RPL (Routing Protocol for Low-Power and Lossy Networks), which is a proactive type of protocol. All Wi-Fi interfaces use Ad Hoc On-demand Distance Vector Routing (AODV), which is a reactive type of protocol. Therefore, in the proposed work we are using AODV-based RPL protocol (AODV-RPL).

7 Implementation and result

7.1 Simulation model

The Omnet++ simulator inet framework is used for simulation to evaluate the implementation of Energy-Efficient Scheduling (EES) in IEEE 802.15.4 and IEEE 802.11 g coexisting environment along with Interference Avoidance (IA) algorithm. The general architecture of the IoT network is shown in Fig. 5. We have considered 30 nodes in six groups, which are distributed in a \(300\,\hbox {m} \times 300\,\hbox {m}\) region in the simulation. The ZigBee and Wi-Fi terminals have a 100 m range. All the nodes communicate with the coordinator node using ZigBee interface. The gateway works as an access point and the coordinator device works as a router. The data packet size is fixed at 512 bytes in the simulation. The specification of energy is given in Table 2 for Wi-Fi and ZigBee radios, as per the configuration and initialization of the simulation. The value of ZigBee channel quality is calculated by dividing the total number of beacon messages received at the gateway by the expected number of beacon messages sent by the node during a particular time slot. In the same way, by keeping track of a fixed number of data packet arrivals, the packet arrival rate can also be calculated. Each node randomly chooses a packet arrival rate and delay bound as specified by the average packet arrival rate and average delay bound. By default, the data packet arrival is treated as a Poisson process. Based on the average packet arrival rate and average delay bound, \(R_i\) and \(D_i\) are chosen as 3 pkt/s and 0.5 s, respectively. The group coordinator forwards data to the gateway using Wi-Fi interface. The bandwidth value of the Wi-Fi and ZigBee interfaces are 54 Mbps and 250 Kbps, respectively. The default values of energy requirement are fixed during different modes of transmission, reception and idle listening for both Wi-Fi and ZigBee radios. The default energy consumption value of a node for Wi-Fi transmission and reception (as per the simulator settings) is 1.152 Watt and 0.561 Watt, respectively. During idle listening or in sleeping mode, the Wi-Fi interface consumes 0.462 Watt. Similarly, while communicating using ZigBee radio a node consumes 0.087 Watt, 0.072 Watt and 0.019 Watt for transmission reception and idle listening, respectively. The shortest time required for transmitting or receiving a ZigBee frame is considered \(t=10\) ms. In the simulation, the length of BI is taken as 100 ms which is equivalent to time requirement for delivering a data packet of the node. IA algorithm jointly with EES algorithm is implemented for evaluation of interference level at the gateway and node. The interference level is proportional to the impact of interference on the network. If interference is not considered, then the presence of Wi-Fi can severely affect the performance of ZigBee. To avoid the problem of interference and diminish the impact of Wi-Fi on ZigBee, the IA algorithm along with the EES algorithm is implemented. To test the efficiency of the IA algorithm in the coexisting environment of cross-technology, PER and BER are considered. For comparative analysis, we have implemented the GIG [3] scheme which follows the concept of power-saving management and works on cross-interface scheduling. In GIG, every node is equipped with a pair of ZigBee and Wi-Fi interfaces, which causes more interference at the individual node. In our proposed scheme, only coordinator nodes are utilizing both ZigBee and Wi-Fi interfaces. The end devices are using only the ZigBee interface for low power consumption as well as interference reduction with Wi-Fi radios.

Fig. 5
figure 5

Network Architecture with 6 nodes per group

Table 2 Value of simulation parameters

7.2 Performance matrix

To analyze the effect of the proposed scheme, three performance matrices, energy consumption, interference level and throughput are used as follows:

  • Energy consumption: The overall energy consumption of the network is measured in mili-Joules per packet (mJ/pkt). The network’s total energy consumption can be classified into two parts: first gateway energy consumption and second node energy consumption which includes both node and coordinator energy consumption, which is described as:

    $$\begin{aligned} E= E_G + E_N \end{aligned}$$
    (13)

    Where E denotes the total energy consumption. \(E_G\) is gateway energy consumption, and \(E_N\) shows the coordinator and node energy consumption combinedly. The per-byte energy consumption is determined by dividing the total energy consumed by the gateway with the total number of data packets received at the gateway. The per-byte energy consumption is given as below:

    $$\begin{aligned} E_G (per/byte) =\dfrac{\text{ E}_G}{\text{ T}_{\textrm{DP}} } \end{aligned}$$
    (14)

    Where \(T_{\textrm{DP}}\) is the total number of data packets received at gateway.

  • Interference Level: Interference is defined as the inclusion of undesired signals into valuable information. As a signal travels along with a transmission medium between its sender and recipient, interference transforms it in a harmful manner. Here, interference level can be defined as the impact of Wi-Fi radio on ZigBee radio. A high interference level means more impact on the network performance and vice versa. To detect the level of interference, we are considering PER and BER which are defined in Eqs. (1) and (5), respectively.

  • Throughput: The throughput of the system refers to how much data it can access and process successfully in a specific duration of time. Throughput is commonly calculated in bits per second (bps).

    $$\begin{aligned} \hbox {Throughput (bits/sec)} =T_{\textrm{DP}}* P_{\textrm{Size}} / Time \end{aligned}$$
    (15)

    Where \(T_{\textrm{DP}}\) is the total number of data packets received successfully, \(P_{\textrm{Size}}\) indicates the size of each packet in bits and Time represents the total time required for sending that data.

7.3 Result and discussion

The EES algorithm along with the IA algorithm is implemented while considering the two important metrics, energy consumption and interference level. We have also implemented the GIG [3] scheme for comparison which is based on the PSM principle and works with cross-interface scheduling. The entire comparative analysis is performed to analyze the energy requirement and interference level. The impact of varying delay bound, packet arrival rate and node density on system performance are determined concerning energy consumption. Similarly, the impact of varying network size and delay bound in terms of PER and BER is determined for interference level measurement. In the subsequent section, the performance is measured by modifying one parameter while keeping the others constant.

Figure 6 depicts the system’s performance in terms of gateway energy consumption with different delay bounds. The energy consumption at gateway reduces as the delay bound increases in the proposed scheme. This happens because EES enables more data packets to be delayed and buffered at ZigBee’s coordinator and forwards them to the gateway at once, which results in efficient transmission with low energy consumption. Figure 7 depicts the system’s performance in terms of node energy consumption with different delay bounds. Initially, when the delay bound is small, the more data packets are received per second at the ZigBee coordinator and it will consume more power to access them. When the delay bound is large, the fewer amount of data packets are generated and reached to the coordinator, therefore the energy consumption reduces in terms of node energy. With increasing delay bound, the power usage of EES decreases more than GIG. The comparative analysis shows EES consumes less energy than GIG.

Fig. 6
figure 6

Gateway Energy consumption Vs Delay Bound

Fig. 7
figure 7

Node Energy consumption Vs Delay Bound

The result of gateway energy consumption with varying packet arrival rates is shown in Fig. 8. As the packet arrival rate increases, the more data packets are queued and transmitted to the gateway in a single pass. Therefore, it reduces the energy expenses per data packet at the gateway. In GIG, the frequency of proactive wake-up increases which consume more energy as compare to EES. Figure 9 of EES and GIG algorithms with varying packet arrival rates. As PAR increases, the more number of data packet are arrived at a time at ZigBee coordinator. The coordinator node process these packets efficiently without wasting energy in idle listening. Therefore, energy reduction is achieved at all nodes using the EES algorithm. Whenever the value of PAR increases, GIG activates more frequent reactive wakeups which consumes more energy at node as compare to EES algorithm.

Fig. 8
figure 8

Gateway Energy consumption Vs Packet Arrival Rate(PAR)

Fig. 9
figure 9

Node Energy consumption Vs Packet Arrival Rate(PAR)

To evaluate the working efficiency of the proposed model under varying node densities, we have evaluated the energy consumption of gateway for different sizes of network and show the results in Fig. 10. In Fig. 10, when there are 24 and 32 nodes, the energy usage of the gateway reduces as node density rises. This is due to the fact that increasing node density decreases per-packet energy usage by indirectly raising the overall packet arrival rate. Furthermore, when there are too many nodes (for instance, more than 32 nodes), the data traffic rate and network size increase which causes an intense collision and increases energy usage. Using the GIG algorithm, the energy consumption at the gateway is more than the EES. Therefore, the EES algorithm provides a more energy-efficient system than the GIG algorithm. Figure 11 shows node energy consumption using EES and GIG schemes. More number of nodes means a bigger group size, which reduces conflict and consequently energy usage on ZigBee transmission in the EES algorithm. Also, the efficacy of the node gathering scheme used in EES is proven. GIG also performs better as the network and group size increase but not more than EES.

Fig. 10
figure 10

Gateway Energy consumption Vs Number Of Node

Fig. 11
figure 11

Node Energy consumption vs number of node

To measure the performance of the EES along with the IA algorithm, against a range of radio interference the results are measured in terms of PER and BER. The IA algorithm is used to regulate the Wi-Fi traffic while maintaining ongoing ZigBee transmission and minimizing the delay as a result of Wi-fi interference. The performance of ZigBee affects by increasing delay bound, and it is shown in the form of the BER and PER. More BER and PER means more data loss which directly diminish the performance of ZigBee. As shown in Fig. 12, the BER value increases very slowly on a particular range of delay bound (0.4–0.8 s). It happens because the delay bound is indirectly proportional to data traffic. When data transmission increases, the chance of getting more bit error rates also increases. The result shows that the EES algorithm along with the IA algorithm works better than GIG in the presence of Wi-Fi radios. Figure 13 explains the performance of EES along with IA algorithm in terms of PER as delay bound varies. In Fig. 13, the PER value increases very slowly on a particular range of delay bound (0.4–0.8 s). It happens because the delay bound is indirectly proportional to data traffic. When data transmission increases, the chance of getting more packet error rates also increases. The PER value of the proposed scheme is smaller than the GIG approach, which shows the low impact of interference level on data transmission. The GIG scheme used a method for ensuring energy efficiency while not considering the coexistence of Wi-Fi radios.

Fig. 12
figure 12

BER vs Delay bound

Fig. 13
figure 13

PER vs Delay bound

Figure 14 exhibits the performance of the IA algorithm in respect of BER. When the size of the network increases, the corresponding value of BER indicates that the EES along with IA outperforms the GIG. Figure 15 depicts the performance of EES along with IA in terms of PER when the size of the network changes. The value of PER increases very slowly after a network size of 25 nodes which shows the efficient implementation of the IA algorithm for interference avoidance. The GIG scheme does not use any method for avoiding the interference problem in coexistence radios. The simulation result in Fig. 16 shows the performance of the proposed method against the GIG. The results show that the throughput of the EES along with IA is more than GIG. As the number of nodes increases, so does the throughput. More messages are exchanged in the network as the number of nodes increase which raise the value of network throughput.

Fig. 14
figure 14

BER vs Network Size

Fig. 15
figure 15

PER vs Network Size

Fig. 16
figure 16

Throughput vs Number of Nodes

8 Conclusion and future work

The proposed work introduces an Energy-Efficient Scheduling (EES) approach in IoT Using Wi-Fi and ZigBee Cross-Technology. It takes advantage of existing ZigBee technology to lower the power consumption of Wi-Fi radios for transmitting data with definite delay constraints. The use of both technology ZigBee and Wi-Fi for transmitting data over the network causes the interference problem. To resolve the interference problem, IA algorithm is used along with scheduling technique. Based on the findings, it can be concluded that EES outperforms the previously proposed approach GIG, in terms of energy efficiency. The EES along with IA-based network achieves a lower bit error rate and packet error rate then GIG which shows better channel utilization and low impact of interference even when Wi-Fi is present. In the future, EES algorithm can be extended to use with the mobile gateway to optimize the performance of IoT networks.