Sleeping Cluster based Medium Access Control Layer Routing Protocol for Wireless Sensor Networks

: Wireless sensor networks play a vital role in remote area applications, where human intervention is not possible. In a Wireless Sensor Network (WSN) each and every node is strictly an energy as well as bandwidth constrained one. Problem Statement: In a standard WSN, most of the routing techniques, move data from multiple sources to a single fixed base station. Because of the greater number of computational tasks, the existing routing protocol did not address the energy efficient problem properly. In order to overcome the problem of energy consumption due to more number of computational tasks, a new method is developed. Approach: The proposed algorithm divides the sensing field into three active clusters and one sleeping cluster. The cluster head selection is based on the distance between the base station and the normal nodes. The Time Division Multiple Access (TDMA) mechanism is used to make the cluster remain in the active state as well as the sleeping state. In an active cluster 50% of nodes will be made active and the remaining 50% be in sleep state. A sleeping cluster will be made active after a period of time and periodically changes its functionality. Results: Due to this periodic change of state, energy consumption is minimized. The performance of the Low Energy Adaptive and Clustering Hierarchy (LEACH) algorithm is also analyzed, using a network simulator NS2 based on the number of Cluster Heads (CH), energy consumption, Lifetime and the number of nodes alive. The simulation studies were carried out using a network simulation tool NS2, for the proposed method and this is compared with the performance of the existing protocol. The superiority of the proposed method is highlighted.


INTRODUCTION
A Wireless sensor network consists of 100s or 1000s of tiny sensor nodes, which have sensing, processing and transmission capabilities. Each and every node is powered by a small battery. So, each node is strictly power constrained one. As long as the power is there, each node will be involved in all the three functions of sensing, processing and transmission. If any node depletes its energy, it will become an unattended node and there may be network partition or no transmission of data from that particular node. The wireless sensor network's lifetime depends mainly on the energy in each node. Of the three functions, data transmission takes more energy. Energy for transmitting data involves the energy required for sending, receiving, packet size, interference and so on. So energy consumption in wireless sensor networks becomes a crucial point to improve the lifetime of the network (Al- Karaki and Kamal, 2004;Akkaya and Younis, 2005;Akyildiz et al., 2000). In a traditional WSN, all the sensor nodes and sinks are assumed to be static. In many of the applications node mobility plays a vital role to reduce the energy consumption in the network. Generally, there are three energy conservation schemes, named as duty cycling, data driven and mobility based (Anastasi et al., 2009). Duty cycling mainly focuses on energy conservation in networking subsystems by switching ON/OFF the radio transceiver, when the data is ready or not. In this way, a node can alternate between the sleeping and active state, depending on the network activity.

Classification of energy conservation mechanisms for wireless sensor networks:
In WSNs, multiple sources will measure the parameters from the environment and the same should reach the base station, using single or multi hop communication, as soon as possible. The WSN architecture, as well as the energy efficient routing scheme should guarantee uninterrupted network connectivity, which will minimize the energy consumption. In most of the remote area applications when the WSN node depletes all its energy, replacement of the power source is not possible and it may also be an inefficient one. The sensor node lifetime mainly depends on the battery lifetime (Akyildiz et al., 2002). Figs. 1 and 2 shows the taxonomy of energy conservation schemes in sensor networks.
Nodes that are not currently needed for ensuring connectivity can go to sleep and save energy. Finding the optimal subset of nodes that guarantee connectivity, is referred to as topology control. In power management, active nodes do not need to maintain their radio continuously on. They can switch off the radio and enter into a low-power sleep mode when there is no network activity, thus alternating between sleep and wakeup periods. Depending upon the application, sleep/wake up protocols could be used separately or in connection with MAC protocols. The independent Sleep / Wakeup protocols are further divided into on demand, scheduled rendezvous and asynchronous schemes. The main problem with on demand schemes is how to inform the sleeping node that some other node is willing to communicate with it. Some schemes use multiple radios with energy /performance tradeoffs like low-rate and low power radio for signaling and a highrate but more power radio for data communication. In low power, the radio operates at 915 MHz (ISM b and) and has a transmission range of approximately 332 ft. in free space, while the IEEE 802.11 WLAN card operates at 2.4 GHz with a transmission range of up to 1750 ft. The two main drawbacks are increase in cost due to multiple radios and a mismatch between the coverage of the two radios. In the rendezvous scheme, a node will wake up at the same time as that of its neighbor. Nodes will wake up during the specified slot and remain active for a short time to communicate with their neighbors and again go in to the sleep mode until the next rendezvous time. Node synchronization is mandatory to send broadcast messages. The main drawback is that all nodes become active at the same time after a long sleep period. Therefore, nodes try to transmit simultaneously, thus causing a large number of collisions. In addition, the scheme is not very flexible, since the size of the wakeup and active periods is fixed and does not adapt to variations in the traffic pattern and /or network topology. In asynchronous protocols, nodes can wake up at any time and remain in the same state, till they want to communicate with their neighbors.

