1 Introduction

The Internet of Things (IoT) is gaining the popularity day by day as the most promising networking model that interconnects the physical and cyber world. The Internet of Things (IoT) is the inter-networking of sensors, actuators, Radio Frequency Identification (RFID), Smartphones, embedded devices and so on. These IoT components are interconnected to each other via wireless and wired medium to the internet [1, 2]. WSNs collect the real-world data from the network area. With the help of cloud, data mining and machine learning techniques can trigger many numbers of applications and would make our daily life very convenient [3].

IoT applications run on 24*7 h and transmit the sensed data continuously to base station or server. Most of the IoT components run on limited energy resources, so green networking has a very crucial role for IoT network deployment. Green IoT focuses on energy efficiency and resource utilization in the network. Green IoT can be defined as the efficient ways to utilize the resources (sensor, relay node, and other types of nodes) with an energy-efficient communication protocol. On the other hand, IoT network is deployed at large scale, and it consists of many objects that consume more energy, so green networking plays an important role for IoT network deployment to reduce power consumption, lessen pollution and operational costs to make the environment healthy [4].

The optimal number of Relay Node (RN) selection, their deployment strategy, and communication cost reduction would prolong the network lifetime for various WSN-Assisted IoT applications. These are the prime objectives of this research paper. Many techniques have been proposed earlier to increase the network lifetime for WSN applications such as ad-hoc [5,6,7], hierarchy [8,9,10,11], exact [12,13,14,15], and ME-CBCCP [16]. But these techniques did not sufficiently investigate the node deployment issues (which are discussed in detail in the related work section) with consideration of energy-efficient WSN-Assisted IoT network to make sustainable and scalable network [4, 16, 17].

To overcome these drawbacks, we introduce an effective RN selection method with a low-cost communication routing protocol to prolong the network lifetime. The proposed method has implemented in three phases. In the very first phase, the network is deployed in hierarchical cluster topology, which can be extended up to any level. In the second phase, Sensor Node (SN) will be elected as RN by Effective Relay Node Selection method (ERNS). The number of RN selection in every cluster depends on the node density and RN communication range and may vary from cluster to cluster. In the last phase, Energy Efficient Communication protocol (EEC) delivers the network data at the base station. We analyzed the proposed technique with DEEC, EESAA, ME-CBCCP, LEACH, MOD-LEACH, TDEEC, and SEP protocols and observed that the proposed technique is better in terms of energy depletion and network lifetime. The Effective Relay Node Selection for Energy Efficient Consumption (ERNS-EEC) can be easily implemented on green WSN-Assisted IoT deployment. The research work in this paper can be summarized as follows:

  1. (a)

    In this work, we deploy the sensor nodes in the hierarchical cluster framework. This topology supports the scalability feature and can be extended up to any level. The communications among the sensor nodes in inter and intra-cluster follows some well-defined rules [16] to distribute the cluster load so that network lifetime can be increased.

  2. (b)

    To increase the network lifetime and decrease network cost, we introduce an Effective Relay Node Selection method (ERNS) for hierarchical cluster framework, which selects the appropriate number of RNs within the cluster and minimize the energy consumption.

  3. (c)

    The simulation has been performed in MATLAB with standard parameters for randomly deployed nodes, and numerical results validate that the proposed scheme is more preferable than traditional WSN techniques for IoT application.

The remainder of the paper is structured as follows: Overview of WSN routing protocols is given in Sect. 2. Section 3 covers the description of the system framework. RN selection method and its application in minimum energy consumption routing algorithm are presented in Sect. 4. Section 5 will discuss the simulation results of Effective Relay Node Selection for Energy Efficient Consumption (ERNS-EEC) model and their comparative analysis with other standard routing protocols. Later, the conclusion is made followed by a future direction.

2 Related Work

The WSN topologies for large scale network can be categorized into four categories: hierarchy, plane, mesh, and hybrid. The deployment techniques for these topologies are hierarchy, ad hoc, exact and hierarchy +ad hoc. In the exact scheme [15, 18], the sensors are deployed in a regular manner, where each sensor propagate own data but also work as a relay for other nodes. However, this scheme extends the network efficiency and survivability, but nodes near the sink deplete their energy earlier, which reduces the network lifetime. Hence, this technique is not adequate for WSN-Assisted IoT applications. The ad hoc scheme has many applications in the WSN area that includes Border surveillance and Disaster relief action. The ad hoc scheme also has less network lifetime problem as exact scheme [5, 7]. In hierarchical deployment [16, 19] scheme nodes are placed in a cluster based tiered framework, where the Sensor Nodes (SNs) are placed in the lower layer and Base Station (BS) in the topmost layer. Some of the nodes in the cluster are promoted as RN, cluster head (CH) and Cluster Coordinator (CCO). The SNs can transmit the data to the nearest local cluster Relay Nodes (RNs), and RNs transmit the data to local CH. CH sends the data to the BS via above layer CCOs. SNs are not allowed to communicate with each other directly. This deployment scheme can prolong the network lifetime and also support the core WSN-Assisted IoT features: scalability as well as extensibility. The hierarchy +ad hoc [20] scheme deploys the sensor also in the tiered framework except for one change from hierarchical topology. The SN in the lower layer can communicate with each other and support better functionality. But it also suffers from the problem as experienced by exact and ad-hoc schemes.

