Design and Analysis of an OSA-BR MAC Protocol for Cognitive Radio Ad Hoc Networks

Cognitive Radio (CR) is a new communication network paradigm introduced to solve the problems of spectrum scarcity and inefficient spectrum usage. Basically, it allows the Secondary Users (SUs) to utilize the Licensed Channels (LCs) of the Primary Users (PUs) in an opportunistic manner without causing any harmful interference to the PUs. However, there are many challenges associated with cognitive radio networks, such as the CR Medium Access Control (CR-MAC) protocols. An important issue for CR-MAC protocols is to identify whether the spectrum is licensed or unlicensed. In addition, the sudden appearance of the PU is the most important feature of the distributed CR-MAC protocols. In this paper, a multichannel CR-MAC protocol, which reacts efficiently to the appearance of the PUs, is developed. The proposed protocol is named Opportunistic Spectrum Access with backup channel and Buffered data with Resume (OSA-BR). The OSA-BR is an unaided rendezvous, asynchronous, and contention-based MAC protocol. The proposed protocol operates in heterogeneous environment, where the SUs utilize both LCs and unlicensed channel (ULs) and the activities of the Classical Users (CUs) are taken into consideration. In addition, the concept of the backup channel and the buffer with resume are introduced. The simulation results show that OSA-BR accomplishes 35% throughput gain over the SWITCH protocol and 55% over other CRMAC protocols.


Introduction
In the existing literature, the radio spectrum is divided into licensed and unlicensed bands.The conventional ap-proaches of radio spectrum management give exclusive and permanent resource primarily to licensed users.According to the reports from Federal Communication Committee (FCC) [1] and Shared Spectrum Company [2], there is a considerable amount of the spectrum detected out of use both in space and time "white space".Thus, to make full use of the white space, the Cognitive Radio (CR) paradigm has been introduced.The CR technology can be aware of the spectrum usage state and intelligently employs idle states using Software-Defined Radio (SDR) which supports opportunistic multiple radio interfaces for spectrum handoff.
A white space is defined as a frequency band licensed by a Primary User (PU) that is not being utilized at a particular time and a geographical location.In a CR network, a Secondary User (SU) can access the spectrum of the PU in an opportunistic manner (i.e., a SU can access the spectrum of the PU only if the spectrum is idle).In the case of a PU appearing in the spectrum occupied by a SU, the SU moves to a new available spectrum immediately if exists.
In a cognitive radio network, when two SUs need to establish a link and bootstrap communications, they need to find each other first.This process is known as rendezvous or neighbor discovery [3].A rendezvous is a meeting at an appointed time and place.Many rendezvous protocols exist in the literature.These protocols can be classified into two categories.The protocols in the first category use a predefined Common Control Channel (CCC).In these protocols one of the available channels is assigned as the CCC, and it serves as a rendezvous channel.The protocols in the second category use the Channel Hopping approach (CH).In channel hopping approaches, SUs generate their own channel hopping sequences [4].When a SU needs to communicate with one of its neighbors, it switches from one channel to another, by following a predefined hopping sequence, until it finds its neighbor.When the SU switches to an available channel, it senses the channel for the presence of PUs and other SUs transmissions.If it senses the channel free, it will broadcast a beacon to inform its neighbors about its request to communicate, so that if the intended receiver is on the current channel and receives the beacon, it can reply with an Acknowledgment (ACK) message.Otherwise, the SU will switch to another channel by following the hopping sequence, and broadcast the beacon message again.This process is repeated, until the SU (transmitter) meets with its intended neighbor (receiver).Once two SUs have rendezvoused on an available channel and exchanged control messages, they can perform negotiation for data communication on the current rendezvous channel.
Several MAC protocols for cognitive radio networks exist in the literature.These protocols can be classified according to how the SU deals with the appearance of the PU in two strategies [5].The first strategy allows the SU to buffer their connections until the PU disappears.The second approach allows the SU to switch to another idle channel.The disadvantage of the first strategy is that the SU buffers its connection even if there is another free channel.Furthermore, it may happen that the SU will not be able to reestablish its connection after buffering because of continuous PU transmissions which lead to a high delay.The disadvantage of the second strategy is the control message overhead between the transmitter and the receiver to access the new channel.
In [6], the authors have categorized the MAC protocols for CR into three categories: contention-based protocols, time-slotted protocols and hybrid protocols; that is a combination of the contention-based and time-slotted protocols.Contention-based MAC protocols do not need time synchronization between SUs to access the available channels, and are generally based on the CSMA/CA principle.
Opportunistic Spectrum Access with Backup Channel (SWITCH) [7] and DCA-MAC protocol [8] are examples of this category.Time-slotted MAC protocols need a global synchronization between SUs where the time is divided into slots for both the control channel and the data transmission.Examples of this category are the Cognitive MAC (C-MAC) protocol [9] and the Opportunistic Spectrum Access (OSA-MAC) protocol [10].Hybrid protocols use a partially slotted transmission, in which the control signaling generally occurs over synchronized time-slots.However, the following data transmission may have random channel access schemes, without time synchronization.An example of this category is the SYNchronizes MAC (SYN-MAC) [11].SWITCH [7] is a decentralized, asynchronous, contention-based MAC protocol.SWITCH uses a CCC channel so that all the necessary control information is exchanged among SUs via it.SWITCH uses the concept of Backup Channel (BC) to cope with the appearance of the PUs.
In this paper, we present a modified protocol from the existing SWITCH protocol named Opportunistic Spectrum Access with backup channel and Buffered data with Resume (OSA-BR).In OSA-BR, instead of using the CCC approach, the blind rendezvous [12] under the PUs activities is used.In addition, instead of using the BC only to deal with the suddenly appearance of PUs, the buffer concept is introduced in OSA-BR to increase the overall throughput.
The current paper is organized as follows.In Section 2, the proposed protocol is described in details.In Section 3, an example is presented to simplify the description of the proposed protocol.In Section 4, the simulation model and its results are presented.In Section 5, we draw a conclusion.

