Abstract
Keywords
Introduction
The Internet of things (IoT) has gained its ground rapidly in last couple of years offering unlimited applications in many areas comprises intelligent transport system, agriculture, healthcare, smart cites, smart buildings, smart grids, environment monitoring, education, industry, entertainment and so on.1–7 The IoT is considered as next generation of Internet or expansion of Internet and World Wide Web, where huge number of things will be connected and would allow direct machine to machine (M2M) communication.8–10 Almost every factor either hardware or software of IoT is important but the most indispensable element in IoT is the sensors, which are the ears and eyes of IoT 11 and become base for wireless sensor networks (WSNs). WSN becomes significant research topic due to its increasing role in new cutting-edge applications and state-of-the-art technologies.
WSN is a foundational technology for IoT. Whole IoT system relies on it. 12 WSN plays a strategic role in promotion and growth of IoT, permitting low end devices with limited resources and offering life-changing services. It uses tens to thousands of sensors connecting each other via wireless technology.13,14 Advancement in sensors’ technology makes it possible to build low cost and tiny-sized IoT-enabled wireless sensors to bring smartness in small- to large-scale appliances. 15 A typical WSN composed of numerous numbers of sensors nodes with sensing, communication and processing capabilities.16,17 WSN can serve as a platform for many other domains such as measurement of important environmental parameters (humidity, temperature, light, pressure and so on) in smart agriculture, secure and reliable communication, military applications and monitoring, medicine and healthcare, different types of industries, traffic surveillance and so on.17–26
There are severe threats and technical challenges to WSNs that must be overcome to ensure adaptation and diffusion of it. Most of the limitations of WSNs are due to its resource constraint objects nature. The sensors of open area WSN is always vulnerable to harsh or hostile environment challenges in terms of high temperature, humidity, pressure, dust, rain, snow and so on, which are affecting the operation of WSN, making it essential to have robust and resilience sensor nodes. Furthermore, other general problems and future challenges to WSNs are comprises limited constrained resources, limited communication capability, stability, fault tolerance, bandwidth, mobility, result precision, availability, trust, accountability, heterogeneity, integration, uncontrollable environment, technology and denial of service attack (DoS). Along with aforementioned general challenges, WSNs has specific issues that got much of the researchers’ attention. These specified open research challenges of WSN are power consumption, network lifespan, network throughput, wireless routing protocols and network security.
Energy consumption is highly prominent topic in WSN communication. The energy efficiency is a key factor, plays a vital role for the longevity of WSN and influences the whole performance of network. 27 The lifetime of the WSNs depends upon energy level (EL) and considered as one of the main factors in performance evaluation of WSN routing protocol.11,28 In WSN routing, the energy consumption, residual energy and total energy are always important metrics and parameters while computing cost function (CF).29,30
Routing has been always an important factor in any type of communication network. It is always been a challenging job for researchers to route packets to destination efficiently, safely and with minimum overhead. Due to sensors’ resource constraint, such as limited energy, limited processing and short communication range, the routing algorithm implementation is a cliff-hanger task for the researchers. Countless efforts have been made and still extraordinary efforts are needed in this subject to come up with best solutions.
Clustering in WSN is a process in which the network is divided into hierarchy to do load balancing and to achieve other objectives such as scalability, lifetime maximization and energy minimization. It is very effective and efficient way to prolong lifespan of WSNs31,32 and influence the overall performance of network. Hierarchal-based or cluster-based routing protocols are divided into cluster heads (CLHs) and member nodes (MNs), where CLH selection is based on important parameters such as residual energy and distance to sink node (SN). CLH role is rotating based on the rank of the nodes. The ranks of the nodes are defined by the increase or decrease in important parameters. Cluster head act as a leader or coordinator that take data from cluster members (CMs), aggregate it and forward it to base station (BS) or SN.33–40 Also, cluster-based routing protocols are divided into three broad classes such as block cluster based, grid cluster based and chain cluster based. Furthermore, cluster-based WSN is divided into two-tier (two layers) and three-tier (three layers) hierarchies, as shown in Figure 1.

