0% found this document useful (0 votes)
112 views51 pages

Finall Project

This is a project for final year gradution paper about spectrum sensing in cognitive radio using matched filter

Uploaded by

kassa hilemneh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views51 pages

Finall Project

This is a project for final year gradution paper about spectrum sensing in cognitive radio using matched filter

Uploaded by

kassa hilemneh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Bahir Dar University

Bahir Dar Institute of Technology


Faculty of Electrical and Computer Engineering
Final Project
Project title; Spectrum Sensing in Cognitive Radio Using Matched Filter

Name of Members ID No.


1. Getnet Asmare BDU0800823UR
2. Kale Mhiret BDU0800922UR
3. Kassa Hilemneh BDU0800936UR
4. Melkam Molla BDU0801041UR

Advisor Name:
Mr.Bekele

Nov, 2021
Bahir Dar, Ethiopia
Spectrum Sensing in Cognitive Radio Using Matched Filter

Declaration
We are students of Bahir Dar University in Bahir Dar Institute of technology (BIT) faculty of
Electrical and Computer Engineering. We declare that the information found in this project is our
original work and all sources of materials used in this project work are fully acknowledged.

Name of Students Signature


1. Getnet Asmare _______________
2. Kale Mhiret _______________
3. Kassa Hilemneh _______________
4. Melkam Molla _______________

Date of submission 15/05/2013E.C


This project has been submitted for examination with my approval as a university advisor.
Project advisor Signature date
___________ ___________ ___________

i
Spectrum Sensing in Cognitive Radio Using Matched Filter

Acknowledgement
First and for most, we are extremely grateful to the Department of Electrical Engineering, for
giving us the opportunity to carry out this project, which is an integral part of the curriculum in
Bahir Dar university institute of technology. Secondly, we would like to express our earnest
gratitude and regards to our project advisor Mr. Bekele, for being the corner stone of our project.
It was his perpetual motivation and guidance during the period of doubts and uncertainties that
has helped us to carry on with this project. Finally, we extend our gratefulness to one and all who
are directly or indirectly involved in the successful completion of this project work

ii
Spectrum Sensing in Cognitive Radio Using Matched Filter

Abstract
The growing demand of wireless applications has put a lot of constraints on the usage of
available radio spectrum which is a limited and precious resource. Some frequency bands in the
spectrum are largely unoccupied most of the time and some other frequency bands are partially
occupied. This underutilization of radio spectrum is minimized by using the Cognitive radio. An
important requirement of the Cognitive Radio is to sense the spectrum holes. The spectrum
sensing function enables the CR to adapt its environment by detecting the primary users that are
receiving data within the communication range of CR user. We can find various spectrum
sensing techniques which, in general could be classified as energy based sensing, matched filter-
based sensing interference based detection, and soon. Different techniques serve different
purpose based on their advantages and disadvantages. The matched filter-based detect gives
better detection compared with the other methods; however, it requires complete signal
information such as modulation type and order, the pulse shape and the packet format. In this
paper, we proposed a new approach of matched filter based spectrum sensing with a Neyman-
Pearson observer and the matched filter based spectrum sensing with a Log-Likelihood Ratio
test.

iii
Spectrum Sensing in Cognitive Radio Using Matched Filter

Table of Contents
Acknowledgement.......................................................................................................................................ii
Chapter one.................................................................................................................................................1
Background of the Project...........................................................................................................................1
1.2 Problem of Statement.......................................................................................................................2
1.3 Objectives..........................................................................................................................................2
1.3.1 General Objective.......................................................................................................................2
1.3.2 Specific Objective........................................................................................................................2
1.4 Motivation.........................................................................................................................................3
1.5 Methodology.....................................................................................................................................3
1.6 Scope of the Project...........................................................................................................................4
Chapter Two................................................................................................................................................5
Literature Review........................................................................................................................................5
Chapter Three..............................................................................................................................................7
Description of the Project............................................................................................................................7
3.1 Basics cognitive radio.........................................................................................................................7
3.1.1 Architecture of Cognitive Radio Network...................................................................................8
3.1.2 The Cognitive Cycle...................................................................................................................11
3.1.3 Cognitive radio characteristics..................................................................................................12
3.2 Primary System and Cognitive Radio System...................................................................................18
3.2.1 Primary System in Licensed Bands............................................................................................18
3.2.2 Primary System in Unlicensed Bands........................................................................................18
3.3 Links in CRNs....................................................................................................................................19
3.4 Advantages and dis advantages of cognitive radio system..............................................................21
3.4.1Advantage of CR........................................................................................................................21
3.4.2 Disadvantage of CR...................................................................................................................21
3.5 Spectrum Sensing Techniques.........................................................................................................21
3.6 Matched Filter Detection.................................................................................................................22
3.6.1 Hypotheses for matched filter detection..................................................................................25
3.6.2 Threshold Selection Using Log Likelihood Ratio........................................................................28
3.6.3 Threshold Selection Using Neyman Pearson Observer.............................................................29
CHAPTER FOUR..........................................................................................................................................31

iv
Spectrum Sensing in Cognitive Radio Using Matched Filter

RESULTS AND DISCUSSION........................................................................................................................31


4.1 Introduction.....................................................................................................................................31
4.2 Results.............................................................................................................................................31
4.3 Discussion........................................................................................................................................34
CHAPTER FIVE............................................................................................................................................35
CONCLUSION AND FUTURE WORK............................................................................................................35
5.1 Introduction.....................................................................................................................................35
5.2 Conclusion.......................................................................................................................................35
5.3 Future Work.....................................................................................................................................35
References.................................................................................................................................................36

v
Spectrum Sensing in Cognitive Radio Using Matched Filter

List of Figures

figure 1. 1 Methodology of the project............................................................................................4

figure 3. 1 SpectrumUtilization…………………………………………………………………....7

figure 3. 2 Infrastructure Architecture.............................................................................................9


figure 3. 3 Ad-hoc Architecture.......................................................................................................9
figure 3. 4 Mesh Architecture Networks.......................................................................................10
figure 3. 5 the RF Front End for a Cognitive Radio......................................................................11
figure 3. 6 Fundamental Cognitive Cycle......................................................................................12
figure 3. 7 Spectrum Sensing.........................................................................................................13
figure 3. 8 Hiding Primary User Problem in Cognitive Radio System.........................................15
figure 3. 9 Links in CRNs..............................................................................................................19
figure 3. 10 Spectrum Sensing Techniques...................................................................................22
figure 3. 11 Block diagram of matched filter................................................................................23
figure 3. 12Process flow diagrams of Matched filter Detection....................................................25
figure 3. 13 Observation Space......................................................................................................28

figure 4. 1 the received signal when attenuated by the noise…………………………………………………………………32

figure 4. 2recived signal attenuated by noise.................................................................................32


figure 4. 3matched filter output......................................................................................................33
figure 4. 4ROC curve for probability of false alarm.....................................................................33
figure 4. 5Probability of false alarm vs Probability of detection...................................................34

vi
Spectrum Sensing in Cognitive Radio Using Matched Filter

List of Tables

vii
Spectrum Sensing in Cognitive Radio Using Matched Filter

List of Abbreviations/ Acronyms

