Joint power and rate scheduling for cognitive multi-access networks with imperfect sensing

A cognitive multi-access network in which a primary user and a secondary user transmit to a common receiver is considered. The secondary user senses the channel at the beginning of each time slot to determine whether the primary user is active or idle. The sensing is not perfect; hence, the secondary user can miss the detection of an active primary user or erroneously declare an idle primary user as active. The secondary user can vary its transmission rate and power from a time slot to the other. A joint rate and power scheduling algorithm is proposed that minimizes the probability of packet loss of the secondary user under a maximum probability of collision constraint at the primary user and a constraint on the average power transmitted by the secondary user. The case in which no retransmissions are allowed and the cases in which one or both users retransmit the collided packets are also considered. The problem is posed as a linear optimization problem that can be solved efficiently.


Introduction
Opportunistic spectrum access has been proposed to overcome the problem of spectrum scarcity. In this frame of work, an unlicensed secondary user attempts to opportunistically access a licensed primary channel in order to use the underutilized spectrum. This network is usually referred to as cognitive radio network. Although cognitive radio is a promising solution of spectrum scarcity problem, maintaining the performance of the licensed primary user unaffected is considered a challenge [1,2]. We consider a time-slotted cognitive network in which a secondary user can transmit simultaneously with an active primary user to a common receiver without adversely affecting the primary user's transmission. The secondary user senses the channel of the primary user at the beginning of each time slot to determine its state. Based on the sensing outcome and a feedback signal at the end of each time slot that indicates the success or failure of the transmission, the secondary user adapts its rate and power to maintain a certain quality of service level for the primary *Correspondence: ghada.hatem@nileu.edu.eg 1 Wireless Intelligent Networks Center (WINC), Nile University, Cairo, Egypt Full list of author information is available at the end of the article user. The adaptation is done via a cross-layer scheduling algorithm that aims to minimize the probability of packet loss of the secondary user under an average power constraint for the secondary user and a quality of service constraint for the primary user.
In the last few years, the problem of scheduling for cooperative cognitive networks has been addressed by several authors. In [3], the authors considered a point to multipoint cognitive network in which they maximize the total throughput of the network while maintaining a required signal to interference plus noise ratio for the primary users. They investigated the uplink and downlink power control and channel assignment problem. The problem of power allocation was also investigated in [4] from a game theoretic point of view. The problem was formulated as a Nash Bargaining Solution problem and a closed form analytical solution was found for the proposed scheduler. The proposed scheduling algorithm maximizes the overall rate while guaranteeing the proportional fairness and efficient power distribution among cognitive radio users. In [5], a cognitive radio network for which a joint cooperative spectrum sensing and resource scheduling scheme is designed. Soft sensing is used instead of hard sensing, and a distributive scheduling algorithm based on duality http://jwcn.eurasipjournals.com/content/2013/ 1/198 theory is proposed to find the solution of the non-convex scheduling problem.
In [6], a cognitive multiple-access-based cooperating relay is addressed, and two protocols are developed to implement the proposed multiple-access strategy. A characterization of the maximum stable throughput region is provided in addition to evaluation of the delay performance of the proposed protocols. The proposed protocols are shown to provide significant performance gains over conventional relaying strategies. A cognitive scenario with two single-user links is investigated in [7]. The secondary user accesses the channel only when the primary user is sensed idle. Random packet arrivals, sensing errors and power allocation at the secondary transmitter have been taken into consideration. The secondary transmitter acts as a relay for the primary link. A stable throughput of the secondary link with relaying is derived, and the results show the benefits of relaying. The authors in [8] considered a cognitive cooperative network with multiple antennas. Using superposition coding, the secondary user simultaneously relays the primary user's packets and transmits its own packets. Two weight vectors at the secondary user equipped with multiple antennas are designed based on zero-forcing. The maximum stable throughput and the average end-to-end delay for both the primary user and secondary user are analyzed. The impact of imperfect channel state information at the secondary user on the maximum stable throughput and the average end-to-end delay performance are evaluated, and the proposed algorithm is shown to have significant gain.
A joint coding and scheduling algorithm for cognitive multiple-access networks was proposed in [9], where the primary and secondary users can transmit only one packet per time slot. A cross-layer design technique was employed by performing successive interference cancellation (SIC) in the physical layer; hence, the primary user does not suffer from any interference. The primary user packets are always transmitted with no delay. The secondary user queue was modelled as a one-dimensional Markov chain, and scheduling was performed by minimizing the average delay of its packets under an average power constraint. A multicell cognitive radio network overlaid with a multicell primary radio network was also investigated in [10]. The primary radio network uses a set of orthogonal frequency channels for communication between primary base stations and primary users. The primary and secondary users have different quality of service requirements that are described in terms of interference constraints. A joint scheduling and power control algorithm have been proposed for the downlink transmission. The authors proposed a suboptimal heuristic greedy algorithm with low complexity and reasonable performance.
The case of non-cooperative cognitive networks in which the secondary user senses the channel of the primary user in order to determine if the channel is busy or not, is considered in several works. In [11], the authors considered a secondary user making opportunistic use of a channel allocated to some primary network that switches between idle and active states according to a stationary Markovian process. The secondary user needs to decide whether to stay idle or to carry out spectrum sensing to detect the state of the primary user. If it chooses to carry out sensing, it needs to decide the duration of the sensing period and to meet a minimum detection probability. A cognitive radio system where the secondary transmitter varies its transmit power based on the value of the sensing metric is considered in [12]. The authors assumed a peak power constraint at the secondary transmitter and an average interference constraint at the primary receiver. The target of the optimization problem is to maximize the signal-to-noise ratio and the capacity of the secondary user.
A cognitive radio network with M fixed primary users, and N mobile secondary users was considered in [13]. The primary users have orthogonal licensed channels, and the secondary users try to transmit when a primary user is idle. A collision occurs when the secondary user transmits over a channel occupied by an active primary user. Lyapunov optimization and collision queues were used to design flow control, scheduling, and resource allocation algorithms that maximize the throughput of the secondary users and provide reliability guarantees in terms of the maximum number of collisions suffered by the primary user. In [14], the dynamic power and rate control problems for multiple cognitive radio links that operate over multiple channels (frequency bands) with a delay constraint imposed on data transmission is considered. Based on a delayed spectrum sensing output and the statistical behavior of the primary network, a power and rate control policy is proposed that maximizes the average sum rate for the cognitive radio links. The proposed algorithm is solved via dynamic programming.
In [15], authors considered a downlink cognitive radio network in which an OFDMA-based secondary system share the primary users' spectrum. They designed a joint cross-layer and sensing algorithm that optimizes a system utility, which adapts the power allocation and the sub-carrier assignment across the secondary users and proposed a distributed implementation of the algorithm. A joint algorithm for sensing adaptation and opportunistic resource allocation for cognitive networks proposed in [16]. The algorithm minimizes the total expected cost of the losses and utilities generated for the secondary system. An average interference threshold constraint and a quality of service constraint for the http://jwcn.eurasipjournals.com/content/2013/1/198 secondary system are imposed. The proposed scheme is shown to dynamically adapt the sensing threshold depending on the network environment using simulation results. The authors in [17] presented a unified analytical framework to design the PHY-layer spectrum sensing and MAC-layer resource scheduling jointly for CR networks. They characterized the presence of imperfect sensing using a parameter named sensing confidence level. A mixed integer nonlinear optimization problem is formulated for the joint design of spectrum and power allocation.
The results of [9] were extended to the case of erroneous sensing in [18]. The optimal transmission policy for the secondary user was found by minimizing its average packet delay under a constraint on the maximum probability of outage at the primary user. The work in [9] was also extended to the case of a twouser multiple access system in [19], where the network is not cognitive and both users have the same quality of service. As in [9], the two users can have/transmit either zero or one packet per time slot, and the queues of the two users were modelled as a two-dimensional Markov chain. The average packet delay was minimized in [19] under an average power constraint on each user.
In [20], the authors considered a cognitive radio network with M primary users and N secondary users transmitting to a single base station (BS). The BS is assumed to have information about the number of packets at the primary and secondary users and the queue state of both users in each time slot; thus, no sensing is performed. As a result, there are no collisions between the primary and secondary user packets in [20] due to the fact that the BS knows the primary state.
In this paper, we consider a time slotted cognitive network in which an unlicensed secondary user transmits over a licensed primary user's channel to a common receiver. Note that parts of this work have been published in [21,22]; however, the main contributions of this paper are as follows: 1. Detailed analysis and performance evaluation for the effect of retransmission of the collided packets on the average delay and throughput are presented. 2. Detailed analysis of the power control algorithm and extensive evaluation of the performance of the proposed algorithm via numerical simulations. 3. We investigate a new problem formulation for the scheduling algorithm. In this formulation, the probability of loss is minimized instead of the delay. The solution of the new problem formulation is shown to be more computationally efficient than the formulation in the conference papers.
SIC is performed in the physical layer at the common receiver in case of simultaneous transmission; hence, the primary user does not suffer any interference from the secondary user's transmission. The primary user is modelled using an on/off activity model in which the primary user is either idle or active with a fixed rate. We investigate two different models for the primary user traffic, one as in [20] where the packet arrival process is independent from one time slot to the next and the other as in [11] where the arrival process follows a Markovian process. The primary user is assumed to transmit its packets instantaneously and, hence, does not suffer from any delay. The secondary user can have a variable number of packets in its queue at the beginning of each time slot where the queue is of fixed length K.
At the beginning of each time slot, the secondary user senses the primary user's channel to determine whether the primary user is active or idle. We consider the case of imperfect sensing in which the secondary user can miss the detection of an active primary user and declare it idle or erroneously declare an idle primary user as active. If the secondary user transmits in a time slot assuming an idle primary user when its true state is active, a collision occurs at the receiver and all the packets involved are assumed lost. An error-free signal is fed back to the transmitters acknowledging a successful transmission or indicating a transmission failure.
We design a cross-layer scheduling algorithm that minimizes the probability of packet loss of the secondary user under an average power constraint and a quality of service constraint at the primary user. The quality of service constraint we consider in this paper is the maximum probability of packets collision the primary user can tolerate. The cases when either the primary user, the secondary user or both users retransmit the collided packets are investigated. The algorithm determines the probabilistic transmission rates and the problem is posed as a linear optimization problem. We consider the case when the secondary user aims to minimize its transmission power by transmitting at the minimum power required to achieve the targeted data rate. Also, the case when its transmission power needs only to satisfy the average power constraint is investigated. In the later case, the scheduling algorithm is modified such that it determines jointly the probabilistic transmission rate and power.
Our results indicate that even with sensing errors, the total throughput of the cognitive network increases by allowing the secondary users to transmit more than one packet in each time slot. Also, accounting for sensing errors in the algorithm is crucial to guarantee an acceptable quality of service at the primary user. The results also indicate that significant gain in the throughput of the secondary user can be achieved when joint optimization over the transmission power and rate is adapted. http://jwcn.eurasipjournals.com/content/2013 /1/198 The remainder of this paper is organized as follows: Section 1.2 presents the system model; the queueing analysis with no power control is presented in Section 1.3, and delay and collision analysis is in Section 1.4; Section 1.5 introduces the analysis of the previous models when retransmission policy is adapted; the power control policy is introduced in Section 1.6; the scheduling algorithm is introduced in Section 1.7; numerical results are presented in Section 1.8; and finally, the conclusion is given in Section 1.9. A list of all symbols can be found in Table 1.

