FF-MAC : Fast Forward IEEE 802.15.4 MAC protocol for real-time data transmission

This paper presents a Fast Forward MAC layer designed for hard real-time applications in wireless sensor networks. This protocol is an enhancement to the IEEE 802.15.4 standard MAC layer proposed for Low-Rate Personal Area Network. The energy conservation mechanism proposed by the current standard is quite efficient and very flexible. This flexibility comes from the ability to configure different duty cycles to meet specific application’s requirements. However, this mechanism has a considerable impact on the end-to-end delay. Our approach resolves the energy delay trade-off by avoiding the storage of the real-time data in the coordinator during sleep time. A new superframe structure is adopted and a deterministic reception scheduling is used. All the simulations were done using the network simulator 2 ‘NS-2’. The simulations outcomes show that this new proposed protocol performs better than the current standard and reduces considerably the end-to-end delay even in low duty cycle networks. Our protocol can also provides a delay bound for all network configurations which allows a better choice of the duty cycle for the required delay. Keywords-component; IEEE 802.15.4; WSN; Superframe; star topology; delay; Duty cycle; D-GTS


INTRODUCTION
Recent advances in Microelectronic Mechanical Systems (MEMS) and wireless communication technologies have made wireless sensor network or Internet of Things (IoT) one of the most important research fields during the last years. This type of network is distinguished from other wireless ad hoc networks by its unique characteristics; namely, limited memory and processing power, high energy constraint, high node density and hardly unreliable (lossy) wireless communication. These constraints are challenging and open many research perspectives in different areas of interest. The first research works were interested on increasing the node life-time by minimizing the power consumption. Since this energy is mainly consumed by the radio transceiver, many works were led to resolve this problem by enhancing the communication protocols in different OSI model layers "Open System Interconnection". In our work, we focus on the enhancement of the medium access control "MAC" sub-layer to minimize the end-to-end delay for time sensitive applications when considering a low duty cycle. We proposed a new IEEE 802.15.4-like MAC protocol that enhance the GTS (Guaranteed Time Slot) mechanism provided by the IEEE 802.15.4 standard [1] and bypass its limitations identified in this paper. Our work is based on the enhanced superframe structure of the IEEE 802.15.4 standard proposed in [2] (hereinafter, we will refer to this work as "enhanced superframe"). This new superframe structure gives the time sensitive packets the possibility to be sent and received in the same superframe and, by consequence, minimizes the probability of storing them during sleep period in the coordinator queue. In this paper we identified some limitation of this proposal and we provide an important enhancement to this new superframe structure by providing a deterministic medium access algorithm in reception mode to avoid the randomness introduced by CSMA-CA algorithm and to ensure the acquisition of timely information from source to destination.

