# 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 (**x**_{i},y_{i})_{1≤}_{i}_{≤}_{N} be a set of N training samples, each sample **x**_{i} ∈ R^{d} is a vector, d being the dimension of the input space, belonging to a class labeled by y_{i} ∈ {1, −1}. It amounts to find weight vector **w** and scale b, which satisfy:

_{2}is the margin, and optimal separating hyper-plane (OSH) is the separating hyper-plane which maximizes the margin. The larger the margin, the better the generalization is expected [17]. To search the maximum γ, quadratic programming is usually used, leading to:

**w**·

**x**

_{i}〉 + b = 0 with the largest margin can be obtained. For equality constraints in Equation (2), they can be modified to unconstrained by integrating positive Lagrange multipliers, leading to:

**w**, b, α) by requiring the gradient of L(

**w**, b, α) respect to

**w**and b vanish, a dual form is given by:

According to Equation (3) and Equation (5), it is obvious that $w\left(\alpha \right)=\underset{\mathbf{w},b}{inf}L\left(\mathbf{w},b,\alpha \right)\le L\left(\mathbf{w},b,\alpha \right)$, thus the quadratic programming problem in Equation (3) can be converted to:

_{i}for each training sample, the training samples for which a

_{i}> 0 are called “support vectors”, lying on one of the two hyper-planes: 〈

**w**·

**x**

^{+}〉 + b = +1; 〈

**w**·

**x**

^{−}〉 + b = −1 The training samples will only appear in the form of inner products between vectors.

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:

_{i}≤ C. K(

**x**

_{i},

**x**

_{j}) is the kernel function. As one of the most popular kernel functions, the RBF kernel function is considered in this paper, and it takes the following form:

**w**·

**w**〉:

**w***, ${\alpha}_{i}^{\ast}$ are the solution of Equation (10). Then the decision function is:

**x**is a test sample with an unknown label y. Noting that

**w*** only depend on the training samples (

**x**

_{i}, y

_{i})

_{1≤}

_{i}

_{≤}

_{N}, if we choose a set of training samples (

**x**

_{i}, y

_{i})

_{1≤}

_{i}

_{≤}

_{N}, a unique decision function will be obtained by solving Equation (10).

#### 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 X_{i} = (x_{i}_{1}, x_{i}_{2}, x_{i}_{3}, …x_{iD}), the optimal position for itself is P_{i} = (p_{i}_{1}, p_{i}_{2}, p_{i}_{3}, …p_{iD}) and its speed move to this position is V_{i} = (v_{i}_{1}, v_{i}_{2}, v_{i}_{3}, …v_{iD}), the optimal swarm position is P_{g} = (p_{g}_{1}, p_{g}_{2}, p_{g}_{3}, …p_{gD}), iteration to find the optimal position is given by:

_{1}and c

_{2}are two positive coefficients, r

_{1}and r

_{2}are the random number selected from 0 to 1, ϖ is the flexible coefficient of ${v}_{id}^{t}$. The second part of Equation (12) is called “cognitive” part which is the optimization of the particle itself, and the third part of Equation (12) is the “swarm part”, which is the cooperation with other particles. In addition, a boundary for each particle should be set as, [−x

_{id}

_{max}, x

_{id}

_{max}] and v

_{id}

_{max}. In the process of the iteration, if the parameter of particle is out of the range, they are replaced by the boundary value. For the optimization of the error penalty parameter C and kernel parameter g, each particle is set as (C, g), and a three cross validation is used to estimate the performance of each (C, g), training data is separated into three parts, one part is considered as the validation set and the remaining two parts are for training. Our earlier work has validated this PSO algorithm [19].

## 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 f_{c}, bandwidth W and the received signal is sampled at sampling frequency f_{s}, respectively. When the primary user is active, the discrete received signal at the secondary user is given by [5]:

_{1}. When the primary user is inactive, the received signal is given by:

_{0}. In this paper we only focus on one single point and one antenna spectrum sensing scenario, thus for simplicity we make the following assumptions [5]:

(AS1) The primary signal s(n) is an independent, and identically distributed (IID) random process with mean zero and unknown variance $E\left[{\left|s(n)\right|}^{2}\right]={\sigma}_{s}^{2}$;

(AS2) The noise u(n) is a Gaussian IID random process with mean zero and variance $E\left[{\left|u(n)\right|}^{2}\right]={\sigma}_{u}^{2}$, 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
$\lambda =\frac{{\sigma}_{s}^{2}}{{\sigma}_{u}^{2}}$, under hypothesis H_{1}. 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 P_{d}, which defines, at hypothesis H_{1}, the probability of sensing method correctly detecting the presence of primary user; and probability of false alarm P_{f}, which defines, at hypothesis H_{0}, 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 N_{s} be the number of samples, for simplicity we assume N_{s} = τf_{s}. The test statistics are given by [5]:

_{s}is small, the probability of false alarm P

_{f}for a predefined threshold ε is given by:

The far right-hand side of Equation (20) indicates a class of chi-square variable with 2N_{s} degrees of freedom for complex-valued case. From Equation (20) the threshold ε is related to the P_{f} as ε = chi2^{−1}(P_{f}, 2N_{s}), where chi2^{−1}(·) is inverse of the chi-square cumulative distribution function. For the same threshold ε, the probability of detection P_{d} is given by:

The symbol
${T}_{1}^{\text{'}}$ indicates a class of non-central chi-square variable with 2N_{s} degrees of freedom and a non-centrality parameter λ, in our case,
$\lambda =\frac{{\sigma}_{s}^{2}}{{\sigma}_{u}^{2}}$, 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 2N_{s} 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 P_{f} and the number of samples N_{s} 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 N_{s} 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
${\sigma}_{{s}_{tr}}^{2}={\lambda}_{tr}$, the variance of training noise is
${\sigma}_{{u}_{tr}}^{2}=1$, and training SNR is λ_{tr}.

Secondly, based on the parameter λ_{tr} and number of signal samples N_{s}, two classes of training decision statistics under hypothesis H_{0} and hypothesis H_{1} could be obtained, which are given by:

_{tr}2N

_{s}degrees of freedom, and a non-centrality parameter λ

_{tr}. While the symbol ${{T}_{{0}_{tr}}}^{{N}_{s}}$ indicates a class of central chi-square variables with mean 1 and 2N

_{s}degrees of freedom.

Thirdly, labeling each variable of
${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ class as “+1”, and each variable of
${{T}_{{0}_{tr}}}^{{N}_{s}}$ 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 ${{T}_{{0}_{tr}}}^{{N}_{s}}$ class are applied to test this decision function so as to gain the probability (denoted as ${P}_{e}^{{N}_{s},{\lambda}_{tr}}$) that the decision function mistakenly label a ${{T}_{{0}_{tr}}}^{{N}_{s}}$ variable as a ${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ 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 ${{T}_{{0}_{tr}}}^{{N}_{s}}$ class to separating hyper-plane is given by:

Each set of parameter λ_{tr} and N_{s} will be used to generate two classes of variable:
${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ and
${{T}_{{0}_{tr}}}^{{N}_{s}}$. A decision function marked as f_{Ns, Pf}(x) could be obtained by training PSO-SVM with these two classes of data. Finally, the decision function f_{Ns, 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 f_{Ns, 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 N_{s} and probability of false alarm P_{f}) 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 N_{s} = 5 and probability of false alarm is P_{f} = 0.1, the proposed system would apply decision function f_{5,0.1}(x) as the non-linear threshold.

If a decision function f_{Ns, 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
${T}_{1}^{\prime}={T}_{1}/{\sigma}_{u}^{2}$ variable with the noise power
${{T}_{0}}^{\text{'}}={T}_{0}/{\sigma}_{u}^{2}$ to make a decision. To guarantee a reliable detection, the threshold must be set according to the actual noise power
${\sigma}_{u}^{2}$ and the number of samples N_{s} [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
${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ variables and
${{T}_{{0}_{tr}}}^{{N}_{s}}$ variables to train PSO-SVM during each training process. Taking the simulation process in this article as an instance, 500 variables from
${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ and the same from
${{T}_{{0}_{tr}}}^{{N}_{s}}$ are deployed for each training process, of which computational complexity is about O(1000^{3}) [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 N_{s} multiplications and additions. Hence, the computational complexity of the proposed methods is about N_{s} + 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 P_{d} 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 N_{s} = 5. If the SNR of the actual received signal is low and the number of signal samples is small e.g., λ = 0 dB and N_{s} = 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 N_{s} = 5. Although the actual SNR λ increases to 5 dB but the number of signal samples N_{s} = 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 P_{d} of the proposed method and traditional energy detection for fixed P_{f} = 0.1 and number of signal samples N_{s} = 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
$y\frac{\left|\langle \mathbf{w}\cdot \mathbf{x}\rangle +b\right|}{{\Vert \mathbf{w}\Vert}_{2}}\ge \gamma $. 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:

**x**, y) is the data mistakenly separated by ${\stackrel{\wedge}{\mathbf{w}}}_{t-1}={\left({\mathbf{w}}_{t-1}^{\text{'}},{b}_{t-1}/R\right)}^{\text{'}}$ and the t − th update is given by:

_{t}/R = b

_{t}

_{−1}/R + αyR, α is Lagrange multiplier and we can obtain a result:

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]

**Figure 2.**Training Results of Table 3.

**Figure 3.**Receiver operating characteristic curve of the proposed method and traditional energy detection for number of signal samples N

_{s}= 5 and actual SNR λ = 0 dB.

**Figure 4.**Receiver operating characteristic curve of the proposed method and traditional energy detection for P

_{d}for number of signal samples N

_{s}= 5 and actual SNR λ = 5 dB.

**Figure 5.**P

_{d}of the proposed method and traditional energy detection for number of signal samples, N

_{s}= 1,000, P

_{f}= 0.1 and actual SNR λ = −20 dB −0 dB.

N_{s} | number of signal samples for spectrum sensing |
---|---|

s (n) | actual received primary signal sample |

u (n) | actual received noise sample |

s_{tr} (n) | training primary signal sample in offline module |

u_{tr} (n) | training noise sample in offline module |

${\sigma}_{s}^{2}$ | variance of actual received primary signal |

${\sigma}_{u}^{2}$ | variance of actual noise |

${\sigma}_{{s}_{tr}}^{2}={\lambda}_{tr}$ | variance of training primary signal in offline module |

${\sigma}_{{u}_{tr}}^{2}=1$ | 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 |

T_{1} | actual decision statistic at hypothesis H_{1} |

T_{0} | actual decision statistic at hypothesis H_{0} |

${T}^{\text{'}}=T/{\sigma}_{u}^{2}$ | normalized actual decision statistic |

${T}_{1}^{\prime}={T}_{1}/{\sigma}_{u}^{2}$ | normalized actual decision statistic at hypothesis H_{1} |

${T}_{0}^{\prime}={T}_{0}/{\sigma}_{u}^{2}$ | normalized actual decision statistic at hypothesis H_{0} |

${T}_{{1}_{tr}}^{{N}_{s},{\lambda}_{tr}}$ | training decision statistic defined by N_{s}, λ_{tr} at hypothesis H_{1} in offline module |

${{T}_{{0}_{tr}}}^{{N}_{s}}$ | training decision statistic defined by N_{s} at hypothesis H_{0} in offline module |

1. Generate training signal s_{tr} (n) and training noise u_{tr} (n), with
${\sigma}_{{s}_{tr}}^{2}=1$,
. |

2. Compute two classes of data: ${{T}_{{0}_{tr}}}^{{N}_{s}}$, by (24) and (25). |

3. Train PSO-SVM with two classes of data: ${{T}_{{0}_{tr}}}^{{N}_{s}}$, to obtain a decision function f (x). |

4. Test this f (x) with the variables of ${P}_{e}^{{N}_{s},{\lambda}_{tr}}={P}_{f}$ class to obtain , based on Proposition 1 . |

5: Return f (x) as f_{Ns, Pf}, and store it as non-linear threshold. |

N_{s} = 5 | N_{s} = 10 | ||||
---|---|---|---|---|---|

λ_{tr} | P_{f} | f_{Ns, Pf}(x) | λ_{tr} | P_{f} | f_{Ns, Pf}(x) |

−35.7 dB | 0.9 | f_{5,0.9}(x) | −37.1 dB | 0.9 | f_{10,0.9}(x) |

−29.8 dB | 0.8 | f_{5,0.8}(x) | −32.8 dB | 0.8 | f_{10,0.8}(x) |

−24.9 dB | 0.7 | f_{5,0.7}(x) | −27.2 dB | 0.7 | f_{10,0.7}(x) |

−20.4 dB | 0.6 | f_{5,0.6}(x) | −21.6 dB | 0.6 | f_{10,0.6}(x) |

−16.5 dB | 0.5 | f_{5,0.5}(x) | −18.4 dB | 0.5 | f_{10,0.5}(x) |

−6.5 dB | 0.4 | f_{5,0.4}(x) | −8.1 dB | 0.4 | f_{10,0.4}(x) |

−2.8 dB | 0.3 | f_{5,0.3}(x) | −4.2 dB | 0.3 | f_{10,0.3}(x) |

−0.2 dB | 0.2 | f_{5,0.2}(x) | −1.7 dB | 0.2 | f_{10,0.2}(x) |

2.3 dB | 0.1 | f_{5,0.1}(x) | −0.2 dB | 0.1 | f_{10,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

**MDPI and ACS Style**

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

**AMA Style**

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 Style**

Cai, 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