1 Introduction

The interest in wireless sensor networks (WSN) has increased in the last years, joined to the demand for communication services and applications in quite diverse common-life scenarios. The deployment of WSN is being enhanced by the necessity of providing particular solutions in terms of autonomous support, adapted for a variety of potential applications [1]. The progressive reduction in the device power consumption and its more and more advanced processing ability have turned WSNs into one of the most versatile solutions for the deployment of adapted communication networks. Small autonomous communication devices with power autonomy and versatile functions constitute the basis of WSNs and provide their main potential. Both the physical and link layers are of great importance in the development of sensor applications and WSN deployments. Many research contributions on these areas may be found, focused on power awareness, node processing, efficient radio communication hardware, low duty cycle, energy-aware MAC protocols, etc. [13], revealing that the entire power consumption cycle joined to the transmission/reception capabilities of the network are the most important aspect to be considered.

The aim of this work is to provide a complete and fair comparison of the performance of different link-layer protocols for wireless sensor networks, in terms of power consumption, the use of the propagation channel resources and the traffic rate provided. The manuscript is organized as follows: Sect. 2 is focused on shared-medium access protocols for wireless networks. In Sect. 3, the WSN link-layer protocols under study are presented, along with their particular features. Section 4 is devoted to the performance analysis and the scenarios for the experimentation. Section 5 offers an overview of the results in terms of performance of the different WSN protocols under test. Eventually, in Sect. 6, conclusions are drawn.

2 Shared-Medium Access Protocols for Wireless Networks

The protocols based on shared-medium network access can be divided into two different groups, depending on the usage or not of contention-based access mode when dealing with the connection to the shared medium. Wireless contention-based protocols try to avoid transmission collisions derived from the simultaneous attempt to access the propagation channel by two or more devices. In this way, they provide mechanisms or access rules in order to minimize the number of collisions in the channel exploitation. On the contrary, there exists a group of scheduled and contention-free protocols that are free of suffering from collisions at the expense of having synchronization restrictions and possible channel inefficiency due to the distribution of the channel capacity [4]. Figure 1 shows this generic classification.

Fig. 1
figure 1

General scheme of shared medium access control protocols

2.1 Contention Free or Scheduled Protocols

These protocols provide a high efficiency, higher than those based on contention. They are based on shared medium access in the time domain (TDMA), frequency domain (FDMA) or code domain (CDMA), using synchronization and scheduled access at the physical layer. These protocols are quite useful in multimedia (Wireless Multimedia Sensor Networks, WMSN) [5], as they guarantee a particular service level, with the drawback of requiring a more complex centralized management, for the distribution of the time slots, frequencies or orthogonal codes for the different medium users. Depending on the number of users, the contention free or scheduled protocols may be highly inefficient, depending on the channel resources distribution (slot times, frequency bandwidths, etc.) and its use by the channel users.

2.2 Contention Based Protocols

These protocols contend for the use of the shared medium to transmit their data packets. To avoid or reduce collisions, there exists a variety of well-known access control techniques such as CSMA (Carrier Sense Multiple Access) or CSMA/CD (Carrier Sense Multiple Access with Collision Detection). CSMA/CA (Carrier Sense Multiple Access Collision Avoidance) is quite useful in the case of wireless networks, as it is also necessary to define when a node is transmitting or receiving and is authorized for so. In addition, the problem of hidden node is overcome by means of the addition of a RTS/CTS (Request to Send/Clear to Send) mechanism, as depicted in Fig. 2.

Fig. 2
figure 2

Functioning scheme of CSMA/CA

In the case of WSN, some additional outstanding properties have to be achieved by the shared access protocols:

  1. 1.

    Energy efficiency to extend the life-cycle of the sensor node.

  2. 2.

    Scalability, versatility and adaptation ability to network changes (network size, distribution, node density, topology or propagation channel variations, among others).

  3. 3.

    Latency, throughput and required bandwidth (BW).

