Abstract
Cognitive radio (CR) has become an efficient approach for the utilization of scarce spectrum by enabling spectrum access in an opportunistic manner. With increasing wireless network service providers, users, and applications, it is indispensable to optimize usage of even parts of the spectrum that are licensed. Dynamic spectrum access (DSA) is an approach which facilitates the opportunistic use of licensed spectra, when they are idle. In this paper, a primary prioritized distributed DSA algorithm using continuous-time Markov chain (CTMC) model is proposed. In a distributed scheme, each secondary user needs to be aware of the statistics—arrival and service rates—of the other secondary users to optimize the throughput while maintaining fairness. A heuristics-based approach is formulated making use of the estimated spectrum idle probability and the interference each user experiences to iteratively update user statistics. This framework is also extended to incorporate the effects of imperfect spectrum sensing in the form of misdetection and false alarms. Simulation results show that the proposed algorithm attains an overall throughput that is better than CSMA when the primary user spectrum utilization is around 45%. The degradation in throughput caused by imperfect sensing over perfect sensing is also analyzed.
1. Introduction
Radio spectrum is a limited source and is completely regulated by authorized bodies such as the Federal Communication Commission (FCC) [1]. CR technology is proposed as an innovative solution for the conflicts between spectrum scarcity in unlicensed bands and low spectrum utilization in licensed bands. In the existing CR terminology, licensed users are called the primary users and unlicensed users are called the secondary users [2]. Secondary users equipped with cognitive capabilities are allowed to share the licensed spectrum only when it is unoccupied. This spectrum occupancy awareness can be achieved by a variety of spectrum sensing algorithms among which the energy detection, matched filtering, and feature detection are popular [3]. Upon identifying the free spectrum, the secondary users can use it for their own communication without causing interference to the primary users. This form of CR dynamic spectrum sharing in which the primary user's spectrum is open to secondary users is called spectrum overlay approach or hierarchical spectrum access [4]. Another approach for CR dynamic spectrum sharing is spectrum underlay in which the primary and secondary users coexist together. In this technique, the secondary users are allowed to use the primary spectrum if it operates below the noise floor level of primary users. Alternatively, CR spectrum sharing techniques can be implemented either cooperatively or in the form of coexistence. In the cooperative scenario, primary user can communicate the spectrum availability to the secondary users and thereby demand payment for the usage [5]. Coexistence approach is essentially the spectrum overlay case where the secondary users identify spectrum holes, occupy it, and hand it over to the primary user when it appears again.
In this context, there are many existing contributions which model the primary user-secondary user interactions for spectrum sharing using Markov models [6–11]. In [6, 7], a CTMC framework is proposed for modeling the interactions between the primary user and the secondary users. The authors evaluated the optimum access probabilities for the secondary users to maximize their throughput and maintain fairness. But their contribution mainly focused on a centralized approach and they do not consider the effects of imperfect spectrum sensing. Alternatively, we propose a distributed approach for DSA and consider the sensing errors for performance evaluation. The authors of [8] proposed spectrum access schemes using Markov chain with optimal channel reservation for secondary users which is particularly a channelization scheme. In [9], the performance of opportunistic spectrum access has been evaluated using a two-dimensional Markov model for a military environment. In [10], a framework based on discrete-time Markov chain is proposed for primary-secondary spectrum sharing. This framework is also a spectrum channelization scheme and included the errors resulting from spectrum sensing for performance evaluation. This model is extended in [11] for flexible spectrum channelization schemes.
Apart from Markovian models, several distributed schemes have been proposed in the literature. In [12], the authors proposed distributed algorithms for learning and cognitive medium access using a multiarmed bandit model. In [13], a game theoretic framework is proposed for distributive adaptive channel allocation. Another distributive approach to optimize the efficiency of spectrum allocation using a local bargaining mechanism is proposed in [14]. Alternatively, we propose a distributed algorithm for DSA using CTMC model.
Thus, in the literature, several dynamic spectrum access schemes showing successful enhanced performance in increasing the spectrum efficiency are found. As CR networks of the future may consist of primary and secondary users belonging to multiple networks operated by different service providers, we look for distributed solutions as opposed to centralized ones. Literature review reveals that there is no distributed scheme based on Markovian model for primary user-secondary user interactions. Hence, in this paper, a CTMC-based distributed DSA scheme is proposed and the performance of primary and secondary user spectrum utilization in terms of throughput and fairness under both perfect and imperfect spectrum sensing is analyzed. An algorithm for distributed DSA named as distributed primary prioritized DSA Markovian access (DPMA) algorithm has been developed. This is an updated version of the algorithm proposed in [15]. The performance of the proposed algorithm is evaluated and compared with the conventional CSMA scheme. False alarms and misdetections resulting from imperfect sensing are also considered for performance evaluation.
Further, this paper is organized as below: in Section 2, the system model is discussed; in Section 3, the distributed primary prioritized CTMC model is described and the DPMA algorithm is explained in Section 4; Simulation results and analysis are discussed in Section 5 and Section 6 is the conclusion part of the paper.
2. System Model
A DSA system involving one primary user and multiple secondary users opportunistically sharing the licensed spectrum is considered. A DSA system with single primary user (P) and two secondary users (A and B) is taken for illustration as in [6] and shown in Figure 1. The primary-secondary spectrum sharing is modeled as CTMC based on the assumptions of Poisson arrival of service requests (λ) and exponentially distributed service rates (μ). The arrival rates of the users P, A, and B are denoted by

