Efﬁcient Next-Hop Selection in Multi-Hop Routing for IoT Enabled Wireless Sensor Networks

: The Internet of Things (IoT) paradigm allows the integration of cyber and physical worlds and other emerging technologies. IoT-enabled wireless sensor networks (WSNs) are rapidly gaining interest due to their ability to aggregate sensing data and transmit it towards the central or intermediate repositories, such as computational clouds and fogs. This paper presents an efﬁcient multi-hop routing protocol (EMRP) for efﬁcient data dissemination in IoT-enabled WSNs where hierarchy-based energy-efﬁcient routing is involved. It considers a rank-based next-hop selection mechanism. For each device, it considers the residual energy to choose the route for data exchange. We extracted the residual energy at each node and evaluated it based on the connection degree to validate the maximum rank. It allowed us to identify the time slots for measuring the lifetime of the network. We also considered the battery expiry time of the ﬁrst node to identify the network expiry time. We validated our work through extensive simulations using Network Simulator. We also implemented TCL scripts and C language code to conﬁgure low-power sensing devices, cluster heads and sink nodes. We extracted results from the trace ﬁles by utilizing AWK scripts. Results demonstrate that the proposed EMRP outperforms the existing related schemes in terms of the average lifetime, packet delivery ratio, time-slots, communication lost, communication area, ﬁrst node expiry, number of alive nodes and residual energy.


Introduction
The Internet of Things (IoT) paradigm integrates cyber and physical worlds and other emerging technologies [1].IoT consists of a complex network of different sensing devices with multiple sensing abilities to communicate across networks [2].IoT applications are grouped into several domains; however, IoT is still at the development stage in terms of its applicability for security-critical applications.IoT is under discussion in a number of research areas to present dependable solutions for its real existence as per current industrial demands [3].IoT-assisted wireless sensor networks (WSNs) have gained increasing attention because of their commercial applications in the fields of healthcare, smart homes and industrial information.The use of swarm intelligence is also widely applicable in IoT, where a number of smart sensing devices are deployed in large areas.IoT helps to manage communication across networks for wider level communication [4].The energy efficiencybased routing performs a pivotal role.It comprises several sensing devices interconnected to perform a common task as per the targeted goal [5].Sensor networks are used in many important domains including military and civil technologies such as for monitoring the conditions of physical peacetime and wartime environments [6].IoT-based WSN applications should provide energy-efficient routing protocols for reliable data transmission because the WSN nodes carry low energy, storage, memory and computational energy [7].
Cyber-physical systems (CPS) involve a large number of sensor nodes that communicate to cyber-entities for exchanging information for data analysis and storage [8].This information may need to be exchanged by nodes for immediate decision, such as in the edge layer, or the data may have to be moved to the fog or cloud layers for further processing, sharing, and analysis [9].CPS are applicable in natural ecosystems by enhancing WSN capabilities for taking benefits from bioinspired algorithms in CPS.The design of software architecture in WSNs for cyber-physical systems is a critical task, and it must consider extreme efficiency in terms of maximizing battery life, synchronization of time, data, and event management [10].
In cluster-based routing schemes, a few architectures restrict the addition of new nodes or remove the existing member nodes until the battery of all the nodes is not expired.This applies to static networks only, where the nodes near the BS carry more data from neighbors.In the case of data aggregation from specific regions within a network, mobile WSN is efficiently utilized using a clustered approach [11].Liang et al. presented the spatial range of privacy preserved and energy-efficient query-based aggregation schemes.Pre-established topologies are not considered, only considering the query area and relinquishing all nodes to cooperate in query distribution while aggregating data in a query range.Sensitive data are secured by implementing Shamir's sharing technology.The dynamic route base aggregation techniques enhance the difficulty of aggregating data [12].In data transmission, the significant aim of routing optimization is to enhance the lifespan of the network and also minimize energy consumption.
The main problem in hierarchy-based routing is that the sensor nodes near the base station (BS) or the cluster head (CH) consume energy rapidly compared to the other nodes that are far from the base station.These nearby nodes receive more data from the neighboring nodes.This results in faster battery utilization and the expiry of a node.The expired node may have collected or received critical data at the time it stopped working due to the battery lifetime.It also results in a sensing bottleneck in the physical world.In a similar vein, cyberspace also faces the bottleneck during huge data exchanges by the physical world.There should be a mechanism to predict and timely identify the expiry of nodes and utilize other nodes in the path that have more residual energy.Moreover, cyberspace should also be managed accordingly to efficiently handle sensing bottlenecks and delays in data exchange.
This paper proposes a scheme called EMRP that predicts routing paths by considering and analyzing the residual battery of sensors.The major contributions of the paper are as follows.

1.
We reviewed the relevant literature for adaptive next-hop selection mechanisms and identify the research problems.

2.
We devised a time slot selection mechanism based on the connection degree and maximum rank to collect data from all the member nodes.

3.
Using the time slot selection mechanism, we proposed and developed the EMRP, a next-hop selection algorithm for multi-hop routing based on the residual node energy.
The remaining part of the paper is arranged as follows.The literature review is discussed in Section 2. Section 3 formulates the problem and the system model.Section 4 presents the proposed EMRP scheme.Section 5 presents the results and analysis.Section 6 concludes the proposed research work and considers future work.