In WSN-Assisted IoT, after the network has been deployed the main job of a sensor is to send the data to the base station periodically. The simple way to achieve this task is direct communication between sensor nodes and the base station [21]. But it causes imbalance energy depletion among the nodes. The nodes near to the base station deplete their energy earlier in comparison of other nodes, which are placed far enough from the base station. To overcome this issue, a related study on cluster-based routing protocols [22, 23] suggest that hierarchical topology is more preferable choice for WSN-Assisted IoT network deployment. Therefore in this work, we adopt the hierarchical cluster-based topology with effective RN selection method. In recent past, many researcher developed various multi-hop hierarchical routing protocol such as PANEL [24], PEGASIS [25], T-DEEC [26], EESAA [27], SEP [28],TLEACH [29], EECHA [30], HEED [31], EB-PEGASIS [32],CODA [33], CCS [25], HCR [34], MODLEACH [35], BCDCP [36], EECS [37], LEA2C [38], and Cross layer [39], etc. which include optimal cluster head selection and load balancing in clusters to optimize network energy. The prime focus of these protocols is to achieve energy efficient communication so that network lifetime can be increased. These routing protocols are not suited for WSN-Assisted IoT applications due to complex nature. They require more phases and time for cluster formation and less support for scalability.

Huang et al. [4] proposed a novel deployment scheme for green IoT network. The proposed scheme is based on a hierarchical framework, along with communication constraints. The sensor nodes are not allowed to communicate with each other directly, and they can communicate via RN. The sensor node sends the sensed data to the RN, and RN transmits the sensor data to the base station. When the network area is vast, direct communication between RN to base station causes the massive energy depletion and decreases the network lifetime.

Rani et al. [16] introduced MB-CBCCP protocol for WSN-Assisted IoT network. This technique elects the RNs randomly among the shortest distance nodes and does not consider any distance parameter for the next RN selection. So, some of RNs can be overlapped in each other sensing area. It causes additional RN participation to cover the respective cluster. Hence, this cause additional system cost (due to more node selection as RN) and resource utilization is inefficient. The MB-CBCCP pre-decides the possible number of nodes as RNs randomly, which is not preferable. The number of RN selection can vary from cluster to cluster, and it depends on the node density of the clusters.

After going through above-reported protocols, we identified many issues for RN selection and their arrangement, which are not adequate as per the basic requirements of WSN-Assisted IoT network. Robustness is an essential feature to maintain network connectivity and data transmission. But due to the early death of nodes near to BS, the protocols reported in literature may not maintain network connectivity. Other routing protocols such as T-ERP, SEP, EESAA, LEACH, genetic HCR, MOD-LEACH, and DEEC work on the common objective as energy optimization. But they do not account for other WSN-Assisted IoT features like scalability, load balancing, etc. Therefore, they are not preferred for scalable and real-time WSN-Assisted IoT application.

Based on the above drawbacks and challenges, we reach to the conclusion that above standard WSN protocols provide lack of support towards the main WSN-Assisted IoT features like scalability, robustness, and energy efficiency. To overcome these issues, we develop an optimal RN selection method along with routing protocol for hierarchical node arrangement, which reduces the communication cost, system cost, and enhances network lifetime.

3 System Model

3.1 System Framework

Typically WSN-Assisted IoT networks are deployed in a wide area and having many numbers of objects in it; therefore it contains more complex network scenarios than traditional WSN. Huang et al. [4] showed in their work that at a large-scale area WSN with dynamic routing is not preferable for the outdoor environment. Temperature, air humidity, interference are other factors, which have an adversary effect on sensor transmission; thus making such a framework inoperable for a large scale networking area. The nodes in WSN-Assisted IoT network are limited in terms of resources such as memory, processing power, and energy. Dynamic routing in WSN creates additional communication overhead due to regular information exchange regarding routes and node location with other nodes. The energy consumption increases significantly with the network scale due to the complexity of dynamic routing. Because of all these factors, dynamic routing is not effective for green WSN-Assisted IoT network. On the other end, WSN-Assisted IoT nodes have less mobility, and network topology remains stable. So, static routing gains more advantage over dynamic routing in large scale WSN-Assisted IoT application [4, 16].

Figure 1 represents the multilayer hierarchical cluster framework for WSN-Assisted IoT network deployments, where all the nodes remain stable and follow static routing for sending the data. This framework is same as used in [4, 16] except the relay layer and RN selection technique. The topmost layer configured as a Base Station (BS), which act as an intermediate between network and internet. All the layers except BS layer have Sensor Nodes (SNs) in which some of SN promoted as Relay Nodes (RNs), Cluster Heads (CHs) and Cluster Coordinators (CCOs). The upper layers except the bottom layer configure with CCO. Direct communication among the SNs is not allowed to preserve the energy, so SNs send their data to the nearest RN and RNs transmit data to local CH. The CH transmits the data to the BS via CCOs to avoid long distance communication and increase hopping. The BS receives the data either via CCO or CH node (Top layer cluster). In every upper layer clusters, there is one dedicated CCO corresponding to lower layer CHs for data forwarding.

Fig. 1
figure 1

IoT multi-tier framework

The proposed scheme supports scalability and follows static routing. Therefore, complexity will be less and can be easily managed. By placing the WSN-Assisted IoT nodes as Fig. 1 framework with proposed RN selection method, the energy consumption can be reduced as well as system cost due to less node selection as RN which we will see in detail in the upcoming section.

