Adaptive MAC Protocol with Effective TDMA Time-slot Assignment and CSMA Contention Window Adaptation for WSN

Wireless Sensor Networks (WSNs) have emerged to meet the multimedia requirements in new emerging applications. So it’s important for WSN to have an adaptive and energy-efficient TDMA-CSMA based MAC protocol which significantly reduces energy consumption of the network. Here, this study proposes an Adaptive MAC protocol with effective TDMA time-slot assignment and CSMA contention window adaptation for WSN. This approach mainly consists of two parts which are TDMA time-slot assignment and CSMA contention window adaptation. Through TDMA time-slot assignment it is possible for the receiver nodes to re-organize the timeslots among the sender nodes according to their accessible traffic load. Through CSMA contention window, the network can reduce the latency occurring between the nodes during the transmission.


INTRODUCTION
WSN: Wireless Sensor Network, an emerging technology has a large number of distributed nodes, each node with one or more sensors, embedded processors and low-power radios.The nodes organized themselves into a multi-hop wireless network, coordinate to perform a common task and normally battery operated (Ye et al., 2002).WSN has a wide range of potential applications like environment monitoring, smart spaces, medical systems, target detection and tracking, industrial process monitoring, tactical systems and robotic exploration (Ye et al., 2002;Demirkol et al., 2006).WSN nodes share the same communication medium and usually deployed in an ad hoc (Zheng et al., 2005).The hardware technology developments lead to low-cost sensor nodes having single chip with embedded memory, processor and transceiver (Demirkol et al., 2006).
Sensor nodes has limited coverage and communication range comparing to other mobile devices due to low power capacities lead to limited coverage and communication range.Therefore target tracking and border surveillance applications require the sensor nodes to include a large number of nodes to cover the target area successfully.The exhausted battery is hard to be charged/replaced unlike other wireless networks paying the way for maximizing node/network lifetime.The sensor nodes' communication consumes more energy than their computation so it is a need to minimize the communication while achieving the desired network operation (Demirkol et al., 2006).The sensor nodes usually battery operated and ignored after usage.Hence, power saving is a critical issue in wireless sensor networks (Zheng et al., 2005).

Need of MAC protocols in WSN:
WSN generally has to maximize the network lifetime as sensor nodes are assumed to be disposed when out of battery.Hence, the proposed MAC protocol must be energy efficient by reducing the potential energy wastes (Ye et al., 2002;Demirkol et al., 2006).Scalability to the change in network size, node density and topology is another attribute.There is a possibility of nodes to die over time, to join later or to move to different locations.The network topology varies with time as well for various causes.A good MAC protocol should easily accommodate such network changes.Other important attributes include fairness, latency, throughput and bandwidth utilization.These attributes are usually the primary concerns in traditional wireless voice and data networks, but secondary in sensor networks (Ye et al., 2002).The lower sensing ranges of WSNs leads to dense networks which needed to achieve an efficient medium access protocol subject to power constraints (Demirkol et al., 2006).Hardware limitations of WSN can be overcome by designing energy efficient communication protocols which achieve energy efficiency further (Yadav et al., 2009).

MAC protocol in WSN:
Medium Access Control (MAC) is a vital technique to ensure the successful network operation.One of the main functions of the MAC protocol is to avoid collisions from interfering nodes.Idle listening of the classical IEEE 802.11MAC protocol for wireless local area network leads to a lot of energy wastes.Power efficient MAC protocol can prolong the network life time.The medium access control protocols for the wireless sensor network have two objectives.Creating the sensor network infrastructure is its first objective which utilizes a large number of sensor nodes and the MAC scheme must establish the communication link between the sensor nodes.Sharing the communication medium fairly and efficiently is the second objective (Ye et al., 2002;Yadav et al., 2009).
A good MAC protocol should have the following attributes: (Yadav et al., 2009) The medium access control protocols for the WSNs can be classified broadly into two categories.

Schedule based:
The schedule based protocol schedule transmit and listen periods but have strict time synchronization requirements to avoid collisions, overhearing and idle listening by scheduling transmit and listen periods.