Related Work
We explored the literature on energy-efficient multi-hop routing solutions that claim to enhance the lifetime of the network.Efficient energy consumption for IoT-based smart devices is a challenging task.Ideally, our focus is to identify the schemes that reduce the energy consumption in the data aggregation procedure from sensor node to BS.We consider the hierarchy-based energy-efficient routing mechanism.Han et al. presented a lightweight path and energy-aware algorithm.For energy awareness, it divides the energy of sensing devices into multiple energy levels to adjust the link weight of the nodes based on the distance and energy of nodes.Controller can also change the weight of links.Energy level g is calculated using ( 1) where e is a residual energy, E 0 is initial energy value and energy levels of sensing nodes are denoted by G.When the value of g changes, controller receives a P ec message from sensing nodes to inform about energy level.
Controller estimates the time for route adjustment where timer T timer is given in (2) where T 0 is an initial value of timer.N thresh = (N thresh > 1) when P ec value attains threshold.On receiving P ec , the value of T timer decreases.
In [13], an improved distributed, multi-hop, adaptive, tree-based energy-balanced (DMATEB) solution is presented.It identifies the nearby node carrying high residual energy with less distance from the sensing node.It involves a multi-hop routing approach using clusters, which is helpful for better data collection and enhancing the network lifetime.N. Naji et al. presented the Energy Aware Context Recognition Algorithm (EACRA) to avoid redundant data transmission on a periodic basis.It transmits data from sensing devices in case of change in context at a certain time that results in less message sharing by reducing energy consumption.A network performance analysis is performed in terms of different network topologies.Sensing devices operate only when the heating process enables them, otherwise they remain disabled [14].In [15], the reliable and energy-efficient route selection (REERS) was presented to provide energy efficiency for large-scale deployments.In the IoT scenario, massive communication is involved, which demands efficient route selection for data aggregation in critical application scenarios.The REER considers both real-time and non-real time scenarios.An energy-aware routing protocol provides efficient data routing by utilizing low cost paths for real-time applications, achieving better latency and energy consumption.W. Wen et al. presented the data aggregation from particular monitoring points, where the prime concern is the collection of data efficiently.The algorithm in the scheme constructs an appropriate path for aggregate data from collection regions and also aggregates data from those regions loaded with the data.The presented work contributes to enhancing the lifetime of the network, in this context, analyzing the path cost from one region to another region and then transmitting the load of each sensing node device.A mobile-based sink provides energy-efficient data collection because of mobility.Therefore, mobile devices connect with data sensing devices to aggregate data while following an appropriate path.It is based on three different phases: initialization, selection of aggregation region, and appropriate path construction [16].In [17], the energy and dynamic spectrum issues in cluster-based routing were presented.The scheme conducts self-distribution-based clustering to attain minimum power consumption while creating several optimal clusters.It contains a greater number of channels for cooperative sensing.It transmits data between clusters by utilizing gateway nodes that contain more energy and common channels and also selects a head node based on residual energy, channels, neighboring nodes, and distance from the sink.The introduced scheme provides efficient data forwarding from the root node to the sink.
The implementation of a green routing protocol in a WSN is a challenging task.In a WSN, a limited amount of energy is available for performing critical tasks in remote areas as well.It results in limiting the network lifetime.Korhan et al. introduced an energy-aware multi-hop routing protocol that reduces the data aggregation cost, enhancing the life of the network and also reducing excessive overhead.Collected information is not directly transmitted from CH to the sink node; however, the relay nodes are utilized for minimizing the effective transmission distance.CH is assumed as intermediary to avoid the complexity of the protocol.It improved energy consumption, data transmission, scalability, and network lifetime [18].
The presented MDTA approach consumes a minimum amount of energy and also analyzes data delivery cost with the size of the network by comparing with other energy-aware routing schemes.Communication protocols utilize efficient data transmission between multiple nodes, for example, the agile data delivery framework.The MDTA provides optimal path formulation among the root nodes and the sink nodes based on end-to-end delay and efficient energy consumption.In this scenario, it is applicable to heterogeneous sensors and vehicle networks [19].Reliable data monitoring with energy efficiency is a challenging issue in WSNs.In this regard, Kejiang et al. provided energy-aware and guaranteed quality-based scheduling by considering the energy of the sensing devices and network topologies.In data fusion, the transmission of data depends on the data forwarding cost and the battery power of the sensing node.The scheme minimizes the number of awakening nodes and also maintains reliability while aggregating data [20].In [21], a location-based routing protocol that considers residual energy to link quality as a multi-objective optimization function was introduced.Equation (3) provides an energy consumption model where E T−elec and E T−amp are denoted as transmitter and amplifier energy consumption.
Transmission range is represented as M, communication range is d and r is changeable coefficient.Energy consumption while receiving data is shown in (4), where a current node i selects next node ∆(i, j).It also calculates Ω dist (x, D), which is a distance between node x and destination node d.It minimizes energy consumption by 10% and maximizes lifetime by 45.2% while comparing with other routing protocols [21].
K. Haseeb et al. presented a secret sharing scheme for security and enhanced energy efficiency of multiple hop nodes.The presented protocol is based on three aspects: a network divided into inner and outer fields based on node location, secure data transmission from CH to sink node, and minimizing the rate of disturbance in routing by analyzing the data link.Furthermore, it provides the shortest route to send data while considering the efficient energy consumption of nodes.To minimize data disturbance and retransmission, quantitative analysis is conducted to avoid and identify congestion while routing [22].Jian et al. presented a centroid-based energy-efficient routing protocol considering three key features to improve the performance of WSN-assisted networks.Firstly, the organization of nodes is achieved by implementing a distributed cluster-based technique.Secondly, algorithms are used for cluster formation and efficient routing based on the centroid head node to manage energy load among sensing devices.Finally, an introduced mechanism is implemented to decrease the energy utilization of distant communications.To select the centroid position, the protocol considers the remaining battery power of the nodes [23].In [24], L. Wu et al. present an energy-balanced clustered routing (EBCR) scheme for WSN based on the LEACH to maintain the structure of the cluster in K phases.In LEACH, CH is selected in the first phase.It involves energy prediction in the k − 1 phase, balancing the energy of the nodes, and determining the average energy of the nodes through residual energy.N is the number of nodes, E i−rest is the residual energy of ith node and E averege is the average energy of nodes, as defined in (5).
Variance of residual energy represented as S 2 average is given in (6), where the square of difference for E i−rest and E average is taken for all N nodes.Finally, all of these values are added and then divided by N to take the average.
This scheme efficiently enhances the lifetime of the nodes and also maximizes the network lifetime [24].Zijing et al. present an uneven cluster-based energy-efficient routing protocol to balance the load at multiple layers.In each cluster, a distributed CH rotation-based mechanism is utilized to balance energy dissipation, and a multi-hop routing algorithm is used for distance-based routing between CH to BS.In inter cluster-based data packet transmission, the presented work considered two factors based on the distance to the CH node and residual energy.In Kth layer, i is the CH node and j is a neighboring node to i in (K − 1)th layer.d i,j is distance to CH nodes, and residual energy of j is denoted by E j .Cost of each CH node is as shown in (7).
In [25], the power-efficient data-gathering and aggregation protocol (PEDAP) was based on a near-optimal spanning tree model to achieve better lifetime of the network.In [26], the localized PEDP scheme used a localized and distributed architecture, whereas other schemes discussed here use a centralized approach.In [27], the power-efficient gathering in sensor information systems (PEGASIS) considers only the nearby neighbors for transmitting the packets towards the BS.It improves the cost as compared to LEACH.In [28], a delay-aware data collection network structure (DADCNS), the prime focus is to identify the tracks that result in less delay for data collection.It adopts top-down and bottom-up approaches to construct a tree structure for managing the nodes as per the distances, rank and time delays.
Z. Wang et al. presented dynamic packet transmission within a cluster.The CH node rotation is adjustable according to the situation.The uneven clusters efficiently minimize energy consumption to assist in the extension of network lifetime [29].In the Energy-Efficient and Reliable Routing (E 2 R 2 ) scheme [30], the CH transmits the data by maintaining a certain throughput to ensure efficient utilization in single or multi-hop scenario.Moreover, alternative additional paths are also maintained for the selection of efficient routes.In [31], the authors minimize the energy consumption by balancing the routing cost by utilizing a multi-hop algorithm.The algorithm endures the failure of the head node and sensor nodes.The SEED algorithm minimizes redundant transmissions to attain efficient energy dissipation but cannot apply in the case of heterogeneous sensing device data.To overcome heterogeneous data trafficking and energy consumption between sensor nodes, another scheme was presented.In LEACH Vice Cluster Head (L-VH) [32], an additional sub CH with second highest energy is identified to manage the workload.The VH does not work in parallel with CH, but it sleeps unless a sufficient threshold amount of energy is consumed by CH.After that, VH wakes up to take over the tasks in progress at CH and then continues to work as CH.It reduces the time for the next head selection, and the number of messages are processed by VH to manage the communication.In [33], Traffic and Energy Aware Routing (TEAR) is presented for selecting those nodes that have a high traffic rate with less energy dissipation.In this scenario, TEAR does not provide redundant data filtration.To attain both benefits of redundant data filtration and heterogeneity-based data trafficking with efficient data consumption in the WSN scenario, a hybrid method, ETASA, provides enhanced load balancing with efficient energy utilization of sensing devices, and these devices wake and sleep based on energy and data rates.SEED also allots a slot to each member of the pair group, and the presented scheme amends the conventional scheduling of SEED by allotting one slot for each group pair within a cluster.In this way, the idle listening problem is addressed to reduce energy dissipation.ETASA improves the balanced energy dissipation and CH selection technique.

