Hybrid access and adaptive duty cycle clustering protocol for ultra-low power wireless sensor networks

This paper investigates many drawbacks and limitations of current clustering algorithms designed for wireless sensor networks. These limitations include high resource requirements, signiﬁcant overhead, tight synchronization requirements, and TDMA limitations. A new clustering algorithm called hybrid access and an adaptive duty cycle clustering (HADC) protocol is introduced, aiming to address the previous limitations. HADC protocol is based on several concepts, including static clusters, adaptive duty cycling, hybrid scheme channel access, minimum node’s functionality, and pseudo synchronization. The resulting network’s important features are energy efﬁciency, robustness, low latency, scalability, and self-healing. The functionality of HADC is validated by both simulation and laboratory experiments. Simulation results show signiﬁcant improvement of HADC over the well-known LEACH protocol in terms of energy, latency, and packet delivery ratio. The experiment results show that the node’s lifetime with two 3000 mAh batteries and transmitting four packets per minute is about 16 years. The lifetime of the cluster head supported by the same energy sources ranges from 110 to 472 days. HADC is the ﬁrst clustering algorithm designed for sporadic and low rate WSN applications to the best of authors’ knowledge.


INTRODUCTION
The sensor nodes' main limitation in wireless sensor networks (WSNs) is the limited energy (usually two AAA batteries). Replacing a node's battery may be costly or even impossible for different reasons. Also, some nodes' energy depletion may isolate a part of the network from the sink, leaving this area uncovered. Therefore, many authors define network lifetime as the time duration from the beginning of network operation until the first node's death due to the running out of energy [1].
The primary sources of energy consumption in the sensor node are sensing, processing, and communication units. Since the transceiver unit dominates the energy budget, optimizing its energy usage is of utmost necessity. Recall that MAC and routing protocols have direct access to the transceiver, making them a suitable level to address the energy-efficiency problem [2,3]. Energy reduction in a sensor network can be achieved by minimizing the nodes' duty cycle and reducing the number of  packets. Many researchers agreed that both previous objectives could be achieved using a clustering approach [4].
In a cluster-based network, sensor nodes are virtually organized into several groups called clusters. Each cluster has a leader node called a cluster head (CH). All cluster members send their data packets to the CH, which aggregates the received packets and transmits them to the sink node directly or through another CH.
The clustering process consists of two phases: the setup (initialization) phase and the steady-state phase. The clusters are created in the setup phase through four typical steps: CH selection, CH role advertisement, cluster formation, and TDMA schedule creation. After a CH is selected, it broadcasts an advertisement (ADV) message to all nodes within its communication range, informing them that it is a new CH. Each non-CH node decides to join the best CH based on either Received Signal Strength (RSS) or other metrics. Then, each CH will create a TDMA schedule and broadcast it to its members. In the steady-state phase, each cluster member wakes up periodically 1. CH role rotation requires all nodes to have the same hardware capabilities, which increases network cost. 2. All LEACH-based clustering algorithms assume the nodes are globally synchronized without providing any mechanism for that. Also, the tight synchronization requires nodes with precise timing, and this may be hard to achieve with low cost and resources limited platforms. 3. It increases the number of messages exchanged and energy consumption during the setup phase, which negatively influences the network lifetime [17][18][19]. 4. It does not consider the status and resources of CHs in the previous round, which might be the most qualified nodes to continue serving as CH for several upcoming rounds before a re-clustering is required. 5. Periodic re-clustering hinders the real-time transmission of data at the beginning of each round [20].
Another issue is related to the availability of new data. The majority of clustering algorithms assume the cluster members always have data to send in all frames, and this assumption might not be valid for all applications. Recently, many works proposed different methods to avoid transmission of duplicated or unnecessary measurements using adaptive sampling [21,22], prediction model [23,24], and compressive sampling [25,26].
Although these methods efficiently reduce energy consumption at the node's side, they did not address the CH side's energy overhead due to idle listening.
Finally, all clustering algorithms use a TDMA-based access method to prevent collisions and minimize idle listening. This method has many drawbacks and limitations that offset its advantages. TDMA is suitable for periodic and high traffic loads, while most WSN applications require low and sporadic traffic resulting in energy waste in CH due to idle listening. Moreover, TDMA is not robust to the topology change, for example, node failure or insertion of new nodes cannot be handled in the current round. Also, the problem of clock drift decreases throughput at low traffic loads. Finally, tight synchronization requires nodes with precise timing, which may be hard to achieve with low cost and resources limited platforms [27][28][29]. For these reasons, clustering protocols are not very frequently used in practical WSN applications. All clustering algorithms are evaluated by the simulation to the best of our knowledge, and no clustering algorithm is tested on real hardware or implemented in real-world applications.
The previous limitations hinder the efficient implementation of current clustering algorithms in the real world. Therefore, a new design methodology is required to overcome these drawbacks and to optimize the energy usage of both normal nodes and CHs. This paper is an extension of our previous work [30]. It presents a new clustering algorithm called Hybrid access and Adaptive Duty-cycle Clustering (HADC) protocol to address current clustering algorithms' limitations. The protocol is designed to utilize the energy harvesting technique and introduces a combination of concepts to optimize network performance in many aspects, such as energy-efficiency, robustness, packet delivery delay, network cost etc. Our contribution in this work can be summarized as follows: 1. The static clustering with dynamic topology is adopted to eliminate the energy overhead of periodic re-clustering. 2. The TDMA schedule is replaced by the CSMA access method to accommodate both event-driven and periodic data collection methods. 3. The active time of CH is dynamically adjusted according to the instantaneous traffic load. 4. The operation of clusters is arranged in a non-overlapped manner to evade the CDMA technique, which reduces hardware requirements and contributes to overall cost reduction. 5. A new hybrid channel access method is developed to reduce network congestion at the sink and improve the delivery ratio. 6. The function of normal nodes is minimized to extend their lifetime and reduce their cost as well. 7. An energy-efficient fault-tolerance method is introduced to handle topology change due to CH failure. 8. The resulted protocol is tested using simulation and Laboratory experiments.
The rest of this article is organized as follows: Section 2 presents clustering algorithms designed for WSNs. Section 3 introduces motivations and details of HADC protocol. Section 4 presents simulation results and results of comparison with the other protocols. Section 5 presents experimental results and discuss consistency issues between simulation and experimental results. Finally, Section 6 provides the conclusion and future research direction.