Contention based:
The contention based protocols relax time synchronization requirements and adaptable to the changing topology as some new nodes may join and others may die few years after deployment.These protocols are based on Carrier Sense Multiple Access (CSMA) technique and have higher costs for message collisions, overhearing and idle listening (Yadav et al., 2009).
Issues: Despite having many MAC protocols proposed for sensor networks, neither protocol is recognized a standard.Because MAC protocol choice is generally application-dependent as a result neither a protocol is a standard MAC for sensor networks.Also there is a lack of standardization at lower layers (physical layer) and the (physical) sensor hardware.
Link-level performance leads to misleading conclusions about system performance as suggested by common wireless networking experience.It may also appear for upper layers as well thereby more the layers contributing to the decision, more the system efficiency.The medium access layer's collision information decides the routing path for instance.Also overheads for each layer were created by the layering of the network protocols causing more energy consumption for each packet (Demirkol et al., 2006).
Problem identification: An adaptable CSMA/TDMA hybrid channel access method was proposed Gilani et al. (2011) by modifying 802.15.4 standard to attain energy and throughput improvement.Here the Contention Access Period (CAP) was divided between slotted CSMA/CA and TDMA relying on nodes' data queue state and collision levels detected on the network.The queue state information was obtained from data frame reserved bits.A portion of the contention access period was allocated to TDMA protocol to achieve energy and throughput improvement.However, end-to-end delay of the proposed method begins to exceed in both the TDMA and CSMA mechanisms.Karahan et al. (2014) presented and compared the energy efficiency of transmit-based and receive-based SASs for multi hop topologies used in WSN MAC.Both transmit-based and receive-based strategies were developed, modeled and analyzed.The energy consumption increases on increasing the load.Yigitel et al. (2011) designed and implemented a QoS-aware MAC protocol for WMSNs, Diff-MAC integrating different methods to satisfy the need of QoS provisioning to deliver heterogeneous traffic and provides a fair all-in-one QoS-aware MAC protocol.The objective of Diff-MAC is to increase the channel utilization in addition to effective service differentiation mechanisms and providing fair and fast data delivery.Diff-MAC's performance evaluation results exhibited latency, data delivery and energy efficiency improvements, compared to two other existing protocols.Implementation of Diff-MAC on Imote2 platform also reveals that the protocol with moderate complexity can be easily implemented on the resource constrained motes.However, packet failures still occur due to buffer overflows.Hamid et al. (2010) presented a scheduled-based multi-channel MAC protocol where each receiving node allots some timeslot(s) to receive data from the intending sender(s) so as to improve network performance.The timeslot selection was performed in a conflict free manner thereby other nodes avoid already selected slots within its interference range.A unique solution was proposed by splitting the neighboring nodes into different groups in which group nodes chose the slots allocated to that group only so as to minimize the conflicts during timeslot selection.Furthermore, decreasing the frame size could not reduce the delay since the number of packets delivered per timeslot will also decrease and the packets will be buffered to transmit later.Thalore et al. (2013) presented an energy-efficient Multi-Layer MAC (ML-MAC) protocol simulated in QualNet 5.2 to achieve low duty cycle, prolonged network lifetime and reduced collisions.ML-MAC sensor nodes have a very short listening/active time which minimize the energy consumption while communication.Also minimizing the number of collisions saves the energy required to re-transmit corrupted data packets.However, ML-MAC has a disadvantage of average end-to-end delay and average jitter.Incel et al. (2011) designed a multi-channel MAC protocol, MC-LMAC, to maximize the WSN throughput by coordinating multiple frequency channels transmissions.MC-LMAC utilizing interference and contention-free parallel transmissions on different channels relies on scheduled access to ease the nodes coordination, dynamically switching their interfaces between channels and enable the protocol to operate effectively without collisions while peak traffic.Time is slotted and each node is assigned the control over a time slot to transmit on a particular channel.The performance of MC-LMAC with extensive simulations is analyzed in Glomosim.MC-LMAC exhibits significant bandwidth utilization and high throughput while ensuring an energy-efficient operation.However in MC-LMAC, the duration of the CF period increases with more channels which leads to the nodes spending more energy on listening for the potential incoming packets.Gilani et al. (2011) proposed an adaptable CSMA/TDMA hybrid channel access method as a modification to the 802.15.4 standard.A portion of the contention access period was allotted to TDMA protocol for energy and throughput improvements.The proposed method was compared with 802.15.4 and by OMNeT++ simulation, energy consumption and throughput improvements were evaluated.However, end-to-end delay of the proposed method begins to exceed 802.15.4.Tan et al. (2012) proposed an adaptive and energyefficient TDMA-based MAC protocol to reduce energy consumption in the network as well as to efficiently handle network traffic load variations and optimize channel utilization by a timeslot stealing mechanism and a timeslot reassignment procedure.The average delay performance of the MAC protocol, with and without the timeslot stealing mechanism was analytically derived.The timeslot stealing mechanism can substantially improve the protocol throughput in scenarios with varying and asymmetric traffic patterns.The timeslot reassignment procedure is efficient in handling the longer timescale changes in the traffic load, while the timeslot stealing mechanism is better in handling the shorter timescale changes in the traffic patterns and is proved by simulations.