System Model and Problem Identification
In the literature, we found several related research studies for data aggregation that discussed different models with limitations such as energy efficiency and scalability.We observed a few problems in the delay-aware network model for the collection of data, where a single cluster is divided into sub-clusters and the remaining nodes are considered as member nodes.The model reduces the delay, but its structure is fixed.Therefore, it can only be applied in homogeneous WSNs.Researchers most probably work in homogenous networks, where all nodes have the same features such as residual energy, processing capability, and communication units.Conversely, for heterogeneous networks, these models vary because of the mobility, localization and trajectory management.In this context, every node does not have a fixed position, and in multivendor sensor-based networks, every sensing device has distinct features.This affects the packet delivery ratio, delay, energy consumption and available time slots that can be considered as decision variables as per the feasibility constraints for routing protocols to evaluate the performance.
The energy consumption for data exchange varies due to adoption of different types of small and large routing tracks.An efficient information collecting scheme for a hybrid network is needed to attain performance in heterogeneous systems with hierarchy-based energy-efficient routing paths.In the base paper, it is assumed that resources for sensor nodes are the same throughout the network.We present a system model where CH acts as a collector node to receive data from member nodes.In this model, a number of expired nodes are also considered, as shown in Figure 1.The energy of nodes decreases at a variable rate with time because each node receives and transmits several data packets at various distances.This results in high energy consumption and reduces the network lifetime.At the time of network creation, every node has an equal energy level of E = 100 µJoules.
In this way, the idle listening problem is addressed to reduce energy dissipation.ETASA improves the balanced energy dissipation and CH selection technique.