Physical layer model
We consider a time-slotted cognitive network [20] with a primary user and a secondary user transmitting to a common receiver as shown in Figure 1. SIC is performed at the receiver in the case when both the primary and the secondary users transmit at the same time. The secondary user's signal is decoded first and then subtracted from the received signal so that the primary user's signal is decoded with no interference. In the case when the primary user is active and SIC (see Section 6.1.1 in [23]) is performed, the secondary user has to increase its power in order to maintain the same rate achieved when the primary user is idle. SIC is now implemented in various communication systems such as [24]. Adding the fact that SIC is implemented between two users only reduces the complexity of the algorithm and make it sufficiently robust as well as practical.
We denote the noise power, and the magnitude of the channel of the primary and secondary users by σ 2 , |h p |, and |h s |, respectively, and we assume that the channel gains are constant. Figure 2 shows the capacity region for the multiple-access channel representing the primarysecondary pair. The unit of the transmission rate is selected as the number of packets per time slot, and the transmission rate and power of the primary user will be denoted by R p and P p , respectively. The primary user is either idle or active with a fixed number of packets to transmit L a ; hence, R p = L a .
Let R s,i denote the capacity of the secondary user where i = 0 and i = 1 denote the cases when the primary user is idle or active, respectively. Hence, 0 ≤ R s,0 ≤ n and 0 ≤ R s,1 ≤ a, where n and a are the maximum number of packets the secondary user can transmit when the primary user is idle and active, respectively, and are determined based on the channel capacity shown in Figure 2. Let P (m) s,i denote the power the secondary user needs to transmit m packets when the primary user is in state i. The relation between the transmission rate and the transmission power, assuming the SIC order we illustrated, is given by [25]: Note that the constraint on the maximum number of transmitted packets (n and a) is an implicit constraint on the maximum instantaneous transmission power P inst max , i.e., and it can be easily shown that n and a are related as:

MAC layer model
As mentioned in Section 1.1, we will investigate two models for the arrival process of the packets of the primary user. Note that we use the superscripts (·) (1) and (·) (2) to refer to Models I and II, respectively. Let r p (t) denote the number of packets admitted to the primary user's queue at time slot t. In the first model, the number of packets that arrived in different slots are independent and identically distributed random variables, where θ is the probability that the primary user is active. We denote this model as Model I. We also consider Model II in which the primary user switches its state according to a stationary Markov process as shown in Figure 3. The process is specified by two parameters b and h, where The number of packets admitted to the primary user's queue at time slot t (6), (7) θ The probability that the primary user is active in model I b The probability that the primary user is active given it was idle in the previous time slot in model II h The probability that the primary user is idle given it was active in the previous time slot in model II The number of packets admitted to the secondary user's queue at time slot t (8) α The probability that the secondary user has new packets to transmit 1 − P d Probability of missed detection of an active primary user as idle P fa Probability of sensing an idle primary user as active The outcome of the sensing process at time slot t The number of packets transmitted by the secondary user in time slot t (9) The queue state of the secondary user in time slot t (10)

M(t)
The capacity of the secondary user K The maximum length if the secondary user's queue

F(t)
A feedback signal to be sent to the transmitters The probability of transmitting m packets when The probability that the sensing outcome is s in model I(II) (17),(41) The probability of receiving a feedback signal l given sensing outcome i and transmission rate m The transition probability matrix The steady state probability of being at state {kij}({kuij})

