Performance Analysis of MAC Layer Protocols for WSN with Considering the Effects of Hidden Node Problem

Wireless sensor networks (WSNs) are consisting of a large number of sensor nodes that sense, gather, and process-specific data. Its importance is dedicated to its enormous application range. It could be used with industrial applications, agricultural applications, military applications, industrial applications, and a lot of other applications, which make it an open area for study by researchers and students. In this paper, the effects of the hidden node problem are studied on three different MAC protocols using various field distances and various numbers of nodes. This study provides the best number of nodes to be disseminated in a specific field distance depending on the needed performance metrics. Six performance metrics are used in this study, which is Goodput, Throughput, PDR, Residual Energy, Average Delay, and first and last node dead in the network. IEEE 802.11, IEEE 802.15.4, and TDMA protocols are the used protocols in this study. Eight different scenarios were proposed and implemented for this study. NS2 is used to construct the proposed scenarios. Results show that TDMA gives the best energy conservation and high delay time with high PDR, while IEEE 802.11 provides the best throughput and Goodput results and low delay time. A graphical view for the results was made to ease of study and analysis.


Introduction
Wireless sensor network (WSN) is considering a very fast-growing network.It may consist of a low number (tens) to a very large number (hundreds or thousands) of sensor nodes, which are tiny and lightweight devices with limited resources such as energy level and processing capabilities.Sensor nodes architecture consists of main components, Sensing Unit, Power Unit, Communication Unit, and Processing Unit.WSN's importance is linked to their wide applications range, such as environmental applications, military applications, agricultural applications, and industrial applications.Sensor nodes depend on the application in its dissemination.It may be statically or randomly disseminated in an observation field to sense, gather and process specific required data.Figure (1) shows the basic architecture of WSN.

Figure 1: WSN Basic Architecture
WSNs encounter many challenges in their design.Energy dissipation is the main challenge in designing WSNs.It is limited and finite in Sensor nodes.Small batteries are the main energy source in sensor nodes.These batteries have limited capacity.It is stressful to replace these batteries when the number of nodes is so large and also, when using these nodes in a military application may be to locate enemy locations, it will be impossible to replace these batteries due to the hostile environment.The main causes of energy dissipation in WSN are collisions, idle listening, and communications between sensor nodes, retransmission, overhearing, and control packet overhead.These reasons to waste energy must be alleviated by designing an efficient MAC protocol [1].MAC layer in WSNs responsibilities is flow control,

Control Station
Sensor Field Sensor Nodes channel access, error control, and scheduling.Sensor nodes almost share one transmission channel shared among them.Collisions are the main cause of the loss of sent data.Therefore, an efficient mechanism should be applied to ensure the reliability of transmitting data.This is one of the main issues in designing an effective MAC protocol [2].The transmission range of the sensor nodes is bounded due to its limited capabilities.Therefore nodes could not completely sense each other in the observation field, and due to the nature of WSN in gathering and send data as wireless transmission to a specific main node (sink or base station) as shown in Figure (1), a distractive problem is appeared called hidden node problem [3], [4].The hidden node problem is one of the most affected parameters in the performance of wireless sensor networks.It mainly occurs when two nodes outrange each other send data packets to a third node fall in their transmission range.This leads to collision and loss of the sent packets.Also, this makes sensor nodes differ their transmission for a back-off time period.Many researchers have proposed several MAC layer protocols to address or eliminate this problem, with each proposed MAC protocol having its pros and cons [5], [6].