Let a and b two points in Euclidean plane and their distance to each other is Dist(a, b). SNset1, RNset1, and CHset1 are the set of sensor nodes, relay nodes and cluster heads within the cluster 1 respectively. CCOset1 and BS are the set of cluster coordination and base station set. WSN-Assisted IoT network is represented by G = (N, V), where N is the number of sensor nodes which are deployed randomly in terrain and V is the wireless link among the nodes. The transmission range of SN and RN are r and R respectively; R > r > 0.

3.2 Communication Constraints

The communication constraints [16] among the nodes within the network are summarized below:

3.2.1 Intra-cluster Communication

Communication will not take place with the following given conditions:

  • if a є SNset1, b є SNset1 && Dist(a, b) ≤ r (1)

  • if a є SNset1, b є CHset1 && Dist(a, b) ≤ r (2)

  • if a є RNset1, b є RNset1 && Dist(a, b) ≤ R (3)

Communication will take place with the below given conditions:

  • if a є SNset1, b є RNset1 && Dist(a, b) ≤ r (4)

  • if a є RNset1, b є CHset1 && Dist(a, b) ≤ r (5)

(SNs can communicate to CH via RNs).

3.2.2 Inter-cluster Communication

Communication will not take place with below given conditions:

  • if a є SNset1 in CLSTRLower, b є SNset2 in CLSTRUpper && Dist(a, b) ≤ r (1)

  • if a є SNset1 in CLSTRLower, b є RNset2 in CLSTRUpper && Dist(a, b) ≤ r (2)

  • if a є RNset1 in CLSTRLower, b є RNset2 in CLSTRUpper && Dist(a, b) ≤ R (3)

  • if a є SNset1 in CLSTRLower, b є CHset2 in CLSTRUpper && Dist(a, b) ≤ r (4)

  • if a є CHset1 in CLSTRLower, b є CHset2 in CLSTRUpper && Dist(a, b) ≤ r (5)

  • if a є RNset1 in CLSTRLower, b є CHset2 in CLSTRUpper && Dist(a, b) ≤ r (6)

  • if a є CHset1 in CLSTRLower, b є CHset2 in CLSTRUpper && Dist(a, b) ≤ r (7)

Communication will take place in the below given conditions only:

  • if a є CHset1 in CLSTRLower, b є CCOset2 in CLSTRUpper && Dist(a, b) ≤ r, && CLSTRid (CLSTRLower) = (CLSTRid + 1)(CLSTRUpper) (1)

  • if a є CCOset1 in CLSTRLower, b є CCOset2 in CLSTRUpper && Dist(a, b) ≤ r, && CLSTRid (CLSTRLower) = (CLSTRid + 1)(CLSTRUpper) (2)

  • if a є CCOset1 in CLSTRLower, b є BS in CLSTRUpper && Dist(a, b) ≤ r, && CLSTRid(CLSTRLower) = (CLSTRid + 1) (CLSTRUpper) (3)

  • if a є CHset1 in CLSTRLower, b є BS in CLSTRUpper && Dist(a, b) ≤ r, && CLSTRid(CLSTRLower) = (CLSTRid + 1) (CLSTRUpper) (4)

3.3 Assumptions

  1. (1)

    All participating sensor nodes in the network are randomly deployed and stationary [4, 16].

  2. (2)

    Same set of Nodes (SN, RN, CH, CCO) have the same attribute, e.g., transmission power, initial energy, energy depletion parameters, and so on.

  3. (3)

    In the initial phase, location of node is tracked by the GPS. Later GPS will be turned off because nodes remain static [16].

  4. (4)

    Sensor nodes are running on limited energy source, which cannot be recharged or replaceable.

  5. (5)

    Node can send their data to the base station in a multi-hop way and base station is not restricted with respect to energy.

  6. (6)

    RN, CH and CCO are able to aggregate the data [56].

  7. (7)

    The whole network is connected; i.e., each participating node in network has a path to a BS.

The communication constraints for Fig. 1 are summarized below in Table 1. The distance between all the nodes in Table 1 is assumed to be less than r. The ✓ symbol illustrates the communication can take place between pair nodes and ✘ symbol represents the communication cannot be possible between pair nodes.

Table 1 Communication constraints

3.4 Aggregation Model

In this framework, all nodes (except SN) can perform data aggregation, which significantly reduces the energy depletion of the sensor nodes. Figure 2 represents the simple scenario of data aggregation, where nodes are located in a network. Each node sends the data packet to the BS. In the first scenario, nodes start the communication without data aggregation, and total identified number of packets is n*(n + 1)/2. In the second scenario, nodes send the packets with data aggregation and the total observe packet is n. Each node aggregates its data with the preceding node’s received packet. So, the total number of reduced packets would be (n + 1)/2 with data aggregation in the network.

Fig. 2
figure 2

a Data communication without data aggregation and b with data aggregation

3.5 Research Problem

