**3.2. Configuring QoS strategies**

QoS strategies can be easily integrated in preamble sampling protocols since the preamble may hold additional information about the subsequent transmission. Another possibility is to encode the medium access priority in the preamble duration which is done by the BPS-MAC protocol. In the following, the an example of priority encoding is introduced which can be directly applied to the BPS-MAC protocol.

The protocol can be used in two different modes: Collision-free and prioritized contention resolution mode. Both modes result in different usages of the preamble sequences: In collision-free mode, node IDs are directly mapped onto preambles, resulting in unique preambles for each node which renders additional contention mechanisms unnecessary. In cases where preambles are not unique per node, but a priority is assigned per node group, some preamble sequences are assigned to prioritize the medium access while the others are used to resolve possible contention among nodes which have the same priority.

The decision parameter that defines the priority needs to be mapped to the length of the preamble sequence in order to configure the priority of a group of nodes. In the following we give recommendations on how the different QoS strategies that have been presented before can be implemented by choosing a certain preamble configuration. Table 2 summarizes the types of the different strategies along with the properties that should be mapped to the sequence length. Static strategies should be configured by the user in advance before the nodes are deployed to their final location, e.g. by defining static IDs to properties. Higher property IDs yield longer preamble sequences and therefore result in higher access priorities. Mappings for static priority strategies are very straight forward: A user needs to define how


**Table 2.** Configuration of different QoS strategies

12 Will-be-set-by-IN-TECH

150 Wireless Sensor Networks – Technology and Protocols Preamble-Based Medium Access

The latest generation of routing protocols for WSNs, e.g. the Collection Tree Protocol (CTP) [30], apply adaptive mechanisms to cope with frequent topology changes. In general, these protocols increase their beacon transmission rate if they detect changes in their neighborhood. Topology changes usually result from interference or mobility of the nodes. The latter may lead to frequent topology changes which significantly increase the routing overhead. In dense networks, the routing overhead can even result in temporary congestion of the network. Temporary congestion can also be caused by applications which generate event-driven traffic, e.g. intruder detection. For these kinds of applications, it is important to receive information from all devices which have detected the event to gain more precise information and minimize false positives. The priority of the medium access should depend on the transmission rate of the nodes. A fair medium access can be achieved if a higher transmission rate results in a lower access priority and vice versa. Thus, nodes which rarely transmit traffic have a high probability of gaining access to the medium immediately. However, nodes that frequently transmit traffic can utilize the whole bandwidth as long as no

Finally, it could be beneficial to have a strategy which combines the properties of the previously discussed ones. Depending on the target scenario and application, a combined strategy could further improve the performance. For example, a combined strategy could employ both the traffic-aware and buffer-aware strategy. Such a combination would represent a trade-off between the delay of high priority packets and packet loss of packets due to buffer overflows. A function which performs the trade-off calculation must be derived which calculates a priority value for each node, depending on the type of traffic that it has to forward

QoS strategies can be easily integrated in preamble sampling protocols since the preamble may hold additional information about the subsequent transmission. Another possibility is to encode the medium access priority in the preamble duration which is done by the BPS-MAC protocol. In the following, the an example of priority encoding is introduced which can be

The protocol can be used in two different modes: Collision-free and prioritized contention resolution mode. Both modes result in different usages of the preamble sequences: In collision-free mode, node IDs are directly mapped onto preambles, resulting in unique preambles for each node which renders additional contention mechanisms unnecessary. In cases where preambles are not unique per node, but a priority is assigned per node group, some preamble sequences are assigned to prioritize the medium access while the others are

The decision parameter that defines the priority needs to be mapped to the length of the preamble sequence in order to configure the priority of a group of nodes. In the following we give recommendations on how the different QoS strategies that have been presented before can be implemented by choosing a certain preamble configuration. Table 2 summarizes the types of the different strategies along with the properties that should be mapped to the

used to resolve possible contention among nodes which have the same priority.

*3.1.8. Data-rate aware*

other nodes need access to the medium.

*3.1.9. Combined Strategy*

and its current buffer fill-level.

**3.2. Configuring QoS strategies**

directly applied to the BPS-MAC protocol.

many priority classes have to be supported. These priority classes have to be encoded onto a number of preamble sequences and the lengths of the sequences. The user may choose between providing a mapping of the priority to a single sequence or to multiple sequences, which in total use up to N slots. Let *s* be the number of sequences, and *ni* the length of sequence *i*, then the total number of used slots will be:

$$N = 4 + \sum\_{i=1}^{s} n\_i + 2s \tag{1}$$

since the first four slots being used for initially sensing the medium and switching from rx to tx mode, and the two pause slots between each sequence. While, at a first glance, choosing multiple sequences seems to be a bad decision due to the pause slot overhead, choosing multiple preamble sequences increases the number of priorities that can be encoded. The number of supported medium access priorities is given by the product of the maximum length in slots of each preamble sequence as shown in Figure 6. Now, consider a configuration that employs three sequences, each having a length of four slots. This configuration results in a total maximum medium access delay of 22 backoff slots according to Equation 1. If a single preamble sequence would have been chosen instead, maximum preamble duration of 18 backoff slots could be chosen to guarantee a total maximum medium access delay of 22 backoff slots. Thus, the single sequence configuration can only encode up to 18 priority classes whereas the configuration with three sequences can support up to 64 priority classes. This ratio further increases the more sequences are chosen.

### **3.3. Performance evaluation**

The performance of MAC protocols for WSNs strongly depends on the characteristics of the network, e.g. the number of nodes, the node density, and the traffic pattern. Moreover, the

**Figure 6.** Medium Access Priorities depending on the Protocol Configuration