viii
Chapter one
Background of the Project
1. Introduction
Nowadays, the number of customers in wireless communication is increasing, which leads to
spectrum scarcity. A new technology called Cognitive Radio Network (CRN) is developing to
increase the spectrum efficiency by sharing the available channels with the needs of users at any
moment in opportunistic manner.
The recent trend in Cognitive Radio-related research has altered a great deal of interest in
spectrum sensing and detection of radio users in the environment. The key objective behind
spectrum sensing and detection is to maximize the probability of detection without losing much
on the probability of false alarm while minimizing the complexity and time to sense/detect the
radio spectrum. In literature, one can find various spectrum sensing techniques, such as energy-
based sensing, matched filter-based sensing and other sensing techniques. The energy-based
sensing is the simplest method to sense the environment in a blind manner; and the matched
filter-based sensing requires the complete information of the spectral user signal. In this thesis,
we present matched filter-based spectrum sensing method with log-likelihood test and Nyman
Pearson observer.
The aim of the CR technology is to provide the maximum efficiency of the spectrum to improve
its utilization by using dynamic spectrum access techniques. The key to enabling the maximum
spectrum efficiency is to provide the capability to share the wireless channel with licensed users
in an opportunistic manner. This goal might be achieved using dynamic and efficient spectrum
management techniques. In order to achieve this goal, the Cognitive Radio Users (CRU) in a
Cognitive Radio Network must:
 Determine which portions of the spectrum are available (Spectrum Sensing)
 Select the best available channel (Spectrum Decision)
 Coordinate access to this channel with other users (Spectrum Sharing)
 Vacate the channel when a licensed user (Primary User) is detected (Spectrum Mobility)
A primary network (licensed network) is an existing network for Primary Users (PU). They have
permission to communicate through licensed bands. The operations of PUs are controlled by

1
Spectrum Sensing in Cognitive Radio Using Matched Filter

their Primary Network. The primary users have high priority in their bands so they should not be
interfered by CRUs (cognitive radio user). CRUs have their own Cognitive Radio Base Stations
(CRBS) where the CRU access to their resources. CRUs, then, must only communicate when
PUs are not using their licensed bands.
In general, a CRN should be able to perform efficiently the spectrum sensing, the spectrum
decision, the spectrum sharing, and the spectrum mobility tasks. The spectrum sensing consists
in monitoring the spectrum and to detect spectrum holes. In the spectrum decision task, CRUs
are allocated in the different available frequencies.
This function not only depends on frequency availability, but also depends on some internal or
external policies. Since various CRUs could try to access the same resources, we need to
coordinate these accesses to prevent collisions between multiple CRUs. These actions are
performed by the spectrum sharing function. Finally, if a PU would enter to a portion of
spectrum that is occupied by a CRU, this CRU must be reallocated to a different frequency in
order to not affect the PU communication. This is the spectrum mobility function.
1.2 Problem of Statement
At present, the number of wireless communication users and applications are increasing rapidly.
With this rapid growth there exists spectrum scarcity. One of the best solutions to overcome
spectrum scarcity is automated frequency allocation which is called dynamic spectrum access to
support spectrum sharing which allows secondary users to communicate over the licensed
spectrum when there exists spectrum holes.
But the main problem in this CR is how to detect the available or underutilized spectrum and
how to allocate to the SU without interference. In this project, we investigate the performance of
spectrum sensing technique in cognitive radio called matched filter spectrum sensing.
1.3 Objectives
1.3.1 General Objective
The general objective of this project is to develop matched filter based spectrum sensing in
cognitive radio which optimize the use of available radio frequency (RF) spectrum.
1.3.2 Specific Objective
 To study the different spectrum sensing techniques
 To compare the performance of matched filter based spectrum sensing technique with
various thresholds like
 Neyman Pearson observer

2
Spectrum Sensing in Cognitive Radio Using Matched Filter

 log likelihood ratio


 To Increase the sensing performance
 To decrease detection error or false alarm.
 To write software program and simulate it in MATLAB.
1.4 Motivation
There are several spectrum sensing techniques suggested in the literature being Energy Detection
(ED) and Matched Filtering (MF) the most popular ones. Their performance is evaluated not
only in terms of probability of detection and false alarm, but also in terms of complexity and
flexibility. For instance, energy detection is one of the most basic and effective schemes of
detection. However, its performance degrades dramatically when the noise power isn’t perfectly
known a priori. It is also unable to identify and distinguish different types of signals. On the
other hand, Matched Filtering has usually better performance than ED but it is more complex and
requires previous knowledge of the signal features. Despite not being necessarily a new area of
research, SS has been lately subject to fundamental innovations due to the increasing interest on
the cognitive radio technology to solve the problem of scarcity of spectrum. Thus, there are
several sensing schemes proposed in the literature that demand an experimental study on their
performance and applicability. In this thesis, we are implementing and test the matched filter
detection, by selection of threshold using two techniques. Those techniques are Neyman Pearson
observer and log likelihood ratio.
1.5 Methodology
For successful completion of this project some steps will be followed to carry out different
tasks. Different literatures will be revised related to this project and information will be collected
about different spectrum sensing techniques used in cognitive radio network. Our next task in
undertaking this project will be defining the project scope based on an in-depth analysis of both
our problem requirement as well as the technology we will be employing. As is the case with any
project, we delimited the scope of our project within what we believed to be attainable within the
allotted timeline. The proposed models and a range of components will be designed and
simulated in MATLAB® software. MATLAB® offers an easy interactive environment and fast
mathematical algorithms. It allows matrix handling, plotting of functions and data, and algorithm
implementations. As expected, we will pass through a number of stages before reaching to our
final goal. This is realized in the figure bellow.

3
Spectrum Sensing in Cognitive Radio Using Matched Filter

Literature
survey

Analysis our problem


requirement

Defining the project


scope

System design and


simulation

Conclusion and
recommendation

Figure 1. 1 Methodology of the project

1.6 Scope of the Project


The aim of the project is to comprehend the utilization of spectrum sensing in cognitive radio
networks, and investigate the technique of the spectrum sensing. We will use matlab to simulate
the signals from the cognitive radio networks and matched filter detection to determine the status
of the primary users. After getting the result, try to find the relationship between the factor SNR
to and the final detections and investigate how the SNR influence the detections. Comparing the
theoretical value and the measured value to determine whether the simulation working
successfully.

4
Spectrum Sensing in Cognitive Radio Using Matched Filter

Chapter Two
Literature Review
We have revised some research papers and journals to gather information about this thesis on
several important concepts of Spectrum Sensing in Cognitive Radio. Being the focus of spectrum
sensing is the most important task among others for the establishment of cognitive radio, several
articles have been published on spectrum sensing so far.
(Arslan and Y¨ucek in 2007); spectrum sensing is defined and various aspects of spectrum
sensing task are mentioned and discussed. Some challenges encountered in spectrum sensing is
also given in this paper. Most common spectrum sensing methods such as Energy Detection and
Cyclostationary Feature Detection are also studied and compared in terms of advantages and
drawbacks [1].
(Akyıldız, et al. 2006) is one of the most detailed papers written on Cognitive Radios. First part
of this paper focuses on cognitive radio and its architecture. In the next part, the present and
future of the frequency spectrum is discussed, followed by a detailed analysis of spectrum
sensing task. Some spectrum sensing methods are studied and compared. In the following
section, spectrum sharing is discussed and its challenges are mentioned [2].
Srinavasa and Jafar focuses in their paper published in 2007 on different interpretations of
cognitive radio that underlay, overlay, and interweave the transmissions of the cognitive user
with those of licensed users. Underlay approach allows concurrent primary and secondary
transmissions and aims to protect primary (licensed) users by enforcing a spectral mask on the
secondary (unlicensed) users’ signals so that unlicensed users’ interference to licensed users is
below the acceptable noise threshold set for safer communication of licensed users. Overlay
approach allows concurrent primary and secondary transmissions as well but contrary to
underlay approach, secondary users can use part of their power to communicate and remained
power to assist primary user. If the power split is chosen carefully, the increase in a primary
user’s SNR due to the assistance from secondary user is exactly offset by the decrease in primary
users’ SNR as a result of interference. Interweave approach is based on Opportunistic
Communication (Mitola 2000) which is about using the spectrum holes that indicate to the fact
that they are not in use by primary users. Interweave approach is also known as Interference
Avoidance approach [3].

