{'fraction_non_alphanumeric': 0.028837270687607233, 'fraction_numerical': 0.008578593110729841, 'mean_word_length': 4.433847257081391, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Suboptimal Approach to Distributed Detection in Cognitive Radio Networks

In this paper a dynamic spectrum access (DSA) concept is explored for mitigating the paucity of spectral bandwidth in cognitive radio (CR) for opportunistic, dynamic access of the spectrum without any interference. Dynamic spectrum access schemes are proposed for a distributed cognitive radio network consisting of one secondary user (SU) and many primary users (PUs). The SU has to make decisions for accessing PU channels within discrete time slots. The design of sensing and access strategies that govern channel choice in each slot for near-optimal throughput performance of the SU may be formulated as a partially observable Markov decision process (POMDP). Furthermore, it is considered that the SU incurs a cost whenever it switches to a different channel. The switching cost is expressed in terms of delay, packet loss and packet overhead. In this work, the SU access policy based on a myopic approach is proposed and evaluated. Keywords—cognitive radio, distributed detection, energy detector, myopic policy, spectrum sensing.


Introduction
According to a survey by the US Federal Communications Commission (FCC), utilization of the radio spectrum in the 30-3000 MHz frequency bands equaled, in the US, just 5.2% in 2004-2005 [1]. The spectrum utilization rate is also characterized by variations based on geographical locations. This underutilization of the spectrum resources creates a new communication paradigm to exploit it dynamically. A solution under which the licensed spectrum is shared among unlicensed users is a promising approach allowing to cope with the issue of spectrum scarcity. Dynamic spectrum access (DSA), i.e. a method allowing the spectrum to be accessed dynamically depending on current needs is a promising solution to this problem. DSA is supported by spectrum agile devices, such as cognitive radio (CR), which may opportunistically identify vacant portions of the spectrum known as white holes, and may transmit using them while maintaining limited interference, so as not to affect the licensed users. In this paper, a simple, heuristic spectrum sensing policy deployed in a distributed POMDP CRN framework comprising 1 SU and N PUs is presented. In addition, a less complex access policy relying on the myopic approach with immediate two-stage reward in a similar environment of 1 SU and N PUs, where N >1, along with energy constraints and channel switching costs, is proposed.

Related Works
A variety of spectrum sensing techniques for CR is proposed in [2]. These techniques range from simple energy detection to advanced schemes based on cyclostationary feature detection. A survey of available schemes presented in [3] reveals that energy detection (ED) is the easiest and most widely used sensing approach. Its advantage lies in the fact that it does not need any a priori information concerning the primary user (PU) channel transmission characteristics, is easily implementable and has low computational complexity. The disadvantage, however, is that ED takes a long sensing time for the detection of low SNR primary signals. Besides, the sensing threshold in ED is an important parameter. The receiver operating characteristic (ROC) curve and the interference limits determine the threshold values. In [4], dynamic estimation of noise power is proposed. It eliminates the performance-related restrictions of ED due to the estimation error of noise signal power. The authors describe the concept of the adaptive threshold in [5]. It is based on the signal-to-interference noise ratio (SINR). Bazerque et al. in [6] proposed that spectrum sensing may be performed either in a centralized or distributed manner. The centralized and distributed approaches may be either cooperative or non-cooperative. The centralized approach involves the collection of data from each SU at the center and taking the final decision based on a specific rule. Cooperative spectrum sensing is studied in [6] to reduce the detection time and to improve robustness. An OFDM-based system is proposed in [7], wherein the decisions from all local SUs are taken and given to the center. The center makes the final decision on the bias and/or logical combinations. However, due to the existence of different channel conditions, the approach is not optimal.
A sequential detection procedure is proposed in [8], where the samples are taken sequentially and the log-likelihood ratio is computed for each SU. This approach makes use of two thresholds. If the ratio falls within the upper and lower threshold, the next sample is taken. Otherwise, a decision is made. An improvement to the previous approach is made in [9] and is known as sequential shift chi-square test. The improvement consists in introducing a bound to the number of sensing samples. In [10], the authors proposed a consensus-based algorithm for sensing policy. It considers a distributed environment where the SU makes the decision based on local observations only. The previous works take into account a cooperative distributed environment in which the SUs cooperate with each other make the final decision. Also, the observations of all SUs are taken to a fusion center in order to make the final decision, meaning that the approach is centralized. Very few works are concerned with distributed noncooperative environments. In this project, we have considered a distributed scenario with 1 SU and N PUs. The PUs and the SU are working independently, without any knowledge of each other's state. Under the energy constraint, we have developed a heuristic access policy for SU. Also, another algorithm has been developed which takes into account the switching cost that the SU incurs when it switches to a channel other than the current channel. The objective is to minimize the switching cost.

Heuristic Approach to Energy Efficient Detection
Consider a CRN comprising a set N PUs, i.e. P = {1, 2, . . . , N} and 1 SU. The channel is intended for use by the PU, but while it is not transmitting, it is sensed and used by SUs. The propagation condition has been taken as an unfading channel. Time is k-slotted and is nonnegative k = {1, 2, 3, . . .}. The statistics of primary network traffic are such that the occupancy of the primary channel in time slot k follows N independent discrete time Markov processes comprising two states. The state of channel i in time slot k may be either busy (0) or idle (1), which is denoted by a theta vector θ i,k ∈ (0, 1). The state vector of N PUs at the beginning of time slot k is denoted as The transition probability of the theta vector is P i,k = [p 00 p 01 ; p 10 p 11 ]. The sensing model is: The considered framework is a partially observable Markov decision process (POMDP) environment, where the SU does not have a complete knowledge of the states of PUs. In this case, the SU senses the spectrum available at a given time slot and decides to access a free channel. The observations may therefore result in some collisions, thereby decreasing the overall throughput. To keep the energy low and due to the limited sensing ability of the SU, a heuristic approach to its access-related actions is formulated.
The cost incurred when the SU switches to a channel other than its current channel c and assumed as λ . The SU notices the state of the system at the beginning of time slot Since the SU cannot observe the state of the channel directly, it has to infer that state from partial sensing outcomes. For this, π i,k denotes the conditional probability that channel i is sensed as idle, given the past and present states of the channel: The probability that channel i is idle in time slot k + l depends on the probability of channel i being idle in previous time slot k and the transitional probability of state. π i,k+1 is therefore a recursive function of its previous value. π i,k+1 is calculated for two scenarios. The first scenario is concerned with the sensed channel: when Y i,k = 0, and when Y i,k = 1.
For the unsensed channel, it is: The proposed algorithm is given as Algorithm 1.

Simulation Results
The simulation was performed using Matlab software. A CRN consisting of 1 SU and N PUs is considered. Monte Carlo simulation is carried out with 10 4 iterations, which is also the number of available time slots. The initial θ i for t = 0 is taken as 0.5. The observations at each time slot are generated based on Eqs. 1-4. For each time slot, π i is generated for channel i, where i ∈ {1, 2, . . . , N} from Eqs. 6-8. Next, π i is compared with the threshold value γ that varies from 0.2-0.7. The throughput of SU against the threshold values is defined as: Probability o f collision) .
Based on the simulation, the number of slots found to be idle is: 4012.3 and the number of busy slots is: 5987.7. The results given by the heuristic algorithm are shown in Figs. 1-3. As may be observed from Figs. 1-2, the throughput and the probability of collision decrease. This is clearly understandable, because as the threshold value increases, the number of primary channels open for access to SU will decrease, thus reducing throughput. Figure 3 shows that the probability of collision varies as the number of accesses by the SU increases until it reaches full saturation. As the number of accesses by SU increases, the number of SU's   collisions with the licensed user grows, explaining the variation shown in Fig. 2. So, a trade-off is achieved between the probability of a collision and throughput at a particular threshold value. The value of the threshold should be such that the quality of service is not compromised for PUs. Since this is a heuristic approach, it just offers an insight into the basic understanding of the parameter π i,k for access into the activity of SU in an environment with distributed PUs, while maintaining the required QoS.

