# A Multiconstrained QoS Aware MAC Protocol for Cluster-Based Cognitive Radio Sensor Networks

Authors: Mir Mehedi Ahsan Pritom; Sujan Sarker; Md. Abdur Razzaque; Mohammad Mehedi Hassan; M. Anwar Hossain; Abdulhameed Alelaiwi
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Traditional wireless sensor networks (WSNs) work
over the unlicensed spectrum, and as the spectrum becomes
increasingly crowded, they suffer from uncontrolled interference.
Recently, cognitive radio based sensor networks (CRSNs) have
been envisioned as a promising type of implementation that
provides quality-of-service (QoS) features for data transmissions.
However, key challenges remain in designing energy-efficient
medium access control techniques that can achieve QoS. In this
paper, we have developed a multiconstrained QoS aware MAC
protocol, MQ-MAC, for a cluster based CRSN. In MQ-MAC, a
data channel and a backup channel are assigned to a secondary
user by the respective cluster head by using dynamic channel
priorities. The user device can switch to the backup channel when
a primary user appears to be operating over the data channel.
Member nodes of a cluster are also prioritized with respect
to the urgency of their generated data packets. Performance
evaluations, carried out in NS-3 simulator, show that the proposed
MQ-MAC protocol offers better performance than existing MAC
protocols for CRSN.


---

## Body

## 1. Introduction

Wireless sensor networks (WSNs) are expected to play an increasingly important role in several industries including health care, war field monitoring, agriculture, environmental monitoring, and industrial systems. A future WSN is required that can provide data transmissions with guaranteed quality-of-service (QoS). For example, critical data packets should be transmitted to the sink with very small latency, and all real-time data packets should reach the sink before their lifetime expires. These requirements necessitate high quality services from resource-constrained WSNs. Tradiational WSNs, working over unlicensed bands, are often crowded out by IEEE 802.11-based WLANs, IEEE 802.15-based WBANs and WPANs, and IEEE 802.16-based WiMAX networks [1–3]. Transmissions over unlicensed bands can suffer from severe interference from other networks sharing the same spectrum, making it very difficult to maintain the QoS. The coexistence of multiple networks in the same license-free spectrum also brings challenges for data transmissions with strict QoS requirements, including those of spectrum utilization, security, transmission collisions, and other similar issues [2].Implementing the cognitive radio capabilities in the traditional WSNs is a promising method that can provide data transmissions with high QoS. Cognitive radio-based sensor networks (CRSNs) provide a new paradigm for WSNs, opportunistically and efficiently utilizing licensed spectrum resources. The system has capabilities for packet loss reduction, power waste reduction, and better communication quality [1, 2]. However, there are technical challenges in designing an efficient medium access control (MAC) protocol for CRSNs, and these include spectrum sensing, interference-free channel and transmission allocations, and switching between the data and the backup channels. In this work, we consider a multihop cluster-based CRSN, as was discussed in [3–5] and references therein.QoS provisioning approaches for real-time and best-effort traffic have been analyzed in [6, 7]. The distribution of the traffic classes during the available times of the channels has been mathematically analyzed, and the delay performance analysis for both bursty and poisson traffic types has also been investigated in detail. However, the method for collecting and forwarding the sensed data from the nodes to the sink has been left for future work.There have been very few works on MAC protocols for CRSNs. In COM-MAC [8], a clustered on-demand multichannel MAC protocol has been proposed to support energy-efficient, high throughput, and reliable data transmission in wireless multimedia sensor networks (WMSNs). The absence of backup channel and dynamnic channel assignment to slots in COM-MAC makes it unsuitable for providing QoS services. In KoN-MAC [9], a new superframe has been proposed and an optimal channel subset slection mechanism has been developed that saves sensing energy. Also, data channel and backup channel assignment algorithms have been designed for data transmissions. However, KoN-MAC does not differentiate the medium access among the different nodes generating heterogeneous data packets, and thus it fails to provide adequate QoS services.In this paper, we present a multiconstrained QoS aware MAC protocol, MQ-MAC, for CRSNs. The key principle of MQ-MAC is to prioritize the nodes according to their generating traffic classes and to assign data channels and backup channels to those nodes in such a way that better QoS can be guaranteed. The MQ-MAC nodes with reliability and delay-constrained packets have a better chance accessing the medium and can transmit data with high reliability compared to other nodes. The contributions of our work are summarized as follows.(i)
A multiconstrained QoS aware MAC protocol (MQ-MAC) for cluster-based CRSN has been developed that ensures differentiated medium access to four traffic classes.(ii)
QoS aware dynamic superframe structure has been designed for data collection at each cluster head.(iii)
An intelligent fusion operation for cooperative sensing has been developed that helps in selecting the best available channels.(iv)
An efficient GTS allocation algorithm for reliability and delay constrained data packets has been presented.(v)
Dynamic data and backup channel assignment schemes have been proposed to enhance the QoS.(vi)
Finally, our performance evaluations in NS-3 [10] show that the proposed MQ-MAC achieves better QoS and energy performances.The remainder of this paper is organized as follows. In Section2, we discuss existing CRSN MAC protocols and their limitations. In Section 3, we present the network model and assumptions of our work and we detail the design components of MQ-MAC in Section 4. The performance evaluation results are discussed in Section 5 and we conclude the paper in Section 6.


## 2. Related Works

In this section, we discuss some of the MAC protocols that have been designed for CRSNs. In [11], the authors proposed a new channel management scheme that takes into consideration both energy efficiency and primary user (PU) protection. Neither QoS nor spectrum utilization objectives were addressed in it.Energy-efficient spectrum sensing and access mechanisms for CRSNs were also discussed in [12, 13]. In particular, authors in [13] focus on spectrum sensing issues in unslotted cognitive radio networks with wireless fading channels. To overcome the energy-inefficiency problem of existing continuous/fixed-schedule spectrum sensing schemes, they propose an energy-efficient spectrum sensing method that adaptively adjusts the spectrum sensing periods. The scheme also determines the presence and vacancy of a PU by taking into account the PU’s activity patterns.Energy-saving sensing mechanisms have also been developed in [14, 15] that implemented a dynamic sensing frequency to make cognitive radio more practical. The scheme presented in [16] forms clusters among the sensor nodes to reduce the energy consumption when reporting sensing-result. The channel-sensing scheme proposed in [15] saves energy by choosing the optimal sleep period and sensing parameters. Again, in [17], authors implemented data prioritization for QoS provisioning in body sensor network and in our proposed MQ-MAC protocol, we have done data prioritization to ensure better QoS in CRSN.Authors of KoN-MAC [9] proposed an MAC protocol for the multihop cognitive radio sensor networks. They introduced an energy-efficient channel sensing mechanism and designed an MAC protocol for cluster-based CRSNs that allows sensor nodes to dynamically select an interference free channel for data communication. They mainly reduced the channel sensing set in order to reduce the sensing energy. However, the KoN-MAC suffers from poor QoS provisioning due to lack of node prioritization according to their generated traffic classes and transmission scheduling accordingly.In COM-MAC [8], an on-demand multichannel access mechanism was developed for cluster-based WMSNs, where a scheduled multicahnnel medium access is used within a cluster for members to operate in a contention free manner. However, neither dynamic channel allocation to different data transmission slots nor backup channels were implemented in COM-MAC. Thus, it fails to provide better QoS services and suffers from poor utilization of licensed channels (LC).


## 3. Network Model and Assumptions

In this paper, we assume that the source sensor nodes generate different types of data packets. We consider a CRSN, where battery powered sensor nodes have CR capabilities. A large number of sensor nodes form a cluster-based multihop network backbone using LEACH [18] or similar clustering protocol [3, 8, 9] that can deliver sensed data packets to a sink, as shown in Figure 1. Each cluster head (CH) coordinates the energy-efficient channel sensing, selection, and data transfer from member nodes.Figure 1
The network model.We have borrowed the subset selection mechanism of KoN-MAC [9] for channel sensing and used it to find a polled channel set which gives the optimal energy consumption during channel sensing. Data prioritization is done to ensure better QoS and thus we have taken into account both energy efficiency and reliability in our proposed MQ-MAC protocol. We have also introduced GTS slots for more critical and delay constrained packets during data transmissions. We have also taken into account the lifetime of each packet while allocating slots and transmitting packets. In this work, a packet having lower remaining lifetime will be served as quickly as possible. This consideration of the remaining packet lifetime increases the QoS for data transmission and decreases the packet loss ratio.We consider each cluster to have a cluster head (CH), several cluster member nodes, and one (or more) gateway (GW) nodes. Each node is identified by its node ID. The CH and its members exchange control messages through a common control channel (CCC) [19–21]. We have also assumed that a licensed channel set CL and an unlicensed channel set CU are available in the network. Each sensor node can select a channel c∈C(whereC=CL∪CU). In CRSN, the sensor nodes are secondary users (SUs) and it is challenging to opportunistically access the licensed spectrum without affecting the primary users (PUs). At any given time, a sensor node can select any licensed channel c∈CL as long as a PU is not using it.In order to reduce the energy consumption, while channel sensing, we can determine a subsetSK of the existing licensed channel set CL  (where |SK|≤|CL|) based on the probability of a channel being available [9]. We consider a cooperative channel sensing mechanism, where the CH and its member nodes cooperatively decide on the data and backup channels to improve the performance of data transmission. When a PU is detected in an SU’s operating data channel, the latter stops data transmissions immediately and switches to a preallocated backup channel.Considering the delay and reliability requirements of various applications of sensor networks [22], we have classified the data traffic generated from sensor nodes into four different classes, as shown in Table 1. We assign a value between 1 and 4 to each traffic class to prioritize the nodes when accessing channels and allocating transmission slots. Higher class values indicate lower priority, and the traffic classes are described below.(i)
Real-time reliable (RR) traffic is both delay and reliability-constrained. It corresponds to critical data packets that need to reach the sink with high reliability and within a stringent delay-deadline.(ii)
Real time nonreliable (RnR) traffic, also known as delay-constrained packets, must reach the sink within a strict delay-deadline. However, some packet losses may be tolerated. This type of traffic may carry, for example, multimedia data and video streaming.(iii)
Nonreal time reliable (nRR) traffic is highly reliability-constrained but not delay-constrained.(iv)
Best effort (BE) traffic is neither delay-constrained nor reliability-constrained. They are also known as normal packets and only require best effort support.Table 1
Traffic classification.
Traffic class
Traffic class value (Tclass)
Realtime reliable (RR)
1
Realtime nonreliable (RnR)
2
Nonrealtime reliable (nRR)
3
Best effort traffic (BE)
4