Study of MAC protocols with a low Duty Cycle: Energy related problems in MAC:
There are four problems related to energy in the MAC layer. They are, Collisions: Collision occurs when two or more sensor nodes start transmission at the same time.It leads to data loss and retransmission. Due to the retransmission of corrupted data, energy gets wasted.
Over hearing: In this a sensor node will start receiving the data which is not intended for it. The sensor nodes will start listening to the medium always and receive the data frames which are intended for it and start decoding them also. To reduce the energy consumption, nodes could switch off their radio.

Idle listening:
The sensor nodes switch ON their circuits always and start receiving the data even though there is no data to transmit. This problem could be reduced by keeping the radio in the sleep mode.
Protocol overhead: It is due to the transmission and reception of the control packets. These packets are helpful in the reliable transmission of data. Even though it is helpful, it leads to an overhead. So, to avoid the transmission cost, control messages and long headers in frames could be avoided.
In the TDMA scheme, the nodes will turn on their radio only during their own slots. Some of the TDMA protocols (LEACH, TRAMA, PAMAS, LMAC) are complex and not flexible. They have limited flexibility and scalability. In a real sensor network, frequent changes in the topology may occur due to channel conditions, node failures so the slot allocation becomes a problematic one. It requires proper time synchronization and they are more sensitive to interference. A contention based protocol combines channel access functionalities with the sleep/wake up mechanism. These protocols are robust and scalable and adapt to change in traffic conditions due to low delay. Energy conservation is high when compared to the TDMA mechanism, due to contention and collision. The hybrid protocol behaves like a contention based protocol when the contention is low and switches to the TDMA scheme when the contention is high. Gao et al. (2011) proposed a method which uses synchronous sleeping/waking up mechanisms for small scale wireless sensor networks. In this mechanism, the sensor nodes are divided into forwarding nodes and listening nodes. The beacon frame (IEEE 802.15.4) will be sent to the listening nodes via the forwarding nodes, so that all nodes in the network will enter into the sleep mode at the same time. A power control scheme based on the routing protocol uses optimal transmission power according to the distance between the neighbor nodes. While building a route, a mapping table consisting of the node address and the optimal transmission power, is used. Since it is implemented on the MAC layer and integrated with the routing layer, it does not lead to network overhead. Pantazis et al. (2009) proposed a TDMA-based scheduling, that balances energy saving and end-to-end delay. Energy saving is achieved by a proper wake-up interval scheduling mechanism and the data packet transmission will be delayed from the sensor nodes to the gateway only by an one sleep interval. It works well for the sensor networks having a low traffic generation rate. Kaur and Mahajan (2011) and Ghosh et al. (2009) introduced different types of MAC protocols and proposed a new medum access control protocol S-MAC, for wireless sensor networks. The new S-MAC is designed in such a way as to reduce the energy consumption and improve self organization. This protocol avoids the need for some nodes to stay awake for a longer period when compared to other nodes. Due to this, the energy efficiency, latency and throughput get increased, which increases the life time of the wireless sensor network. It is proposed, that when establishing a connection between isolated virtual clusters due to the introduction of a new node in the common neighborhood of the clusters, merging of clusters takes place and they will follow any one of the time schedules. The nodes can increase their duty cycle by adding extra active slots during heavy traffic and the same could also be removed when the traffic is low, by introducing active schedules in the middle of the sleep period.