OSA-BR MAC Protocol
In this section, the details of the proposed protocol are introduced.

Design Features
SWITCH [7] is a contention-based MAC protocol to coordinate the access to the available channels which utilizes a Common Control Channel (CCC) as a rendezvous channel for the exchange of the control packets for the whole network.Although using the CCC approach makes MAC protocols simple and efficient, it has some drawbacks listed as [4]: 1) When a PU appears in the CCC, all SUs must leave this channel and wait until the PU completes its transmission.If the PU transmission period is long, it may block the channel access for SUs.Thus the overall throughput of the network degrades.
2) The collision rate of the control packets increases as the number of SUs increases in the network as all SUs use the same CCC channel to transmit their control information.Thus the overall throughput of the network degrades.
3) Using a static CCC may encourage attackers to launch powerful attacks.The attacker simply needs to inject a strong interference signal into the CCC, in order to disable any control packet exchange on the CCC.This attack will cause a single point of failure within the network.
To handle this problem, OSA-BR uses the blind rendezvous [12] in which all channels are available for exchanging information and establishing data communications.SWITCH protocol uses the Backup Channel (BC) concept.The BC is negotiated between the transmitter and the receiver prior to the actual data transmission.If a PU appears in a channel used by a SU, both the transmitter and the receiver wait for a specific time and then switch to the BC if idle.Otherwise the SU transmissions are rejected and the SU has to restart its transmissions using another idle channel.The OSA-BR handles this problem as follows: when a PU appears in a channel used by a SU, the SU moves to the BC if this channel is idle.If not, the SU uses a buffer to stores its transmission parameters for a specific time period to sense for a new idle channel to resume its transmission.

