1 Introduction

A wireless body sensor network (WBSN) is a particular type of wireless sensor network (WSN) composed of small biomedical sensor nodes placed on the body of a person to allow monitoring diverse physiological signals and actions. WBSNs are essential to build healthcare systems to assist clinicians in monitoring or delivering care remotely without sacrificing the patient’s quality of life [1].

Particularly important for the good performance of a WBSN is the medium access control (MAC) layer of the communication protocol stack, since it contributes directly to the channel access delay, the bandwidth utilization, and the energy consumption [2]. The primary function expected from a MAC layer is to rule the medium access of a node in order to avoid or minimize packet collisions. The algorithms used in this task are normally based on random or scheduled access schemes [3].

In random access schemes, nodes contend for the wireless channel access to send packets, eventually originating packet collisions in the network. The carrier sense multiple access with collision avoidance (CSMA-CA) algorithm [4] is the most representative example used in wireless random access protocols.

Scheduled access schemes are generally variants of the time division multiple access (TDMA) technique. Time is split into equal intervals known as superframes. Each superframe is further divided into time-slots. Nodes use dedicated time-slots to transmit data without the need to contend for the medium. Beaconing is the traditional approach to facilitate the network time synchronization, but beaconless solutions may also be used. For example, IEEE 802.15.6 [5] and WiMedia MAC [6] use beacon frames for time synchronization, while TSMP [7] and GinMAC [8] use the exchange of data and control messages. According to [9], GinMAC is the MAC protocol more appropriate to serve delay-intolerant and loss-intolerant applications. However, GinMAC was conceived for networks with very low sampling frequencies [8], and so it does not fit in the WBSN requirements. IEEE 802.15.4 [4] can operate either in CSMA-CA or in superframe structures bounded by beacon frames sent by the coordinator. Hybrid schemes using TDMA and CSMA, such as Z-MAC [10], have also been developed to overcome the drawbacks of both scheduled and contention methods.

Studies have shown that three main factors contribute to the wireless channel characteristics of a WBSN [11]: (\(i)\) environment: where the WBSN user is located (i.e., indoors, outdoors) and the interference degree from other nearby users or external radiofrequency sources; (ii) link type: where the sensor nodes are located (i.e., in-body, on-body, off-body), whether the linked sensor nodes are located in distinct parts of the body, and whether the linked sensor nodes are in line-of-sight or not; (iii) activity: the user’s current activity (e.g., walking, running, jumping) and the duration of the activity. Moreover, the transmitted power in wireless networks generally decays with \(\hbox {d}^{\eta }\). In free air space, \(\eta \) is equal to two, but in a line-of-sight propagation along the human body, \(\eta \) ranges from three to four, depending on the device position on the body, and from five to six in non-line-of-sight situations [12]. Also, the closer the antenna is to the body, the higher is the path loss exponent [13]. As a consequence, it is expected that the performance of a MAC protocol degrades when sensor nodes are close to human bodies, as in WBSNs. Such degradation may be particularly important with beaconed MAC protocols, as the beacon reception is crucial for the network synchronization. In this way, it is interesting to study the performance of a beaconed TDMA MAC protocol using real WBSNs, and compare it with the performance of a CSMA-based protocol in the same network.

The first part of this paper presents a comparative performance study between two MAC protocols in a WSN whose sensor nodes are near the human body. The MAC protocols are based on random and scheduled access schemes, implemented respectively with the non-beaconed IEEE 802.15.4 [4] and the beaconed AR-MAC protocol [14], both described in the next section. IEEE 802.15.4 was selected because it is a standard used in many wireless sensor networks, including ambient assisted living (AAL) systems. AR-MAC was selected because it is a protocol planned to operate with WBSNs [14] and, therefore, it is interesting to test its performance in a real scenario. The second part of the paper presents a TDMA/CSMA hybrid scheme and a lightweight algorithm to improve the network performance obtained with AR-MAC and IEEE 802.15.4. Evaluation tests with the hybrid scheme are also presented.