Design of the proposed algorithm:
The proposed method is derived from the schedule-based TDMA MAC protocol, called Low Energy Adaptive Clustering Hierarchy (LEACH). This protocol (Karl and Willig, 2007) is organized into rounds, which contain two phases, namely the setup phase and the steady state phase as shown in Fig. 3 and the subsequent explanation.
Set up phase: • Self election of cluster heads.
• Followed by the advertisement phase where the cluster head informs the neighbors of an advertisement packet • Cluster head contends for the medium using the CSMA mechanism. • The non cluster head picks the advertisement packet with the strongest received signal strength • Using a CSMA protocol the cluster member informs the cluster head by sending the 'join' request during the cluster set up phase. Now the cluster head knows about its member and its identifiers. • During the broadcast schedule, the cluster head broadcasts the TDMA schedule and picks a CDMA code randomly.

Steady state phase:
• TDMA time slots will be allocated to each of the cluster member by its cluster head

Problems related to LEACH Protocol:
• Collision is possible with advertisement and joins packets Based on the problems with the LEACH protocol, we propose a new algorithm which will consume less energy. In the proposed algorithm we have three different phases, namely, cluster formation, data forwarding and the state transition phase as explained below.

Cluster Formation phase:
• Divide the sensing field into four clusters, having three active and one sleeping cluster at a time • Select the cluster head based on the distance between the base station and the normal nodes. • In each active cluster make 50% of the nodes to be active and 50% of the nodes sleep • The cluster head is responsible for assigning and managing the TDMA schedule for its cluster member • The cluster head is responsible for the transmission and reception of data from/to the base station • Before sending the data to the base station, the residual energy of each cluster head and the distance to the base station will be broadcast to the neighboring cluster head • Inter cluster communication is established by finding the shortest route to the destination based on the residual energy of the cluster head State transition phase: • During this phase, the state transition will occur, i.e., one of the active clusters will enter into the sleep mode and the remaining three will act as active clusters as shown in Fig. 5.

Implementation:
The implementation phase of the proposed method comprises of three phases, namely, cluster formation, data forwarding and state transition as shown in Fig 4. Cluster formation phase: After dividing the sensing field into four clusters, the Cluster Head (CH) selection is done on the basis of the distance between the base station and the node nearer to it from each cluster, as shown in Fig. 6. After the selection of the cluster head, the cluster head advertisement message (CH_ADV_MSG) will be broadcast by each cluster head. The normal nodes in the coverage area of each cluster head will send the JOIN_MSG to its cluster head. Now, each cluster head will come to know about its cluster member and its identification number. Out of 'n' number of nodes in each active cluster, n/2 number of nodes is made active and the remaining nodes are made sleeping nodes, based on the Time Division Multiple Access (TDMA) schedule, by the cluster head. In addition to this, one cluster is always kept in the sleeping mode periodically. It means communication between the cluster member and its cluster head. After selecting the cluster head, if the cluster member has any data to transmit, it starts transmission to the cluster head. If the energy level of that cluster head falls below the threshold, a new cluster head will be elected based on the node's residual energy from 50% of the active nodes in the active cluster. If not, the node having the maximum residual energy from the remaining 50% of the nodes which are in the sleep mode will be elected as the new cluster head and the transmission will continue.
Inter cluster communication: Before transmitting the data from a cluster head to the base station, each cluster head is responsible for aggregating the data from its members and then form a multi-hop path between the cluster heads and the base station because the routing is many to one. 1. A greedy geographic approach is used for selecting the shortest path between the cluster head and the base station 2. We used the following equations (Chen et al., 2009) for calculating the Communication energy dissipation. The free space (d 2 power loss) channel model is used, depending on the distance between the transmitter and the receiver. The energy spent for the transmission of the k-bit packet over distance d is given by (1) and (2) ET x(k, d) = kE elec + kd α = kE elec + kE fs d 2 , d < do (1) The electronics energy, E elec , depends on factors such as digital coding and modulation, whereas the amplifier energy, E fs d 2 depends on the transmission distance and the acceptable bit-error rate. To receive this message, the radio consumes energy as follows: Mean energy consumed by node 'i' is: ME i = e s + e g * r i + e r * r j + r i * e ij (3) where, e s is the energy for sensing, e g is the energy for generating the data, r i and r j are the rates of interference and e ij is the energy needed for transmitting the single bit data from the i th node to the j th node. Residual Energy (RE) is calculated as follows: where, E initial is the initial energy and ME i is the mean energy consumed by node 'i'. 3. Before selecting the next hop node, each cluster head broadcasts a short beacon message across the network, at a fixed power which consists of its node ID, residual energy and distance to the base station. 4. The distance between each pair of cluster heads can be calculated approximately according to the received signal strength. 5. A threshold value of TD_ MAX is used in the multi hop routing protocol. 6. If a node's distance to the base station is smaller than TD_ MAX, it transmits its data to the base station directly. Otherwise select one forwarding node based on its residual energy to forward the data to the base station. 7. Energy cost of path CH/S i --> CH/S j BS as shown in Fig. 7 is calculated by the formula given below. E FN (S i , S j ) = d 2 (S i , S j ) + d 2 (S j , BS) (Assume free space propagation model) Where, 'E FN ' is the energy level of the forwarding node and 'd' is the distance. 8. If CH/S i. RE < CH/S j. RE and the base station is smaller and CH/S i selects CH/S j as the Forwarding Node (FN) and is responsible for transmitting the data to the base station. 9. If CH/S j. RE < CH/S i. RE, then, CH/S i is responsible for transmitting the data to the base station.