System Model and Problem Identification
In the literature, we found several related research studies for data aggregation that discussed different models with limitations such as energy efficiency and scalability.We observed a few problems in the delay-aware network model for the collection of data, where a single cluster is divided into sub-clusters and the remaining nodes are considered as member nodes.The model reduces the delay, but its structure is fixed.Therefore, it can only be applied in homogeneous WSNs.Researchers most probably work in homogenous networks, where all nodes have the same features such as residual energy, processing capability, and communication units.Conversely, for heterogeneous networks, these models vary because of the mobility, localization and trajectory management.In this context, every node does not have a fixed position, and in multivendor sensor-based networks, every sensing device has distinct features.This affects the packet delivery ratio, delay, energy consumption and available time slots that can be considered as decision variables as per the feasibility constraints for routing protocols to evaluate the performance.
The energy consumption for data exchange varies due to adoption of different types of small and large routing tracks.An efficient information collecting scheme for a hybrid network is needed to attain performance in heterogeneous systems with hierarchy-based energy-efficient routing paths.In the base paper, it is assumed that resources for sensor nodes are the same throughout the network.We present a system model where CH acts as a collector node to receive data from member nodes.In this model, a number of expired nodes are also considered, as shown in Figure 1.The energy of nodes decreases at a variable rate with time because each node receives and transmits several data packets at various distances.This results in high energy consumption and reduces the network lifetime.At the time of network creation, every node has an equal energy level of E = 100 μJoules.Figure 2a illustrates the network state after a specific time interval t = 1, and the energy of each node varies on the basis of its utilization.The sensor node only forwards its sensing data, it consumes less energy as compared to other devices that are forwarding their data along with the data of other several nodes like N8 and N4.Moreover, Figure 2a illustrates the network state after a specific time interval t = 1, and the energy of each node varies on the basis of its utilization.The sensor node only forwards its sensing data, it consumes less energy as compared to other devices that are forwarding their data along with the data of other several nodes like N8 and N4.Moreover, Figure 2b presents the energy level of each node after a specific time t = 2.According to the figure, the node N4 loses its battery frequently as compared with other devices because of the maximum load of the network and other devices still have enough residual energy.Therefore, the main concern is to consider those nodes that have enough residual energy by reconstructing the network.The main problem is to choose the CH with the highest remaining energy for better network life and support.Thus, network is restructured in such a way that the CH must carry maximum number of neighboring nodes.The CH must carry maximum residual energy for long time support.presents the energy level of each node after a specific time t = 2.According to the figure, the node N4 loses its battery frequently as compared with other devices because of the maximum load of the network and other devices still have enough residual energy.Therefore, the main concern is to consider those nodes that have enough residual energy by reconstructing the network.The main problem is to choose the CH with the highest remaining energy for better network life and support.Thus, network is restructured in such a way that the CH must carry maximum number of neighboring nodes.The CH must carry maximum residual energy for long time support.

Proposed Solution
In this section, we present the Efficient Multi-hop Routing Protocol (EMRP) for data exchange in IoT-assisted WSNs.It analyzes the residual energy of nodes to decide about the routing paths.It improves the data exchange between source and destination.The proposed system model utilizes an efficient topology formation mechanism to enhance the lifetime of the network.Moreover, an efficient data collection algorithm considers a hybrid network where every node has distinct features as per the deployment in a topology.For development, the key objectives of our proposed protocol are as follows: (i) More reliable time for data gathering; (ii) Reliable data transmission time; (iii) Efficient energy consumption; (iv) Increased network lifetime; (v) Scalability for handling communication cost; (vi) Flexibility for adding/removing nodes.Our work minimizes energy consumption during data collection and transmission by selecting the suitable next hop.We present a next-hop selection-based efficient data collection algorithm to maximize the network lifetime.A list of notations for EMRP is provided in Table 1.

