A Modular Spectrum Sensing System Based on PSO-SVM
Abstract
: In the cognitive radio system, spectrum sensing for detecting the presence of primary users in a licensed spectrum is a fundamental problem. Energy detection is the most popular spectrum sensing scheme used to differentiate the case where the primary user's signal is present from the case where there is only noise. In fact, the nature of spectrum sensing can be taken as a binary classification problem, and energy detection is a linear classifier. If the signal-to-noise ratio (SNR) of the received signal is low, and the number of received signal samples for sensing is small, the binary classification problem is linearly inseparable. In this situation the performance of energy detection will decrease seriously. In this paper, a novel approach for obtaining a nonlinear threshold based on support vector machine with particle swarm optimization (PSO-SVM) to replace the linear threshold used in traditional energy detection is proposed. Simulations demonstrate that the performance of the proposed algorithm is much better than that of traditional energy detection.1. Introduction
Based on the conventional fixed spectrum allocation policy, most available radio spectra have been assigned to registered users, which lead to a serious waste of spectrum utilization. In fact, recent reports from Federal Communications Commission (FCC) have shown that only 30% of the allocated spectrum in US is fully utilized [1]. Cognitive radio, which enables secondary users to utilize the spectrum when primary users are not occupying it, has been proposed as a promising technology to improve spectrum utilization efficiency [2–4], and has three essential components: (1) Spectrum sensing: the secondary users sense the radio spectrum environment within their operating range to detect the frequency bands which are not occupied by primary users; (2) Dynamic spectrum management: cognitive radio networks dynamically select the best available bands for communication; (3) Adaptive communications: a cognitive radio device can configure its transmission parameters (e.g., carrier frequency, transmission power) to opportunistically make best use of the ever changing available spectrum [5].
Spectrum sensing is a fundamental task for cognitive radio. However, there are several factors that make spectrum sensing practically challenging (e.g., low signal-to-noise ratio (SNR) of primary users, noise uncertainty, multipath fading). Several sensing methods have been proposed, including likelihood ratio test (LRT) [6–8], energy detection method [9,10], match filtering (MF) method [11], cyclostationary detection method [12,13] and the statistical covariances-based method [14]. Each of them has its own advantages and disadvantages, e.g., LRT is proven to be optimal, but it requires exact channel information and distributions of the primary signal and noise. The MF-based method needs perfect knowledge of the channel responses from primary users to the receiver and accurate synchronization (otherwise, its performance will dramatically be reduced) [15], it may not be possible if the primary users do not cooperate with the secondary users. The cyclostationary detection method requires the cyclic frequencies of the primary users, which may not be realistic for many spectrum reuse applications. Furthermore it needs high computation capabilities. The energy detection method does not require any primary signal information and it is robust to unknown dispersed channels and fading, but if the SNR of the received signal is low, the number of received signal samples is small and the power of noise is estimated inaccurately, the energy detection performance will decrease seriously [11]. The covariances-based method also does not require any prior information, but its computation complexity is also high [14].
As mentioned one drawback of the traditional energy detection is that if the SNR of received signal is low and the number of the received signal samples is small the corresponding performance may decrease seriously. In order to overcome this drawback a novel method with the purpose of obtaining a nonlinear threshold for energy detection based on PSO-SVM is proposed in this paper. The proposed method focuses on one single point and one antenna scenario, which can be divided into Offline module and Online module. In the Offline module, the proposed system generates two classes of training samples, one for the simulated situation that both signal and noise exist simultaneously while another case is for noise only. The normalized energy of these two classes of training samples is used as the classification feature to train the PSO-SVM. After each training step, a decision function is generated. In the Online module, the decision functions obtained in the Offline module are used as the nonlinear thresholds for energy detection to verify if the primary user is present. The experimental results show that the receiver operating characteristic (ROC) curve of proposed approach is much better than traditional energy detection. The rest of this paper is organized as follows: the PSO-SVM is introduced in Section 2. In Section 3 determination of threshold and theoretical analysis are proposed. Simulation results are given in Section 4. Conclusions are finally drawn in Section 5.
2. PSO-SVM
2.1. SVM
In this subsection, a brief introduction to SVM, proposed by Vapnik [16], is given. Let (xi,yi)1≤i≤N be a set of N training samples, each sample xi ∈ Rd is a vector, d being the dimension of the input space, belonging to a class labeled by yi ∈ {1, −1}. It amounts to find weight vector w and scale b, which satisfy:
According to Equation (3) and Equation (5), it is obvious that , thus the quadratic programming problem in Equation (3) can be converted to:
In the nonlinear case, the approach adapted to noisy data is to make a soft margin. We introduce the slack variables ξi ≥ 0, i = 1, 2, …, N so that:
The generalized OSH is the solution of minimizing:
In the nonlinear SVM, a kernel function is introduced to map the initial data into a feature space with a high dimension. In the new space, the data should be linearly separable. Then Equation (6) can be converted to:
2.2. Particle Swarm Optimization
The parameters C and g need to be set to solve Equation (10). However, in a practical situation it is difficult to set these two parameters properly. In this subsection, we integrate a PSO (particle swarm optimization) method to adaptively set C and g.
Particle Swarm Optimization (PSO) is inspired by the social behavior of birds, birds in a swarm preying on food and cooperation with each other to search for the optimal position to obtain the food. In a PSO optimal problem, there are a group of individuals, each individual is called a “particle”, which may be a potential solution. Suppose that the solution space of optimization problem is D dimensions. The i-th particle is Xi = (xi1, xi2, xi3, …xiD), the optimal position for itself is Pi = (pi1, pi2, pi3, …piD) and its speed move to this position is Vi = (vi1, vi2, vi3, …viD), the optimal swarm position is Pg = (pg1, pg2, pg3, …pgD), iteration to find the optimal position is given by:
3. Threshold Determination and Theoretical Analysis
Common notation as summarized in Table 1 is used throughout this section.
3.1. Basic Conception of Energy Detection
In this subsection we introduce the general model for spectrum sensing, then review the energy detection scheme and analyze the relationship between the probability of false alarm and probability of detection.
Suppose that we are interested in the frequency band with carrier frequency fc, bandwidth W and the received signal is sampled at sampling frequency fs, respectively. When the primary user is active, the discrete received signal at the secondary user is given by [5]:
(AS1) The primary signal s(n) is an independent, and identically distributed (IID) random process with mean zero and unknown variance ;
(AS2) The noise u(n) is a Gaussian IID random process with mean zero and variance , which can be estimated;
(AS3) The primary signal s(n) is independent of the noise u(n).
The signal-to-noise ratio (SNR) of the actual primary user measured at the secondary receiver of interest is , under hypothesis H1. We consider the circularly symmetric complex Gaussian (CSCG) as the noise case. For the primary signal s(n), we consider complex PSK modulated signal.
Two probabilities are of interest for spectrum sensing: probability of detection Pd, which defines, at hypothesis H1, the probability of sensing method correctly detecting the presence of primary user; and probability of false alarm Pf, which defines, at hypothesis H0, the probability of sensing method claiming the presence of primary user.
Energy detection is one of the most popular spectrum sensing schemes, because of it does not need any prior information about the primary signal and is easy to apply. Let τ be the available sensing time and Ns be the number of samples, for simplicity we assume Ns = τfs. The test statistics are given by [5]:
The far right-hand side of Equation (20) indicates a class of chi-square variable with 2Ns degrees of freedom for complex-valued case. From Equation (20) the threshold ε is related to the Pf as ε = chi2−1(Pf, 2Ns), where chi2−1(·) is inverse of the chi-square cumulative distribution function. For the same threshold ε, the probability of detection Pd is given by:
The symbol indicates a class of non-central chi-square variable with 2Ns degrees of freedom and a non-centrality parameter λ, in our case, , extensive tables exist for the chi-square distribution, but the non-central chi-square has not been as extensively tabulated.
In this paper, we use approximations proposed by Patnaik [20] to replace the non-central chi-square with a central chi-square having a different number of degrees of freedom and a modified threshold level, If the non-central chi-square variable has 2Ns degrees of freedom and non-centrality parameter λ, define a modified number of degrees of freedom D and a threshold divisor G given by:
As mentioned above, when the probability of false alarm Pf and the number of samples Ns is set, we can obtain a unique value of threshold ε, it equals to a linear classifier in binary classification problem. But if the SNR λ is low while the number of signal samples Ns is small, the corresponding spectrum sensing problem is linearly inseparable, and the traditional energy detection can not classify this linearly inseparable problem efficiently.
3.2. Nonlinear Threshold System
To overcome the drawbacks of traditional energy detection mentioned above, the authors here propose a method in purpose of obtaining nonlinearly threshold based on PSO-SVM. The system process encompasses two distinct modules i.e., Offline and Online, which are clearly illustrated by the Figure 1.
3.2.1. Offline Module
The main function of the Offline Module is to generate the nonlinear thresholds for energy detection.
Firstly, the proposed system generates training signal and training noise under AS1-3. Therefore the variance of training signal is a known value , the variance of training noise is , and training SNR is λtr.
Secondly, based on the parameter λtr and number of signal samples Ns, two classes of training decision statistics under hypothesis H0 and hypothesis H1 could be obtained, which are given by:
Thirdly, labeling each variable of class as “+1”, and each variable of class as “−1”, then these two classes of variables are used as training data to train PSO-SVM mentioned in Section 2. Consequently, a separating hyper-plane 〈w*·x 〉 + b = 0 and a decision function f(x) = sign(〈w*·x 〉 + b)could be derived.
In the fourth step, the variables of class are applied to test this decision function so as to gain the probability (denoted as ) that the decision function mistakenly label a variable as a variable.
Proposition1
The probability of a variable mistakenly labeled by decision function is determined by the geometric distance γ which is from this variable to the separating hyper-plane.
Proof
The proof is mainly based on Rosenblatt classifier, and detailed proof is given in Appendix A.
The average geometric distance from variables of class to separating hyper-plane is given by:
Each set of parameter λtr and Ns will be used to generate two classes of variable: and . A decision function marked as fNs, Pf(x) could be obtained by training PSO-SVM with these two classes of data. Finally, the decision function fNs, Pf(x) is stored as a non-linear threshold.
The process to obtain a non-linear threshold is shown in Table 2, and some of typical training results of fNs, Pf(x) are shown in Table 3 and Figure 2.
3.2.2. Online Module
In the Online module, the proposed system automatically chooses one of the decision functions (according to required number of signal samples Ns and probability of false alarm Pf) stored in the Offline Module as non-linear threshold to judge whether the actual primary user is present e.g., the required number of signal samples is Ns = 5 and probability of false alarm is Pf = 0.1, the proposed system would apply decision function f5,0.1(x) as the non-linear threshold.
If a decision function fNs, Pf(x) is chosen as the nonlinear threshold, Equations (20) and (21) will be converted to:
The result of spectrum sensing is given by:
3.2.3. Comparison with Traditional Energy Detection
Energy detection is the basic sensing method, which was first proposed in [9] and further studied in [5,10]. It does not need any information of the signal to be detected and is robust to unknown dispersive channels. Energy detection compares the normalized average power of the actual received signal plus noise variable with the noise power to make a decision. To guarantee a reliable detection, the threshold must be set according to the actual noise power and the number of samples Ns [9]. The difference between the traditional Energy detection and the proposed system is that the proposed system has a Offline module to obtain decision functions as the non-linear thresholds.
In the Offline module, the system needs a great number of variables and variables to train PSO-SVM during each training process. Taking the simulation process in this article as an instance, 500 variables from and the same from are deployed for each training process, of which computational complexity is about O(10003) [16].
As the price of getting the full list of decision functions, the training times are huge. Therefore the overall computational complexity of the offline module is extremely high. However, in a real spectrum sensing situation, we only take care of the computational complexity in the Online module. The computational complexity of traditional Energy detection needs about Ns multiplications and additions. Hence, the computational complexity of the proposed methods is about Ns + 1 multiplications and additions, which is competitive with traditional Energy Detection.
4. Results and Discussion
In this section, we use the decision functions stored in the Offline module as the nonlinear thresholds to simulate the probability of detection Pd in the Online module.
In Figure 3 we compare the receiver operating characteristic curve of the proposed method and traditional energy detection for actual SNR λ = 0dB and number of signal samples Ns = 5. If the SNR of the actual received signal is low and the number of signal samples is small e.g., λ = 0 dB and Ns = 5, the corresponding spectrum sensing problem based on energy detection is a linearly inseparable binary classification problem. Traditional energy detection with a predefined threshold is a linear classifier, it cannot solve linearly inseparable problem efficiently. But the proposed method is a nonlinear classifier based on PSO-SVM, which can solve linearly inseparable problem efficiently. As shown in Figure 3, the performance of the proposed method is much better than traditional energy detection.
In Figure 4 we compare the receiver operating characteristic curve of the proposed method and traditional energy detection in terms of actual SNR λ = 5 dB and number of signal samples Ns = 5. Although the actual SNR λ increases to 5 dB but the number of signal samples Ns = 5 is small, which means the corresponding spectrum sensing problem based on energy detection is still linearly inseparable. Therefore, as shown in Figure 4, the performance of proposed method is dramatically better than the traditional energy detection method.
In Figure 5 we compare Pd of the proposed method and traditional energy detection for fixed Pf = 0.1 and number of signal samples Ns = 1,000, the corresponding performance of the proposed method is still better than energy detection. This is because although the number of sensing samples is large i.e., 1000, but actual SNR λ is low, thus the corresponding spectrum sensing problem is linearly inseparable, however the proposed method can classify linearly inseparable problem efficiently. As shown in Figure 5, at λ = −20 dB the proposed method is almost three times better than traditional energy detection. With the λ increases the spectrum sensing problem coverage to linearly separable, and the difference of performance between the proposed method and the traditional energy detection also decreases.
5. Conclusions
In this paper, a novel modular spectrum sensing method for cognitive radio based on PSO-SVM is proposed. It comprises two distinct modules, i.e., Offline and Online. In the Offline module, the decision functions with associated probabilities of false alarm are obtained. In the Online module, the primary user is detected by using the decision functions obtained in the Offline module.
The proposed method actually is independent from the traditional detection method, a nonlinear decision is exploited to replace the linear threshold, which drastically improves the performance of detection without increasing the computational complexity in Online phase. The approach can be used for various signal detection applications without a priori knowledge of signals and channels. Simulations have been carried to evaluate the performance of the proposed method. It has been shown that the proposed approach is more effective than the traditional energy detection approach in hostile environments. More specifically, when the received signal samples are lacking and SNR is low, the approach proposed in this paper can give a reliable performance, while the traditional energy detection approach is hypodynamic.
In our future research work, we will try to apply the proposed method to enhance more sophisticated detection algorithm which uses predefined linear threshold (e.g., the method proposed in [14]). More specifically, secondary users are located with detected radio map thereby deploying space-time spectrum sensing. And the specific signal pattern from the primary user can be recognized by analyzing the signal detected.
Appendix: Proof of Proposition 1
If the point (x, y) is correctly classified by the optimal hyper-plane . In order to facilitate the analysis, we introduce an additional coordinate to expand the sample, the new sample is x̂ = (x′, R)′, R is a constant, x′ is the transpose of x. Similarly we can use bias b to expand the weighted vector w, and the expanded w is ŵ = (w′, b/R)′, the iteration starts from ŵ = 0, if there is a wrong separation, the ŵ is updated accordingly. Suppose ŵt−1 is the weighed vector before the wrong separation:
Before the t-th mistaken separation there already has t − 1 wrong separations thus we can obtain:
Proposition 1 is proven.
References
- Spectrum Policy Task Force Report; Technical Report TR 02-155; Federal Communications Commission: Washington, DC, USA, 2002.
- Mitola, J.; Maguire, G.Q. Cognitive radio: Making software radios more personal. IEEE Personal Commun. 1999, 6, 13–18. [Google Scholar]
- Mitola, J. Cognitive Radio: An Integrated Agent Architecture for Software Defined Radio. Ph.D. Thesis, Royal Institute of Technology (KTH), Stockholm, Sweden, 2000. [Google Scholar]
- Haykin, S. Cognitive radio: Brain-Empowered wireless communications. IEEE J. Sel. Area Commun. 2005, 23, 201–220. [Google Scholar]
- Liang, Y.C.; Zeng, Y.H.; Peh, E.C.Y.; Hoang, A.T. Sensing-throughput tradeoff for cognitive radio networks. IEEE Trans. Wirel. Commun. 2008, 7, 1326–1337. [Google Scholar]
- Kay, S. Fundamentals of Statistical Signal Processing: Detection Theory, 1st ed.; Prentice-Hall: Englewood Cliffs, NJ, USA, 1998. [Google Scholar]
- Quan, Z.; Cui, S.; Sayed, A.H. Optimal linear cooperation for spectrum sensing in cognitive radio networks. IEEE J. Sel. Top. Signal Process. 2008, 2, 28–40. [Google Scholar]
- Taricco, G. Optimization of linear cooperative spectrum sensing for cognitive radio networks. IEEE J. Sel. Top. Signal Process. 2011, 5, 77–86. [Google Scholar]
- Urkowitz, H. Energy detection of unknown deterministic signals. Proc. IEEE 1967, 55, 523–531. [Google Scholar]
- Sonnenschein, A.; Fishman, P.M. Radiometric detection of spread-spectrum signals in noise of uncertainty power. IEEE Trans. Aerosp. Electron. Syst. 1992, 28, 654–660. [Google Scholar]
- Sahai, A.; Cabric, D. Spectrum Sensing: Fundamental Limits and Practical Challenges. Proceedings of the IEEE DySpan Conference, Baltimore, MD, USA, 8– 11 November 2005.
- Gardner, W.A. Exploitation of spectral redundancy in cyclostationary signals. IEEE Signal Process. Mag. 1991, 8, 14–36. [Google Scholar]
- Gardner, W.A.; Brown, W.A.; Chen, C.K. Spectral correlation of modulated signals—Part II: Digital modulation. IEEE Trans. Commun. 1987, 35, 595–601. [Google Scholar]
- Zeng, Y.H.; Liang, Y.C. Spectrum—Sensing algorithms for cognitive radio based on statistical covariances. IEEE Trans. Veh. Technol. 2009, 58, 1804–1815. [Google Scholar]
- Chen, H.S.; Gao, W.; Daut, D.G. Signature Based Spectrum Sensing Algorithms for IEEE 802.22 WRAN. Proceedings of the IEEE International Conference on Communications, Glasgow, UK, 24–28 June 2007; pp. 6487–6492.
- Vapnik, V.N. The Nature of Statistical Learning Theory, 1st ed.; Springer-Verlag: New York, NY, USA, 1995. [Google Scholar]
- Chapelle, O.; Haffner, P.; Vapnik, V. Support vector machines for histogram-based image classification. IEEE Trans. Neural Netw. 1999, 10, 1055–1064. [Google Scholar]
- Kuhn, H.; Tucker, A. Nonlinear Programming. Proceedings of 2nd Berkeley Symposium on Mathematical Statistics and Probabilistics, Berkeley, CA, USA, 31 July–12 August 1950; pp. 481–492.
- Cai, Z.R.; Zhao, H.L.; Jia, M. Spectrum sensing in cognitive radio based on adaptive optimal SVM. Inform. Technol. J. 2011, 10, 1427–1431. [Google Scholar]
- Patnaik, P.B. The noncentral χ2 and F distributions and their applications. Biometrika 1949, 36, 202–232. [Google Scholar]
Ns | number of signal samples for spectrum sensing |
---|---|
s (n) | actual received primary signal sample |
u (n) | actual received noise sample |
str (n) | training primary signal sample in offline module |
utr (n) | training noise sample in offline module |
variance of actual received primary signal | |
variance of actual noise | |
variance of training primary signal in offline module | |
variance of training noise in offline module | |
λ | SNR of actual received primary signal |
λtr | SNR of training primary signal in offline module |
T | actual decision statistic |
T1 | actual decision statistic at hypothesis H1 |
T0 | actual decision statistic at hypothesis H0 |
normalized actual decision statistic | |
normalized actual decision statistic at hypothesis H1 | |
normalized actual decision statistic at hypothesis H0 | |
training decision statistic defined by Ns, λtr at hypothesis H1 in offline module | |
training decision statistic defined by Ns at hypothesis H0 in offline module |
1. Generate training signal str (n) and training noise utr (n), with , . |
2. Compute two classes of data: , by (24) and (25). |
3. Train PSO-SVM with two classes of data: , to obtain a decision function f (x). |
4. Test this f (x) with the variables of class to obtain , based on Proposition 1 . |
5: Return f (x) as fNs, Pf, and store it as non-linear threshold. |
Ns = 5 | Ns = 10 | ||||
---|---|---|---|---|---|
λtr | Pf | fNs, Pf(x) | λtr | Pf | fNs, Pf(x) |
−35.7 dB | 0.9 | f5,0.9(x) | −37.1 dB | 0.9 | f10,0.9(x) |
−29.8 dB | 0.8 | f5,0.8(x) | −32.8 dB | 0.8 | f10,0.8(x) |
−24.9 dB | 0.7 | f5,0.7(x) | −27.2 dB | 0.7 | f10,0.7(x) |
−20.4 dB | 0.6 | f5,0.6(x) | −21.6 dB | 0.6 | f10,0.6(x) |
−16.5 dB | 0.5 | f5,0.5(x) | −18.4 dB | 0.5 | f10,0.5(x) |
−6.5 dB | 0.4 | f5,0.4(x) | −8.1 dB | 0.4 | f10,0.4(x) |
−2.8 dB | 0.3 | f5,0.3(x) | −4.2 dB | 0.3 | f10,0.3(x) |
−0.2 dB | 0.2 | f5,0.2(x) | −1.7 dB | 0.2 | f10,0.2(x) |
2.3 dB | 0.1 | f5,0.1(x) | −0.2 dB | 0.1 | f10,0.1(x) |
© 2012 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).
Share and Cite
Cai, Z.; Zhao, H.; Yang, Z.; Mo, Y. A Modular Spectrum Sensing System Based on PSO-SVM. Sensors 2012, 12, 15292-15307. https://doi.org/10.3390/s121115292
Cai Z, Zhao H, Yang Z, Mo Y. A Modular Spectrum Sensing System Based on PSO-SVM. Sensors. 2012; 12(11):15292-15307. https://doi.org/10.3390/s121115292
Chicago/Turabian StyleCai, Zhuoran, Honglin Zhao, Zhutian Yang, and Yun Mo. 2012. "A Modular Spectrum Sensing System Based on PSO-SVM" Sensors 12, no. 11: 15292-15307. https://doi.org/10.3390/s121115292
APA StyleCai, Z., Zhao, H., Yang, Z., & Mo, Y. (2012). A Modular Spectrum Sensing System Based on PSO-SVM. Sensors, 12(11), 15292-15307. https://doi.org/10.3390/s121115292