## 4. Proposed MQ-MAC Protocol

### 4.1. Basic Idea

The proposed MQ-MAC protocol introduces a new superframe structure that handles the diverse QoS requirements of data packets generated by the sensor nodes. The CHs coordinate the cooperative channel sensing, channel assignments, and guarranteed slot allocations for reliability and delay constrained packets. Using the channel sensing results, the CHs categorize the channels intooptimal andmoderate channels and allocate them among the member nodes according to their traffic priorities. Thus, allocation ensures that the best channel is assigned to the node generating the highest priority packets. For each operating data channel, the MQ-MAC protocol also selects a backup channel that is used in case a PU appears.


### 4.2. Superframe Structure

The proposed MQ-MAC protocol is schedule-based and its superframe structure is composed of four phases: the cooperative sensing and channel selection phase (CSCSP), where the channel sensing results and data transmission requests are collected at the CH from its member nodes; the slot allocation and channel assignment phase (SACAP), where the CH allocates GTS slots to the nodes according to their traffic priorities and assigns data and backup channels; the data transmission phase (DTP), which is composed of- GTS and postcontention access period (PCAP), where nodes with the best effort traffic send data packets using prioritized random backoff according to the reamining packet lifetime; and, the sleeping phase (SP), during which the CH and its member nodes will be in an inactive state and thus more energy can be conserved.Since the proposed MQ-MAC uses dynamic sizes of the GTS and PCAP periods based on the traffic arrival requests, it is able to autonomously conserve more energy when less traffic is generated by the sensor nodes. The superframe structure is shown in Figure2 and the length of the superframe is of 1 second with the lengths of the phases dynamically varying with the number of available sensing channels and data transmission requests from the sensing nodes.Figure 2
Superframe structure.


### 4.3. Cooperative Sensing and Channel Selection Phase

The CSCSP phase is again divided into one advertisement slot and several transmission and channel sensing slots, as shown in Figure3. At first, the CH sends an advertisement for synchronization and the polling channel is set to SK for all member nodes through a broadcast message in CCC [19]. Then, the CH and its member nodes sense each channel k∈SK in consecutive |SK| sensing slots, as shown in Figure 3. In a certain slot, a channel may be in one of the following three states:idle, busy, orcollision. Based on these states of the sensing slots, each node assigns areward or apenalty to the channel weight. Then the weight of kth channel is updated using Wk=Wk+wi, where wi∈{0.1,-0.1,-0.2} represents the amount of reward or penalty corresponding to ith channel state, statei∈{idle,busy,collision}, respectively. Therefore, the higher value of Wk for any channel k∈SK represents a better channel. Each node j also keeps a record on whether a sensed channel k is rewarded (Ik,j=1) or penalized (Ik,j=0) in the current superframe. In the final transmitting slots, all the member nodes j transmit the channel weights Wk,j,∀k∈SK, the value of the indicator variable Ik,j, and the data transmission requests to the CH.Figure 3
The slot structure of CSCSP.Note that, in the CSCSP, each sensor node sends a data transmission request to its CH using a prioritized randomback-off to allow other nodes with important packets to have prioritized access to the medium prior to the nodes with less important packets. The sensor nodes calculate this differentiatedback-off using(1)Tback-off=0,2Tclass-1,where Tback-off is the back-off period randomly selected by the nodes and Tclass is the traffic class value assigned to each traffic class, as shown in Table 1. Thus, it is more likely that a node having high priority traffic will get medium access earlier than others.A data transmission request from any node is identified by the tupleID,Tclass,tlife,np, where ID is the identity of the requesting member node, Tclass is the traffic class of the packets generated by that node, tlife is the lifetime of the head of line (HOL) packet, and np is the number of packets generated by that node per second. Therefore, for each node, we allocate np number of GTS slots in a superframe.Now, the CH has the updated channel weights,Wk,CH and the value of the indicator variable Ik,CH of its own for all channels, ∀k∈SK and the corresponding values for its member nodes. The CH runs the following fusion operation to calculate the average channel weights, WAk, for kth channel for all the n sensing results: (2)WAk=α×∑j=1nWk,jn+1-α×∑j=1nIk,jn,where α is a weighting factor used to give different weights to the historical weights and current channel status values. Now, we sort all the channels k∈SK according to decreasing order of their WAk values, and we get a new set of channels, Cb. In the next subsection, we describe how this channel set Cb is used to allocate the GTS slots and the channels according to different data transmission requests from the member sensor nodes.


### 4.4. Slot Allocation and Channel Assignment Phase

In this phase, the CH first allocates the GTS to the member nodes, which have requested for RR, RnR, and nRR types of packets. It then assigns one data channel and one backup channel to each of the allocated GTS slots. For the best-effort traffic, the CH assigns channels to each requested node to transmit their packets in the PCAP period. The nodes then transmit data following the prioritized randombackoff according to the remaining lifetimes of their packets.


#### 4.4.1. GTS Allocation

The proposed MQ-MAC protocol allocates GTS slots to all types of packets excepting the best effort traffic to ensure that packets are transmitted without collision. When allocating GTS slots, the protocol gives higher priority to nodes with packets of lower remaining packet lifetimes.As discussed in Section4.3, the CH receives different types of data transmission requests from its member nodes. Let a request be represented by RR(1,t1), where t1 is the remaining packet lifetime of the first request from the RR type. The CH makes the following three different sets of requests sorted in ascending order of the remaining lifetime of their packets: REQRR={RR(1,t1),RR(2,t2),…,RR(n1,tn1)}, where n1 is the number of data transmission requests for type RR; REQRnR={RnR(1,t1),RnR(2,t2),…,RnR(n2,tn2)}, where n2 is the number of data transmission requests for type RnR; and REQnRR={nRR(1,t1),nRR(2,t2),…,nRR(n3,tn3)}, where n3 is the number of data transmission requests for type nRR and for all the three request sets, t1<t2<t3<⋯<tn. Then, the CH merges the above three sets in order into a superset REQGTS=REQRR∪REQRnR∪REQnRR and allocates the GTS slots accordingly. Therefore, the set of assigned GTS slots to the requests is as follows: (3)S=1,2,3,…,n1,n1+1,n1+2,n1+3,…,n1+n2,vvvn1+n2+1,n1+n2+2,n1+n2+3,…,n1vvv+n2+n3,where each slot sloti∈S is assigned to each request reqi∈REQGTS, 1≤i≤n1+n2+n3. Therefore, multiple slots may be allocated to a single node since the latter is allowed to make requests for np number of packet transmissions, as discussed in Section 4.3.


#### 4.4.2. Channel Assignment