Of these additional properties, the energetic efficiency is the most important aspect in the case of WSN networks [6]. As a consequence, it is vital to develop access techniques that preserve the available energy, mainly in the transmission cycles, which are the periods with the highest energy-consumption. Medium access control strategies along with hibernation periods are used in WSN in order to optimize this power consumption. Therefore, upper layers rest almost unaffected.

The possible power-consumption node states are:

  • Transmission/reception The main state of the node in the communication system. The ideal case is only having power consumption in this state.

  • Idle listening The vast majority of wireless network devices have a power consumption level in the idle listening stage quite similar to the one of the receiving stage. Wireless devices with power consumption restrictions, such as the ones in WSN, must implement a procedure to commute to the receiving state only when the transmissions are expected or scheduled, being in an hibernation state the rest of the time.

  • Overhearing The reception of transmitted frames not directly destined to one particular node provokes energetic waste in this node. Thus, mechanisms to avoid the systematic listening of all the surrounding network traffic must be deployed in these kinds of networks.

  • Collision Irrecoverable frames due to interference with other frames coming from the rest of the stations imply an additional energetic waste in the network, being necessary automatic repeat request (ARQ) confirmation schemes and retransmissions. Thus, collision avoidance or minimization is a key aspect.

  • Control Control messages and frame header information let the MAC layer operation, but are not related to useful data content or payload. As a consequence, there must be a balance between the amount of control messages and header bits, compared to the information to be transmitted and the fraction of energetic waste due to these headers or control messages.

3 WSN Link-Layer Protocols Under Study

In this section, three different WSN MAC layer protocols are selected and outlined. These three protocols are representative enough of the two tendencies previously described: contention based, scheduled, or a hybrid strategy between these two.

3.1 S-MAC (Sensor-MAC)

Sensor-MAC protocol, S-MAC [7], is a contention-based MAC protocol for wireless sensor networks with collision avoidance, using a combined scheduling and contention scheme. It also achieves good scalability and reduced energy consumption.

Considering that in many sensor network applications, nodes are idle for long periods of time if there is no sensing data to transmit or notify, it is not necessary to keep nodes listening all the time. S-MAC reduces the listen time by putting nodes into periodic sleep state. Thus, S-MAC defines an active window for working periods and an inactive one for sleeping periods. All the nodes must be coordinated so that the information is transmitted in the active window. The window size is fixed and unique for all the nodes in the network. The working scheme is shown in Fig. 3.

Fig. 3
figure 3

S-MAC active window working scheme

When a node starts its active period, it begins to listen to the shared medium to detect if there is any data coming from another node. The active window is divided into two parts:

  • The first part is reserved to the transmission/reception of SYNC messages to/from the rest of the surrounding nodes. By means of the periodic emission of SYNC frames, a network node informs about the resting time to its next active window period.

  • The second part is devoted to the data transmission/reception following a RTS/CTS/DATA/ACK sequence.

Initially every node performs carrier sense before initiating a transmission. If a node fails to gain access to the medium, it sends a SYNC message with its next active period. Broadcast frames are sent without using RTS/CTS meanwhile unicast frames follow the RTS/CTS/DATA/ACK sequence. With the low duty cycle operation and the contention mechanism during each active period, S-MAC effectively reduces the energy consumption due to the idle periods and collisions. Further about S-MAC implementation can be found in [7]. There are some variations or modifications such as T-MAC [8] (Timeout-MAC), with the election of a variable temporal pattern for the active window, being able to be adapted to different traffic load levels.

3.2 DRAND (Distributed Randomized TDMA Scheduling)

The distributed randomized time slot assignment algorithm, DRAND [9] is a MAC layer protocol included in the group of protocols following a scheduled time distribution in the shared channel, also called contention free protocols. It consists of a distributed version of TDMA. In fact, DRAND is an optimized distributed version of a heuristic centralized solution, called RAND, providing very efficient slot schedules. DRAND is also very simple and easy to implement in practical systems, not requiring any time synchronization to run.

