Research Article  Open Access
A Spectrum Sensing Method Based on Empirical Mode Decomposition and KMeans Clustering Algorithm
Abstract
To solve the problems of poor performance of traditional spectrum sensing method under low signaltonoise ratio, a new spectrum sensing method based on Empirical Mode Decomposition algorithm and Kmeans clustering algorithm is proposed. Firstly, the Empirical Mode Decomposition algorithm and the wavelet threshold algorithm are used to remove the noise components in the spectrum sensing signal, and Kmeans clustering algorithm is used to determine whether the primary user exists. The method can remove the redundant components such as noise in the nonstationary or nonlinear sampling signal in the real environment and does not need to know the prior information such as signal, channel, and noise, so it can well handle the complicated sensing signal in real environment. This method can reduce the impact of noise on the spectrum sensing system and thus can improve the sensing performance of the system. In the experimental part, the difference between maximum and minimum eigenvalues and the difference between the maximum eigenvalue and the average energy in the random matrix are selected as signal features. Experiments also show that the proposed method is better than the traditional spectrum sensing methods.
1. Introduction
Spectrum sensing technology is the key technology of cognitive radio. The main purpose is to detect spectrum holes and improve spectrum utilization. Conventional spectrum sensing methods include energy detection, matched filter, and the cyclostationary feature detection [1–4]. The perceived signals received in the actual environment include noise, which can affect the sensing performance of traditional spectrum sensing methods [5, 6].
Spectrum sensing based on random matrix is a cooperative spectrum sensing method. This method does not require prior knowledge of sampling signals and can reduce the interference of various fading factors in the environment. Therefore, the method of random matrix theory is gradually applied to spectrum sensing. Literature [7] has extracted a perception method based on the Difference between maximum and minimum eigenvalue (DMM). This method uses DMM as the test statistic and then makes a decision by calculating the threshold. However, the algorithm is susceptible to low signaltonoise ratio (SNR) and few collaborative users, which will greatly affect the system performance. The literature [8] proposed the Maximum to Minimum Eigenvalue (MME) spectrum sensing method. The method uses the MME eigenvalue as the test statistic to reduce the influence of noise uncertainty, but only when the number of samples is high does it have good sensing performance. Literature [9] proposed a spectrum sensing method based on the Difference between Maximum Eigenvalue and the Average Energy (DMEAE). This method uses DMEAE eigenvalue as the test statistic and derive the corresponding threshold to make a decision. Since the statistical covariance of the received signal and noise are usually different, they can be used to distinguish between the presence of the primary user signal and the presence of noise only. However, the traditional method of random matrix theory will have the problem of inaccurate estimation of the threshold. At the same time, in the complex real environment, the SNR of the primary user signal is low and susceptible to the multipath fading and time diffusion of the wireless channel, which will greatly affect the system performance.
In order to solve the problem of inaccurate threshold derivation in traditional stochastic matrix theory, the literature [10] proposed spectrum sensing method based on signal eigenvalue and clustering algorithm. This method uses a Kmeans clustering algorithm and signal eigenvalues to train a classifier and use the classifier to determine whether the primary user signal exists. Spectrum sensing can also be considered as a problem of two classifications (the existence of a primary user or the absence of a primary user). Because the clustering algorithm can deal with the two classification problems well, the spectrum sensing method based on machine learning has gradually become a focus of people’s research. Literature [11] proposed a spectrum sensing method based on Kmeans clustering. This method takes the energy of the signal as a feature and then divides this feature into a channel available class or a channel unavailable class through a Kmeans clustering algorithm. Literature [12] proposed a spectrum sensing method combining support vector machine and MME. The literature [13] analyzes the spectrum sensing performance under different clustering algorithms. Compared with the traditional spectrum sensing method, the spectrum sensing method based on machine learning is more adaptive and does not need to know the prior knowledge of the sensing environment. However, taking into account the actual environment, the signal often contains complex uncertain noises which will affect the effectiveness of the clustering algorithm, making the spectrum sensing system have poor clustering performance at low SNR and it will affect the sensing performance of the entire system.
In a cognitive radio network, noise in the actual environment will affect the sensing performance of the system. In order to improve the sensing performance of the system, it is necessary to remove redundant information such as noise in the spectrum signal. However, most signals received by the system are nonstationary and nonlinear. In order to deal with nonstationary and nonlinear signals, the traditional methods use shorttime Fourier transform, WignerVille distribution, and wavelet transform. However, these methods are essentially Fourier transforms, which are subject to indefinite principles. Therefore, there are certain defects in the traditional signal processing methods. Literature [14] proposed an Empirical Mode Decomposition (EMD) algorithm that decomposes complex signals into a collection of Intrinsic Mode Functions (IMF). Literature [15] proposed a spectrum sensing method based on HilbertHuang Transform (HHT). First, the spectrum signal is subjected to EMD decomposition to obtain the IMF component. Calculate the Hilbert spectrum and total HHT spectrum for each IMF component and then find the total marginal spectrum. Compare the total marginal spectrum with the threshold to determine whether the primary user exists.
In order to make the system have good adaptability in the actual environment, reduce the impact of noise and accurately determine whether the main user exists. Based on previous studies, we propose a spectrum sensing method (KEMDSS) based on EMD algorithm and Kmeans clustering algorithm. The KEMDSS method will uses EMD algorithm and wavelet threshold algorithm to process the received spectrum signal, removing the redundant information in the signal, and then use the Kmeans clustering algorithm to determine whether the primary user exists. To verify the effectiveness of the KEMDSS method, this article uses DMM and DMEAE as signal features. The experimental results also show that KEMDSS method can improve the sensing performance of the system no matter which feature is used.
2. System Model
The KEMDSS method is mainly composed of a signal processing part and a clustering algorithm part. In order to be able to deal with complex spectrum signals in the actual environment, we posed a signal processing method (WEMD) which combines the EMD algorithm and the wavelet threshold algorithm. According to the multiscale filtering characteristics of EMD, the spectrum signal can be decomposed into several highfrequency and lowfrequency IMF components. Considering signal noise and other interference factors are mainly concentrated in the highfrequency band, the WEMD method uses wavelet algorithm to remove the noise in highfrequency IMF components. The purpose is to reduce the impact of noise and other factors on the system. The clustering algorithm mainly uses the DMEAE and DMM signal features, collects a certain amount of training sets and test sets, and then uses the Kmeans clustering algorithm to train the classifiers for judgment, thereby determining whether the primary user exists. The entire KEMDSS flowchart is as shown in Figure 1.
2.1. Cognitive Radio Network Model
KEMDSS is a cooperative spectrum sensing method. The cooperative spectrum sensing system can reduce the influence of uncertain factors such as multipath fading in the actual environment and thus can improve the sensing performance of the entire system. Assume that there are secondary users (SU) in the cognitive radio network and each SU has sampling points. We assume that indicates that the primary user (PU) signal does not exist and indicates that the primary user PU exists. So the model of the received signal under these two assumptions can be expressed as
where represents the PU signal and represents a Gaussian white noise signal with a mean of 0 and a variance of . Assume that and , respectively, indicate the state of the PU. The availability A of the channel can be defined as
where A = 0 indicates that the channel is unavailable and A = 1 indicates that the channel is available. The false alarm probability () and detection probability () of the system can be defined as
2.2. WEMD Signal Processing Algorithm
2.2.1. EMD Algorithm
This paper introduces the EMD algorithm. Compared to traditional signal processing methods, EMD algorithm can handle nonstationary and nonlinear signals well. The EMD algorithm decomposes the original signal into several IMF components based on the local time feature scale of the signal [14]. The specific steps of the EMD decomposition process are as follows.
Step 1. Find all local maxima and local minima in the spectrum signal .
Step 2. Find the maximum envelope and the minimum envelope , and calculate the average :
Step 3. Subtract from the original signal to get the first component :Determine whether satisfies the two conditions of the IMF. If Step 4 is satisfied, perform Steps 1 and 2 for to obtain the mean envelope , and calculate :In order until meets the IMF condition, then is the first IMF component.
Step 4. Subtract from the spectrum signal to obtain residual ; that is,Treat as the original signal and repeat Steps 1~4 to get . And so on until the residual is a monotonous function or a constant. Therefore, the signal can be expressed as
2.2.2. Wavelet Threshold Algorithm
Considering wavelet coefficients of signal and noise are different, so the wavelet threshold algorithm can remove noise components in the signal based on this characteristic. The specific steps of the wavelet threshold denoise algorithm are as follows [16, 17].
Step 1. Wavelet transform the signal to obtain the wavelet coefficient .
Step 2. Threshold the wavelet coefficients to obtain the estimated coefficient .
Step 3. Use to perform wavelet reconstruction and obtain the denoised signal.
This paper will use the soft threshold function, which is expressed as follows:
where is the VisuShrink threshold proposed by Donoho and Johnstone [16], which satisfy
where is the standard deviation of noise and is the number of sample points of the signal.
2.2.3. WEMD Signal Processing Algorithm
After EMD decomposition, the spectrum signal can be represented by adding several IMF components and residual components. In an actual environment, noise usually occurs at high frequencies and useful signals are generally concentrated at low frequencies. Therefore, some highband IMF can be removed, and then the remaining IMF can be reconstructed to obtain denoised signals, but this method will lose some useful signals [18]. In order to solve this problem, WEMD signal processing algorithm is proposed in this paper. After the signal is decomposed by EMD, wavelet threshold method is used to denoise highband IMF to obtain DIMF, then DIMF and the original lowband IMF are superimposed to obtain the reconstructed signal .
The literature [19] proves that this algorithm can remove the noise component of the original signal well, and it will not lose the useful information in the original signal. Therefore, the use of WEMD signal processing method can reduce the interference of noise on the spectrum sensing system and improve the system sensing performance. Figure 2 shows the WEMD signal processing flow chart.
WEMD signal processing algorithm steps are as follows.
Step 1. The spectrum signal is decomposed by EMD to obtain IMF components.
Step 2. Find the highfrequency components in the IMF and obtain the critical point .
The literature [20, 21] uses the continuous mean square error criterion to find the critical value :Among them, N represents the sampling point number of the signal . The critical point represents the global minimum point of all energy and is also the demarcation point between the lowfrequency band and the highfrequency band.
Step 3. Use the wavelet soft threshold algorithm to denoise the highfrequency components to obtain the denoised component .
Step 4. The DIMF is superimposed with the original lowfrequency IMF to obtain the reconstructed signal .
2.3. Clustering Algorithm Model
After the spectrum signal is processed by the WEMD algorithm, we will use the Kmeans clustering algorithm for further processing. The traditional spectrum sensing method generally deduces the corresponding threshold to judge whether the main user exists, but the problem of inaccurate threshold derivation occurs. Spectrum sensing can also be considered as a problem of two classifications (PU presence or PU absence). KEMDSS method will use the Kmeans clustering algorithm to determine whether the primary user exists. Tradition spectrum sensing methods for machine learning often use energy features to characterize signals. Then the clustering algorithm is used to divide the feature values into channel usable classes and channel unavailable classes. In this paper, we use the eigenvalues of the covariance matrix in the random matrix to describe the signal characteristics.
Assuming that represents the reconstructed sample vector of the ith SU user, the sensing matrix in a period of time can be expressed as
Therefore, the covariance matrix of the signal can be expressed as . Traditional random matrix spectrum sensing method usually uses DMM eigenvalues and DMEAE eigenvalues as the statistics and then deduced the corresponding thresholds to judge. However, the traditional method has relatively high requirements for the derivation of the threshold, and it cannot adaptively make corresponding changes according to different sensing environments, which will adversely affect the sensing performance of the entire system. Therefore, this paper introduces the method of Kmeans clustering algorithm on the traditional method of random matrix. The status of the primary user is determined by training the classifier.
In the sensing system, the signal eigenvalues of SU nodes are first collected and use these eigenvalues to construct a training set:
where is a column vector, represents the random matrix eigenvalues, and represents the number of eigenvalues. After this training set is obtained, the Kmeans clustering algorithm is used to classify these features and train a classifier. Considering the actual situation of spectrum sensing, it is generally divided into two categories. One class represents that the primary user does not exist, and the other represents the primary user exists. After the training process is completed, the corresponding cluster center is obtained. We use formula (17) to make the decision [11]. Where is used to control and of the system, represents the number of clusters. In this paper, the value of is 2.
If the data of the test set satisfies (17), it is determined as A = 1; otherwise it is determined as A = 0.
The specific steps of the Kmeans clustering algorithm are as follows.
Step 1. Firstly we collect sufficient number of training feature matrix T.
Step 2. Randomly initialize the cluster center .
Step 3. Calculate the distance from each feature to each cluster center , find the smallest and reclassify.
Step 4. Calculate the mean of all points in each cluster and take this as a new cluster center.
Step 5. Calculate . If converges, the algorithm stops; otherwise returns to Step 3.
Step 6. After successful training the classifier, we import the corresponding test set and make a corresponding decision on channel availability A by formula (17).
Step 7. Calculate the corresponding and according to formula (3) and formula (4).
The entire training and testing flowchart is as shown in Figure 3. Table 1 shows KEMDSS algorithm.