Now, our problem is how to assign a channelc∈Cb to the allocated GTSs, described in the previous section. Our channel assignment policy uses the rule “assign better channels to more critical packets.” Therefore, we have to categorize the channels in Cb into different sets of channels: B, the list of best channels that are expected to give the highest performance; M, the list of moderate channels that can give satisfactory performances; and, the channels that should not be allocated, that is, their weights are bellow a certain threshold that indicates they cannot give satisfactory performance.First, we calculate the mean and standard deviation of the channel weights:(4)μ=∑k=1CbWAkCb,σ=∑k=1CbWAk-μ2Cb.Now, we derive the best (B) and moderate (M) channel lists as follows: (5)B=c∈Cb∣WAc≥μ+σ,(6)M=c∈Cb∣μ-σ<WAc<μ+σ.The rest of the channels Cb-B-M will not be used for data transmissions. B and M are then sorted in descending order of channel weights. Now, we assign channels to the allocated slots from B and M as follows. Our proposed MQ-MAC protocol iteratively assigns multiple slots to each channel c∈B and a single slot to each channel c∈M until all slots are assigned a channel. Therefore, we have developed a dynamic channel assignment algorithm (Algorithm 1) that iteratively calls a multislot channel assignment algorithm (Algorithm 2) and a single slot channel assignment algorithm (Algorithm 3). Note that the inherent benefit of the above slot allocation mechanism is that it achieves weighted-fair data collection from the sensor nodes [23]. Finally, we get the channel assignment of GTSs in Ac.Algorithm 1:Dynamic channel assignment algorithm.
(1)k←0
(2)while  k<|S|  do
(3)if  B≠ϕ  then
(4)   Call Algorithm2
(5)end  if
(6)if   (M≠ϕ && k<|S|)  then
(7)   Call Algorithm3
(8)end  if
(9)end  whileAlgorithm 2:Multislot channel Assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|B|)  do
(3)ns = ⌊WAi×f+0.5⌋
(4)j←0
(5)while  (j<ns && k<|S|)  do
(6)Ac[k]←Assign channel  i∈B
(7)k←k+1
(8)j←j+1
(9)end  while
(10)i←i+1
(11)end  whileAlgorithm 3:Single-slot channel assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|M|)  do
(3)Ac[k]←Assign channel  i∈M
(4)k←k+1
(5)i←i+1
(6)end  whileAs shown in line 3 of Algorithm2, a channel c∈B is assigned for the number of slots ns, which is a function of the channel’s weight (WAc) and a factor f, which is the maximum number of consecutive slots that we want to assign a channel.


#### 4.4.3. Backup Channel Assignment

The proposed MQ-MAC also assigns a backup channel for each GTS slot so that an SU can continue its data transmission when a PU appears in the operating data channel. To choose a backup channel for the slots, we go for the next better channel following the assigned data channel. We obtain the list of the assigned backup channels inAb following the steps summarized in Algorithm 4.Algorithm 4:Backup channel assignment algorithm.
(1)A←B∪M
(2)i←0
(3)while(i<|Ac|)do
(4)k←Ac[i]
(5)j←index of kth channel in A
(6)Ab[i]←A[(j+1)%|A|]
(7)i←i+1
(8)end  whileFor the BE traffic, no slot allocation is required; packets are transmitted during PCAP by their respective nodes on the assigned channels using CSMA/CA. In this case, the channels are assigned to BE traffic generating nodes following the same data channel and backup channel assignment algorithms presented before. However, the algorithms will run until all the requesting nodes are assigned a channel instead of a number of slots in the previous case. Then, the CH sends a broadcast message containing the slot allocation and channel assignment information to all the requesting member nodes.


### 4.5. Data Transmission in PCAP

In PCAP, the MQ-MAC nodes with BE traffic transmit data using a CSMA/CA-basedprioritized random back-off mechanism. The back-off range is chosen as (7)BO=0,2t+1-1,where t is calculated as (8)t=tremtlife×f+0.5,where trem is the remaining packet lifetime of a packet and f is a weight factor. Therefore, the packets having reduced remaining lifetime will have an earlier transmission opportunity than the other packets.


### 4.6. An Illustrative Example

In this section, we illustrate the working procedure of slot allocation and channel assignment algorithms with the help of an example. Suppose, seven requests are received at CH as shown in Table2 and from the channel sensing information, we get Cb using (2), as shown in Table 3. Here, μ=0.681 and σ=0.109 and thus we get B={7} and M={1,2,6} using (5) and (6), respectively.Table 2
Traffic requests from member nodes.
Node ID
2
1
8
7
3
6
4
T
class
RR
RnR
nRR
RR
BE
RnR
BE
t
life (ms)
350
400
800
370
1200
450
1400
n
p
2
3
2
1
1
1
1Table 3
Set of channels to be allocated,Cb.
Channel ID
7
1
2
6
9
WA
0.834
0.722
0.716
0.628
0.53Now, each request,reqi∈REQGTS={2,2,7,1,1,1,6,8,8} is allocated against a GTS slot, sloti∈S, computed using (3). For channel 7∈B, we assign 0.834×3+0.5=3 consecutive slots according to Algorithm 2. For channel numbers 1,2,6∈M, we assign one slot to each channel according to Algorithm 3. In the subsequent rounds, we follow the above process iteratively until all slots are assigned channels. The data channel and backup channel assignments are shown in Table 4.Table 4
Assigned data channels and backup channels to GTSs.
Slot
NodeID
Datachannel
Backupchannel
1
2
7
1
2
2
7
1
3
7
7
1
4
1
1
2
5
1
2
6
6
1
6
7
7
6
7
1
8
8
7
1
9
8
7
1Similarly, the data and backup channels for the BE traffic are assigned to nodes 3 and 4. In this example, channel number 7 is assigned to both nodes 3 and 4, respectively, as data channels and channel number 1 is assigned to both nodes as backup channel, following Algorithm4 which is not shown in the above table. Also note that channel number 9 has not been assigned to any nodes due to its poor availability.


### 4.7. Data Transmission from CH to Sink

After receiving all the packets from the member nodes within a superframe, the CH forwards the packets to its next-hop CH using a traditional CSMA/CA-based medium access mechanism. The intermediate CHs also forward the data packets following an FCFS scheduling mechanism. Eventually, the data packets reach the sink in a multihop data transfer fashion. Therefore, it is expected that the proposed MQ-MAC protocol would be able to substantially reduce the end-to-end data transfer delay for reliability and delay-constrained packets.


## 4.1. Basic Idea

The proposed MQ-MAC protocol introduces a new superframe structure that handles the diverse QoS requirements of data packets generated by the sensor nodes. The CHs coordinate the cooperative channel sensing, channel assignments, and guarranteed slot allocations for reliability and delay constrained packets. Using the channel sensing results, the CHs categorize the channels intooptimal andmoderate channels and allocate them among the member nodes according to their traffic priorities. Thus, allocation ensures that the best channel is assigned to the node generating the highest priority packets. For each operating data channel, the MQ-MAC protocol also selects a backup channel that is used in case a PU appears.


## 4.2. Superframe Structure

The proposed MQ-MAC protocol is schedule-based and its superframe structure is composed of four phases: the cooperative sensing and channel selection phase (CSCSP), where the channel sensing results and data transmission requests are collected at the CH from its member nodes; the slot allocation and channel assignment phase (SACAP), where the CH allocates GTS slots to the nodes according to their traffic priorities and assigns data and backup channels; the data transmission phase (DTP), which is composed of- GTS and postcontention access period (PCAP), where nodes with the best effort traffic send data packets using prioritized random backoff according to the reamining packet lifetime; and, the sleeping phase (SP), during which the CH and its member nodes will be in an inactive state and thus more energy can be conserved.Since the proposed MQ-MAC uses dynamic sizes of the GTS and PCAP periods based on the traffic arrival requests, it is able to autonomously conserve more energy when less traffic is generated by the sensor nodes. The superframe structure is shown in Figure2 and the length of the superframe is of 1 second with the lengths of the phases dynamically varying with the number of available sensing channels and data transmission requests from the sensing nodes.Figure 2
Superframe structure.


## 4.3. Cooperative Sensing and Channel Selection Phase

The CSCSP phase is again divided into one advertisement slot and several transmission and channel sensing slots, as shown in Figure3. At first, the CH sends an advertisement for synchronization and the polling channel is set to SK for all member nodes through a broadcast message in CCC [19]. Then, the CH and its member nodes sense each channel k∈SK in consecutive |SK| sensing slots, as shown in Figure 3. In a certain slot, a channel may be in one of the following three states:idle, busy, orcollision. Based on these states of the sensing slots, each node assigns areward or apenalty to the channel weight. Then the weight of kth channel is updated using Wk=Wk+wi, where wi∈{0.1,-0.1,-0.2} represents the amount of reward or penalty corresponding to ith channel state, statei∈{idle,busy,collision}, respectively. Therefore, the higher value of Wk for any channel k∈SK represents a better channel. Each node j also keeps a record on whether a sensed channel k is rewarded (Ik,j=1) or penalized (Ik,j=0) in the current superframe. In the final transmitting slots, all the member nodes j transmit the channel weights Wk,j,∀k∈SK, the value of the indicator variable Ik,j, and the data transmission requests to the CH.Figure 3
The slot structure of CSCSP.Note that, in the CSCSP, each sensor node sends a data transmission request to its CH using a prioritized randomback-off to allow other nodes with important packets to have prioritized access to the medium prior to the nodes with less important packets. The sensor nodes calculate this differentiatedback-off using(1)Tback-off=0,2Tclass-1,where Tback-off is the back-off period randomly selected by the nodes and Tclass is the traffic class value assigned to each traffic class, as shown in Table 1. Thus, it is more likely that a node having high priority traffic will get medium access earlier than others.A data transmission request from any node is identified by the tupleID,Tclass,tlife,np, where ID is the identity of the requesting member node, Tclass is the traffic class of the packets generated by that node, tlife is the lifetime of the head of line (HOL) packet, and np is the number of packets generated by that node per second. Therefore, for each node, we allocate np number of GTS slots in a superframe.Now, the CH has the updated channel weights,Wk,CH and the value of the indicator variable Ik,CH of its own for all channels, ∀k∈SK and the corresponding values for its member nodes. The CH runs the following fusion operation to calculate the average channel weights, WAk, for kth channel for all the n sensing results: (2)WAk=α×∑j=1nWk,jn+1-α×∑j=1nIk,jn,where α is a weighting factor used to give different weights to the historical weights and current channel status values. Now, we sort all the channels k∈SK according to decreasing order of their WAk values, and we get a new set of channels, Cb. In the next subsection, we describe how this channel set Cb is used to allocate the GTS slots and the channels according to different data transmission requests from the member sensor nodes.