Studies have been published comparing the performance of MAC protocols in WSNs. Many of these studies are carried out in simulators, such as [1517]. However, network simulation studies use frequently unrealistic assumptions, such as, flat physical environment, circular radio transmission area, channel with bidirectional symmetry, and no fading or shadowing phenomena. Moreover, the overhead of the software components in a WSN cannot be ignored because sensor nodes present very limited computing resources. The difference of oscillator frequencies encountered in the sensor nodes should also be considered. For example, the oscillator frequency in a set of fifteen sensor nodes presented a coefficient of variation (i.e., variance/mean) of 16 %. As these aspects are often not modeled by the generic network simulators, WSN simulations results may diverge significantly from the reality, as shown in [18, 19]. All those reasons justify the importance of performance studies carried out in real scenarios. Yet, the number of studies comparing MAC protocols in real WBSNs is very small, which stresses the relevance of this paper. A representative work is [20], where the effect of the human body on the performance of Bluetooth and IEEE 802.15.4 is compared. Monitoring tests carried out in a hospital using IEEE 802.15.4 are found in [21, 22].

The main contributions of this paper are the following: \(i)\) to present and share with the research community the results of the communication tests in a real scenario with WBSNs using MAC protocols based on CSMA and beaconed TDMA; ii) to introduce a hybrid TDMA/CSMA scheme and a lightweight algorithm to improve the transmission performance; iii) to present and discuss the results obtained with the hybrid scheme. The rest of the paper is structured as follows: the MAC protocols used in this study are described in Sect. 2; the experimental setup is presented in Sect. 3; the results of the performance tests with AR-MAC and IEEE 802.15.4 are shown and discussed in Sect. 4; the hybrid TDMA/CSMA scheme and the lightweight algorithm are presented in Sect. 5; the results of the performance tests with the hybrid scheme are shown and discussed in Sect. 6; finally, some conclusions are drawn in Sect. 7.

2 MAC Protocols Description

This section describes the protocols used in the comparative study, the IEEE 802.15.4 and the AR-MAC. The description of IEEE 802.15.4 will be brief, since it is a well-known standard for WSNs.

2.1 IEEE 802.15.4

The IEEE 802.15.4 standard [4] specifies the physical layer and the MAC layer for short range, low power WSNs. It supports a maximum rate of 250 kbps in the 2.4 GHz band. The MAC sub-layer uses the CSMA-CA algorithm, which can operate in slotted or unslotted mode. This work used the unslotted mode, and basically it works as follows. When a node needs to transmit a frame, it first draws a random backoff. Once the backoff period expires, the node performs one clear channel assessment to determine whether the channel is busy or not. If the channel is available, the frame is sent. If the channel is not available, the node draws another random backoff from a larger window, and the process is repeated. The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure varies between zero and five (four is the default). Depending on the flag state in the transmission options, the received frame may be acknowledged. If that flag is set and if the acknowledgment is not received shortly after the end of the transmission of the frame, the sender retransmits the frame. If a frame is not acknowledged after three retransmissions, the MAC sub-layer shall assume the transmission has failed and notify the next higher layer of the failure.

2.2 AR-MAC

AR-MAC [14] is a centrally coordinated TDMA-based protocol that inherits some concepts from the IEEE 802.15.4 and LPRT [23], namely the contention access period (CAP), the contention free period (CFP), the normal transmission period (NTP), the retransmission period (RP), the non-active period (NAP), and the NTP acknowledgment (ACK) bitmap. However, AR-MAC introduces novel concepts and features to meet the required WSN requisites, as discussed next.

Beacon Period As shown in Fig. 1, the high-grained superframe starts with the Beacon Period (BP). The base-station (BS) broadcasts a new beacon frame in every BP. Beacon frames are used for sending data to sensor nodes, synchronizing and announcing the WSN. To improve the probability of a sensor node receiving the beacon, the BS transmits a sequence of redundant beacon frames \(b_{1}{\cdots }b_{n}\) equally spaced in time with consecutive beacon numbers.

Fig. 1
figure 1

Superframe structure in the AR-MAC protocol

CAP This period follows the BP and it may be used for sending MAC commands and responses, as well as to convey low transmission duty-cycle traffic. The last time-slot of the CAP is announced in all beacon frames.

