Delay Analysis and Channel Selection in Single-Hop Cognitive Radio Networks for Delay Sensitive Applications

Scarcity and the value of spectrum resource for wireless communications challenged the traditional static spectrum allocation policy. Recent measurements [1] show that in spite of the fact that available frequency spectrum have been almost occupied by the existing carriers, most of the time we can find spectrum bandwidths that are free of signal. Thus, the efficient usage of limited spectrum has been highly required.


Introduction
Scarcity and the value of spectrum resource for wireless communications challenged the traditional static spectrum allocation policy. Recent measurements [1] show that in spite of the fact that available frequency spectrum have been almost occupied by the existing carriers, most of the time we can find spectrum bandwidths that are free of signal. Thus, the efficient usage of limited spectrum has been highly required.
Cognitive Radio (CR) technology is an innovative radio design technology that is proposed to increase the spectrum utilization by exploiting the unused spectrum in dynamically changing environments.
With ever-increasing demand for delay sensitive applications such as Video telephony, live audio, surveillance, live video and etc, special attention to this field seems to be essential. In such applications the receiver needs to get transmitted information within a certain delay. Therefore delay study in CR Networks (CRNs) and introducing appropriate channel selection strategy that reduces end-to-end packet transmission delay is critical.
There are two main challenges in the CRNs [2]: a) how to sense the spectrum and model the behavior of the primary licensees to identify available frequency channels (spectrum holes) b) Management of available spectrum resources among Secondary Users (SUs) to satisfy their Quality of service (Qos) requirements while limiting the interference to the primary licensees. In this chapter, we focus on the spectrum management, specially delay analysis and relay on the existing literatures for the first challenge [3]- [5].
In the most of resource management researches in CRNs, the focus is on the single-hop wireless infrastructure. Prior studies such as [6], [7] presented a centralized solution; However due to the informationally decentralized nature of the wireless networks information, the complexity of the optimal centralized solution for spectrum allocation is prohibitive [8] for delay sensitive applications. Moreover, in the centralized solutions, propagation of private information back and forth to a common coordinator causes delay and may be unacceptable for delay sensitive applications. Decentralized solutions are presented in [9]- [11]. In these researches a utility function proposed and with use of several solutions (game theory, statistical methods and etc) try to reach optimum situation, but they do not pay attention to packet delay induced by the network and not suitable for real time applications. Authors in [12] presented an approximation of the endto-end delay of packets in a single-hop CRN. They proposed a distributed channel allocation algorithm based on iterative delay minimization and utility improvement. They considered the centralized topology with preemptive resume policy and derived an approximate solution. In [13] delay calculations are done for an M/D/1 priority queueing scheme. They study time slotted CR system with one primary and one secondary user. A priority-concerned MAC protocol based on queue theory was proposed for cognitive radio network in [14]. The priority-concerned optimal MAC scheme following the stopping rule is validated by network satisfaction simulation. In [15], authors study the effect of peak interference power constraint on outage probability and transmission time of packets for SU in a spectrum sharing environment. They consider only two SU (one transmitter (Tx) and one receiver (Rx)) and one PU (Rx). Simultaneously transmission policy are used, that means SU-Tx must keep its power below a certain level such that it does not cause harmful interference to PU-Rx. Authors develop an opportunistic spectrum scheduling scheme for cognitive radio networks in [16]. Each secondary user based on the queue size and the observed channel conditions, estimate the throughput for each channel. A scheduling algorithm is performed to maximize the expected aggregate throughput of all the secondary users. They only consider the time slotted scenario with a centralized decision making system. A simplified model of primary user interruptions (Markov chain) is proposed in [17], queuing analysis is carried out for two-server-singlequeue (a single secondary user and two licensed channels) and single-server-two-queue (two secondary users and single channel) cases. A semi-analytic result is obtained for the generating function of queue length in the two-server-single-queue case. The average queue length is obtained from solving a group of linear equations for the single-servertwo-queue case.
In this chapter, we consider different scenarios such as centralized and decentralized spectrum management. Introduced new delay analysis and preemtive repeat, preemptive resume and time slotted regimes are investigated. We propose new scheme and formulation for delay calculation in single-hop cognitive radio networks with multiple primary and secondary users. Simulation examples are employed to evaluate the performance of our derivations, showing more accurate and less complicated results comparing with the results in [12]. A prepare channel selection strategy based on channels condition and queues situation are proposed.
The remaining of this chapter is as follows. In Section 2 assumptions and system properties are presented. Delay analysis in single-hop networks for different transmission policies are studied in Section 3. Section 4 states the channel selection strategy. In Section 5, simulation results are presented and Section 6 concludes the chapter.