## 4.4. Slot Allocation and Channel Assignment Phase

In this phase, the CH first allocates the GTS to the member nodes, which have requested for RR, RnR, and nRR types of packets. It then assigns one data channel and one backup channel to each of the allocated GTS slots. For the best-effort traffic, the CH assigns channels to each requested node to transmit their packets in the PCAP period. The nodes then transmit data following the prioritized randombackoff according to the remaining lifetimes of their packets.


### 4.4.1. GTS Allocation

The proposed MQ-MAC protocol allocates GTS slots to all types of packets excepting the best effort traffic to ensure that packets are transmitted without collision. When allocating GTS slots, the protocol gives higher priority to nodes with packets of lower remaining packet lifetimes.As discussed in Section4.3, the CH receives different types of data transmission requests from its member nodes. Let a request be represented by RR(1,t1), where t1 is the remaining packet lifetime of the first request from the RR type. The CH makes the following three different sets of requests sorted in ascending order of the remaining lifetime of their packets: REQRR={RR(1,t1),RR(2,t2),…,RR(n1,tn1)}, where n1 is the number of data transmission requests for type RR; REQRnR={RnR(1,t1),RnR(2,t2),…,RnR(n2,tn2)}, where n2 is the number of data transmission requests for type RnR; and REQnRR={nRR(1,t1),nRR(2,t2),…,nRR(n3,tn3)}, where n3 is the number of data transmission requests for type nRR and for all the three request sets, t1<t2<t3<⋯<tn. Then, the CH merges the above three sets in order into a superset REQGTS=REQRR∪REQRnR∪REQnRR and allocates the GTS slots accordingly. Therefore, the set of assigned GTS slots to the requests is as follows: (3)S=1,2,3,…,n1,n1+1,n1+2,n1+3,…,n1+n2,vvvn1+n2+1,n1+n2+2,n1+n2+3,…,n1vvv+n2+n3,where each slot sloti∈S is assigned to each request reqi∈REQGTS, 1≤i≤n1+n2+n3. Therefore, multiple slots may be allocated to a single node since the latter is allowed to make requests for np number of packet transmissions, as discussed in Section 4.3.


### 4.4.2. Channel Assignment

Now, our problem is how to assign a channelc∈Cb to the allocated GTSs, described in the previous section. Our channel assignment policy uses the rule “assign better channels to more critical packets.” Therefore, we have to categorize the channels in Cb into different sets of channels: B, the list of best channels that are expected to give the highest performance; M, the list of moderate channels that can give satisfactory performances; and, the channels that should not be allocated, that is, their weights are bellow a certain threshold that indicates they cannot give satisfactory performance.First, we calculate the mean and standard deviation of the channel weights:(4)μ=∑k=1CbWAkCb,σ=∑k=1CbWAk-μ2Cb.Now, we derive the best (B) and moderate (M) channel lists as follows: (5)B=c∈Cb∣WAc≥μ+σ,(6)M=c∈Cb∣μ-σ<WAc<μ+σ.The rest of the channels Cb-B-M will not be used for data transmissions. B and M are then sorted in descending order of channel weights. Now, we assign channels to the allocated slots from B and M as follows. Our proposed MQ-MAC protocol iteratively assigns multiple slots to each channel c∈B and a single slot to each channel c∈M until all slots are assigned a channel. Therefore, we have developed a dynamic channel assignment algorithm (Algorithm 1) that iteratively calls a multislot channel assignment algorithm (Algorithm 2) and a single slot channel assignment algorithm (Algorithm 3). Note that the inherent benefit of the above slot allocation mechanism is that it achieves weighted-fair data collection from the sensor nodes [23]. Finally, we get the channel assignment of GTSs in Ac.Algorithm 1:Dynamic channel assignment algorithm.
(1)k←0
(2)while  k<|S|  do
(3)if  B≠ϕ  then
(4)   Call Algorithm2
(5)end  if
(6)if   (M≠ϕ && k<|S|)  then
(7)   Call Algorithm3
(8)end  if
(9)end  whileAlgorithm 2:Multislot channel Assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|B|)  do
(3)ns = ⌊WAi×f+0.5⌋
(4)j←0
(5)while  (j<ns && k<|S|)  do
(6)Ac[k]←Assign channel  i∈B
(7)k←k+1
(8)j←j+1
(9)end  while
(10)i←i+1
(11)end  whileAlgorithm 3:Single-slot channel assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|M|)  do
(3)Ac[k]←Assign channel  i∈M
(4)k←k+1
(5)i←i+1
(6)end  whileAs shown in line 3 of Algorithm2, a channel c∈B is assigned for the number of slots ns, which is a function of the channel’s weight (WAc) and a factor f, which is the maximum number of consecutive slots that we want to assign a channel.


### 4.4.3. Backup Channel Assignment

The proposed MQ-MAC also assigns a backup channel for each GTS slot so that an SU can continue its data transmission when a PU appears in the operating data channel. To choose a backup channel for the slots, we go for the next better channel following the assigned data channel. We obtain the list of the assigned backup channels inAb following the steps summarized in Algorithm 4.Algorithm 4:Backup channel assignment algorithm.
(1)A←B∪M
(2)i←0
(3)while(i<|Ac|)do
(4)k←Ac[i]
(5)j←index of kth channel in A
(6)Ab[i]←A[(j+1)%|A|]
(7)i←i+1
(8)end  whileFor the BE traffic, no slot allocation is required; packets are transmitted during PCAP by their respective nodes on the assigned channels using CSMA/CA. In this case, the channels are assigned to BE traffic generating nodes following the same data channel and backup channel assignment algorithms presented before. However, the algorithms will run until all the requesting nodes are assigned a channel instead of a number of slots in the previous case. Then, the CH sends a broadcast message containing the slot allocation and channel assignment information to all the requesting member nodes.


## 4.4.1. GTS Allocation

The proposed MQ-MAC protocol allocates GTS slots to all types of packets excepting the best effort traffic to ensure that packets are transmitted without collision. When allocating GTS slots, the protocol gives higher priority to nodes with packets of lower remaining packet lifetimes.As discussed in Section4.3, the CH receives different types of data transmission requests from its member nodes. Let a request be represented by RR(1,t1), where t1 is the remaining packet lifetime of the first request from the RR type. The CH makes the following three different sets of requests sorted in ascending order of the remaining lifetime of their packets: REQRR={RR(1,t1),RR(2,t2),…,RR(n1,tn1)}, where n1 is the number of data transmission requests for type RR; REQRnR={RnR(1,t1),RnR(2,t2),…,RnR(n2,tn2)}, where n2 is the number of data transmission requests for type RnR; and REQnRR={nRR(1,t1),nRR(2,t2),…,nRR(n3,tn3)}, where n3 is the number of data transmission requests for type nRR and for all the three request sets, t1<t2<t3<⋯<tn. Then, the CH merges the above three sets in order into a superset REQGTS=REQRR∪REQRnR∪REQnRR and allocates the GTS slots accordingly. Therefore, the set of assigned GTS slots to the requests is as follows: (3)S=1,2,3,…,n1,n1+1,n1+2,n1+3,…,n1+n2,vvvn1+n2+1,n1+n2+2,n1+n2+3,…,n1vvv+n2+n3,where each slot sloti∈S is assigned to each request reqi∈REQGTS, 1≤i≤n1+n2+n3. Therefore, multiple slots may be allocated to a single node since the latter is allowed to make requests for np number of packet transmissions, as discussed in Section 4.3.


## 4.4.2. Channel Assignment