CFP This period uses TDMA and is composed of the NTP and the Retransmission Period (RP). The NTP is used for sensor nodes to transmit new data. Lost data are retransmitted in the RP, which is composed of the Normal RP (NRP) and the Extra RP (ERP). Data packets transmitted to the BS during NTP are acknowledged through the NTP ACK bitmap present in the beacon of the next superframe. The BS sends the NTP ACK bitmap only if one or more packets failed to be transmitted in the NTP of the last superframe. Unacknowledged packets in the NTP ACK bitmap are retransmitted in the NRP of the current superframe. Data packets sent in the NRP are acknowledged through the NRP ACK bitmap broadcasted in the next superframe, as described in the following topic. Data packets not acknowledged by the NRP ACK bitmap are retransmitted once in the ERP. NRP and/or ERP are present in a superframe only if retransmissions are required in the respective periods. If a sensor node does not receive any beacon during the BP, it may continue to send its new data in the NTP, since a sensor node’s clock drift in the order of microseconds allows the WSN to continue synchronized during a few consecutive beacon intervals. However, a sensor node cannot retransmit data in the RP because the ACK bitmaps are not available. As the clock rates of the sensor nodes are not equal and the timers are imprecise, a small number of safeguard slots are required to avoid the superposition of adjacent transmissions.

NRP ACK bitmap To show the use of the NRP ACK bitmap, let us consider a superframe without retransmission requests from the BS and that some critical data packets were lost during NTP. The lost packets are identified through the NTP ACK bitmap sent in the beacon of the next superframe. According to this bitmap, sensor nodes retransmit the lost data packets once in the NRP, independently of being critical or not. Then, critical data packets are retransmitted as many times as possible in the remaining available slots in the NRP. These available slots must be fairly distributed through the sensor nodes with critical data packets to retransmit. A sensor node stops the retransmission trials after receiving the ACK frame. Only critical data packets are acknowledged, except in the last retransmission. If critical data packets fail to be retransmitted in the NRP of the superframe, then the BS includes the NRP ACK bitmap in the beacon of the following superframe. So, critical data packets may be retransmitted once again in the ERP, improving the probability of being delivered. The BS sends the NRP ACK bitmap only if one or more critical packets failed to be retransmitted in the NRP of the last superframe.

The use of the NRP ACK bitmap mechanism may contribute to out-of-order packet delivery and increase the delay, although keeping it controlled and bounded to a maximum value.

Criticality and activity bitmaps During the reconfiguration of a WSN, the BS announces in the beacon frames the superframe specifications and the ACK bitmaps, as well as the criticality bitmap, the activity bitmap, and the new operational parameters of some sensor nodes along with other relevant information. The criticality bitmap informs the WSN about the signals considered critical by the BS, in order to improve or protect the quality of service of such signals, as the packet delivery ratio. The activity bitmap allows for the BS informing on the activity state of all sensor nodes in the WSN, so that sensor nodes are capable of optimizing the time-slots utilization without bandwidth waste.

Coloring scheme Sensor nodes with low sampling rates and flexible time delays should not transmit in every superframe in order to save energy and free time-slots for retransmissions, thus contributing to improve data delivery robustness. To implement this strategy, a coloring scheme is applied to sensor nodes and superframes [14].

Time-slots assignment The BS only sends the superframe specifications and the ACK bitmaps during the steady state of the network. As the BS does not assign directly the time-slots to the sensor nodes, these must run a distributed algorithm to compute which time-slots should be used to (re)transmit data without interfering with each other, in accordance with a predefined order schema.

The AR-MAC design goals and the solutions used to achieve them are summarized in Table 1. The strategy based on colors attributed to superframes and sensor nodes contributes to enhance robustness, by reducing the number of transmissions and releasing bandwidth for eventual retransmissions. High-grained superframes may also improve robustness, because bandwidth saving increases the retransmission capacity. An array of short-size beacons is sent at the start of each superframe to reduce the beacon loss probability, thus improving communication robustness too. To afford bandwidth efficiency, high-grained, colored superframes are used. Specific bitmaps, regarding the activity and criticality status of sensor nodes, are also used to optimize the bandwidth utilization. Timeliness is provided by the use of colored superframes and retransmissions performed in specific time periods. Power efficiency is achieved putting sensor nodes in sleeping mode when they are not communicating and using strategies based on colors and short-size beacons. To shorten the beacon size, the time-slot assignment is carried out using a distributed slot allocation algorithm. Network scalability is pursued with the use of high-grained superframes, colored superframes, activity bitmap, and cluster-mode operation. Coexistence capacity is provided through a collaborative and distributed algorithm that schedules dedicated time-slots to sensor nodes in the high-grained superframes. The operation in cluster mode offers the ability of forwarding frames in two-tier network structures, which improves the power efficiency and the scalability of the WSN.