Assumptions
OSA-BR is a contention-based MAC protocol in which the buffer concept is used with the BC concept.OSA-BR is developed based on the following assumptions: 1) The CCC which used as a rendezvous channel by SUs is selected in a dynamic manner from the idle Primary Channels (PCs) which are licensed to PUs.The selected CCC can be used for: a) sharing and identifying spectrum opportunities gathered by SUs and b) transmitting data.
2) There are three types of users: SUs, PUs and Classical Users (CUs).CUs are wireless devices without cognitive radio capabilities such as devices using the conventional standards e.g.IEEE 802.11 and Bluetooth.PUs and CUs affect the performance of the SUs.
3) There are two types of channels: Licensed Channels (LC) and Unlicensed Channels (UC) with maximum numbers C 1 and C 2 respectively.The LCs are shared between PUs and SUs with high priority and preemption power are given to PUs to access these channels.The UCs are shared between SUs and CUs with equal priority.The C 1 LCs are used as operating channels in the case of PUs absence.The C 2 UCs are used as BCs in the case of PUs appearance.
4) Each channel can be represented by an ON-OFF model.State ON means that the channel is busy and state OFF means that the channel is idle.
5) Each SU is equipped with a buffer with a finite size B to store the SU's transmission parameters in case the PU appears and the BC is not idle.
6) Each SU is equipped with two data structures, called Idle Unlicensed List (IUL) and Primary List Channel Hopping (PLCH).
7) The blind rendezvous algorithm under the PU activities is used instead of the private CCC approach.

OSA-BR Cognitive Cycle
The cognitive cycle of OSA-BR consists of five components: spectrum sensing, rendezvous process, spectrum allocation, spectrum sharing and spectrum handoff.

Spectrum Sensing
An important component of the OSA-BR cognitive cycle is the spectrum sensing.As aforementioned, a cognitive radio is designed to be aware of and sensitive to the changes in its environment.The spectrum sensing function is used to identify unused channels regardless of the fact that these channels are LCs or UCs [13].Three techniques are generally used for the spectrum sensing according to the hypothesis model.These sensing techniques can be classified as transmitter detection, cooperative detection, and interference-based detection [14].In the OSA-BR protocol, the transmitter detection scheme is used to detect the idle PCs.Three schemes are generally used for the transmitter detection according to the hypothesis model [13].These three schemes are matched filter detection, energy detection and cyclostationary feature.The spectrum sensing technique used by the proposed protocol can be described as follows: 1) Each SU uses energy detection as a spectrum sensing technique to detect one of C channels randomly, say j-th channel, (j ≤ C; C = C 1 + C 2 ).
2) Each SU will inform other neighbors about the availability of the detected channel during the rendezvous process.

Spectrum Allocation
Based on the gathered sensing information, the spectrum allocation data structures, residing in each SU, make an adaptive decision on the operating channel defined by the center frequency and the time duration of using such a channel according to the activities of PUs, CUs and other SUs in its vicinity.In OSA-BR, each SU is equipped with two data structures, called Idle Unlicensed List (IUL) and Primary List Channel Hopping (PLCH).The IUL data structure is used to record the list of all idle UCs in its transmission range.The PLCH data structure is used to record the list of all idle primary channels hopping.PLCH is predefined sequences used by each SU to determine the order in which the free PCs are to be visited in the case of suddenly appearance of the PU and there is no BC.

Rendezvous Process
As aforementioned, the proposed OSA-BR has no control channels.When a SU wants to establish a common link on a common PC with another SU to start the transmission negotiation process, it starts the blind rendezvous process [12].In blind rendezvous, all free PCs are available for exchanging information and establishing data communications.However, SUs should be aware of the activities of the PUs to guarantee the rendezvous process in a reasonable amount of time.This time is called Time-To-Rendezvous (TTR).The time axis t is divided into slots of equal length and numbered from 0 to L. Each slot is sufficient to complete the rendezvous process.It is assumed that the time slots are fixed and synchronized across all SUs in the neighborhood.As shown in Figure 1, the rendezvous slot should consist of medium sensing, beacon transmit, and listen/rendezvous sub-slots.Let the duration of each sub-slot is ω basic time units.During the medium sensing sub-slot, a SU begins by sensing the medium for the presence of a PU activity.If the sensing results shows that there is no PU, it will transmit a beacon during the transmit sub-slot.Afterwards, the listen sub-slot starts where the SU waits for a response from its communication partner.In the multi-channel synchronous scheme, the rendezvous will be successful if two conditions occur: 1) The two SUs select the same PC.
2) One of the SUs is sensing the medium while the other is transmitting a beacon in such a way that the handshake required for rendezvous is possible.
The algorithm in Figure 2 details the blind rendezvous strategy for two SUs described in [13], where i i,j C is the random channel selected by the i SU .