Now, our problem is how to assign a channelc∈Cb to the allocated GTSs, described in the previous section. Our channel assignment policy uses the rule “assign better channels to more critical packets.” Therefore, we have to categorize the channels in Cb into different sets of channels: B, the list of best channels that are expected to give the highest performance; M, the list of moderate channels that can give satisfactory performances; and, the channels that should not be allocated, that is, their weights are bellow a certain threshold that indicates they cannot give satisfactory performance.First, we calculate the mean and standard deviation of the channel weights:(4)μ=∑k=1CbWAkCb,σ=∑k=1CbWAk-μ2Cb.Now, we derive the best (B) and moderate (M) channel lists as follows: (5)B=c∈Cb∣WAc≥μ+σ,(6)M=c∈Cb∣μ-σ<WAc<μ+σ.The rest of the channels Cb-B-M will not be used for data transmissions. B and M are then sorted in descending order of channel weights. Now, we assign channels to the allocated slots from B and M as follows. Our proposed MQ-MAC protocol iteratively assigns multiple slots to each channel c∈B and a single slot to each channel c∈M until all slots are assigned a channel. Therefore, we have developed a dynamic channel assignment algorithm (Algorithm 1) that iteratively calls a multislot channel assignment algorithm (Algorithm 2) and a single slot channel assignment algorithm (Algorithm 3). Note that the inherent benefit of the above slot allocation mechanism is that it achieves weighted-fair data collection from the sensor nodes [23]. Finally, we get the channel assignment of GTSs in Ac.Algorithm 1:Dynamic channel assignment algorithm.
(1)k←0
(2)while  k<|S|  do
(3)if  B≠ϕ  then
(4)   Call Algorithm2
(5)end  if
(6)if   (M≠ϕ && k<|S|)  then
(7)   Call Algorithm3
(8)end  if
(9)end  whileAlgorithm 2:Multislot channel Assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|B|)  do
(3)ns = ⌊WAi×f+0.5⌋
(4)j←0
(5)while  (j<ns && k<|S|)  do
(6)Ac[k]←Assign channel  i∈B
(7)k←k+1
(8)j←j+1
(9)end  while
(10)i←i+1
(11)end  whileAlgorithm 3:Single-slot channel assignment algorithm.
(1)i←0
(2)while  (k<|S| && i<|M|)  do
(3)Ac[k]←Assign channel  i∈M
(4)k←k+1
(5)i←i+1
(6)end  whileAs shown in line 3 of Algorithm2, a channel c∈B is assigned for the number of slots ns, which is a function of the channel’s weight (WAc) and a factor f, which is the maximum number of consecutive slots that we want to assign a channel.


## 4.4.3. Backup Channel Assignment

The proposed MQ-MAC also assigns a backup channel for each GTS slot so that an SU can continue its data transmission when a PU appears in the operating data channel. To choose a backup channel for the slots, we go for the next better channel following the assigned data channel. We obtain the list of the assigned backup channels inAb following the steps summarized in Algorithm 4.Algorithm 4:Backup channel assignment algorithm.
(1)A←B∪M
(2)i←0
(3)while(i<|Ac|)do
(4)k←Ac[i]
(5)j←index of kth channel in A
(6)Ab[i]←A[(j+1)%|A|]
(7)i←i+1
(8)end  whileFor the BE traffic, no slot allocation is required; packets are transmitted during PCAP by their respective nodes on the assigned channels using CSMA/CA. In this case, the channels are assigned to BE traffic generating nodes following the same data channel and backup channel assignment algorithms presented before. However, the algorithms will run until all the requesting nodes are assigned a channel instead of a number of slots in the previous case. Then, the CH sends a broadcast message containing the slot allocation and channel assignment information to all the requesting member nodes.


## 4.5. Data Transmission in PCAP

In PCAP, the MQ-MAC nodes with BE traffic transmit data using a CSMA/CA-basedprioritized random back-off mechanism. The back-off range is chosen as (7)BO=0,2t+1-1,where t is calculated as (8)t=tremtlife×f+0.5,where trem is the remaining packet lifetime of a packet and f is a weight factor. Therefore, the packets having reduced remaining lifetime will have an earlier transmission opportunity than the other packets.


## 4.6. An Illustrative Example

In this section, we illustrate the working procedure of slot allocation and channel assignment algorithms with the help of an example. Suppose, seven requests are received at CH as shown in Table2 and from the channel sensing information, we get Cb using (2), as shown in Table 3. Here, μ=0.681 and σ=0.109 and thus we get B={7} and M={1,2,6} using (5) and (6), respectively.Table 2
Traffic requests from member nodes.
Node ID
2
1
8
7
3
6
4
T
class
RR
RnR
nRR
RR
BE
RnR
BE
t
life (ms)
350
400
800
370
1200
450
1400
n
p
2
3
2
1
1
1
1Table 3
Set of channels to be allocated,Cb.
Channel ID
7
1
2
6
9
WA
0.834
0.722
0.716
0.628
0.53Now, each request,reqi∈REQGTS={2,2,7,1,1,1,6,8,8} is allocated against a GTS slot, sloti∈S, computed using (3). For channel 7∈B, we assign 0.834×3+0.5=3 consecutive slots according to Algorithm 2. For channel numbers 1,2,6∈M, we assign one slot to each channel according to Algorithm 3. In the subsequent rounds, we follow the above process iteratively until all slots are assigned channels. The data channel and backup channel assignments are shown in Table 4.Table 4
Assigned data channels and backup channels to GTSs.
Slot
NodeID
Datachannel
Backupchannel
1
2
7
1
2
2
7
1
3
7
7
1
4
1
1
2
5
1
2
6
6
1
6
7
7
6
7
1
8
8
7
1
9
8
7
1Similarly, the data and backup channels for the BE traffic are assigned to nodes 3 and 4. In this example, channel number 7 is assigned to both nodes 3 and 4, respectively, as data channels and channel number 1 is assigned to both nodes as backup channel, following Algorithm4 which is not shown in the above table. Also note that channel number 9 has not been assigned to any nodes due to its poor availability.


## 4.7. Data Transmission from CH to Sink

After receiving all the packets from the member nodes within a superframe, the CH forwards the packets to its next-hop CH using a traditional CSMA/CA-based medium access mechanism. The intermediate CHs also forward the data packets following an FCFS scheduling mechanism. Eventually, the data packets reach the sink in a multihop data transfer fashion. Therefore, it is expected that the proposed MQ-MAC protocol would be able to substantially reduce the end-to-end data transfer delay for reliability and delay-constrained packets.


## 5. Performance Evaluation

In this section, we study the comparative performances of the proposed MQ-MAC protocol against two state-of-the-art CRSN MAC protocols COM-MAC [8] and KoN-MAC [9]. The simulations are conducted in the NS-3 simulator [10], which is an object-oriented simulation tool.


### 5.1. Simulation Environment

Our developed MQ-MAC protocol can be applicable in a variety of real-life application scenarios including war field monitoring, forest monitoring, health monitoring, environmental monitoring, and so forth. Here, for the simulation purpose, we consider a forest monitoring application where different types of sensor devices are placed. For example, sensed data packets from forest fire detection event can be depicted as real-time reliable (RR), data packets corresponding to camera sensors may be regarded as real-time non-reliable (RnR), data packets due to detection of storms or rainfall can be classified as non-real-time reliable (nRR), and temperature and humidity sensor data (in normal range) can be categorized as best effort (BE) traffic. We consider an area of 1000×1000m2 of a forest, where sensor nodes are deployed with uniform random distribution. The nodes form clusters using LEACH algorithm [18]. The simulation parameters are listed in Table 5. We run the simulations for 500 seconds and, for each data point in the graphs, we have taken the average value of the results from 10 simulation runs with different random seed values in order to capture the steady state behaviour of the studied protocols.Table 5
Simulation parameters.
Parameter
Value
Simulation area
1000 m× 1000 m
Number of sensor nodes
50~300
Deployment type
Uniform random
Transmitting radius
100 m
Back-off mechanism
CSMA/CA
Number of Channels
10
Channel data rate
1 Mbps
Time for one channel sense
20μs
Superframe period
1 s
Slot duration
0.55 ms
CBR packet size
64 Bytes
MAC layer model
Ad hoc WifiMAC
Physical layer model
YansWifiPhy Model
Energy in channel sense
23.56 mJ
Energy in receive mode
23.56 mJ
Energy in transmit mode
18.6 mJ
Initial energy of each node
100 Joule
Queue length
50
Simulation time
500 seconds
α
0.3
f
3


### 5.2. Performance Metrics

We have evaluated the studied protocols in terms of the following performance metrics.(i)
Average packet delivery delay of a single packet is the average difference between the time when a packet is generated at the source and when it is received at the sink. Delays experienced by individual data packets are averaged over the total number of packets received by the sink.(ii)
On-time reachability is measured as the ratio of the total number of packets successfully received by the sink within the delay-deadline to the total number of data packets generated by all the sensor nodes during the simulation period.(iii)
Blocking rate is measured as the average number of SUs per second that find all the channels busy and thus can not transmit any data.(iv)
Usage of licensed channels is used to evaluate a protocol with respect to the utilization of the unused LCs. This is measured as the total amount of time the SUs spent in LCs during the simulation period. The more time the SUs communicate over the LCs, the more the protocol utilizes the unused LCs. This is one of the most important objectives of CR networks.(v)
Protocol operation overhead can be measured as the amount of control bytes exchanged per successful data packet transmission. As the amount of control bytes per data packet increases, the protocol operation overhead increases as well. It is always expected to lower this overhead for improving the performance of a protocol.(vi)
Average energy consumption per successful packet is measured as the ratio of the total energy consumed by all the nodes in the network to the total number of packets successfully received at the sink during the simulation period.