5
Spectrum Sensing in Cognitive Radio Using Matched Filter

(Urkowitz 1967) focuses on the Energy Detection of Unknown Signals. It’s one of the most
important and cited paper in the literature on Energy Detection. In this paper; although the signal
is actually unknown in detail, it’s considered deterministic. Deterministic signal is assumed in
this paper as the input with signal present is Gaussian but not zero mean. The spectral region is
known and the noise is assumed to be Gaussian and additive with zero mean. It explains
detection in white noise considering whether the noise is a Low-pass or Band pass random
process and operating receiver characteristics are given theoretically [4].
Kuppusamy and Mahapatra 2008, proposed to implement some multiple antenna techniques in
order to overcome some spectrum Sensing challenges [5].

6
Spectrum Sensing in Cognitive Radio Using Matched Filter

Chapter Three
Description of the Project
3.1 Basics cognitive radio
Cognitive Radio is a paradigm that has been proposed for better utilization of radio frequency
spectrum which is the part of electromagnetic spectrum from 3HZ to 300MH.
The formal definition for Cognitive Radio is given as:- “Cognitive radio (CR) is a form of
wireless communication in which a transceiver  can intelligently detect which communication
channels are in use and which are not, and instantly move into vacant channels while avoiding
occupied ones. This optimizes the use of available radio-frequency (RF) spectrum while
minimizing interference to other users.
If the frequency range from 40 MHz to 1000 MHz is carefully observed in figure 3.1 then this
range can be classified into 3 sub-categories; empty bands most of the time, partially occupied
bands, and congested Bands. The main category of interest for the cognitive radio users is the
first category in which the hardly used or empty bands are classified. In layman terms cognitive
radio is nothing but a methodology wherein the first category of the frequency range is brought
to the use for unlicensed users in such a way that interference to the licensed users is minimized.
Maximum amplitude

Frequency (MHZ)
figure 3. 1 Spectrum Utilization

In order for the unlicensed or secondary users to use the in the licensed spectrum there are many
things that should be taken care of in advance like:
1. Scanning the frequency spectrum for the discovery of different empty bands.
2. Selecting the best available band. The selection can be done on the basis of the secondary
user’s application frequency requirement.

7
Spectrum Sensing in Cognitive Radio Using Matched Filter

3. Before transmitting on the selected band the power level should be maintained such that it
provides minimal interference to other users. Also the power level can be so adjusted as to have
maximum number of secondary users in the frequency band of interest.
4. Depending on the distance and the error performance requirement the modulation scheme
used can be varied. Lower data rates can be achieved using low order modulation schemes like
QPSK whereas 64-QAM enables one to achieve higher data rates.
5. Spectrum sharing should be allowed so that other secondary users can also access the empty
bands.
3.1.1 Architecture of Cognitive Radio Network
The CRNs are composed of various kinds of communication systems and networks, and can be
viewed as s sort of heterogeneous networks. The heterogeneity exists in wireless access
technologies, networks, user terminals, applications, and service providers [9].
The design of cognitive radio network architecture is toward the objective of improving the
entire network utilization, rather than just link spectral efficiency. From the users’ perspective,
the network utilization means that they can always fulfill their demands anytime and anywhere
through accessing CRNs. From the operators’ perspective, they can provide better services to
mobile users, and allocate radio and network resources to deliver more packets per unit
bandwidth in a more efficient way.
3.1.1.1Network Architecture
The CRNs can be deployed in network-centric, distributed, ad hoc, and mesh architectures, and
serve the needs of both licensed and unlicensed applications. The basic components of CRNs are
mobile station (MS), base station/access point (BSs/APs) and backbone/core networks. These
three basic components compose three kinds of network architectures in the CRNs:
Infrastructure, Ad-hoc and Mesh architectures, which are introduced as follows.
Infrastructure Architecture
In the Infrastructure architecture, a MS can only access a BS/AP in the one-hop manner. MSs
under the transmission range of the same BS/AP shall communicate with each other through the
BS/AP. Communications between different cells are routed through backbone/core networks.
The BS/AP may be able to execute one or multiple communication standards/protocols to fulfill
different demands from MS. A cognitive radio terminal can also access different kinds of
communication systems.

8
Spectrum Sensing in Cognitive Radio Using Matched Filter

figure 3. 2 Infrastructure Architecture

Ad-hoc Architecture
There is no infrastructure support (or defined) in ad-hoc architecture. If an MS recognizes that
there are some other MS nearby and are connectable through certain communication
standards/protocols, they can set up a link and thus form an ad hoc network. Note that links
between nodes may be set up by different communication technology. Two cognitive radio
terminals can either communicate with each other by using existing communication protocols
(e.g. Wi-Fi, Bluetooth) or dynamically using spectrum holes.

figure 3. 3 Ad-hoc Architecture

Mesh Architecture
This architecture is a combination of Infrastructure and Ad Hoc architectures by enabling the
wireless connections between BSs/APs, which is similar to the Hybrid Wireless Mesh Networks
[5]. BSs/APs work as wireless routers and form wireless backbones [5]. MSs can either access
the BSs/APs directly or use other MSs as multi-hop relay nodes. Some BSs/APs may connect to

9
Spectrum Sensing in Cognitive Radio Using Matched Filter

the wired backbone/core networks and function as gateways. Since BSs/APs can be deployed
without necessarily connecting to wired backbone or core networks, it is more flexible and less
costly in planning the locations of BSs/APs. For BSs/APs having cognitive radio capabilities,
they may use spectrum holes to communicate each other. Due to potentially lots of spectrum
holes available, the capacity of wireless communication links among cognitive radio BSs/APs
may be enough to serve as wireless backbone.

figure 3. 4 Mesh Architecture Networks

3.1.1.2 Physical Architecture


Generally the cognitive radio employs a transceiver which consists of a RF front end and a
baseband signal processing unit which performs modulation or demodulation and encoding or
decoding functions The RF front end consists of:-

 RF filter- It is a band-pass filter which selects the frequency band of interest.


 Low noise amplifier (LNA) - Used to amplify the desired signal and also for suppressing
the noise part.
 Mixer- Used for translating the frequency to Intermediate Frequency (IF) in order to
facilitate further processing.
 Phase locked loop (PLL) and Voltage Controlled Oscillator (VCO) - VCO generates the
signal with specific frequency required for mixing. PLL ensures that the frequency is
fixed and does not vary with time.
 Channel Selection Filter- It selects the required frequency bands and rejects the adjacent
bands.
 Automatic Gain Control (AGC) – It keeps the output power level fairly constant over a
wide range of input signal.

10
Spectrum Sensing in Cognitive Radio Using Matched Filter

 A/D converter – It converts the signal in analog form to digital information so that it can
be processed by the baseband processing unit.

figure 3. 5 the RF Front End for a Cognitive Radio

3.1.2 The Cognitive Cycle


Cognitive cycle is a decision cycle in order to establish the capability of a CR to pursue an
objective after receiving inputs from the operational environment
The cognitive cycle consists of three main mechanisms: sensing the Radio Frequency (RF)
spectrum, cognition / management and control. Figure 3.6 shows the tasks in the Cognitive
Radio Cycle (CC).
Spectrum Sensing:
 Detection of unused portion of spectrum bands or estimation of total interference in the