Table 1 Strategies included in AR-MAC to pursue the design goals

3 Experimental Scenario

The experimental scenario was implemented in a life sciences research laboratory, as illustrated in Fig. 2. The desks are near to very large glass panels. A plywood bookshelf and a thin brick wall separate room 1 from room 2. The remaining walls are made of brick. The furniture is made of plywood. The area of the first room is 16 \(\times \) 10 \(\hbox {m}^{2}\) and the area of the second room is 19 \(\times \) 10 \(\hbox {m}^{2}\). The researchers may be moving in this area as they attend to their tasks, they may be standing by any of the laboratory benches, or they may be sitting at desks. Two researchers were asked to carry in a pocket of their white coats two small unobtrusive plastic boxes. Each box contains two sensor nodes and two AAA batteries, as pictured in Fig. 3. The antennas of both sensor nodes point to the same direction. So, each volunteer carries four sensor nodes. Figure 2 shows the two volunteers carrying the two boxes with both sensor nodes, shown as black and white dots. The volunteers were requested to perform their usual tasks in the laboratory. Most of the time, the volunteers were sat at their desks. The BS was placed on the top of a bench in the first room at a distance of 3 m from the entrance to the second room.

Fig. 2
figure 2

Laboratory layout and communications architecture

Fig. 3
figure 3

Box with two sensor nodes and the AAA battery enclosure

The sensor nodes and the BS were built-in based on ZigBit-A2 (or ATZB-24-A2) modules [24]. So, the computing performance of the BS is identical to that of a sensor node. The ZigBit-A2 modules are compliant with IEEE 802.15.4-2003 standard and operate in the 2.4 GHz ISM band at a bit rate of 250 kbps. AR-MAC was implemented in these modules too. Each module contains one AT86RF230 transceiver and one ATmega1281V microcontroller, which runs the TinyOS operating system at a clock frequency of 4 MHz. Sensor nodes use dual chip antennas and the BS uses a 50 \(\Omega \) external antenna. The transceivers of the BS and sensor nodes transmit at a power of 3 dBm.

4 Tests with AR-MAC and IEEE 802.15.4

To evaluate the performance of two protocols using distinct strategies (TDMA with beaconing vs. CSMA), experiments were firstly carried out with the eight sensor nodes transmitting in one-hop (directly) to the BS using the protocols AR-MAC and IEEE 802.15.4. In both cases, each sensor node sends wirelessly to the BS a data packet with a payload of eight bytes every 250 ms. The reason for sending this number of bytes will be explained in Sect. 6. The BS of the AR-MAC WSN sends a beacon with six bytes of payload every 250 ms. This period was chosen for AR-MAC to guarantee a maximum delivery delay of 500 ms, in accordance with IEEE 1073. AR-MAC and the CSMA-CA algorithm were parameterized with the values #1 presented in Table 2. CSMA-CA uses the default parameters of IEEE 802.15.4.

Table 2 Configuration parameters used in the test platforms

A channel analyzer showed that the transmission channel presented low radiofrequency interference levels. To reduce the impact of spurious interferences on the transmission channel, sensor nodes and the BSs transmit at maximum power (\(+\)3 dBm). The test duration was approximately two hundred minutes.

4.1 Results

Table 3 presents the results obtained for the packet loss ratio, one-way delay, and average duplicate packets. One-way delay is defined in the context of this study as the time spent between sending an application data packet from a sensor node and its reception by the application layer of the BS. The average duplicate packets ratio of a sensor node is defined here as the percentage of the total number of data packets received in duplicate by the application layer of the BS comparatively to the number of application data packets received for the first time from that sensor node. Duplicate packets must be avoided in a WSN to save bandwidth and energy consumption.

Table 3 Experimental results with AR-MAC and IEEE 802.15.4