### 5.3. Simulation Results

The results of simulation experiments for varying number of sensor nodes and traffic loads on protocol performances are presented below.


#### 5.3.1. Impacts of Number of Sensor Nodes

At first, we have calculated the average packet delivery delay for varying number of sensor nodes. In Figure4(a), we have considered all four types of traffics. The graphs show that the average packet delivery delay is increased with the number of sensing nodes in all the studied protocols. We observe that our MQ-MAC has the least delay performance because the prioritized medium access in MQ-MAC enables differentiated access to medium for individual data packets and thus it delivers delay-constrained packets in GTS slots immediately. Also, with remaining packet lifetime aware GTS scheduling, we can ensure that the least lifetime packets are scheduled first that put great contributions in reducing the end-to-end packet delivery delay. On the other hand, KoN-MAC [9] schedules packets using FIFO, it needs more time for channel switching and thus it experiences higher packet delivery delay. Furthermore, the COM-MAC [8] has no backup channel and it experiences high media contention due to poor channel assignments, leading to increased packet delivery delay.Figure 4
Impacts of number of sensor nodes on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageIn Figure4(b), we observe that the on-time reachability decreases with the increasing number of sensor nodes in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than those of KoN-MAC and COM-MAC. With remaining packet lifetime aware GTS scheduling, our proposed MQ-MAC protocol takes into account the remaining packet lifetime and allocates the slots accordingly to the increasing order of packet lifetime. Also, with prioritized medium access in MQ-MAC, we have done data prioritization following the traffic class values. Therefore, most of the reliability and delay constrained packets reach the sink on-time in MQ-MAC. Packets may be dropped only when the number of data packets generated from many source sensor nodes is very high. On the other hand, both the KoN-MAC and COM-MAC lack prioritized medium access and remaining packet lifetime aware GTS scheduling, leading many packets to drop due to lifetime expiration and thereby resulting in a decreased on-time reachability.Figure4(c) shows that the SU blocking rate increases with the increasing number of sensor nodes in all the studied protocols. However, in MQ-MAC, the rate of increase is less compared to the others. In KoN-MAC, channels are assigned randomly to the nodes from the available channel list, which is obtained after cooperative sensing. No GTS slots are assigned to any nodes and no special channel assignment mechanism is employed to increase the usage of all the channels which ultimately increases the channel loss probability for SUs in KoN-MAC and COM-MAC. On the otherhand, with dynamic channel allocation in MQ-MAC, we have assigned a channel to one or more slots dynamically considering the channel weight for the corresponding slot of the superframe. Also, with intelligent fusion operation for the channel sensing results in MQ-MAC facilitate selection of the best possible channel set from the sensing result. We have categorized the channels into best and moderate lists and assigned channels to slots accordingly so that the channel usage probability for SUs is increased. As a result, less channels are blocked in MQ-MAC during data transmission, thus reducing the SU blocking rate by a reasonable amount compared to others.In Figure4(d), we observe that the licensed channel usage percentage drastically falls at higher number of sensor nodes in COM-MAC. However, in our proposed MQ-MAC, the licensed channel usage percentage is much higher than KoN- MAC and COM-MAC. With dynamic channel allocation and intelligent fusion operation, MQ-MAC ensures less SU blocking rate and thus the sensor nodes use the LCs for a longer period of time. In MQ-MAC, channels are categorized and best channels are assigned to multiple consecutive slots as they seem to be free for a longer period of time. The MQ-MAC also chooses backup channels from the best available licensed channels. With dynamic channel switching SUs immediately switch to the preallocated backup channels. On the other hand, in KoN-MAC and COM-MAC, blocking rate is higher and the best channel is not considered for multiple consecutive slots. As a result, in KoN-MAC and COM-MAC, LC usage percentage is much less than MQ-MAC as the number of sensor nodes is increased.


#### 5.3.2. Impacts of Traffic Load

Figure5 shows the comparative performances for increasing traffic loads from sensor nodes. The graphs of Figure 5(a) show that, in all the studied protocols, the delay increases with traffic loads due to excessive collisions and retransmissions required for data transmissions and increased queuing delays. However, our proposed MQ-MAC protocol has the least average delay compared to the other protocols. In Figure 5(b), we observe that the on-time reachability decreases as the traffic load increases in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than the KoN-MAC and COM-MAC because of prioritized medium access and remaining packet lifetime aware GTS scheduling techniques.Figure 5
Impacts of traffic load on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageThe graphs of Figure5(c) depict that the blocking rate increases, in all the studied protocols, with traffic loads, as expected theoretically. However, our proposed MQ-MAC has lower blocking rate than KoN-MAC and COM-MAC throughout the whole simulation period due to employing prioritized channel assignment and dynamic use of backup channels.We also notice that the licensed channel usage percentage is lower in KoN-MAC and COM-MAC compared to MQ-MAC, as shown in Figure5(d). The judicious choice of better channels for data transmission and dynamic decisions on switching of channels in between the backup and data channels in MQ-MAC makes it more intelligent to achieve better licensed channel usage percentage.


#### 5.3.3. Protocol Operation Overhead

We also evaluate the comparative performances of the studied protocols in terms of the amount of control bytes exchanged for each successful packet delivery, that is, protocol operation overhead. The graphs of Figure6 depict that the overhead of our proposed MQ-MAC protocol is less than that of other protocols for increasing both number of sensor nodes and traffic loads. Our indepth look into the simulation trace file data values reveal that, even though the proposed MQ-MAC requires some additional control messages, it offers reduced protocol operation overhead since it is able to highly increase the number of successful packet delivery in expense of a bit more control byte transfers. This is achieved due to combined effect of prioritized medium access, dynamic channel allocation, and channel switching techniques.Figure 6
Protocol operation overhead.
(a)
For different number of sensor nodes
(b)
For different traffic loads


#### 5.3.4. Average Amount of Energy Required per Packet

The graphs in Figure7 show that the average amount of energy required for successful transmission of a packet growing up with the increasing number of sensor nodes and traffic loads in all the studied protocols. The energy expenditure in MQ-MAC is less than those of the other protocols because judicious channel allocation, intelligent fusion operation and dynamic channel switching techniques in MQ-MAC ensure reduced number of collisions and retransmissions. The COM-MAC has the highest energy expenditure as it senses all the available channels irrespective of their business.Figure 7
Average amount of energy consumed per successful packet.
(a)
For different number of sensor nodes
(b)
For different traffic loads


#### 5.3.5. QoS Performances of Different Packet Types

In this section, we study the delay and reliability constrained QoS performances of the proposed MQ-MAC protocol for different classes of data packets generated from varying number of sensor nodes.Figure8(a) depicts that the average packet delivery delay for all types of packets is increased with the number of source sensor nodes, as expected theoretically. The employment of prioritized channel access and remaining lifetime aware GTS scheduling in our proposed MQ-MAC protocol helps it to achieve reduced delay for RR packets compared to others. Therefore, the critical events like forest fire can be detected in real-time with the use of our MQ-MAC protocol. The BE traffic (corresponding to normal temperature and humidity values) experiences the highest average delay since it has the least access priority.Figure 8
Average packet delay and on-time reachability for different packet types.
(a)
Average delay
(b)
Ontime reachabilityThe graphs of Figure8(b) show that the RR, RnR, and nRR type packets reach the sink node with higher on-time reachibility since each of them are allocated guaranteed time slots (GTS) in good quality channels. Thus, the reliability-required events (e.g., forest fire, storm, rain, etc.) can be monitored efficiently with the use of our MQ-MAC protocol. The BE packets experience a bit more packet loss since they are not assigned any GTS slots for data transmission.


## 5.1. Simulation Environment

Our developed MQ-MAC protocol can be applicable in a variety of real-life application scenarios including war field monitoring, forest monitoring, health monitoring, environmental monitoring, and so forth. Here, for the simulation purpose, we consider a forest monitoring application where different types of sensor devices are placed. For example, sensed data packets from forest fire detection event can be depicted as real-time reliable (RR), data packets corresponding to camera sensors may be regarded as real-time non-reliable (RnR), data packets due to detection of storms or rainfall can be classified as non-real-time reliable (nRR), and temperature and humidity sensor data (in normal range) can be categorized as best effort (BE) traffic. We consider an area of 1000×1000m2 of a forest, where sensor nodes are deployed with uniform random distribution. The nodes form clusters using LEACH algorithm [18]. The simulation parameters are listed in Table 5. We run the simulations for 500 seconds and, for each data point in the graphs, we have taken the average value of the results from 10 simulation runs with different random seed values in order to capture the steady state behaviour of the studied protocols.Table 5
Simulation parameters.
Parameter
Value
Simulation area
1000 m× 1000 m
Number of sensor nodes
50~300
Deployment type
Uniform random
Transmitting radius
100 m
Back-off mechanism
CSMA/CA
Number of Channels
10
Channel data rate
1 Mbps
Time for one channel sense
20μs
Superframe period
1 s
Slot duration
0.55 ms
CBR packet size
64 Bytes
MAC layer model
Ad hoc WifiMAC
Physical layer model
YansWifiPhy Model
Energy in channel sense
23.56 mJ
Energy in receive mode
23.56 mJ
Energy in transmit mode
18.6 mJ
Initial energy of each node
100 Joule
Queue length
50
Simulation time
500 seconds
α
0.3
f
3