A. General problem Description
The usage of a low duty cycle allows the network nodes to save the battery power by switching on and off the radio alternatively. According to the standard, typical applications for IEEE 802.15.4 devices are anticipated to run using a very low duty cycles (under 1%); this duty cycle is translated to a long sleep time (see equations (4) and (5)). In star networks or when some network nodes use a GTS to send their critical data; all packets have to be sent first to the coordinator which is responsible for forwarding them to their final destinations. When the packets are received by the coordinator, they are stored in its queue until the next superframe. Then the destination node can pull the pending data after a reception of the beacon frame. This process forces the coordinator to store packets during sleep time. Moreover, in this type of scenarios, the node may remain inactive for a long time which increases the communication latency, since during sleep time; data may have to wait until the next active portion (CAP "Contention An IEEE 802.15.4 node can operate in two alternative modes: (1) the beaconless mode, where the nodes use only the unslotted CSMA-CA protocol to randomly manage channel access and avoid collisions. Since the IEEE 802.15.4 frame size is very small, this modified version of the standard CSMA-CA algorithm doesn"t use the RTS/CTS mechanism to resolve the hidden terminal problem. The synchronization is not needed and the Quality of Service "QoS" mechanisms are not provided in this mode, which makes it more suitable for applications without QoS requirements. And (2) the beacon-enabled mode, that uses a superframe to control the channel access. The superframe structure may be divided into three periods (see Figure 1): (1) contention access period (CAP), where network nodes use the slotted version of the CSMA-CA algorithm to contend for the channel access. (2) Collision free period (CFP) where the channel is reserved and can be used exclusively by the reserving node using a slot labeled Guaranteed Time Slot "GTS". The CFP period is optional and used by low-latency applications or applications requiring specific data bandwidth. And (3) the inactive portion (sleep period), which is also optional and used when the network nodes don"t need to be awake all the time (suitable for most of wireless sensor network applications to minimize energy consumption).
In beacon enabled mode, the entire PAN "Personal Area Network" is managed by the PAN Coordinator. It advertises periodically a packet named "beacon" at the beginning of the superframe. This beacon is used to synchronize the attached devices, to identify the PAN, and to describe the structure of the superframe. It may also provide additional information about the pending addresses and the GTS configuration if needed. The superframe periods timing relay on the following parameters: beacon order (BO), the superframe order (SO) and the Final CAP Slot, where 0 ≤ SO ≤ BO ≤ 14. These parameters are specified in the beacon superframe which allows the network nodes to determine the superframe structure (the active period, The Contention Access Period "CAP" length, the sleep time duration and the slot duration). The formula (1), (2) and (3)  Where aBaseSuperframeDuration and aBaseSlotDuration are two constants predefined by the standard as 960 and 60 symbols respectively and denote the minimum length of the superframe and the slot respectively. Each symbol corresponds to 4 bits. BI (beacon interval) is the length of the whole superframe (including active period and inactive period). It is bounded by two beacon transmissions. The SD (superframe duration) represents the active period duration. And the "sd" (slot duration) is the sixteenth of the active period. In the beacon-enabled mode, the PAN coordinator may allow the other network nodes to reserve a dedicated time slots to satisfy the bandwidth and latency requirements via a TDMA-like "Time Division Multi Access" medium access method. These slots are labeled as GTS. Each node can allocate up to two GTSs (one for receive and one for transmit), and one GTS may have more than one slot. The number of GTSs is at most seven. These contiguous time slots form a Contention Free Period (CFP) which is placed at the end of the active period of the superframe. To use the GTS, the node has to send a GTS request to the PAN coordinator in the CAP (Contention Access Period), and when this request is honored, the coordinator will advertise in its beacon all the information related to the GTS allocation. The node has to keep tracking the beacon for any possible changes (deallocation or reallocation). If the node does not receive the beacon, it is not allowed to use its GTS and has to wait for the next beacon. The transmission during the GTS is indirect (i.e. data has to go through the coordinator, and then the coordinator advertises the pending address in the beacon so that the destination can poll it by sending a data request MAC command).
The energy limitation in WSNs is one of the most challenging aspects involved when designing protocols and considering QoS support in the network. This energy is directly related to the lifetime of the network. As we mentioned in the previous section, the IEEE 802.15.4 provides also a mechanism for power saving. This feature is possible only in beaconenables mode when the BO is different than the SO (SO<BO). This sleep-awake scheme is suitable for wireless sensor networks since the nodes do not need to stay awake all the time, they may operate for a short time to send or receive collected data. This mechanism allows the devices to save power during sleep time.
However, the choice of a low duty cycle is made at the cost of a higher latency. Since during sleep time, data may have to wait until the active portion of the next superframe to start the transmission. This time can be computed as the ratio between the superframe duration and the beacon interval that can be related to BO and SO via the following equation:

III. RELATED WORKS AND BACKGROUND
One of the most difficult problems to resolve in wireless sensors networks is the energy-delay tradeoff. The first MAC layers proposed in this field tends to reduce the power consumption since energy is a critical resource in wireless sensor nodes. For instance, S-MAC [3], T-MAC [4] H-MAC [5], X-MAC [6], WiseMAC [7], U-MAC [8], M-cube [9], RMAC [10] and Z-MAC [11] are duty cycle based MAC protocols that can specify sleep and wake up times for network nodes within the frame. The IEEE 802.15.4 standard can also be configured to operate in this mode.
However, in recent years, many WSN and IoT applications appeared and many of them require a certain level of QoS "Quality of Service" for time sensitive data. In some applications, the information transported in the network may lose its meaning or may have a negative effect when it reaches the destination too late. Hence, QoS may be as important as the energy conservation in these applications. For instance, this fact leads the ISA100 group that standardizes wireless systems for industrial automation application, to specify in the ISA100.11a standard [12] different level of quality of service (classes from 0 to 5), depending on the importance of message timeliness. Reference [13] made a survey on real-time QoS support in wireless sensor networks and presented some realtime solutions including MAC and routing protocols, data processing strategies and cross-layer designs.
As we presented in the previous section, the IEEE 802.15.4 standard has proposed the GTS mechanism to meet these requirements. However, the standard presents some limitation identified by many researcher and many works were led to improve the GTS mechanism proposed by this standard. These works were interested on different aspect such as GTS allocation, GTS management and GTS efficiency. In [14], the superframe were extended to increase the number of GTS. The aim is to reduce the waste of channel bandwidth and to enhance the QoS support for multiple devices. Reference [15] divided the GTS length to slots smaller than a standard superframe slot to minimize the waste of the channel bandwidth. In [16] an implicit GTS allocation mechanism (i-GAME) is proposed. His protocol uses the round-robin algorithm to share the GTS by several nodes. [17] Proposes a method to resolve the insufficient GTS slot problem (that are limited to 7 by the standard specification) by allocating the GTS with higher priority first. The GTS requests are classified according to their priorities which allow GTSs to be allocated first for nodes having real-time data by giving them higher priorities. It overcomes the under utilization of GTS bandwidth and the number of the concurrently allocable GTSs. [18] proposed a fully deterministic MAC protocol that supports a predefined time slots used for real-time association. This new scheme tends to avoid unsuccessful GTS request and to avoid also the collision during the GTS between nodes of different clusters in the same transmission range. Other works [19] [27] were interested on the improvement of the CSMA-CA algorithm to add QoS support for real-time applications.
In [2], we identified some other limitations related to energy-delay tradeoff and we proposed a new superframe structure to allow sending and receiving the real-time packets in the same superframe to avoid storing data during sleep time that may be very long. The simulation results proved that this new protocol has decreased the end-to-end delay compared to the current standard even when the network uses a low duty cycle. This protocol is covered in more detail in the next section since we propose in this paper a solution for its limitations that we identified.
Most of these algorithms and improvements can be easily adapted to our new protocol to improve and optimize the GTS usage.

A. Enhanced superframe structure
We proposed in [2] an enhanced superframe structure of the current IEEE 802.15.4 standard. This new superframe structure allows a faster access to the channel and avoids a high additional delay caused by the sleep time for time sensitive data. This proposal tends to minimize the end-to-end delay, even when considering a very low duty cycle, by sending and receiving the real-time data in the same superframe.
This new superframe has the same periods defined by the IEEE 802.15.4 standard (i.e. contention access period, contention free period and sleep time). The beacon is also sent at the beginning of each superframe and contains all information about it. However, in the new superframe, the CFP is placed after the beacon transmission. The CAP is placed between the end of CFP and the end of the active portion. This new scheme is very important and gives three main improvements. (1) Nodes with real-time data can access the channel faster than those having normal data, since they don"t need to wait for the end of the CAP to send their data. (2) The www.ijacsa.thesai.org real-time nodes don"t need to contend for the channel access in the CAP, since they send all their data in the CFP period which is placed at the beginning of the superframe. This new scheme may improve the performance of the other nodes and decrease the bandwidth and energy wastage due to unnecessary contentions. (3) The third improvement is very important since it is related to the energy-delay tradeoff. This protocol gives the possibility to the real-time data to be sent and received in the same superframe. Hence, we avoid the additional delay caused by storing data in the coordinator during sleep time. After the end of the CFP period, the coordinator need to inform the network nodes about the new packets sent in the previous CFP period. For this purpose we created a new packet labeled Pending Real-Time Packets Advertisement "PRTPA" that contains a list of all destination nodes having pending real-time data. Thereby, these nodes will send a data request command to the coordinator to poll this data in the CAP of the same superframe.
This new superframe has shown an important enhancement on the end-to-end delay since the data storage depends less on the sleep time. However, the use of the CSMA-CA algorithm even with an enhanced version made the delay to be dependent on the number of nodes. The randomness of the CSMA-CA method allows other non real-time packets to gain channel access before real-time ones. Hence, sometimes delay sensitive data may be stored during sleep time. Moreover, the usage of this mechanism for this data introduce energy and bandwidth wastage caused by the CSMA-CA (backoffs and randomness) Hence, the usage of a weighted version of the CSMA-CA algorithm in this approach represents its main week points. The different priorities (Real-time and Best-effort data) were translated into weighted backoffs by using a shorter backoff interval for Real-time data than the Best-effort one. The simulations show that this method improved the delay performance compared to the current standard. However the measured delay still depends on the nodes density because the used CSMA-CA does not insure the channel access to the Real-Time data. It only increases the successful channel access probability without any guarantee. This may force the coordinator to keep some critical data packets during the sleep time. This problem is illustrated in Figure 2 that shows how the end-to-end delay increases when the density increases. Figure 2 : End-to-End delay for different network sizes using the enhanced superframe [2] To solve all these problems, we proposed a new protocol named "FF-MAC"

B. FF-MAC
FF-MAC stands for Fast Forward MAC protocol. This new protocol is designed to allow data transmission inside the cluster in a very short time. This new MAC protocol is based on the IEEE 802.15.4 standard by using the enhanced superframe structure presented above.
In our protocol, we propose the use of a deterministic medium access schedule to receive HRT data during CAP. In FF-MAC we keep the same enhanced superframe structure, the changes affect only the CAP which will be separated into two periods as described in Figure 3: (1) CAP for normal data and MAC commands packets. The network nodes will use in this period the standard CSMA-CA to send and receive. (2) The D-CPF, which is a new period dynamically created by the coordinator. The coordinator uses this period to send HRT data to their corresponding destination nodes in a contention free way. Since the coordinator has a clear view about the QoS requirements after receiving real-time data during CFP, it can select the destination nodes concerned by the real-time pending data and create a TDMA schedule forming a D-CFP period, the algorithm 1 is used in this case. Same as the CFP, The D-CFP period is formed by a set of contiguous D-GTS "Dynamically allocated GTS". All these GTSs have to be set to receive only mode. This period appears only when there is some pending time sensitive data in the coordinator pending packet queue.
For efficiency purposes, these dynamically reserved GTSs are not related to the number of slots, but to the number of pending packets. Hence, we avoid a reservation of periods longer than what is needed. The coordinator calculates the required duration for each destination and creates a TDMA schedule. This schedule is sent to the network nodes using the new PRTPA packet; the message sequence chart is described in Figure 4. This time depends on the packet size, number of pending packets, the bandwidth provided by the PHY layer, time needed for Acknowledgement packet if required and the IFS needed. The Pull data request MAC command is not needed to retrieve the pending data from the coordinator. The destination node only needs to switch there transceiver to receive mode (see algorithm 2).

ALGORITHM 1: FOR THE COORDINATOR
-Sending the beacon at the beginning of the superframe (including the pending data) -Exchanging real-time data in the CFP period.
-If the coordinator has received data in the CFP Send "PRTPA" packet with D-CFP schedule -Else Send empty "PRTPA" packet to trigger the start of the CAP.
However, since the CAP length is limited and some packets need to be sent during CAP (e.g. management packets), the PAN coordinator shall preserve the minimum CAP length of aMinCAPLength and take preventative action if this value is not satisfied. The CAP minimum length "aMinCAPLength" is the same as the one defined by the IEEE 802.15.4 standard as As we noticed earlier, these new GTSs are dynamic which means that they appear only when needed and if no Real-Time data is pending; the corresponding D-GTS will disappear immediately. The D-GTS size is different than the corresponding GTS size, since it depends on the number of packets and not the standard slot size.
Since the WSN communication is unreliable, the network nodes may miss some important packets. One of these packets is the update packet (PRTPA) that we proposed. Hence, if it"s lost by a node, the latter will miss the information about the new D-CFP (which is dynamically changed in every superframe, depending on the pending real-time packets); For this reason, this node will suppose the worst case where the CAP reaches the minimum duration and will delay its data transmission until the last aMinCAPLength time before the end of the CAP. Then, it will try to send its packets (see algorithm 2). This handling will allow the protection of D-CFP period from unexpected collisions due to PRTPA packet loss.

V. PERFORMANCE EVALUATION
The performance evaluation simulations were built upon ns-2 [28] "network simulator 2" (version 2.34) using the WPAN "Wireless Personal Area Network" model [29] that simulate the IEEE 802.15.4 standard. The GTS management is missing in the official ns-2 version. It was implemented in our previous work [2].
The simulations make the following assumptions. For the physical layer, we use the IEEE802.15.4 PHY 2.4 GHz that provides 250 kbps. The IEEE802.15.4 MAC layer operates in beacon enabled mode since the GTS mechanism is only allowed in this mode. We use a star topology in all our simulations. All the scenarios are similar and contain the PAN coordinator which is placed in the center of the star network to reach all the network nodes, and a variable number of nodes randomly distributed over a 15m radius circle. The routing protocol is disabled since we evaluate our approach without the influence of the upper layers. In our simulation we disabled ARP (Address Resolution Protocol) since it"s not needed in ZigBee networks. For MAC layer reliability, all the packets require MAC layer acknowledgement. The application layer uses 50 bytes UDP packets with data rate of one packet each BI (Beacon Interval) since in real word, the BO may be chosen depending on the sensing frequency. The traffic load is set by varying the number of network nodes.
In this performance evaluation section, we compare three protocols; The IEEE 802.15.4 standard, the enhanced superframe, and the FF-MAC proposed in this paper.
Many important and common points are highlighted by the simulation results. First, all these scenarios show that the endto-end delay is considerably minimized using FF-MAC in all scenarios. Second, the sleep time has no impact on this delay when using our new protocol. Third, the node density does not influence the delay for real-time data. We will discuss in the following these results in more detail. Figure 5 show the evolution of the end-to-end delay for different beacon order values, SO "Superframe Order" is fixed to 5. These results are obtained for a 21 nodes network. We can clearly notice that the enhanced superframe approach provides a better delay performance than the current IEEE 802.15.4 standard. However, the delay increases considerably for both of them when the sleep time increases. As we discussed in section 4, both of these protocols use the random CSMA-CA algorithm to receive time sensitive data. The randomness inherent to this algorithm may force the coordinator to store data during the 6 | P a g e www.ijacsa.thesai.org sleep time. The difference between these two algorithms is that in the enhanced superframe we have the possibility to send and receive data in the same superframe, and we used a weighted version of the CSMA-CA which gives a higher probability to access the channel for emergency data among normal data. In the same figure we notice that our FF-MAC protocol resolved this problem and allows a very fast transmission that doesn"t depends on the sleep time. This is exactly what was expected by our proposed protocol since we replaced the random CSMA-CA algorithm by a deterministic scheduling. The delay is very low and we can provide a delay bound for different scenarios which is not possible in the IEEE 802.15.4 standard. In Figure 6, we increased the nodes density in the network to evaluate its impact on the end-to-end delay, we can notice that the delay has increased considerably for both of the first protocols (enhanced superframe and IEEE 802.15.4) while the FF-MAC provide nearly the same delay shown in the Figure 5. We can explain this by the usage of the D-CFP which allows a dynamic reservation of the bandwidth for packets with delay constraint. These packets are sent without contention.  In Figure 8, we measured the end-to-end delay against the beacon order for different node numbers to evaluate the behavi or of FF-MAC when the number of the network nodes increases. For all chosen densities (21, 31, 41, 51, 61, 71 and 81), the FF-MAC provides a very stable delay that doesn"t follow the density changes. Our deterministic algorithm provides the required quality of service even in a dense network. The impact of the node density on the delay is also shown in Figure 9, where BO and SO are fixed to set a very low duty cycle (BO=10, SO=4: DC = 1.56%). We can easily notice that the density has no impact on our FF-MAC, while it increases considerably the delay for the other protocols.

VI. CONCLUSION AND PERSPECTIVES
In this paper we made an overview of the IEEE 802.15.4 MAC layer and the enhanced superframe structure of this standard. We presented some limitation of the new superframe structure that is mainly related to the usage of the CSMA-CA algorithm. Then we presented a new IEEE 802.15.4-like MAC protocol named "FF-MAC". This protocol is designed to solve the energy-delay tradeoff for wireless sensor network in applications that may have critical data. Our key contribution is the usage of a deterministic scheduling for reception to insure data reception by its destination, for the packets sent in the CFP period, in the same superframe.
The simulations outcomes proved the enhancements expected by FF-MAC. These results show that FF-MAC outperforms both the IEEE 802.15.4 standard and the enhanced superframe, and provides a very low delay. The duty cycle and nodes density have no impact on the delay which make our protocol suitable for applications with heterogeneous data priorities and QoS requirements.
The presented results are encouraging and open many research perspectives. As a first step we plan to test our protocol in real world environment using iLive sensors [30]. This step is very important to validate our approach taking into account the real world impairments.