Packet loss It is noted that AR-MAC WSN registered clearly lower packet delivery degradation than IEEE 802.15.4 WSN. However, AR-MAC presented a global average value of 1.1 %, which is inappropriate for a series of scenarios, such as environments where multiple people sharing a space have to be continuously monitored in real-time with proper quality of service, such as, for example, in medical intensive care units.

The main reason for AR-MAC WSN presenting such packet loss ratios is that sensor nodes could not receive beacons in certain situations for considerable time intervals. Indeed, it was registered that the maximum numbers of successive superframes without receiving a beacon ranged from 12 to 60 superframes, depending on the sensor node. As the beacon frame is used by the automatic request mechanism to recover lost data and as there is a maximum (three) of successive packet transmissions in the NTP without receiving a beacon, it is clear that the performance of AR-MAC is very dependent on the beacon reception ratio. So, it is predictable that the AR-MAC performance may improve by increasing the transmission power of the BS or shortening the distance between the sensor nodes and the BS.

The packet loss ratio obtained with IEEE 802.15.4 is justified by the behavior of the operating system used in the network devices, as well as the software execution time. Such overhead in terms of delay may be responsible for packet loss. To understand why, let us suppose that a packet has been received by the BS’s transceiver. After processing it, the physical layer software triggers an event to forward the payload to the upper protocol layers. Since the delivering time to the application layer is not null, another packet may be received by the BS’s transceiver during this transactional phase. In this case, the operating system does not attend the hardware interrupt from the transceiver indicating that a new packet is ready to be transferred to the microcontroller, and the new received packet is dropped. This situation was experimentally observed in the sensor nodes used in this study. It is possible that other operating system might attend the hardware interrupt from the transceiver signaling a new packet and drop the packet in process previously received. In both cases, an incoming packet is completely processed by the application layer of a sensor node only if its transceiver does not receive other packet during a specific time interval.

Latency Considering all sensor nodes, the maximum one-way delay registered for AR-MAC ranged from 321 to 379 ms with an average maximum value of 352 ms, and for IEEE 802.15.4 it ranged from 47 to 66 ms with an average maximum value of 59 ms. The average and maximum one-way delays obtained for AR-MAC are naturally higher than those obtained for IEEE 802.15.4, because AR-MAC postpones retransmissions for the next superframes. Nevertheless, AR-MAC guarantees a maximum one-way delay which is bounded by twice the superframe duration. If this maximum delay is admissible, then for the tested protocols and the considered metrics, the beaconed TDMA MAC protocol clearly outperforms the random access protocol in a system of WBSNs.

Duplicate packets It is observed that AR-MAC also presented lower average duplicate packet than IEEE 802.15.4.

5 Hybrid MAC Scheme

Taking into account the guidelines obtained from Sect. 4, a hybrid TDMA/CSMA scheme for clustered networks was developed to improve the transmission performance, as described next. Sensor nodes are grouped in multiple clusters forming a two-hop network. Each cluster operates internally using AR-MAC, as shown in Fig. 4. In this way, the cluster-head sends periodically a beacon, and the cluster- nodes send data in the CFP to the cluster-head. Duplicated packets are discarded by the cluster-head. Clusters operate in distinct channel frequencies to avoid mutual interferences.

Fig. 4
figure 4

Operation example of the hybrid MAC protocol

To eliminate the need of receiving beacons from the BS, each cluster-head sends to the BS the aggregated data packet in the CAP using the CSMA-CA algorithm. This packet contains the data received by the cluster-head in the RP and CFP of the last superframe. If the cluster-nodes send the same number of bytes (NB) to the cluster-head, then the following expression must be respected to prevent the aggregated data overflowing the frame payload:

$$\begin{aligned} \hbox {NB} < \hbox {MPL}/(3^*\hbox {CSN}+1) \end{aligned}$$
(1)

where MPL is the maximum payload of the frames, and CSN is the number of sensor nodes in the cluster (excluding the cluster-head). The same channel frequency (distinct of the cluster frequencies) is used by all cluster-heads to send data to the BS.