radio environment.
 Estimation of channel state information (Signal to Noise Ratio (SNR)).
 Expectation of channel capacity for use by the transmitter.
Cognition / Management:
 Capture the best spectrum to meet user communication requirement
 undertakes dynamic spectrum allocation
 Traffic shaping
Control action
 Adaptive coding and modulation.
 Control of transmission power.
 Control of transmission rate

11
Spectrum Sensing in Cognitive Radio Using Matched Filter

figure 3. 6 Fundamental Cognitive Cycle


3.1.3 Cognitive radio characteristics
The capabilities of cognitive radios as nodes of CRN can be classified according to their
functionalities. A cognitive radio shall sense the environment (cognitive capability), analyze and
learn sensed information (self-organized capability) and adapt to the environment
(reconfigurable capabilities).
3.1.3.1Cognitive Capability
It is an ability of CR to sense the radio environment by capturing variations and avoid the
interference.
a. Spectrum Sensing
Spectrum sensing can be performed in different ways such as primary transmitter detection,
primary receiver detection, and interference temperature management.
Primary transmitter detection is based on the detection of a weak signal from a primary
transmitter through the local observations of CR users. A CR user (transmitter) can have a good
line of sight to a CR receiver but may not be able to detect the primary transmitter due to
shadowing. Therefore, sensing information from other users is required for more accurate
primary transmitter detection referred to as cooperative detection. Three schemes are generally
used for transmitter detection: matched filter detection, energy detection, and feature detection.

12
Spectrum Sensing in Cognitive Radio Using Matched Filter

Spectrum sensing for cognitive radios is still an ongoing development and the techniques for the
primary signal detection are limited in the present literature (Arslan and Y¨ucek 2007). One of
the most distinguished features of cognitive radio networks will be an ability to switch between
radio access technologies, transmitting in different parts of the radio spectrum as idle frequency
band slots arise(Haykin 2005),(Akyıldız, et al. 2006). This dynamic spectrum access which was
proposed in (Mitola 2000) for the first time, is one of the fundamental requirements for
transmitters to adapt to varying channel quality, network congestion, interference and service
requirements. Cognitive radio networks, assumed to be secondary users, will also need to coexist
with primary users, which have the right to use the spectrum and thus must have a guarantee not
to be interfered by secondary users.

figure 3. 7 Spectrum Sensing

In general, the spectrum sensing techniques are classified into two categories: Co-Operative
sensing and Non-Cooperative sensing. In cooperative sensing, the primary signals for spectrum
opportunities are detected reliably by interacting or cooperating with the other users. In the other
hand, non-cooperative sensing, the detection of primary users is performed based on the received
signal at CR users. Various methods have been proposed in the past, such as energy detection,
matched filter and so on. Different techniques serve different purpose based on their advantages
and disadvantages. One of the important parameter in spectrum sensing is the sensing threshold.
When a detector doesn’t choose proper threshold, its sensing performance will be degraded.
Several metrics were used to evaluate (perform) the performance of spectrum sensing
techniques. Some of them are probability of detection, probability of false alarm and Signal-to
noise ratio. As a result of these facts, under-utilization of the current spectrum and the need to
increase the spectrum efficiency is motivating researchers to exploit the wireless medium. In this

13
Spectrum Sensing in Cognitive Radio Using Matched Filter

direction, the Federal Communications Commission (FCC) Spectrum Policy Task Force has
published (FCC Report 2002) in 2002, in which it investigates the underutilization of the radio
spectrum. While the FCC is responsible of determining the spectrum usage and its policies, the
Whitespace Coalition, formed by companies such as Microsoft, Google, Dell, HP and Intel have
research groups studying to exploit the spectrum vacancies in the television band. Cognitive
radio networks are envisioned to be able to opportunistically exploit those ”spectrum holes”, by
awareness of the environment and cognition capability, in order to adapt their radio parameters
accordingly. Spectrum sensing is the main step that will enable cognitive radio networks to
achieve this goal. Fundamentally, a spectrum sensing device must be able to give a general idea
on the medium over the entire radio spectrum. This allows the cognitive radio network to analyze
all degrees of freedom (time, frequency and space) in order to predict the spectrum usage.
Wideband spectrum sensing works are also available in the literature and studied in (Tian and
Giannakis 2006), (Hur, et al. 2006) and (Quan, et al. 2008). However, equipment able to perform
wide-band sensing all at once is prohibitively difficult to build with today’s technology. Feasible
spectrum sensing device can quickly sweep the radio spectrum, analyzing one narrowband
segment at a time. In this section, we have emphasized the importance of the spectrum sensing
technique for cognitive radio networks.
In the next section, we aim at understanding the underlying characteristics of the spectrum
Sensing problem, which will enable us to develop the approaches presented further in this
Chapter
Challenges of Spectrum Sensing
Challenges related to spectrum sensing for cognitive radio are:
 Hidden primary users problem: this problem can be caused by multipath fading and
shadowing, causing secondary users to fail to detect the existence of primary users.The
signal from the primary transmitter cannot be detected, because of the location of the
cognitive radio devices; this will cause unwanted interference to the primary user if
cognitive radio devices try to access this occupied spectrum. To solve this issue,
cooperative sensing has been proposed.

14
Spectrum Sensing in Cognitive Radio Using Matched Filter

figure 3. 8 Hiding Primary User Problem in Cognitive Radio System

 Sensing time: Using cognitive radios; it’s guaranteed that licensed users can use their
frequency bands any time and to increase the capacity of the spectrum and avoid
interference; spectrum holes must be detected as quickly as possible to accommodate the
secondary users. In (H¨oty¨a, et al. 2007), it’s underlined that spectrum sensing algorithm
must be performed within a limited time duration. It also must be taken into account that
how often cognitive radio sense the spectrum. It needs to sense very frequently in order
not to Miss any opportunity.
 Limited Sensing Ability: In (H¨oty¨a, et al. 2007) it’s underlined that cognitive radio has
only a basic ’sense of hearing’ to detect the spectrum holes that’s why its ability is
limited. That indicates, a cognitive radio has to detect its multidimensional environment
with only a single sense. For instance; considering a blind person trying to go across in a
busy traffic only uses hearing sense just like a cognitive radio does. Many open questions
are related to the sensing ability and performance in wide bandwidths. Advanced
techniques are needed to overcome this problem and sense very wide bandwidths reliably
and rapidly. Other challenges that need to be considered when designing spectrum
sensing methods include power consumption, competition, robustness, cooperation,
computational complexity, coherence times and the presence of multiple secondary users.
 Wideband Sensing: One of the main concerns in spectrum sensing is how to set the
boundaries of spectrum to sense. Instead of very wide band detection, limited spectrum
can be used for spectrum sensing. Working in limited spectrum; received signal can be

15
Spectrum Sensing in Cognitive Radio Using Matched Filter

sampled at or above Nyquist rate with current technology. Furthermore; the