PROPOSED METHODOLOGY
Overview: As an enhancement to this study, we propose to design an adaptive MAC protocol with effective TDMA time-slot assignment and CSMA contention window adaptation mechanisms for the TDMA hybrid channel access method (Gilani et al., 2011).
TDMA time-slot assignment technique (Tan et al., 2012) allows the receiver nodes to redistribute the timeslots among the sender nodes according to their offered traffic load.This timeslot stealing mechanism increases the channel utilization and reduces the average packet latency.It also reduces energy consumption, efficiently handles network traffic load variations and optimizes channel utilization.
The CSMA Contention Window (CW) size adaptation mechanism reduces the delay occurring in CSMA transmissions.It consists of an effective service differentiation mechanism (Yigitel et al., 2011) to provide fair and fast delivery of data.It adjusts the current CW size of the sensor node based on the dynamic network traffic conditions there by reducing the collisions and avoiding wasting time in waiting for reservation of medium.
Adaptive CSMA/TDMA MAC protocol: The coordinator needs an algorithm to determine the border between TDMA and CSMA in contention access period.Two parameters are considered for determining the border between CSMA and TDMA: channel utilization level in CAP; and the amount of pending data in nodes' queues.For maintaining the queue state of network nodes, the coordinator keeps an array containing the queue states of all nodes.After calculating network load state, the average channel utilization is calculated to decide about the border between CSMA and TDMA.
Queue state (Z i ): Each standard data packet includes three reserved bits which offers eight-level meter.This field specifies the fraction of queue utilized.The format of data packet is shown in Table 1.
The queue state of the node can be computed using the following Eq.( 1): where, P = Number of packers in the queue Z max = Maximum size of the queue

Channel Utilization (CU i ):
The channel utilization is the function of number of used slots, number of unused slots and number of slots having collision which is estimated using the following Eq.( 2):

End if
This step reveals that the TDMA slots are only assigned to the nodes with queue state greater than the threshold.This prevents the under-utilization 3. The average Channel Utilization (CU i ) of node (Estimated in this section) is estimated.This is performed for every data transmission.

If CU i < CU th
Then Co-ordinator assigns TDMA slots to the nodes in descending order of their queue size values.End if If CU i is less than a minimum threshold value (CU th ), CH assigns TDMA slots to the nodes in descending order of their queue size values.