To avoid the risk of being discarded, the cluster-head should send a data packet only when the BS is ready to receive it. For this purpose, the BS piggybacks the delay information (DI) into the acknowledgement frames. The delay information provides the difference between the arrival time of the data packet received from a cluster-head and the arrival time of the data packet received from the cluster-head used as reference. Cluster-heads use the delay information to adjust dynamically the superframe duration, so that beacons are sent separated by a time delay equal to the beacon interval (BI) divided by the number of clusters. Figure 5 illustrates this principle for two cluster-heads. The reception failure of a few acknowledgment frames does not compromise the operation of the process, because in such cases the sensor node transmits after one beacon interval by default. Figure 6 presents the pseudo-code of the algorithm to be implemented in the BS and in the cluster-heads to provide such functionality. The algorithm is lightweight enough to be run by sensor nodes with low computing capacities. As it will be seen in the next section, the simple use of CSMA-CA to transmit data from the cluster-heads to the BS does not provide a packet loss ratio lower than 0.2 %, even with only two cluster-heads.

Fig. 5
figure 5

Cluster-heads send beacons with relative delay

Fig. 6
figure 6

Pseudo-code of the algorithm

6 Tests with the Hybrid MAC Scheme

In order to evaluate the performance of the hybrid MAC scheme, a cluster-based network was setup. Sensor nodes were grouped in two clusters forming a two-hop network. Each cluster contains the four sensor nodes of a volunteer, with one of the sensor nodes being the cluster-head. The cluster-head sends a beacon with 6 bytes of payload every 250 ms to the sensor nodes. Each sensor node sends wirelessly to the respective cluster-head a data packet with a payload of eight bytes every 250 ms using the AR-MAC protocol. The payload size was chosen considering Eq. 1, where CSN is three and MPL is 113 bytes, and a safety margin against payload overflowing. It should be noticed that the cluster-node’s maximum payload allowed by the hybrid scheme can be increased by augmenting the cluster-head’s maximum payload or reducing the number of nodes in the cluster. The cluster-head aggregates the data received from the cluster-nodes with its own data, and sends the data to the BS. If there is no retransmission data received from the cluster-nodes, the cluster-head sends a packet with a payload of 32 bytes to the BS. AR-MAC and CSMA-CA were parameterized with the values #2 presented in Table 2. The parameters of the CSMA-CA algorithm were adjusted to guarantee that the CSMA process starts immediately after the BP and finishes during the CAP. For comparison purposes, CSMA-CA used zero or two frame transmission retries at maximum before declaring transmission failure. The test duration was approximately 200 minutes.

6.1 Results

The results of the tests are presented in Tables 4, 5, 6, and 7. Table 4 shows the minimum, global average, and maximum values of diverse metrics (packet loss ratio, delay, duplicate packet ratio), considering the values obtained for each sensor node with the hybrid MAC scheme, when the BS sends the delay information (DI) and the maximum number of frame transmission retries (MFR) is zero. Table 5 presents the results of the scalability test. Table 6 presents the results of the duplicate packets ratio obtained with and without DI, and MFR = 2. Table 7 shows the results of the packet loss ratio considering traffic with variable rate. The obtained results are discussed next.

Table 4 Experimental results for two WBSNs and the hybrid MAC protocol, with DI and MFR = 0
Table 5 Scalability of the hybrid scheme network regarding the packet loss ratio
Table 6 Duplicate packets ratio of the hybrid scheme network with MFR = 2
Table 7 Packet loss ratio with DI and MFR = 0

Packet loss Comparing the values in Table 4 with those obtained in one-hop transmission (cf. Table 3), it is observed that the packet loss ratio decreased significantly. In one cluster, the sensor nodes presented the same packet loss ratio as the cluster-head (0.11 %). In the other cluster, the sensor nodes presented almost the same packet loss ratio (0.21 %) as the cluster-head (0.22 %). In fact, the packet loss ratio was lower than 0.01 % in the intra-communications of both clusters. These results show that the packet loss occurs mostly in the transmission between the cluster-head and the BS. If the aggregated data packet sent from the cluster-head to the BS is lost, then the data sent in the last superframe from the sensor nodes to the cluster-head is also lost. So, if the cluster-head fails to deliver the aggregated data packet to the BS, then all sensor nodes of that cluster also fail to deliver the data to the BS.