Spectrum Sharing
After a successful rendezvous between the transmitter and the receiver, the transmitter can establish a connection with the receiver using the detected rendezvous channel.So, it sends a connection request to the receiver.In  Three more fields are added to the packet format of the original RTS.These fields are IUL, BC and PLCH.Two more fields are added to the packet format of the original CTS.These fields are BC and PLCH.The handshake process used by OSA-BR can be described as follows.At time t 0 , the transmitter sends a RTS to the receiver.The RTS packet contains the following fields: R_IP, T_IP, IUL, PLCH and BC which represent the receiver's IP address, transmitter's IP address, transmitter's IUL, transmitter's PLCH and the transmitter's BC, respectively.Then the transmitter waits for CTS from the receiver.Upon the arrival of the RTS packet at the receiver, the following events will be happened:  If the intersection between the BC in the RTS and IUL at the receiver is equal to 1 then the receiver set its BC number to the value of the BC that is stored in the RTS.Otherwise, the receiver searches its IUL and the transmitter's IUL for a channel which is idle in both.If exist, the receiver sets its BC to that channel.Otherwise no BC is used and the receiver replies to the transmitter with CTS in which the BC field is set to −1.  The receiver matches the received/PLCH with its free LCs to check if it can follow the same channel hopping or not (if required) as follows: 1) If the intersection of PLCH at the transmitter and PLCH at the receiver is equal to the PLCH of the transmitter then the receiver replies to the transmitter with a CTS in which the PLCH field is set to 0. This means that, the receiver can follow the same channel hopping sequence of the transmitter.
2) If the intersection of PLCH at the transmitter and PLCH at the receiver is less than PLCH of the transmitter but greater than 1 then the receiver replies to the transmitter with a CTS in which the PLCH field is set to the intersection of the PLCH at the transmitter and the PLCH at the receiver.
3) If the intersection of PLCH at the transmitter and PLCH at the receiver is equal to 0 then the receiver replies to the transmitter with a CTS in which the PLCH field is set to −1.This means that the receiver cannot follow the same channel hopping sequence of the transmitter. Upon receiving the CTS at t 1 , the data transmission is established at t 2 using the selected rendezvous PC.  Upon receiving the data packet, the receiver replies to the transmitter by an Acknowledgment (ACK) packet to acknowledge the reception of the data packet.

Spectrum Handoff
Spectrum handoff process can be defined as the process when a SU changes its frequency of operation due to the sudden appearance of a PU.If a PU appears during the data transmission, both the transmitter and the receiver follow the following actions: 1) The transmitter and the receiver check if they have an idle BC or not.If yes, they wait for a time, T S (the time required by the SU to sense and switch to the BC) and then switch to the BC.
2) If no BC is used or the BC is not idle, the transmitter and the receiver start their channel hopping sequence if the PLCH is not empty.3) If the PLCH is empty then the transmitter stores its transmission parameters in its buffer for a specific time period T B .
4) During the time period T B , if no idle LC is detected by the transmitter to resume its transmission, the transmission parameters will be dropped from the buffer.