P
The average power consumption of the secondary user per packet (30),(43) The discretized probability of the primary user being idle at slot t (31) The average packet delay of the secondary user (44 ),(45) http://jwcn.eurasipjournals.com/content/2013/1/198 Let r s (t) denote the number of packets admitted to the queue of the secondary user at time slot t, where α is the probability that the secondary user has new packets to transmit. The secondary user senses the channel of the primary user, and the sensing is assumed to be imperfect. Thus, the secondary user can miss the detection of an active primary user as idle (a miss-detection event) and can erroneously declare an idle primary user as active (a false alarm event). Let the probabilities of miss detection and false alarm be 1 − P d and P fa , respectively. Also, let γ (t) denote the outcome of the sensing process at time t where γ (t) = 0 denotes the decision that the primary user is idle and γ (t) = 1 denotes the decision that the primary user is active at time slot t.
The secondary user can either transmit with power calculated from (2) or (3). If the secondary user transmits with a power calculated from (2) when the true state of the primary user is active, a collision occurs and all the packets involved in the collision are lost. The collision happens due to the fact that for successful decoding to happen when the primary user is active, the secondary user is required to transmit with power calculated from (3) that is higher than the one calculated from (2); thus collision occurs. We will investigate two transmission power scenarios. In the first, we will assume that the secondary user transmits with power calculated from (2) when the primary user is sensed as idle γ (t) = 0 and transmits with power calculated from (3) when the primary user is sensed as active γ (t) = 1. In this scenario, the rate is determined via the scheduling algorithm. In the second scenario, the scheduling algorithm will jointly determine the optimal power/rate policy under only a long-term average power constraint. In this case, the secondary user can transmit with power calculated from either (2) or (3) regardless of the sensing outcome. In the case of collision, we will also investigate the case when neither primary user nor the secondary user attempts to retransmit the collided packets, and the cases when one or both users attempt retransmitting them.
Let A s (t) and Q s (t) denote the number of packets transmitted by the secondary user in time slot t, and the queue state of the secondary user in the tth time slot, respectively. Note that the arrival of the secondary user's packets can happen at any time during the time slot; however, these packets cannot be transmitted until the next time slot (a minimum of one time slot delay). The decision of the number packets to transmit is taken at the beginning of the tth time slot after the sensing period and is based on the queue update in the t − 1th time slot. Hence, where M(t) is the capacity of the secondary user and K is the maximum length of the queue of the secondary user. Note that the minimum function is used in (9) as the maximum number of packets that can be transmitted by the secondary user is upper bounded by the maximum number of packets in its queue and the channel capacity. Also, note that the channel capacity calculation will differ based on the power transmission scenario adapted, i.e., M(t) = γ (t)a + (1 − γ (t))n in the case of no power control and M(t) = P(t)a + (1 − P(t))n in the case of power control where P(t) = 0 denotes transmitting with power calculated from (2) and P(t) = 1 denotes transmitting with power calculated from (3). Note that P(t) will be defined properly in Section 1.6. http://jwcn.eurasipjournals.com/content/2013/1/198