System model for DSA [6].
In our model, the secondary users are allowed to access the primary spectrum when it is found idle. As this scheme is primary prioritized, whenever the primary user reappears, the secondary users should vacate the spectrum and leave it to primary. The secondary network is distributed and does not have a centralized authority for their spectrum access coordination. In a distributed scheme, each secondary user should learn the statistics from the environment and accordingly they should increase their spectrum access opportunities.
An example illustration for throughput with respect to time [6] for two secondary users and one primary user is shown in Figure 2. This example illustrates that at time

Throughput versus time [6].
The maximum data rate for any secondary user i which operates independently in the spectrum band is given by [7, equation (1)],
3. Distributed Primary Prioritized DSA Model
In this section, the overview of distributed DSA system and the CTMC model is presented.
3.1. Distributed DSA System
Distributed medium access schemes such as CSMA can be used for spectrum sharing. But CSMA requires that users have to back off for a random period of time when another user is transmitting. This requirement will not lead to efficient spectrum utilization in an unlicensed spectrum sharing scenario as it can result in the loss of transmission opportunities for the secondary users. Thus, spectrum utilization will be efficient if the incoming secondary user is allowed to transmit with interference instead of backing off. However, this interference should be properly controlled so that heavy contention does not cause excessive interference. To achieve this control, the behavior of primary and secondary users is modeled using CTMC which mathematically describes the interaction between them.
The distributed DSA system for the secondary users is shown in Figure 3. Each secondary user is equipped with a CR system. The system measures the interference encountered when two secondary users share the spectrum and accordingly modify the access probability using the distributed DSA algorithm and the update rules.

Distributed DSA system for the secondary user.
3.2. CTMC Model
In opportunistic spectrum access, the secondary users access the unoccupied primary spectrum and at the same time should vacate if primary appears. This is because the primary user has the highest priority to access the spectrum at any time. Hence, we model the primary-secondary interactions as a primary prioritized CTMC [7]. As the arrival rates of the secondary users are assumed to be independent Poisson process, exact arrival of service requests happens very rarely.
Figure 4 shows the CTMC state transition diagram for DSA with one primary user P and two secondary users A and B. This can also be extended to one primary and multiple secondary users as discussed in [7]. State

CTMC state transition diagram with perfect spectrum sensing.
The probabilities in which the system is in any of these states can be computed from the infinitesimal matrix which is based on the arrival and service rates of the users. The infinitesimal generator matrix denoted by
We denote the vector containing the state probabilities by
Now, the overall throughput for any secondary user i is given by [7]
Thus, the CTMC model makes it easy—using the infinitesimal generator matrix [7] to calculate the probabilities of spectrum utilisation by the primary user and secondary users. More importantly, it is possible to directly calculate the probability,
3.3. CTMC Model with Access Control Probabilities
The CTMC model illustrated in Figure 5 includes access probabilities for secondary users. Access probabilities are those with which secondary users access the spectrum when it is being utilised by other secondary users. In other words, we can say that the access probabilities provide control over the amount of interference experienced by secondary users. The major challenge is to optimise these access probabilities such that interference is not high enough to cause severe loss of throughput, while at the same time not being low enough to result in the loss of transmission opportunities. In a centralised scheme, as in [7], this is done by acquiring the user statistics by a dedicated secondary management point, which then calculate the optimum access probabilities and communicate them to the corresponding secondary users. The secondary users stick to these access probabilities until there is a change in the statistics. However to do this distributively, without any communication between secondary users, we make a few simplifying assumptions and formulate heuristics on the basis of which secondary user statistics can be learned.