DRAND improves the protocol performance by removing the dependency on the global topology of the network. The algorithm first finds a conflict-free assignment of labels for each node, and then tries to allocate time slots to these labels, while maintaining fairness within a two-hop neighbourhood. The protocol implies that time is slotted into a non-overlapping equal time period called time frame which is also divided into a MaxSlot number of non-overlapping time slots. Time slots are numbered from 1 to MaxSlot, assuming that MaxSlot is sufficiently large enough to handle all the assignment within the node surrounding area. It operates in rounds, but the nodes are not required to be synchronized on the round boundary. The duration of each round is adjusted dynamically depending on the estimates of network delays.

For the efficiency, the protocol tries to guarantee:

  • The lowest number of slots as possible: a high number of slots implies lower spatial reutilization and, thus, a highest delay.

  • The lowest execution time for the slot arrangement and distribution.

  • A reduced number of protocol messages and its size.

There are four states that a node maintains: IDLE, REQUEST, GRANT, and RELEASE. The transitions between the different stated are not straightforward and occur under some circumstances, as depicted in [9].

3.3 Z-MAC (Zebra-MAC)

This MAC protocol is a hybrid version, combining the best aspects of TDMA y CSMA, and neglecting the majority of their drawbacks. The best advantage of Z-MAC [10] is its adaptability at the contention level in the network so that, at low transmission rates it behaves almost as if being CSMA, and at high transmission rates it behaves quite near to TDMA.

In Z-MAC, the temporal slot assignment is set in the initial stage of the network functioning. After this assignment each node uses its own temporal slot for frame transmission, being the slot owner of this particular time slot. However a node may transmit in any temporal slot, but always in the case that the slot owner does not want to use its temporal slot. Priority is obtained by adjusting the contention window size so that the slot owners have the possibility of transmitting before the channel is offered to the rest of the nodes [10]. In addition to the default Z-MAC modality, there exists the possibility of tuning the hybrid scheme, favouring any of both terms, CSMA or TDMA. If a major proportion in the CSMA access is used, in low contention cases, Z-MACLCL is defined (Low Contention Level, LCL). On the contrary, if a major proportion of scheduled TDMA access is needed, in high contention cases, Z-MACHCL is defined (High Contention Level, HCL). A node commutes its state when it receives an explicit notification (Explicit Contention Notification message, ECN). In LCL, any node may struggle to gain access, meanwhile in HCL only slot owners or one-hop neighbours can apply for slots.

3.4 Other Alternatives

In addition, there are a variety of variations, modifications and alternatives to these three protocols, either for a contention-based strategy or for a scheduled one. These are the most representative, among others:

  • Contention-based T-MAC [8] (Timeout-MAC protocol) as a direct evolution of S-MAC; B-MAC [11] (Berkeley-MAC protocol), as a simplified version of S-MAC, DS-MAC [12] (Dynamic Sensor-MAC protocol), wiseMAC [13] (Wireless Sensor MAC protocol), ADCA [14] (Asynchronous Duty Cycle Adjustement), etc.

  • Scheduled TRAMA [4] (Traffic Adaptive MAC protocol), LA-MAC [15] (Load Adaptive MAC protocol), EMAC [16] (eyes MAC protocol), LMAC [17] (lightweight MAC protocol), etc.

  • Hybrid DMAC [18], etc.

4 Performance Analysis and the Scenarios for the Experimentation

Despite the basic mathematical description of each protocol previously referred in [7, 9, 10], there is no complete general mathematical model to describe the complete performance of a WSN scenario. This is a direct consequence in the complexity of the link layer protocols, and the presence of a wide variety of nodes trying to access the same shared wireless communication channel. This fact implies that, with a variety of nodes under different operation conditions in terms of data rate injected to the network and data flow in the complete network, the way of evaluating these different link layer protocols under study is to use simulation tools, or directly evaluate them under a real node scenario deployment.