RELATED WORKS
In the last two decades, many clustering algorithms have been proposed for WSNs [10,12,[31][32][33]. Most of these algorithms differ in selecting CHs while in steady-state, they have similar behavior. Interestingly, a Low-Energy Adaptive Clustering Hierarchy (LEACH) protocol [8] is the seminal work in this field. In the setup phase of the LEACH protocol, each node decides to become a CH randomly. It chooses a random number (between 0 and 1), and if the number is less than a predefined threshold, then the node becomes a CH. Otherwise, it turns into non-CH. The value of threshold T (n) is changed from round to round, and it is calculated using Equation (1).
where P is the desired percentage of CHs in the network (e.g. P = 0.05), r is the current round, and G is the set of nodes that have not been CH in the last 1∕P rounds. At the beginning of the round r, each node in G becomes a CHs with probability which is increased in every round, such that each node will become a CH exactly once every 1 P rounds and in round 1 P , the process starts afresh.
LEACH protocol achieves eight times a reduction in energy consumption over direct transmission and minimum transmission energy (MTE) routing. However, LEACH protocol has the following drawbacks, and limitations [10,[34][35][36]: • Probabilistic CH selection produces unequal size and randomly distributed clusters, resulting in uneven distribution of energy within clusters and among CHs. • The CH selection does not consider the node's energy, which results in the premature death of some CHs. In this case, the whole cluster becomes inactive during the current round, even if several members have enough energy to function. • Direct communication between CHs and BS (single-hop) limits the coverage area. If some CHs are farther from BS than their maximum transmission range, all cluster members are isolated from BS in these rounds. • Periodic re-clustering reduces energy efficiency and network throughput because data transmission is suspended during the setup phase. • All nodes should have the same capabilities, which increase the cost of the network. Also, adopting the DSSS technique increases the complexity and cost of the hardware.
During the past two decades, more than 80 successors of LEACH protocol [5, 35 37-39] have been developed to address previous problems. These protocols can be classified according to their objectives, as shown below: Centralized clustering approach is introduced to address the limitations of probabilistic CH selection. The sink carries out the CH selection after collecting necessary information from the nodes at the beginning of each round. It produces a fixed number and well-distributed clusters over the network. The well-known examples of this category are LEACH-C [40], P-LEACH [41], and many others. However, providing all sensor nodes with a GPS increases energy consumption and the network's cost. Also, collecting information about the nodes by BS increases communication overhead, which results in relatively low energy efficiency.
Fixed number of clusters is proposed in Time Based-LEACH (TB-LEACH) [42] and LEACH-MAC [43] to produce a fixed number of clusters. At the beginning of the round, each node initiates a timer with a random interval. When the timer expires, if the number of receiving ADV messages is less than the desired number of CHs, the node announces itself as a CH and broadcasts an ADV message. After completing the selection of CHs, the rest of the algorithm is similar to LEACH.
Static clustering aimed to reduce the energy overhead of periodic re-clustering. The clusters are constructed once, and the role of CH gets rotated within the same cluster. LEACH-Fixed (LEACH-F) [44] is similar to LEACH-C, except that it uses static clustering. In LEACH one round (LEACH-1R) [45], the CH only changes when its energy drops less than some predefined threshold. However, these protocols are not adaptive to nodes mobility or topology change.
Attribute-based CH selection is suggested in several variants of LEACH protocols [46][47][48] to overcome the premature death of CHs. Thus, the nodes with better resources than other nodes will have more chances to become CH.
Fault-tolerant clustering protocol aims to solve the problem of CH failure during the steady-state phase. In vice-LEACH (V-LEACH) [52], each cluster has a primary CH and a vice-CH, which takes the role of the CH when the primary CH dies and thus the CH failure is avoided.
Energy harvesting LEACH [53][54][55][56] is proposed by some authors to extend network lifetime. A percent of nodes are equipped with a solar cell, and these nodes are given a chance to act as CH more times than normal nodes.
Recently, Adaptive Hierarchical MAC (AH-MAC) Protocol [30] is introduced as a multi-objective clustering algorithm aiming to overcome the limitations and drawbacks of the LEACH protocol. In AH-MAC, some nodes are equipped with energy harvesting devices, and the role of these nodes is defined before nodes deployment, that is, static clustering is created at the beginning of network operation. The CSMA access is adopted to overcome the limitations of TDMA schedule. Also, a pseudo Failure management At the beginning of next round Immediately synchronization with guard time is introduced to tackle clock drift problems and minimize overhead resulting from periodic re-synchronization between nodes and their CH. AH-MAC protocol has better performance over traditional LEACH protocol in energy consumption, network lifetime, and resource requirements. The behavior of AH-MAC is completely different from LEACH-based clustering algorithms in both setup and steady-state phases. Table 1 summaries the main differences between AH-MAC and LEACH-based clustering algorithms. However, two drawbacks are recognized in AH-MAC protocol. First, increasing traffic load degrades the network's performance because all CHs around the sink use the same slot to upload their data. Second, a predefined active time of CHs increases energy consumption at low traffic rates due to idle listening. In this work, an improved version of AH-MAC is developed to address these problems. The new version is called hybrid access and adaptive duty cycle clustering (HADC) protocol. It introduces two concepts: an adaptive duty cycle and hybrid scheme channel access. The details of these concepts will be explained in the upcoming sections.

Concepts of HADC protocol
As explained in the previous section, LEACH protocol has several drawbacks and limitations, and most successors address one of those drawbacks. In this work, HADC protocol [57] aims to solve many drawbacks of LEACH protocol, such as the overhead of periodic clustering, CH failure, tight synchronization requirements, limited coverage, and hardware requirements. To overcome these problems, several concepts are introduced and combined in a single protocol. These concepts are; heterogeneous energy nodes, static clustering, efficient topology management, adaptive duty cycle, hybrid channel access, multi-hop communication, and pseudo synchronization. The details of these concepts are shown below: 3.1.1 Heterogeneous nodes and static clusters HADC protocol supports two levels of energy heterogeneity. A fraction of advance nodes is assisted by an energy harvesting device with sufficient storage capacity. The role of CH is assigned to these nodes throughout the network lifetime. Thus, two advantages can be achieved. First, the overhead resulted from periodic re-clustering is eliminated, and a considerable amount of energy is saved. Second, the majority of nodes in the HADC protocol are battery-operated with limited hardware resources. This contributes to reducing the hardware requirements, and the extra cost of harvesting circuits can be compensated by reducing the cost of normal nodes.

Adaptive duty cycle CH
The time axis is divided into the repetitive frames, and each frame is further divided into slots. Each CH is allocated a slot within the frame. Since the traffic rate in many WSNs is sporadic and relatively low, keeping CH active throughout this slot may contribute to increasing energy waste due to idle listening. Therefore, the CH's active time is adjusted according to the level of traffics within the cluster. At the beginning of each slot, the CH remains on, and if an activity is detected, it gradually extends its active time until the entire slot is utilized. Otherwise, the CH goes to sleep at the rest of its slot. This scheme contributes to conserving a considerable amount of energy because CH's active time is directly proportional to the communication activity within the cluster.

Minimum node's functionality
Normal nodes do not participate in CH selection, and their functionalities are minimized and limited to uploading their data packet to their corresponding CHs. Each node is aware of its parent CH's wake-up schedule, and guard time is used to overcome the problem of clock drift. Thus, each cluster member wakes up only when new data is available. This scheme releases the nodes from the liability of tight synchronization required by traditional clustering algorithms. Also, it minimizes the duty cycle of nodes because they wake up only when they have data to send. Since the traffic load in many WSN applications is sporadic and relatively low, the cluster members use the CSMA access method instead of TDMA-based channel access.

Network model and operation
The network consists of the sink, CHs, and many nodes. The sink and CHs have the same communication range (R). The protocol divides the network area into concentric circles called layers. The radius of these layers is R, 2R, 3R, and so on. The CHs in the first layer communicates directly with the sink, and they assigned to level 1. The CHs in the second layer are assigned level 2 and forward their data to the sink through CHs in level 1. Each CH uses the distance from the sink (DFS) parameter to determine its layer. This arrangement simplifies the routing process with minimum overhead. The time axis is divided into repeated segments called frames, and each frame is subdivided into slots. The first slot is assigned to the sink, and the subsequent slots are assigned to CHs in level 1, as shown in Figure 1. At each instant, only one CH is active while all other CHs in the same level are in sleep mode.
HADC protocol operates in beacon mode. At the beginning of network operation, the sink sends a beacon packet in the first slot of the frame and waits to receive data from the CHs in level 1. Then it goes to sleep until the beginning of the next frame. In the second slot, the CH1 sends a beacon packet. CH2 uses the third slot, and so on. The same slot can be reused and may be assigned to CHs in higher layers. During each slot, the cluster members wake up to upload their data, and the CHs at a higher level may wake up to forward their buffered data through this CH. Thus, each CH wakes up in its slot to send a beacon packet and receives data packets. Also, it may wake up in the slot of its parent to upload its buffered packets. This mechanism of nonoverlapped cluster operation has two advantages: 1. It prevents beacons collision and cluster interference. At any instant, only one cluster is active while other clusters in the vicinity are in sleep mode. 2. It reduces hardware requirement and energy consumption because the DSSS technique is no longer needed.

Setup phase
When a CH is switched on for the first time, it initiates a timer with a period equal to the frame length and turns its radio on to locate the best parent toward the sink. It may receive multiple beacon packets from different sources, and the CH with a minimum DFS is selected. If two parents have the same DFS, the nearest one will be chosen. When the timer expires, the CH waits for its candidate parent's next wakeup to request slotassignment. Accordingly, the parent responds by assigning an available slot in its frame to the new child CH, and registers it as a new member in the cluster tree. After completing the slot assignment, the new CH will wake up in its designated slot and starts sending a beacon frame with its new DFS (DFS parent + 1). This process is repeated for all CHs in the network. The question raised here, what happens if the parent CH does not have a free slot in its frame. The request is rejected, and the scan process should be repeated. Since the scan process is energy and time consuming, a mechanism is required to avoid this situation. Therefore, the status of the CH is included in the header of the beacon packet. The ACCEPT-CH field indicates whether the CH has a free slot or not, and this bit is checked by the CH that performs the scan to decide which parent it can associate with it. During the scanning process, the parent is selected if the ACCEPT-CH is set, and the parent CH has a minimum DFS. Otherwise, it is ignored. The flowchart presented in Figure 2 illustrates how the CH joins the network. This mechanism combines two processes in a single step; the CH joins the network and establishes a route path toward the sink in the same phase. Normal nodes use the same procedure of the CH to join the network with two exceptions. First, the node selects the nearest CH based on the RSS of the received beacon. Second, the association process is combined implicitly in the first data packet transmitted to the CH. After the nearest CH is selected, the node goes to sleep and wakes up precisely before its parent's wakeup and waits to receive a beacon packet from its CH. Upon receiving the beacon, it starts executing the CSMA algorithm to win the channel access and transmit its data packet. When the CH receives a new node's data packet, it records it as a new member or rejects the association through an ACK packet, which is mandatory after transmitting the first packet. It has a dual function; it informs new members that it is successfully registered in the cluster, and it also conveys network parameters to the member such as sensing rate, frame length, an aggregation level. The reject ACK is transmitted when an erroneous packet is received or the cluster size already reaches its maximum limit. Therefore, another bit (ACCEPT-NODE) in the beacon packet's header is required to indicate CH's ability to handle new members. When the cluster size reaches a certain threshold, the CH reset this field, and the nodes will ignore this CH during the scanning process. After successfully transmitting the first packet, the node goes to sleep. Each node is virtually synchronized with its parent, that is, it knows its CH's sleep/wakeup schedule, and it wakes up only when it has data to send. Since the node may remain in sleep mode over several frames, a guard time is used to evade the clock drift problem.

Hybrid channel access
In the original AH-MAC protocol, all CHs in level 1 use the first slot in the frame to transmit their data to the sink. This situation may overwhelm the sink due to high contention among  CHs on the first level. Therefore, an improvement is suggested to alleviate the load on the sink by scattering this load over the entire frame. The modification exploits the concepts of nonoverlapped operation of clusters and the adaptive duty cycle of CH. As explained earlier, only one CH is active in each slot while all nearby CHs are in sleep mode. Thus, the CH can use its slot to send its buffered packets to sink without any contention. When the CH detects no activity, it utilizes the remaining time of its slot to transmit the collected data to the sink directly before entering the sleep mode. Adopting this scheme gives the CHs around the sink two opportunities to upload their packets to the sink either in its slot using direct transmission or in the slot of the sink using the traditional CSMA method, as shown in Figure 3. We called this method of channel access a hybrid scheme. The proposed access method has three advantages. First, it reduces the contention among CHs nearby the sink and consequently reduces the collision rate and improves the packet delivery ratio. Second, it reduces packet delay because some packets are delivered to the sink immediately after they received by the CH. Third, it reduces the energy consumption of the network. Table 2 compares the three different access methods. The hybrid method combines the strengths of CSMA and TDMA methods while minimizing or eliminating their weaknesses. It inherits CSMA's flexibility in handling topology change and energy consumption while it outperforms it in collision probability and latency. The most important feature of the hybrid method over TDMA is the reduced packet delay. In almost all clustering algorithms, the CH transmits the collected data from its members at the end of its frame, while in HADC, the CH can transmit the collected data within the same frame, which reduces the latency significantly.

Steady-state phase
Each node is virtually synchronized with its parent, that is, it knows its CH's sleep/wake-up schedule. Therefore it wakes-up only when it has data to send. Since the node may remain in sleep mode over several frames, a guard time is used to evade the clock drift problem. This mechanism contributes to minimizing the duty cycle of the normal nodes. On the other hand, the CH fully controls its active time depending on the communication activity. Thus, both nodes and CHs adopt a dynamic duty cycle, depending on the application requirements. This feature makes HADC protocol suitable for both periodic and sporadic traffics.
To further explain the protocol operation in the steady-state phase, we present a simple example shown in Figure 4. The members of each cluster are synchronized with their CH and wake-up only in the active time of their parent CH if they have data to send. The cluster members and the active time of the first cluster are shown in green color. The CH1 turns its transceiver on at the beginning of its time slot and transmits a beacon packet informing its members they can transmit their data. The members contend to access the channel using the CSMA algorithm. Assume the node N1 wins the channel access; it initiates packet transmission while other nodes postpone transmission until the current transmission is over. Then, they contend again, and another node will win the channel access. This process will be repeated until all transmissions are accomplished or the active time of CH is elapsed. If the length of active time is insufficient to transmit all data packets, the remaining nodes should wait for the next frame to resume their transmission, which results in a longer packet delay. Since the cluster members might have the same sensing rate, this issue will be repeated. The previous situation can be avoided by distributing the transmission schedule of cluster members over several frames to decrease contention. The solution to this issue is to reset the sensing timer whenever a packet is successfully transmitted with a normal delay. To clarify this point, assume the node N5 detects a busy channel several times; it will postpone its transmission to the next frame, and after a successful transmission the sensing timer is re-initialized, which resulted in avoiding the crowded slot.
The CH1 checks the traffic status at the end of each sub-slot. If one or more packets are received, the CH remains active. Otherwise, it either transmits the collected data to the sink directly or goes to sleep when no data is received, and it will wake-up again in the next frame. On the other hand, if the CH remains active during the entire slot due to heavy traffic and no time is available to transmit the collected data to the sink, it should wake up in the sink's slot and contend with CH2 to send data to the sink using CSMA. It is worth mentioning that during the active time of CH1, all other CHs and their members are in

HADC versus AH-MAC
Both AH-MAC and HADC behave the same in the setup phase, and the only difference between them is CH's behaviour in the steady-state phase. The CH in AH-MAC remains on during its time slot regardless of traffic status in the cluster, and it goes to sleep when its active time is elapsed. The CH should also wake up in the slot of the sink and compete with other CHs to transmit its collected data to the sink using the CSMA algorithm. Therefore, under high traffic load, the contention among CHs is increased, which results in a higher collision rate, lower throughput, and longer delay. Besides, the energy consumption of CH is held constant. These issues are addressed in HADC by introducing variable slot time and hybrid access method. Unlike AH-MAC, the CH in HADC adjusts its active time dynamically according to intra-cluster traffic status, and it can enter sleep mode early if no traffic is detected for some time. This mechanism contributes to a dramatic reduction in CH's energy consumption. Another improvement is applied by utilizing the slot's remaining time to upload its data directly to the sink without any contention because it is the only awake CH at that moment. Under full load, when the CH remains active throughout the slot, it should wake-up in the sink's slot to upload its data. The main differences between both protocols are summarized in Table 3.

Fault management
The nodes in the WSN are susceptible to failure due to different reasons such as hardware fault, running out of energy, harsh environmental conditions etc. When a CH's energy is depleted, it stops working and waits for the energy storage to be replenished by the harvesting circuit. Then, it joins the network again as a new CH. Therefore, a mechanism is introduced to address topology change due to CH failure. The connected nodes and CHs respond to this fault by selecting an alternative parent using a new scan process. When a CH/node fails to receive a prespecified number of consecutive beacons from its parent, it initiates a new scan process, and during it, if a beacon is received from the same parent, the scan process is terminated, and the CH/node proceeds with data transmission. Otherwise, the scan process is continued, as explained previously.

Energy profile of HADC protocol: Mathematical analysis
Each node consumes energy in both setup and steady-state phases. The energy consumecomplexity and cost of the hard during the setup phase (E scan ) is determined by: where P rx is the power consumed in receiving mode, while T scan is the scan period. Energy consumption in the steady-state phase depends on the transceiver's time to accomplish packet transmission. The energy required to transmit one packet (E pkt ) in a collision-free environment is determined by: where P tx is the power consumed in transmitting mode, T a (cw) is the average period of contention window, T g is guard time, and T bcn , T data , T ack are transmission time of beacon, data, and ack packets, respectively. Equation (3) can be re-written as: where T active is defined as the time required to transmit one packet, and it is computed by: Equation (3) shows that the transceiver is in receiving mode most of the time when it is active. Therefore, P active is very close to P rx , and Equation (4) can be approximated to: The total energy consumed by the node (E node ) during its lifetime can be estimated by: where n is the number of times the node lost the connection with its parent, and N pkt is the number of transmitted packets during node's lifetime. The duty cycle (D) of the node can be computed using the following equation: where T is node's lifetime. In long term operation, initialization cost can be ignored, and Equation (8) can be simplified to: where T pkt is the inter-arrival time between two generated packets and it is equal to The energy consumption of a CH is hard to estimate because it depends on several factors, such as slot length, traffic load, cluster size etc. Since the active time of CH is variable and depends on the traffic load, the range of energy consumption is estimated. The minimum energy consumed (E min ) by CH in one frame with zero cluster size can be determined by: Maximum energy (E max ) is consumed when the CH remains active throughout the entire slot length. E max consists of two parts; the energy consumed by the CH in its slot, and the cost of uploading its data to the parent node.
The range of CH power consumption can be computed by dividing Equations (10) and (11) by frame length (T f ).

Simulation setup
Network Simulator NS-2 version 2.35 is used to evaluate the performance of AH-MAC and HADC protocols. The network consists of a single sink resides at a corner of the square area, five CHs are deployed uniformly, and 95 nodes are randomly deployed. Table 4 lists simulation parameters. The frame length is set to 1 s and divided into 16 slots, which is divided into four sub-slots with 7.5 ms guard time. The transmission power of the sink and CHs is set to 1 mW. The packet inter-arrival time varies between 15 s and 480 s (0.125 pkt/min to 4 pkt/min). The simulation time is set to a 10800 s, and each scenario is simulated at least 50 times. Throughout this evaluation, it is assumed that the CHs have unlimited energy to estimate the required energy for perpetual operation.

Simulation results
Tables 5 and 6 demonstrate the performance of AH-MAC and HADC protocols against different packet rates. The results highlight impact of network traffic on delivery ratio, energy consumption, packet delay, and duty cycle. The results are visualized in Figure 5 to simplify the comparison between both protocols. Table 5 shows that the high traffic load increases the collision rate and reduces the delivery ratio. This because all cluster members use the same slot to upload their data, which increases the FIGURE 5 Performance comparison between HADC and AH-MAC protocols contention among them. Also, higher traffic increases energy consumption and packet delay. When some nodes fail to upload their data in the current frame, they wait for the next frame to resume the transmission. Therefore, these packets experience a delay longer than frame length. To avoid long delay, the sensing timer of the nodes is adjusted to prevent the transmission within the same frame in the future. Comparing the performance of both protocols, shows that HADC outperforms AH-MAC protocol in great margin due to the following reasons: 1. Hybrid channel access alleviates the load on the sink, reducing the collision rate and ultimately improving the delivery ratio by up to 20%. 2. Since the CH forwards many packets to the sink in the same slot; the hybrid scheme reduces the average packet delay to 0.078 s against 0.209 s in AH-MAC protocol. 3. The adaptive duty cycle adopted in HADC successfully reduces CH's energy consumption by up to 73%. This reduction in CH energy contributes to reducing the cost of the harvesting circuit without affecting network performance.

Mathematical analysis versus simulation results
In this section, the simulation results are validated by comparing it with the mathematical analysis presented in Section 3.8. The lowest traffic load is considered (0.125 pkt/min) because it is difficult to compute the node's precise active time under high traffic load. Using Equation (8) to estimate the duty cycle of the node yields 0.0116% which is very close to 0.011% presented in Table 6. However, the actual duty cycle is much lower than this value. If Equation (9) is used to determine the duty cycle in long term operation by ignoring the setup cost, it yields 0.0024%. Applying the same comparison on node's energy consumption, Equation (7) yields 0.115 J in mathematical analysis against 0.114 J in simulation.

Comparison with LEACH protocol
To accentuate the features of HADC against other clustering algorithms, its performance is compared with well known LEACH protocol. Each CH in all LEACH-based clustering algorithms keeps its radio on throughout the entire round without considering the level of traffic within the cluster. Therefore, when LEACH protocol is simulated as proposed in the original paper, the LEACH's energy consumption is at least fifteen times higher than the HADC protocol. In this work, the TDMA schedule is changed so that the CH remains active only when the cluster members have data to send, which is the best possible implementation of the LEACH protocol. Then, both algorithms are simulated for 3 h, and the results of both protocols are presented in Table 7. HADC outperforms LEACH by a great margin. HADC reduces energy consumption by 111%, and the latency is reduced to 0.078 s against 0.284 s in LEACH. The critical parameter that should be considered in this comparison is the energy consumption of the nodes in both protocols. HADC successfully minimizes the node's energy consumption at the expense of increasing the energy consumption of CH. However, the energy consumed by the nodes in the LEACH protocol is approximately equal because all the nodes play the same role.
The network lifetime of both protocols is examined considering the death of the first node due to running out of energy. The initial energy of the nodes is set to 0.5 Joule except the CHs in HADC as explained previously. Figure 6 shows that the death of the first node in HADC protocol occurs at 6965 s against 287 s in the LEACH protocol. This because the nodes in HADC protocol do not act as CH and their role is limited to upload their data to the CH. However, the nodes in LEACH protocol play different roles and experience significant energy wastage due to periodic re-clustering, and the CHs consume extra energy. This energy overhead depletes the node's energy at a faster rate. The lifetime of the node in HADC protocol is extended 24 times over the same node in LEACH protocol.
Finally, both protocols are compared in terms of their coverage area. The performance of both protocols is compared under different coverage areas. Figure 7 shows the ability of HADC to span across a much larger area without affecting network performance. The transmission range of CHs limits the coverage area in the LEACH protocol. When the network area is increased, some nodes are isolated from the network because they cannot reach the sink, which worsens when the coverage area is increased. On the other hand, multi-hop communication in HADC contributes to maintaining the connectivity

EXPERIMENT-BASED PERFORMANCE EVALUATION
The simulation phase is an essential step in the validation process. The accuracy of the results is highly dependent on the accuracy of the modelling. However, most simulators cannot reproduce the actual conditions of the real-world environment. As a result of this, almost all simulators cannot guarantee accurate results due to simplified assumptions. Therefore, experiment-based evaluation with real hardware is essential to cross-verify the simulation results. Also, it enables the designers to avoid unrealistic assumptions in the simulation environment. Moreover, it shows whether the proposal can be implemented on nodes having limited resources hardware.
The developers have two options, use an open testbed or use their own designed testbed. The authors in [58] showed that 91.3% of the researchers set up their testbeds. In our experiment, a custom node is used. It consists of TI-MSP430FR6989 microcontroller [59] and CC1120 transceiver [60] from Chipcon. These components are compatible with each other, and they can be connected without needing any extra components ( Figure 8).

Experiment setup
Three different application software is written for three types of nodes. The internal temperature sensor of the microcontroller is used instead of an external one to fulfil the requirement of a real network. Three performance metrics are measured: energy consumption, packet delay, and delivery ratio. The first metric is measured by code composer studio (CCS) software while the sink node computes other metrics. Instead of sending actual data, the node sends its statistical parameters (number of generating packets and transmission attempts) to enable the sink to compute the delivery ratio accurately.

Average energy consumption
The experiment is commenced considering a simple network scenario to measure the energy consumption of the node. The network consists of a sink, CH, and a single node. During the experiment, the transmission power is set to 0 dBm (1mW), and the packet arrival time is changed between 15 s and 240 s. The CCS software is used to monitor the node's operation and measure the node's energy consumption precisely. Table 8 presents energy consumed by the node for a five-minute operation under different traffic loads, and Figure 9 shows the power profile of a node transmits four packets per minute. The energy presented in Table 8 represents the total energy consumed by the node, that is, the energy consumed in setup and steady-state phases. If the energy cost of the setup phase is subtracted, then the difference represents the energy consumed by the node in the steady-state phase. Thus, the actual energy consumption of the node in long term operation can be determined. The third row in Table 8 represents average power consumed by the node, excluding setup cost.

Simulation versus experiment
The comparison between experiment and simulation results is achieved by simulating the same network and running it for five minutes to mimic the experimental conditions. The difference between both validation methods is shown in Figure 10. Surprisingly, the experiment results are better than the simulation results. To understand this inconsistency, the following points should be considered: 1. The maximum current of the transceiver in the receiving mode is considered by the simulator, while the real value may be lower. The typical value in the data-sheet is 22 mA, while the measured value in the experiment is about 20 mA. 2. The energy cost of sensing is not considered in the simulation. This assumption is valid because the sensing unit's energy cost is about 1.5 J for each reading against approximately 600 J for packet transmission. 3. With the aid of timers and interrupts, the processor remains in sleep mode most of the time. It is noticed that the duty cycle of the processor is lower than the transceiver's duty cycle. 4. In high traffic load, the dominant energy is that consumed by the transceiver while the energy consumption of processing and sensing units can be ignored. At a low traffic rate, the energy of these units is significant and should be considered. However, the simulator considers only the energy in sleep mode. Therefore, the energy consumption achieved by the simulator at a low packet rate is less than that achieved in the experiment.

CC1120 low power mode
The CC1120 transceiver chip can be configured to operate in two different receiving modes; high-performance and lowpower. In previous experiments, the chip operates in the high- performance mode, which draws high current in receiving mode (typically 22 mA). According to TI official site, the power consumption of CC1120 in receiving mode can be reduced if the device is configured to operate in low power mode at the expense of slightly higher phase noise, which is not detectable in most applications. After configuring necessary registers in CC1120 with new values and repeating previous experiments, the node's energy consumption is further reduced, as shown in Table 9.

Network lifetime
The lifetime of the node is estimated assuming that each node is supported by 2×AA batteries of 3000 mAh capacity. The calculation of the node's lifetime considers three factors; average power consumption, self-discharge rate of the battery, and the rate of connection lost between the node and its CH. It is assumed that each node loses the connection with its parent once every 2 h. The discharge rate of the battery is set to 3% per year. The estimated lifetime is about 15 years if the node transmits four packets per minute. The power consumption of CH is more critical because it defines the requirements of the harvesting circuit, such as the required storage capacity and harvesting rate needed for uninterrupted operation. The power consumption of CH is measured under different traffic loads ranging from minimum cluster size to full load operation. These measurements are achieved by varying the active time of CH ranging from single sub-slot to entire slot. The energy and power consumption of the CH versus different active times is shown in Table 10. The lifetime of CH powered by the same energy source of the node is ranged from 110 to 472 days. Considering the worst case when the CH remains active throughout the entire slot length, the required energy per day is about 281 Joule. If a fully charged supercapacitor of 500 Farad is used as a storage device, the CH can continuously be running for 6 days without needing to be replenished under full load condition.

5.2.5
Performance evaluation of real network In the last step of experiment-based performance evaluation, the network topology is shown in Figure 11 is used. The network consists of the sink, CH and five nodes. Two computers are used to monitor and measure the energy consumption of the CH and a node. Sink node is used to determine packet delivery ratio and average packet delay, while CCS software is used to measure energy consumption. Table 11 presents the result of network performance for 1 h operation repeated several times. Since the cluster size is small (5 nodes), the CH is lightly loaded, which results in low contention  Figure 11 for 1 h operation

Metric Value
Node power ( W) 48 CH power (mW) 1.0 Average delay (ms) 41 Delivery ratio (%) 93-99% among nodes. The CH in most frames has an opportunity to forward the received packets to the sink in the same slot, which reduces the average delay to 41 ms. The node's lifetime in this network scenario is about 14 years. It is worth mentioning that the delay reported by the simulator in Table 6 is longer because high contention compels the CH to upload some of the pending packets during sink's slot. Therefore, the average packet delay is increased to 80 ms.

CONCLUSIONS
In this paper, a new clustering algorithm called Hybrid access and Adaptive Duty-cycle Clustering (HADC) protocol is proposed aiming to enhance the performance of previously proposed AH-MAC protocol. The main objective of this protocol is to overcome the limitations in current clustering algorithms designed for wireless sensor networks. HADC protocol is designed with several goals in mind. These goals include longlasting operation, satisfactory performance in different network scenarios, and minimum cost. Several concepts are suggested to achieve previous goals; heterogeneous nodes and static clusters, adaptive duty cycle, hybrid channel access, and non-overlapped clusters. The resulted network has the following features: 1. A static clusters eliminate the effect of periodic re-clustering and ultimately conserve a considerable amount of energy. Besides, it contributes to reducing the network cost because the majority of the nodes require fewer hardware requirements than CH nodes. 2. Adaptive duty cycle reduces the energy consumption of CHs dramatically as compared with AH-MAC protocol. 3. Hybrid access method dramatically improves the performance of the network in terms of energy, delay, and delivery ratio. 4. Pseudo synchronization releases normal nodes from liability of tight timing synchronization and maximizing their sleep period, which results in more energy reduction. 5. The non-overlapping clusters prevent interference among nearby clusters. Therefore, a costly CDMA technique can be avoided. 6. Topology management can be handled immediately while in most clustering algorithms, topology change is handled at the beginning of next round.
The resulted network has many features such as longevity, low delay, self-configurable, scalability, and fault tolerance. The features of HADC protocol makes it a right candidate for a wide variety of low traffic sensor network applications, such as environmental monitoring, body area network, and alarm systems. To the best of our knowledge, HADC protocol is the first clustering algorithm designed for low rate WSN applications. Further work can be done to use a distributed algorithm for slot assignment. Also, the duty cycle of CH in current version depends on the traffic load within the cluster. Further research is needed to include residual energy of the CH as a second parameter to achieve energy-neutral operation when the power from the harvesting source is not available for a long time.