Assumptions and system specifications
Assume that we have N secondary users and M primary users/frequencies in a CRN. All nodes are in the transmission range of each other and there is a link between each two nodes. We must note that if two users transmit data simultaneously on a specific frequency band, we have a collision and damaged data retransmission is required according to IEEE 802.11/e [18].
Based on the spectrum sensing results, vacant frequency bands are determined. Then in order to allocate available frequency channels among the SUs, an appropriate channel allocation scheme that provide their required Qos while not causing any trouble for PUs is needed. The PUs have priority over the SUs and there is no need to be worry about SUs transmission. A preemptive priority queueing model is developed to describe the traffic behavior of users in CRNs; PUs are the owners of the spectrum, while the SUs may use that when they are unoccupied. Here we employ M/G/1 queueing model, in which the packet entry of users follows the poisson process, the transmission time has general distribution and there is one server in each queue. Packets in each node select an appropriate frequency based on the transmission strategy and join to the corresponding node/frequency queue.

Preemptive resume policy
Primary users are the padrone of frequencies and are able to preempt the transmission of secondary users. Therefore, cognitive users must release the frequency channel as soon as possible if PU intends to use it. In the preemptive resume regime, SU resumes its interrupted transmission after disconnecting PU.
In this case, delays that each packet experienced is divided into three sections and are shown in Fig.1.

Delay due to waiting for completion of packet servicing under transmission
When a packet enters the queue of a node/frequency, may be another packet under servicing. Thus new packet must wait for completion of that servicing.
Here L is the average packet length and oh L is the control header including the time for protocol acknowledgment, information exchange, channel sensing and etc [18]. ij R is the transmission rate and ij e P is the packet sending error probability that depend on channel conditions [20]. The first and second moment of traffic load (also known as utilization factor) for user i on frequency channel j is [12], [21]: That ij  is the packet arrival rate at node i on frequency j.
Since kj  represents the utilization factor of the service, the conditional probability, that user k's packet is being transmitted on frequency j given that no primary packet is

Delay due to waiting for service of the packets exist in the queue
Since there is a probability that some packets in the queue, new packet must waits for servicing these older packets. Number of existed packets in the queue of node i on frequency j based on little's theorem [19], [22] is: In each moment, only one user can transmit data on specified frequency. Thus each packet on the queue of frequency j at node i also wait for servicing the older packets of other nodes. Number of all packets on frequency j is: www.intechopen.com These packets servicing delay are computed as follows: Using these three delays, we can calculate the overall waiting time of secondary users in the queue of node i and frequency j as follows: For primary users, we can obtain the mean waiting time of a packet in a similar method. Note that we do not have 03 [] j EW because of primary users will not be intercepted by any users.
Finally, the average waiting delay in preemptive resume policy is:

Preemptive resume policy
Since in the wireless environment, transmission of packet resumption is impossible. We practically can not use from preemptive resume policy. In such cases, after completion of primary transmission, secondary user, retransmit its packet. In this method the waiting delay calculation is as follows: www.intechopen.com

Delay of waiting for completion of packet under transmission
This delay is depending on the probability of PUs or another SUs packets presentation and equal:

Delay due to waiting for service of packets exist in the queue
New arrived packet should waits for servicing of all packets (PU and SUs) are queued on specified frequency and computed as follows:

Delay due to new primary packets arrival
This waiting time is equal probability of PUs new packet arrival multiply mean waiting time and calculated like this:

Delay due to incomplete servicing of some secondary packets
When a new primary packet arrives, occupy the frequency channel and SU that sending packet must stop its transmission and after ending occupancy of frequency channel by the PU, retransmit its packet. It's probable that transmission of some secondary packets stopped by primary users. Since utilization factor of node i on frequency j is , then number of primary transmission that collided by transmission of node i on frequency j is: Time elapsed of servicing each packet is defined as "Age" and for M/G/1 queue like residual life calculated [15]. Now we can calculate this incomplete servicing computed as follows:

Time slotted and randomizes policy
Here we present time slotted system that packet transmission is done in one time slot. At the beginning of each slot, spectrum sensing is done and vacant frequencies channels determined. Then based on mechanism like P-Slotted-Alloha [22], packets are transmitted. Each packet waits random slots that equal random number with uniform distribution from [0,w] and transmit the packet. In this case, we do not have control on packet transmission on several frequencies, so there is a probability of packet collision. If collision occurred, random waiting and retransmission is done.
In this system, the probability of packet transmission on a slot is: We have success transmission on a slot if only one user forward packet on that slot and its probability is: The probability of error in packet transmission is: Now we can calculate the first and second moment of the service time as follows, that T is the time slot length.
(1 ) www.intechopen.com  The waiting delay in such system computed as follows:

Delay of waiting for service completion of packet under transmission
That composed of two components: probability of PU's packet under transmission or SU's packet.

Delay due to primary packets arrivals
Because of, transmission in each node independent of other nodes, new packet in the queue of specified frequency only waits for servicing of these queued packets.

Delay due to waiting for service of packets exist in the queue
When a packet transmission is cancelled by PUs occupancy, random waiting time and retrains mission is done.

Channel selection and packet transmission process
Here we explain the channel selection and packet transmission process occur on the queues of the network.
 Selection of frequency queue based on transmission strategy. When a packet enters the node, selects a frequency queue with minimum average sojourn (waiting + servicing) time. Thus, probability of selecting frequency j at node i is:

Simulation results
In For brevity we show only obtained results of one frequency for each experiment.

On demand transmission
In the first example we increase the traffic of network (packet arrival rate of users) to 1.5 tantamount. Figures 2, 4 show that increasing of packet arrival rate cause enforcing more delay to packets in the queue at preemptive resume and preemptive repeat regimes respectively. Proximity of simulation results and theory are obvious in the figures.
In the next example, we increase the arrival rate of primary user 3 (on frequency channel 3) and investigate the conversion of frequency selection strategy. We can see in figures 3, 5 that increasing PU3's traffic causes using another frequency channels (1, 2) to transmission of packets (probability of another channel is increased).

Scheduled system and randomize transmission
In    In figure 6, impact of traffic increasing on packets delay on frequency3 is investigated. Fig. 7. Impact of arrival rate increasing in frequency 3 on channel selection probability on SU1 Channel selection strategy changing by increasing of PU3's packet arrival rate is shown on figure7.

Computational complexity
In this section we compare the accuracy of our formulation and introduced formulation in [12]. Results (figures [8][9][10] show that our calculation is more precise and have less difference with simulation outputs (convergence of new derived formulation is better than the previous one). Complexity comparison is presented in table 1.

Conclusion
In this chapter, we model the single hop cognitive radio networks and extract the delay of packet transmission with use of queuing theory. Based on history of frequency channels (mean staying time) select an appropriate frequency channel and forward the packet. Here, channel selection and delay analysis in single-hop cognitive radio networks are investigated. Several transmission policies (preemptive resume, preemptive repeat and randomize) are mentioned and studied. Finally with use of simulation investigate the validity and accuracy of obtained terms.
These calculations can be used for delay evaluation in single-hop cognitive radio networks and proposed method suitable for channel selection in delay sensitive applications to provide required Qos. Spectrum management and appropriate link-frequency selection in multi-hop CRNs with emphasis on delay are presented in [24]. In the future work we extend our studies to multi-hop infrastructure and introduce delay analysis of these networks.