Energy Efficient Detection Using Myopic Policy
For a greater convergence with the optimal solution, we propose a myopic policy for sensing and for access actions undertaken by SU. Let a k = [1, 2, 3, . . . , 10] denote the access action of SU in a given time slot k, where 0 means no access action. Here, we introduce the concept of a reward. Every action and state of SU carries with itself a certain reward. The SU considered here incurs a switching cost whenever it has to switch to other channels. The switching cost mentioned here and incurred by SU is expressed in terms of delay, packet loss, and packet overhead. This is because when the SU changes from one frequency to another, both the SU transmitter and receiver should be coordinated properly. If they are not coordinated, the SU transmitter may start sending packets even when the SU receiver is not ready. This incurs a delay, also it may lead to packet loss at the receiver. The packet loss initiates a retransmission which is considered as packet overhead. The significance of the reward lies in the fact that it helps the SU analyze how useful its access actions are in the long run. The usefulness is stated here in terms of minimizing the number of frequent channel changes. The SU cannot make the observations directly, since the problem is considered for a POMDP environment. It has to sense the observations and make decisions. In the heuristic solution proposed in Section 3, no attempt is made to reduce the number of occasions on which SU switches to another PU channel in order to reduce the switching cost. Therefore, a sensing and access policy is needed that allows SU to switch the channel whenever the necessity arises.
Obtaining the optimal policy for a general POMDP is often intractable. In fact, based on [11], it is clear that the complexity for obtaining the optimal solution for spectrum sensing and accessing opportunistically is of the order of N T , where N is the number of channels in the spectrum of interest and T is the total time horizon. In this regard, a myopic policy with an immediate two-stage reward is proposed as a simple solution that achieves near-optimal performance.