For the experimentation and the performance analysis of the three MAC layer protocols under study, a simulation scenario is modeled and built up. This scenario will provide performance results of them under different circumstances, traffic load levels and issues in the network such as the presence of bottle necks, egoist nodes or compromised ones.

In the case under study, a 2D WSN scenario with 18 nodes is modeled with a topology that enables the existence of areas more densely populated, areas with a lower density and one bottle neck. According to this distribution, 18 reference points for the node location are established. The final position of each node follows a uniform distribution in each coordinate around the reference points. Figure 4 provides one particular realization of the simulation scenario according to the defined topology. The results obtained in this work are a compendium of 100 different realizations according to the defined topology.

Fig. 4
figure 4

Testing scenario. Traffic generation nodes: 14, traffic destination nodes: 1518, ‘bottle neck’ between nodes 8 and 9

In this scenario, traffic generation nodes are nodes 1–4, sending their data towards the destination nodes, which are 15–18, through the ‘bottle neck’. The particular features of the network and the elements that compound it are provided in Table 1.

Table 1 Simulation scenario description

For the simulations, Network Simulator 2 (Ns-2) [19] has been selected. Ns-2 is a well-known, deeply tested and reputed discrete event simulator targeted at networking research. Ns-2 provides substantial support for simulation of wired and wireless networks of TCP/IP, routing, multicast protocols, link layer, etc. over well stated wired or not physical layer. All the link layer protocols under test in this work have been built up in Ns-2.

Regarding the simulation scenario, in addition to the ‘normal’ functioning of the network under different levels of traffic load, it is introduced the evaluation with the existence of a ‘bottle neck’ (between node 8 and 9) and also under the presence of an egoist node trying to gain the maximum transmission capacity in the propagation channel (250 kbps), transmitting towards all the rest of the nodes in a distributed way. This node is node 6, in red colour in Fig. 4.

The main outcomes for the network performance study that the evaluation of this scenario may provide are: the traffic distribution in the network, the maximum transmission capacity of one node without saturating the network, the channel utilization (%), the bottle neck utilization (%) and the overall power consumption, either for one particular node or globally for all of them, and network energetic efficiency, among other outcomes to be evaluated.

5 Performance Evaluation Results of the Different WSN Protocols

In this section, the performance evaluation results of the different WSN protocols under test are provided. The protocols evaluated in this work are: S-MAC, DRAND, Z-MAC, Z-MACLCL and Z-MACHCL. These protocols are evaluated in during 1000 s in an already conformed and operative network with the topology provided in Fig. 4.

First of all, regarding the network bottle-neck when the traffic volume generated in the source nodes is increased, the results in Fig. 5 are obtained.

Fig. 5
figure 5

Bottle neck (node 8 to 9) utilization, for different traffic load levels in the network

This figure reveals that the bottle neck utilization (in %) gains its highest level for around a 25 % of its ideal affordable traffic load and there is not a significant variation among the different link layer protocols regarding the highest level of utilization achieved. Moreover, it can be noticed that the different Z-MAC versions are the ones with the best performance, either for low or high traffic load.

Another useful result for the performance analysis is the study of the received traffic in the sink nodes, related to the one provided by the generation ones. Figure 6 provides the mean value of the received data rate in the sink nodes, related to the mean value of the one generated by the source nodes.

Fig. 6
figure 6

Traffic transfer to destination (mean value) (kbps), for different traffic load levels in the network

This figure shows that the mean value of the effective traffic received by each sink node is of about 16 kbps, far away from the theoretical 250 kbps of channel capacity for each node-to-node transfer. The rest of the channel transfer capacity is used by the intermediate node-to-node transfers in the network, sharing the same propagation channel. Although there is not a highly significant difference between the different algorithms taking into account the maximum data rate, the evolution in the case of S-MAC and DRAND is revealed to be different to the rest, and slower. In addition, again the different Z-MAC versions are the ones with the best performance, for whatever traffic level.

