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.
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.
A multiconstrained QoS aware MAC protocol (MQ-MAC) for cluster-based CRSN has been developed that ensures differentiated medium access to four traffic classes. QoS aware dynamic superframe structure has been designed for data collection at each cluster head. An intelligent fusion operation for cooperative sensing has been developed that helps in selecting the best available channels. An efficient GTS allocation algorithm for reliability and delay constrained data packets has been presented. Dynamic data and backup channel assignment schemes have been proposed to enhance the QoS. 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 Section 2, 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.

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
In order to reduce the energy consumption, while channel sensing, we can determine a subset
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.
Real-time reliable ( Real time nonreliable ( Nonreal time reliable ( Best effort (
Traffic classification.
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 into optimal and moderate 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 Figure 2 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.

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 Figure 3. At first, the CH sends an advertisement for synchronization and the polling channel is set to

The slot structure of CSCSP.
Note that, in the CSCSP, each sensor node sends a data transmission request to its CH using a prioritized random back-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 differentiated back-off using
A data transmission request from any node is identified by the tuple
Now, the CH has the updated channel weights,
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 random backoff 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 Section 4.3, the CH receives different types of data transmission requests from its member nodes. Let a request be represented by
4.4.2. Channel Assignment
Now, our problem is how to assign a channel
First, we calculate the mean and standard deviation of the channel weights:
(1) (2) (3) ns = (4) (5) (6) (7) (8) (9) (10) (11)
(1) (2) (3) (4) (5) (6)
As shown in line 3 of Algorithm 2, 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 in
(1) (2) (3) (4) (5) (6) (7) (8)
For 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-based prioritized random back-off mechanism. The back-off range is chosen as
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 Table 2 and from the channel sensing information, we get
Traffic requests from member nodes.
Set of channels to be allocated,
Now, each request,
Assigned data channels and backup channels to GTSs.
Similarly, 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 Algorithm 4 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 (
Simulation parameters.
5.2. Performance Metrics
We have evaluated the studied protocols in terms of the following performance metrics.
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. 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. 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. 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. 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. 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 Figure 4(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.

Impacts of number of sensor nodes on protocol performance.
In Figure 4(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.
Figure 4(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 Figure 4(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
Figure 5 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.

Impacts of traffic load on protocol performance.
The graphs of Figure 5(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 Figure 5(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 Figure 6 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.

Protocol operation overhead.
5.3.4. Average Amount of Energy Required per Packet
The graphs in Figure 7 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.

Average amount of energy consumed per successful packet.
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.
Figure 8(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

Average packet delay and on-time reachability for different packet types.
The graphs of Figure 8(b) show that the
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.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgment
The authors would like to extend their sincere appreciation to the Deanship of Scientific Research at King Saud University for its funding of this research through the Research Group Project no. RGP-VPP-049.