Proposed Solution
In this section, we present the Efficient Multi-hop Routing Protocol (EMRP) for data exchange in IoT-assisted WSNs.It analyzes the residual energy of nodes to decide about the routing paths.It improves the data exchange between source and destination.The proposed system model utilizes an efficient topology formation mechanism to enhance the lifetime of the network.Moreover, an efficient data collection algorithm considers a hybrid network where every node has distinct features as per the deployment in a topology.For development, the key objectives of our proposed protocol are as follows: (i) More reliable time for data gathering; (ii) Reliable data transmission time; (iii) Efficient energy consumption; (iv) Increased network lifetime; (v) Scalability for handling communication cost; (vi) Flexibility for adding/removing nodes.Our work minimizes energy consumption during data collection and transmission by selecting the suitable next hop.We present a next-hop selection-based efficient data collection algorithm to maximize the network lifetime.A list of notations for EMRP is provided in Table 1.
Next, we present the proposed work and its methodology.To answer the abovementioned issues, our proposed solution efficiently handles the data collection, data transmission, and energy issues.The presented algorithm enhances the network lifetime as compared with the data gathering mechanism.

Next Hop Routing Protocol
Routing is the main factor in a WSN, as it changes the energy consumption of the sensing nodes while communicating with the other devices inside the network.In this context, less efficient routing mechanisms increase the energy consumption.This results in a large number of expired nodes in the network.To achieve efficient energy consumption, an adaptive routing mechanism is considered to attain the advantage of multi-hop and dynamically changing routing patterns based on variable conditions.For efficient energy utilization at each node, a routing protocol is utilized for load balancing while gathering and transmitting data to the BS.Moreover, the proposed model considers the following characteristics; (i) Archive improved network model for data gathering by efficient data routing; (ii) Efficient location of next node with maximum residual energy; (iii) Energyefficient routing algorithm; (iv) Efficient and changeable routing mechanism for both one hop and multi-hop.We consider an improved network establishment mechanism for efficient energy consumption in the heterogeneous network.In this context, it is a critical issue while formulating the network because it also considers more parameters along with energy levels.In heterogeneous networks, the presented mechanism shuffles the node position on the basis of multiple parameters for maximizing the network lifetime.In the proposed network development, we consider these parameters to construct a network model.

Time Slot Identification
To achieve a better data collection mechanism, we utilize a tree-based model where each cluster node has some link points with other nodes for forwarding information to BS.There is a restriction on the network size N such that N = 2 p where p = 2, . . ., m.The data are so well correlated that data aggregation is not important at the sensor nodes.In this scenario, the number of required time slots N TS log 2 N + 1.Furthermore, the highest connection degree of CH is K max = log 2 N + 1.In this case, N TS demands a maximum rank or degree K max to gather information from its child nodes, with k max − 1 = log 2 N [28].Next, the single-hop and multi-hop scenarios are presented.The time slots N TS needed for gathering the information from cluster member (CM) nodes are obtained as N TS D n + 1, where D n represents link level.
A cluster's rank k is based on the CM node's rank, where each member can maintain k − 1 data links.Each member node also maintains its rank k and can be considered as child of main node.The nodes with higher k values can be considered as parent nodes, where highest rank value is for CH as illustrated in Figure 3.The dashed arrow denotes the data connection among a pair of nodes, and the pointing direction of the sign presents the flow of data.For example, the presented system investigates with N = 16, where N denotes the number of nodes.In the given example, BS takes 5 × T time to obtain data from the 16 nodes.Moreover, it splits the total time into several time slots of period T, and a specific interval of time is denoted by T. The total time is divided into the T time slots where the collection process at the base node takes five time slots.We illustrated the movement of data exchanged from the rank 1 node towards CH.

Proposed Next-Hop Selection Scheme
In the proposed mechanism for next-hop selection, we considered the residual battery and the distance from the BS.In cases where the distance is minimum but the residual energy is less than the threshold value TV0, we then opted to select another neighboring node.In this top-down approach that holds centralized control, therefore, the BS contains information about the status of all the nodes in the cluster.To organizes all member nodes, the BS periodically checks the ranks of nodes for better communication and accessibility to BS.The BS and child nodes set data connections to develop a suitable network formation.The network configurations for  = 2 0 and  = 2 1 are small due to a smaller number of nodes.For  = 2  nodes, the network is assumed to be completely connected.In this context, the completely connected network means the presence of a data link among two consecutive nodes.Moreover, if there is no direct link among two consecutive devices, then intermediaries are involved as next-hop neighbors.The link degree among two sensor devices shows the number of data connections connected to a node.In this context, if a connection level of a node is 3, that means a node has established three connections with other sensors.For  = 2  nodes in the network, every node starts with N-1 level.Sensors are elected from the set where b = N/2.In this context, the algorithm can remove all connections (data links) among nodes that are not suitable or if the battery is expired.In direct routing, the root node directly forwards information to the CH.Calculating the remaining energy periodically, every node of this routing protocol can share its remaining energy with other nodes of the network.THV denotes the threshold value specified at the initial stage, and RE is the remaining energy of each node.If the RE is less than the threshold value, then the protocol initializes multi-hop-based routing, otherwise data are transmitted to the CH through direct routing.In case the number of nodes in the next hop is only 1, then the data are directly transmitted to the node.Conversely, the mechanism chooses the next-hop node on the basis of the remaining battery power and selects the node with maximum energy.Algorithm 1 is explored step by step as follows.
Initially, the required variables are assigned initial values in steps 1 to 3. Next, the sensor nodes forward the messages to CH, which calculates the residual energy RE and the distance Di between neighbor and BS, as illustrated in steps 9 and 10.The distance to BS should be a minimum to choose the best suitable next hop.The algorithm should also consider the residual energy RE of that node.We check in step 7 whether the node status is not expired, that is, whether its energy is zero.In steps 11 to 15, the algorithm checks