3. Experimental Part
In order to simulate the actual environment, this experiment uses the FM signal, chirp signal, and mixed signal as experimental simulation signals. The carrier frequency is 702 KHz and the sampling rate is 4 MHz. To ensure the accuracy of the experiment, we obtained 1000 signal features (DMEAE, DMM), 500 of them were used as training sets and 500 were used as test sets.
3.1. Clustering Algorithm Classification Effect
In order to verify the effectiveness of the method, we first simulated the mixed signal. In the experimental part, we adopted two characteristic values of DMEAE and DMM. The clustering results are shown in Figures 4–7.(1)DMEAE clustering effect graph under SNR=16(2)SNR=16 DMM clustering effect chart
Figures 4 and 5 show the clustering of DMEAE features before and after the KEMDSS method under SNR=16, respectively. Figures 6 and 7, respectively, show that in the conditions of SNR=16, the DMM features are processed before and after the KEMDSS method. It can be seen from the above that after the KEMDSS method is processed, the clustering effect of the two features is better than the original. This is because after the KEMDSS method is processed, the difference between the sampled signal covariance matrix and the noise covariance matrix is more obvious, so the eigenvalue of the covariance matrix has a better clustering effect under the Kmeans clustering algorithm.
3.2. ROC Curve under Constant False Alarm Condition
In order to reflect the superiority of the KEMDSS method, we used the KEMDSS method and the traditional EMD (TEMD) method to process the spectrum signal. The TEMD method decomposes the spectrum signal and discards some highband signals. However, the KEMDSS method uses the wavelet threshold method to further process the highfrequency signals. The test results of the two methods are as follows.
(1) ROC Curve of DMEAE Characteristics. Figures 8 and 9 show the ROC curves of the DMEAE features after KEMDSS and TEMD processing at different SNR, respectively. From this we can see that the detection performance of the spectrum signal after KEMDSS method or TEMD method is better than the original one, and the best effect can be achieved by using KEMDSS method. Tables 2 and 3 show the detection probability of each algorithm when the false alarm probability is constant at different SNR. From Table 2, we can see that, under the condition of SNR=16 and , the using KEMDSS and TEMD as the algorithm has improved the detection performance by 69% and 41%, respectively, compared with the traditional algorithm. This is because both KEMDSS and TEMD can remove the noise in the spectrum signal. Compared with the TEMD method, KEMDSS can remove the redundant components such as noise in the spectrum signal without losing some useful signals and thus can obtain better detection results. Table 3 shows the comparison of different algorithms in SNR = 18.


