PERFORMANCE ANALYSIS OF IEEE 802.15.4 CHANNEL ACCESS MECHANISMS DURING EVENT DETECTIONS IN WIRELESS SENSOR NETWORKS

ABSTRACT


INTRODUCTION
Wireless sensor networks (WSNs) comprise a large number of sensor nodes that collect data on physical conditions such as temperature, position, movement, and humidity and work together to deliver the data to the sink to be further transmitted to a head server. WSNs have been implemented in various systems, such as disaster detection systems (forest fire [1][2][3], land sliding [4], and earthquake [5]), agriculture [6], and health [7]. Despite the wide implementation of WSNs, most WSNs share the same characteristic, i.e., the energy constraint. Most WSN nodes are only equipped with a small battery and are expected to work for a long period without a way to be recharged or replaced [8].
Most of the energy of a sensor is spent by the radio component in transmitting, receiving, or listening to the network for a potential incoming packet (idle condition) [9]. In a low-traffic network, which is the case in most WSNs, idle listening constitutes a large portion of the network energy spent. WSNsMedium access control (MAC) protocols in WSNs converse energy by d turning the radio module on (active period) and off (inactive period) periodically to minimize the energy spent in idle listening. Based on their access mechanism, WSN MAC protocols can be classified into carrier sense multiple access (CSMA) based protocols and channel division based protocols. CSMA MAC protocols such as S-MAC [10], X-MAC [11], and ADMC-MAC [12] are not collision free but work well in distributed networks where there is no central control. On the other hand, the channel division protocols [13][14][15] provide a collision-free transmission by only allowing the node to transmit in specifically designated slots based on time or frequency, however, they assume a certain central control or pre-configuration. IEEE 802.15.4 [16] standardizes the operation of low-rate wireless personal area networks(WPANs) and serves as the MAC layer of Zigbee [17]. This protocol implements both CSMA and channel division mechanisms in their active period. The Channel division mechanism is implemented by allowing nodes to request guaranteed time slots (GTSs), in which nodes can transmit their packet collision-free.
Several studies have proposed work to analyze the performance of the Zigbee network. For example, studies in [18][19][20] run simulations in OPNET to evaluate the delay, throughput, and load in the Zigbee network based on the numbers of Zigbee coordinator (ZC) [18,19], network topology [18,20] and the use of RTS/CTS [20]. A study in [21] investigates the effects of node mobility on the throughput and packet drop in the network. All the mentioned studies [18][19][20][21] consider a low-traffic network with a packet arrival rate less than or equal to 1. This study investigates the effects of channel access mechanisms (contention and GTS) on the performance of the IEEE 802.15.4 network. Moreover, most studies consider a low packet arrival rate network, which is the fact in most WSNs during the normal operational time. On the other hand, this study considers the time during the detection of a critical event when the arrival packet rate increases as nodes try to deliver the change of the physical environment as soon as possible to the head server. The rest of this paper is organized as follows. In section 2, the method used in this study, including, the network topologies, the parameters used in the simulation and the quality of service parameter used to evaluate the performance, is described. The third section elaborates on the simulation implementation, the simulation results and the discussion of the result. Finally, the fourth section summarizes the paper.