Two-Way Handshake Process Example
To simplify the description of the spectrum sharing process of the OSA-BR protocol, an example is presented.Suppose that the considered network has five secondary users SU 1 , SU 2 , SU 3 , SU 4 , and SU 5 , as shown in Figure 4.Each SU builds its IUL and PLCH based on the sensing information that is collected during the spectrum sensing process.There are two classical users CU 1 , and CU 2 and two primary users PU 1 and PU 2 .The number of the available LCs within the transmission ranges of the secondary users is set to four and indexed as LU 1 trough LU 4 .While the number of the available UCs is assumed to be six and indexed from UC 1 to UC 6 .
The unlicensed channel UC 6 and the licensed channel LC 2 are utilized by CU 2 and PU 1 respectively.Hence, as shown in Figure 4, they are not listed in both IUL and PLCH data structures.The remaining three LCs (i.e., LC 1 , LC 3 and LC 4 ) and five UCs (i.e., UC 1 to UC 5 ) are available for starting connections.We assume that the SU 2 (transmitter) wants to establish a connection with SU 3 (receiver) to start its data transmission.The SU 2 starts the rendezvous process to finds its receiver SU 3 at time t 0 as shown in Figure 5. Assuming that the SU 2 finds its receiver SU 3 on the channel LC 1 which serves as a common control channel.At time t 1 the modified two-way handshake RTS/CTS, 802.11MAC, is started.In this example, we have three cases depending on the exchanged control information between SU 2 and SU 3 during the two-way handshake RTS/CTS process.
Case1: The receiver (SU 3 ) agrees with transmitter's (SU 2 ) proposed control information.In Figure 5, the proposal of SU 2 is BC = 3, IUL = 1, 3, 4 and PLCH = 3, 4.After the two-way handshake RTS/CTS is completed, both SU 2 and SU 3 start data transmission on LC 1 .Here LC 1 is utilized as CCC and operational channel.If a PU appears during the data transmission between SU 2 and SU 3 , both SUs switch to the BC (BC = 3) during T S switching time.The switching time T S can be defined as the time required by the SU to sense and switch to the BC.This process is called spectrum handoff.The T S time should be less than the distributed Coordination Function Interframe Space (DIFS) of IEEE 802.11.If this condition is not satisfied then there is a probability that another SU in the vicinity of the transmitter wins the contention and thus the switching fails [7].If the BC is available, both users will not perform any additional handoff since the UCs are free from PUs.
Case 2: This happened when the receiver (SU 3 ) did not agree with transmitter's (SU 2 ) proposal about the BC number.In this case the proposal of SU 2 is BC = 3, IUL = 1, 3, 4 and PLCH = 3, 4. Upon receiving the RTS, the SU 3 responses with CTS = {BC = −1, PLCH = 0}.This means that there is no agreement about the BC and full agreement with the PLCH.Based on this matching, both nodes will follow the channel hopping sequence identified by PLCH in the case of a PU appears as shown in Figure 6.This figure illustrates multiple handoffs due to the subsequent appearance of the PU.
Case 3: When the receiver (SU 3 ) did not agree with transmitter's (SU 2 ) proposal about both the BC number and the PLCH.The SU 3 responses with CTS = {BC = −1, PLCH = −1}.This means that there is no agreement about the BC and the PLCH.Based on this matching, the data transmission of SU 2 will be queued in its buffer for specific time in the case of a PU appears as shown in Figure 7.If the queued time is expired before the SU 2 win a new channel to resume its transmission, the data will be dropped.