From the literature survey, we identified that WSN routing has some challenges when configured in the WSN-Assisted IoT environment. The challenges are: (1) long-distance communication leads to short network lifetime; (2) The nodes near to BS deplete their\energy early; (3) Scalability; (4) RN selection method needs improvement. To resolve all the above challenges, many solutions have been proposed in the past. The clustering formation method and cluster head selection method in LEACH [40] can increase the network lifetime. However, direct communication between SN to CH and CH to BS decreases the network lifetime. SEP [28] introduces heterogeneous nodes in the network and increases network lifetime as compared to LEACH. TDEEC [26] also configure heterogeneity in the network as SEP to improve the stability of the network, but in TDDEC, it uses multilevel heterogeneity. The CH election is based on the energy threshold and the average energy of the network. EESAA [27] adds residual energy as one more parameter for interchange between sleep and active modes to conserve energy. MOD-LEACH [35] used two energy models for intra and inter-cluster as low and high model respectively. Genetic HCR [41] and ERP [42] are genetic protocols based on cluster and improved network stability as compared to LEACH and SEP. However, CHs election in these protocols are based on the best breed process (mutation) and takes more time, so it is not preferable for real-time WSN-Assisted IoT application. The above-discussed protocols elected the CHs in every round based on various parameters. ME-CBCCP [16] suggests that instead of CH reselection in every round, the role of CHs can be distributed with the other high energy nodes known as RN and CCO. ME-CBCCP considered the RN selection method based on the random selection and some of the RNs intersect their sensing regions because the next node selection as RN is not far as their sensing radius (Fig. 3). Hence, to provide the network coverage to all the local nodes within the cluster, more number of nodes have to be elected as RN; otherwise some nodes may be uncovered. This will lead to increase the cost of the system (in terms of more RN). To overcome this situation, we utilize the RN’s sensing radius R as threshold distance (Fig. 4).

Fig. 3
figure 3

Random RNs selection strategy (ME-CBCCP)

Fig. 4
figure 4

RNs selection strategy with sensor radius as distance threshold

4 An Energy Efficient Model for IoT

The objective of the proposed RN selection method for hierarchical WSN-Assisted IoT framework is to identify the number of RNs in every cluster and their location for reducing the energy consumption and system cost. The number of RN selection depends on the node density of the clusters, which would vary from cluster to cluster. The RN selections method with respect to node density instead of random selection can decrease the number of RN. It would minimize the system cost (extra RNs cost can be saved).

4.1 System Constraints

Communication between Sensor Nodes (SNs) can take place through local cluster RNs only. Direct communications between SNs is not possible. SNs can transmit the data only; whereas RNs, CHs and CCOs can perform the data reception and transmission. SNs and RNs cannot communicate with other clusters. However, lower cluster CH can communicate to upper layer cluster CCO, where cluster id of CCO’s cluster is exactly one greater than CH’s cluster id. CCO transmits the cluster data to the BS via intermediate CCOs. Every above cluster has one dedicate CCO to distribute the load of CH, which is corresponding to every lower cluster CHs. By above-discussed scenarios, G = (N, V) is directed and connected graph. Let p and q two SNs; they will be called neighbor nodes if they can communicate with each other. Let N(p) represents the set of p neighbors node, and A represents the adjacency matrix of G(N, V).

$$A = \left[ {\begin{array}{*{20}c} {A_{11} } & {A{}_{12}} & \cdots & {A{}_{1\left| N \right|}} \\ {A{}_{22}} & {A{}_{22}} & \cdots & {A{}_{2\left| N \right|}} \\ \vdots & \vdots & \ddots & \vdots \\ {A{}_{\left| N \right|1}} & {A{}_{\left| N \right|2}} & \cdots & {A_{\left| N \right|\left| N \right|} } \\ \end{array} } \right]$$
(1)

where Apq= 1 if q є N(p), otherwise Apq = 0.

To address the energy efficient WSN-Assisted IoT requirements, we consider the following system constraints.

4.1.1 Energy Model

The main source of energy depletion in WSN-Assisted IoT network is data transmission and reception. Sensor nodes deplete the energy in sensing and processing is very less. In this work, we follow the Friis space model [43] for energy depletion in data communication, which is given below.

$$E_{tx } = L \times \left( {E_{elec} + \in_{X} \times d^{2} } \right)$$
(2)
$$E_{rx} = L \times E_{elec}$$
(3)
$$E_{tx} = L \times \left( {E_{elec} + \in_{X} \times d^{4} } \right)$$
(4)

ϵ1, ϵ2, ϵ3, ϵ4 is used as a node’s amplifier for SN, RN, CH and, CCO respectively. The energy depletion in short distance and long-distance communication is identified by Eqs. (2) and (4) respectively. Data reception at RN, CH and CCO nodes and their utilized energy in this task is computed by Eq. (3). Energy depletion per unit time for each node is computed by:

$$E_{a} = \mathop \sum \limits_{b \in RN} A_{ab} \cdot F_{ab} \cdot \left( {E_{elec}^{NN} + \in_{1} \cdot d_{ab}^{2} } \right) \forall a \in SN$$
(5)
$$E_{b} = \mathop \sum \limits_{a \in SN} A_{ab} \cdot F_{ab} \cdot E_{elec}^{RN} + \mathop \sum \limits_{c \in CH} A_{bc} \cdot F_{bc} \cdot \left( {E_{elec}^{RN} + \in_{2} \cdot d_{bc}^{2} } \right) \forall b \in RN$$
(6)
$$E_{c} = \mathop \sum \limits_{b \in RN} A_{bc} \cdot F_{bc} \cdot E_{elec}^{CH} + \mathop \sum \limits_{d \in CCO} A_{cd} \cdot F_{cd} \cdot \left( {E_{elec}^{CH} + \in_{3} \cdot d_{cd}^{2} } \right)\forall c \in CH$$
(7)
$$E_{d} = \mathop \sum \limits_{{c \in CH {\text{U CCO}}}} A_{cd} \cdot F_{cd} \cdot E_{elec}^{CCO} + \mathop \sum \limits_{{e \in CCO{\text{U}}BS}} A_{de} \cdot F_{de} \cdot \left( {E_{elec}^{CCO} + \in_{4} \cdot d_{de}^{2} } \right) d \in CCO$$
(8)
$$E_{e} = \mathop \sum \limits_{d \in CCO} A_{de} \cdot F_{de} \cdot E_{elec}^{BS} \forall e \in BS$$
(9)

