Improved spectrum sensing for OFDM cognitive radio in the presence of timing offset

Spectrum sensing is an important aspect of an (interweave) cognitive radio network. In the particular case of orthogonal frequency division multiplexing (OFDM) transmission, many previous spectrum sensing algorithms have utilized the unique correlation properties provided by the cyclic prefix (CP). However, they have also had to both estimate and compensate for the inherent timing offset of a practical system. This is because the timing offset will affect both the test statistic and the threshold, and the inaccurate estimation of timing offset will lead to poor performance. So in this paper, we propose an improved CP detector by constructing a likelihood ratio test (LRT) based on the multivariate probability density functions (pdf) of a particular auto-correlation vector that is chosen to exploit the existence of the CP. This leads to ‘probability of detection’ (Pd) and ‘probability of false alarm’ (Pf) terms that are actually independent of timing offset, and we can get an accurate threshold without estimating timing offset. Simulation results illustrate that the proposed algorithm outperforms existing methods, even for low SNR values. Finally, we show how the algorithm’s parameters must be carefully chosen in a trade-off between spectrum sensing success and overall system performance.


Introduction
Recently, cognitive radio (CR) has been used as an effective method to tackle the conflict between spectrum scarcity and spectrum utilization [1,2]. CR technology has the inherent ability to sense the wireless communication networks' environment and immediately adapt to meet the requirements of the system [3,4]. One of the most challenging and crucial tasks in (interweave) CR networks is spectrum sensing in order to avoid interfering with the primary users [5][6][7]. As a result, it is important to be able to detect the presence of the primary users within a short time under very low signal-to-noise ratio (SNR) conditions [8]. Existing spectrum sensing methods can be broadly classified into energy detection [9], cyclostationary detection [10], matched filter detection [1], and covariance detection [11].
Energy detection is one of the most basic sensing technologies, and it is widely employed for its simplicity. However, it is highly sensitive to noise uncertainty [12]. In *Correspondence: wuzhilu@hit.edu.cn; 1 School of Electronics and Information Engineering, Harbin Institute of Technology, 92 Xidazhi street, 150001 Harbin, China Full list of author information is available at the end of the article [13], an alternative method based on the cyclostationary nature of the orthogonal frequency division multiplexing (OFDM) signal was investigated, and it was shown that it can satisfy system requirements. However, compared with energy detection, the cyclostationary detection approach needs additional computational load for real-time applications. Now OFDM, which has the capability of mitigating inter-symbol interference (ISI) and combating multipath fading [14][15][16], is the most popular communication technology in current and next-generation communication systems, such as WiMAX, WiFi, and LTE [17,18]. Hence, it is reasonable to assume that any CR should be able to detect OFDM signals by exploiting their properties. There are existing OFDM sensing algorithms proposed and analyzed in the literature. Most of them use the features of the pilot tones (PT) [19,20] and the cyclic prefix (CP) [21,22] inherent in OFDM signals. In [8], the authors proposed a spectrum sensing algorithm using the PT, which is based on time-domain symbol cross-correlation. However, the method is highly susceptible to carrier frequency offset. New detection algorithms based on the correlation properties of the CP are proposed in [21,22]. But these http://jwcn.eurasipjournals.com/content/2014/1/224 algorithms are sensitive to timing offset, which therefore needs to be estimated, and so this will decrease the overall performance of the system.
In this paper, a new spectrum sensing algorithm based on correlation of the CP is proposed. It is designed to detect OFDM signals in a multipath environment, and it is based on the generalized likelihood ratio test (LRT). The advantage of our proposed scheme is that the expressions for probability of detection P d and probability of false alarm P f are independent of the timing offset. Thus, we can get an accurate threshold without timing offset estimation. The contribution of this paper can be summarized as follows.
• A new method which just needs to test autocorrelation of the received signal (i.e., R i in (5) to detect the PU is proposed in this paper. It is much simpler than most of the current methods (especially the optimal detector), and the performance of the proposed detector just degrades a little compared with the optimal detector.
• The theoretical expressions of P d and P f (see (25) and (26)) are derived through the probability distribution function for R i under H 0 and H 1 based on the LRT. As a result, it is easy to get the threshold for any given P f .
• The expressions derived for P d and P f are independent of the timing offset parameter (τ ), and so unlike other methods, no estimation of τ is required to obtain the appropriate decision threshold. As a result, the correct threshold will be obtained without any error, leading to performance improvement. So although we make some assumptions which will lead to minor performance degradation, the correct threshold will compensate.
• The performance of our proposed method is compared with other recent OFDM sensing schemes through both simulation and theory. Moreover, the effects of changing the CP ratio and the OFDM block size are analyzed through simulations.
The paper is now organized as follows. Section 'System model' presents the system model of the OFDM signal under frequency selective fading channels. The theoretical derivation of the proposed detection statistic is given in section 'OFDM signal-sensing algorithm' . In 'Simulation results' section, we present simulation results and compare our proposed method with other recent algorithms. Finally, conclusions are given in the 'Conclusions' section. Figure 1 illustrates a simplified block diagram of an OFDM system and the spectrum sensing algorithm. The mth block of data symbols mapped onto the sub-carriers are shown as I m (0), . . . , I m (N d − 1), where N d is the data block size. Without loss of generality, the inverse fast Fourier transform (IFFT) block size is also taken to be N d . And after the IFFT, we have the time-domain signals

System model
and E s is the power of each transmitted symbol with n = 0, . . . , N d − 1. Then, the CP is added by putting an exact copy of , where N c is the length of CP. Figure 2 shows the structure of this mth block of an OFDM transmission.
As regards the channel model, we will use the same model as [21]. But the important difference between the two models is that we actually incorporate the timing offset (τ ) into our paper which is more practical. Thus, the received signal of the mth block after passing through a multipath fading channel can be written as where m = 0, . . . , M − 1 and M is the total number of received OFDM blocks; n = 0, . . . , N c + N d − 1; f q is the carrier frequency offset normalized to the subcarrier spacing; θ 0 is the original phase; h l is channel gain of the lth path and h l ∼ CN (0, σ 2 h ); L is the number Figure 1 Block diagram of an OFDM system and the spectrum sensing algorithm. OFDM spectrum sensing structure in a cognitive radio network. http://jwcn.eurasipjournals.com/content/2014/1/224 Figure 2 The structure of the transmitted mth OFDM block. The traditional structure of the transmitted mth OFDM block.
of the multipaths; and τ is the integer timing offset and e m (n) is the complex additive white Gaussian noise (AWGN) with zero-mean and variance σ 2 n . The SNR at the receiver is defined as E s can be rewritten as ( 3 )

OFDM signal-sensing algorithm
Consider two binary hypotheses, H 0 and H 1 , where H 0 and H 1 denote the absence and presence of a primary user, respectively. A test statistic T is formulated to distinguish between H 0 and H 1 as follows: where γ 0 is the test threshold.
Noting the unique feature of the CP, we will now propose the following measure of auto-correlation: where i = 0, . . . , N c + N d − 1 and * stands for the complex conjugate operation. According to the central limit theorem, if the M is large enough, then R i approximates a complex Gaussian random variable under both H 0 and H 1 . This assumption is used in most research papers to get the probability density function (pdf ) and has some implications. On the negative side, the sensing time will increase. On the positive side, the derivation progress will be greatly simplified. In most simulations, M will be chosen appropriately to decrease the sensing time. As a result, the performance will be slightly affected. But this degradation is acceptable for most papers. The impact of choice of the M will be discussed in the 'Simulation results' section.
And as we will later construct τ as a LRT, we now need both the means and variances of R i |H 0 and R i |H 1 to form their respective p.d.f 's. So, for hypothesis H 0 , the received signal only contains noise and so: From (6), the mean and variance of R i can easily be computed as Similarly, under hypothesis H 1 , R i can be written as We will now do a similar evaluation for R i |H 1 , which as we shall see, results in more complex expressions. So, Now when i + j − τ − l ∈ C, then we get (10) then using (10) and (11), so we can rewrite (9) as Now, the variance of (8) can also be computed as

Optimal CP detector
For most of the published CP detection methods, they have to choose the largest R i , i = {0, 1, . . . , N c + N d − 1}, and then apply some method (such as ML) to estimate the timing offset τ . After that they will use the estimated τ to calculate the test statistic and its threshold. However, due to the limitations of these estimation methods (i.e., complexity, accuracy, etc.), the system performance will inevitably suffer due to the inaccurate estimation of both the test statistic and threshold. But in this paper, we will propose using rather than a single R i and thus avoid explicit estimation of τ to get the test threshold. So we will define the vector: Based on the LRT, we can define the following test statistic: where p(·) denotes the probability density function (pdf ) and γ 0 is the threshold.The pdf of p(R) under H 0 and H 1 can be expressed (respectively) as where B 0,τ and B 1,τ are the covariance matrices of R under H 0 and H 1 with the 'τ ' indicating dependence on the timing offset; and m R is the mean vector of R under H 1 . As a result, we will get We can see from (19) that there appears to be no closedform expression for the distribution of the test statistic T , so the threshold γ 0 has to be computed empirically.

The proposed improved CP detector
So as discussed above, using (19) as the test statistic for spectrum sensing is both difficulty and impractical. Firstly, computing the inverse and determinant of the covariance matrices is complex, especially for large N c +N d . Secondly, we have to compute the threshold empirically. This means that every time we sense the spectrum, additional time and system resources are needed to obtain the threshold. In order to solve this problem, we will make some assumptions during the algorithm derivation. The details will be shown in the rest of the paper. First, to simplify the derivation of the joint distribution of R, we assume that all the R i in (15) are independent. Note that although not theoretically correct, simulations have shown that this assumption has indeed very little effect on the true result. Thus, (16) can be approximated as Using Mathematica and some algebra, then from (20), we can show that (16) is equivalent to: where In particular, when the SNR is very low, then from (7) and (14), we can say σ 2 0,i ≈ σ 2 1,i . So (21) can be rewritten as where (·) takes the real part and (·) takes the imaginary part. Because as σ 2 0,i → σ 2 1,i , so α i → ∞, then we have μ 2 1,i /2σ 2 0,i , and it is the threshold of the proposed method. According to (23), T 1 is the test statistic of the proposed method. And it is obvious that T 1 contains three parts (μ 1,i , σ 2 0,i and (R i ) ). With the priori knowledge, μ 1,i and σ 2 0,i could be calculated according to (13) and (7), respectively. In order to calculate the (R i ), the observation value of y m should be collected firstly, and then we could use (5) to evaluate the autocorrelation measures R i , i = 0, 1, . . . , N c + N d − 1 from the received OFDM signal. Finally, using both R i , i = 0, 1, . . . , N c + N d − 1 and the statistics of H 0 and H 1 in 24, we can evaluate the test statistic T 1 in 24. Clearly T 1 in (23) will have a Gaussian distribution: Then, the probability of detection and false alarm can be easily computed as In order to test the performance the spectrum sensing method, we usually test the probability of detection or the probability of misdetection for a fixed P f . So based on the NP criterion, we could calculate the threshold γ 2 according to the (26) as The detection process of the proposed spectrum sensing method can be summarized as follows.
(1) Compute the real parts of R i , i = 0, 1, . . . , N c +N d −1 as defined in (5) by applying the received samples.
(2) Compute μ 1,i and σ 2 0,i as stated in (13) and (7) with the priori knowledge such as M, N c , and so on.
(5) Compare the test statistic T 1 with threshold γ 2 . If the T 1 is smaller than γ 2 , the primary user is absent. Otherwise, the primary user is present.

The effect of timing offset
Now presence of an unknown timing offset (τ ) will affect the performance of any spectrum sensing algorithm. Most existing approaches attempt to estimate τ , and then use it to obtain the test statistic and the threshold. But an inaccurate estimate of τ will give incorrect values for these two parameters. So in this paper, we will now prove that P d and P f of our proposed suboptimal CP detector are in fact independent of the timing offset (τ ). As a result, for a fixed P f or P d , we can obtain the accurate threshold without http://jwcn.eurasipjournals.com/content/2014/1/224 explicitly estimating τ . So, considering the terms in (25) and (26): From (29), we can see that τ only appears in the terms W (i; τ , L) 4 . But now consider W (i; τ , L) in Figure 3, which we have plotted against i for different values of τ (using L = 4 as an example). We can clearly see that W (i; τ , L) ≥ 0 and the timing offset τ only affects the position (i.e., the i value) corresponding to (W (i; τ , L)) max and not the actual value of (W (i; τ , L)) max . As a result, W (i; τ , L) 4 are both constants for fixed L and any value of τ . Therefore, P d and P f are in fact completely independent of τ . So we will get an accurate threshold γ 2 in (23) for a given P d or P f , and thus greatly reduce the effect of estimation error for timing offset.

Simulation results
In this section, we investigate the performance of the proposed sensing scheme for OFDM signals over frequency selective Rayleigh fading channels, where h l ∼  CN (0, 1). To simplify the simulation processes, we assume that the carrier frequency offset (f q ) is known. We fix P f = 0.05, and from (25), we calculate γ 2 . Then, with γ 2 known, and via 10 6 Monte Carlo simulations for T 1 in (23), we estimate P d . Figure 4 is a performance comparison of the proposed CP detection method (based on (23)) with the recent OFDM sensing schemes in [21,22]. We also examine the performance of the optimal detector based on (19), where we use exact value for τ . The OFDM block size is chosen as N d = 256 and the CP is set to N c = N d /32. The total number of received OFDM blocks is set to M = 50 and the number of mulitpaths is L = 4. The probability of misdetection (P m ) is defined as P m = 1 − P d . As expected, the optimal detector approach of (19) is the best, but our proposed sub-optimal approach of (23) comes second, outperforming [21,22]. The reason for the improvement is that the proposed method computes the correlation over the whole CP range and uses the vector R in (15) instead of a single R i , not withstanding the approximation that all the elements of (15) are independent.  Clearly, the higher the CP ratio, the lower will be P m . However, increasing the CP ratio will also increase the signal redundancy and so decrease the system performance.
The performance of our proposed method under different numbers (M) of received OFDM blocks is shown in Figure 6, where N d = 512; N c = N d /32; P f = 0.05, and L = 4. It is apparent that by the increasing M, then P m rapidly decreases. Moreover, the performance improvement due to an increase in M is smaller for low SNR compared to high SNR. On the other hand, the larger M, the longer the sensing time that will be needed. So in practical applications, we should make a trade-off between the sensing time and the detection performance. Figure 7 illustrates the performance of the proposed method under small M so as to further analyze the impact of M. The parameters are set as N d = 256, and the CP is chosen as to N c = N d /32. It is clear that when M is small (less than 10), then P m is too large. The performance degradation is due to both the auto-correlation computation and the fact that the approximation by a Gaussian random variable does not hold anymore. When M is small, Figure 7 Performance analysis of the proposed algorithm for small numbers of received OFDM blocks. P m = 1 − P d performance of our proposed method for small numbers (M) of received OFDM blocks. http://jwcn.eurasipjournals.com/content/2014/1/224 the value of T 1 in (23) is small. So the difference between the T 1 in H 0 and H 1 is not obvious, which will increase the error and decrease the performance. On the other hand, the assumption will not hold anymore if the M is small. So a large error will be obtained. As a result, both factors will affect the overall final performance.

Conclusions
In this paper, a new spectrum sensing method for OFDM signals is investigated. The proposed algorithm uses the unique CP property of OFDM signals to detect the presence of a primary user over frequency selective channels. The multivariate pdfs for a correlation vector (exploiting the CP property) under both hypotheses (i.e., presence and absence of primary) are calculated. These are then used to construct a test statistic. The expressions derived for P d and P f are independent of the timing offset parameter (τ ), and so unlike other methods, no estimation of τ is required to obtain the threshold. The simulation results show that the proposed improved CP detector outperforms recently published algorithms dealing with a similar problem and it can also achieve a good performance at very low SNR. We also show in Figure 4 that, assuming independence of all the elements of (15), although not strictly correct, reach in an excellent CP detector. Moreover, the impact on the algorithm's performance of changing either the CP ratio or the number of received OFDM blocks is also illustrated. Clearly, these parameters should be carefully chosen as a trade-off between detection and system performance.