Proposed Next-Hop Selection Scheme
In the proposed mechanism for next-hop selection, we considered the residual battery and the distance from the BS.In cases where the distance is minimum but the residual energy is less than the threshold value TV 0, we then opted to select another neighboring node.In this top-down approach that holds centralized control, therefore, the BS contains information about the status of all the nodes in the cluster.To organizes all member nodes, the BS periodically checks the ranks of nodes for better communication and accessibility to BS.The BS and child nodes set data connections to develop a suitable network formation.The network configurations for N = 2 0 and N = 2 1 are small due to a smaller number of nodes.For N = 2 p nodes, the network is assumed to be completely connected.In this context, the completely connected network means the presence of a data link among two consecutive nodes.Moreover, if there is no direct link among two consecutive devices, then intermediaries are involved as next-hop neighbors.The link degree among two sensor devices shows the number of data connections connected to a node.In this context, if a connection level of a node is 3, that means a node has established three connections with other sensors.For N = 2 p nodes in the network, every node starts with N − 1 level.Sensors are elected from the set where b = N/2.In this context, the algorithm can remove all connections (data links) among nodes that are not suitable or if the battery is expired.In direct routing, the root node directly forwards information to the CH.Calculating the remaining energy periodically, every node of this routing protocol can share its remaining energy with other nodes of the network.THV denotes the threshold value specified at the initial stage, and RE is the remaining energy of each node.If the RE is less than the threshold value, then the protocol initializes multi-hop-based routing, otherwise data are transmitted to the CH through direct routing.In case the number of nodes in the next hop is only 1, then the data are directly transmitted to the node.Conversely, the mechanism chooses the next-hop node on the basis of the remaining battery power and selects the node with maximum energy.Algorithm 1 is explored step by step as follows.Set Nxt hop as null 2.
Set N as Network Size 4.
CM: Send data to CH 5.
For each N Gi in all neighbors Arr_N G 7.
Set Curr hop = N Gi Initially, the required variables are assigned initial values in steps 1 to 3. Next, the sensor nodes forward the messages to CH, which calculates the residual energy RE and the distance Di between neighbor and BS, as illustrated in steps 9 and 10.The distance to BS should be a minimum to choose the best suitable next hop.The algorithm should also consider the residual energy RE of that node.We check in step 7 whether the node status is not expired, that is, whether its energy is zero.In steps 11 to 15, the algorithm checks whether the distance to neighboring node Di is less than the minimum distance mDi.If the condition is true, then the new lower distance is reassigned as the minimum distance.The algorithm also sets a next-hop flag NhFlag to identify that this node may be the next hop for transmission.In step 14, the distance value of that node is saved in the array Arr_D_N Gi to be used later for further decision if needed.In steps 16 to 21, the algorithm first checks that the RE is greater than the threshold value TV 0 to be selected as next-hop.Next, it checks that the rank k_N Gi of the node N Gi must be larger than or equal to the rank of the previous next hop k_Prev hop .This ensures that the next hop is near to the BS, as its rank k value is higher.The algorithm also checks the limit of rank value k of the next hop k_Nxt hop , which should be less than the upper limit of Log N 2 + 1.For example, for a network of N = 16 nodes, its value will be 04.This means that all member nodes may have maximum rank of k = 4 when N = 16.The CH will carry the k + 1 rank.CH has the highest level of energy within the cluster.If the condition at step 17 is true, then the next-hop will be set as current hop, i.e., current neighboring node under process.If the condition is false, then the Nhflag is set to false so that another next-hop can be chosen in the next steps.In steps 22 to 24, the algorithm checks whether the RE value is 0, i.e., whether the node battery has expired.If yes, the node status will be set to expired.At the initial state of the network, every node has 100% energy.In step 26, the loop is terminated.In steps 27 to 33, the algorithm checks whether the NhFlag is true, then send the message to next hop.If the NhFlag remained false, then the node with minimum distance could not find a node with the RE larger than the threshold TV 0 .In such cases, a node with minimum distance will be taken from the list Arr_D_N Gi that was saved in step 14 for only those nodes whose distance was less, and reset the minimum distance value mDi.This node will be selected as next hop to transmit the data.In the final step, the previous hop value is set to current value, which will become the previous hop for the next execution of the steps.By considering n neighbors, a loop is applied to calculate the RE so that the computational asymptotic cost is O(n).

