Optimal Random Access and Random Spectrum Sensing for an Energy Harvesting Cognitive Radio

We consider a secondary user with energy harvesting capability. We design access schemes for the secondary user which incorporate random spectrum sensing and random access, and which make use of the primary automatic repeat request (ARQ) feedback. The sensing and access probabilities are obtained such that the secondary throughput is maximized under the constraints that both the primary and secondary queues are stable and that the primary queueing delay is kept lower than a specified value needed to guarantee a certain quality of service (QoS) for the primary user. We consider spectrum sensing errors and assume multipacket reception (MPR) capabilities. Numerical results are presented to show the enhanced performance of our proposed system over a random access system, and to demonstrate the benefit of leveraging the primary feedback.


I. INTRODUCTION
Cognitive radio technology provides an efficient means of utilizing the radio spectrum [1].The basic idea is to allow secondary users to access the spectrum while providing certain guaranteed quality of service (QoS) performance measures for the high-priority licensed primary users (PUs).The secondary user is a battery-powered device in many practical situations and its operation, which involves spectrum sensing and access, is accompanied by energy consumption.Consequently an energy-constrained secondary user must optimize its sensing and access decisions to efficiently utilize the energy at its disposal.An emerging technology for energy-constrained terminals is energy harvesting which allows the terminal to gather energy from its environment.An overview of the different energy harvesting technologies is provided in [2] and the references therein.
Data transmission by an energy harvesting transmitter with a rechargeable battery has got a lot of attention recently [3]- [10].The optimal online policy for controlling admissions into the data buffer is derived in [3] using a dynamic programming framework.In [4], energy management policies which stabilize the data queue are proposed for single-user communication and some delay-optimal properties are derived.Throughput optimal energy allocation is investigated in [5] for energy harvesting systems in a time-constrained slotted setting.In [6], [7], minimization of the transmission completion time is considered in an energy harvesting system and the optimal solution is obtained using a geometric framework.In [8], energy harvesting transmitters with batteries of finite energy storage capacity are considered and the problem of throughput maximization by a deadline is solved for a static channel.The authors of [9] consider the scenario in which a set of nodes shares a common channel.The PU has a rechargeable battery and the secondary user is plugged to a reliable power supply.They obtain the maximum stable throughput region which describes the maximum arrival rates that maintain the stability of the network queues.In [10], the authors investigate the effects of network layer cooperation in a wireless threenode network with energy harvesting nodes and bursty traffic.
In this work, we develop spectrum sensing and transmission methods for an energy harvesting secondary user.We leverage the primary automatic repeat request (ARQ) feedback for secondary access.Due to the broadcast nature of the wireless channel, this feedback can be overheard and utilized by the secondary node assuming that it is unencrypted.The problem with depending on spectrum sensing only is that sensing does not inform the secondary terminal about its impact on the primary receiver.This issue has induced interest in utilizing the feedback from the primary receiver to the primary transmitter to optimize the secondary transmission strategies.For instance, in [11], the secondary user observes the ARQ feedback from the primary receiver as it reflects the PU's achieved packet rate.The secondary user's objective is to maximize its throughput while guaranteeing a certain packet rate for the PU.In [12], the authors use a partially observable Markov decision process (POMDP) to optimize the secondary action on the basis of the spectrum sensing outcome and primary ARQ feedback.Secondary power control based on primary feedback is investigated in [13].In [14], the optimal transmission policy for the secondary user when the PU adopts a retransmission based error control scheme is investigated.The policy of the secondary user determines how often it transmits according to the retransmission state of the packet being served by the PU.
Our contributions in this paper can be summarized as follows.We investigate the case of a secondary user equipped with an energy harvesting mechanism and a rechargeable battery.We propose a novel access and sensing scheme where the secondary user possibly senses the channel for a certain fraction of the time slot duration and accesses the channel with some access probability that depends on the sensing outcome.The secondary user may access the channel probabilistically without sensing in order to utilize the whole slot duration for transmission.We assume multipacket reception (MPR) capability added to the physical layer of the receiving nodes.We maximize the secondary throughput such that the primary There is a feedback channel between the primary receiver (PR) and the PU to acknowledge the reception of data packets.This feedback channel is overheard by the secondary transmitter.Both the PR and the secondary receiver (SR) may suffer interference from the other link.and secondary queues are stable.The optimization problem to get the various probabilities also includes a constraint on the maximum tolerable primary queueing delay.Finally, we compare our system with the random access system.The numerical results show the gains of our proposed systems in terms of the secondary user throughput.
The rest of the paper is organized as follows.In the next section, we discuss secondary access without incorporating the primary feedback.In Section III we discuss the feedbackbased scheme.We provide numerical results in Section IV and conclude the paper in Section V.