Timeslot allocation phase:
When the timeslot allocation phase takes place in the network, the timeslot allocation divides into two stages.In first phase, every node in the network will be allocated with timeslots.These nodes are ensured with collision free transmission within a two-hop neighbourhood.This collision free transmission is achieved by not assigning same timeslots for different nodes in the network.In the second phase, the timeslot of a particular node will consider the role of a receiver node and selects one of its neighbors as the sender node for that timeslot.
TDMA time-slot assignment: If an assigned timeslot is not used then that particular timeslot is wasted.If there is an asymmetric traffic load or any changes in the traffic load at different sender node then it results to inefficient channel utilization when timeslots assigned to lightly loaded sender nodes are not completely utilized and even heavily loaded sender nodes do not have enough timeslot to transmit complete data packets.In order to overcome this issue timeslot stealing mechanism is proposed to allow an unused timeslot to be used by another sender node.
Timeslots which are assigned to sender node are called primary sender node.In order to enable timeslot stealing mechanism, another sender node called as secondary sender node is assigned to each and every timeslot such that if any timeslot is not utilized by primary sender node then in that case secondary sender node need to listen to channel to determine whether primary node is transmitting or not and this mechanism is called as clear channel assessment mechanism.In case after timeout period is over, then it can steal the timeslot.It is important to note that secondary node cannot become hidden node to primary sender node so that it is able to detect any channel activity from the latter node.
Timeslot stealing mechanism has more advantage of increasing channel utilization and decreasing the average packet latency.The tradeoff considered here is increased energy consumption due to the energy expended by secondary sender node in determining whether it is able to steal a timeslot or not.The performance improvement of timeslot stealing depends on pairing of primary and secondary sender node to a timeslot.
Without timeslot stealing mechanism, each and every sender node is assigned one timeslot per frame.In this type of protocol, every timeslot is assigned to a primary sender node and a secondary sender node.In case primary sender node doesn't make use of timeslot, then in that case secondary sender node can steal timeslot.Hence on average, number of timeslot in a frame that a sender node i can use to transmit its packets can be more than one.
The utilization of sender node i is given by the following relationship: where, υ i = The utilization of sender node i λ i = The packet arrival rate at sender node i, i = 1, 2, ..., N T = The frame duration T i = The average number of timeslots that sender node i has in a time frame: where, t j,i is the number of timeslots where sender node, j the primary sender node and sender node and i is the secondary sender node.Equations ( 3) and ( 4) can result in recursive relationship in computation of T i and υ i , in case we have a timeslot assignment in which there exist timeslots for which sender nodes i and j are considered primary and secondary node and timeslots for which the roles are inverted for sender nodes i and j.For this, compute T i and υ i , considers t i as the initial value for T i in its computation and converges it to correct value for T i .Figure 1 represents an example of timeslots in a frame for which a sender node i can probably transmit its packet.The black-colored time slot denotes timeslot for which sender node i represents primary sender node whereas white colored timeslots denotes timeslot for which sender node i is the secondary sender node.