Related work
The authors in [7], made a survey of schedule-based MAC protocols in wireless sensor networks.They introduced the MAC layer properties and the challenges of schedule-based MAC protocol.They described nine schedule-based MAC protocols.They brief their work with a comprehensive table for the used MAC protocol with listing their advantage and disadvantage.Their motivation was to give a survey on these MAC protocols for the ease of knowing their properties and the selecting of the best one for a specific application.The authors in [8], present the advantages of reservation-based MAC protocols and compare them with contentionbased MAC protocols, especially the IEEE 802.11e standard.They simulated (RCSMA, CATA, FPRP, and IEEE 802.11e)MAC protocols by using NS2.They also provide a detailed analysis of the main drawbacks and challenging issues.They found that reservation MAC protocols perform well in static ad hoc networks.Simulation results show that these protocols outperform the IEEE 802.11e standard in low mobility scenarios, but the performances of these protocols are expected to degrade as the mobility of nodes increases.Also, they found that collisions could happen in reservation MAC protocol at the time of the network initialization.Finally, they found that contention-based MAC protocol suffering from high control packet overhead.The authors in [9], present a deep and comprehensive WBAN MAC protocols performance.They evaluated the effectiveness of three MAC protocols (IEEE802.15.4,IEEE80.2.15.6, and TMAC) and conclude a better access mechanism to be used in WBAN networks.They used OMNET++ with Castalia to simulate the proposed scenarios.They run several simulations with different parameters each time.Packet delivery ratio (PDR) and latency are the used performance metrics.They simulate two scenarios, the first one for calculating the latency and the second for calculating PDR.They have evaluated these two metrics in GTS ON configuration and GTS OFF configuration.They concluded that the three protocols perform better with GTS ON the hybrid MAC protocols are better ones.

MAC layer protocol in WSNs
The medium access control protocol is the most important layer in WSN since sensor nodes need self-organization capability, and self-healing when the network topology changes.The Main responsibility of MAC protocol is how to access the transmission channels.So that network resources must be fairly shared like transmission channel to increase reliability and efficiency of the network.MAC is also responsible for scheduling, buffer management, flow control, and error control.Energy is the main design issue in MAC protocol that must be given a high priority [10].Three MAC protocols were studied in this paper which are IEEE 802.11,IEEE 802.15.4,and TDMA.

IEEE 802.11
IEEE 802.11 is the standard for WLAN.It is a contention-based MAC protocol.It adopts a powerful mechanism to alleviate the hidden node problem.The fundamental mechanism it uses to access the channel is distributed coordination function (DCF), which is a random access scheme that utilizes carrier sense multiple accesses with collision avoidance (CSMA/CA) with binary exponential back-off time as its basic rule to access the transmission channel.It also supports an optional access mechanism called the point coordination function (PCF), which supports centralized and collision-free services [11].
DCF defines two channel access techniques.The first one is called the basic access mechanism.In this technique node that has a packet to send will sense the channel if it is idle the node will wait for a period of time called distributed interframe space (DIFS) if the channel is still idle the node sends its packet to the destination, after successfully receiving of the sent packet the destination node waits for a short period of time called short inter-frame space (SIFS) if the channel is still idle the destination node reply with acknowledgment packet (ACK) to inform the sender with successfully data reception [12].Figure (2) shows the basic access mechanism.

Figure 2: IEEE 802.11 Basic Access Techniques
DCF also defines a more complex technique for nodes to win the transmission channel which required four-way handshaking (RTS, CTS, DATA, and ACK).The node that wants to send its packet must sense the channel to be idle and waiting for a DIFS time period if the channel is still idle, the node will send the request to send a packet (RTS), the destination upon successfully receiving and waiting for SIFS will answer with clear to send a packet (CTS).At this time, the sender and after waiting for SIFS time can send its data packet to the destination with successfully receiving wait for SIFS and send ACK packet.If the channel is sensed to be busy at DIFS waiting for the time the node will defer its transmission and wait until the channel is free again if it is the node will wait for DIFS and generating a random back-off time to wait for before sending a data packet.This is the collision avoidance mechanism the IEEE 802.11 follows [13].Figure (3) shows RTS, CTS mechanism.