Myopic Policy Solution
For a given state-action pair ([θ k , a k ], c k ), we assume the immediate reward earned by SU accessing channel i in time slot k as: The maximum reward is 1 when the SU makes the decision to access the same channel in the next time slot and that channel happens to be idle also. Let us define S k ∈ {1, 2, . . . , N} as the state of SU in time slot k. Since the transition probabilities of vector S do not remain constant and depend on the current state and action, they are derived as: The two-stage reward is formulated as the sum of the reward in the current state and the reward in the immediate future time slot. Thus, the reward depends on the current reward and on the transitional probabilities of the state. The reward is: The SU senses the observation and, hence, the two-stage reward becomes the expected two-stage reward and is: The SU sensing policy then proceeds to sensing those channels for which the parameter π i,k is greater than a certain threshold γ. The access policy starts choosing only those channels in the discrete time slot k for which the expected two-stage reward is the highest:

Simulation of the Myopic Approach
The simulation is carried out using Matlab with CRN and the same environment as given in Subsection 3.1, consisting of 1 SU and N PUs. Based on the sensed channels, the SU calculates the maximum two-stage reward in each time slot and accesses only those primary user channels that are characterized by the maximum two-stage reward. As far as channel quality is concerned, parameter π i,k is taken, since it describes the probability of the primary channel being idle in time slot k. The switching cost λ is taken as 0.3. For a particular access policy, a particular threshold value of 0.48 is taken for which the total reward accumulated is the highest. The two-stage reward myopic policy is an alternative for the intractable optimal solution while maintaining a certain quality standard. Figure 4 shows that overall throughput is acceptable. As shown in Fig. 1 and Fig. 4, the throughput is improved from 0.4 to 0.65. Figure 4 shows throughput against the probability of collision. Throughput increases as the probability of collision increases. This is counterintuitive, since the collision rate should decrease the throughput of the network. But since the threshold values increase, the number of accesses by SU decreases, as may be seen from Fig. 6. Therefore, the probability of a collision of SU decreases as well. The total reward earned by the SU and the number of accesses show similar variations with respect    to the threshold values as those seen in Figs. 5-6. This implies that the total reward that a SU earns is directly proportional to the number of times it is allowed to use a PU channel. Figure 7 shows the access action of SU for the threshold value of 0.48. This value is chosen to ensure that the chance of finding a busy channel is not lower, while also keeping in consideration the total reward accumulated. The maximum throughput value of 0.65, as shown in Fig. 4, is meaningful for the result in [12].