Results and Analysis
This section introduces simulation features, hypotheses, topology, implementation information, and different situations to achieve the results.Simulation is conducted by using network simulator NS-2.35,where TCL scripts are written to deploy the nodes as per configuration.Moreover, the energy model is also configured to extract the residual energy of each node as the simulation time passes gradually.Messages are also initiated as per the communication scenario from TCL files.These messages are then processed in C coding for further transmission to destination nodes by setting the configuration parameters such as source and destination IDs, ports, and IP addresses along with the packet's sequence number, type, and enumerated value.Similarly, the receive function is developed to further manage the functionality as per packet ID and then transmitted to other nodes until the destination nodes are not reached.We have used separate classes to configure CH and low-power sensor nodes.Objects of these classes are created in TCL files to create nodes as per configurations.Additionally, the battery storage of CH nodes is 20 times more than that of the ordinary sensors.The base schemes are LEACH [24], PEDAP [25], PEGASIS [27], DADCNS [28] and L-VH [32].A list of simulation parameters is presented in Table 2.

Average Data Collection Time and Lifetime
Figure 4a presents the number of time slots needed to forward data to the BS.In the case of EMRP, the packet size of control information is quite small as compared to the size of the data packet.The earlier studies verified that the top-down method DADCNS and L-VH are much better than other existing strategies, including LEACH, PEDAP, and PEGASIS, for efficient data forwarding.Results show the sovereignty of EMRP as compared to counterparts.For the number of nodes equal to 50, L-VH, DADCNS, PEGASIS and LEACH require 10, 11, 17 and 24 time slots, respectively.The proposed EMRP performs quickly in six time slots by finishing extra data gathering processes within the required time.PEGASIS uses more slots when sharing the messages over nearby neighbors, but their distance was long with the BS.LEACH consumes much more as the strategy was to forward towards any of the selected neighbors.DADCNS identified the track with less delay, but the number of time slots remained somewhat higher.Similarly, L-VH consumed fewer slots by considering better tracks and neighboring nodes.Figure 4b illustrates the average number of data collection rounds performed in a specific timespan.For 50 nodes, 130, 128, 107 and 71 rounds of data collection are performed by L-VH, DADCNS, PEGASIS and LEACH, respectively.The proposed EMRP outperforms with 150 rounds.In these schemes, the number of rounds may vary as per the time of reply by the member nodes, and the delay increases when more packets are dropped on a selected path, e.g., in the case of 20 to 25 nodes.In the case of 30 nodes per cluster, improvements were made to achieve fewer delays and rounds.This metric helps to explore the network lifetime.The sensors perform a limited number of rounds for data sharing due to the insufficient battery power of sensor nodes.We varied the number of nodes from 5 to 70 for measuring the network lifetime by using the average number of rounds for data sharing.The number of nodes in a cluster was varied from a small number to a large number of deployed sensors.This increases the size of the entire network in a specified region with more density of nodes.Next, we evaluated the performance in terms of the first node's energy expiry within the network.In Figure 4c, several existing routing mechanisms are graphically analyzed based on the first node expiry.Results show that in the case of PEDAP, LEACH, PEGASIS, DADCNS, and LV-H, the first node expires after 4.1, 4.21, 4.4, 4.58 and 4.65 min, respectively.EMRP achieves a better lifetime, where the first node expires after 4.71 min.In existing schemes, more energy is consumed for the data sharing messages, where a number of long tracks may be chosen to consume more energy.It results in early expiry of the node's battery.

Residual Energy
Figure 4d elucidates the amount of residual energy left after a number of routing operations are performed.It highlights that EMRP contains more residual energy as compared to counterparts.We utilized the energy model to obtain these energy values in the trace files generated after simulation.Afterward, AWK script files were used to extract these values.Results show that 85.2456 µJoules, 90.3518 µJoules, 93.4127 µJoules, 96.6095 µJoules and 97.3356 µJoules were residual for PEDAP, LEACH, PEGASIS, DADCNS and L-VH, respectively.EMRP dominated with the maximum residual energy of 99.7463 µJoules.In existing schemes, more energy is consumed during messages for routing operations for data collection and retransmissions.In many cases, packets are either lost or traversed on a long path due to wrong neighbor selection.L-VH and DADCNS identified better tracks and consumed less energy as compared to the other base schemes.

Packet Delivery Ratio and Data Loss
Figure 5a illustrates the packet delivery ratio by calculating the number of packets sent and received during data exchange.Results show that packet delivery ratios were 66.38%, 71.27%, 73.91%, 77.18% and 80.23% for PEDAP, LEACH, PEGASIS, DADCNS and L-VH, respectively.Our proposed EMRP dominated by achieving 85.16%.The main reason for receiving fewer packets was due to the selection of lengthy paths where the message exchange may traverse in the opposite direction to BS.It may lead to excessive communication and fewer chances for packet delivery.Figure 5b depicts the amount of communication lost in kilobytes during message exchange using different routing protocols.The data packet's size was set to 256 bytes as per the values exchanged in a message.Results show that the amount of communication lost due to packet drops was 258.13 KB, 281.20 KB, 200.35 KB, 175.23 KB and 134.33 KB, in the case of PEDAP, LEACH, PEGASIS, DADCNS and L-VH, respectively.EMRP achieved a minimum loss of 113.93 KB, where the loss ratio was 0.1483 when 3000 packets were exchanged for EMRP.