computational difficulty encountered in wide band detection can be restricted to a
reasonable level (H¨oty¨a, et al. 2007). Expensive analog frontend required for a very
wide spectrum can also be avoided. Taking everything into consideration; regulatory
agencies should allocate spectrum bands for different types of cognitive radios depending
on the spectrum range that they work (H¨oty¨a, et al. 2007).
b. Spectrum Sharing
A cognitive radio could incorporate a mechanism that would enable sharing of spectrum under
the terms of an agreement between a licensee and a third party. Parties may eventually be able to
negotiate for spectrum use on an ad hoc or real-time basis, without the need for prior agreements
between all parties.
c. Location Identification
The ability to determine its location and the location of other transmitters, and then select the
appropriate operating parameters such as the power and frequency allowed at its location. In
bands such as those used for satellite downlinks that are receive-only and do not transmit a
signal, location technology may be an appropriate method of avoiding interference because
sensing technology would not be able to identify the locations of nearby receivers.
d. Network/System Discovery
For a cognitive radio terminal to determine the best way to communicate, it shall first discover
available networks around it. These networks are reachable either via directed one hop
communication or via multi-hop relay nodes. For example, when a cognitive radio terminal has
to make a phone call, it shall discover if there is GSM BTSs or WiFi APs nearby. If there is no
directed communication link between the terminal and the BTSs/APs but through other cognitive
radio terminals some access networks are reachable, it can still make a call in this circumstance.
The ability to discovery one hop or multi-hop away access networks is important.
e. Service Discovery
Service discovery usually accompanies with network/system discovery. Network or system
operators provide their services through their access networks. A cognitive radio terminal shall
find appropriate services to fulfill its demands.

16
Spectrum Sensing in Cognitive Radio Using Matched Filter

3.1.3.2 Reconfigurable Capability


It enables the CR to dynamically change the operating parameters according to the radio
environment
a. Frequency Agility
It is the ability of a radio to change its operating frequency. This ability usually combines with a
method to dynamically select the appropriate operating frequency based on the sensing of signals
from other transmitters or on some other method.
b. Dynamic Frequency Selection
It is defined in the rules as a mechanism that dynamically detects signals from other radio
frequency systems and avoids co-channel operation with those systems. The methods that a
device could use to decide when to change frequency or polarization could include spectrum
sensing, geographic location monitoring, or an instruction from a network or another device.
c. Adaptive Modulation/Coding
Adaptive modulation techniques can modify transmission characteristics and waveforms to
provide opportunities for improved spectrum access and more intensive use of spectrum while
“working around” other signals that are present. A cognitive radio could select the appropriate
modulation type for use with a particular transmission system to permit interoperability between
systems.
d. Transmit Power Control
Transmit power control is a feature that enables a device to dynamically switch between several
transmission power levels in the data transmission process. It allows transmission at the
allowable limits when necessary, but reduces the transmitter power to a lower level to allow
greater sharing of spectrum when higher power operation is not necessary.
e. Dynamic System/Network Access
f. For a cognitive radio terminal to access multiple communication systems/networks
which run different protocols, the ability to reconfigure itself to be compatible with
these systems is necessary.
3.1.3.3 Self-Organized Capability
a. Spectrum/Radio Resource Management
To efficiently manage and organize spectrum holes information among cognitive radios, good
spectrum management scheme is necessary
b. Mobility and Connection Management

17
Spectrum Sensing in Cognitive Radio Using Matched Filter

Due to the heterogeneity of CRNs, routing and topology information is more and more complex.
Good mobility and connection management can help neighborhood discovery, detect available
Internet access and support vertical handoffs, which help cognitive radios to select route and
networks.
c. Trust/Security Management
Since CRNs are heterogeneous networks in nature, various heterogeneities (e.g. wireless access
technologies, system/network operators) introduce lots of security issues. Trust is thus a
prerequisite for securing operations in CRNs.
3.2 Primary System and Cognitive Radio System
There are two kinds of wireless communication systems in CRNs: Primary System and
Cognitive Radio System, which are classified by their priorities on frequency bands. A primary
system is referred to an existing system which operates in one or many fixed frequency bands.
Various kinds of primary systems work either in licensed or unlicensed bands and are explained
as follows.
3.2.1 Primary System in Licensed Bands
A primary system operated in the licensed band has the highest priority to use that frequency
band (e.g. 2G/3G cellular, digital TV broadcast). Other unlicensed users/systems can neither
interfere with the primary system in an intolerable way nor occupy the license band.
3.2.2 Primary System in Unlicensed Bands
A primary system operating in the unlicensed band (e.g. ISM band) called unlicensed band
primary system. Various primary systems should use the band compatibly. Specifically, primary
systems operating in the same unlicensed band shall coexist with each other while considering
that the interference to each other.
These primary systems may have different levels of priorities which may depend on some
regulations. A cognitive radio system neither has a fixed operating frequency band nor has
privilege to access that band. Entities of this system communicate with each other by
dynamically using spectrum holes. There are two components in CR systems: Cognitive Radio
Base Station (CR-BS) and Cognitive Radio Mobile Station (CRMS).
Cognitive Radio Base Station (CR-BS)
A CR-BS is a fixed component in the cognitive radio system and has cognitive radio
capabilities. It represents the infrastructure side of the CR system and provides supports (e.g.
spectrum holes management, mobility management, security management) to CR-MSs. It

18
Spectrum Sensing in Cognitive Radio Using Matched Filter

provides a gateway for CR-MSs to access the backbone networks (e.g. Internet). CR-BSs can
also form a mesh wireless backbone network by enabling wireless communications between
them, and some of them act as gateway routers if they are connected with wired backbone
networks. If a CR-BS can run PR system protocols, it can provide access network services to PR-
MSs.
Cognitive Radio Mobile Station (CR-MS)
A CR-MS is a portable device with cognitive radio capabilities. It can reconfigure itself in order
to connect to different communication systems. It can sense spectrum holes and dynamically use
them to communicate with CR-MS or CR-BS.
3.3 Links in CRNs
Since the Cognitive Radio System can provide interoperability among different communication
systems, some inter-system connections should be enabled. We list all possibilities in Table 1
and show them in Figure below.

figure 3. 9 Links in CRNs

Table 3.1 Possible Unidirectional Links in CRN

19
Spectrum Sensing in Cognitive Radio Using Matched Filter

 CR-MS to CR-MS
A CR-MS can communicate with other CR-MSs in direct links. They may cooperatively sense
spectrum holes in different frequency bands which may be licensed or unlicensed and utilize it as
their operating frequency band. A common control channel may be necessary for them to
exchange spectrum whole information.
 CR-MS to CR-BS
A CR-BS can dynamically sense available frequency band around it and gather other MSs’
sensing results and provide one-hop access to CR-MSs under its coverage area. This may need
cooperative sensing technique. Under the coordination of CR-BS, the CR-MS can either access
the backbone networks or communicate with other communication systems.
 CR-MS to PR-BS
If there is a need for a CR-MS to connect to a PR-BS, it will reconfigure itself and become
one part of the primary system (i.e. PR-MS). In this case, it will become a primary user on
that band.
 CR-BS to CR-BS
While enabling direct wireless links between CR-BSs, they can form a mesh wireless backbone
network. Because of their cognitive radio capability, they can dynamically choose operating
frequency band and communicate with each other. Since the CRBS may have much more air
interfaces, the link capacity between CR-BSs may be large. Another benefit of this kind of link is
the reduced cost in placing the CR-BSs. This is because that setting up a CR-BS in some
environment with a physical wired link is not feasible.
 PR-MS to PR-BS
It is the typical one-hop connection between mobile stations and base stations. The PR-BS is
responsible for coordinating communications in its coverage and providing backbone network
access to the PR-MS.
 PR-MS to CR-MS
In order to provide interoperability between different communication systems, this kind of link
may be necessary. In this case, the CR-MS shall reconfigure itself to be one part of the primary
system.

20
Spectrum Sensing in Cognitive Radio Using Matched Filter

 PR-MS to CR-BS
