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

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.


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 qualityof-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][2][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 licensefree 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, interferencefree channel and transmission allocations, and switching 2 International Journal of Distributed Sensor Networks between the data and the backup channels. In this work, we consider a multihop cluster-based CRSN, as was discussed in [3][4][5] and references therein.
QoS provisioning approaches for real-time and besteffort 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 energyefficient, 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 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.

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 sensingresult. 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).

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.
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][20][21]. We have also assumed that a licensed channel set and an unlicensed channel set are available in the network. Each sensor node can select a channel ∈ (where = ∪ ). 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 ∈ as long as a PU is not using it.
In order to reduce the energy consumption, while channel sensing, we can determine a subset of the existing licensed channel set (where | | ≤ | |) 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 ( ) 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 ( ) 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.
(iv) Best effort ( ) traffic is neither delay-constrained nor reliability-constrained. They are also known as normal packets and only require best effort support.

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. 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.

Superframe
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.

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 for all member nodes through a broadcast message in CCC [19]. Then, the CH and its member nodes sense each channel ∈ in consecutive | | sensing slots, as shown in Figure 3. In a certain slot, a channel may be in one of the following three states: idle, busy, or collision. Based on these states of the sensing slots, each node assigns a reward or a penalty to the channel weight. Then the weight of th channel is updated 2} represents the amount of reward or penalty corresponding to th channel state, ∈ { , , }, respectively. Therefore, the higher value of for any channel ∈ represents a better channel. Each node also keeps a record on whether a sensed channel is rewarded ( , = 1) or penalized ( , = 0) in the current superframe. In the final transmitting slots, all the member nodes transmit the channel weights , , ∀ ∈ , the value of the indicator variable , , and the data transmission requests to the CH.
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 where back-off is the back-off period randomly selected by the nodes and class 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 tuple ⟨ID, class , life , ⟩, where ID is the identity of the requesting member node, class is the traffic class of the packets generated by that node, life is the lifetime of the head of line (HOL) packet, and is the number of packets generated by that node per second. Therefore, for each node, we allocate number of GTS slots in a superframe. Now, the CH has the updated channel weights, ,CH and the value of the indicator variable ,CH of its own for all channels, ∀ ∈ and the corresponding values for its member nodes. The CH runs the following fusion operation to calculate the average channel weights, , for th channel for all the sensing results: 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 ∈ according to decreasing order of their values, and we get a new set of channels, . In the next subsection, we describe how this channel set is used to allocate the GTS slots and the channels according to different data transmission requests from the member sensor nodes.

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 International Journal of Distributed Sensor Networks 5 following the prioritized random backoff according to the remaining lifetimes of their packets.

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.

Channel
Assignment. Now, our problem is how to assign a channel ∈ 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 into different sets of channels: , the list of best channels that are expected to give the highest performance; , 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: Call Algorithm 3 (8) end if (9) end while Algorithm 1: Dynamic channel assignment algorithm. Now, we derive the best ( ) and moderate ( ) channel lists as follows: The rest of the channels − − will not be used for data transmissions. and are then sorted in descending order of channel weights. Now, we assign channels to the allocated slots from and as follows. Our proposed MQ-MAC protocol iteratively assigns multiple slots to each channel ∈ and a single slot to each channel ∈ 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 .
As shown in line 3 of Algorithm 2, a channel ∈ is assigned for the number of slots , which is a function of the channel's weight ( ) and a factor , which is the maximum number of consecutive slots that we want to assign a channel.

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 following the steps summarized in Algorithm 4.
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.

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 where is calculated as where rem is the remaining packet lifetime of a packet and is a weight factor. Therefore, the packets having reduced remaining lifetime will have an earlier transmission opportunity than the other packets.

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 using (2), as shown in Table 3. Here, = 0.681 and = 0.109 and thus we get = {7} and = {1, 2, 6} using (5) and (6), respectively. Now, each request, req ∈ REQ GTS = {2, 2, 7, 1, 1, 1, 6, 8, 8} is allocated against a GTS slot, slot ∈ , computed using (3). For channel 7 ∈ , we assign ⌊0.834 × 3 + 0.5⌋ = 3 consecutive slots according to Algorithm 2. For channel numbers 1, 2, 6 ∈ , 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.
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.

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.

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.

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-realtime 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 × 1000 m 2 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.

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.

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

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-toend 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.
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 International Journal of Distributed Sensor Networks 9 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. 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.
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.

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. 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.

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 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.
The graphs of Figure 8(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 reliabilityrequired 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.

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 linkchannels and extraction of non-interfering independent sets of link-channel pairs might lead to a feasible solution to the problem.