CTMC state transition diagram with access control probabilities [7].
Assumption 1. The primary user statistics are known to all secondary users. The network service provider of a licensed user may, reasonably, be expected to have spectrum utilisation records and hence the usage statistics.
Assumption 2. The statistics of the secondary users are comparable. That is, we expect the secondary users to possess similar behaviour patterns. If this is the case, a reasonable initialisation strategy would be that any secondary user assigns the initial estimate of the other secondary users as its own.
Heuristic 1. Interference for more than a certain fraction of time during a given transmission slot indicates an overestimated spectrum idle probability (
Unlike a centralised scheme, the decision of one secondary user to interfere with another has to be made by the secondary user itself. The advantage of interfering has to be judged based on the likelihood of two events:
rearrival of the transmitting secondary user during the service time of the incoming secondary user; arrival of primary user during the service time of the incoming secondary user.
We define the time-evolving access probability and the interference ratio which is used for updating the user's statistics in a distributive manner as given below.
Definition 1.
The time-evolving access probability of each secondary user is the
Definition 2.
Interference ratio (IR) is the ratio of cumulative time period for which interference occurs during a transmission slot (
4. Distributed Primary Prioritized Markovian Access Algorithm (DPMA)
The DPMA algorithm [15] designed on the basis of the above definitions and the previously formulated assumptions and heuristics are summarised in Algorithms 1 and 2.
Distributed Primary-Prioritised DSA Algorithm For each secondary user i, (1) Initialize: (2) Calculate If there is a need to transmit, (3) Sense the spectrum. If the primary user is not transmitting, then access the spectrum with a probability (4) Sense the spectrum. If secondary user j ( (5) Update all (
(1) Calculate the Interference Ratio (IR). (2) If [IR ≥ IRref] Then go to Step 3 Else Step 4. (3) Go to Step 5. (4) (5) Recalculate on the assumption that the other secondary users access the spectrum with a probability (6) Use
The constants
To evaluate the fairness of the distributed spectrum access scheme against variation in primary user spectrum utilization, a term called fairness factor is defined.
Definition 3.
The Fairness factor (FF) is defined as the ratio of standard deviation of primary user spectrum utilisation over multiple instances to the standard deviation of overall spectrum utilisation of secondary users over the same number of instances.
4.1. Distributed DSA Algorithm with Imperfect Sensing
It is more interesting to study the case when the sensing outcome of the secondary users is erroneous. We consider the effects of spectrum sensing errors in the form of false alarm and misdetection probabilities. The probability of false alarm (
Accordingly, modified CTMC state diagram for imperfect sensing is shown in Figure 6. If the user A (or B) senses the absence of primary user correctly, the state transits from

CTMC state transition diagram with imperfect spectrum sensing.
We denote the vector containing the state probabilities as
The array can be solved as given in (5). The overall throughput of the secondary user can also be computed using (6).
The CTMC state transition diagram with access control probabilities for imperfect spectrum sensing is shown in Figure 7. The distributed primary prioritized DSA algorithm can also be modified to include the errors arising out of imperfect sensing. To control the throughput degradation arising out of imperfect sensing, the access probabilities are provided to the secondary users whenever they try to access the spectrum. Here, the access probabilities of secondary users A and B are denoted by

CTMC state transition diagram with access control probabilities.
Thus, we verify by numerical simulations that the performance of the distributed DSA system with self-learned access control probabilities follows the theoretical results, and it is also comparable to that of the results achieved for maximum throughput criterion in [7]. It can also be verified that the performance of the system with imperfect spectrum sensing is greatly affected as the sensing error probabilities increase.
5. Simulation Results and Analysis
Simulation parameters are chosen as follows. As in [7], we set the bandwidth of the licensed spectrum as
5.1. Throughput Analysis for DPMA Scheme (Fixed Arrival Rates)
We analyze the throughput performance of the primary user and both the secondary users using the CTMC model. The locations of the secondary users are assumed to be symmetric and are as follows: user A's transmitter at (0 m, 0 m) and receiver at (200 m, 0 m), user B's transmitter at (200 m, 460 m) and receiver at (0 m, 460 m). As in [7], we compare the performance of the proposed scheme with the persistent form of CSMA. For the update rule in the algorithm, both
Average throughput per secondary user using DPMA and CSMA schemes.
Average throughput with maximum and std values for DPMA and CSMA schemes.
The average throughput histograms of secondary users obtained for 100 independent experiments are also shown in Figures 8 and 9 for both the proposed DPMA and CSMA scheme. It is inferred that the proposed DPMA scheme achieves higher average throughput than the CSMA-based scheme.

Histogram of throughput versus number of experiments using DPMA.

Histogram of throughput versus number of experiments using CSMA.
The FFs for the two schemes CSMA and DPMA are computed as 1.00 and 1.79, respectively, using (8). Thus, DPMA has a greater ability to maintain the overall throughput of secondary users against variation in primary user spectrum utilisation and is a fairer scheme compared to CSMA.
We then analyze the access probability variations of the proposed DPMA scheme. The initialisation strategy we adopt ensures a certain degree of fairness in spectrum access, or equivalently throughput between two secondary users with different arrival rates. For instance, if the arrival rate of secondary user A is 70 s−1 and user B is 85 s−1 and if the users follow DPMA scheme, then user A initially assumes the arrival rate of user B as 70 s−1. Similarly, user B initially assumes the arrival rate of user A to be 85 s−1. Thus, user A overestimates

Access probability variations versus number of iterations.
In Figure 11, the total throughput achieved for varying number of secondary users is plotted using DPMA algorithm. It can be observed that the total throughput does not increase much as the number of secondary user increases because the spectrum has to be shared with more number of secondary users.

Total throughput versus number of secondary users.
5.2. Throughput Analysis for DPMA Scheme with Perfect Sensing (Variable Arrival Rates)
In Figure 12, the throughput variation of the secondary users for varying arrival rate for user A (from 70 to 100 s−1) is shown. The arrival rate of user B is fixed at 85 s−1. Initially when

Throughput versus arrival rate
5.3. Throughput Analysis for DPMA Scheme with Imperfect Sensing (Variable Arrival Rates)
The secondary user throughput is also analyzed for imperfect sensing scenario. As expected, the average secondary user throughput is reduced compared to the ideal scenario. The simulation results using the DPMA scheme follow the results achieved using the CTMC model and are shown in Figure 13.

Throughput versus arrival rate
5.4. Primary User Spectrum Utilization
This analysis shows the throughput degradation caused to the primary users because of misdetection. Misdetection probability can cause heavy degradation in throughput for the primary users because of the interference caused to them. When the secondary users fail to notice the presence of primary users, it tries to access the licensed spectrum and causes harmful interference to them. This is represented as the states

Primary user spectrum utilization versus
5.5. Spectrum Utilization with Imperfect Sensing
The variation in both the primary user and the secondary user spectrum utilization with respect to increasing false alarm is observed. As expected, false alarm causes loss in transmission opportunities for the secondary users, and thus secondary user's utilization decreases with increase in false alarm probability. As false alarm does not cause interference to the primary users, the spectrum utilization of the primary user remains constant for the variations in the false alarm as shown in Figure 15.

Spectrum utilization versus
6. Conclusions
In this paper, a distributed DSA algorithm was proposed using CTMC model of interactions between the primary user and secondary users. This is a first step towards the completely distributed approach on CTMC-based DSA algorithm. This scheme is completely primary prioritized and also considers the effects of imperfect sensing in the form of misdetection and false alarms. Using the proposed approach, we showed that the average throughput of the secondary users is better compared to CSMA-based scheme and also produces fair throughput distributions. We also studied the throughput degradation caused to primary and secondary users due to imperfect spectrum sensing. Extending our scheme to multiple secondary users will be an interesting future work. Another interesting extension will be adaptively updating the parameters of the algorithm.