One important contribution for the reduction of the packet loss ratio is the delay information (DI) sent by the BS to the cluster-heads. In a similar test carried out without sending the delay information, it was registered a global average packet loss ratio of 2.7 %. Figure 7 compares graphically the global average packet loss ratio obtained using the hybrid scheme with DI (0.16 %) and without DI (2.7 %), AR-MAC (1.1 %), and CSMA-CA (5.0 %). These values are collected from Tables 3 and 4.

Fig. 7
figure 7

Average packet loss ratio comparison between the hybrid scheme (with and without DI), AR-MAC, and CSMA

Latency The minimum, the global and the maximum values of the average one-way delays obtained in the network are also presented in Table 4. The maximum one-way delay was 272 ms considering all sensor nodes, and 11 ms considering only the cluster-heads. The protocol guarantees a maximum one-way delay which is bounded by twice the superframe duration.

Scalability Table 5 shows the results of the scalability test using the hybrid MAC protocol, with and without the delay information (DI). Each test ran for 30 min at least. The cluster-nodes sent to the BS data packets carrying at least 32 bytes of payload, as explained previously. The results show that the network can expand up to ten WBSNs without degrading significantly the average packet loss ratio if the DI is used. Otherwise, the packet loss ratio degrades significantly with the number of WBSNs. A generic improvement was not noticed from using the DI and the maximum number of frame transmission retries equal to two. Indeed, with the DI the global average packet loss ratio calculated from the values obtained for two, four, six, eight, and ten WBSNs is 0.12 % with MFR = 0, and 0.11 % with MFR = 2.

Duplicate packets A duplicate packet may occur if a sensor node does not receive the acknowledgment frame from the BS, which implies the retransmission of the data packet by the sensor node. According to Table 4, all sensor nodes presented no duplicate packets. This result is expectable, because the maximum number of frame transmission retries (MFR) is zero. So, each packet can be sent only once to the BS. Table 6 presents the average duplicate packets ratio obtained when the MFR is two. It is noticed that the use of the delay information reduces the percentage of duplicate packets received by the BS.

Traffic rate variation All discussed tests were carried out with fixed data payload sizes, i.e., with constant traffic rate. To study the effect of the traffic rate variation on the packet loss, tests with different numbers of cluster-heads were carried out. The payload size (in bytes) of each data packet sent by the cluster-heads is chosen randomly from the range [10, 100] following the uniform distributed law. Table 6 presents the results using the hybrid MAC scheme with the delay information and the maximum number of frame transmission retries equal to 0. It is observed that up to twelve WBSNs the traffic variability does not affect significantly the network performance, when compared with the constant traffic rate results of Table 5, which are replicated in Table 7 for comparison purposes.

7 Conclusions

MAC protocols for WSNs are normally based on contention or scheduling strategies. To evaluate the suitability for WBSNs of a beaconed TDMA-based MAC protocol and a CSMA-based MAC protocol, this paper presents a comparative study between the AR-MAC and the non-beaconed IEEE 802.15.4 in a real scenario. The results show that AR-MAC presents globally lower packet loss ratio and duplicate packet ratio than IEEE 802.15.4. Regarding latency, IEEE 802.15.4 presents lower average and maximum delays than AR-MAC, although AR-MAC guarantees a maximum delay bounded by twice the superframe duration. However, AR-MAC may present an average packet loss ratio above 1 %, which is not negligible for applications demanding quality of service. To improve the network performance, a hybrid MAC scheme using TDMA/CSMA in two-hop mode was proposed and tested. An average packet loss ratio below 0.2 % was obtained. To get this significant improvement, the cluster-heads run a lightweight algorithm to control the start of the superframes through the delay information (DI) sent by the base-station. Tests show that the hybrid MAC scheme network scales up to ten WBSNs approximately. Moreover, the network can handle variable rate traffic without degrading the packet delivery performance. The hybrid scheme with the DI also helps to reduce the duplicate packet ratio, which contributes to improve the network energy performance. Although the energy efficiency of the hybrid MAC scheme was not studied in this paper, it will will be tackled in future work. The performance results evidences that the hybrid scheme with the DI may be suitable for applications demanding quality of service, such as continuous monitoring of physiological signals in AAL environments.