Estimation of Primary Channel Mean Period Based on State Transition Probability in Cognitive Radio

Primary channel mean period plays an important role in improving the performance of Dynamic Spectrum Access (DSA), because many algorithms to improve the performance of Cognitive Radio (CR) need to use the channel mean period as a prior knowledge. Secondary Users (SUs) can obtain statistics of the primary channel by spectrum sensing. However, SUs’ estimation of the mean period is inaccurate due to errors in the spectrum sensing in the real world, which will lead to performance degradation of CR systems. In this paper, we use a two-state Markov chain to model channel states, and use state transition probability to analyze the influence of sensing errors on the mean period. At the same time, we derive the estimation formula of the mean period of the original channel. Simulation results confirm that the proposed estimation method is superior to the existing estimation methods, and can accurately estimate the original period even with high sensing error probability.


I. INTRODUCTION
D YNAMIC Spectrum Access (DSA) is a revolutionary solution based on Cognitive Radio (CR) to solve the problem of scarce Spectrum resources [1]. In order not to affect the normal communication of Primary Users (PUs), Secondary Users (SUs) need to periodically perform spectrum sensing on the primary channel. Among the existing sensing technologies, the energy detector can be used without the prior knowledge of the PU, and has the advantages of simple design and less complexity, but is greatly affected by noise [2]. SUs work under Perfect Spectrum Sensing (PSS) when the PU signal has high Signal to Noise Ratio (SNR). However, in reality, SUs are more likely to work under Imperfect Spectrum Sensing (ISS) due to sensing errors under low SNR conditions [3].
In recent years, more and more algorithms are proposed to improve the performance of CR systems. Some of these algorithms already consider the occurrence of spectrum sensing errors. In [4], the authors propose a method to reduce the complexity of searching the optimal channel under ISS. In [5], the authors analyze the achievable reliable communication rates that SU can achieve when spectrum sensing occurs with possible errors.
Most algorithms to improve the performance of CR systems require the use of primary channel statistics as prior knowledge, because PU activity pattern has a great impact on SU's performance [6]. In [7], the average service time of PU is used to evaluate spectrum handoff performance. In the channel selection algorithms proposed in some literatures, primary channel mean period is required as a parameter [8]- [9]. The method proposed in [10] for analyzing performance of SU with dynamic spectrum allocation requires that the average service time and arrival time of PU are known. Therefore, inaccurate mean period will affect the performance of CR systems in some scenarios [11]. These literatures show that the mean of the idle/busy periods is an important part of primary channel statistics and is widely used to improve the performance of CR systems.
Some methods about estimation of primary mean period under low SNR conditions have been proposed in some literatures, but there are some limitations. In [11]- [12], the authors assume that the duration of each idle/busy period are exponentially distributed, and use the probability density function of the exponential distribution to estimate the mean period of the primary channel. This method is only applicable to the exponential distribution of PU activities, and not appropriate for most scenarios [13]. In [14], it uses the deep learning approach to obtain the accurate statistics of the primary channel, which is complicated to calculate and requires a long time to train. In [3], the authors propose a closed-form expression with high computational speed to estimate the mean period of the channel. However, it assumes that each period may have an infinite number of the continuous sensing errors (i.e., each idle/busy period contains an infinite number of slots), resulting in accuracy being affected by sensing error probability and sensing period.
The Markov chain has been widely used to model channel idle/busy states [15]. In [16], it uses Markov chain to model the channel state to analyze the network congestion problem in cognitive radio networks. In [17], it uses a novel discretetime embedded Markov chain to analyze the energy efficiency of the proposed scheme. In [18], the authors assume that PU states is a two-state Markov chain in searching for the optimal sensing strategy for throughput maximization. In [19], the authors propose an adaptive spectrum sensing strategy to determine the channel to sense by using the Markov property of the state transition of the PU. In [20], the authors consider the PU signal changes that may occur during SU sensing interval through a two-state Markov chain. In this paper, we use a two-state Markov chain to model the channel states to avoid the accuracy of the proposed estimation of the channel mean period being affected by the distributions of idle/busy periods of PU.
The contribution of this paper can be summarized as follows: 1) The influence of sensing errors on the total duration of the idle/busy state is analyzed, and the relationship between the total duration of the idle/busy state under PSS and the sensing results under ISS is obtained. 2) The sensing error types leading to the change of the number of idle/busy periods are summarized, and the relationship between the number of periods under PSS and the sensing results under ISS is analyzed by using state transition probability. 3) A closed form expression is derived to accurately estimate the channel mean period from sensing results under ISS, sensing error probability and sensing period. This method has a fast calculation speed and can accurately estimate the original mean period without prior knowledge of primary channel activities. 4) The proposed method is compared with the existing methods by simulation. Simulation results show that this method is superior to the estimation methods used in the existing literature, and the estimation accuracy is not affected by the sensing error probability and sensing period.
The rest of this paper is organized as follows. In Section II, we introduce the system model. In Section III, we introduce the estimation of mean period under ISS. Section IV includesˆ0 simulation results. Finally, the conclusions are drawn in Section V.