## 5.2. Performance Metrics

We have evaluated the studied protocols in terms of the following performance metrics.(i)
Average packet delivery delay of a single packet is the average difference between the time when a packet is generated at the source and when it is received at the sink. Delays experienced by individual data packets are averaged over the total number of packets received by the sink.(ii)
On-time reachability is measured as the ratio of the total number of packets successfully received by the sink within the delay-deadline to the total number of data packets generated by all the sensor nodes during the simulation period.(iii)
Blocking rate is measured as the average number of SUs per second that find all the channels busy and thus can not transmit any data.(iv)
Usage of licensed channels is used to evaluate a protocol with respect to the utilization of the unused LCs. This is measured as the total amount of time the SUs spent in LCs during the simulation period. The more time the SUs communicate over the LCs, the more the protocol utilizes the unused LCs. This is one of the most important objectives of CR networks.(v)
Protocol operation overhead can be measured as the amount of control bytes exchanged per successful data packet transmission. As the amount of control bytes per data packet increases, the protocol operation overhead increases as well. It is always expected to lower this overhead for improving the performance of a protocol.(vi)
Average energy consumption per successful packet is measured as the ratio of the total energy consumed by all the nodes in the network to the total number of packets successfully received at the sink during the simulation period.


## 5.3. Simulation Results

The results of simulation experiments for varying number of sensor nodes and traffic loads on protocol performances are presented below.


### 5.3.1. Impacts of Number of Sensor Nodes

At first, we have calculated the average packet delivery delay for varying number of sensor nodes. In Figure4(a), we have considered all four types of traffics. The graphs show that the average packet delivery delay is increased with the number of sensing nodes in all the studied protocols. We observe that our MQ-MAC has the least delay performance because the prioritized medium access in MQ-MAC enables differentiated access to medium for individual data packets and thus it delivers delay-constrained packets in GTS slots immediately. Also, with remaining packet lifetime aware GTS scheduling, we can ensure that the least lifetime packets are scheduled first that put great contributions in reducing the end-to-end packet delivery delay. On the other hand, KoN-MAC [9] schedules packets using FIFO, it needs more time for channel switching and thus it experiences higher packet delivery delay. Furthermore, the COM-MAC [8] has no backup channel and it experiences high media contention due to poor channel assignments, leading to increased packet delivery delay.Figure 4
Impacts of number of sensor nodes on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageIn Figure4(b), we observe that the on-time reachability decreases with the increasing number of sensor nodes in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than those of KoN-MAC and COM-MAC. With remaining packet lifetime aware GTS scheduling, our proposed MQ-MAC protocol takes into account the remaining packet lifetime and allocates the slots accordingly to the increasing order of packet lifetime. Also, with prioritized medium access in MQ-MAC, we have done data prioritization following the traffic class values. Therefore, most of the reliability and delay constrained packets reach the sink on-time in MQ-MAC. Packets may be dropped only when the number of data packets generated from many source sensor nodes is very high. On the other hand, both the KoN-MAC and COM-MAC lack prioritized medium access and remaining packet lifetime aware GTS scheduling, leading many packets to drop due to lifetime expiration and thereby resulting in a decreased on-time reachability.Figure4(c) shows that the SU blocking rate increases with the increasing number of sensor nodes in all the studied protocols. However, in MQ-MAC, the rate of increase is less compared to the others. In KoN-MAC, channels are assigned randomly to the nodes from the available channel list, which is obtained after cooperative sensing. No GTS slots are assigned to any nodes and no special channel assignment mechanism is employed to increase the usage of all the channels which ultimately increases the channel loss probability for SUs in KoN-MAC and COM-MAC. On the otherhand, with dynamic channel allocation in MQ-MAC, we have assigned a channel to one or more slots dynamically considering the channel weight for the corresponding slot of the superframe. Also, with intelligent fusion operation for the channel sensing results in MQ-MAC facilitate selection of the best possible channel set from the sensing result. We have categorized the channels into best and moderate lists and assigned channels to slots accordingly so that the channel usage probability for SUs is increased. As a result, less channels are blocked in MQ-MAC during data transmission, thus reducing the SU blocking rate by a reasonable amount compared to others.In Figure4(d), we observe that the licensed channel usage percentage drastically falls at higher number of sensor nodes in COM-MAC. However, in our proposed MQ-MAC, the licensed channel usage percentage is much higher than KoN- MAC and COM-MAC. With dynamic channel allocation and intelligent fusion operation, MQ-MAC ensures less SU blocking rate and thus the sensor nodes use the LCs for a longer period of time. In MQ-MAC, channels are categorized and best channels are assigned to multiple consecutive slots as they seem to be free for a longer period of time. The MQ-MAC also chooses backup channels from the best available licensed channels. With dynamic channel switching SUs immediately switch to the preallocated backup channels. On the other hand, in KoN-MAC and COM-MAC, blocking rate is higher and the best channel is not considered for multiple consecutive slots. As a result, in KoN-MAC and COM-MAC, LC usage percentage is much less than MQ-MAC as the number of sensor nodes is increased.


### 5.3.2. Impacts of Traffic Load

Figure5 shows the comparative performances for increasing traffic loads from sensor nodes. The graphs of Figure 5(a) show that, in all the studied protocols, the delay increases with traffic loads due to excessive collisions and retransmissions required for data transmissions and increased queuing delays. However, our proposed MQ-MAC protocol has the least average delay compared to the other protocols. In Figure 5(b), we observe that the on-time reachability decreases as the traffic load increases in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than the KoN-MAC and COM-MAC because of prioritized medium access and remaining packet lifetime aware GTS scheduling techniques.Figure 5
Impacts of traffic load on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageThe graphs of Figure5(c) depict that the blocking rate increases, in all the studied protocols, with traffic loads, as expected theoretically. However, our proposed MQ-MAC has lower blocking rate than KoN-MAC and COM-MAC throughout the whole simulation period due to employing prioritized channel assignment and dynamic use of backup channels.We also notice that the licensed channel usage percentage is lower in KoN-MAC and COM-MAC compared to MQ-MAC, as shown in Figure5(d). The judicious choice of better channels for data transmission and dynamic decisions on switching of channels in between the backup and data channels in MQ-MAC makes it more intelligent to achieve better licensed channel usage percentage.


### 5.3.3. Protocol Operation Overhead

We also evaluate the comparative performances of the studied protocols in terms of the amount of control bytes exchanged for each successful packet delivery, that is, protocol operation overhead. The graphs of Figure6 depict that the overhead of our proposed MQ-MAC protocol is less than that of other protocols for increasing both number of sensor nodes and traffic loads. Our indepth look into the simulation trace file data values reveal that, even though the proposed MQ-MAC requires some additional control messages, it offers reduced protocol operation overhead since it is able to highly increase the number of successful packet delivery in expense of a bit more control byte transfers. This is achieved due to combined effect of prioritized medium access, dynamic channel allocation, and channel switching techniques.Figure 6
Protocol operation overhead.
(a)
For different number of sensor nodes
(b)
For different traffic loads


### 5.3.4. Average Amount of Energy Required per Packet

The graphs in Figure7 show that the average amount of energy required for successful transmission of a packet growing up with the increasing number of sensor nodes and traffic loads in all the studied protocols. The energy expenditure in MQ-MAC is less than those of the other protocols because judicious channel allocation, intelligent fusion operation and dynamic channel switching techniques in MQ-MAC ensure reduced number of collisions and retransmissions. The COM-MAC has the highest energy expenditure as it senses all the available channels irrespective of their business.Figure 7
Average amount of energy consumed per successful packet.
(a)
For different number of sensor nodes
(b)
For different traffic loads


### 5.3.5. QoS Performances of Different Packet Types

In this section, we study the delay and reliability constrained QoS performances of the proposed MQ-MAC protocol for different classes of data packets generated from varying number of sensor nodes.Figure8(a) depicts that the average packet delivery delay for all types of packets is increased with the number of source sensor nodes, as expected theoretically. The employment of prioritized channel access and remaining lifetime aware GTS scheduling in our proposed MQ-MAC protocol helps it to achieve reduced delay for RR packets compared to others. Therefore, the critical events like forest fire can be detected in real-time with the use of our MQ-MAC protocol. The BE traffic (corresponding to normal temperature and humidity values) experiences the highest average delay since it has the least access priority.Figure 8
Average packet delay and on-time reachability for different packet types.
(a)
Average delay
(b)
Ontime reachabilityThe graphs of Figure8(b) show that the RR, RnR, and nRR type packets reach the sink node with higher on-time reachibility since each of them are allocated guaranteed time slots (GTS) in good quality channels. Thus, the reliability-required events (e.g., forest fire, storm, rain, etc.) can be monitored efficiently with the use of our MQ-MAC protocol. The BE packets experience a bit more packet loss since they are not assigned any GTS slots for data transmission.