A. System Model
We consider the system model shown in Fig. 1.The model consists of one PU and one secondary user.The channel is slotted in time and a slot duration equals the packet transmission time.The PU and the secondary user have infinite buffer queues, Q p and Q s , respectively, to store fixed-length data packets.If a terminal transmits during a time slot, it sends exactly one packet to its receiver.The arrivals at Q p and Q s are independent and identically distributed (i.i.d.) Bernoulli random variables from slot to slot with means λ p and λ s , respectively.
The secondary user has an additional energy queue, Q e , to store harvested energy from the environment.The arrival at the energy queue is also Bernoulli with mean λ e and is independent from arrivals at the other queues.The Bernoulli model is simple, but it captures the random availability of ambient energy sources.It is assumed that the transmission of one data packet consumes one packet of energy.Adequate system operation requires that all the queues are stable.We employ the standard definition of stability for queue as in, e.g., [15], that is, a queue is stable if and only if its probability of being empty does not vanish as time progresses.
Instead of the collision channel model where simultaneous transmission by different terminals leads to sure packet loss, we assume that the receivers have multipacket reception (MPR) capability as in [16]- [18].This means that transmitted data packets can survive the interference caused by concurrent transmissions if the received signal to interference and noise ratio (SINR) exceeds the threshold required for successful decoding at the receiver.With MPR capability, the secondary user may use the channel simultaneously with the PU.
The PU accesses the channel whenever it has a packet to send.The secondary transmitter, given that it has energy, senses the channel or possibly transmits the packet at the head of its queue immediately at the beginning of the time slot without sensing the channel.We explain below why direct transmission can be beneficial for system performance.
The secondary user operation can be summarized as follows.
• If the secondary terminal's energy and data queues are not empty, it senses the channel with probability p s from the beginning of the time slot for a duration of τ seconds to detect the possible activity of the PU.If the slot duration is T , τ < T .
• If the channel is sensed to be free, the secondary transmitter accesses the channel with probability p f .If the PU is detected to be active, it accesses the channel with probability p b .
• If at the beginning of the time slot the secondary user decides not to sense the spectrum (which happens with probability 1 − p s ) it immediately decides whether to transmit with probability p t or to remain idle for the rest of the time slot with probability 1 − p t .
This means that the transmission duration is T seconds if the secondary user accesses the channel without spectrum sensing and T − τ seconds if transmission is preceded by a sensing phase.We assume that the energy consumed in spectrum sensing is negligible, whereas data transmission dissipates exactly one unit of energy from Q e .
We study now secondary access in detail to obtain the mean service rates of queues Q s , Q e and Q p .The meaning of the various relevant symbols are provided in Table I.For the secondary terminal to be served, its energy queue must be nonempty.If the secondary user does not sense the channel, which happens with probability 1 − p s , it transmits with probability p t .If the PU's queue is empty and, hence, the PU is inactive, secondary transmission is successful with probability P out,0s , whose expression as a function of the secondary link parameters, transmission time T , and the data packet size is provided in Appendix A. If Q p = 0 and the PU is active, the success probability is P (c) out,0s (see Appendix B).If the secondary user decides to sense the channel, there are four possibilities depending on the sensing outcome and the state of the primary queue.If the PU is sensed to be free, secondary transmission takes place with probability p f .This takes place with probability 1 − P FA if the PU is actually silent.In this case, the probability of successful secondary transmission is P out,1s , which is lower than P out,0s as proven  in Appendix C. On the other hand, if the PU is on, the probability of detecting the channel to be free is P MD and the probability of successful secondary transmission is P (c) out,1s .If the channel is sensed to be busy, the secondary terminal transmits with probability p b .Sensing the PU to be active occurs with probability P FA if the PU is actually inactive, or with probability 1−P MD if the PU is actively transmitting.The probability of successful secondary transmission is P out,1s when the PU is silent and P (c) out,1s when the PU is active.Given these possibilities, we can write the following expression for the mean secondary service rate.
Based on the above analysis, it can be shown that the mean service rate of the energy queue is A packet from the primary queue can be served in either one of the following events.If the secondary user is silent because either of its data queue or energy queue is empty, the primary transmission is successful with probability P out,p .If both secondary queues are nonempty, secondary operation proceeds as explained above.In all cases, if the secondary user does not access the channel, the probability of successful primary transmission is P out,p , else it is P (c) out,p .Therefore,