II. SYSTEM MODEL
We consider that the prior knowledge of the PU is unknown, therefore we consider that the SU uses the energy detector for spectrum sensing. A SU observes the state of the channel periodically with the sensing period T p to reduce interference to the PU, and the sensing result is denoted as H i (where i refers to the type of the period, i = 0 for idle and i = 1 for busy). As shown in Figure 1, the SU observes the state of the channel under PSS, whereT i represents the estimated periods under PSS and T i represents the original periods. However, occasional errors in spectrum sensing are likely to occur in low SNR scenarios. As shown in Figure 2, the SU observes the state of the channel with sensing errors, wherȇ T i represents the estimated periods under ISS. In the energy detector, false alarm probability P f and missed detection probability P m can be calculated from SNR, sensing time and decision threshold [21]- [22]. Therefore, we assume that false alarm probability and missed detection probability are known in practical applications.
We use state transition probability to analyze the number of channel state changes. Therefore, we use a two-state Markov chain to model channel states, as shown in Figure 3. In practical applications, channel state transition probabilities need to be estimated by the behavior of the PU. In [23], the maximum likelihood estimation method is used to obtain the state transition probabilitiesP ij , and the state transition probabilities can be written aŝ whereN ij represents the number of channel states that change from H i to H j , andN i represents the number of H i under PSS.

III. ESTIMATION OF THE MEAN PERIOD
The mean of the idle/busy periods of the primary channel can be estimated using the conventional mean estimation method under PSS [24], and the expression is given by whereN p represents the number of periods under PSS,T i,n represents the nth idle/busy periods under PSS. However, this does not apply when false alarms or missed detections occur in spectrum sensing [25]. Sensing errors not only change the total duration of idle/busy state, but also cause an increase in the number of observed periods, as shown in Figure 2. In order to accurately estimate the original mean period based on the sensing results under ISS, three stages of analysis are required: 1) Estimating the total duration of idle/busy state under PSS by ISS sensing results. 2) Estimating the number of periods under PSS by ISS sensing results. 3) Estimating the mean of the idle/busy periods under PSS by the first two estimated results.

A. ESTIMATION OF THE TOTAL DURATION
The total duration of the idle/busy state observed by the primary users under PSSt i is the sum of the duration of each idle/busy period, and the expression is given bŷ However, the sensing results under ISS are different from those under PSS due to false alarms and missed detections in spectrum sensing. When false alarms occur, primary users mistakenly observed some idle slots as busy, resulting in the total durations of the observed idle state being less than under PSS. The total number of false alarm errors within the whole set of idle periods N f can be obtained by Similarly, the total number of missed detection errors within the whole set of busy periods N m can be obtained by Therefore, after accounting for the effects of false alarm and missed detection, the total number of the idle slotsN 0 under ISS isN Similarly, the total number of the busy slots under ISS is By substituting (7) and (8) in (9) and (10), it can be derived thatN Simultaneous (11) and (12), the total number of idle/busy slots under PSS can be derived that Due tot i =N i T p , the total duration of each idle/busy period under PSS can be derived that When the channel state changes, the number of idle/busy periods also increases. For example, when the channel state changes from idle to busy, it indicates the start of a new busy period, and the number of busy periods is increased by one. Therefore, the number of channel state changes is equal to the number of primary channel periods (i.e.,N 01 =N 10 =N p ), and the relationship between the state transition probabilities and the number of periods is: Under ISS, the number of channels observed from idle to busyN 01 is different from the actual value due to the sensing errors of SU during spectrum sensing. As shown in Figure 2, a false alarm results in more observed periods than actual periods. Due to different sensing error types, the channel state changes observed by SU (i.e., sensing result of two consecutive slots is idle to occupied) can be divided into the following four specific cases: Case I: The channel state changes from idle to busy, and the SU has no sensing error during spectrum sensing, and the sensing result is consistent with that under PSS. In the whole observation stage, the total number of channel states that are idle isN 0 , the transition probability of the state from idle to busy isP 01 , and the probabilities of SU not experiencing sensing error during spectrum sensing of these two slots are (1 − P f ) and (1 − P m ) respectively. Therefore, when no sensing error occurs, the number of channels observed to change from idle to busy is Case II: The channel status remains idle, and a false alarm leads to an increase in the number of observed periods. As shown in Figure 2, this situation occurs in two continuous idle slots, and no false alarm occurs in the first slot and a false alarm occurs in the second slot. The total number of channel states that are idle isN 0 , and the transition probability of the state remaining idle isP 00 . Therefore, the number of channels observed to change from idle to busy due to the false alarm isN Case III: The channel status remains busy, and a missed detection leads to an increase in the number of observed  periods. As shown in Figure 4, this situation occurs in two continuous busy slots, and a missed detection occurs in the first slot and no missed detection occurs in the second slot. The total number of channel states that are busy isN 1 , and the transition probability of the state remaining busy isP 11 . Therefore, the number of channels observed to change from idle to busy due to the missed detection is Case IV: Continuous sensing errors lead to an increase in the number of observed periods, the SU incorrectly senses the first slot as idle and a false alarm occurs in the second slot. As shown in Figure 5, this situation can occur when the channel state changes from busy to idle. The total number of channel states that are busy isN 1 , the transition probability of the state from busy to idle isP 10 , and the probabilities of sensing errors in these two slots are P m and P f respectively. Therefore, the number of channels observed to change from idle to busy due to continuous sensing errors is In combination with the above four cases, the number of VOLUME 4, 2016 channel state changes under ISS is By substituting (13)(14) and (17)(18)(19)(20) in (25), it can be derived thatN Due to the number of channel state changes is equal to the number of primary channel periods, the number of periods under ISS is The result in (27) (28)