DATA
DCF techniques also provide a virtual sensing mechanism with the use network allocation vector (NAV) to suppress other nodes from sending or receiving.NAV containing the time needed for the current transmission to be complete.The PHY layer features are deactivation and activation of the radio transceiver, energy detection (ED), link quality indicator (LQI), clear channel assessment (CCA), channel selection, and transmitting and receiving packets.The radio could be operated with these three types of bands 868-868.6MHz, 902-928 MHz, and 2400-2483.5MHz.The MAC sub-layer features are channel access, acknowledged frame delivery, GTS management, beacon management, disassociation, and association [14].
IEEE 802.15.4 supports different network topologies (star, cluster tree, and mesh) and devices.An optional superframe can be used to control the duty cycle of devices.It can be used as a contention-based and scheduled-based MAC protocol.It can work with a high number of devices (65.536 devices when using short addresses (16 bits)) [15].Two types of devices are defined in this protocol depending on their capability and complexity.Full function devices (FFD) are devices that can support all specifications of IEEE 802.15.4.It can route, relay packets, and communicate with all other devices in the network.It can be a router, coordinator, or normal (end) device.Reduced function devices (RFD) are simple devices with limited capabilities that can communicate with (FFD) only [16].IEEE 802.15.4 can operate in two modes beacon and non-beacon.In the beacon mode, devices synchronized with the coordinator and wait for its beacon signal.To know when to go to sleep and the next beacon signal, devices use slotted CSMA/CA to compete with each other.In this mode, all devices know when to communicate with each other.The timing to wakes up must be very accurate to catch a beacon signal.Figure (4) shows communication between coordinator and network device.IEEE 802.15.4 channel access mechanism is reduced greatly when high data traffic exists in networks [17].

Figure 4: Communication with Coordinator in Beacon Mode
In non-beacon mode devices uses unslotted CSMA/CA to contend with each other.There is no synchronization between devices.Figure (5) shows communication between the coordinator and network devices in non-beacon mode.

Time Division Multiple Access (TDMA)
A schedule-based MAC protocol guarantees the fair distribution of transmission channels between nodes.It divides the transmission channel into equal time slots and allocates each node with a one-time slot.In this way, there is only one node that sends or receives on the transmission channel at any time.Node triggers its radio on in its allocated time slots and turns it off in the other time slots.This leads to a level of energy conservation [19].Figure (6) shows the TDMA MAC protocol.

Figure 6: TDMA MAC Protocol
TDMA does not suffer from hidden nodes problem and eliminate packet collisions in the network.No idle listening for nodes since nodes turns their radio on only when it has a packet to send or receive.Allocated time slots altogether form TDMA frame which is continuously repeated [20].
TDMA drawbacks when the number of nodes is large latency are greatly increased since the node that wants to send data packet needs to wait for the channel to have its allocated time slot.Also, network bandwidth may be unutilized efficiently since some nodes may not have anything to send [21].

Hidden Node Problem in WSNs
Wireless communications have a broadcast nature that all neighboring devices could hear but not all of them could interpret.This nature exhausts network resources and mainly network bandwidth.WSNs with their limited capabilities may have only one channel to send and receive data packets.This means that only one node can send data with its transmission range.The hidden node problem is the main degradation parameter in wireless networks [22].It occurs when a node cannot sense an ongoing data transmission and send its data at the same time which leads to data collision and loss of the transmitted packets.Figure (5) illustrates hidden node problem occurrence.Node A can sense node B since it is in its radio range but cannot sense node C because it lies outside its radio range.The same is for node C; it can sense node B but cannot sense node A for the same reasons.When node A has a packet and wanting to send it to node B, it will sense and find the channel idle (no transmission is happening), so that it will start sending its packet, if before the end of A's transmission node C have a packet and want to send it to node B it will sense and find the transmission channel idle (since it could not sense node A transmission), so that it will send its packet which leads to data collision in node B. This situation is called a hidden node or blind node problem [23], [24].

Simulation and Results Comparison
The selected MAC protocols have different properties and mechanisms to alleviate hidden node problems and to access channels, except IEEE 802.15.4 which doesn't provide any mechanism to alleviate hidden node problems.Simulation results from a comparison among protocols are studied to identify the characteristic of each protocol with six performance metrics (Throughput, Goodput, PDR, Delay, Average Residual Energy, and First -Last Nodes Dead).Eight scenarios are implemented with variable node number (75 and 100) and field area (250×250, 500×500, 750×750, and 1000×1000) m2, which have been grouped into two scenarios for the simplicity of results comparison.Table (1) shows implemented scenarios.