Comparison of two-tier clustering versus three-tier clustering.
Another important aspect in WSN is security against malicious nodes. Illegal intrusions in WSNs highly disturb and degrade lifetime, throughput, authenticity, confidentiality, integrity, availability, bandwidth, quality of service (QoS) and so on. Routing protocols of WSNs are suffered from various attacks such as Sybil attack, selective forwarding attack, wormhole attack, black hole attack, sinkhole attack and hello flooding attack.17,41–44 To encounter aforementioned attacks, reliable, effective and resilient routing protocols are needed for WSNs.
Inspired by above-mentioned consideration, this work aimed to prolong network lifespan, improve throughput, increase number of alive nodes, decrease packet latency and packet loss and reduce energy consumption and further improvise encountering malicious nodes. To further tune the network lifetime in terms of energy, wireless harvesting energy (WHE) is suggested in proposed three-layer cluster-based and IoT-based WSN routing protocol. The proposed solution, trust-based energy-efficient routing protocol (TBEERP), is a three-tier clustering routing protocol with embedded check-up node (CN) to encounter malicious activities of nodes and to slant them into blacklist. Moreover, link quality (LQ) is also checked in order to further improve routing efficiency. Only hardware-based link quality estimators (LQEs) are considered in this proposed research work, which does not overhead or delay the overall process. The contribution of this research work can be summarized as follows:
Harvesting energy is added in three-layer WSN clustering techniques to prolong lifespan of network and to improve network throughput. Due to this extra supplementary energy, the responsible roles (CLHs + CLGs) further extend their assigned duty.
CNs are introduced in each cluster to mirror malicious attacks.
Most of the processing is done by SN, which does not have any resource constraints.
In proposed solution, CF plays pivotal role that spit out CLH and CLG role.
Hardware-based LQEs are used to check link efficiency.
The rest of the article is organized as follows: related research and literature are briefly reviewed in section ‘Related literature’. The proposed system model is explained in section ‘Proposed system model’. Section ‘Performance evaluation of proposed solution’ elaborates simulation, results and analysis with required snapshots and section ‘Conclusion’ concludes this study.
Related literature
Tiered and layered data transmission is considered one of the robust and preferred schemes in WSNs. After passing through numerous experiments, this approach is now assumed very efficient routing techniques to route data packets to destination, for example, BS. In this type of structure, all sensor nodes are distributed into different layers with different roles such as CMs, cluster heads (CLHs) and cluster gateways (CLGs).
There are many literatures and research works written and tested 35 in WSN routing protocols. Some of them are robust, while some are average. The cluster-based algorithms or protocols have been undertaken for this proposed work as a base study. Main role in cluster is the role of cluster head (CH), that is, leader and its role changed based on important parameters such as current EL. In this regard, low-energy adaptive clustering hierarchy (LEACH) 45 is the forerunner work, which is considered as based literature for most of the clustering algorithms. In LEACH protocol, selection of CHs is carried out in every round. LEACH was first priority for cluster-based routing for a long time because it distributes equally the energy consumption in nodes. But it leads to additional routing overhead that result in plenty use of energy of CHs. Along with it, this protocol only accommodates single-hop communication from node to BS.
An enhanced three-layer hybrid clustering mechanism (ETLHCM) 11 by Ullah et al. further tried to limit control traffic after every round, especially for the selection of CH. In proposed mechanism, the energy of the nodes is divided into ELs, based on which it is decided when cluster nodes need to select new cluster head by lower layer. The EL is also used for balancing energy consumption between sensor nodes. The role is reverted to normal node from CH role, if its residual energy dropped by 1 EL. The ETLHCM greatly reduced the burden of wasteful control traffic exchange. It is claimed after simulation that ETLHCM showed 18% improvement in terms of network lifetime and half of the nodes alive (HNA) compared to hybrid hierarchical clustering approach (HHCA). It outperforms LEACH, three-layer LEACH (TL-LEACH) and HHCA in terms of network lifetime. However, this algorithm is lacking clear procedure for the selection of grid head (GH).
To encounter malicious attacks, such as wormhole, black hole and Sybil, an attempt has been made by Ai et al. 46 New protocol has been proposed to guarantee reliable routing and data exchange. This is a smart collaborative routing protocol, which is named as geographic energy aware routing and inspecting node (GIN). It incorporates directed diffusion routing, geographic and energy aware routing (GEAR) and inspecting node procedure. GIN is a completely novel approach to tackle these problems. In this proposed method, GIN is cohesive with GEAR protocol. Furthermore, it is experimented on NS3 and claimed that it surpasses the other three counterparts such as flooding, GEAR and greedy perimeter stateless routing (GPSR) in many aspects. It is novel concept but the combination of GIN with GEAR making it complex.
Many issues of WSN have been addressed in the literature by Hosen and Cho. 37 They have proposed a routing protocol by the name of energy-centric cluster-based routing (ECCR) for WSNs. Static clusters concepts were introduced, which decreases the overhead of control packets during the formation of clusters. The caretaker concept has been taken, inspired from Malathi et al., 44 for the election of cluster head, where ranks’ information are allied with local data. The former cluster head is responsible to handover its role to forthcoming cluster head, which is elected in current round. This process highly reduces laden of control traffic regarding the selection of cluster head. This leads to further prolong and improve WSN lifetime. This scheme, however, fails in dynamic clustering distribution, which is demand of cutting-edge WSNs.
Another very serious attempt has been carried out by Arjunan and Sujatha 38 to exclude hot spot problem and to maximize network lifespan of WSN. The proposed model is a hybrid (proactive and reactive) unequal clustering protocol, which transmit data both in proactive and reactive fashion. This WSN protocol is fuzzy logic–based unequal clustering and ant colony optimization (ACO)-based routing hybrid (FUCARH). This protocol consists of three phases such as CH selection phase, inter-cluster routing phase and cluster maintenance phase. The cluster construction is divided into two steps such as CH selection and cluster formation. The BS runs fuzzy logic for the formation of balanced clusters, which is achieved by the equal distribution of CHs in entire network. For the selection of CHs, the fuzzy logic uses five important parameters named residual energy, distance to BS, distance to its neighbours, node degree and node certainty. The results outclass the other counterpart (LEACH, threshold-sensitive energy-efficient sensor network (TEEN), distributed energy-efficient clustering (DEEC) and fuzzy energy-aware unequal clustering algorithm (EAUCF)) protocols in terms of network lifetime, balance energy consumption and elimination of hot spot problem.
Ari et al., 39 proposed a protocol named Artificial Bee Colony-SD (ABC-SD), which is inspired by fast and efficient searching of artificial bee colony (ABC) to build lightweight clusters. This protocol is an extension of original ABC protocol. A versatile multi-objective function is aspired using linear programming (LP) formulation. The routing problems are targeted with a cost-based function, which uses energy and number of hops as parameters. The quality of communication is also taken in consideration. Through a centralized control algorithm, the clustering process is accomplished and this whole process is carried out in BS. This solution is good; however, LP makes it a bit fuzzy.
A novel routing algorithm has been proposed in Wang et al. 40 The energy depletion problem has been targeted in this study with a protocol named energy-efficient compressive sensing-based clustering routing (EECSR). This paper worked on the combination of the merits of clustering techniques and comprehensive sensing–based (CSbased) system. First, the lemma of the relationship between two linked layers, optimal number of CH in each layer and optimum distribution of CH is presented. Second, an attempt has been carried out to eliminate hot spot problem in WSN and to minimize energy consumption. Third, the role of back cluster head (BCH) and its rotation with CH is proposed. The authors claimed of much better results in terms of energy efficiency and WSN lifetime extension.
A hybrid approach is considered by Younis and Fahmy 47 to achieve energy-efficient distributive clustering by the name of hybrid energy-efficient distribution (HEED) clustering. A novel protocol, which selects CH based on residual energy and other parameters such as node degree. HEED is fairly uniform cluster head distribution protocol across the network with very low messages overhead. The main objectives of the HEED are extending network lifespan, finishing clustering process in fixed number of iteration, reducing control overhead and creating sound distributed CHs. This literature used two unique terminologies such as source and server. The source is used for normal nodes and the server is used for cluster head.
An attempt has been made by Cengiz and Dag. 48 The proposed scheme is comprises two phases such as setup phase and steady-state phase. The setup phase made once in network lifetime in which CHs, CMs and other distributer are assigned their roles. In steady-state phase, transmission of the collected data occurred along with selection of new CHs and redistribution of CMs. The proposed solution is an energy aware multi-hop routing (EAMR), which achieves the objective by minimizing the surplus overhead in LEACH 45 and in its successors by implementing fixed clusters and reducing CH changes. Due to less number of CH change and fixed size of clusters, the network lifetime increased and network overhead decreased. Compared with other counterparts (LEACH, LEACH fixed clustering (LEACH-F), modified LEACH (Mod-LEACH), DEEC, stable election protocol (SEP) and low energy fixed clustering algorithm (LEFCA)), the EAMR showed significant improvements in terms data transmission, energy consumption and network lifetime. Because of fixed size of clusters, this scheme is not candidate for large-sized WSN.
A new cluster-based protocol hierarchal distributed management clustering (HDMC) is proposed by Shahraki et al.
49
The proposed technique uses many parameters such as action history of each node and local and general status of each node in order to select and determine best node for CH role. It further extend network lifetime, consume network resources fairly and improve network coverage further. Moreover, HDMC will be a good choice for WSNs routing because of its simple setup and low overhead (only one broadcast
Yi and Yang 50 presented a clustering-based routing protocol named Hamilton energy-efficient routing (HEER) for WSNs. It took help from the concept of Hamiltonian path in graph theory to carry-on and carry-out its duty. Hamilton path is a path that traverses a graph and accesses each node only once. Advantages of Hamilton path is that HEER visits every node once in each round so to avoid duplicate messages from nodes to CHs. HEER collects data, aggregates it and then forwards it through Hamiltonian path to BS. HEER is implemented in MATLAB comparing it with low-energy adaptive clustering hierarchy cluster head technique (LEACH-CHT), LEACH and power-efficient gathering in sensor information systems (PEGASIS). It outperforms all others in term of network lifetime and transmission delay. This routing protocol uses Hamilton path for sending packets to BS. The disadvantages of Hamilton path may not be ignored.
Wang et al. 51 presented solution by the name of hybrid multi-hop partition-based clustering routing protocol (HMPBC), which tackled multiple problems of WSN to be solved. The CH selection depends upon the level of residual energy. The observed area is divided into zones and a single-chain structure is used in cluster to maximize network lifetime. Minimum spanning tree algorithm is adopted for communication among CHs. The proposed solution is simulated in MATLAB and outclasses low-energy adaptive clustering hierarchy multi-level opportunistic routing (LEACH-MLOR) and energy efficient hybrid multi-hop clustering scheme (EEHMCS) in many areas. Minimum spanning tree is making additional overhead in this algorithm.
Summary of state-of-the-art protocols in subject area is given in Table 1
Detailed description of some state-of-the-art protocols.
ETLHCM: enhanced three-layer hybrid clustering mechanism; BS: base station; CH: cluster head; GH: grid head; LEACH: low-energy adaptive clustering hierarchy; GIN: geographic energy aware routing and inspecting node; RSS: received signal strength; ECCR: energy-centric cluster-based routing; FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; RSSI: received signal strength indicator; EECSR: energy-efficient compressive sensing-based clustering routing; BCH: back cluster head; HEED: hybrid energy-efficient distribution clustering; EAMR: energy aware multi-hop routing; HDMC: hierarchal distributed management clustering; HEER: Hamilton energy-efficient routing; HMPBC: hybrid multi-hop partition-based clustering routing protocol; CLH: cluster head; CLG: cluster gateway; CN: check-up node; LQI: link quality indicator; SNR: signal-to-noise ratio; ABC-SD: Artificial Bee Colony-SD.
Proposed system model
Main tasks of sensor nodes in smart environment, such as smart cities, smart homes, smart health, smart agriculture, and smart grids, are to monitor physical and chemical changes and then pass it to the central location (SN) for further processing. Sensor nodes have different sensing capability and EL constraint. There are several challenges to IoT-based technology and WSN, in which the most burning and important is the energy consumption and maintenance during communication as mentioned in Li et al.
52
Therefore, this research highly focuses on reducing the number of control
To prolong network lifetime and to keep load balancing, the proposed model is cluster and hierarchal layered based. It is latency full and energy consuming task to send the field data by the sensor nodes directly to SN. Hence, it is supposed in this research that sense data will be forwarded to CLH by the CM, CLH forward it to CLG, where these aggregated data are further forwarded to SN.
To keep security check and balance and to avoid malicious attacks such as Sybil, Sinkhole, and Wormhole, this proposed model comes up with CN that carry-out security-related tasks. Furthermore, to make it result oriented and to equip it with upcoming IoT application challenges, this work has been rooted with WHE. Figure 2 depicts and sets out simple sketch of our proposed approach and Figure 3 (flowchart) shows the comprehensive illustration of it. Further details are given in the next sub-sections.

Framework of our proposed system.

Flowchart of proposed scheme.
Network framework
The proposed model is implemented into two rounds: Round 1, all sensors nodes, which are of heterogeneous nature, are deployed randomly in field. They are fixed and do not move after deployment. In addition, after deployment of sensor nodes, they send their distance from CM to SN. Received signal strength (RSS) is used as a metre parameter for measuring this distance. Along with it, all sensors send their residual energy (
Based on the value of CF, it enters into Round 2. In Round 2, formations of clusters have been carried out. Based on calculation and work out of CF, the decision has been made of CLH, CLG and CN.
Following assumptions have been assumed in proposed work:
Most of the events, that is, deployment of sensors and initialization, in proposed work follow standard procedure of IoT-based WSN.
Euclidean distance equation is used to calculate the distance among nodes and SNs. X and Y coordinates are used to locate the nodes.
Each CLH uses time division multiple access (TDMA) to access data packets from MN and same procedure is used by CLG to receive data from CLH.
For energy consumption during data transmission or data receiving, first-order model is used.
Each node is equipped with WHE unit.
This research is only tested for 200 sensors scenario.
Hardware-based estimators, signal-to-noise ratio (SNR), received signal strength indicator (RSSI) and link quality indicator (LQI) are used to estimate the link efficacy.
Nodes are of heterogeneous nature and having same initial energy at the time of deployment.
CLH and CLG compress and aggregate data into a single packet and then forward it ahead.
Clustering formation mechanism is same as in ETLHCM, 11 EAMR 48 and HEER. 50
After selection of CN, it carries it to the dedicated duty ahead.
We focussed on to limit control
Deployment of sensors
To sense field data, 200 tiny microelectronic sensors are deployed over a targeted area in two dimensions (2D) at initial stage. Figure 4 shows this scenario. These nodes are of heterogeneous nature, having different capacity, size and competency power. The deployments of sensors are fixed, terrestrial and random. From these deployed 200 nodes, decision will be made of CLG, CLH and CN. To prolong network lifetime and to reduce computational overhead (as, when EL become low from specified threshold, then role of CLH, CLG or CN shift to other MN that is done through some computation to recalculate CF), each sensor node is equipped with WHE unit.

Deployment of heterogeneous WSN.
Initialization
This is prior communication phase in which the SN communicates with all deployed node via a dissemination initiation hello packet (
Furthermore, in this stage, SN gets important information about field nodes such as
Node identity (Nid)
Residual energy (
Link quality (LQ)
Distance (
SN saves this information for future use. Also, based on these received
where
Energy model
To improve reliability of a WSN, efficient utilization of energy is needed. In WSNs, energy consuming is the most alarming and burning issue. IoT and cluster-based routing is revolving around energy-constrained sensors. Currently, three-layer cluster hieratical technique is considered conducive remedy for efficient energy consumption as compared to other existing techniques.
55
In this proposed model, nodes with high
In this research, first-order radio model
53
is used for the calculation of energy consumed in transmitting (
Circuit consumed energy
When node
And receiving transmitted
Moreover, in simplest definition, energy consumed by node during transmission of a single
Also to minimize wasteful operation and to save energy, the following function is used
where
where
In this proposed model after initialization phase, total energy (
or
where
Wireless harvesting energy
One of the main issues and challenges in upcoming 5G wireless network is to improve the energy efficiency of battery-fitted devices. 56 Same is the case of WSN, in which battery power capacity is vital factor in longevity of network lifetime. In WSNs, energy saving and consumption are extremely important aspects for optimizing and functioning as much as possible network devices and prolonging the lifespan of overall network. Hence, WHE technology is highly fascinating and enchanting solution, in which WSN devices can pick energy from around environment or from ambient radio signals. The specific hardware circuit in WSN devices for harvesting energy can be designed both for WHE and information transferring/receiving. 56
WHE is formulated in Gao et al. 57 using time-slot for energy harvesting and spectrum sharing with approach ‘best cooperative mechanism’ (BCM). The WHE equations are given in the following equation
and
where
The WHE circuit-equipped devices receive transmitted radio waves with its antennas and convert RF energy into DC energy source to supply it to sensor devices. In general, in broad, WHE is divided into two categories, namely, dedicated source and ambient source. 58 Furthermore, it is shown in Figure 5.

WHE broad two categories.
LQ or link efficiency computation
With the addition of residual energy, total energy and distance to SN, computation of end-to-end LQ is also an important factor in the proposed work, in order to keep QoS. LQEs play vital role in best route selection to the SN using different parameters of links. 59 Links in WSN communication are normally unreliable and weak. Different parameters are taken into account while computing LQ, such as hops’ count, RSSI, SNR, LQI, packet error rate (PER) and packet reception rate (PRR). 54 In broad, LQEs are categorized into two classes such as hardware-based estimators, which includes RSSI, SNR and LQI, and software-based estimators, which includes PRR, risk priority number (RNP) and score. Algorithm 1 demonstrates the detailed procedure of LQE.
For link estimation and efficiency, we rely on hardware-based metrics of estimating LQ, which is provided by the physical layer, IEEE 802.15.4 standards. 60 For LQ prediction, RSSI, SNR and LQI are consideration as given below.
RSSI
In most of the new radio transceivers’ circuit such as CC2420, the RSSI is an eight-bits integer value, which is read from RSSI register. Radio chips are providing RSSI value that is the strength of received radio frequency (RF) signal and
where
For better interpretation sometimes, mean of RSSI is taken into account, as shown in equation (17)
where
SNR
SNR is the ratio of RSS to the strength of the background noise. To compute SNR, first RSSI of the received packet is recorded and then the background noise is measured.66,67 It can also be defined as the ratio of the power of environmental noise to the power of useful signals and may be expressed using equation (18)
SNR is expressed in decibels (dB) and may also be computed using equation (19)
where
Also, as in the definition of SNR that it first computes the RSSI of received signal and then background noise, which is expressed in equation (20)
where
Furthermore, the SNR of each successfully received
A link with 20 dB or above is considered as very good, a link with SNR 12 dB is considered as good and a link with SNR between 5 and 10 dB can hardly considered as bad, average or good. 68
LQI
The LQI designates the quality of received signal calculated either energy detection (ED), SNR or combination of both. The value of LQI is very important for upper layers especially for network layer because routing protocol can take benefit of it. The quality of an IEEE 802.15.4 network’s link can be predicted on the basis of the value of LQI. It can be formulated as given in the following equation
where
where
Hardware-based triangle metrics
Hardware-based LQEs are extensively used metrics for checking of link efficiency. One of the main reasons behind it is low overhead as compared to software-based LQEs. These LQEs are built-in hardware chip (CC1101 and CC2420) and can be directly obtained from radio transceiver.63,67 In this research to predict LQ, variance mean of the hardware-based LQEs (RSSI, SNR and LQI) is taken, which is named as ‘hardware-based triangle metric’ and then this combined mean value of LQE is taken as input parameter in
Based on the value of distance
CF
The most important part of this proposed model is the computation and interpretation of
Residual energy
Distance of each node from/to SN
End-to-end LQI
Total energy

Cost function flow diagram.
Initially, residual energy of each node will be taken in consideration while computing
and
where
Cluster formation phase
Cluster formation is an efficient way to minimize data transfer cost of large-scale WSNs. This phase is utilized to classify the network into hierarchal clusters. In this article, cluster-based routing is adopted, which enhanced lifespan and performance of WSN. Actually, competent and suitable clustering techniques have further enhanced network performance in terms of energy consumption, network lifetime, bandwidth, node throughput and routing delay.
The proposed cluster-based routing scheme is divided into three-tier hierarchal model, namely, tier-1 is between CMs and CLHs (CMs→CLHs), tier-2 is between CLHs and CLGs (CLHs→CLGs) and tier-3 is between CLGs and SN (CLGs→SN). Figure 7 further describes this three-tier hierarchal cluster model/scheme.

Our proposed three-tier hierarchal clustering model.
For cluster formation, different cluster algorithms are used, such as K-means (KM) and fuzzy-C-means (FCM), which are beyond the scope of this article. Each cluster in proposed scheme comprises CMs, cluster head, CLG and CN. Each of it plays their specific role that is described in the next section.
Selection of CN
CN is concerned to the security of proposed network model. It keeps CLH and CLG under inspection. These nodes use
Selection of CLG and CLH is based on the value of
where
where
Either node may select only one strategy and will get a specific payoff, as process of this game can be labelled as a cost and payment model. Each node selects the strategy very carefully and tries to use less energy and capitalizes on their payoff. After taking assigning role of
where
Two players strategy game for CN and CM.
CN: check-up node; CM: cluster member.
The second player selects
However, if the order of the selection is changed, player 1 and player 2 still may select pair (
and
Same as in Nash equilibrium, one player will be CN and the other will be CM.
Performance evaluation of proposed solution
Numerous experiments have been carried out to judge the outcomes of the proposed protocol. The simulations of this study are conducted in NS3 tool. In total, 200 nodes of same residual energy are deployed over an area of 200 × 200 m2 in 2D network. A single SN is placed outside of field area at a distance of 170 m. The details of the simulation parameters are shown in Table 3. The proposed protocol is compared with FUCARH, 38 ABC-SD, 39 ETLHCM 11 and EAMR 48 algorithms. The comparison is done on the basis of residual energy, network lifetime, network throughput, alive nodes, network stability and packet latency. Main goal of the proposed solution is to further extend lifespan of network by reducing frequent exchange of CH role and extra overhead. Simulation results have forecasted better performances than other compared approaches.
Simulation parameters with values.
Network lifetime
Network lifetime or lifespan means the total time of network from the initialization point till death of last node. It is one of the main factors to judge efficacy of any WSN protocol. The network lifetime tremendously increased compared with other related protocols due to embedded harvesting energy unit in proposed TBEERP and reduction in cluster head change as much as possible. In addition to it, the number of control
The supremacy of proposed system in terms of network lifetime over FUCARH, ABC-SD, ETLHCM and EAMR may be observed in Table 4 and in Figure 8. Especially, at round 500, nodes started dying in compared protocols but in our proposed system first node died at round 850. Similarly, almost all nodes die at round 1700 of compared schemes, but TBEERP still operated and lived up to round 1900. Hence, it shows that TBEER is much better in contrast to other contemporary protocols.
Nodes’ lifetime versus rounds.
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.

Analysis of network lifetime.
Residual energy
The energy at initial stage of a network or remaining energy of battery at the starting of each round is called residual energy. Energy dissipation in WSNs is directly proportional to network lifetime and its efficiency. Figure 9 presents residual energy analysis of proposed and other paralleled protocols. Figure 9 shows that residual energy of proposed system is more stable than competitive protocols. The results of residual energy usages are quite obvious, which are depicted in Table 5. Tabulated data show that residual energy of FUCARH and ABC-SD depleted before round 6000, residual energy of ETLHCM and EAMR totally drainage before round 7000, but residual energy of the proposed protocol operated even beyond 7000. Still 25 J of energy was present. The proposed system preserved and utilized network energy in better way as compared to other under-studied protocols.

Analysis of residual energy.
Residual energy versus rounds.
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.
Average energy consumption
The average energy consumption is the energy spent by each node in specific round. The pictorial form of energy consumption is shown in Figure 10. TBEERP shows much better results and high energy efficiency compared with other comparative algorithms. Table 6 further elaborates this comparison using textual data. From the results of Figure 10 and Table 6, it is clear that proposed protocol consumes less energy than FUCARH, ABC-SD, ETLHCM and EAMR. TBEERP defeated other protocols in this race because of having additional energy harvesting unit in each sensor, minimum shuffling of CH and low traffic overhead.

Analysis of average energy consumption.
Average energy consumption versus rounds.
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.
Number of alive nodes
As network lifespan is directly proportional to number of alive nodes. Main aim of this proposed protocol is to keep alive network for a long time. The main reason behind it is the injection of WHE in our proposed model, which extends life cycle of each node participating in WSN. Hence, TBEERP outperforms all other four competitor schemes in term of number of alive nodes per unit time. Figure 11 presents that after round 2000 other protocol nodes start dying and this process become acute after round 5000. But from Figure 11, it is very obvious that the proposed algorithm wins this race with very distinct margin. At round 7000 (last round), all nodes of contemporary protocols die, except EAMR – 15% nodes alive and proposed scheme – 23% nodes alive till last round (Table 7).

Analysis of total alive nodes.
Alive nodes versus rounds.
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.
Throughput
It is the successful delivery of packets from sensor nodes to the SN in unit time. High throughput means more efficient is the protocol. It is also one of the important measuring parameters to judge any routing protocol. To achieve high throughput in proposed scheme, CLG is introduced to act as a relay agent between cluster head and SN. It reduces the chances of packets loss which may occur in case of direct communication due to long distance. Figure 12 shows the result of throughput (bits/s) in which at initial stage almost all protocol are running with same pace and same throughput but then after round 4000 the proposed protocol gradually increases and surpasses all other protocols (FUCARH, ABC-SD, ETLHCM and EAMR) till last period of time (round). Tabulated information of throughput is shown in Table 8. Two metrics are used to calculate throughput: The amount of the delivered
where

Analysis of throughput.
Throughput versus rounds.
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.
Network stability
It may be defined as the duration till all sensor nodes stay alive in network or the duration before the death of first node in a network. This parameter is also referred as first node dies (FND) in some literatures. In WSN-based networks, it is one of the main judging criteria to check network efficiency. The values of network stability forecast network’s future. It is directly proportional to network lifespan. Network stability period result of proposed scheme is shown in Figure 8 (network lifetime figures FND). Also, these results are listed in Table 4. Figure 8 and Table 4 show that the first node of proposed system died at round 850 which is much higher than 500 of FUCARH, 270 of ABC-SD, 230 of ETLHCM and 750 of EAMR, respectively. From Figure 8, it is clear that proposed system delays the death of first node, which means it performed better than others. High network stability of proposed algorithm is due to harvesting energy unit in each node, minimum number of CH shuffling and low overhead of control packets.
End-to-end delay
End-to-end delay means the time taken by a packet to travel from the source node to destination node (SN). In this research, it is highly emphasized to minimize end-to-end delay time and the results of Figure 13 and the data listed in Table 9 show the success ratio in this department. As compared to other peers, TBEERP showed minimum end-to-end delay time. The initial stage results of proposed protocol are same as other counterparts because of selection CLH, CLG and other computation such as election of CN. When selection is done, then the latency is minimized prominently, depicted at time 10,000 s.

Analysis of end-to-end delay.
End-to-end delay versus time (s).
FUCARH: fuzzy logic–based unequal clustering and ant colony optimization–based routing hybrid; ETLHCM: enhanced three-layer hybrid clustering mechanism; EAMR: energy aware multi-hop routing; ABC-SD: Artificial Bee Colony-SD.
One of the reasons for minimized end-to-end delay is due to harvesting energy unit in CLH and CLG. Because of this supplementary energy, they continue their job for a long time without interruption with full momentum towards SN.
Conclusion
The IoT is considered as next generation of Internet or expansion of Internet and World Wide Web, where huge number of things will be connected and would allow direct M2M communication. The upcoming technology will be stuck around IoT paradigm and it will drive and automate whole system without the intervention of human being. In this research, the main focus was given to IoT-based WSNs and a sophisticated routing protocol for it. There are numerous problems to IoT-based WSNs ranging from general to specific problems. To overwhelm these issues, this work aimed to prolong network lifespan, improve throughput, increase number of alive nodes, decrease packet latency and packet loss, reduce energy consumption and further improvise encountering malicious nodes. To further tune the network lifetime in terms of energy, WHE unit is rooted in every sensors of proposed three-layer cluster-based WSN routing protocol. The proposed solution, TBEERP, is a three-tier clustering routing protocol with implanted security mechanism (CN) to encounter malicious activities of nodes and to send them into blacklist. The blacklisted nodes are no further part of communication in current round. The proposed algorithm is a centralized scheme, which spit out the role of cluster head and CLG based on the value of CF. The residual and total energies, distance to SN and LQ were the main parameters while computing CF of each node. Moreover, hardware-based LQEs are used to check link effectiveness and to further improve routing efficiency, as there is no need for extra computation or overburden because the link information is pre-exiting in PHY and MAC frames. At the end, excessive simulations have been carried out in NS3 to check efficacy of the proposed protocol. It showed splendid results and outperformed all others (FUCARH, ABC-SD, ETLHCM and EAMR) in terms of network lifetime, network throughput, average energy consumption, network stability and packet latency. The pictorial and textual data, which have been shown in section ‘Performance evaluation of proposed solution’ via graphs and tables, are portraying the supremacy of proposed protocols over it contemporaries in the above-said terms.
