Abstract
A simulation model of spectrum sensing detector based on energy is developed using MATLAB Simulink in this paper. The model is designed considering optimal threshold and Signal-to-Noise Ratio (SNR) conditions. Users own block is designed for optimal threshold calculation, where Matlab algorithm is written in the background (MATLAB editor window). Real and estimated Primary User (PU) activities at different time intervals are investigated and tabulated from the simulation results. Further, the designed model is extended for Cooperative Spectrum Sensing (CSS).
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Research in wireless communication has become an increasingly important topic in twenty-first century with aggravated demand for high data rates, electronic, and communication gadgets across the globe. However the available spectrum is limited due to the static assignment policy. It has been observed by the telecom regulatory bodies that the spectrum has been greatly underutilized most of the time [1].
CR is an existing technology that has sparked intense interest in recent years among research communal. It has a profound impact in wireless communication with the increase in competition for usage of available spectrum. Finding the vacant spectrum band and its usage by SUs while providing adequate protection to PUs is the chief concept of this technology [2, 3]. Thus, Spectrum Sensing (SS) plays a key role. It is one of the most important functionalities of CR. Research has been done on SS techniques by various researchers [4, 5] studying pros and cons of each technique. However, Energy Detection (ED) technique is used in this paper due to its simplicity and ease. Moreover, it is the most commonly used and popular technique with no prior information requirement of PU. Liang et al. [6] in formulated sensing-tradeoff problem using this technique. In CRNs, main focus is to protect PU, i.e., maximize Pd with constraint on Pf. The authors’ further investigated tradeoff problem for low SNR regimes of-15 dB.
An improved ED spectrum sensing scheme based on past history of sensing results (average of test statistics) while preserving same level complexity and application as that of conventional scheme has been proposed by M. L. Benitez and F. Casadevall in [7]. The authors evaluated performance improvement and observed lesser time between two consecutive sensing events for same Pd and Pf. There are three main factors of sensing performance, i.e., channel between PU transmitter and SU, sensing time and detection threshold that have been considered in [8]. The expression for average Pd is derived which is further used by authors’ to optimize detection threshold in terms of SNR. However, the local SS is deteriorated with practical wireless phenomenon like multipath fading and shadowing. Hence, an active technique for improving detection performance by exploiting spatial diversity comes into consideration and has been beautifully presented by I. F. Akyildiz in [9]. In practice, detection performance needs consideration of these practical phenomenon and Cooperative Spectrum Sensing (CSS) takes the power of mitigating these effects.
In this presented paper, simulation model in ED is developed and studied using MATLAB Simulink environment, taking into account optimal threshold and SNR conditions. These are important parameters which needs to be taken care for efficient sensing unlike [6, 7]. Further, the designed model has been extended to CSS with cooperation of five SUs. The paper deals with PU activities at different time intervals for these techniques.
2 The Energy Detection Study
Signal detection in CRN is a binary hypothesis problem and can be represented
where Y(n) is signal samples received at the detector deciding presence or absence of PU, W(n) is AWGN, h is the channel gain, X(n) is PU signal samples at the detector. The detector has to choose one of the hypothesis depending on the test statistics. Energy of the sensed signal is estimated, termed as test statistics using [3].
where N = fs is sample size,is sample time and fs is sampling frequency. T(Y) is compared with λ to conclude a decision. The threshold [6] and decision statistics can be given as
Each SU will either detect presence of PU signal or will detect its absence. If decision statistics, i.e., Z is larger than λ PU exists else does not exist.
3 Simulink
Simulink has been used by numerous researchers for designing and simulating models of multidomains. It is assimilated with Matlab, allowing incorporation of MATLAB algorithms into models [10, 11].
3.1 Vital Subsystem for Spectrum Sensing
The hierarchy of a model includes subsystems. A subsystem contains a subset of blocks within the main model. The subsystems that are vital for SS Simulink model are PU and SU signal [12, 13] (Fig. 1).
White Gaussian noise is added to signal by AWGN channel. The input signal may be real or complex and accordingly produces output signal. S-function blocks (User-Defined Functions block) have been used for spectrum energy and optimal threshold calculation. Matlab algorithm has been written in these blocks and has been further added to the Simulink model. This is how own function blocks are created in Simulink with MATLAB code in the background. S-functions are compiled as MEX files using mex utility. Further, relational operator block has been used to compare signal’s energy with threshold.
3.2 Energy Detection Simulation Model
The model has been developed using blocks of Simulink and by creating subsystems as shown in Fig. 3. Digital clock block is needed when current simulation time is required within a discrete system. The sample time needs to be adjusted. The Abs block outputs absolute value of input. The Buffer block adjusts input sequence to smaller or larger frame size, frame-based processing is performed. Input’s data of each column is redistributed producing different frame size’s output. Slower frame rate output means an input signal is buffered to a larger frame size or vice versa (Fig. 2).
In ED, sampling frequency needs to be at least twice the center frequency in order to satisfy Nyquist criteria. Here, real and estimated activity of PU have been determined by using user-defined block.
3.3 Cooperative Spectrum Sensing Simulation Model
Performance of local SS by individual SU degrades in attendance of fading and shadowing. Thus, researchers have proposed CSS to combat the effects of fading and shadowing [14, 15] in practical wireless scenarios. In his Simulink model five SUs have been taken into consideration to conclude a global decision.
Here, individual decision about the presence/absence of PU is taken by each SU while the global or final decision is taken at the fusion center. In this paper, AND decision rule has been used at the fusion center. CSS takes into account spatial characteristics of each SU.
4 Results and Investigations
The simulation results shown below quantify the real and estimated PU activity for the used techniques, i.e., ED and CSS. The Simulink models have been designed considering optimal threshold and SNR conditions. The PU activity have been modeled randomly as ON/OFF activity corresponding to 1 (presence) and 0 (absence) respectively.
The white gaps within blue bands is when the algorithm missed to detect PU activity due to noise. The performance has been evaluated at 10 dB SNR in Figs. 4 and 5.
The results are fine as ED performs well for high and moderate SNR conditions as shown in Table 1. So, low SNR condition has been taken for further investigation and the results have been demonstrated in Figs. 6, 7 and Table 2.
However, from Figs. 6, 7 and Table 2, it becomes clear that this detection algorithm fails at low SNR, thus giving rise for need of more accurate detectors like cyclostationary- or entropy-based detectors to perform well in low SNR conditions.
The designed Simulink model refreshes after every 3 s for each value of SNR. Afterwards, a new SNR floor is selected and probability of detection is estimated for the previous SNR value.
From Fig. 8 it can be clearly observed that the technique works well for moderate and high SNR conditions and for low SNR values it is deteriorating constantly. Further, CSS simulation results for PU activity considering five SUs have been shown in Figs. 9, 10. For simplicity, AND decision rule has been used at fusion center to reach a global decision.
CSS aids in accurate detection of PU signal considering spatial characteristics. The above Table 3 shows the real and estimated PU activities at 10 dB SNR.
5 Conclusions
In this paper, Simulink model for ED and CSS scheme have been designed. Users own block has been designed for optimal threshold calculation, where MATLAB algorithm has been written in the background (MATLAB editor window). Thus, making it convenient for implementing whole concept of the specified technique. Further, investigations have been performed for high and low SNR conditions. Optimal threshold and Signal to Noise Ratio (SNR) conditions have been considered providing more accurate results. It can be concluded that ED technique works well for high SNR conditions while for low SNR conditions it fails. Moreover, the model has been extended for CSS with cooperation of five SUs. Matlab Simulink can be used to simulate modules of CRN and further the concept can be implemented for real scenarios.
References
E. Tugba, L. Mark, P. Ken, in Spectrum Occupancy Measurements, Limestone. (Loring Commerce Centre, Maine, 18–20 Sept 2007). http://www.sharedspectrum.com/papers/spectrum-reports/
M. Song, C. Xin, Y. Zhao, X. Cheng, Dynamic spectrum access: from cognitive radio to network radio. IEEE Wirel. Commun. 19(1), 23–29 (2012)
B. Wang, K.J.R. Liu, Advances in cognitive radio networks: A Survey. IEEE J. Sel. Top. Sign. Proces. 5(1), 5–23 (2011)
T. Yucek, H. Arslan, A survey of spectrum sensing algorithms for cognitive radio applications. IEEE Commun. Surv. Tutorials 11(1), 116–130 (2009)
R.R. Jaglan, S. Sarowa, R. Mustafa, S. Agrawal, N. Kumar, Comparative study of single-user spectrum sensing techniques in cognitive radio networks. Procedia Comp. Sci. 58, 121–128 (2015)
Y.C. Liang, Y. Zeng, E.C.Y. Peh, A.T. Hoang, Sensing-throughput tradeoff for cognitive radio networks. IEEE Trans. Wirel. Commun. 7(4), 1326–1337 (2008)
M.L. Benitez, F. Casadevall, Improved energy detection spectrum sensing for cognitive radio. IET Commun. 6(8), 785–796 (2012)
E. Chatziantoniou, B. Allen, V. Velisavljevic, Threshold optimization for energy detection based spectrum sensing over hyper-rayleigh fading channels. IEEE Commun. Lett. 19(6), 1077–1080 (2015)
I.F. Akyildiz, B.F. Lo, R. Balakrishnan, Cooperative spectrum sensing in cognitive radio networks: A survey. Phys. Commun. 4, 40–62 (2011)
N. Lorvancis, D. Jalihal, Performance of p-norm detector in cognitive radio networks with cooperative spectrum sensing in presence of malicious users. Wirel. Commun. Mob. Comput. 17, 1–8 (2017)
R.R. Jaglan, R. Mustafa, S. Agrawal, Performance evaluation of energy detection based cooperative spectrum sensing in cognitive radio network. Proc. First Int. Conf. Inf. Commun. Technol. Intell. Syst. 2, 585–593 (2016)
R. Bouraoui, H. Besbes, Cooperative spectrum sensing for cognitive radio networks: fusion rules performance analysis, in Proceedings of International IEEE Wireless Communications and Mobile Computing Conference (IWCMC) (2016)
M. Moradkhani, P. Azmi, M.A. Pourmina, Optimized energy limited cooperative spectrum sensing in cognitive radio networks. Comput. Electr. Eng. 42, 1–11 (2014)
H.M. Farag, E.M. Mohamed, Soft decision cooperative spectrum sensing with noise uncertainty reduction. J. Pervasive Mob. Comput. 35, 146–164 (2017)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Jaglan, R.R., Mustafa, R., Agrawal, S. (2019). MATLAB Simulink Modeling for Spectrum Sensing in Cognitive Radio Networks. In: Krishna, C., Dutta, M., Kumar, R. (eds) Proceedings of 2nd International Conference on Communication, Computing and Networking. Lecture Notes in Networks and Systems, vol 46. Springer, Singapore. https://doi.org/10.1007/978-981-13-1217-5_24
Download citation
DOI: https://doi.org/10.1007/978-981-13-1217-5_24
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-1216-8
Online ISBN: 978-981-13-1217-5
eBook Packages: EngineeringEngineering (R0)