Communication Area and Number of Alive Nodes
Figure 5c illustrates the communication area involved as the number of nodes increased in the network.Results show that the communication area increased as per the increase in number of nodes, whereas the value decreased with 35 to 45 nodes, to 4846 m 2 and 4756 m 2 , respectively.For 30 nodes, the communication area coverage was 5008 m 2 .It varied as per the topology of the nodes after deployment, i.e., the nodes deployed very close to each other may not increase the communication area.Figure 5d shows the number

Conclusions
In this work, we highlighted the energy constraints of sensing nodes involved in routing data to destinations in a hierarchy-based network.EMRP efficiently selects the next-hop by considering the residual energies of the intermediate nodes.We considered the energy-specific utilization of nodes to enhance the expiry time of first nodes as well.We also focused on connection degree and maximum links for data collection from member nodes.It accelerates data exchange to the BS by enhancing the lifetime of the network.To validate our work, we performed simulations in NS 2.35 along with TCL scripts and C code to implement send and receive functionalities in a heterogeneous environment where node configurations are separately specified in code.Furthermore, results were obtained from the trace files by utilizing AWK files.Simulation results showed the supremacy of our proposed EMRP as compared to counterparts in terms of improved average lifetime, higher data collection rounds, improved PDR, reduced communication cost, increased residual energy, improved communication area and number of alive nodes.In future work, we will test our EMRP in grid topology along with available mobility models.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.

Communication Area and Number of Alive Nodes
Figure 5c illustrates the communication area involved as the number of nodes increased in the network.Results show that the communication area increased as per the increase in number of nodes, whereas the value decreased with 35 to 45 nodes, to 4846 m 2 and 4756 m 2 , respectively.For 30 nodes, the communication area coverage was 5008 m 2 .It varied as per the topology of the nodes after deployment, i.e., the nodes deployed very close to each other may not increase the communication area.Figure 5d shows the number of alive nodes while the simulation time passed gradually.Results show that the nodes consumed energy for different data collection operations to expire battery life as per the increase in simulation time.After 800 s, there were 42 alive nodes out of a total of 70 nodes.

Conclusions
In this work, we highlighted the energy constraints of sensing nodes involved in routing data to destinations in a hierarchy-based network.EMRP efficiently selects the next-hop by considering the residual energies of the intermediate nodes.We considered the energy-specific utilization of nodes to enhance the expiry time of first nodes as well.We also focused on connection degree and maximum links for data collection from member nodes.It accelerates data exchange to the BS by enhancing the lifetime of the network.To validate our work, we performed simulations in NS 2.35 along with TCL scripts and C code to implement send and receive functionalities in a heterogeneous environment where node configurations are separately specified in code.Furthermore, results were obtained from the trace files by utilizing AWK files.Simulation results showed the supremacy of our proposed EMRP as compared to counterparts in terms of improved average lifetime, higher data collection rounds, improved PDR, reduced communication cost, increased residual energy, improved communication area and number of alive nodes.In future work, we will test our EMRP in grid topology along with available mobility models.

Figure 1 .
Figure 1.Cluster-based routing with one-hop, two-hop and multi-hop routing.

Figure 1 .
Figure 1.Cluster-based routing with one-hop, two-hop and multi-hop routing.

Algorithm 1 :
Next hop Selection in multi-hop routing 1.

Figure 4 .
Figure 4. Average data collection time is presented in (a), average lifetime in (b), first node expiry time in (c), and average residual energy after routing operations in (d).

Figure 4 .
Figure 4. Average data collection time is presented in (a), average lifetime in (b), first node expiry time in (c), and average residual energy after routing operations in (d).

5. 3 .Figure 5 .
Figure 5a illustrates the packet delivery ratio by calculating the number of packets sent and received during data exchange.Results show that packet delivery ratios were 66.38%, 71.27%, 73.91%, 77.18% and 80.23% for PEDAP, LEACH, PEGASIS, DADCNS and L-VH, respectively.Our proposed EMRP dominated by achieving 85.16%.The main reason for receiving fewer packets was due to the selection of lengthy paths where the message exchange may traverse in the opposite direction to BS.It may lead to excessive communication and fewer chances for packet delivery.Figure 5b depicts the amount of communication lost in kilobytes during message exchange using different routing protocols.The data packet's size was set to 256 bytes as per the values exchanged in a message.Results show that the amount of communication lost due to packet drops was 258.13 KB, 281.20 KB, 200.35 KB, 175.23 KB and 134.33 KB, in the case of PEDAP, LEACH, PEGASIS, DADCNS and L-VH, respectively.EMRP achieved a minimum loss of 113.93 KB, where the loss ratio was 0.1483 when 3000 packets were exchanged for EMRP.

Figure 5 .
Figure 5. Packet delivery ratio is presented in (a) and amount of data lost in (b).The communication area and the number of alive nodes are illustrated in (c,d).

Table 1 .
List of Notations for EMRP.
Nodes at a distance of one-hop to n-hop from CH

Table 1 .
List of Notations for EMRP.