CSMA contention window adaptation:
The main aim of this type of mechanism is to reduce number of collision and also it keeps CW size in least size in order to avoid any kind of unnecessary waiting time to reserve the medium by adjusting current CW size of the sensor node based on dynamic network traffic condition.
To regulate CW size adaptively, Diff-MAC periodically monitors behavior of the network with a period (T c ) and collects two related metrics about status of the network which is found by total number of transmission Attempts (A t ) and number of collisions (A c ).Consequently, Probability of collision (P c ) value can be calculated for that particular observation frame.After that obtained probability of collision is used for CW adaption algorithm which is calculated by P c = A c /A t Algorithm 1: CW adaptation algorithm Step 1 : CW cur = (CW min + CW max ) /2 Step 2 : Observe transmission Attempts (A t ) during (T c ) Step 3 : If (A t ) <Q, then Step 4 : go to Step 2 Step 5 : if P c(t) <P c(t-1) Step 6 : ∆CW = α down (CW min -CW cur ) Step 7 : else Step 8 : ∆CW = α up (CW max -CW cur ) Step 9 : CW = CW cur + ∆CW Step 10 : go to Step 2 As seen in Algorithm 1, adaptation mechanism varies the current CW size corresponding to each traffic class between the maximum and the minimum values step-by-step.Diff-MAC runs the CW adaptation routine if and only if more than a certain number of transmissions (Q) have been attempted during (T c ). Accordingly, redundant and inaccurate adjustments are prevented.
Two main techniques are utilized for service differentiation within adaptive CW size context.The first method sets speed of CW adaption according to nature of traffic type by controlling adaption coefficients.Here Diff-MAC increases CW size faster for lower priority traffic, whereas decreases faster for higher priority traffic, that means α up(RT) <α up(NRT) <α up(BE) and α down(RT) >α down(NRT) >α down(BE) where α denotes adaption coefficient.Furthermore, different up and down coefficients are utilized for same priority traffic like α up(RT) <α down(RT) and α up(BE) >α down(BE) to decrease latencies of delay-tolerant RT data.Hence, for RT class rate of decrement of CW size is more than rate of increment.
The second technique includes setting of different maximum and minimum CW size for each traffic class and hence it provides with different priorities of traffic class for reserving the medium.In order to increase throughput and decrease latency of higher priority traffic, set CW RT <CW NRT <CW BE and give first preference for higher priority traffic.Since non overlapping CW sizes is used hence the proposed statement holds for both minimum and maximum CW sizes 1.
Initially the node will be in the sleep mode, when the node has to transfer data packets the active mode will be activated.The node sends the data packets to the CSMA contention window.The contention window send a message to the RTS/CTS (Ready to Send/Clear

Simulation setup:
The performance of the proposed Adaptive MAC Protocol with Effective TDMA Timeslot Assignment and CSMA Contention Window Adaptation (ETACWA) is evaluated using NS2 (Medagliani et al., 2013) simulation.A network which is deployed in an area of 50×50 m is considered.The IEEE 802.15.4 MAC layer has been modified and used for a reliable and single hop communication among the devices, providing access to the physical channel for all types of transmissions and appropriate security mechanisms.The IEEE 802.15.4 specification supports two PHY options based on Direct Sequence Spread Spectrum (DSSS), which allows the use of low-cost digital IC realizations.The PHY adopts the same basic frame structure for low-duty-cycle low-power operation, except that the two PHYs adopt different frequency bands: low-band (868/915 MHz) and high band (2.4 GHz).The PHY layer uses a common frame structure, containing a 32-bit preamble, a frame length.
The simulated traffic is Exponential traffic (EXP) with UDP source and sink.Table 2 summarizes the simulation parameters used.Performance metrics: The performance of ETACWA is compared with the An adaptive CSMA/TDMA hybrid MAC (Hybrid MAC) protocol (Gilani et al., 2011).The performance is evaluated mainly, according to the following metrics.

Average end-to-end delay:
The end-to-end-delay is averaged over all surviving data packets from the sources to the destinations.

Average packet delivery ratio:
It is the ratio of the number of packets received successfully and the total number of packets transmitted.
Throughput: It is the number of packets successfully received by the receiver.
Packet drop: It is the number of packets dropped during the data transmission.

Results:
Based on CBR traffic: We vary the number of nodes as 21, 41, 61, 81 and 101, respectively and measure the above metrics for the CBR traffic.
From Fig. 3, we can see that the end-to-end delay of proposed ETACWA is 17% less than the existing Hybrid MAC protocol.From Fig. 4, we can see that the delivery ratio of our proposed ETACWA is 69.4% higher than the existing Hybrid MAC protocol.
Figure 5 we can see that the packet drop of our proposed ETACWA is 37.02% less than the existing Hybrid MAC protocol.
Figure 6, we can see that the average energy consumption of our proposed ETACWA is 11% less than the Hybrid MAC protocol.
From Fig. 7, we can see that the throughput of our proposed ETACWA is 30% higher than the Hybrid MAC protocol.
For EXP traffic: We vary the number of nodes as 21, 41, 61, 81 and 101, respectively and measure the above metrics for the EXP traffic.
From Fig. 8, we can see that the end-to-end delay of proposed ETACWA is 18% less than the existing Hybrid MAC protocol.
From Fig. 9, we can see that the delivery ratio of our proposed ETACWA is 52% higher than the existing Hybrid MAC protocol.
From Fig. 10, we can see that the packet drop of our proposed ETACWA is 35% less than the existing Hybrid MAC protocol.
From Fig. 11, we can see that the average energy consumption of our proposed ETACWA is 21% less than the Hybrid MAC protocol.From Fig. 12, we can see that the throughput of our proposed ETACWA is 35% higher than the Hybrid MAC protocol.

CONCLUSION
This study proposes an Adaptive MAC protocol with effective TDMA time-slot assignment and CSMA contention window adaptation for WSN.Here in this approach consists of two parts which are TDMA timeslot assignment and CSMA contention window adaptation.Through TDMA time-slot assignment it is possible for the receiver nodes to rearrange the timeslots among the sender nodes according to their reachable traffic load.Through CSMA contention window, the network can reduce the latency occurring between the nodes during the transmission.The advantage of this approach is that, it reduces energy consumption efficiently, handles network traffic load through a timeslot stealing mechanism.

Fig. 2 :
Fig. 2: Simplified state transition diagram of MAC to send), with the help of RTS/CTS CSMA contention window checks the traffic in the network.After the data packets have been transferred and received the node gets a acknowledge message.The state transition diagram of the MAC protocol is described in Fig. 2.

Table 1 :
Format of MAC frame Frame control