Finall Project
Finall Project
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.
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
v
Spectrum Sensing in Cognitive Radio Using Matched Filter
List of Figures
figure 3. 1 SpectrumUtilization…………………………………………………………………....7
vi
Spectrum Sensing in Cognitive Radio Using Matched Filter
List of Tables
vii
Spectrum Sensing in Cognitive Radio Using Matched Filter
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
3
Spectrum Sensing in Cognitive Radio Using Matched Filter
Literature
survey
Conclusion and
recommendation
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
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.
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.
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.
11
Spectrum Sensing in Cognitive Radio Using Matched Filter
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.
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
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
16
Spectrum Sensing in Cognitive Radio Using Matched Filter
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.
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
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.
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
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
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
(3.4)
28
Spectrum Sensing in Cognitive Radio Using Matched Filter
(3.5)
Where T(x) = sTx is the test static and g. = s2w ln (g) +1/2sTs is the new threshold
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
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
32
Spectrum Sensing in Cognitive Radio Using Matched Filter
33
Spectrum Sensing in Cognitive Radio Using Matched Filter
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
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
ylabel('Probability Of Detection');
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