1 On the Design of Relay–Assisted Primary–Secondary Networks AhmedEl Shafie,Member, IEEE, Tamer Khattab,Member, IEEE,Ahmed Sultan, Member, IEEE and H. VincentPoor, Fellow,IEEE ✦ 4 1 0 Abstract—The use of N cognitive relays to assist primary and sec- channel only when the source nodes are idle, i.e. not 2 ondarytransmissionsinatime-slottedcognitivesettingwithoneprimary utilizing the spectrum. y user(PU)andonesecondaryuser(SU)isinvestigated.Anoverlapped a spectrumsensingstrategyisproposedforchannelsensing,wherethe M [4]considersacognitiverelaythataidsmultiplenodes SU senses the channel for τ seconds from the beginning of the time in transmitting their data to a common receiver. The slot and the cognitive relays sense the channel for 2τ seconds from 0 the beginning of the time slot, thus providing the SU with an intrinsic proposed protocol exploits source burstiness to enable 2 priorityovertherelays.Therelayssensethechannelovertheinterval cooperation during silence periods of different nodes [0,τ] to detect primary activity and over the interval [τ,2τ] to detect in a time-division multiple access (TDMA) network. In T] secondaryactivity.TherelayshelpboththePUandSUtodelivertheir [5], Krikidis et al. proposed to deploy a dumb relay undeliveredpacketsandtransmitwhenbothareidle.Twooptimization- I node in cognitive radio networks to improve network . basedformulationswithqualityofserviceconstraintsinvolvingqueueing s spectrumefficiency.Therelayaidsboththeprimaryand delayarestudied.Bothcasesofperfectandimperfectspectrumsensing c the secondary users. The proposed protocol is analyzed are investigated. These results show the benefits of relaying and its [ abilitytoenhancebothprimaryandsecondaryperformance,especially and optimized for a network model consisting of a 2 in the case of no direct link between the PU and the SU transmitters pair of primary users (PUs) and a pair of secondary v andtheirrespectivereceivers.Threepacketdecodingstrategiesatthe users (SUs). In [6], multiple relays serve multiple PUs 8 relaysarealsoinvestigatedandtheirperformanceiscompared. during their silence periods. A number of secondary 6 links coexist with the system and two secondary access 1 IndexTerms—CognitiveRadio,QueueingDelay,Relaying,Cooperative 3 Communications,StabilityAnalysis. scenarios are investigated. Under the first, the SUs are . able to sense the activity of both the PUsand the relays, 1 0 1 INTRODUCTION thereby remaining silent when any of them is active. In 4 the second scenario, the relays and the SUs randomly 1 In the quest for efficient usage of radio spectrum, high access the channel and their transmissions may collide. : reliability and high speed wireless transmission, cogni- v i tive radio and cooperative communications emerge as Relays with buffers are also considered in [7]–[12]. X two of the most promising technologies. In coopera- The max-max relay selection policy is considered in [9]. ar tive communications [1]–[3], a portion of the channel Buffered relays enable the selection of the relay with resources are assigned to one or more relays for co- the best source-relay channel for reception and the best operation. These relays cooperate with a source node relay-destination channel for transmission. The scheme to help in forwarding its data to a destination. This relies on a two-slot protocol where the schedule for enhancescommunicationreliability,reducestherequired the source and relay transmission is fixed a priori. This transmitted power and achieves spatial diversity. The limitation is relaxed in [10] where each slot is allocated use of relays may, however, result in some bandwidth dynamically to the source or relay transmission accord- efficiencyloss becauseofthe channel resourcesassigned ingtotheinstantaneousqualityofthelinksandthestate to the relays to perform their task. A cognitive relay is of the buffers. In [11] and [12], the authors considered a viable solution to this problemasthe relayutilizes the two-hop communication, where the SU exploits periods of silence of the PU to transmit its packets to a set of A. El Shafie is with Wireless Intelligent Networks Center (WINC), Nile relays. Moreover, the relays can transmit even when the University, Giza, Egypt. He is also with Electrical Engineering, Qatar University,Doha,Qatar(e-mail:ahmed.salahelshafi[email protected]). PU is busy because they can act together and create a T. Khattab is with Electrical Engineering, Qatar University, Doha, Qatar beamformer to suppress or even null the interference at (email:[email protected]). the primary receiver. The instantaneous channel gains A.SultaniswithElectricalEngineering,AlexandriaUniversity,Alexandria, Egypt(email:[email protected]). are assumed to be known at the relay stations. H. V. Poor is with the Department of Electrical Engineering, Princeton University,Princeton,NJ08544USA(email:[email protected]). In this work, we consider buffered relays with cog- This researchwork is supportedbyQatar National ResearchFund(QNRF) undergrantnumberNPRP09-1168-2-455. nitive capabilities. The relays serve two users with dif- 2 ferent priorities: a PU and an SU.1 The relays accept 4. We provide some numerical results in Section 5 and a fraction of the undelivered primary and secondary conclude the paper in Section 6. packets into their buffers and forward these packets to the primary and secondary destinations. We do not 2 SYSTEM MODEL assume instantaneous channel knowledge and, hence, our protocol does not involve relay selection on the Thenetworkconsists ofone primarytransmitter‘p’, one basis of instantaneous channel quality. We propose a secondary transmitter ‘s’, one primary destination ‘pd, particularoverlappedspectrumsensingschemeinorder one secondary destination ‘sd’, and a set of N relays to regulate the operation of the PU, the SU and the labeled as 1,2,3,...,N as shown in Fig. 1. The relays relays. arehalf-duplex,whichmeansthattheyeithertransmitor We can summarize the contributions in this paper receivebutcannotdobothatthesametime.Weconsider as follows. We consider one PU and one SU in the a wireless collision channel model where concurrent presence of N cognitive relays. The relays are used to transmissions by two or more nodes are assumed to be help both the PU and the SU in communicating their lost. Eachofthe PUandthe SUhasaninfinite bufferfor data packets to their respective receivers. We propose a storing fixed-length packets. Each terminal operates as novel overlapped spectrum sensing technique to coor- a discrete-time Geo/Geo/1 queue [13].2 The arrivals at dinate channel access. More specifically, the SU senses the primaryand secondaryqueues areindependentand the channel for τ seconds from the beginning of the identicallydistributed(i.i.d.)Bernoullirandomvariables time slot to detect possible activity of the PU, while from slot to slot with means λp ∈ [0,1] and λs ∈ [0,1] the relays sense the channel for 2τ seconds from the packets per time slot, respectively. Arrival processes beginning ofthe timeslot. Eachrelaysensesthe channel at the primary and secondary buffers are statistically over the interval [0,τ] to detect possible activity of the independent of one another. Each relayhas two queues: PU and over the interval [τ,2τ] to detect the activity a queue for relaying the primary packets denoted by of the SU. The SU transmits a packet from its queue Qp,k, and a queue for relaying the secondary packets if the PU is sensed to be idle. For the relays to transmit, denoted by Qs,k, where k ∈ {1,2,...,N}. The relays they must sense both the PU and the SU to be inactive. help both the PU and the SU to deliver their packets We investigate three strategies for the decoding of the in the periods of silence of both of them. If a terminal primary and the secondary transmissions at the relays. transmits during a time slot, it sends exactly one packet We propose an ordered acceptance strategy, denoted to its respective receiver. by S , in which the relays are ordered in terms of We propose an overlapped spectrum sensing scheme OD accepting the undelivered packets of the PU and the asdepictedinFig.2.TheSUsensesthechannelfromthe SU into their queues. To simplify the decoding process, beginningofthetime slotuptoτ secondsrelativetothe we propose random assignment decoding, denoted by beginning of the time slot, while all the relays sense the S , and round robin decoding, denoted by S , in channelover the interval[0,τ] to detectprimaryactivity RD RR which each relay is assigned to the decoding role for and over the interval [τ,2τ] to detect secondary activity. a fraction of the time slots. We study the optimal sec- If the channel is sensed to be free over both intervals, ondaryaverageservicerategivencertainaveragearrival thenalltherelaysremainidleduringtherestofthetime rates to the primary and the secondary queues. Also, slot except the relay that is scheduled for transmission we investigate the minimum number of relays needed provided that its queues are nonempty. If either the PU to achieve a specific level of quality of service (QoS) or the SU is sensed to be active, then the relays may for the users. We study the case of sensing errors at the switchtothereceivingmodedependingonthedecoding relays’ spectrum sensors. In contrast with many works strategy as explained later in Subsection 2.1. There is a involving automatic repeat request (ARQ) feedback, we feedbackphaseattheendofthetime slottoindicatethe take into account the cost of the feedback duration, status of packet delivery. whichisathroughputlossasthetimeallowedforactual data transmission is reduced. Finally, in Appendix A, 2.1 Mediumaccesscontrol(MAC)Layer we provide a proof of the advantage of S over S OD RD The PU transmits the packet at the head of its queue and S , in terms of the service rates, for the case of a RR starting at the beginning of the time slot. If the PU is negligible feedback duration per relay. sensed to be idle by the SU, the SU transmits the packet Therestofthepaperisorganizedasfollows.InSection at the head of its queue after τ seconds. A relay with 2, we describe the system model adopted in this paper. nonempty queues transmits during a time slot after 2τ The problem formulations are presented in Section 3. seconds if it is scheduled to transmit and it senses the ThesystemwithsensingerrorsisinvestigatedinSection PU and the SU to be idle. The probability that relay k is scheduled to transmit during a time slot is ω . 1.Theproposedcognitivecooperationprotocolsandthetheoretical k development in this paper can be generalized to cognitive radio networks with more PUs and more SUs, in which the PUs and the 2.Thenotionofdiscrete-timeGeo/Geo/1queueisusedtodescribe SUsareoperatingunderTDMAorfrequency-divisionmultipleaccess aqueueingsystemwithaBernoulliarrivalprocessandgeometrically (FDMA). distributedservicetimes. 3 Secondary user starts transmission after Random decoding and PD se coisn ddesc ilfa trheed cidhlaen.n(cid:2028)el round robin decoding (cid:3) (cid:2028)(cid:2028)(cid:2028)(cid:2028)(cid:3033)(cid:3033) (cid:2028)(cid:2028)(cid:2028)(cid:2028)(cid:3033)(cid:3033)(cid:3033) Time slot PU (cid:4666)(cid:1846)(cid:4667) (cid:884)(cid:2028)(cid:3033) Secondary user (cid:2028) Rela(cid:2028)ys start transmmiissssiioonnFF eeee dddbbuaarcca(cid:1846)kkt (cid:2890)ipporrnoocceessssss (cid:2028) (cid:3033) (cid:2028)(cid:3033) (cid:2028)(cid:2028)(cid:2028)(cid:2028) (cid:3033)(cid:3033) (cid:2028)(cid:3033) and relays start after 2 seconds if the sensing process. channel is declared idle. (cid:2028) Or(cid:4666)(cid:4666)d(cid:1840)(cid:1840)ere(cid:3397)(cid:3397)d(cid:883)(cid:883) a(cid:4667)(cid:4667)c(cid:2028)(cid:2028)(cid:2028)(cid:2028)c(cid:3033)(cid:3033)eptance k threlay Fig. 2. Time slot structure.The explanation for the feed- SU back process and its duration is provided at the end of Section2. destination (SD) acknowledges the correct reception of the transmitted packet by sending an acknowledgment SD (ACK) message, the relays discard what they have re- ceived from the PU or the SU. If the PD or SD declares Fig. 1. System model: N relays assist primary and itsfailuretodecodethereceivedpacketcorrectlybygen- secondary transmissions from the PU and the SU to the erating a negative acknowledgment (NACK) message, primarydestination(PD)andsecondarydestination(SD), the relays attempt to decode the received packet and respectively. determine its origin. If the received packet is correctly decoded and, hence, its origin is identified by the first- ranked relay, it decides whether to accept the packet. This means that over a large number of time slots relay If the packet is admitted, an ACK is transmitted by k is assigned to transmit during a fraction ωk of the the relay to inform the PU or SU to drop the packet N total time slots. It is clear that ω = 1. We define from its queue and to notify the other relays that the k=1 k a vector ω = [ω1,ω2,...,ωN] Pto indicate the fraction packet has already been accepted. If the first-ranked of time slots allocated to each relay for transmission. relay receives the packet in error or does not accept it, If relay k is scheduled for transmission, which occurs it remains silent and the second-ranked relay makes the with probability ωk, it chooses a packet from Qp,k with acceptancedecisionincaseithasreceivedthepacketcor- probabilityα andfromQ withprobability1−α .We rectly.Generally,arelay,dependingonitsdecodingrank, k s,k k define the vector α=[α1,α2,...,αN]. decides whether to accept a correctly decoded packet If a relay receives during a time slot, it distinguishes provided that all the preceding relays do not admit the between the primary and the secondary transmissions packet. We assume perfect decoding of the feedback through an identifier contained in each transmitted messages at all nodes. This assumption is reasonable packet.3 If a relay correctly receives a packet, it decides whenstrongchannelcodeswithlowmodulationindices to accept it with a certain probability. The acceptance are employed for the feedback channel [4]. probability vector of the undelivered primary packets The relays’ acceptance order is the N-tuple m = n is fp, where the element fp,k is the probability that (m1,m2,...,mi,...,mN), where mi ∈ {1,2,...,N} and relay k admits a correctly received primary packet to m 6= m ,∀i,k : i 6= k. The N-tuple (m ,m ,...,m ) i k 1 2 N Qp,k. Similarly, the vector fs has N elements with fs,k meansthatrelay1isassignedthem1thacceptancerank, being the probability of admitting a correctly received relay2isassigned them thrankandsoon.Itisevident 2 secondary packet to Qs,k. that mn is a permutation, Πn, over the set {1,2,...,N} and there are N! such permutations, where N! indicates 2.1.1 OrderedAcceptanceStrategy the factorial of N. We define the probability ρ(np) as the Under the ordered acceptance strategy, SOD, if a relay probability of the jth permutation, Πn, resulting in the senses either the PU or SU to be busy, it operates in the acceptanceorder(m ,m ,...,m )ifthereceivedpacket 1 2 N receivingmodetillthetransmissiontimewithinthetime comesfromthePU.Thisprobabilitydenotesthefraction slotisover.Iftheprimarydestination(PD)orsecondary of time slots with this ranking order. Probability ρ(ns) is defined in a similar fashion if the packet is transmitted 3.The reason the origin of a packet is identified by a certain embedded identifier is that spectrum sensing may be erroneous. If bytheSU.Vectorsρ(p) andρ(s) havetheaforementioned sensingwereperfect,therelaycouldidentifytheoriginoftransmission probabilities as elements and both have N! elements. dependingon whetherit has proceeded at the beginningof the time The medium access control (MAC) operation can be slotorafterτ seconds.Inthispaper,althoughwestartwiththeperfect sensingcase,welateraddresstheissueofspectrumsensingerrors. summarized as follows: 4 • At the beginning of a time slot, the PU transmits • If the primary packet is not received correctly, a the packet at the head of its queue to the primary NACK message is fed back from the primary re- receiver.Due tothe broadcastnatureof thewireless ceiver.Therelaythatisassignedforpacketdecoding channel, the SU and the relays can listen to the tries to decode the undelivered primary packet. transmitted primary packet. If the packet is decoded correctly, it is accepted • The SU senses the channel over the first τ seconds with a certain probability and an ACK message is of the time slot. If the SU detects the channel to transmitted, thereby inducing the PU to drop the be free from primary activity, it transmits from its packet. If the cognitive relay assigned for decoding queue ifitisnonempty. Therelayscanoverhearthe failstodecodetheprimarypacketordoesnotaccept secondary transmission. it, the packet is kept in the primary queue for • If the PU is active and the transmitted packet is retransmission. received correctly by the primary receiver, an ACK • If the PU is sensed by the SU to be idle, the SU, message is fedbackfromthe receiver.The packetis if its queue is not empty, starts transmission and then dropped from the primary queue. The relays the relays repeat the same operation as described also discard what they have received. earlierforthePU’srelayingscenario.Recallthatthe • If the primary packet is not received correctly, a origin of the received packets at the assigned relay NACK message is fed back from the primary re- canbe known fromthe packet’sidentifier.Basedon ceiver. The relays then attempt to decode the re- the identifier, assigned relay k accepts the packet ceived packet and determine its origin. Based on into Q with probability f , or into Q with p,k p,k s,k their primary packet acceptance ranking, the first- probability f . s,k ranked relay decides whether or not to accept the Randomroundrobindecoding,S ,isasimplification RR primary packet if it is decoded correctly. If the of S in which the decoding assignment probability RD packet is accepted, an ACK message is transmitted, is equal for all relays. That is, β = 1/N, where k ∈ k thereby inducing the primary transmitter to drop {1,2,...,N}. the packet.Ifthe first-rankedcognitive relayfailsto decodetheprimarypacketordoesnotacceptit,the second-ranked relaytries to do so. This relay issues 2.2 Physical(PHY)Layer an ACK signal if it decodes the packet successfully and decides to accept it. This operation continues The channel outage event for the relays and the SU inrankingordertillarelaydecodesandacceptsthe can be calculated as follows. The transmitters adjust packet. If no relay accepts the packet, it is kept in their transmission rates depending on when they start the PU’s queue for retransmission. transmission during the time slot. Assuming that the • In the case of secondary transmission, the relays numberofbitsinapacketisbandthetimeslotduration perform the same operation as described for pri- is T, the transmission rate is mary transmission. The ranking of relays to accept b the secondary packets differs from the ranking of ri = T 1− TSF . (1) accepting the primary packets. T (cid:0) (cid:1) • If both the PU and the SU are found to be idle, with TSF = iτ +TF < T, where TF is the time needed therelaysstarttransmittingthepacketsattheheads to execute the feedback process. The parameter i = 0 of their queues. The fraction of time slots in which if the transmitter is the PU as transmission proceeds at relay k is scheduled to transmit is ω . the very beginning of the time slot, i = 1 for the SU k as its transmission is preceded by a spectrum sensing 2.1.2 Random Assignment Decoding and Random period of τ seconds, and i = 2 for all relays because RoundRobinStrategies their transmission is preceded by a spectrum sensing period of 2τ seconds relative to the beginning of the The difference between random assignment decoding, timeslot. Outage ofalinkoccurswhenthetransmission S , and S is that inS only one relayis scheduled RD OD RD rate exceeds the channel capacity. Hence, the outage todecode,and possibly accept,the undeliveredprimary probability of the link between node j and node k is or secondary packet at any slot. The probability that given by [4] relay k is assigned the decoding role in a time slot is denotedasβk.Wedefinethevectorβ =(cid:20)β1,β2,...,βN(cid:21) Pj,k =Pr(cid:26)ri >W log2(1+γj,khj,k)(cid:27) (2) with the constraint Nk=1βk = 1. The vectors α, ω, fp where W is the bandwidth of the channel, γj,k is the and fs are similar toPthose in SOD. The operation of the received signal to noise ratio (SNR) when the channel relays can be summarized as follows: gain is equal to unity, and h is the channel power j,k • At the beginning of each time slot, the index, k, of gain, which is exponentially distributed in the case of the randomly selected relay is generated according Rayleigh fading. The channel gain, h , is assumed to j,k to the discrete distribution β. be independent from slot to slot and link to link. The 5 outage probability can be written as The secondary queue can be analyzed in a similar fashion. The probability of the primary queue being P =Pr h < 2Wri −1 (3) empty is [4], [14], [15] j,k j,k γ n j,k o λ p Assuming that the mean value of hj,k is σj,k, πp,◦ =1− µ . (7) p 2Wri −1 When the primary queue is empty, a packet in the P =1−exp − . (4) j,k (cid:18) γj,kσj,k(cid:19) secondary queue can be served in either one of the following events: the channel between the SU and SD is LetP =1−P betheprobabilityofcorrectreception. j,k j,k notinoutage;orthechannelbetweentheSUandtheSD It is therefore given by is in outage and one of the relays decodes and decides b to accept the packet. Therefore, the average service rate 2TW(1−TTSF) −1 of the secondary queue can be written as P =exp − . (5) j,k (cid:18) γ σ (cid:19) j,k j,k N Note that the duration of the feedback process, TF, µs =πp,◦ Ps,sd+Ps,sd Ps,kfs,k varies according to the strategy in the decoding that the (cid:20) Xk=1(cid:18) N (8) relays adopt. In the case of S , the relays are ordered in terms of sending the ACKOmDessages if they accept a × ρ(ns) Ps,vfs,v . correctlyreceivedpacket.If eachrelayneedsτ seconds, XΠn vvY6==k1 (cid:19)(cid:21) f mv<mk then the overall feedback duration is T = (N +1)τ F f The probability that the secondary queue is empty is given that the PD also needs τ seconds to acknowledge f given by the reception of a data packet. On the other hand, S RD λ and S need only T = 2τ for the feedback process π =1− s. (9) RR F f s,◦ µ to be executed. The increase in the feedback duration is s interpretedasanincreaseintheoutageprobabilityofthe Let λp,k and λs,k be the arrival rates at the queues channels. This fact can be seen easily from (5). It should Qp,k and Qs,k of relay k, respectively. Note that for be mentioned that the decoding process, taking into an arrival event to occur at Qp,k, the primary queue account the feedbackduration, will cause a reduction in should be nonempty. For an arrival event to happen theallowabledatatransmissiontimeofboththeprimary at Qs,k, the primary queue must be empty to preclude and secondary transmissions, i.e., the total transmission primary transmission and the secondary queue should time will be reduced to T −T . benonempty.Theexpressionsforthearrivalratesfollow SF directly from (6) and (8) and are given by 3 PROBLEM FORMULATIONS N We startthe performanceanalysis of the differentproto- λp,k=πp,◦Pp,pd Pp,kfp,k ρ(np) Pp,vfp,v . (10) cols with the case of perfect spectrum sensing; then we (cid:20) XΠn vvY6==k1 (cid:21) mv<mk consider spectrum sensing errors in the next section. and N 3.1 AverageArrivalandServiceRates 3.1.1 OrderedAcceptance λs,k=πs,◦πp,◦Ps,sd(cid:20)Ps,kfs,kXΠn ρ(ns) vvY6==k1 Ps,vfs,v(cid:21). (11) Consider the primary queue first. A packet can be mv<mk servedin either one of the following events: the channel For a relay to transmit, both the primary and sec- between PU and PD is not in outage; or the primary ondaryqueues should be empty. Relay k transmits from channel is in outage and one of the relays decodes Q with probability α and from Q with probability p,k k s,k correctly and accepts the packet. Note that for relay 1−α . The average service rates, µ and µ , of Q k p,k s,k p,k k to get the primary packet, all the relays having a and Q at relay k, respectively, are given by s,k higher priority in accepting the packetshould either fail to receive the packet correctly due to channel outage, µp,k=ωkπp,◦πs,◦αkPk,pd, (12) or reject the packet. Hereinafter, we adopt the notation µs,k=ωkπp,◦πs,◦ 1−αk Pk,sd x=1−x.The averageservicerate ofthe primaryqueue We can upper bound the (cid:0)mean(cid:1)service rate of the is given by primaryqueueasfollows.Themaximumservicerateoc- N curswhenallrelaysdecidetoacceptthe primarypacket µp =Pp,pd+Pp,pd Pp,kfp,k eachtimeslot,i.e.,fp,k =1∀k,regardlessofthedecoding Xk=1(cid:20) orderdistribution.4 In this case, the meanservice rate of N (6) × ρ(np) Pp,vfp,v . 4.This is because, in any arbitrary slot, each relay, whatever its XΠn mvvvY<6==km1k (cid:21) dit,ecifotdhienglorwaenrkr,awniklledatrteelmaypstftaoildinecdoedceodthinegpirtimduaerytopcahckanetnealnsdouatdamgeit. 6 theprimarynodebecomestheprobabilitythatoneofthe N P β ≤max P ,P ,...,P , and receivingnodes’channelsisnotinoutage.Therefore,the k=1 p,k k (cid:26) p,1 p,2 p,N(cid:27) P maximummeanservicerateoftheprimaryqueueunder N strategy SOD is µp ≤Pp,pd+Pp,pd Pp,kβk N Xk=1 µmpax =1−Pp,pd Pp,v (13) ≤Pp,pd+Pp,pdmax Pp,1,Pp,2,...,Pp,N (18) v=1 (cid:26) (cid:27) Y where 1−Pp,pd Nv=1Pp,v is the probability that either =1−Pp,pdmin Pp,1,Pp,2,...,Pp,N =µmpax the PD or one ofQthe relays decodes the primary packet (cid:26) (cid:27) where max{·} and min{·} return the maximum and the correctly. Similarly, the maximum mean secondary ser- minimumofallthevaluespresentintheirarguments,re- vice rate under strategy S is OD spectively. The maximum mean primary and secondary N service rates are µms ax = 1−Ps,sd Ps,v π˜p,◦ (cid:20) vY=1 (cid:21) (14) µmpax=1−Pp,pdmin Pp,1,Pp,2,...,Pp,N (19) N =(cid:20)1−Ps,sdv=1Ps,v(cid:21)"1−1−Pp,pdλpNv=1Pp,v# and (cid:26) (cid:27) Y wthheeprerimπ˜pa,r◦y=qu1eu−e1b−ePinp,gpdλeQpmNv=p1tyPp,wvhiesnQthµe =proµbmaabxilwithyicohf µms ax=(cid:20)1−Ps,sdmin(cid:26)Ps,1,Ps,2,...,Ps,N(cid:27)(cid:21) upper bounds π . p p × 1− λp (20) p,◦ (cid:20) 1−Pp,pdmin Pp,1,Pp,2,...,Pp,N (cid:21) (cid:26) (cid:27) 3.1.3 RoundRobinDecoding In S , each relay is assigned the decoding role with RR 3.1.2 RandomAssignmentDecoding equal probability, i.e., 1/N, in a cyclic manner. The expressionsarethussimilartoS withthesubstitution RD β =1/N.Asintheprevioussubsectionandwithsetting k In SRD, the kth relay is scheduled to decode the trans- βk = 1/N, we can obtain the maximum mean service mitted packet with probability βk. Hence, the average rates of the primary and secondary queues under strat- service rates of the PU and the SU are given by egy S . The maximum mean primary and secondary RR service rates are N µp =Pp,pd+Pp,pd Pp,kfp,kβk, µmax =1−P 1− Nv=1Pp,v (21) Xk=1 (15) p p,pd N N (cid:18) P (cid:19) µs =πp,◦ Ps,sd+Ps,sd Ps,kfs,kβk . and (cid:18) Xk=1 (cid:19) N P Theaveragearrivalratestotherelayingqueuesaregiven µms ax = 1−Ps,sd 1− v=N1 s,v (cid:20) (cid:18) P (cid:19)(cid:21) by λ (22) × 1− p . λλps,,kk ==PPsp,,spddPPs,kp,fksf,kpβ,kkβπksπ,◦pπ,◦p,,◦. (16) " 1−Pp,pd(cid:18)1− PNv=N1Pp,v(cid:19)# The average service rates of the relaying queues are Theorem 1. The queue service rates of SOD always outper- the same as in the ordered acceptance case. The mean form the queue service rates of SRD and SRR for a network service rate of the primary queue is upper bounded as with N relays if the feedback duration per relay is negligible. follows. The mean service rates of the primary queue Proof:Theproofforthistheoremunderperfectsens- under strategy S can be upper bounded as follows. RD ing and imperfect sensing (sensing errors) is presented N in Appendix A. µ =P +P P f β p p,pd p,pd p,k p,k k Proposition 1. The SU’s maximum mean service rate, µ∗, Xk=1 (17) s N for an arbitrary decoding strategy is given by ≤E P +P P β , p,pd p,pdXk=1 p,k k µ∗s =1−λp. (23) wheretheinequalityE holdswithequalitywhenfp,k =1 Proof: Regardless of decoding strategy, the sec- for all relays. Since Pp,k belongs to the convex set [0,1] ondary average service rate can be always upper N and βk ∈ [0,1] is a convex set with k=1βk = 1, bounded by the probability of the PU’s queue being N then k=1Pp,kβk isaconvex hullwithmPaximumvalue empty assuming that when the PU is idle due to its locatePd at the edges, i.e., at βk ∈ {0,1}. Accordingly emptyqueue,theSUcansuccessfullytransmititspacket 7 withprobabilityone. Thiscanbe expressedasµ ≤π . relays’ queues to be stable. The total number of opti- s p,◦ Since the probability of the PU being empty is π = mization parameters in case of ordered acceptance is p,◦ 1− λp ≤1−λ , then µ ≤1−λ . 2N!+4N. µp p s p It is worth noting that the optimization problems are solved at a controller which then supplies the required 3.2 AverageQueueingDelayAnalysis informationtotherelaystations.Theoptimalparameters Since all network queues are decoupled, the jth queue are functions of many parameters such as the channels Q queueing delaywhen itis stable, is given by [4], [16] j outage between all nodes in the network (based on 1−λ the expression in (3), the channel outage between any j D = (24) j µ −λ two nodes is a function of the packet length, channel j j bandwidth, SNR, time slot duration, and many other where j ∈ p,s,(p,k),(s,k) and µ > λ . The end- parameters), primary and secondary arrivals rate, delay j j (cid:26) (cid:27) constraints, number of relays, misdetection probability, to-end mean queueing delay is the average delay that and false alarm probability at each relay. Thus, we any packet experiences from its arrival at the source note that for a given system’s parameters, the optimal queue till it arrives at the destination. In our system, parameters are fixed as far as these parameters remain each packet arriving at Q experiences on the average ℓ constant. Once the optimal parameters are obtained, delayofD timeslots,whereℓ∈{p,s}.Further,apacket ℓ the controller generates a long sequence of decoding has an additional delayD if it reachesthe destination ℓ,k orders and time slot accessing distribution over time through relay k. Since, on the average, the probability slots to be supplied to the relay stations during the that a packet serviced from Q is buffered at the kth ℓ whole operational time of the system. This occurs all relay before reaching its destination is λℓ,k, the average λℓ at once before the actual operation of the system. The queueing delays of the primary and secondary packets optimal acceptance probabilities of users’ packets at the are given by relay stations and the probability of selecting one of the N N relaying queues over the other for a given time slot are λ D λ D Dp(T)=Dp+Pk=1λp,k p,k, Ds(T)=Ds+Pk=1λs,k s,k. all generated locally at each relay station. However, the p s values of the probabilities are also supplied to the relay (25) stations by the controller all at once before the actual A similar approach for computing the end-to-end delay operation of the system. is found in [17]–[19]. This optimization problem and the others presented in this work are solved numerically Specifically, we 3.3 OptimizationProblems use Matlab’s fmincon as in [20]–[26] and the references 3.3.1 SecondaryThroughputMaximization therein. Our first optimization problem is concerned with the Now, we investigate the case in which all relays are constrained maximization of the secondary average ser- set to accept the users’ undelivered packets every time vice rate given λp, λs and N subject to predefined slot. Precisely, fp,k = fs,k = 1 for all k. Moreover, we tolerableend–to–endmeanqueuingdelayconstraintsfor assumethattheprobabilityofselectingarelayingqueue the primary and secondary packets. Under the ordered fortransmissionis1/(2N)where2N isthe totalnumber acceptancestrategy, SOD, the maximum secondaryaver- of possibilities. According to the above case, µp = µmpax ageserviceratecanbeobtainedbysolvingthefollowing in (13), µ = µmax in (14), π = 1 −λ /µmax, π = s s p,◦ p p s,◦ problem: 1−λ /µmax, s s max µs N α,fp,fs,ω,ρ(p),ρ(s) λp,k=πp,◦Pp,pd Pp,k ρ(np) Pp,v , (27) s.t. Ds(T) ≤Ds(T),Dp(T) ≤Dp(T), (cid:20) XΠn vvY6==k1 (cid:21) λ <µ , λ <µ , λ <µ , λ <µ mv<mk s s p p p,k p,k s,k s,k and 0≤α,f ,f ≤1, p s N 0≤ω,ρ(p),ρ(s), λs,k=πs,◦πp,◦Ps,sd Ps,k ρ(ns) Ps,v . (28) kωk1,kρ(p)k1,kρ(s)k1 =1 (cid:20) XΠn vvY6==k1 (cid:21) (26) mv<mk whereD(T) <∞isthemaximumtolerableprimaryend– The relaying queues’ mean service rates become con- p to–endmeanqueueingdelay,D(T) <∞isthemaximum stants. That is, s tolerable secondary end–to–end mean queueing delay, 1 the notation a ≤ x is an element wise condition on µp,k=2Nπp,◦πs,◦Pk,pd, (29) vector x implying that a ≤ x and kxk is the l –norm 1 of the vector x defined as kxkk = 1|x| . The1 delay µs,k=2Nπp,◦πs,◦Pk,sd. 1 k k constraintsimplicitlyrequiretheprimPary,secondaryand Theoptimizationproblemisaconvexfeasibilityproblem 8 which can be solved efficiently [27]. We note that the It can be solved as follows: objective function is constant. Moreover, Dp and Ds N 1 are constants. We need to prove the convexity of the max π P +P P =constant p,◦ s,sd s,sd s,k constraints Ds(T) ≤ Ds(T), Dp(T) ≤ Dp(T), λp,k < µp,k, and zk,yk∀k (cid:18) N kX=1 (cid:19) λs,k < µs,k. From (27), (28) and (29), λp,k < µp,k and s.t. λp,k <zkπp,◦πs,◦Pk,pd, λs,k <ykπp,◦πs,◦Pk,sd λs,k < µs,k are linear in ρ(np) and ρ(ns).The second term 0≤zk,yk ≤1, ofthe queueingdelaysDp(T) andDs(T), PNk=1λλpp,kDp,k and 0≤zk,yk, PNk=1λs,kDs,k,respectively,areconvexifeachoftheterms N insideλsthesummationisconvex.Thus,we needtoprove (zk+yk)=1 the convexity of λjDj, j ∈ {(p,k),(s,k)}. The second Xk=1 derivative of D = λ 1−λj with respect to λ is given (33) j jµj−λj j with λs <µs and λp <µp. The feasible values of zk and by y are k ∂2Dj =2µj(1−µj) ≥0. (30) λ λ N ∂λ2j (µj−λj)3 p,k <zk, s,k <yk, (zk+yk)=1 π π P π π P Since the second derivative is positive for µ ≥ λ p,◦ s,◦ k,pd p,◦ s,◦ k,sd kX=1 j j (34) (stability constraint) and µ ≤ 1, the delay constraint is j convex over λ . j If the usersaredelaysensitive, the optimization prob- lem can be shown to be a convex feasibility problem. ForS ,themaximumsecondaryaverageservicerate RD We note that λ , λ , µ , and µ are constants with p,k s,k s p can be obtained by solving the following optimization respect to the optimization variables, ω and α . The k k probmleamx: µs itnersmidePthNk=e1sλλuss,mkDms,katiisoncoinsvceoxnvoevxeroµvjerifµeja.cThhoufs,thweetenremeds α,f ,f ,ω,β p s toprovetheconvexityofλ D .Thesecondderivative s,k s,k s.t. Ds(T) ≤Ds(T),Dp(T) ≤Dp(T), of Dj =λjµ1j−−λλjj with respect to µj is given by λ <µ , λ <µ , λ <µ , λ <µ s s p p p,k p,k s,k s,k 0≤α,f ,f ≤1, ∂Dj =2λj(1−λj) ≥0. (35) p s ∂µj (µj−λj)3 0≤ω,β, Since the second derivative is positive, the delay con- kωk1,kβk1 =1. straint is convex over µj. We solve the problem with (31) respect to z and y then we get the values of ω and k k k The totalnumber ofoptimization parametersinthe case α . k of random decoding is 5N. It should be noticed that the total number of opti- ForSRR,themaximumsecondaryaverageservicerate mization parameters is a reflection of both the degrees can be obtained by solving an optimization problem of freedom and the degree of complexity of the system. similar to (31) with all elements of β equal to 1/N. The Therefore, the ordered acceptance is considered as the optimization problem is stated as follows: strategy with the highest degrees of freedom and the highestcomplexityamongtheproposedstrategiesinthis paper. On the other hand, round robin is the simplest max µs strategyamongtheproposedstrategiesanditneedsless α,f ,f ,ω p s cooperation between the relays than other strategies; it s.t. Ds(T) ≤Ds(T),Dp(T) ≤Dp(T), is a cyclic switching operation shared among relays. λ <µ , λ <µ , λ <µ , λ <µ s s p p p,k p,k s,k s,k 0≤α,f ,f ≤1, p s 0≤ω, kωk =1. 1 (32) The total number of optimization variables is equal to 3.3.2 NumberofRelaysMinimization 4N. Consider the case f = f = 1. Let z = α ω and s,k k,p k k k yk = (1 − αk)ωk with zk + yk = ωk. If the queueing Our second formulation is to minimize the number of delay requirements are large, i.e., Dp(T) = Ds(T) = ∞, relays,N,neededtoachievecertaindelayorservicerate which means that the users are delay insensitive, then requirements for the users. Given λ and λ and under p s theoptimizationproblemisaconvexfeasibilityproblem. the ordered acceptance strategy, S , the optimization OD 9 problem is given by P(pk). Sensing false alarms have probability Pk . All MD FA relays are adjusted on the receiving mode and attempt min N to decode the transmitter packet. The relay scheduled α,f ,f ,ω,ρ(p),ρ(s) p s for transmission is the only relay that decides after 2τ s.t. D(T) ≤D(T),D(T) ≤D(T), s s p p seconds relative to the beginning of the time slot about λ <µ ,λ <µ ,λ <µ ,λ <µ s s p p p,k p,k s,k s,k the state of the time slot: busy or free. If the slot is 0≤α,f ,f ≤1, sensed tobe free,thatrelayswitches tothe transmission p s 0≤ω,ρ(p),ρ(s), mode and start retransmission of one of the packets in its relaying queues. If the channel is sensed to be busy kωk ,kρ(p)k ,kρ(s)k =1. 1 1 1 over either interval, the relay continues in the receiving (36) mode. Upon decoding, the relay will be able to identify In case of S , the minimum number of relays required RD the packet’s origin from the identifier attached to the in the network is given by the following optimization packet and will use the appropriate decoding order in problem: case of order decoding. In case of random decoding min N or round robin decoding, one of the relay stations is α,fp,fs,ω,β assigned the decoding task in each time slot. Based on s.t. D(T) ≤D(T),D(T) ≤D(T), the above, the service rates of the users’ queues and the s s p p arrivalratesof the relayingqueues under sensing errors λ <µ , λ <µ , λ <µ , λ <µ s s p p p,k p,k s,k s,k are only affected by the activity of the relay scheduled 0≤α,f ,f ≤1, p s for transmission. The reduction of the mean service and 0≤ω,β, arrival rates is equal to ω B(ℓr), where B(ℓr) denotes r r kωk1,kβk1 =1. thecomplementoftheprPobabilitythatrelayr,scheduled (37) for transmission, erroneously finds the time slot free ForSRR,weconstructanoptimizationproblemsimilar given there is an active transmission from user ℓ. to (37) with all elements in β being set to 1/N. Now we compute B(ℓr) for both users. The relay r scheduled for transmission disrupts the primary if 4 THE CASE OF SENSING ERRORS it fails to detect the activity of the PU during both sensing intervals. That is, the probability that the rth We address here the specific scenario of a strong sens- relay detects the time slot as a busy slot due to activity ing channel between the PU and the SU and consider of PU is B(pr) = (1−P(pr)P(pr)).6 The probability that sensing errors at the relay stations. In other words, we MD MD the relay r scheduled for transmission does not disrupt assume that the sensing errors at the SU are negligible, the secondary activity is equal to the probability that whereas spectrum sensing at the relays may generate the relay either detects the secondary transmission, or erroneous sensing results that should be accounted for. falsely finds the PU to be active while it is not. In either To render the problem tractable and avoid the difficulty case, it will abstain from transmission, thereby avoiding of queue interaction due to sensing errors, we impose collision with the secondary transmission. Thus, the the assumption that Q and Q are never empty. s,k p,k Specifically, when either Qs,k or Qp,k is empty, the kth probability is given by B(sr) = 1−PM(sDr) 1−PFrA . relay sends dummy packets.5 The dummy packets do Accordingly, we have the followin(cid:16)g set of (cid:2)arrival a(cid:3)n(cid:17)d not contribute to the service rates of Q and Q service rates: s,k p,k but cause interference during concurrent transmission with the primary and secondary terminals. Based on N this assumption, the relay scheduled for transmission µ(ℓSE)=µℓ ωr B(ℓr), ℓ∈{p,s} (38) couldcauseinterferencewiththeprimaryandsecondary r=1 X transmissions, when it misdetects their transmissions, even if it is empty in the original system. Accordingly, N the service rates of the primary and secondary queues λ(ℓS,kE) =λℓ,k ωr B(ℓr), ℓ∈{p,s} (39) are reduced, and the probability of having any of them r=1 X emptyisreducedaswell.Consequently,theservicerates of the relays are reduced. Therefore, our results provide µ(SE)=µ 1−Pk 2, ℓ∈{p,s} (40) lower bounds on the primary, secondary and relays ℓ,k ℓ,k FA service rates. where µ(SE), λ(SE) and(cid:0)µ(SE) ar(cid:1)e the rates of users and ℓ ℓ,k ℓ,k The kth relay scheduled for transmission at a slot relays in the case of sensing error and µ , λ and ℓ ℓ,k misdetects the SU’s transmission with probability P(sk) µ are the rates of users and relays in the case of MD ℓ,k and misdetects the PU’s transmission with probability 5.The assumption of a node sending dummy packets when it is 6.As mentioned in Section 2, we assume in this paper that if two emptyhasbeenconsideredinmanyworks(see,forexample,[4],[6], terminals transmit simultaneously, their packets cannot be decoded [15],[28]andreferencestherein). correctlyattherespectivereceivers. 10 TABLE1 N=0 Relayschannelsoutageprobabilities whereN =5and 0.9 Ordered acceptance τ =0. Upper bound f Random assignment decoding 0.8 Round robin decoding Relay-SD Relay-PD SU-relay PU-relay P1,SD =0.1 P1,PD =0.1 Ps,1 =0.1 Pp,1 =0.1 0.7 P =0.1 P =0.1 P =0.1 P =0.02 2,SD 2,PD s,2 p,2 P3,SD =0.2 P3,PD =0.2 Ps,3 =0.02 Pp,3 =0.2 µs0.6 P =0.1 P =0.01 P =0.1 P =0.1 4,SD 4,PD s,4 p,4 P =0.01 P =0.01 P =0.01 P =0.01 5,SD 5,PD s,5 p,5 0.5 0.4 perfect sensing.7 We note that the term 1 − Pk 2 in FA (40) represents the probability that the k(cid:0)th relay (cid:1)finds 0.30. 1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 the time slot free from transmissions. This equals the λ p probability that the sensor of relay k does not generate false alarm over both sensing intervals. Fig. 3. Optimal secondary average service rate versus To obtain the optimal secondary average service rate theprimaryaveragearrivalrate,λp. in case of sensing errors, we construct an optimization problemsimilarto(26)and(31).Fortheminimumnum- ber of relays needed to achieve certain QoS constraints, 1 weconstructanoptimizationproblemsimilarto(36)and (37). 0.998 5 NUMERICAL RESULTS 0.996 p In this section, we provide some numerical results for µ theoptimizationproblemsconsideredinthispaper.Figs. 0.994 3 and 4 demonstrate the case of negligible feedback Ordered acceptance duration, i.e., τ = 0, and low outage probabilities for f 0.992 Random assignment decoding the PU-PD and the SU-SD direct links: P = 0.2 and s,sd Round robin decoding P = 0.1. The figures are generated using N = 2, p,pd λs = 0.1 packets per time slot, Dp(T) ≤ 1.6 time slots, 0.990 0.1 0.2 0.3 0.4 0.5 (T) λ Ds ≤ 3 time slots, λs = 0.2 packets per time slot, and p the outage probabilities given in the first two lines of Table 1. As evident from Fig. 3, the ordered acceptance Fig. 4. Primary average service rate versus λ for the p strategy with two relays almost achieves the upper sameparametersusedtogenerateFig.3. bound on the secondary average service rate, which is equal to 1−λ . Random assignment and round robin p decoding give almost the same performance for the averageservicerateoftheSU(maximumµ )approaches s parametersused inthe simulation. Theprimaryaverage the upper bound. service rate, as shown in Fig. 4, is constant and almost Figs. 6 and 7 also show the case of τ = 0, but this unity for the proposed decoding strategies compared to f time there are no direct links between the PU and the 1−P = 0.9 when no relays are used. The primary p,pd SU and their respective receivers. That is, P = 1 mean service rate is constant because the solution of the s,sd and P = 1. The parameters used to generate these optimization problemmakes µ =µmax (see expressions p,pd p p figures are: τ = 0, N = 2, λ = 0.1 packets per time (13), (19), and (21)). f s slot, D(T) ≤ 25, D(T) ≤ 25, and the outage probabilities Fig. 5 reveals the impact of increasing the number p s given in the first three lines of Table 1. Note that in this of relays on the optimal secondary average service rate case relaying is essential since without cooperation (no for S with τ = 0. This figure is generated using RD f relays),theprimaryservicerateisequalto1−P =0 P = 0.3 and P = 0.4, λ = 0.2 packets per time p,PD s,sd p,pd s slot, Dp(T) ≤ 5 time slots, Ds(T) ≤ 10 time slots, and abnacdkbloogtghetdheanpdrimuanrsytaabnledasnecdonpdaacrkyetqsuaerueesneavreeralbweainygs the outage probabilities given in Table 1. As shown in served.Hence,thequeueingdelayofeachuserisinfinity. the figure, when the number of relays, N, increases, the Fig. 8 represents the solution of the optimization problems (36) and (37), which is the number of relays 7.Thesevaluesdependonthedecodingstrategyusedasexplained earlier. requiredtoachievespecificQoSrequirementsforthePU