METHOD
This research considers a square network of 100 m 2 area, in which the nodes are placed in a grid and the sink is located in the center of the field. We use various node densities, which are 4, 9 and 16 nodes with 1 sink. The topology of the networks is shown in Figure 1. Figure 1(a) is the configuration 2x2 network (4 nodes), figure 1(b) is a 3x3 network(9 nodes) and figure 1(c) is a 4x4 network (16 nodes). The network area (the box with bold line) is 10m x 10m, which makes the field areas in (a), (b) and (c) 15m x 15m, 13.3m x 13.3m and 12.5m x 12.5 m respectively. It is assumed that the network is a 1 hop network, which means that each sensor node can directly transmit its frames to the sink.  The sensor nodes in the network can send text data or a small picture. The size of the frames containing text information is 15 bytes which comprise a 6-byte header, 3 bytes of temperature value (0-100 o C), 3 bytes of humidity value (0-100 %) and 3 bytes of soil moistures value (0-100 %). The size of the frames containing a small picture varies from 100 kB to 500 kB.
Most sensor network operates with a low packet arrival rate (λ) to converse energy. However, in detecting a critical event, the packet arrival rate increases to send the information as soon as possible to the head server. In this research, we use packet arrival rate (λ) of 0.5, 1, 2, 3 and 4 (1 frame every 2 seconds to 4 frames per second) The superframe structure IEEE 802.15.4 (Zigbee) consists of the active period and the inactive period. The active period comprises 16 slots which are further divided into contention access period (CAP) and contention-free period (CFP). CAP contains the first k slots of the active period followed by CFP which contain 16-k remaining slot. Beacon is transmitted at the start of a superframe containing control information such as synchronization, and the existence of a PAN. Figure 2 shows the superframe of zigbee.  [22] As the beacon starts a superframe, the duration of a superframe is equal to the beacon interval (BI). The duration of a superframe in seconds is given in eq(1), where R is the data rate of the channel. In the simulation, where each superframe contains 960 symbols, R = 250 kBps and bit/symbol = 2, the duration of a superframe is 120 ms.
Zigbee (IEEE 802.15.4) offers two modes of channel access namely contention mode and guaranteed time slot (GTS) mode. In the contention mode, each node with a frame to send compete to access the channel using the carrier sense multiple access-collision avoidances (CSMA-CA) [1] mechanism similar to the nodes in the IEEE 802.11 networks. Upon detecting an idle channel, a contending node randomly draws a back-off counter. Every time slot that the channel is detected idle, the value of the backoff counter is decreased by 1. If during the backoff time the channel is busy, the node freezes the backoff until the channel is detected idle again. A contending node can only send its frame when the backoff counter equals 0. In the GTS mode, each node can request time slots in which it can send its frame contending free. The contention mode is used during CAP, and the GTS mode is used in CFP This research simulates both the contention mode and GTS mode in measuring the performance parameter to analyze the saturation point of the network.
The performance parameters used in this research are packet delivery ratio (PDR), throughput, and latency. PDR is defined as the percentage of packets successfully received by the application module of the sink to the total number of packets sent by the sensor nodes, as shown in eq(2) Throughput is defined as the number of packets transmitted successfully in a second, as shown in eq (3), where n is the number of packets sent successfully during simulation and ts is the simulation time.
Latency is the time between a packet sent by the application layer in the transmitting node and the packet received by the application layer of the destination node.
The simulation software used in this research is Castalia, an OMNET++-based simulator for wireless sensor networks (WSN) and body area networks (BAN) [23]. Castalia provides the library for application layer modules, IEEE 802.15.4 medium access control (MAC) protocol module, wireless channel modelling module, various radio modules, and battery modules. The simulation parameter used in the network is shown in Table 1. The structure of the simulation is shown in Figure  3. In each node, we defined three layers: application, MAC, and radio layer. The application layer generates packets and sends them to the MAC layer. The MAC layer takes care of the channel access mechanism and the duty cycle of the node by turning the radio module on and off. Once the MAC layer gets access, it passes the frame to the radio layer to be sent to the wireless channel. Routing is bypassed in this simulation since all sensor nodes are directly connected to the sink.

Simulation Implementation
The general configuration for the simulation includes the simulation time, the network area, the number of nodes and the position of each node. An example code for a 2x2 network (4 sensor nodes and 1 sink), 100 m 2 of network area and 1000 s simulation time is shown in figure 4.  protocol. This module support 2 types of access mechanism, contention-based and contention-free. An example of configuration code for a contentionbased network, where node 0 acts as PAN coordinator is shown in figure 6. The radio module uses the parameters of cc2420 radio by Texas instrument. The radio parameters are listed in Table 2. The wireless channel implements the log-normal shadowing model which gives an accurate estimation of path loss in a network where the distances of nodes are a couple to hundreds of meters.
The simulation in this research is run five times with different seeds to provide better accuracy.

Simulation Result
Packet delivery ratio (PDR) presents the ratio of application packets delivered to the total packets sent. Figure 7 shows the PDR (in %) of the network of packets containing text data(15 bytes) when the packet arrival rate (λ) increases. In general, networks with GTS (black dashed lines) exhibit better PDR than the non-GTS / contention-based (solid red lines) ones. However, as the traffic in the network increased, the PDR of GTS in the dense network (16 nodes) declined sharply while the PDR of non-GTS in the same network (although lower than the ones in the less dense network) remained relatively stable. For example, the PDR of the GTS network with 16 nodes and λ=4 is 94%, while the PDR of the non-GTS network is 96%.  Figure 8 shows the PDR of a network of 16 nodes sending packets of 500 kB image data. Similar to the network sending packets of text data, in the less traffic network (λ=0.5, λ=1), GTS shows much better PDR than the contention-based (96.2% compared to 92.5%). However, when the traffic increases, the PDR of the GTS network drops sharply to 90.6 %(λ= 4), while the PDR of the contention-based network remains stable at around 92.5% The throughput of a network presents the number of packets successfully transmitted in the network. Figure 9 shows the throughput of the network sending packets containing text data. As expected, the throughput increases as the traffic of the network increases. There is no significant difference in the throughputs of the contention-based and the GTSbased networks. However, in the network of 16 nodes with λ=4, contention-based access shows slightly better throughput than the GTS one.