In order to provide interoperability between different communication systems, this kind of link
may be necessary. If the CR-BS can run the protocol of primary system, it can provide access
service to the PR-MS.
 PR-MS to PR-MS
Including this link enables the possibility of ad hoc connections between PR-MSs.
3.4 Advantages and dis advantages of cognitive radio system
3.4.1Advantage of CR
 Mitigate and solving spectrum access issues.
 Spectrum utilization improves.
 Improves wireless networks performance through increased user throughput and system
reliability.
 More adaptability and less co-ordination.
3.4.2 Disadvantage of CR
 Software reliability
 Loss of control
 Regulatory concerns
 Fear of undesirable adaptations.
 Significant research is to be done to commercially use cognitive radio.
Application of CR
 Improving reliability in wireless communication system.
 Less expensive radio.
 Advanced network topologies.
 Enhancing SDR techniques.
 Automatic radio resource management.
3.5 Spectrum Sensing Techniques
One of the most important steps of cognitive cycle is spectrum sensing. The objective of
spectrum sensing is to detect the presence of transmissions from primary users. A CR can’t
transmit and detect the radio environment simultaneously, thus we need a spectrum sensing
technique that take less time for sensing the radio environment in literature spectrum sensing
techniques have been classified into three categories

21
Spectrum Sensing in Cognitive Radio Using Matched Filter

Spectrum
Sensing

Transmitter Interference
Receiver
Detection Temperature
detection
managment

Matched filter Energy Cyclostationary


detection detection feature detection

figure 3. 10 Spectrum Sensing Techniques

Transmitter detection
In primary detection we have to find the primary transmitters that are transmitting at any given
time. Hypothesis model for transmitter detection is defined in that is the signal received
(detected) by the CR (secondary) user is.
X (t) =n (t) H0
X (t) =h s (t) +n (t) H1
Where x (t) is the signal received by CR s (t) is the transmitted signal of primary user n (t) is
AWGN noise and h is the amplitude gain of the channel. On the basis of detection techniques.
3.6 Matched Filter Detection
Matched filter is a linear filter designed to provide maximum signal to noise ratio at its output
for a given transmitted waveform. Matched filter operation is equivalent to correlation in which
the unknown signal is convolved with the filter whose impulse response is the mirror and time
shifted version of a reference signal.

22
Spectrum Sensing in Cognitive Radio Using Matched Filter

Figure 3.1 depicts the block diagram of matched filter the signal received by CR is the input to
matched filter which is r (t) = s (t) +n (t) the matched filter convolves the r (t) with h (t) where h
(t) = s (T-t). Finally the output of matched filter is compared with a threshold value l to decide
whether the primary user is present or not.

AWGN Mixed Matched


Channel signal Filter Decision
Device

Threshold
figure 3. 11 Block diagram of matched filter

A matched filter is an optimal detector in an AWGN channel if the wave form of primary user is
previously known by CR it means that the CR should have knowledge about the waveform of
primary user such as modulation type and order, the pulse shape and the packet format so if CR
doesn’t have this type of prior information then it’s difficult to detect the primary user. Matched
filter is specialized in decision making on whether the signal is present or not can be facilitated if
we pass the signal through a filter, which will accentuate the useful signal s(t) and suppress the
noise w(t) at the same time. Such a filter which will peak out the signal component at some
instant and suppress the noise amplitude at the same time has to be designed. This will give a
sharp contrast between the signal and the noise, and if the signal s(t) is present, the output will
appear to have a large peak at this instant. If the signal is absent at this instant, no such peak will
Spectrum Sensing using matched filter can be obtained by the following steps:
1. The output of the matched filter is sampled at time t=T.
2. The amplitude of the sampled signal is compared with a given threshold λ.
3. If the amplitude of the sampled output is greater than the threshold value, the receiver decides
that the primary known signal S (t) is present. Otherwise, the receiver decides that the signal is
absents.
Hence the decision is only depends on the amplitude of the impulse signal but not duration of the
Signal. Matched filter works on the phenomena of maximizing the probability of detection and

23
Spectrum Sensing in Cognitive Radio Using Matched Filter

the output signal-to-noise ratio. From Fig 3.1, the output of the matched filter detection can be
obtained by

The energy of signal is

X (f) is the Fourier transform of the signal x (t), to which


the Filter is matched and h [n] is the impulse response of the filter then output signal-to-noise
ratio where N0 is the channel noise is.

Figure3.1 shows the block diagram for this in which a signal received from primary user is
transmitted through AWGN (Additive White Gaussian Noise) channel and the transmitted signal
is given to matched filter. Matched filter correlates the signal with time modified version. Then
comparison between the predetermined threshold and the final output of matched filter will
determine the presence of the primary user.

24
Spectrum Sensing in Cognitive Radio Using Matched Filter

figure 3. 12Process flow diagrams of Matched filter Detection .

3.6.1 Hypotheses for matched filter detection


In this project, the Gaussian distribution, Additive white Gaussian noise, Q-function, signal to
noise ratio, for spectrum sensing are mainly used through the whole process. This part indicates
the details of the theories.
Gaussian distribution
In probability theory, the Gaussian distribution is a continuous probability distribution that is
often used as a first approximation to describe real-valued random variables with two
parameters, mean value and the variance, the former makes the location of the peak and the latter
makes the width of the distribution.
Additive White Gaussian Noise
Additive white Gaussian noise (AWGN) is a type of noise which exists in the communication
channels generally. In an AWGN channel model, we always assume that there is no any other
distortion or effects from other sources. Additive white Gaussian noise is a model for the thermal
noise generated by random electron movement in the receiver.
Signal to Noise Ratio

25
Spectrum Sensing in Cognitive Radio Using Matched Filter

In analog and digital communications, signal to noise ratio (SNR) is defined as the ratio of signal
power to the noise power. It indicates signal intensity relative to background noise. When the
ratio is higher than 1:1, it indicates there is more signals than noise.
Q-function
The Q-function is a convenient way to express right-tail probabilities for Gaussian random
variables. For x∈R, Q (x) is defined as the probability that a standard normal random variable
(zero mean, unit variance) exceeds x.
Cognitive radio networks emerged as a static network paradigm to address the following
problems: exhaustion of the scarce wireless spectrum and underutilization of the licensed
spectrum in some areas. In CRNs, wireless nodes change their parameters to communicate
efficiently, avoiding interference with PUs or SUs. This alteration of parameters is based on
monitoring the radio environment, such as the radio frequency spectrum, user behavior, and
network state. The primary user signals in the spectrum band can be detected based on the well-
known binary hypothesis.
(3.1)

Where x[n] is the received signal by secondary users, W[n] is additive white Gaussian noise with

Zero mean and s2w variance. S[n] is the transmitted signal of the primary user and h is the
channel gain. H0 And H1 are the sensing states for absence and presence of signal respectively.
Another saying; H0 is the null hypothesis which indicates that primary user does not
communicate and H1 is the alternative hypothesis that indicates the existence of the primary User.
We can define four possible cases for the detected signal:
1. Declaring H1 under H1 hypothesis which leads to Probability of Detection (Pd)
2. Declaring H0 under H1 hypothesis which leads to Probability of Missing (Pm)
3. Declaring H1 under H0 hypothesis which leads to Probability of False Alarm (Pfa)
4. Declaring H0 under H0 hypothesis which leads to Probability correct dismissal (Pcd)
If 0 H is decided under 1 H hypothesis, then it leads to probability of missing, Pm,that is
Probability of deciding that there’s no primary signal while primary signal actually exists.
Another saying it’s the probability of signal missing. If 1 H is decided while 0 H is observed then
it refers to find the probability of false alarm which indicates to decide primary signal exists