Figure 2
Capacity region of a primary-secondary pair.

Queueing analysis
In this section, the queue model of the secondary user will be introduced with a complete analysis for the transition probabilities and the average power consumed for Models I and II of the primary user's traffic. Since the primary user is assumed to transmit its packets instantaneously, we will focus only on the queue of the secondary user. We assume in this section that neither power control nor retransmission of collided packets is allowed. At the end of each transmission a feedback signal is sent to the transmitters to indicate whether it was a successful transmission or not. This signal will be denoted as F(t), and in each time slot, it has three possible outcomes, i.e., Case 1: F(t) = 0 A negative acknowledgment (NACK) signal is transmitted at the end of time slot t which means that the primary user was sensed as idle when its true state was active, and the secondary user transmits A s (t) = m ≥ 1 packets which resulted in a collision.

Model I
In this model, and as mentioned before, the number of packets admitted to the primary user's queue at time slot t is independent of the number of packets admitted at the t − 1th time slot. The number of packets the secondary user can transmit in the tth time slot will be determined based on three metrics; the sensing outcome at this time slot γ (t), the feedback signal from the previous time slot F(t − 1), and the number of packets in its queue Q s (t).
Hence, we will model the state of the system in time Note that since the channel gains are constant, the transmission policy g (m) kij is independent of time t as long as the traffic statistics remain constant. From (9), we know that the maximum number of transmitted packets is limited by the capacity of the secondary user and the number of packets in its queue. Let λ kij,lsq denote the probability that the Markov chain makes a transition from the state (k, i, j) to state (l, s, q). The transition probability, λ kij,lsq , can be calculated as follows: where (13) is obtained from (12) using the law of total probability. Using the independence of the sensing outcome at time t from previous sensing outcomes, queue states, and transmission outcomes and by conditioning over the number of packets transmitted in the previous time slot (14) can be obtained from (13). Finally, C (1) s is the probability that the outcome of sensing is equal to s ∈ {0, 1}, i.e., In (15), C i,l,m is given by: Thus, we can write the transition probabilities as follows: where μ kij,q , μ kij,q and μ (+) kij,q are given by: Note that when j = q, When j < q, where m i,j,q = min{n + j − q, m i,j } and β m,j = n − m + j − K + 1. Finally, when j > q, where n i = ai + n(1 − i). The derivations can be found in [20]. Let the matrix denote the probability transition matrix of the Markov chain. Also, let π kij denote the steady state probability of being at state (k, i, j). Hence, the steady state probabilities must satisfy the equation: where 1 is a column vector whose entries are all equal to 1. The average power consumption of the secondary user per packet during transmission is given by: (30)