C. ESTIMATION OF THE MEAN OF THE IDLE/BUSY PERIODS
When the number of periods is large enough, the mean of the idle/busy periods E (T i ) is the same as the mean period under PSS E T i [24], and the expression is given by By substituting (15) and (28) into (29), the estimation formula for the mean of the idle periods can be obtained by Due to E T i =t i /N p , the relationship between the mean of the idle periods and mean period under ISS is (31) Similarly, the estimation formula of the mean of the busy periods is (32) Combined with (31)-(32), the final expression for the estimation of the mean period is (33) The result in (33) represents a method to accurately estimate the mean of the idle/busy periods based on sensing period, false alarm probability, missed detection probability and the sensing results under ISS.

IV. SIMULATION RESULTS
In order to verify the accuracy of the proposed estimation of channel mean period, we compare the numerical calculation results of the derived expression with the simulation results. In most scenarios, the idle/busy periods of primary channel follow the generalized Pareto distribution [13]. Therefore, we use µ i = 10, λ i = 30, α i = 0.25 as the values for the location, scale and shape parameters to generate two groups of 10 6 random numbers that obey the generalized Pareto distribution as sequences of idle/busy periods T i . Different sensing periods T p are taken to perform on the generated periods to represent idle/busy periods observed under PSST i . Then, the sensing errors of uniform distribution is introduced into the PSS decisions according to the selected P f and P m values, and the corresponding idle/busy periodsT i under ISS is obtained.
In Figure 6, we select different sensing error probabilities to analyze the impact of sensing period on the estimator for the mean period, and compare the accuracy of the estimator proposed in (33) with the algorithm proposed in [3]. As the sensing period increases, the results in direct calculation and the method in [3] are close to the original number of channel periods, because the reduction of the total number of slots leads to fewer sensing errors. Compared with the method in [3], the estimator proposed in (33) has a significant improvement in accuracy and is not affected by the sensing period. Figure 7 analyzes the relationship between the mean busy period and the accuracy of the estimation of mean idle period when the sensing period is 5ms. The results show that as the mean busy period increases, the accuracy of the direct calculation and the method in [3] decreases, because the number of sensing errors during the busy period increases. The estimator proposed in (33) is obtained by analyzing the number of state changes and has nothing to do with the duration of each busy idle period. Therefore, the difference in the mean period does not affect the accuracy of the estimator proposed in (33) because the accurate number of state changes can be obtained even under high sensing error probability.
Simulation results show that in the case of low sensing errors probabilities, the estimator proposed in (33) and the method in [3] both provide near-perfect estimations. In the case of high sensing errors probabilities, the estimator proposed in (33) has a significant improvement in accuracy and is not affected by sensing period. In practical application, sensing period and sensing error probability are usually not optional. Therefore, this method can estimate the accurate mean period of the primary channel in a wider range of scenarios.

V. CONCLUSIONS
In this paper, we used a two-state Markov chain to model channel states, and analyzed the influence of sensing errors on the mean period, and found the relationship between original mean period and the estimation under ISS. Furthermore, this work has proposed a method to accurately estimate the original mean period based on the sensing results under ISS, sensing error probability and sensing period. Simulation results show that this method is superior to the estimation methods used in the existing literature, and the estimation accuracy is not affected by the sensing error probability. In   addition, this method has a fast calculation speed and requires no prior knowledge of channel. This work will enable CR systems to estimate the accurate mean period of primary channel, and improve the performance of CR systems because many methods to improve the performance of CR systems need to use the mean period as a prior knowledge.