## 5.3.1. Impacts of Number of Sensor Nodes

At first, we have calculated the average packet delivery delay for varying number of sensor nodes. In Figure4(a), we have considered all four types of traffics. The graphs show that the average packet delivery delay is increased with the number of sensing nodes in all the studied protocols. We observe that our MQ-MAC has the least delay performance because the prioritized medium access in MQ-MAC enables differentiated access to medium for individual data packets and thus it delivers delay-constrained packets in GTS slots immediately. Also, with remaining packet lifetime aware GTS scheduling, we can ensure that the least lifetime packets are scheduled first that put great contributions in reducing the end-to-end packet delivery delay. On the other hand, KoN-MAC [9] schedules packets using FIFO, it needs more time for channel switching and thus it experiences higher packet delivery delay. Furthermore, the COM-MAC [8] has no backup channel and it experiences high media contention due to poor channel assignments, leading to increased packet delivery delay.Figure 4
Impacts of number of sensor nodes on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageIn Figure4(b), we observe that the on-time reachability decreases with the increasing number of sensor nodes in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than those of KoN-MAC and COM-MAC. With remaining packet lifetime aware GTS scheduling, our proposed MQ-MAC protocol takes into account the remaining packet lifetime and allocates the slots accordingly to the increasing order of packet lifetime. Also, with prioritized medium access in MQ-MAC, we have done data prioritization following the traffic class values. Therefore, most of the reliability and delay constrained packets reach the sink on-time in MQ-MAC. Packets may be dropped only when the number of data packets generated from many source sensor nodes is very high. On the other hand, both the KoN-MAC and COM-MAC lack prioritized medium access and remaining packet lifetime aware GTS scheduling, leading many packets to drop due to lifetime expiration and thereby resulting in a decreased on-time reachability.Figure4(c) shows that the SU blocking rate increases with the increasing number of sensor nodes in all the studied protocols. However, in MQ-MAC, the rate of increase is less compared to the others. In KoN-MAC, channels are assigned randomly to the nodes from the available channel list, which is obtained after cooperative sensing. No GTS slots are assigned to any nodes and no special channel assignment mechanism is employed to increase the usage of all the channels which ultimately increases the channel loss probability for SUs in KoN-MAC and COM-MAC. On the otherhand, with dynamic channel allocation in MQ-MAC, we have assigned a channel to one or more slots dynamically considering the channel weight for the corresponding slot of the superframe. Also, with intelligent fusion operation for the channel sensing results in MQ-MAC facilitate selection of the best possible channel set from the sensing result. We have categorized the channels into best and moderate lists and assigned channels to slots accordingly so that the channel usage probability for SUs is increased. As a result, less channels are blocked in MQ-MAC during data transmission, thus reducing the SU blocking rate by a reasonable amount compared to others.In Figure4(d), we observe that the licensed channel usage percentage drastically falls at higher number of sensor nodes in COM-MAC. However, in our proposed MQ-MAC, the licensed channel usage percentage is much higher than KoN- MAC and COM-MAC. With dynamic channel allocation and intelligent fusion operation, MQ-MAC ensures less SU blocking rate and thus the sensor nodes use the LCs for a longer period of time. In MQ-MAC, channels are categorized and best channels are assigned to multiple consecutive slots as they seem to be free for a longer period of time. The MQ-MAC also chooses backup channels from the best available licensed channels. With dynamic channel switching SUs immediately switch to the preallocated backup channels. On the other hand, in KoN-MAC and COM-MAC, blocking rate is higher and the best channel is not considered for multiple consecutive slots. As a result, in KoN-MAC and COM-MAC, LC usage percentage is much less than MQ-MAC as the number of sensor nodes is increased.


## 5.3.2. Impacts of Traffic Load

Figure5 shows the comparative performances for increasing traffic loads from sensor nodes. The graphs of Figure 5(a) show that, in all the studied protocols, the delay increases with traffic loads due to excessive collisions and retransmissions required for data transmissions and increased queuing delays. However, our proposed MQ-MAC protocol has the least average delay compared to the other protocols. In Figure 5(b), we observe that the on-time reachability decreases as the traffic load increases in all the studied protocols. However, the rate of decrease in our proposed MQ-MAC protocol is less than the KoN-MAC and COM-MAC because of prioritized medium access and remaining packet lifetime aware GTS scheduling techniques.Figure 5
Impacts of traffic load on protocol performance.
(a)
Average packet delivery delay
(b)
On-time reachability
(c)
SU blocking rate
(d)
Licensed channel (LC) usage percentageThe graphs of Figure5(c) depict that the blocking rate increases, in all the studied protocols, with traffic loads, as expected theoretically. However, our proposed MQ-MAC has lower blocking rate than KoN-MAC and COM-MAC throughout the whole simulation period due to employing prioritized channel assignment and dynamic use of backup channels.We also notice that the licensed channel usage percentage is lower in KoN-MAC and COM-MAC compared to MQ-MAC, as shown in Figure5(d). The judicious choice of better channels for data transmission and dynamic decisions on switching of channels in between the backup and data channels in MQ-MAC makes it more intelligent to achieve better licensed channel usage percentage.


## 5.3.3. Protocol Operation Overhead

We also evaluate the comparative performances of the studied protocols in terms of the amount of control bytes exchanged for each successful packet delivery, that is, protocol operation overhead. The graphs of Figure6 depict that the overhead of our proposed MQ-MAC protocol is less than that of other protocols for increasing both number of sensor nodes and traffic loads. Our indepth look into the simulation trace file data values reveal that, even though the proposed MQ-MAC requires some additional control messages, it offers reduced protocol operation overhead since it is able to highly increase the number of successful packet delivery in expense of a bit more control byte transfers. This is achieved due to combined effect of prioritized medium access, dynamic channel allocation, and channel switching techniques.Figure 6
Protocol operation overhead.
(a)
For different number of sensor nodes
(b)
For different traffic loads


## 5.3.4. Average Amount of Energy Required per Packet

The graphs in Figure7 show that the average amount of energy required for successful transmission of a packet growing up with the increasing number of sensor nodes and traffic loads in all the studied protocols. The energy expenditure in MQ-MAC is less than those of the other protocols because judicious channel allocation, intelligent fusion operation and dynamic channel switching techniques in MQ-MAC ensure reduced number of collisions and retransmissions. The COM-MAC has the highest energy expenditure as it senses all the available channels irrespective of their business.Figure 7
Average amount of energy consumed per successful packet.
(a)
For different number of sensor nodes
(b)
For different traffic loads


## 5.3.5. QoS Performances of Different Packet Types

In this section, we study the delay and reliability constrained QoS performances of the proposed MQ-MAC protocol for different classes of data packets generated from varying number of sensor nodes.Figure8(a) depicts that the average packet delivery delay for all types of packets is increased with the number of source sensor nodes, as expected theoretically. The employment of prioritized channel access and remaining lifetime aware GTS scheduling in our proposed MQ-MAC protocol helps it to achieve reduced delay for RR packets compared to others. Therefore, the critical events like forest fire can be detected in real-time with the use of our MQ-MAC protocol. The BE traffic (corresponding to normal temperature and humidity values) experiences the highest average delay since it has the least access priority.Figure 8
Average packet delay and on-time reachability for different packet types.
(a)
Average delay
(b)
Ontime reachabilityThe graphs of Figure8(b) show that the RR, RnR, and nRR type packets reach the sink node with higher on-time reachibility since each of them are allocated guaranteed time slots (GTS) in good quality channels. Thus, the reliability-required events (e.g., forest fire, storm, rain, etc.) can be monitored efficiently with the use of our MQ-MAC protocol. The BE packets experience a bit more packet loss since they are not assigned any GTS slots for data transmission.


## 6. Conclusion

In this paper, we have presented a multiconstrained QoS aware MAC protocol, MQ-MAC, for CRSN that ensures energy-efficiency and meets QoS requirements for heterogeneous traffic. The features of MQ-MAC include prioritized medium access, dynamic channel allocation, remaining packet lifetime aware GTS scheduling, intelligent fusion operation for the channel sensing results, and a dynamic switching mechanism between the data and backup channels. Altogether these feature allow our proposed MQ-MAC to provide better QoS. The autonomous operation of MQ-MAC in a multiple CR environment makes it suitable for a large number of sensor network applications. The simulations in this study also prove efficiency of the proposed protocol.In this work, we have explored intracluster performance optimization issues. How to further increase the protocol performance by considering intercluster interferences of the assigned channels, and identifying hidden and exposed terminal problems has been left for future work. The establishment of a conflict graph of network link-channels and extraction of non-interfering independent sets of link-channel pairs might lead to a feasible solution to the problem.



---

*Source: 262871-2015-04-30.xml*