Figure 9
Throughput of Text Data Figure 10 shows the throughput of the network of 4, 9, and 16 nodes sending 250 kB image data packets. Similar to figure 9, GTS and contentionbased access mechanisms have approximately the same throughput, except in the 16 nodes network with λ=4, the contention-based has a slightly better throughput The latency is the time between a packet sent by the application layer of the transmitting node and the packet received by the application layer in the receiving node. Figure 11 shows the latency of a network sending text data with various numbers of nodes and arrival packet rates. The latency is greatly influenced by the number of nodes in the network but not so much by the packet arrival rate of the network. Moreover, the latency of the contentionbased network increases gradually as the number of nodes in the network increases. Meanwhile, in the GTS network, the latency of a 16 nodes network is significantly higher than the 4 and 9 nodes network.

Discussion
Generally, IEEE 802.15.4 networks implementing a guaranteed time slot (GTS) mechanism perform better than the contention-based ones. As the GTS mechanism is based on the time division multiple access (TDMA), it inherits the advantages of TDMA, such as maximum bandwidth utilization, collision-free packet transmission, and low power consumption [24]. However, in a dense network, as the traffic in the network increases, the contentionbased mechanism performs slightly better than the GTS one.
As TDMA provides collision-free packet transmission, the GTS mechanism generally has better PDR than the contention-based mechanism. Zigbee networks implementing GTS generally have a very high (>96%) packet delivery ratio, as shown in Figures 7 and 8. For example, the PDR of the GTS mechanism in the 16-nodes network sending packets containing text data (λ=0.5 and λ=1) is 99.5 %, compared to the 96% of the contention-based one. However, as the packet arrival rate increases, the PDR of the GTS mechanism significantly drops compared to the contention-based mechanism (94% and 90.5% compared to 96% and 92% when λ=4). The significant PDR drop in the GTS mechanism can be explained by considering the number of slots available in the active period of the IEEE 802.15.4 superframe structure (figure 2). In an IEEE 802.5.4 superframe, there are a maximum of 16 slots available during the active period. As the packet arrival rate increases in a dense network, many GTS requests are denied by the PAN coordinator due to limited slots available, resulting in the number of packets successfully delivered in the network There is no significant difference between the network throughputs of the GTS and the contention- based mechanism. As the packet arrival rate increases, more packets are sent into the network hence the throughput of the network is also increased.
In a typical network, the transmission time is the biggest factor in packet latency. In wireless sensor networks, due to the duty cycle mechanism, if a packet does not succeed in accessing the channel during the active period of a superframe, the delivery of the packet must be delayed until the active period of the next superframe [22]. Figure 11 shows that the latency of the 16-nodes networks is much higher than the latency of the less dense networks. As more nodes compete to send their packets, more of the packets are forced to delay their transmission to the next round.
To investigate further, we plot the latency distribution of the packet in a 16-nodes network as shown in figure 12. The horizontal axis is the packet latency grouped in 30 bins where each bin has a 20ms latency range. The vertical axis shows the frequency of the latency that falls into each bin. In the contention-based scheme (light grey bars) 77% of the packets are successfully delivered during the first superframe the packets generated and the rest of the packets are successfully delivered during the next superframe. In the GTS scheme (dark grey bars) 91% of the packets are delivered during their first superframe, 0.7% during their 2 nd superframe, 0.6% during the 3 rd to the 5 th superframe and around 7% of the packets take more than 5 superframes to complete transmission. As more packets need more than two superframes to complete transmission, the latency of the GTS scheme on average is much higher than the contention-based scheme.

CONCLUSIONS
IEEE 802.15.4 defines two MAC schemes: the GTS scheme and the contention-based scheme. This paper has analyzed the performance of both schemes when an event occurs and the packet arrival rate increases. We used packet delivery ratio, network throughput and packet latency as the quality of service parameters in measuring the performance of the network. The GTS mechanism performs better in a less dense network (network density equals 4 and 9) or in a dense network (network density equals 16) with a low packet arrival rate (λ=0.5 and 1). However, in a dense network, when the packet arrival rate increases, the contention-based scheme outperforms the GTS scheme as the performance of the GTS scheme significantly drops.