26
Spectrum Sensing in Cognitive Radio Using Matched Filter

while there’s actually no primary user communicating. Thus false alarm error leads to inefficient
usage of the spectrum.
Literally, the aim of the signal detector is to achieve correct detection all of the time, but this can
never be perfectly achieved in practice because of the statistical nature of the problem. Therefore
signal detectors are designed to operate within prescribed minimum error levels. Missed
detections are the biggest issue for spectrum sensing, as it means possibly interfering with the
primary system. Nevertheless, it is desirable to keep false alarm probability as low as possible, so
that the system can exploit all possible transmission opportunities.
Consider H0 and H1 are binary hypotheses, D0 and D1 are statistical decisions and the
probability density functions are

The performance of the MF detector is based on the following two parameters: the probability of
detection (PD) and the probability of false alarm (PFA). We talk about the probability of false
alarm PFA when there is no signal, i.e. just the noise, and we detect signal from the distribution
Hi of the test statistic T under hypothesis H0. On the Figure 2.8, probability of errors and correct
decisions are defined.

27
Spectrum Sensing in Cognitive Radio Using Matched Filter

figure 3. 13 Observation Space

Probability of false alarm


Probability that there is no signal on the channel and that the detector can sense signal levels not
correctly. High probability of false alarm leads to inefficient usage of spectrum because it means
many idle spectrum bands are detected as used by primary user, that’s why cognitive radio
cannot use these spectrum bands, thus the efficiency of the spectrum usage decreases. For this
reason, it is important to analyses the detection performance of a system for a given efficiency
level.
We know that False Alarm Probability is the probability that cognitive radio decides in favor of
H1 hypothesis while H0 hypothesis exists which means cognitive radio detects the idle band as an
occupied band by primary user.
(3.3)

Probability of dismissal = 1-PFA

(3.4)

28
Spectrum Sensing in Cognitive Radio Using Matched Filter

(3.5)

3.6.2 Threshold Selection Using Log Likelihood Ratio


Assuming that, at time t, the received signal is x (t), knowing probabilities are

F(x/H0) and f(x/H1), then The likelihood ratio can be obtained as

Where x = (N-1)T and g is the threshold

Where T(x) = sTx is the test static and g. = s2w ln (g) +1/2sTs is the new threshold

3.6.3 Threshold Selection Using Neyman Pearson Observer

From Fig 3.1, it is clear that the output signal is

29
Spectrum Sensing in Cognitive Radio Using Matched Filter

Hence it requires known arrival time and it is clear that the filter output is maximum at N-1.
The mean of test static T(x) = sTx is

Where x is the energy of the signal

Hence the performance improves as x /s2w (SNR) increase.

From equation (3.16), threshold can be obtained as

And the probability of detection is

Choose g' to maximize PD and satisfy the false alarm rate constant

30
Spectrum Sensing in Cognitive Radio Using Matched Filter

CHAPTER FOUR
RESULTS AND DISCUSSION
4.1 Introduction
In this chapter, we studied the performance of spectrum sensing using matched filter detection by
choosing various threshold values .In many systems, signals are attenuated by Additive White
Gaussian Noise (AWGN). When searching for a specific signal in a noisy signal, the best means
of finding that signal in the noise is via a matched filter. And also compares the probability of
detection with Number of samples and probability of false alarm for different SNR values. And
also discussed all results.
4.2 Results
The main objective of this thesis is to improve spectrum sensing using matched filter detection

by choosing various threshold values. Fig. 4.1, this figure simply illustrates what is happening to

the received signal when attenuated by the noise. Fig 4.2 following figure illustrates the more
realistic case, where the received signal cannot be visually seen. We would like to eliminate the
noise in the signal. To do this, we take advantage of the fact that the mean of the AWGN is 0.

Therefore, if the noise could be summed, the mean should be nearly 0. From fig 4.3The principle
idea of the matched filter being that the noise should be approximately summed to zero, but where
the two signals overlap a maximum value in the convolution should be produced. Note that when
implemented, the convolution is performed as circular convolution. This is visualized below. The
peak of the matched filter output should be located at nearly the amount that the reference signal
needs to be shifted by for it to align with the signal buried in the noisy signal. Another desire
arising from the matched filter’s output is to be able to shift the reference signal so that it aligns
with the signal buried in the noisy signal. From fig 4.4 it is clearly observed that matched filter
with Neyman Pearson observer gives better detection probability. To attain probability of
detection is 0.4, matched filter with Neyman Pearson observer requires - 19dB SNR value,
matched filter with LLR requires -17dB.
Probability of false alarm versus probability of detection for SNR -10 dB values of matched filter
detection with NP observer is shown in Fig 4.2. Form the Fig. 4.5; it is observed that the
probability of detection can be improved as SNR is increased.

31
Spectrum Sensing in Cognitive Radio Using Matched Filter

Figure 4. 1 the received signal when attenuated by the noise

Figure 4. 2 received signal attenuated by noise

32
Spectrum Sensing in Cognitive Radio Using Matched Filter

Figure 4. 3matched filter output

Figure 4. 4ROC curve for probability of false alarm

33
Spectrum Sensing in Cognitive Radio Using Matched Filter

Figure 4. 5Probability of false alarm vs Probability of detection

4.3 Discussion
From the above results, it is clear that the detection probability can be improved by selecting the
proper threshold value in the cognitive radio networks. It is also observed that the matched filter
with a NP observer gives better performance comparing with other techniques. However it
requires prior information about the primary user’s signal as well as the arrival time of the
primary user’s signal. It is the optimal detection technique, when the CR user knows the prior
knowledge about primary signal.

34
Spectrum Sensing in Cognitive Radio Using Matched Filter

CHAPTER FIVE
CONCLUSION AND FUTURE WORK
5.1 Introduction
In this chapter, we will describe the conclusion of the project and also how to implement the
project for the next time that means the future work of the project.
5.2 Conclusion
In this thesis we analyzed the performance of spectrum sensing technique matched filter
detection, the spectrum sensing results are gathered in terms of probability of false alarm
(Pf),probability of PU detection alarm (PD), for a specific SNR. We analyzed the performance of
spectrum sensing technique matched filter for NP observer.
By implementing matched filter method, we can say that as SNR value increases probability of
detection increases. By studying matched filter parameters, we can say that as number of samples
increases probability of detection increases and SNR get improved. So matched filter is also used
to improve SNR in wireless communication. We succeeding simulate the output signals, and we
distinguish whether there are primary users or not, we get how the SNR influences the
detections. So we almost get the final result of the spectrum sensing for cognitive radio based on
matched filter Detection as we expected. By comparing the theoretical value and the simulated
value we can get that the result we get is reasonable and scientific.
5.3 Future Work
This thesis has been completed in the final year of B. Tech and hence the hardware
implementation could not be carried out in the tenure. Thus it can be carried out in future. The
only limitation of the proposed scheme is we should have the prior knowledge about the PU
signal before sensing the channel. The choice of matched filter detection technique proposed
here to estimate the channel in the lower SNR regime. Consequently, finding lower bound of min
g (Threshold) and upper bound of maxg is still an open issue. Future work is in progress in this
direction.

35
Spectrum Sensing in Cognitive Radio Using Matched Filter