data rate and the sensing capabilities of the transceiver have a large impact on the network performance. In the following, it is assumed that the transceiver achieves a maximum data rate of 250 kb/s. Furthermore, a CCA delay and a turnaround time of 128 *μs* is assumed which represent typical values for low power transceivers. The OPNET Modeler [31] is used to simulate the performance of the protocols. Note that most simulation tools, like OPNET Modeler or ns-2 [32], simplify the physical layer in order to increase the simulation speed. Thus, their standard models simplify or even neglect important communication issues, e.g. the turnaround time of the transceiver and the CCA delay. For that reason, we modified the physical layer of the OPNET Modeler software such that it takes both communication issues into account. The transmission range is limited to 10 meters and the maximum interference range is set to 17 meters by modifying the so-called pipeline stages of OPNETs free space propagation model. These values reflect the average results from our first measurements with a small self-developed sensor board that uses a MSP430 micro controller and a CC2420 transceiver. The short range results from the fact that the nodes were placed inside the backrest of the seat. It is clear that these values may vary significantly depending on the position and orientation of the sensor node and the characteristics of the used antenna. Thus, the assumed values only fit to our particular example scenario.

The simulated scenario represents a typical middle-size airplane with six seats per row. A wireless sensor is placed in the backrest of each seat which monitors the state of the seat, e.g. whether the seat is occupied, the seatbelt is fastened, or the tray is secured. This information is reported periodically to a sink in the front of the plane. It has to be kept in mind that the simulated application is just an example application. There are currently a large number of applications under consideration to improve the existing flight cabin management system. A multi-hop network is required to enable connectivity between all nodes in the network due to the fact that large planes reach lengths of up to 60 meters. More powerful sensor nodes with routing capabilities are placed on the ceiling along alleyway approximately every 8 meters in order to connect the other sensors with the sink. An overview of the simulated scenario is shown in Figure 7.

The figure illustrates the high node density of up to 60 nodes.However, the large interference range has to be taken into consideration as well when specifying the application requirements.

**Figure 7.** Overview of the Simulated Scenario

14 Will-be-set-by-IN-TECH

<sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup>

Number of Slots per Backoff

152 Wireless Sensor Networks – Technology and Protocols Preamble-Based Medium Access

1

data rate and the sensing capabilities of the transceiver have a large impact on the network performance. In the following, it is assumed that the transceiver achieves a maximum data rate of 250 kb/s. Furthermore, a CCA delay and a turnaround time of 128 *μs* is assumed which represent typical values for low power transceivers. The OPNET Modeler [31] is used to simulate the performance of the protocols. Note that most simulation tools, like OPNET Modeler or ns-2 [32], simplify the physical layer in order to increase the simulation speed. Thus, their standard models simplify or even neglect important communication issues, e.g. the turnaround time of the transceiver and the CCA delay. For that reason, we modified the physical layer of the OPNET Modeler software such that it takes both communication issues into account. The transmission range is limited to 10 meters and the maximum interference range is set to 17 meters by modifying the so-called pipeline stages of OPNETs free space propagation model. These values reflect the average results from our first measurements with a small self-developed sensor board that uses a MSP430 micro controller and a CC2420 transceiver. The short range results from the fact that the nodes were placed inside the backrest of the seat. It is clear that these values may vary significantly depending on the position and orientation of the sensor node and the characteristics of the used antenna. Thus,

The simulated scenario represents a typical middle-size airplane with six seats per row. A wireless sensor is placed in the backrest of each seat which monitors the state of the seat, e.g. whether the seat is occupied, the seatbelt is fastened, or the tray is secured. This information is reported periodically to a sink in the front of the plane. It has to be kept in mind that the simulated application is just an example application. There are currently a large number of applications under consideration to improve the existing flight cabin management system. A multi-hop network is required to enable connectivity between all nodes in the network due to the fact that large planes reach lengths of up to 60 meters. More powerful sensor nodes with routing capabilities are placed on the ceiling along alleyway approximately every 8 meters in order to connect the other sensors with the sink. An overview of the simulated scenario is

The figure illustrates the high node density of up to 60 nodes.However, the large interference range has to be taken into consideration as well when specifying the application requirements.

2

**Figure 6.** Medium Access Priorities depending on the Protocol Configuration

3

Number of Sequences

the assumed values only fit to our particular example scenario.

shown in Figure 7.

Medium Access Priorities

As a consequence of the high node density, the traffic pattern has a huge impact on the network performance in the simulated scenario. Data traffic is usually highly correlated in WSNs since it is often event-driven and data centric. Thus, we decided to simulate three different traffic patterns which are representative for a large number of popular intra-aircraft applications. The simulated traffic pattern are shown in Table 3. The number of (seat) rows is increased from 8 to 40 in order to find out how many nodes are supported by the protocols in the intra-aircraft scenario depending on the application. The results represent the 90 percent confidence intervals of the average end-to-end delay and packet loss that are collected from 20 simulation runs with a duration of 1000 seconds and different seeds.

The traffic pattern start after 80 seconds since the Zigbee model requires some time to build a tree topology. In addition, the traffic generation stops at 980 seconds to allow the nodes to empty their waiting queues. Thus, the packet loss is given by the fraction of generated packets and the number of packets that are successfully received by the sink. Zigbee is set to non-beacon mode. Zigbee implies network layer functionality. Thus, a directed-diffusion [33] based routing protocol is used in combination with the BPS-MAC protocol to support comparable routing functionality. The directed-diffusion based routing protocol is modified such that only routers retransmit the interest which minimizes the routing overhead. The BPS-MAC protocol uses three consecutive backoff preambles with a maximum number of four slots.