Model II
The primary user switches states according to the stationary Markov process described in (7). This will result in one main difference between the queue model discussed in Model I and Model II. This difference arises from the assumption that sensing is imperfect, and hence, the Markov chain representing the state is partially observable. We will add another dimension to the three-dimensional Markov chain described before so that the Markov chain has a state (k, u, i, j), where the dimension u represents the belief state L(t) at the beginning of the tth time slot. We define the belief state as the discretized probability of the primary user being idle at time slot t where L(t) ∈ {0, , . . . , (N − 1) } and N = 1 . Note that L(t) = u means that the actual non-discretized probability of the primary user being idle can be any value between u and (u + 1) . The belief state L(t) in the tth time slot will be updated based on the feedback signals F(t − 1), and F(t − 2) at the end of the t − 1th and t − 2th time slots, respectively, the last belief probability L(t − 1) = u , and the sensing outcome γ (t − 1). Hence, whereL and (.)| denotes discretization by a step . Note that we integrate over the cases when F(t − 2) ∈ {1, 2} since these are the cases when we originally discretized the output belief state at the t − 2th time slot. Note that after the evaluation of the integration, we have the following: where kuij denote the probability that the secondary user transmits m packets given that the Markov chain is in the (k, u, i, j)th state, i.e., The transition probabilities λ kuij,lvsq from state (k, u, i, j) to state (l, v, s, q) can be written as follows: where (36) is obtained from (35) using the law of total probability, (38) was obtained using Bayes' rule, and (39) was obtained from the independence of both the belief state and the sensing outcome at time t from previous queue states. We Also, we will define C Using (39), (40), and (41), we can write λ kuij,lvsq such that: where The average power consumption of the secondary user per packet during transmission is given by: kuij m . (43)

Delay and collision analysis
As mentioned before, in this paper, we focus on minimizing the probability of loss. However, to compare the results to those in [21,22] where the average packet delay is minimized, we will also present the average delay analysis. The relation between the average number of packets in any system L, the average arrival rate λ, the average waiting time W in this system, and the probability of loss is given by Little's law [26,27], where L = λ(1 − )W . Hence, we can write the secondary user's average packet delay as: The derivations of (46) and (47) can be found in [20]. The probability of collision ζ p will be equivalent to the probability of receiving a NACK at the end of a time slot under the assumption that the primary user transmits with fixed rate. Thus, (49)

Retransmission policy
The case when neither the primary user nor the secondary user retransmits the collided packets was shown in the previous sections. In this section, we will show the modifications needed to account for the case when one or both users retransmit the collided packets. http://jwcn.eurasipjournals.com/content/2013/1/198

Retransmission of the primary user's collided packets
In this case, when a collision occurs, the primary user retransmits its packets with probability 1; thus, no sensing is necessary in the time slot that follows receiving a NACK. Also, for Model II, the belief probability in the next time slot will equal to zero since the primary user will be active with probability one. Hence, we have for both models (Note that (. ) denote retransmission scenario), and for Model II, we haveĈ (51)

Retransmission of the secondary user's collided packets
In this case, when a collision occurs, the event that the secondary user's queue decreases will happen with zero probability since the secondary user will not drop the collided packets; hence, the secondary user's queue will either stay constant or increase due to the arrival of new packets during the last time slot. Therefore, the only change in the transition probabilities calculated above is in the case of i = 0 and l = 0, where from (13), we can write: . Note that the same changes applies also for Model II.