(2) ROC Curves of DMM Features. Figures 10 and 11 show the ROC curves of DMM features after KEMDSS and TEMD processing at different SNR, respectively. From the figure, it can still be seen that the detection performance of the system has been improved after KEMDSS and TEMD removal of noise components. We can find that KEMDSS method is more effective than the TEMD method. Tables 4 and 5 show the detection probability of each algorithm when the false alarm probability is constant under different SNR. From Table 4, we can calculate that, under the condition of SNR = 16 and , using KEMDSS and TEMD as an algorithm is 88% and 62% higher than the conventional algorithm, respectively.


From the experimental results in Section 3.2 we can know that regardless of the characteristics used, the detection performance of the system is improved after the spectrum signal is processed by KEMDSS and TEMD. And the KEMDSS algorithm will have a best result. The sampled signal is processed by the KEMDSS algorithm, which minimizes the impact of noise uncertainties on the system and thus achieves good sensing performance.
3.3. ROC Curve for Different Cooperative Users
Figures 12 and 13 show the ROC curve of the KEMDSS algorithm under different numbers of users. From this we can see that the sensing performance of the system is better as the number of collaborative users increases. This is because cooperative perception can reduce the interference of various factors such as multipath fading and shadows in the propagation environment. Therefore, the greater the number of collaborating users, the stronger the antiinterference ability of the system and the better the sensing performance.
3.4. ROC Curve under FM Signal and Chirp Signal
In order to verify the practicality of the KEMDSS method, different spectrum signals (FM signals and chirp signals) were used for experiments. The specific experimental results are as follows:(1)The simulation results under the FM signal(2)Simulation results under the chirp signal
Figures 14–17 show the ROC curves of the DMM and DMEAE features under the FM and chirp signals, respectively. It can be seen from the figure that, compared with the traditional spectrum sensing method, the KEMDSS method can achieve better detection performance and it can be applied to various spectrum signals in the actual environment. This is because EMD plus wavelet threshold algorithm can remove the noise information in the spectrum signal. It can reduce the impact of noise and other pieces of redundant information on the sensing system, thereby improving the system sensing performance.
4. Conclusions
This paper proposes a spectrum sensing method based on EMD algorithm and Kmeans algorithm. Compared with traditional spectrum sensing methods, KEMDSS can well solve the problem that traditional spectrum sensing methods are affected by noise and the threshold is difficult to determine. The wireless spectrum signal is first processed by the WEMD algorithm, then uses the Kmeans clustering algorithm to train the classifier, and finally uses the classifier to judge whether the primary user exists. In the experimental part, we analyzed the detection results of two random matrix features DMEAE and DMM under the KEMDSS algorithm. From the experimental results, it can be seen that KEMDSS spectrum sensing method has better sensing performance than the conventional spectrum sensing method.
Data Availability
The data used to support the findings of this study are currently under embargo while the research findings are commercialized. Requests for data, 12 months after publication of this article, will be considered by the corresponding author.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported in part by Special Funds from the Central Finance to Support the Development of Local Universities under no. 400170044, the State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences, under Grant no. 20180106, the Science and Technology Program of Guangdong Province under Grant no. 2016B090918031, the Degree and Graduate Education Reform Project of Guangdong Province under Grant no. 2016JGXM_MS_26, the Foundation of Key Laboratory of Machine Intelligence and Advanced Computing of the Ministry of Education under Grant no. MSC201706A, and the Higher Education Quality Projects of Guangdong Province and Guangdong University of Technology.
References
 Z. Quan, S. Cui, and A. H. Sayed, “Optimal linear cooperation for spectrum sensing in cognitive radio networks,” IEEE Journal of Selected Topics in Signal Processing, vol. 2, no. 1, pp. 28–40, 2008. View at: Google Scholar  MathSciNet
 Y. Zeng and Y.C. Liang, “Eigenvaluebased spectrum sensing algorithms for cognitive radio,” IEEE Transactions on Communications, vol. 57, no. 6, pp. 1784–1793, 2009. View at: Publisher Site  Google Scholar
 G. Chen, Y. Li, L. Xiao, and L. Huang, “Collaborative antijamming broadcast with uncoordinated frequency hopping over USRP,” in Proceedings of the 2015 IEEE 81st Vehicular Technology Conference (VTC Spring), pp. 1–6, Glasgow, United Kingdom, May 2015. View at: Publisher Site  Google Scholar
 T. Chen, J. Liu, L. Xiao, and L. Huang, “Antijamming transmissions with learning in heterogenous cognitive radio networks,” in Proceedings of the 2015 IEEE Wireless Communications and Networking Conference Workshops, WCNCW 2015, pp. 293–298, March 2015. View at: Google Scholar
 L. Xiao, Y. Li, X. Huang, and X. Du, “Cloudbased malware detection game for mobile devices with offloading,” IEEE Transactions on Mobile Computing, vol. 16, no. 10, pp. 2742–2750, 2017. View at: Publisher Site  Google Scholar
 L. Xiao, D. Xu, C. Xie, N. B. Mandayam, and H. V. Poor, “Cloud storage defense against advanced persistent threats: a prospect theoretic study,” IEEE Journal on Selected Areas in Communications, vol. 35, no. 3, pp. 534–544, 2017. View at: Publisher Site  Google Scholar
 X. Y. Wang and Y. G. Lu, “DMM based spectrum sensing method for cognitive radio systems,” Journal of Electronics & Information Technology, vol. 32, no. 11, pp. 2571–2575, 2010. View at: Google Scholar
 Y. Zeng and Y. Liang, “Maximumminimum eigenvalue detection for cognitive radio,” in Proceedings of the 18th Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC '07), September 2007. View at: Publisher Site  Google Scholar
 N. Liu, S. H. Shi, and B. Yang, “Spectrum sensing method based on MESED,” Measurement & Control Technology, 2016 (Chinese). View at: Google Scholar
 Y. Zhang, P. Wan, S. Zhang, Y. Wang, and N. Li, “A spectrum sensing method based on signal feature and clustering algorithm in cognitive wireless multimedia sensor networks,” Advances in Multimedia, vol. 2017, no. 4, pp. 1–10, 2017. View at: Google Scholar
 V. Kumar, D. C. Kandpal, M. Jain, R. Gangopadhyay, and S. Debnath, “Kmean clustering based cooperative spectrum sensing in generalized kFading channels,” in Proceedings of the 22nd National Conference on Communication, (NCC '16), March 2016. View at: Publisher Site  Google Scholar
 H. Xue and F. Gao, “A machine learning based spectrumsensing algorithm using sample covariance matrix,” in Proceedings of the 10th International Conference on Communications and Networking in China, CHINACOM 2015, pp. 476–480, August 2015. View at: Publisher Site  Google Scholar
 K. M. Thilina, K. W. Choi, N. Saquib, and E. Hossain, “Machine learning techniques for cooperative spectrum sensing in cognitive radio networks,” IEEE Journal on Selected Areas in Communications, vol. 31, no. 11, pp. 2209–2221, 2013. View at: Publisher Site  Google Scholar
 A. Y. Goharrizi and N. Sepehri, “Internal leakage detection in hydraulic actuators using empirical mode decomposition and hilbert spectrum,” IEEE Transactions on Instrumentation and Measurement, vol. 61, no. 2, pp. 368–378, 2012. View at: Publisher Site  Google Scholar
 Y. Wang, Research on Spectrum Sensing and Spectrum Allocation in Cognitive Radio Networks [Doctoral, thesis] , Post Doctoral Research Report of South China University of Technology, 2016 (Chinese).
 W. Zhang, F. Yu, and H.M. Guo, “Improved adaptive wavelet threshold for image denoising,” in Proceedings of the 2009 Chinese Control and Decision Conference, CCDC 2009, pp. 5958–5963, June 2009. View at: Google Scholar
 F. Luisier, T. Blu, and M. Unser, “A new SURE approach to image denoising: interscale orthonormal wavelet thresholding,” IEEE Transactions on Image Processing, vol. 16, no. 3, pp. 593–606, 2007. View at: Publisher Site  Google Scholar  MathSciNet
 Q. Han, Z. Zhang, D. Wang, L. Liu, and X. Hou, “An OTDR event analysis algorithm based on EMDbased denoising and wavelet transform,” in Proceedings of the 12th IEEE International Conference on Electronic Measurement and Instruments, ICEMI 2015, pp. 1034–1038, July 2015. View at: Google Scholar
 Y. Yan and Z. Cui, “Noise and zero excursion elimination of electrostatic detection signals based on EMD and wavelet transform,” in Proceedings of the 2009 2nd International Congress on Image and Signal Processing, CISP'09, October 2009. View at: Google Scholar
 W. Sun F, Y. Peng H, and U. X. JianHua, “A denoising method for laser ultrasonic signal based on EMD,” Journal of Shandong University, 2008 (Chinese). View at: Google Scholar
 A.O. Boudraa and J.C. Cexus, “EMDbased signal filtering,” IEEE Transactions on Instrumentation & Measurement, vol. 56, no. 6, pp. 2196–2202, 2007. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2018 Yonghua Wang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.