Ea, Eb, Ec, Ed, Ee denote the energy depleted by SNs, RNs, CHs, CCOs, and BS respectively in data transmission and reception. The symbols \({\text{E}}_{\text{elec}}^{\text{SN}}\),\({\text{E}}_{\text{elec}}^{\text{RN}}\), \({\text{E}}_{\text{elec}}^{\text{CH}} ,\)\({\text{E}}_{\text{elec}}^{\text{CCO}}\), \({\text{E}}_{\text{elec}}^{\text{BS}}\) indicate the energy consumption in the radio electronics of SNs, RNs, CHs, CCOs and BS. Equation (5) denotes the energy consumed in data transmission processes between SN to RN within the intra-cluster. The energy consumed in sending the data to the CH by RN and data receiving by the CH is computed by Eq. (6). The energy consumed by CH for data reception from RN and transmission to the upper layer CCO is represented by Eq. (7). Equation (8) shows the energy consumed by CCO for the data communication process to upper layer CCO or the BS and for the data receiving processes either by lower layer CH or CCO. Equation (9) shows the consume energy in the BS layer. All of above equations exclude the energy consumption by signaling data because it is negligible [3] as compared to data transmission and receiving.

4.1.2 Optimization Problem for Energy Efficient IoT

The prime focus of this research work is to extend the network life. Therefore, the optimization model for energy efficient system is defined as:

$${\text{min}}\left[ {\mathop \sum \limits_{a \in SN} E_{a} + \mathop \sum \limits_{b \in RN} E_{b} \mathop \sum \limits_{c \in CH} E_{c} \mathop \sum \limits_{d \in CCO} E_{d} } \right]$$
(10)

4.1.3 System Budget Constraints

The proposed RN selection method utilizes the resource efficiently and provide the node coverage in cluster with less number of RNs as compared to ME-CBCCP [16]. Hence, cost of additional number of RN can be reduced by proposed Effective Relay Node Selection technique (ERNS).

4.2 Description of ERNS-EEC

The solution of the energy consumption problem is achieved by Algorithm 1 (ERNS), where ERNS elects the RN efficiently, and Algorithm 2 (EEC) [16] routes the data from SN to BS. The flow chart of ERNS-EEC is given in Fig. 5.

Fig. 5
figure 5

Flow chart depicting the control flow

The ERNS-EEC works in the following five steps: In the first step of EEC (Algorithm 2, line 2), nodes are deployed randomly within the networks. Step 2 (Algorithm 2, line 3) divides the network into equal cluster size by subarea division technique. Suppose if the area is 300 m2, then the cluster size is 30 m2 and number of clusters is 10. In step 3, RN is selected by Algorithm 1. In step 4 (Algorithm 2, Line 14–19), CH, and CCOs are selected randomly. In Step 5 (Algorithm 2, Line 20–24), the data is transmitted from SN to BS via RNs, CHs, and CCOs. To maintain robustness in large WSN-Assisted IoT network, the energy of RN, CH and CCO are compared with the energy threshold so that routing protocol can work even if some nodes become dead. The role of CH, CCOs, and RNs can be exchanged with high energy node if their residual energy is less than the energy threshold.

Algorithm 1 is used for RN selection. In this algorithm, we make RNs selection and their possible number based on node density within the cluster instead of predefine the number of RNs and their selections randomly. In step 5–10, we evaluate the short distance node set for every cluster and arrange the nodes in ascending order based on their distance to other nodes. In step 11–17, the first node from the shortest distance set is elected as RN if its residual energy is higher than the threshold energy. After first RN selection, the next selected node distance is checked to previously selected RNs. If the distance is greater than the communication range R, then the node will be added to the set of RN otherwise it will be rejected (step 18–22). The next RNs selection is such a way that their distance should be far as RNs sensor radius so that cluster area can be covered with less number of RNs and system cost can be reduced. In step 23–28, the SNs are assigned as a local member of RN if it comes under the communication range of RN. This process will be repeated until all SNs are covered by Algorithm 1.

figure c
figure d

4.3 Time Complexity Analysis of ERNS

Let R is the sensor radius, n is the number of nodes in cluster, DA is the diameter of RN sensing area, DG, and S are the diagonal and side length of the maximum size rectangle within the RN sensing area.

We know that

$$\begin{aligned} & {\text{D}}_{\text{A}} = 2{\text{R}} \\ & {\text{D}}_{\text{G}} = {\text{ S }} \times \sqrt 2 \\ \end{aligned}$$

We can see form the Fig. 6 that diagonal and diameter have same length. Hence,

$$\begin{aligned} & {\text{D}}_{\text{A}} = {\text{ D}}_{\text{G}} \\ & 2{\text{R }} = {\text{ S}} \times \sqrt 2 \\ & {\text{S }} = \, 2{\text{R}}/\sqrt 2 \\ \end{aligned}$$
Fig. 6
figure 6

Maximum size rectangle in RN sensing area

The area of rectangle is:

$$\begin{aligned} & S \times \, S \\ & (2R/\sqrt 2 ) \times (2R/\sqrt 2 ) \\ & 4{\text{R}}^{2} /2 \\ \end{aligned}$$

Let assume X and Y are a cluster length, and cluster width respectively.

The area of cluster is X × Y.

The numbers of RNs will be required to cover the whole cluster area are

$$M = \frac{{X \times {\text{Y}} }}{{{\raise0.7ex\hbox{${4R^{2} }$} \!\mathord{\left/ {\vphantom {{4R^{2} } { 2}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${ 2}$}}}}$$
(11)

The first for loop from line 6 to line 9 in ERNS (Algorithm 1) takes Ο(N) time to compute the average distance between all nodes in a cluster. To sort the nodes in increasing order based on the distance takes TS time in Line 10. TS can be varied for different sorting techniques.

Now let us suppose up to M number of RNs are required to cover the whole cluster. We can find the value of M for the deployed network framework by Eq. 11. In ERNS, the RN is selected based on the residual energy and their distance to other previous selected RNs, and it requires constant time to perform two comparisons.

Theorem 1

The best-case time complexity of ERNS is Ο (TS+ M. N). TSis the time complexities of sorting algorithm.

Proof

To select RN, ERNS need to visit almost every node in a cluster. In the best case, first M nodes will satisfy the RN selection criteria and it will take Ο(M) time. After RN selection, ERNS will take Ο(N) time in second for loop (line 23–28) to select SNs as local member for every selected RN. Hence, the time complexity of ERNS for best case is Ο (N + TS + (2. M). N)= Ο (TS+ M. N).

Theorem 2

The worst-case time complexity of ERNS is Ο (TS+ N2).

Proof

In the worst case, ERNS will visit every node in cluster and evaluate the selection criteria until whole cluster is cover by RNs. Therefore, the time complexity of ERNS for worst case is Ο (N + TS+ (2. N). N)= Ο (TS+ N2).

5 Performance Evaluation

In this section, we validate the proposed approach via numerical evaluations and compare the performance with other standard routing protocols.

5.1 Experiment Configuration

The simulation is performed in MATLAB. The nodes are randomly distributed in the network. Figure 7 shows the simulation of hierarchical topology, which is further divided into 10 equal clusters. Each cluster has one CH and a total of 45 CCOs. Every upper layer clusters have one CCO corresponding to lower layer CH for load balancing. The nodes are elected as RNs after network deployment and the possible number of RNs selection for any cluster cannot be randomly predefined. The RNs selection will depend on the number of nodes in a cluster and their location. The elected nodes as RN will be optimal in terms of distance and connect all SNs with the minimal set of RN to minimize the cost of network. Figures 8 and 9 illustrate the simulation of RN selection technique with proposed ERNS and ME-CBCCP protocol.

Fig. 7
figure 7

MATLAB simulation of hierarchical topology

Fig. 8
figure 8

Simulation of optimal RN’s selection technique (ERNS) with sensing area as threshold distance

Fig. 9
figure 9

MATLAB simulation of RN’s selection method with ME-CBCCP

In these experiments, performance is measured by following metric: a total number of nodes that are live, total energy consumption, node coverage by RN selection method and first and last node dead Statistics. In this work, we followed network parameters of Table 2, which realizes the practical WSN-Assisted IoT network [4, 16].

Table 2 Simulation parameters

5.2 Result Discussion

In this framework, the increasing number of SNs will cause more number of cluster formation. The network coverage and coordination will increase RN, CH, and CCO. Figures 8 and 9 show the simulation scenario with two RNs selection strategy. The blue line represents the communication link between SN and their local RN, grey and green lines denote the communication link between RN to CH and CH to upper layer CCO. If the RNs will be selected based only on the shortest distance parameter, then there will be a possibility that RNs may be overlap in each other sensing area, and some of the SNs remain unselected. To cover the whole region, all SNs will require more number of RNs (as we can see in Fig. 9). The number of RN selection is more, so it is not preferable. The proposed RN selection strategy considers the shortest distance node as an RN with sensor communication radius as a distance threshold for the next RN election (Fig. 8).

One interesting fact we observed from the simulation that number of RN selections will be more with the small communication length radius. The second fact is that if the RN communication radius is high, results in less number of RN selections. The RN with more number of SNs can increase the load at RNs and cause early energy depletion. The number of RN selection also depends on the node density in the network, which could vary time to time for a randomly deployed network with the same simulation parameter.

5.3 Network Lifetime

In this paper, we follow three metrics for network lifetime comparison, which includes First Node Dead Statistics (FND_Statistics), Last Node Dead Statistics (LND_Statistics) and the number of dead nodes after each round. The numbers of packets received by BS through hierarchical topology (SN → RN → CH → CCO → BS) are denoted as one round [16]. FND_Statistics and LND_Statistics is the duration between the rounds, when the communication begins and the rounds where the first and last node dead [44, 45]. In this work, nodes in the network are deployed randomly under the following schemes:

Scheme 1: Network area 200 × 200 m2; Nodes 1000.

Scheme 2: Network area 200 × 200 m2; Nodes 1500.

Scheme 3: Network area 300 × 300 m2; Nodes 1000.

Scheme 4: Network area 300 × 300 m2; Nodes 1500.

The RN selection method along with routing protocol in this work needs to be energy efficient with hierarchical cluster deployment topology. In most of the WSN routing protocol, the location of BS is considered to be in the center of the network to aggregate the data. But in WSN-Assisted IoT, the above said deployment of BS is not appropriate for an application like environment monitoring. The WSN-Assisted IoT users are accessing the application services and collecting the data from the BS, which is installed at application layer. The application layer is running on regular power sources so that service will be available all time. In this paper, we follow the same scenario and BS resides at application layer with unlimited power of energy.

Figures 10, 11, 12, 13, 14, 15, 16 and 17 shows the result comparison under scheme 1 and 2 for different routing protocols. It can be noticed from Figs. 10 and 11 that proposed ERNS-EEC technique performs well and increases the network lifetime as compared to other routing protocols. To make it more clear, results are evaluated with FND_ Statistics (Black- Legend) and LND_ Statistics (Blue-Legend) in Figs. 14 and 15. It can be noticed from Fig. 14 that the last node died in DEEC after 2829 rounds, in SEP after 3960 rounds, in TDEEC after 1664 rounds. All nodes have died in LEACH protocol after 310 rounds, which is least among all the compared protocol. MOD LEACH is the Variation of LEACH protocol; all nodes have died in MOD LEACH after 1522 rounds, which is better than LEACH. EESAA and ME-CBCCP perform well and all nodes have died after 4161 and 4362 rounds respectively. But in proposed ERNS-EEC protocol 31 nodes are still alive after 5000 rounds. The proposed protocol did not perform well with FND_Statistics metrics except LEACH protocol because the load of the entire cluster is distributed the CH and CH forwards this data to above layer CCOs, which causes almost same amount of energy depletion on the CH and CCOs. But as long as the number of rounds increase, performance of the proposed protocol is improved. From Figs. 11 and 15, we can see that network performance of the ERNS-EEC also remains better for the increasing number of nodes 1000 to 1500 in the same network area (Scheme 2).

Fig. 10
figure 10

Network lifetime Comparison for the topology: Area = 200 m2, Nodes = 1000

Fig. 11
figure 11

Network lifetime Comparison for the topology: Area = 200 m2, Nodes = 1500

Fig. 12
figure 12

Total energy depletion for the topology: Area = 200 m2, Nodes = 1000

Fig. 13
figure 13

Total energy depletion for the topology: Area = 200 m2, Nodes = 1500

Fig. 14
figure 14

FND_Statistics and LND_ Statistics for topology: Area = 200 m2, Nodes = 1000

Fig. 15
figure 15

FND_Statistics and LND_ Statistics for topology: Area = 200 m2, Nodes = 1500

Fig. 16
figure 16

Average execution time per round for topology: Area = 200 m2, Nodes = 1000

Fig. 17
figure 17

Average execution time per round for topology: Area = 200 m2, Nodes = 1500

5.4 Impact of Network Area and Nodes Variation

In order to evaluate the adaptability of the proposed protocol for large scale area and nodes, we analyzed the performance of the proposed method by increasing the network area and nodes. To test the scalability, we fixed the network size to 200 m2 and varied the nodes from 1000 to 1500. Further, we also fixed the number of nodes and varied the terrain size 200–300 m2 with the same number of CHs and CCOs (Figs. 18, 19). We found that the performance of LEACH, MOD-LEACH, ME-CBCCP, DEEC, SEP, and TDEEC slightly decreased for all network schemes, whereas the performance of EESAA remains almost stable and the performance of proposed protocol slightly better in the case of scalability. We can see from Fig. 20 that after 1000 rounds 712 nodes are dead in EESAA and 344 nodes are dead in ME-CBCCP. ERNS-EEC performs well and only 120 nodes are dead after 1000 rounds. EESAA and ME-CBCCP lost 994 and 962 nodes after 2000 rounds, and proposed protocol lost only 462 nodes. However, all nodes are dead in EESAA after 4277 rounds and in ME-CBCCP after 3091 rounds whereas 35% nodes are still alive in proposed protocol after 4277 rounds. From Figs. 14, 15, 21 and 22, it can be noticed that ERNS-EEC is still performing better as compared to other protocols with varying the network parameters.

Fig. 18
figure 18

Network lifetime Comparison for the topology: Area = 300 m2, Nodes = 1000

Fig. 19
figure 19

Network lifetime Comparison for the topology: Area = 300 m2, Nodes = 1500

Fig. 20
figure 20

Total energy depletion for the topology: Area = 300 m2, Nodes = 1500

Fig. 21
figure 21

FND_Statistics and LND_ Statistics for topology: Area = 300 m2, Nodes = 1000

Fig. 22
figure 22

FND_Statistics and LND_ Statistics for topology: Area = 300 m2, Nodes = 1500

The performance gain has been listed [46] in Table 3 for all schemes as per LND_ Statistics, and it is evaluated by Eq. 12.

Table 3 Performance gain of proposed protocol
$$Performance\;gain = \frac{{Propose_{ prtcol} - Compare_{ prtcol} }}{{Compare_{ prtocol} }} \times 100{\text{\% }}$$
(12)

5.5 Comparison of Execution Times

It is defined as an average execution time taken by the protocol to complete their one round. It is evaluated by Eq. 13.

It can be observed from Figs. 16, 17, 23 and 24 that with the increase of network area and number of nodes in the network, the average time taken by all compared protocol increases except LEACH, ME-CBCCP and ERNS-EEC. LEACH, ME-CBCCP and ERNS-EEC complete their one round in almost the same time for all schemes. But ERNS-EEC and ME-CBCCP complete their one round from 0.04 to 0.05 s whereas LEACH takes 0.07 to 0.08 s for all schemes. Hence, we conclude that proposed method remains stable with the scalable network and supports better network lifetime.

Fig. 23
figure 23

Average execution time per round for topology: Area = 300 m2, Nodes = 1000

Fig. 24
figure 24

Average execution time per round for topology: Area = 300 m2, Nodes = 1500

$$Average \;execution\; time \;per\; round = \frac{Total \;Execution\; Time}{Total \;Rounds}$$
(13)

5.6 Total Energy Consumption

It is described as the total energy depletion by all SNs, RNs, CHs, and CCOs in each round. The Total Energy Depletion is defined as:

$$TED = \mathop \sum \limits_{ROUNDS} \left[ {E_{Tx,Rx}^{SN} + E_{Tx,Rx}^{RN} + E_{Tx,Rx}^{CH} + E_{Tx,Rx}^{CCO} } \right]$$
(14)

Figures 12, 13, 20 and 25 represent the total energy depletion of the compared protocols under schemes 1 to 4 from the first round to last round. We did not consider here the SEP and DEEC protocol due to the heterogeneous nature (in terms of more initial energy). The plot illustrates that proposed protocol has less energy depletion curve as compared to other routing protocols. The ERNS-EEC has a maximum lifetime (5000-6000 rounds) because of the energy consumption per round is minimal and uniform as compared to other protocols which have maximum network lifetime (3100-4300 rounds).

Fig. 25
figure 25

Total energy depletion for the topology: Area = 300 m2, Nodes = 1000

5.7 Comparison of RN Selection

We can see from Figs. 26 and 27 that the numbers of RNs are reduced in the proposed method (45%) as compare to ME-CBCCP (55%) for all schemes. The reason is listed in Sect. 5.2. We can notice that the number of RN selection slightly increases as we exceed the network area and the number of nodes in the network. The reason can be more number of RN will be required to provide coverage.

Fig. 26
figure 26

Number of RN Selection for Scheme 1 and 2

Fig. 27
figure 27

Number of RN Selection for Scheme 3 and 4

The proposed ERNS can reduce the number of RN. Therefore, system cost can be reduced.

5.8 Discussion

Our proposed ERNS-EEC approach showed better results when compared with other WSN routing protocols. Standard hierarchical routing protocols compel the single hop and large distance communication from CH to BS, which leads to large energy depletion and result in the early death of nodes. Also, RNs are selected randomly based on residual energy only and do not consider the node density and threshold distance. It may lead to the unbalanced distribution of RN, which may lead to increase the system cost (more RN selection) and decrease the network lifetime. The ERNS-EEC highlights all these issues and provide an effective routing protocol and specifically meet the requirement of scalable and energy-efficient WSN-Assisted IoT application. The main features of the proposed protocol are listed as:

  1. 1.

    Uniform Cluster load: The network is deployed randomly, and after the deployment, nodes remain static. The network is divided into multiple clusters and each having SNs, RNs, and CH. The SNs are not allowed to communicate directly, and all communications take place inside local cluster through the SN to nearest RN, RN to CH; so that long-distance communication can be avoided and resulting in uniform energy consumption across all clusters.

  2. 2.

    Efficient RN selection: RNs are selected based on shortest distance among the SNs and location of each RN at least as far their sensing radius so that a minimum number of RNs can cover every area of a cluster and system cost for additional RN can be avoided.

  3. 3.

    Load distribution: Load balancing on the clusters is acquired by the CHs. CHs collect the sensor data from all the local cluster RNs and load of CH is distributed by CCO. Every cluster has one dedicate CCO for every lower layer CH and data transmission between CH to BS take place via their respective CCOs. So, we can conclude that CHs and CCOs will have almost the same load, which is the load of one cluster.

6 Conclusion

Energy conservation is the prime objective in the development of WSN-Assisted IoT network. In this paper, we proposed an efficient Relay Node (RN) selection method to reduce the energy depletion and system cost in WSN-assisted IoT, which is based on the shortest distance node, node density, and distance threshold. We also integrate the ERNS method into Minimum Energy- Consumption Chain Based routing protocol (ME-CBCCP). The obtained results validate the effectiveness of the proposed method when compared with LEACH, MOD LEACH, ME-CBCCP, SEP, DEEC, TDEEC, and EESAA. With the increase of network size and number of nodes, ERNS-EEC still performs better than compared protocol. The network lifetime gains of proposed ERNS-EEC for all the schemes as per LND_ Statistics ranges between [69–102%] when compared with DEEC, [24–35%] with EESAA and [19–87%] with ME-CBCCP. The same statistics when compared with other protocols outperform them by gain in range of [1358–2567%], [262–288%], [187–260%], [31–258%] for LEACH, MOD-LEACH, TDEEC, and SEP respectively.

7 Future Work

  1. 1.

    The simulation results validate the effectiveness of ERNS-EEC protocol. The proposed ERNS technique increases the network lifetime for static and scalable WSN-Assisted IoT network. In future, we would like to analyze the mobile network for ERNS-EEC.

  2. 2.

    The concept of security [43], heterogeneity [47] and reliability [48] could be incorporated in this method in the future.

  3. 3.

    In this work, we considered Friis space model for energy depletion. The proposed method can also be analyzed on other establish energy model [49, 50] in future.