Simulation and Results
In this section, we present our simulation and compare the proposed scheme with the drop tail scheme.For the simulation proposes, we carried out a discrete-event simulation program using JAVA language.All simulation results have been obtained by running the simulation for 1,000,000 milliseconds.The operational simulation parameters are shown in Table 1.
The efficiency of CR-MAC protocols is evaluated by three metrics: saturation throughput, communications overhead and dropping probability.Saturation throughput is defined as the number of data packets transmitted by the SUs.Communications overhead is defined as the number of control packets transmitted during the transmission negotiation process.Dropping probability is defined as the number of SU's transmissions rejected due to lack of the channels availability.The efficiency of the OSA-BR is compared with the SWITCH protocol.The reason for choosing the SWITCH protocol is that it reacts efficiently with the appearance of the PUs by using a so-called backup channel.On the other hand, the SWITCH protocol increases the throughput compared to  DCA-MAC protocol in which the LCs only are used by 91.7% and 63.5%, respectively [7].
The scenario used in our simulation can be described as follows: there are 50 SUs, 12 CUs and 12 PUs.Each two SUs establish a session.We assume that each SU has always a packet in its queue to send.The SUs coexist with both the PUs and the CUs.Each SU in this network independently generates traffic of fixed-size packets.The obtained results are averages over 10 different runs of the developed simulation program.The running time of each run is set to 10 8 μs.Unlike SWTICH which uses a dedicated CCC for control packets exchange, OSA_BR uses the blind rendezvous to select the channel for control packets exchange in a dynamic manner.
The PU traffic load has a great impact on the performance of SUs since once a PU appears in a channel occupied by a SU; the SU should vacate this channel and determines another free one.Figure 8 shows the saturation throughput of the SUs using the OSA-BR protocol compared to SWITCH and DCA-MAC vs. the PU traffic load.For OSA-BR and SWITCH, the numbers of LCs and UCs are set to 12 and 2 channels respectively.For fairness evaluation, the number of LCs assigned for DCA-MAC is set to 14 channels due to the fact that the DCA-MAC uses the LCs only.The performance of these protocols is evaluated under both low and high traffic of the CUs.The figure shows that the OSA-BR outperforms the performance of both SWITCH and DCA-MAC in both high and low traffic of the CUs.The throughput of OSA-BR increases compared to SWITCH by 38%.
Figure 9 shows the impact of the UCs on the throughput of the OSA-BR.To make a fair comparison when using LCs only and a combination of LCs and UCs, we use the same number of channels in each case.From the figure, we can conclude that, the UCs cannot be ignored when evaluating the performance of the CR MAC protocols.
One of the most important metric used to evaluate the CR MAC protocol is the communications overhead.The communications overhead is defined as the number of control packets transmitted during the communication setup.As we noted earlier, the SWITCH protocol uses CCC which means that when a PU appears in the CCC, all SUs must leave this channel and wait until the PU completes its transmission.If the PU transmission period is long, it may block the channel access for SUs.Thus the overall throughput of the network degrades.However, a new control packet called NTR is added to the SWICH protocol during the communication setup process which resulted in more overhead.
Figure 10 shows the average number of control packets exchanged between two SUs to complete their connection setup versus the PU traffic load of the OSA-BR and SWTICH protocols.This figure also indicates that the OSA-BR protocol reduces the communications overhead traffic if it is compared with SWITCH protocol.
Figure 11 illustrates the dropping probability against the PU traffic load.From the figure, we note that, the   On the other hand, the OSA-BR protocol outperforms the SWITCH protocol because of using a buffer for hosting the data of the interrupted transmissions.The buffered data of the interrupted transmissions is resumed later if the transmitter wins a new idle channel within a maximum predefined buffered time.

Conclusion
We have presented a decentralized, asynchronous and contention-based MAC protocol named OSA-BR.OSA-BR is a modified protocol from the existing SWITCH protocol.It uses the concepts of rendezvous and buffering.The simulation results have been compared with the results of the SWITCH protocol.The results of the model show that the OSA-BR protocol outperforms the well-known SWITCH protocol in terms of throughput, dropping probability and communications overhead.

Figure 3 .
Figure 3. Packet format for the OSA-BR protocol.

Figure 5 .
Figure 5. MSC the modified two-way handshake RTS/CTS with BC agreement and SU interruption.

Figure 6 .
Figure 6.MSC the modified two-way handshake RTS/CTS with no BC agreement and SU multiple interruption.

Figure 7 .
Figure 7. MSC the modified two-way handshake RTS/CTS with no BC and PLCH agreement.

Figure 8 .
Figure 8. Throughput of the SUs as a function of PU traffic load with different number of UCs: for both OSA-BR and SWITCH, C 1 = 12, C 2 = 2.For DCA-MAC, C 1 = 14 and C 2 = 0.

Figure 9 .
Figure 9. Throughput of the SUs as a function of PU traffic under CU activities.

Figure 10 .
Figure 10.The communications overhead versus the PU traffic load.

Figure 11 .
Figure 11.The dropping probability of ongoing connections versus the PU traffic load.