Power control policy
We will now investigate the case when power control is allowed. Let P(t) denote the transmission power policy at the tth time slot, where P(t) ∈ {0, 1}. The policy P(t) = 0 represents the case when the secondary user transmits with power calculated from (2), i.e., assuming the primary user is idle. On the other hand, P(t) = 1 represents the case when the secondary user transmits with power calculated from (3), i.e., assuming the primary user is active in time slot t. Note that, the chosen power policy depends on the chosen transmission rate of the secondary user. However, for a given secondary user rate m, power level 0 is calculated using (2) by setting R s,0 = m and power level 1 s calculated using (3) by setting R s,1 = m. In this case, collision occurs if the secondary user transmits any number of packets using policy P(t) = 0 when the primary user's true state is active.

Model I
Let g (m,p) kij denote the probability of transmitting m packets using policy p given that the system is in state k(t), i(t), j(t) . Hence, (53) http://jwcn.eurasipjournals.com/content/2013/1/198 The transition probabilities can be written as follows: Hence (Note that (.) (p) denote using power control), Note that C (1) s is as given by (17). The average power consumption of the secondary user per packet during transmission is given by: where P max can be expressed as: Note that the average packet delay and the collision probability can be found from (44) and (48), respectively, with the exception of the probability of loss which will be: (61) http://jwcn.eurasipjournals.com/content/2013/1/198

Model II
Let g (m,p) kiuj denote the probability of transmitting m packets using policy p given that the system is in state k(t), i(t), u(t), j(t) . Hence, The transition probabilities can be written as follows: where C (67) http://jwcn.eurasipjournals.com/content/2013/ 1/198 Note that when l = 2, there is no meaning to p = 0 or p = 1 since there is no transmission. Also, C (2) s,l is as given by (41). Thus, the transitions probability λ (p) kuij,lvsq can be written such that: where The average power consumption of the secondary user per packet during transmission is given by: The average packet delay and the collision probability can be found from (45) and (49), respectively, and kij , and we can recover g (m) kij from x (m) kij using g (m) kij π kij by x (m) kij in ,P and ζ p . The design problem is now given by: where P max and ζ p max are the maximum average power per packet for the secondary user and the maximum collision probability at the primary user, respectively. Note that the matrix Q is formed by replacing each g (m) kij π kij in π = π by x (m) kij . The objective function and the constraints in the above optimization problem are linear; hence, the problem can be solved in polynomial time [28,29]. Note that the analysis in (71) is made for Model I with no power control, but it applies to all the other cases.
Note that the scheduling algorithm can be rerun every scheduling period over which the channel gains are assumed constant and change only from one period to the next. We assume that the common receiver has information about the queue states at each time slot and the transition probabilities of the users. The transition probabilities need only be sent once at the beginning of transmission between the users and the common receiver. As for the queue states, they are sent as a feedback message from the users at the end of each transmission. This information can be fedback using a small number of bits which in turn do not cause significant overhead. Also, note that in our model, the common receiver is basically a base station that coordinates the communication between the primary and secondary users. In conclusion, the scheduling algorithm determines the probabilistic transmission rates of the users under different scenarios which can be calculated at the beginning of each scheduling period, and then the users randomly access the network using the calculated probabilities.

Proposed scheme performance
We first investigate the performance of the proposed scheme which accounts for sensing errors and compare it to different schemes. The shown results are for σ 2 = |h s | 2 = 1, P d = 0.8, P fa = 0.3, K = 10, n = 6, a = 4, L a = 3, and ζ p max = 0.03. The performance of the scheme is evaluated for Models I and II with α = θ = 0.5, b = 0.4, and h = 0.6 in the case when neither the primary user nor the secondary user retransmits the collided packets and with no power control. The average packet delay and the throughput of the secondary user are compared in Figures 4 and  5, respectively, to the case of perfect sensing and the uncognitive scheme in which the algorithm does not take into consideration sensing errors and assume the sensing is perfect. Note that in the un-cognitive case, the average delay and throughput are calculated via a queue simulation in which the packets arrive according to the arrival process described before and are served using the transmission probabilities calculated assuming perfect sensing. The proposed scheme is also compared to the baseline scheme in which both users can have and transmit a maximum of one packet per time slot [9].
The results show the significant improvement in the secondary user throughput even with sensing errors over the baseline scheme. However, this comes at the expense of an increase in the average packet delay. On the other hand, we see that the proposed scheme results in a higher delay and lower throughput than the un-cognitive one in which sensing errors are not accounted for. This can be attributed to the more conservative design in the proposed scheme so that a certain level of quality of service at the primary user is preserved. To see this, we need to compare the probability of collision of the primary user's packets for these schemes. Figure 6 shows that though the un-cognitive scheme has better performance in terms of delay and throughput, it violates the maximum probability of collision constraint at the primary user and thus degrades the primary user throughput severely as shown in Figure 7. Note that Model II shows better performance than Model I. This is because Model I is evaluated when the primary user is idle 50% of the time and Model II is evaluated when the primary user is idle 60% of the time.