References
[1] Kattaswamy Mergu, Bekalu Alebachew, Abreham Teshome Metaferia. An improved
spectrum sensing technique using matched filter detection with a np observer. IJECT.
2016;7(2):26-29.
[2] Mansi Subhedar, Gajanan Birajdar. Spectrum sensing techniques in cognitive radio networks:
survey. IJNGN. 2011;3(2):37-51.
[3] Nabil Giweli, Seyed Shahrestani, Hon Cheung. Selection of spectrum sensing method to
enhance QOS in cognitive radio networks. IJWMN. 2016;8(1):39-50.
[4] Fathima Salahdin, Hassn El Ghazi, Naima Kaabouch, Wasim Fassim Fihri. Matched filter
with dynamic threshold for cognitive radio networks. 2015;978-1-4673-8224-3/15, IEEE.
[5] Sheerz Akthar Alvi. A log-likelihood based cooperative spectrum sensing scheme for
cognitive radio networks. ELSEVIER Journal on Emerging Ubiquitous System and Pervasive
Networks, Procedia Computer Sciences. 2014;196-202.
[6] Daniela Mercedes. Evaluation of energy detection for spectrum sensing based on the dynamic
selection of detection threshold. ELSEVIER Journal on International Meeting of Electrical
Engineering Research, Proceedings. 2012;35:135 143.
[7] Simon Haykin, David J. Thomson, Jeffrey Reed H. Spectrum Sensing for cognitive radio.
IEEE Proceeding. 2009;97(5):849-87.
[8] Lim CH. Adaptive energy detection for spectrum sensing in unknown white Gaussian noise.
IET Commun. 2012;6:1884-1889.
[9] Benítez ML, Casadevall F. Improved energy detection spectrum sensing for cognitive radio.
IET Commun. 2012;6:785-796.
[10] Takeshi Ikuma, Mort Naraghi-Pour. A comparison of three classes of spectrum sensing
techniques. IEEE GLOBECOM Proceedings; 2008
[11] Vadivelu R, Sankarnarayanan K, Vijayakumari V. Matched filter based spectrum sensing
for cognitive radio at low signal to noise ratio. JATIT. 2014;62(1):107-113.
[12] Ashis Bagwari, Mieee, Brahmijit singh. Comparative performance evaluation of spectrum
sensing techniques for cognitive radio networks. 4th International Conference on Computational
Intelligence & Communication Networks. IEEE. 2012;978-0-7695-4850-0.

36
Spectrum Sensing in Cognitive Radio Using Matched Filter

Appendices

A) ROC curve for SNR vs Probability of Detection for Pf=0.2


clc
clear all
close all
%fs1=30e3; %30kHz sampling rate
%nCyl=5;
%f=100;
t=0:0.01:2*pi; %time index
x=5*cos(t);
l=length(x);
P=sum(x.^2);
%Normalizing Signals
%x=x./sqrt(P);
snr_dB=-20:0.5:0;
snr=10.^(-snr_dB/10);
for i=1:length(snr_dB)
detect=0;
pf=0.02;
for kk=1:1000 % Number of Monte Carlo Simulations
%generating noise signal of desired SNR
noise=sqrt(snr(i)).*randn(1,l);
%Received Signal
r=x+noise;
%Matched Filter
M=filter(fliplr(x),1,r);
%figure;
%plot(M);
%correlation

37
Spectrum Sensing in Cognitive Radio Using Matched Filter

X=xcorr(M,x);
%figure;
%plot(X);
gamma=icdf('norm',(1-pf),0,1);
threshold=log(gamma)+(1/2)*(P);
%threshold=sqrt(var(noise)*P)*qfuncinv(pf);
%thrs=var(noise)*log(threshold)+(1/2)*abs(x).^2;
xdisc=X(1:1:length(X));
if xdisc(i)>=threshold
detect=detect+1;
end
end
Pd(i) = detect/kk;
Pm(i)=1-Pd(i);
%Pd_the(i) = qfunc(((Threshold - (snr(i) + 1)).*sqrt(L))./(sqrt(2).*(snr(i) + 1)));
%Pm_the(i)=1-Pd_the(i)
end
snr_dB=-20:0.5:0;
snr=10.^(-snr_dB/10);
for i=1:length(snr_dB)
detect=0;
pf=0.02;
for kk=1:1000 % Number of Monte Carlo Simulations
%generating noise signal of desired SNR
noise=sqrt(snr(i)).*randn(1,l);
%Received Signal
r=x+noise;
%Matched Filter
M=filter(fliplr(x),1,r);
%figure;
%plot(M);

38
Spectrum Sensing in Cognitive Radio Using Matched Filter

%correlation
X=xcorr(M,x);
%figure;
%plot(X);
%gamma=icdf('norm',(1-pf),0,1);
%threshold=log(gamma)+(1/2)*(P/l);
threshold1=sqrt(var(noise)*P)*qfuncinv(pf);
xdisc=X(1:1:length(X));
if xdisc(i)>=threshold1
detect=detect+1;
end
end
Pd1(i) = detect/kk;
Pm(i)=1-Pd(i);
%Pd_the(i) = qfunc(((Threshold - (snr(i) + 1)).*sqrt(L))./(sqrt(2).*(snr(i) + 1)));
%Pm_the(i)=1-Pd_the(i)
end
plot(snr_dB,Pd,'g','LineWidth',2 );

hold on

plot(snr_dB,Pd1,'r','LineWidth',2 );

hold off

title('ROC curve for SNR vs Probability of Detection for Pf=0.2')

xlabel('Signal To Noise Ratio (dB)');

ylabel('Probability Of Detection');

title('ROC plot for snr Vs Pm for target pf=0.02')

legend('Matched Filter with LLR','Matched Filter with NP observer')

B) ROC plot for Probability of False Alarm vs Probability of Detection for SNR = -10 Db

clc

39
Spectrum Sensing in Cognitive Radio Using Matched Filter

clear all

close all
fs1=30e3; %30kHz sampling rate
nCyl=5;
f=100;
t=0:1/fs1:nCyl*1/f; %time index
x=5*cos(2*pi*f*t);
l=length(x);
P=sum(x.^2);
%-----SNR in decibels-----%
snr_dB = -10;
%-----Linear Value of SNR-----%
snr = 10.^(snr_dB./10);
%-----Probability of False Alarm-----%
Pf = 0:0.1:1;
%Normalizing Signals
%x=x./sqrt(P);
for i=1:length(Pf)
detect=0;
for kk=1:1000 % Number of Monte Carlo Simulations
%generating noise signal of desired SNR
noise=sqrt(snr).*randn(1,l);
%Received Signal
r=x+noise;
%Matched Filter
M=filter(fliplr(x),1,r);
%figure;
%plot(M);
%correlation
X=xcorr(M,x);
%figure;

40
Spectrum Sensing in Cognitive Radio Using Matched Filter

%plot(X);

%gamma=icdf('norm',(1-pf),0,1);
%threshold=log(gamma)+(1/2)*(P/l);
threshold(i)=sqrt(var(noise)*P)*qfuncinv(Pf(i));
xdisc=X(1:1:length(X));
test=(1/length(xdisc))*sum(xdisc);
if test>=threshold(i)
detect=detect+1;
end
end
Pd(i) = detect/(kk);
Pm(i)=1-Pd(i);
%Pd_the(i) = qfunc(((Threshold - (snr(i) + 1)).*sqrt(L))./(sqrt(2).*(snr(i) + 1)));
%Pm_the(i)=1-Pd_the(i)
end
plot(Pf, Pd,'r')
grid on
title('ROC plot for Probability of False Alarm vs Probability of Detection for SNR = -10 dB');
xlabel('Probability Of False Alarm');
ylabel('Probability Of Detection');

41
Spectrum Sensing in Cognitive Radio Using Matched Filter

42

You might also like