B. Backlogged Secondary User
Since the queues are interacting with each other, the exact analysis of the system is infeasible.In order to make the queueing analysis tractable, we make the following two approximations.We assume that a dummy data packet is transmitted from Q s when it is empty.That is, we assume a backlogged secondary user who always has data packets to transmit.In addition, we assume, as in [9], that one energy packet is consumed at each time slot regardless of actual secondary activity.The first approximation reduces the primary throughput as it eliminates the possibility of an empty secondary queue, which corresponds to an interference-free situation for the PU and a reduced outage probability.The second approximation means that the energy queue empties faster than in the actual system, thereby lowering the probability that the queue is nonempty.This reduces the secondary throughput by increasing the probability that the secondary node does not have energy.Therefore, our approximations, for each value of λ p , result in a lower bound on the secondary service rate or throughput.
Under the aforementioned assumption, the probability of the energy queue being nonempty is λ e [9].This is because µ e = 1 and the probability of the energy queue being empty is 1 − λe µe .The average data service rate of Q p is given by The Markov chain modeling the primary queue is provided in Fig. 2. Solving the state balance equations, it is straightforward to show that the probability that the primary queue has k packets is where λ p = 1 − λ p and µ p = 1 − µ p .Using the condition For the sum ∞ k=0 ν k to exist, we should have λ p < µ p .This is equivalent to Loynes' theorem which states that if the arrival and service processes of a queue are strictly stationary processes, then the queue is stable if and only if the mean arrival rate is less than the mean service rate [19].

C. Primary User Packet Delay
Let D p be the average delay of the primary queue.Using Little's law and (6), For the optimal random access and sensing, we solve the following constrained optimization problem.We maximize the mean secondary service rate under the constraints that the primary queue is stable and that the primary packet delay is smaller than or equal a specified value D p .The optimization problem with µ p given in (4) and µ s in ( 5) can be written as This optimization problem and the others presented in this work are solved numerically1 .

III. FEEDBACK-BASED ACCESS
In this section we analyze the use of the primary feedback messages by the cognitive terminal.In the feedback-based access scheme, the secondary user utilizes the available primary feedback information for accessing the channel in addition to spectrum sensing.Leveraging the primary feedback is valid when it is available and unencrypted.
In the proposed scheme, the secondary user monitors the PU feedback channel.It may overhear an acknowledgment (ACK) if the primary receiver correctly decodes the primary transmission, a negative acknowledgment (NACK) if decoding fails, or nothing if there is no primary transmission.We introduce the following modification to the protocol introduced earlier in the paper.If a NACK is overheard by the secondary user, it assumes that the PU will retransmit the lost packet during the next time slot [20].Being sure that the PU will be active, the secondary terminal does not need to sense the channel to ascertain the state of primary activity.Therefore, it just accesses the channel with some probability p r .If an ACK is observed on the feedback channel or no primary feedback is overheard, the secondary user proceeds to operate as explained earlier in Section II.We assume the feedback packets are very short compared to T and are always received correctly by both the primary and secondary terminals due to the use of strong channel codes.
It is important to emphasize here the benefit of employing primary feedback.By avoiding spectrum sensing, the secondary terminal does not have to waste τ seconds for sensing.It can use the whole slot duration for transmission.As proven in Appendix C, this reduces the outage probability of the secondary link.Therefore, by differentiating between the primary states of transmission, i.e., whether they are following  the reception of an ACK or not, the secondary user can potentially enhance its throughput by eliminating the need for spectrum sensing when the PU is about to retransmit a previously lost packet.

A. Queueing Analysis with a Backlogged Secondary User
The PU's queue evolution Markov chain is shown in Fig. 3.The probability of the queue having k packets and transmitting for the first time is π k , where F in Fig. 3 denotes first transmission.The probability of the queue having k packets and retransmitting is ǫ k , where R in Fig. 3 denotes retransmission.Define α p as the probability of successful transmission of the PU's packet in case of first transmission and Γ p is the probability of successful transmission of the PU's packet in case of retransmission.It can be shown that both probabilities are given by: Solving the state balance equations, we can obtain the state probabilities which are provided in Table II.The probability π 0 is obtained using the normalization condition It should be noticed that λ p < η, where η is defined in Table II, is a condition for the sum condition ensures the existence of a stationary distribution for the Markov chain and guarantees the stability of the primary queue.The service rate of the secondary user is given by: where the probability summations are given in Table II.

B. Primary User Packet Delay
Applying Little's law, the primary queueing delay is given by Using the state probabilities provided in Table II, For a fixed λ p , the maximum mean service rate for the secondary user is given by solving the following optimization problem using expression (12) for µ s max ps,p f ,pt,p b ,pr µ s s.t.0 ≤ p s , p f , p t , p b , p r ≤ 1 IV. NUMERICAL RESULTS We provide here some numerical results for the optimization problems presented in this paper and compare with a random access system without spectrum sensing.A random access scheme is simply obtained from the schemes described in this paper by setting p s to zero.We define here two variables  and 6, respectively.The figures show clearly the advantage of employing random sensing and access over a purely random access system.Moreover, the benefit of leveraging the primary feedback is evident from the figures.Fig. 5 provides the optimal sensing and access probabilities corresponding to the proposed scheme employing feedback in Fig. 4.
To facilitate investigating the impact of the specified delay constraint, Fig. 7 provides the effect of varying this constraint on the secondary service rate.As is clear from the figure, the secondary service rate is reduced when the primary queueing delay constraint is more strict.Fig. 8 shows the impact of the energy arrival rate.As expected, the secondary service rate is reduced when λ e decreases.Finally, Fig. 9 shows the impact of the MPR capability.Without MPR capability, collisions are assumed to lead to sure packet loss.Therefore, a collision model without MPR corresponds to the case of the probabilities of correct reception being zero when there are simultaneous transmissions.As shown in Fig. 9, the secondary service rate is reduced when there is no MPR capability.