Retransmission of collided packets impact
We will now investigate the impact of retransmitting the collided packets at the average packet delay and throughput of the secondary user. In Figures 8 and 9, we compare the average packet delay and throughput of the secondary user, respectively, of the proposed scheme when neither the primary nor the secondary user retransmits the collided packets and when both users retransmit them. We see that, retransmission can result in throughput gain;           however, it will come at the expense of increasing the average packet delay. Hence, the results suggest that choosing to retransmit the collided packets is application dependent, i.e., if the secondary user has a delay-sensitive application, the collided packets should be dropped from the queue immediately after the first transmission. However, if the secondary user can tolerate a small increase in the delay, retransmission of the collided packets will result in improving its throughput.

Power control impact
In this simulation, we evaluate the impact of using power control on the proposed scheme for Model I and at ζ p max = 0.01. In Figure 10, we notice that optimizing the power policy does not cause any significant gain/loss in the average packet delay. However, the throughput of the secondary user improved significantly specially in the high transmission power zone as shown in Figure 11. This improvement is due to the fact that at high power, the secondary user can choose to transmit most of the time with policy 1; thus, the probability of collision decreases, and the throughput increases significantly.

Analysis verification
In this simulation, we verify the correctness of the analysis by performing a queue simulation in which the primary user's packets arrive according to (6) in Model I and (7) in Model II. The secondary user's packets arrive according to (8) and are served according to the transmission probabilities calculated via the scheduling algorithm. The resultant average packet delay is compared to the one calculated from the analysis for both Models I and II in Figure 12, and the results verify the correctness of the analysis.

Probability of loss versus average delay minimization
In this simulation, we compare the performance via minimizing the probability of packet loss described in (71) and minimizing the average packet delay as in [21,22]. Note that the probability of loss is linear in the optimization variable x m kij ; hence, the new optimization problem is a linear program. However, the average delay is linear fractional; hence, the optimization problem is quasi-convex. The quasi-convex optimization problem will be solved iteratively using the interior point method. The intuition behind minimizing the probability of loss problem formulation is that if the loss in optimality is marginal and can be tolerated by the secondary user, the complexity of the algorithm will reduce significantly. Figure 13 shows the resultant average packet delay after solving the scheduling algorithm by minimizing the average packet delay and for the case when the objective is minimizing the probability of loss. The results show that the average packet delay of the linear problem is slightly higher than the optimal average delay from the original problem. However, as shown by Figure 14, the throughput achieved via minimizing the probability of loss is higher than the one achieved by minimizing the average delay. Figure 15 shows the significant gain in the time required to solve the problem and consequently the complexity.

Conclusion
In this paper, we have proposed a scheduling algorithm that designs the transmission probabilities of a secondary user transmitting over a primary user channel to a common receiver. The algorithm takes into account sensing errors and guarantees a certain quality of service level at the primary user. The proposed algorithm minimizes the probability of packet loss of the secondary user under an average power constraint and a maximum probability of collision constraint at the primary user. We have also investigated the case when neither the primary user nor the secondary user retransmits the collided packets in addition to the cases when one or both users retransmit the collided packets. A power control policy is introduced and shown to achieve a significant improvement in the secondary user throughput without affecting the primary user's transmission. The problem is posed as a linear problem and simulations results have been presented that verify the correctness of the analysis.