The First Scenario
In this scenario, (75) nodes are randomly disseminated and the field distance is varying to (250×250, 500×500, 750×750, and 1000×1000) m 2 .Average results are combined and discussed for the selected protocols.IEEE 802.11 is the dominant protocol with high throughput and Goodput because of its good mechanism to alleviate hidden node problems and no sleep periods are introduced.IEEE 802.15.4 experiences high difficulties in its mechanism to access the channel when a high data rate and a high number of nodes exist.Also, when field distance is increased this causes the existence of hidden node problem and the need for multi-hop to transmit data packets to sink node.TDMA generates low throughput and Goodput because the increase in node number introduces high delay time.Throughput and Goodput are shown in Figures (8)    Whenever a number of nodes increase delay time of TDMA protocol is increasing too and also when field distance increases delay times increase because of the need for more hops to reach the sink node as shown in Figure (11).When field distance is (500×500) m 2 high delay is shown because there was a bottleneck node in routes of two packet source nodes.IEEE 802.11 and IEEE 802.15.4 have low delay times since no sleep periods exist and no waiting for a specific time to acquire the transmission channel.The average residual energy is shown in Figure (12).TDMA is the best protocol in energy saving since it doesn't suffer from collisions, idle listening, overhearing, and hidden node problem.IEEE 802.15.4 shows high residual energy since its throughput value is low.It has been noticed a volatile behavior for IEEE 802.15.4 protocol in its results and this because of the way it is used to access the channel.IEEE 802.11 is the worst protocol in energy conservation since it doesn't let nodes go to sleep and suffering from idle listening, overhearing, and hidden node problems.When field distance is (750×750, 1000×1000) m2, IEEE 802.11 starts to save some energy and this is because some nodes don't participate in sending or receiving processes due to their location or that it is doesn't have a route to sink node.

The Second Scenario
In this scenario, (100) nodes are randomly disseminated and the field distance is varying to (250×250, 500×500, 750×750, and 1000×1000) m 2 .Average results are combined and discussed for the selected protocols.
Throughput and goodput are shown in Figures (15) and ( 16) respectively.Almost the same results as the first scenario are obtained for the same reasons mentioned before.Except that IEEE 802.15.4 performs better than TDMA because of the increase in node number and the high delay time that TDMA protocol introduces.

Conclusion
In this paper, three MAC protocols were simulated and compared with each other using different scenarios and different performance metrics.The results show that IEEE 802.11 protocol is performing better in throughput and Goodput results, and also gives low delay time.This is because IEEE 802.11 forces nodes to always be awake, which makes them, have full knowledge of the status of the network.IEEE 802.15.4 is given low delay time with volatile results.While TDMA protocol performs better in energy conservation since it let nodes go to sleep and save energy and doesn't suffer from idle listening, overhearing, and hidden node problem.Hidden node problems have a great influence on IEEE 802.11 and IEEE 802.15.4 MAC protocols and highly degrade the network performance.

3. 2
IEEE 802.15.4 IEEE 802.15.4 is considered a standard for low data rate wireless personal area networks.It defines both PHY and MAC layers.It is basic for Zigbee networks.

Figure 5 :
Figure 5: Communication with Coordinator in Non-Beacon Mode

Figure 8 :Figure 9 :
Figure 8: Throughput of First Scenario in Case 75 Nodes

Figure 10 :
Figure 10: PDR of First Scenario in Case 75 Nodes

Figure 11 :
Figure 11: Average Delay of First Scenario in Case 75 Nodes

Figure 12 :
Figure 12: Average Residual Energy of First Scenario in Case 75 Nodes

Figure 13 :Figure 14 :
Figure 13: First Dead Node of First Scenario in Case 75 Nodes

Figure 18 :
Figure 18: Average Delay of Second Scenario in Case 100 Nodes Average residual energy is shown in Figure (19), TDMA is the best protocol that saves energy.For the same reasons mentioned before.IEEE 802.11 is the worst protocol in energy conservation since nodes either transmit or listen for transmissions.IEEE 802.15.4 takes second place in saving energy since it gives low

Figure 19 :
Figure 19: Average Residual Energy of Second Scenario in Case 100 Nodes

Figure 20 : 4 TDMAFigure 21 :
Figure 20: First Dead Node of Second Scenario in Case 100 Nodes