Additionally to these two results in terms of routed traffic, capacity and bit rate, the power consumption is a matter of concern when evaluating the performance of a particular protocol (either only concerning link layer or upper ones), and mainly in WSNs in particular or MANETs in general. Figure 7 shows the global power consumption along the 1000 s of duration of the simulations.

Fig. 7
figure 7

Global power consumption, for different traffic load levels in the network

This figure lets infer that the power consumption increases with the traffic load, as expected. The global power consumption fits well with the network dynamics previously observed: the protocols that provide the highest data transfer are those that need more power resources. In fact, no one except S-MAC reveals power inefficiency when transmitting high traffic levels (compare traffic in Fig. 6 with power consumption in Fig. 7). In the particular case of S-MAC, the power consumption has the lowest level, but this occurs partially at the expense of the data rate.

The relation between traffic rate and global power consumption (kbps/mW), provided in Fig. 8, is a good indicator of the performance of the protocols considering both outcomes, the traffic rate available for each node in the network and the global power consumption. As it is stated, although in the case of S-MAC, the power consumption has the lowest level at the expense of the data rate, it is still the one which provides the best ratio.

Fig. 8
figure 8

Traffic rate/global power consumption ratio (kbps/mW)

Finally, it is evaluated a scenario with an ‘egoist node’ (node 6), trying to monopolize the network resources in terms of available traffic rate, transmitting at 240 kbps which is almost the maximum channel capacity.

Figure 9 provides the mean value of the delivered traffic at a destination node, for different levels of traffic loads in the network generation nodes and always the same peak rate for the conflictive node. In this figure, the results of mean value of the delivered traffic do not include the traffic provided by the egoist node, which is considered to be an ‘inconvenience’ in the network.

Fig. 9
figure 9

Mean value of the delivered traffic at a destination node, for different levels of traffic loads in the network generation nodes and the presence of an egoist node

In this figure, it can be identified that the performance of the contention-based protocols decreases for all the traffic load levels, and particularly in the case of high bit rate levels, as the egoist node demands in any case the same traffic rate for transmitting. In the case of the slotted-based access, a light reduction is observed, not being, however, statistically significant. It is noteworthy to mention that DRAND protocol is not providing as proper results as expected, mainly for intermediate traffic levels. This fact is, however, in the same way than its evolution in the case of Fig. 6. The use of Z-MACHCL is the proper one in any case, as it is observed. Additionally, the power consumption in this situation is provided in Fig. 10.

Fig. 10
figure 10

Global power consumption, for different traffic load levels in the network generation nodes and the presence of an egoist node

This figure allows to infer a quite similar evolution: DRAND and Z-MACHCL are the ones that provide the best ratio between traffic rate and global power consumption (kbps/mW), mainly for high traffic load in the network. This is clearly shown in Fig. 11. In this particular case of having an egoist node, the performance of S-MAC is more reduced than in the case of Fig. 8, not being the best option to be considered.

Fig. 11
figure 11

Traffic rate/global power consumption ratio (kbps/mW), considering the presence of an egoist node

6 Conclusion

This paper is devoted to the study and comparison of the performance of some representative link-layer WSN protocols, considering not only traffic load levels in the network and transmission capabilities for one node, in normal operating circumstances, but also in the case of possible drawbacks in the network such as the presence of bottle necks, egoist nodes or compromised ones. The protocols performance is also measured in terms of power consumption for a node and for the complete network, and its relation with the traffic load affordable by the network and the transmission rate available for each node. Three protocols have been evaluated: S-MAC, DRAND and Z-MAC (the last one with three different variations: conventional Z-MAC, Z-MACHCL and Z-MACLCL). The results obtained reveal that in normal operation conditions, the best protocol performance occurs for Z-MAC in any of its three variants. However, if both traffic rate and power consumption are considered, S-MAC is the one which provides the best trade-off in terms of power consumption to transmission capacity ratio. In addition, the presence of compromised nodes trying to abuse of their transmission ability provokes the reduction in the general performance of the protocols, and the ones that suffer a lower performance reduction are DRAND and Z-MACHCL.