To form a neighboring cluster head list
While CH / Si ' s neighbor CH list is not null do compute residual energy of the forwarding node E FN (S i , S j ) if CH/Si . RE < CH/Sj.RE then put S j into neighbor CH list else find out the forwarding node (Sm) whose residual energy(RE) is higher than that of CH/S i. RE end if end while In Fig. 6, CH4 collects the data from its cluster member and after processing, sends it to the base station directly, if the distance to the base station is minimum and the residual energy is more when compared to its neighboring cluster heads. If not, it finds that the neighbor Cluster Head (CH3) node has higher residual energy and the distance to the base station is also small, when compared to other neighboring CH nodes, it will choose the path CH4 CH3 BS and start transmitting the data.
State transition phase: During this phase one sleeping cluster will be made active after a period of time. To do this, the MAC TDMA frame structure is used. The IEEE 802.11 provides a mechanism for making the node to sleep. It has the power save mode to switch On/Off the radio of the sensor node, to conserve the power at the minimum level. The MAC TDMA frame structure is shown in Fig. 8. In this MAC TDMA frame Power Management field is used to set the mode of wireless sensor node. If the power management field is set to '1' then the node is in power saving mode otherwise, if it is set to' 0', then the node is active state.

RESULTS AND DISCUSSION
Simulation analysis: To illustrate the performance of the proposed method, discrete event network simulation tool NS2 is used with a network consisting of 50 nodes deployed in a square area of size 1000×1000 m. The initial energy (E initial ) of each node is assumed to be 5J. The simulation was carried out and analyzed for the following conditions: • All clusters active • Three clusters made active and one is in the sleep mode • 50% of nodes in active cluster be made active the remaining 50% be in sleep.
The energy model used and other parameter settings are given in a Table 1. In the simulation results number of clusters are not restricted to only 4, the results have been analysed by increasing the number of clusters and shown in Tables from 2-6 and figures from Fig. 9-13. for The simulation result shows that increase in simulation time increases energy consumption along with data transmission rate but decreases total number of nodes alive. In general increase in number of cluster head increases total energy consumed by the network, but with our proposed method, (3 clusters active, 1cluster in sleep mode and 50% of nodes be in active and 50% of nodes be in sleep in every active cluster) reduces energy consumption of network while all clusters are in active state and the superiority of this method is highlighted.

CONCLUSION
In this study we have proposed a new algorithm (for routing in wireless sensor networks) that supports two different types of clusters named as, active and sleeping. Here a multi hop network is taken for consideration, with a large number of nodes, where the data gathered by the cluster heads must be sent to the sink node. The Cluster Head (CH) selection will be done on the basis of the distance between the member and the base station at the beginning. After that, the cluster head selection will be done within the cluster, based on the residual energy. Due to the periodic change of the active and sleeping cluster, the energy consumption within the wireless sensor network gets reduced. The performance of the proposed method is tested for various scenarios, such as all clusters active, three clusters active and one in sleep mode, three clusters active with 50% of nodes in active and the remaining be in sleep mode, one sleeping cluster and the superiority of proposed method is highlighted. In future study, the same simulation environment could be used for analyzing the performance of the wireless sensor network with single and multiple mobile sinks under static and mobile environments.