In this paper, we discussed an energy harvesting cognitive
We proposed a novel sensing/access scheme to enable the secondary user efficiently use its own energy to access and sense the channel.We considered two schemes based on feedback of the primary receiver channel.We compared our results with the random access scheme with and without using the feedback information.The results have shown the benefit of employing the primary feedback in making secondary access decisions.

APPENDIX A
We adopt a flat fading channel model and assume that the channel gains remain constant over the duration of the time slot.We do not assume the availability of transmit channel state information (CSI) at the transmitting terminals.The transmitters adjust their transmission rates depending on when they start transmission during the time slot.Assuming that the number of bits in a packet is b, the transmission rate is where τ is the amount of time spent to sense the channel, τ < T , i = 0 if transmission proceeds at the very beginning of the time slot, and i = 1 if transmission is preceded by a spectrum sensing period of τ units of time.Outage for a secondary user occurs when the transmission rate exceeds the channel capacity where W is the bandwidth of the channel, γ is the received SNR when the channel gain is equal to unity, and β is the channel gain, which is exponentially distributed in the case of Rayleigh fading.
The outage probability can be written as Assuming that the mean value of β is β, Let P out,is = 1 − P out,is be the probability of correct reception.It is therefore given by The probability P out,p for the PU is given by a similar expression with i = 0 as the PU transmits starting from the beginning of the time slot and the relevant primary link parameters.
As is obvious, the probability of correct reception is lowered in the case of interference.

APPENDIX C
We prove here that P out,0j > P out,1j .As a function of τ , P out,1j is given by (20) with i = 1.Let x = 1 − τ T where x ∈ [0, 1].Assuming that the energy unit used per slot is e, the transmit power is e T −τ = e T x .This means that the received SNR γ is inversely proportional to x.The exponent in (20) with i = 1 is thus proportional to g(x) = x(exp( a x ) − 1) where a = b ln 2 W T > 0. Differentiating g(x) with respect to x, the derivative is Therefore, the derivative is always negative.Since x = 1 − τ T , function g(x) increases with τ .This means that P out,1j decreases with τ and its maximum value occurs when the transmission starts at the beginning of the time slot, i.e., τ = 0.This proves that P out,0j > P out,1j for τ > 0. For the case of concurrent transmission given in (23), the numerator is P out,1j , which decreases with τ .The denominator is proportional to g(x) which has been shown to decrease with x and, hence, increase with τ .This means that P

Fig. 1 .
Fig. 1.Primary and secondary queues and links.The PU has data queue Qp, whereas the secondary terminal has data queue Qs and energy queue Qe.There is a feedback channel between the primary receiver (PR) and the PU to acknowledge the reception of data packets.This feedback channel is overheard by the secondary transmitter.Both the PR and the secondary receiver (SR) may suffer interference from the other link.
Probability of direct channel access if the channel is not sensed p f Probability of channel access if the channel is sensed to be free p b Probability of channel access if the channel is sensed to be busy P out,p Probability of successful primary transmission to the primary receiver if the secondary terminal is silentP (c) out,pProbability of successful primary transmission to the primary receiver with concurrent secondary transmission P out,0s Probability of successful secondary transmission if the PU is silent and transmission occurs over T seconds P out,1s Probability of successful secondary transmission if the PU is silent and transmission occurs over T − τ seconds P (c) out,0s Probability of successful secondary transmission if the PU is active and transmission occurs over T seconds P (c) out,1s Probability of successful secondary transmission if the PU is active and transmission occurs over T − τ seconds

Fig. 2 .
Fig. 2. Markov chain of the PU when the secondary user does not use primary feedback.State self-transitions are omitted for visual clarity.Probabilities µp = 1 − µp and λp = 1 − λp.

,
both of them are less than 1 as shown in Appendix C. Figs. 4 and 6 provide a comparison between the maximum secondary rate of our proposed systems and the random access systems.The difference between the two figures is that the delay of the PU is constrained by D p = 2 time slots and D p = 200 time slots in Figs. 4

TABLE I LIST
OF SYMBOLS INVOLVED IN THE QUEUES' MEAN SERVICE RATES.