Professional Documents
Culture Documents
SDR in Cognitive Radio With Spectral Analysis and Window Management
SDR in Cognitive Radio With Spectral Analysis and Window Management
WINDOW MANAGEMENT
Submitted by
ASSOCIATE PROFESSOR
BONAFIDE CERTIFICATE
This is to certify that this project entitled “SDR IN COGNITIVE RADIO WITH
SPECTRAL ANALYSIS AND WINDOW MANAGEMENT “is the bonafide
work of KONDAVEETI PHANI KIRAN (U17EC371), DUVVURU BHANU
PRAKASH YADAV (U17EC375),SINGALA VIJAY KUMAR (U17EC373), who
carried out the project work under our supervision. Certified further that to the best
of my knowledge the work reported herein does not form part of any other thesis or
dissertation on the basis of which a degree or award was conferred on an earlier
occasion on this or any other candidate.
First of all, I express my sincere thankfulness to the almighty, for bestowing his blessings
throughout this project work. I express my gratitude to my parents for their care, support, prayers
and love.
My sincere thanks to our Honorable Chairman Dr.S. Jagathrakshakan, Honorable President, Dr.
J.SundeepAanand and Managing director Dr .E.Swetha Sundeep Aanand, Bharath Institute of
Higher Education and Research, for their kind words and enthusiastic motivation which has
inspired me a lot in completing my Project.
I would like to express my deep gratitude to our Vice Chancellor Dr.V.Kanagasabai, Pro Vice
Chancellor Academics Dr.M.Sundararajan,Pro Vice Chancellor Research Dr.K.Vijaya Bhaskar
Raju, Registrar Dr.S.Bhuminathan, Director Professor. S.Theagarajan, Pro Vice Chancellor and
Controller of Examinations Dr. R.M.Suresh, Dean-Engineering Dr. J.Hameed Hussain who are
responsible for moulding my thoughts in completing my Project.
I am grateful to Dr.M. Prem Jayakumar (Dean R & D) for his valuable suggestions, kind co-
operation and encouragement during the course of my study.
I wish to express my sincere profound gratitude to my esteemed and endowed Project guide Dr
.s.v.Mahesh Kumar, for his inspiring guidance, healthy criticism, valuable suggestions and
constant encouragement throughout the period of project.
I sincerely wish to express my thanks to the staff members of Library, BIHER for their valuable
support during this project work. I would like to thank the authors of various journals and books
whose works and results are used in the project.
CHAPTER TITLE
NO PAGE
NO
ABSTRACT 5
1 INTROUCTION 6
2 LITERATURE REVIEW
1
3 PROPOSED METHOD
3.1 Algorithm 16
4 IMPLEMENTATION
4.4 Graphics 22
2
5 SOFTWARE IMPLEMENTATION 29
3
5.2 DSB-SC AM Modulation 37
6 SPECTRAL 39
ANALYSIS
6.1 Computing The DFT,IDFT, and 39
Using Them for Filtering
6.2 Sampled Signal 42
7 RESULTS 57
8 CONCLUSION 63
4
SDR IN COGNITIVE RADIO WITH SPECTRAL
ANALYSIS
Abstract:
Software Defined Radio (SDR) is one of possibilities to realize the structure of
device with a high mobility, flexibility and reconfigurability. Extending the flexibility
further, a system capable to sense the spectrum space available for communication and
adapt to it is Cognitive Radio.Cognitive radio is envisioned as the ultimate system that
can sense, adapt and learn from the environment in which it operates. Sensing the
available bandwidth an SDR (Software defined radio) in a Cognitive System, tunes the
circuits in the System for transferring data at optimum data rates, permissible by the
space available. So it is a must for the SDR to accordingly add processing circuits to
maintain the System performance at variable working frequencies. Cognitive radio and
also presents some useful results obtained to configure the SDR for higher bandwidth
available in Cognitive Radio. Results of Frequency Hopping Spread Spectrum (FHSS)
implementation, Codec Algorithm modifications, and decoder iterations variation and
Performance improvement using OQPSK are depicted in the paper
5
CHAPTER 1
INTRODUCTION
SDR technology can be used to implement military, commercial and civilian radio
applications. A wide range of radio applications like Bluetooth, WLAN, GPS, Radar,
WCDMA, GPRS, etc. can be implemented using SDR technology.
Traditional hardware based radio devices limit cross-functionality and can only be
modified through physical intervention. This results in higher production costs and
minimal flexibility in supporting multiple waveform standards. By contrast, software
defined radio technology provides an efficient and comparatively inexpensive solution
to this problem, using software upgrades. SDR defines a collection of hardware and
software technologies where some or all of the radio’s operating functions are
implemented through modifiable software or firmware operating on programmable
processing technologies.
6
1.2 A Brief History of SDR
Today’s SDR, in contrast, is a general-purpose device in which the same radio tuner
and processors are used to implement many waveforms at many frequencies. The
advantage of this approach is that the equipment is more versatile and cost effective.
7
The air interface and link-layer protocols differ across various geographies (for
e.g. European wireless networks are predominantly GSM/TDMA based while
in USA the wireless networks are predominantly IS95/CDMA based). This
problem has inhibited the deployment of global roaming facilities causing great
inconvenience to subscribers who travel frequently from one continent to
another. Handset vendors face problems in building viable multi-mode handsets
due to high cost and bulky nature of such handsets.
For Wireless Network Operators SDR enables new features and capabilities to
be added to existing infrastructure without requiring major new capital
expenditures.
8
SDR technology has some drawbacks like higher power consumption, higher
processing power (MIPS) requirement and higher initial costs. SDR technology may
not be suitable for all kinds of radio equipment due to these factors. Hence these factors
should be carefully considered before using SDR technology in place of complete
hardware solution. For e.g., SDR technology may not be appropriate in pagers while it
may offer great benefits when used to implement base-stations.
9
CHAPTER 2
LITERATURE REVIEW
The sophistication possible in a software-defined radio (SDR) has now reached the
level where each radio can conceivably perform beneficial tasks that help the user, help
the network, and help minimize spectral congestion.
The development of digital signal processing (DSP) techniques arose due to the efforts
of such leaders as Alan Oppenheim, Lawrence Rabiner, Ronald Schaefer, Ben Gold,
Thomas Parks, James McClellen, James Flanagan, Fred Harris, and James Kaiser.
These pioneers recognized the potential for digital filtering and DSP, and prepared the
seminal textbooks, innovative papers, and breakthrough signal processing techniques
to teach an entire industry how to convert analog signal processes to digital processes.
Meanwhile, the semiconductor industry, continuing to follow Moore’s law, evolved to
the point where analog functions implemented with large discrete components were
replaced with digital functions implemented in silicon, and consequently were more
producible, less expensive, more reliable, smaller, and of lower power.
During this same period, researchers all over the globe explored various
techniques to achieve machine learning and related methods for improved machine
behavior. Among these were analog threshold logic, which lead to fuzzy logic and
neural networks, a field founded by Frank Rosenblatt. In networking, DARPA and
industrial developers
10
at Xerox, BBN Technologies, IBM, ATT, and Cisco each developed computer-
networking techniques, which evolved into the standard Ethernet and Internet we all
benefit from today. The researchers are exploring wireless networks that range from
access directly via a radio access point to more advanced techniques in which
intermediate radio nodes serve as repeaters to forward data packets toward their
eventual destination in an ad hoc network topology. Cognitive radios are nearly always
applications that sit on top of an SDR, which in turn is implemented largely from digital
signal processors and general-purpose processors (GPPs) built in silicon.
CR implies intelligent signal processing (ISP) at the physical layer of a wireless system,
i.e. the layer that performs functions such as communications resource management,
access to the communications medium, etc. Usually, it is accompanied by ISP at higher
layers of the Open System Interconnection (OSI) model. If ISP is not implemented at
these higher layers then a CR will be restricted in what it can do. Because a
communication exchange uses all seven OSI layers, ideally all seven layers need to be
flexible if the CR’s intelligence is to be fully exploited. Without optimization of all the
layers, spectrum efficiency gains may not be optimized.
11
Fig 2.1 The 7 layers of OSI Model
The idea of cognitive radio was born because of spectrum shortage. These devices
utilize advanced radio and signal-processing technology along with novel spectrum-
allocation policies to support new wireless users operating in the existing crowded
spectrum without degrading the performance of entrenched users. A cognitive radio
must collect and process information about coexisting users within its spectrum, which
requires advanced sensing and signal-processing capabilities. The larger barrier is the
requirement for significant changes in the way wireless spectrum is currently allocated
to enable cognitive techniques.
Licensed frequency bands today are the radio and television bands, cellular and satellite
bands, and air traffic control bands. The main advantage of the licensing approach is
that the licensee completely controls its assigned spectrum, and can thus unilaterally
manage interference between its users and hence their quality of service (QoS).
In addition to the licensed spectrum, in recent years spectrum has been set aside in
specific frequency bands that can be used without a license by radios following a
specific set of etiquette rules, such as a maximum power per hertz or a shared channel
access mechanism. The purpose of these unlicensed bands is to encourage innovation
without the high cost to entry associated with purchasing licensed spectrum through
auctions. The unlicensed bands have proven a great vehicle for innovation, and the 2.4
GHz unlicensed band currently hosts systems such as Bluetooth, 802.11b/g/n Wifi, and
12
cordless phones. Unfortunately, the unlicensed bands can be killed by their own
success, since the more devices that occupy these bands, the more interference they
cause to each other.
Spectrum allocation is not just limited to licensed and unlicensed paradigms. The
licensed or unlicensed bands may accommodate many additional wireless devices if
these devices can exploit advanced technology to only minimally disrupt the
communications of coexisting non-cognitive devices. Cognitive radio originated in the
form of various solutions to this problem that allow cognitive communication with
minimal impact on non-cognitive users.
Based on the type of available network side information along with the regulatory
constraints, cognitive radio systems seek to underlay, overlay, or interweave their
signals with those of existing users without significantly impacting their
communication. The underlay paradigm allows cognitive users to operate if the
interference caused to non cognitive users is below a given threshold. In overlay
systems, the cognitive radios use sophisticated signal processing and coding to
maintain or improve the communication of non cognitive radios while also obtaining
some additional bandwidth for their own communication. In interweave systems; the
13
cognitive radios opportunistically exploit spectral holes to communicate without
disrupting other transmissions.
Underlay typically coexists with licensed users. Licensed users paid for their
spectrum so they don’t want underlay,Insist on very stringent interference constraints
which severely limits underlay capabilities and applications. That is the main
challenge for underlay policy.
The overlay paradigm allows the coexistence of simultaneous primary and secondary
communications in the same frequency channel as long as the secondary users
somehow aid the primary users, for example, by means of advanced coding or
cooperative techniques. In particular, in a cooperative scenario the secondary users may
decide to assign part of their power to their own secondary communications and the
remaining power to relay the primary users transmission. The enabling premise for
overlay systems is that the cognitive transmitter has knowledge of the noncognitive
14
users’ codebooks and its messages as well. A noncognitive user message might be
obtained by decoding the message at the cognitive receiver.
On the one hand, the information can be used to completely cancel the interference due
to the noncognitive signals at the cognitive receiver by sophisticated techniques, like
dirty paper coding (DPC). On the other hand, the cognitive users can utilize this
knowledge and assign part of their power for their own communication and the
remainder of the power to assist (relay) the noncognitive transmissions. By careful
choice of the power split, the increase in the noncognitive user’s signal-to-noise power
ratio (SNR) due to the assistance from cognitive relaying can be exactly offset by the
decrease in the noncognitive user’s SNR due to the interference caused by the
remainder of the cognitive user’s transmit power used for its own communication.
15
CHAPTER 3
PROPOSED METHOD
3.1 Algorithm
In the Project, our primary aim was to simulate a working cognitive radio for
which we were required to produce a variable source generator to replicate real
life usage of the frequency channels.
After completion of the source generator, the signal in channel, if there, have to
be modulated so as for making it suitable for transmission and defining the
frequencies that will be used by it during transmission.
All the different modulated carrier signals will then multiplexed to give a
continuous spectrum.
To detect an empty channel, we have used the power spectral density of all the
signals which will provide us the power being transmitted at a particular
frequency channel at the moment.
Threshold values will be set for determining whether the channel is empty or
not.
Once the sensing part is over, another user will be introduced acting as secondary
user and will attain the particular frequency for which the PSD is below the
threshold, Thus achieving functionality of cognitive radio.
16
All these methods are good and each has its own advantages and disadvantages.
The method used in this paper is energy detection method because of its
simplicity and ability with which it can be applied in almost all the cases.
Moreover, it has low computational and implementation complexities and
optimal under no knowledge of primary signal. We have used energy detection
method for building the cognitive radio network.
A. Energy Detection
Energy detector based approach is the most common way of spectrum sensing
because of its low computational and implementation complexities. When the
primary user signal is unknown or the reciever cannot gather sufficient
information about the primary user signal, the energy detection method is used.
About the primary user signal, the energy detection method is used. This
method is optimal for detecting any unknownzero-mean constellation signals
and can be applied to cognitive radios (CRs).
Fig-3.1
17
Fig-3.2
Energy detection & Spectrum Sensing block
18
CHAPTER 4
IMPLEMENTATION
MATLAB
You can use MATLAB in a wide range of applications, including signal and image
processing, communications, control design, test and measurement, financial modeling
and analysis, and computational biology. Add-on toolboxes (collections of special-
purpose MATLAB functions) extend the MATLAB environment to solve particular
classes of problems in these application areas.
MATLAB provides a number of features for documenting and sharing your work. You
can integrate your MATLAB code with other languages and applications, and distribute
your MATLAB algorithms and applications.
Key Features
OVERVIEW OFMATLAB
• Algorithm development
• Data acquisition
MATLAB has evolved over a period of years with input from many users. In
university environments, it is the standard instructional tool for introductory and
20
advanced courses in mathematics, engineering, and science. In industry, MATLAB is
the tool of choice for high-productivity research, development, and analysis.
This is the set of tools and facilities that help you use MATLAB functions and
files. Many of these tools are graphical user interfaces. It includes the MATLAB
desktop and Command Window, a command history, an editor and debugger, a code
analyzer and other reports, and browsers for viewing help, the workspace, files, and the
search path.
21
This is a high-level matrix/array language with control flow statements,
functions, data structures, input/output, and object-oriented programming features. It
allows both “programming in the small” to rapidly create quick and dirty throw-away
programs, and “programming in the large” to create large and complex application
programs.
4.4 GRAPHICS
MATLAB has extensive facilities for displaying vectors and matrices as graphs,
as well as annotating and printing these graphs. It includes high-level functions for two-
dimensional and three-dimensional data visualization, image processing, animation,
and presentation graphics. It also includes low-level functions that allow you to fully
customize the appearance of graphics as well as to build complete graphical user
interfaces on THE
This is a library that allows you to write C and Fortran programs that interact
with MATLAB. It includes facilities for calling routines from MATLAB (dynamic
linking), calling MATLAB as a computational engine, and for reading and writing
MAT-files.
22
Image Processing Toolbox supports a diverse set of image types, including high
dynamic range, gigapixel resolution, ICC-compliant color, and tomographic images.
Graphical tools let you explore an image, examine a region of pixels, adjust the contrast,
create contours or histograms, and manipulate regions of interest (ROIs). With the
toolbox algorithms you can restore degraded images, detect and measure features,
analyze shapes and textures, and adjust the color balance of images.
There are several ways to import and export images into and out of the
MATLAB environment for processing. You can use Image Acquisition Toolbox to
23
acquire live images from Web cameras, frame grabbers, DCAM-compatible cameras,
and other devices. Using Database Toolbo, you can access images stored in
ODBC/JDBC-compliant databases.
MATLAB supports standard data and image formats, including JPEG, JPEG-
2000, TIFF, PNG, HDF, HDF-EOS, FITS, Microsoft Excel, ASCII, and binary files. It
also supports the multiband image formats BIP and BIL, as used by LANDSAT for
example. Low-level I/O and memory mapping functions enable you to develop custom
routines for working with any data format.
The toolbox includes tools for displaying video and sequences in either a time-
lapsed video viewer or an image montage. Volume visualization tools in MATLAB let
you create isosurface displays of multidimensional image data sets.
24
4.9 PREPROCESSING AND POSTPROCESSING IMAGES
25
can convert images between device-independent color spaces, such as sRGB, XYZ,
xyY, L*a*b*, uvL, and L*ch.
For more flexibility and control, the toolbox supports profile-based color space
conversions using a color management system based on ICC version 4. For example,
you can import n-dimensional ICC color profiles, create new or modify existing ICC
color profiles for specific input and output devices, specify the rendering intent, and
find all compliant profiles on your machine.
Image transforms such as FFT and DCT play a critical role in many image
processing tasks, including image enhancement, analysis, restoration, and compression.
Image Processing Toolbox provides several image transforms, includingRadon and
fan-beam projections. You can reconstruct images from parallel-beam and fan-beam
projection data (common in tomography applications). Image transforms are also
available in MATLAB and Wavelet Toolbox.
Image conversions between data classes and image types are a common
requirement for imaging applications. Image Processing Toolbox provides a variety of
utilities for conversion between data classes, including single- and double-precision
floating-point and signed or unsigned 8-, 16-, and 32-bit integers. The toolbox includes
algorithms for conversion between image types, including binary, grayscale, indexed
color, and truecolor. Specifically for color images, the toolbox supports a variety of
color spaces (such as YIQ, HSV, and YCrCb) as well as Bayer pattern encoded and
high dynamic range images.
26
Statistical functions let you analyze the general characteristics of an image by:
Image Processing Toolbox also contains advanced image analysis functions that
let you:
Measure the properties of a specified image region, such as the area, center of
27
Measure properties, such as surface roughness or color variation, using texture
analysis functions
Some images are so large that they are difficult to process and display with
standard methods. Image Processing Toolbox provides specific workflows for working
with larger images than otherwise possible. Without loading a large image entirely into
memory, you can create a reduced-resolution data set (R-Set) that divides an image into
spatial tiles and resamples the image at different resolution levels. This workflow
improves performance in image display and navigation. You can use a block processing
workflow to apply a function to each distinct block of a large image, which significantly
reduces memory use. An additional option for working with large images is to use the
Parallel Computing Toolbox.
28
CHAPTER 5
SOFTWARE IMPLEMENTATION
Convenient graphical user interfaces (GUIs) simplify typical control engineering tasks.
Control systems can be modeled as transfer functions, in zero-pole-gain or state-space
form, allowing you to use both classical and modern control techniques. Both
continuous-time and discrete-time systems can be manipulated.Convessions between
various model representations are provided. Time responses, and root loci an be
computed and graphed.other functions allow
29
pole placement, optimal control, and estimation. Finally, Control System Toolbox is
open and extensible. You can create custom M-files to suit your particular application.
The toolbox has everything that is needed to perform mathematical and statistical
analysis of financial data and display the results with presentation-quality graphics.
You can quickly ask, visualize, and answer complicated questions.
31
recording data and event information to a text file Tools that facilitate instrument
control in an easy-to-use graphical environment
Model Predictive Control Toolbox is a collection of software that helps you design,
analyze, and implement an advanced industrial automation algorithm. Like other
MATLAB® tools, it provides a convenient graphical user interface (GUI) as well as a
flexible command syntax that supports customization. A Model Predictive Control
Toolbox controller automates a target system (the plant) by combining a prediction and
a control strategy. An approximate plant model provides the prediction. The control
strategy compares predicted plant signals to a set of objectives, then adjusts available
actuators to achieve the objectives while respecting the plant's constraints. The
controller's constraint-tolerance differentiates it from other optimal control strategies
(e.g., the Linear-Quadratic-Gaussian approach supported in Control System Toolbox).
The impetus for this is industrial experience suggesting that the drive for profitability
often pushes the plant to one or more constraints. The Model Predictive Control
Toolbox controller considers such factors explicitly, allowing it to allocate the available
plant resources intelligently as the system evolves over time.
32
Model Predictive Control Toolbox uses the same powerful linear dynamic modeling
tools found in Control System Toolbox and System Identification Toolbox.
The objectives of Partial Differential Equation Toolbox are to provide you with tools
that Define a PDE problem, e.g., define 2-D regions, boundary conditions, and PDE
coefficients. Numerically solve the PDE problem, e.g., generate unstructured meshes,
33
discretize the equations, and produce an approximation to the solution. Visualize the
results.
Robust Control Toolbox is a collection of functions and tools that help to analyze
and design multi input-multioutput (MIMO) control systems with uncertain elements.
uncertain LTI system models containing uncertain parameters and uncertain dynamics
are given. Analyze tools for MIMO system stability margins and worst case
performance are given.
Robust Control Toolbox includes a selection of control synthesis tools that compute
controllers that optimize worst-case performance and identify worst-case parameter
values. The toolbox simplify and reduce the order of complex models with model
reduction tools that minimize additive and multiplicative error bounds. It provides tools
for implementing advanced robust control methods like H, H2, linear matrix
inequalities (LMI), and µ-synthesis robust control. It can shape MIMO system
frequency responses and design uncertainty tolerant controllers.
The typical use envisioned for this toolbox involves the construction and
subsequent use of a piecewise-polynomial approximation. This construction would
involve data fitting, but there is a wide range of possible data that could be fit. In the
simplest situation, one is given points and is looking for a piecewise-polynomial
function that satisfies , all , more or less. An exact fit would involve interpolation, an
approximate fit might involve least-squares approximation or the smoothing spline. But
the function to be approximated may also be described in more implicit ways, for
example as the solution of a differential or integral equation. In such a case, the data
would be of the form , with A some differential or integral operator. On the other hand,
one might want to construct a spline curve whose exact location is less important than
is its overall shape. Finally, in all of this, one might be looking for functions of more
than one variable, such as tensor product splines.
35
graphical facilities with several other types of mathematical computation such as
Calculus, Linear Algebra, Simplification, Solution of Equations, Special Mathematical
Functions, Variable-Precision Arithmetic, Transforms.
There are two toolboxes: The basic Symbolic Math Toolbox is a collection of more
than 100 MATLAB functions that provide access to the Maple kernel using a syntax
and style that is a natural extension of the MATLAB language. The basic toolbox also
allows to access functions in the Maple linear algebra package. Extended Symbolic
Math Toolbox augments this functionality to include access to all non graphics Maple
packages, Maple programming features, and user-defined procedures. With both
toolboxes, one can write own M-files to access Maple functions and the Maple
workspace.
Everywhere around us are signals that can be analyzed. For example, there are
seismic tremors, human speech, engine vibrations, medical images, financial data,
36
music, and many other types of signals. Wavelet analysis is a new and promising set of
tools and techniques for analyzing these signals.
This is used for RDS (Radio Data System) because it is difficult to decouple.
HARDWARE REQUIREMENTS
• SYSTEM : Pentium IV 2.4 GHz
• HARD DISK : 40 GB
• MONITOR : 15 VGA color
37
• MOUSE : Logitech.
• RAM : 256 MB
• KEYBOARD : 110 keys enhanced.
SOFTWARE REQUIREMENTS
• Operating system : Windows XP Professional
• Tool : MATLAB2012b
38
CHAPTER 6
SPECTRAL ANALYSIS
6.1 Computing the DFT, IDFT and using them for filtering
To begin this discussion on spectral analysis, let us begin by considering the question
of trying to detect an underlying sinusoidal signal component that is buried in noise.
Such problems occur, for example, very commonly in the area of
telecommunications’.Suppose that such a signal-in-noise situation gives rise to the
observed data record as shown in figure 1.
Here the samples are collected at a spacing of = 0.1 second apart, and are contained in
a MATLAB vector x so that since the samples are plotted
>> t = (0:1:length(x)-1)/fs;
>> plot(t,x)
Now the signal shown in figure 1 does not appear, by eye, to have any underlying
sinusoidal signal component at all; instead it appears to be completely random and
hence completely comprised of noise.
For this purpose,MATLAB has the fft function, which performs the computation DFT
computation (1) in an effi cient manner, and hence is called the Fast Fourier Transform
(FFT). Using it is very simple. Hand it a vector x of time domain samples, and it returns
a vector X of samples X
>> X = fft(x);
>> plot(abs(X));
These commands result in the plot shown in figure 2. There are s ome interesting
aspects of this plot. Firstly, and most importantly, there are two clear spectral peaks,
which indicate that there is more to this signal than just noise. The second point of
interests arises by trying to interpret from this plot how many spectral components
exist. Are there two clear ones?
In fact there is only one spectral component, since the frequency range used in the
MATLAB DFT computation is as shown in figure 3.
There itis illustrated th at if the underlying continuous time signal has a spectrum X (ω)
= F {x}, then as discussed in lectures, the DFT XN (ω) will be a repeated version of this
spectrum, with the repetition occurring every ω = 2π/ seconds.
40
6.2 Sampled Signal
4
−1
−2
−3
−4
0 5 10 15 20 25 30 35 40
Time (s)
(ω) in the range ω ∈ [π/ , 2π/Δ) is nothing more than the negative frequency part of X
(ω).
It would actually make more sense to plot XN (ω) in the range ω = [−π/ , π/Δ], and
this would involve taking the `top half' of the vector X computed above, and moving it
to the front of the vector. MATLAB can do this simply by using the fftshift command
as follows
>> N = length(x);
>> ws = 2*pi/N;
>> wnorm = -pi:ws:pi;
>> wnorm = wnorm(1:length(x));
>> w = wnorm*fs;
>> plot(w,abs(fftshift(X)))
>> axis([-30,30,0,160])
41
This results in the diagram shown in figure 4. Actually, this diagram illustrates
something more than just the use of the fft shift command via plot (w,abs(fftshift(X))),
it also illustrates the com-putation of an appropriate x-axis labeling of frequency. In
particular, notice that the `sampling' spacing of the DFT in normalized frequency as
2π
ωs = N
is calculated in the variable ws, and this is used to generate a vector wnorm
which is a frequency axis in the normalised frequency range [−π, π], which in
turn is converted to a `real' frequency range [−π/ , π/Δ] by multiplication with
the sampling frequency fs.
From figure 4 it is now clear that the signal vector x shown in figure 1 actually
contains a clear sinu-soidal component at around 5 rad/s. To find this frequency
accurately, the ginput command may be used as >> [freq,amp]=ginput
42
6.3 DFT computation (Absolute Value)
140
120
100
Magni
80
60
40
20
0
0 50 100 150 200 250 300 350 400
Index m of Normalised
Frequency ω = mωs
Figure 6.2: A plot of the DFT magnitude |XN (mωs)| for the signal x shown in figure 1.
freq =4.9770
amp =159.0643
which creates mouse-controllable cross-hairs on the plot shown in figure 4 that can be
place at the tip of the spectral peak. When the left mouse button is then clicked, and the
return key hit, the x and y axis values if the cross-hair position are reported.
This confirms our estimate of the sine-wave frequency being a t 5 rad/s.
To estimate its amplitude, we need to remember that and N sample data record of and
amplitude A sine/cosine wave, results in a DFT peak of AN/2, and therefore the
estimated underlying sine-wave amplitude is
>> amp*2/N
ans =0.7953
43
|U (ω)|
1
−2πB 2πB ω
ω
−2πB 2πB
2πfs =
ωs
Figure 6.3: The frequency range of the DFT computed by the MATLAB FFT
functionis ω ∈ [0, 2π/Δ)
It could be used to perform filtering on the signal shown in figure1 in order to recover
the sinusoidal component that figure 4 indicates is present in the signal, but is buried in
noise.
>>plot(w,abs(fftshift(X)),’b’,w,160*fil,’-.r’);
the sinusoidal signal component of the spectrum, while eliminating the remainder that
44
is due to noise.
This filtering can be performed by execution
of the commands
>> Xf = fil.*fftshift(X);
>> xf = ifft(fftshift(Xf));
>> plot(t,real(xf))
with the results shown in figure 6. Some important points to dr aw from the above
commands are that firstly, the filtered spectrum vector Xf needs to have the function
fftshift applied to it before being passed to the ifft function since the ifft function
expects the frequency axis of figure 3 to be associat ed with its input; that is it expects
the negative frequency components to be stacked in Xf after the positive frequency
ones.
Secondly, although the result of the xf = ifft(fftshift(Xf)) command should be real since
Xf is symmetric, the limited numerical precision of the computing platform being used
will result in small imaginary components of the order of 10−15 being present, and these
need to be discarded by using the real command.
The results of the filtering are shown in figure 6, where a 5 rad/s tone of average
amplitude around 0.8 is shown.
45
|XN(ω)|
160
140
120
100
80
60
40
20
−
2
−30 0 0 −10 0 10 20 30
Figure 6.4: DFT magnitude |XN (mωs )| plotted over the frequency range
[−π/ , π/Δ].
Now suppose that we have available a new 40 second data record x as shown in figure
7(a). This looks very similar in nature to the original data record shown in fig ure 1,
and indeed the DFT analysis performed by
>> N = length(x);
>> ws = 2*pi/N;
>> wnorm = -pi:ws:pi;
>> wnorm = wnorm(1:length(x));
>> w = wnorm*fs;
46
>> X=fft(x);
>> plot(w,abs(fftshift(X)))
>> axis([-30,30,0,500])
produces a spectral plot shown in figure 8 which indicates (as the plot did in figure 4)
a sine component at 5 rad/s. However, the data record shown in figure 7(b) is of the s
ame signal, except observed for a longer 120 second duration, and the spectral analysis
of this signal gives the spectral plot shown in figure 9 (the command axis([-
10,10,0,500]) has been used to `zoom in' on the spectral peak region) This indicates not
one, but two spectral peaks that are close together at approximately 4.7 and 5 rad/s.
Why are they noticeable in the spectral analysis of the long data-record signal, but not
in the short data-record one?
The answer is to do with windowing. Remember from lectures that the finite data
record DFT XN (ω) is related to the infinite data record sampled spectrum Xp(ω)
according to a convolution
1
XN (ω) = 2π [Up ⊛ W ] (ω)
where W (ω) = F {w} is the Fourier transform of the effective `window function' w(t)
which models the truncation of the infinite record to the finite one by multipli cation.
47
|XN(ω)| together with filtering profile
140
←Filtering
profile
120
100
80
Ma
60
40
20
Frequency
(rad/s)
0 −1
−30 −20 0 0 10 20 30
48
which is greater than the sinusoid separation of 0.3 rad/s, and hence the `smearing'
interaction of the side-lobes blends the two peaks into one. However, for the longer
data record of T = 120 seconds
2π
120∗ 4 ≈ 0.21rad/s
which is less than the sine-wave frequency separation, and hence the `smearing' action
does not blend the peaks and we can resolve them in figure 8
The frequency resolution can be enhanced by use of a window function other than
a rectangular one and which has a Fourier Transform with faster decaying side-lobes
that the sinc-type function. MATLAB im-plements more sophisticated sorts of
windows via the functions triang (triangular window), hamming, hanning and others.
T
For example to generate a hamming window of length N samples, the command
49
Filtered signal
1.5
1
0.5
Magn
−0.5
−1
−1.5
0 5 10 15 20 25 30 35 40
Time (s)
Figure 6.6: Filtered version of signal shown in figure 1 with the filtering achieved
byuse of a DFT/IDFTconcatenation.
which produces a vector win which when plotted via plot(win) results in the diagram
shown in fig-ure 10. This can then be used to weight or window the data as
50
to produce the diagram shown in figure 11. Notice that with the use of this appropriate
choice of Hamming window, the spectral resolution enhanced to the point where the
two sine-wave components at 4.7 and 5 rad/s can be resolved.
4
3
2
1
0
Ma
−1
−2
−3
−4
0 5 10 15 20 25 30 35 40
Figure-6.6
Sampled Signal
51
5
4
3
2
1
0
−1
−2
−3
−4 20 40 60 80 100 120
0
52
|XN(ω)|
500
450
400
350
300
250
Mag
200
150
100
50
0
−30 −20 −10 0 10 20 30
Frequency (rad/s)
53
|XN(ω)|
500
450
400
350
300
250
Ma
200
150
100
50
0 −
−10 −8 −6 −4 2 0 2 4 6 8 10
Frequency (rad/s)
54
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 50 100 150 200 250 300 350
Figure-6.9.1
55
|XN(ω)|
80
70
60
50
40
Mag
30
20
10
0 −
−10 −8 −6 −4 2 0 2 4 6 8 10
Frequency
(radius)
Figure-6.9.2
56
CHAPTER 7
RESULTS
1. Checking the signal to make sure that there is no distortion or flaws in the signal.
2. The below figure depicts that signal has the lowest Bit Error Rate(BER),after
being preprocessed.
3. It is the process of sampling signals that measure real world physical conditions
.and converting the resulting samples into a digital numeric values that can be
manipulated by a computer.
FIGURE-7.1
SIGNAL ACQIUSITION
57
1. The figure represents the channel information which is used to transmitthe signal.
2. The software checks availability of bandwidth before transmitting thesignal.
3. If the followed Bandwidth is good the signal will be preprocessed andthen sent
it to receiver.
FIGURE-7.2
CHANNEL ESTIMATION
58
1. The below figure represents selection of a signal which has less distortions or
any noises .
2. This process is called Frequency Hopping spread sprectrum .
3. In this process software selects best signal among many other signals .
FIGURE-7.3
SPECTRUM ANALYSIS
59
1. This figure represents frequency of a signal and also it shows time
taken by a signal to transmit and receive .
2. The signal which has high frequency will carry the data has shown in
figure.
FIGURE-7.4
FREQUENCY SETUP
60
1. This figure represents signal which is chosen by all above methods and its been transmitted to
the receiver without no distortions or any disturbances.
FIGURE-7.5
COMMUNICATIONS
61
1. It represents performance analysis of all signals which is taken into
consideration.
2. The signal which decreases has low signal error rate and which travels
upwards has high signal error rate.
3. In this graph the blue color curve represents signal which has lowest signal
error rate.
Fig-6
SIGNAL ERROR RATE
62
CHAPTER 8
CONCLUSION
Cognitive users monitor the spectrum and are allowed to use it as long as it is does not interfere with
primary users to whom is has been licensed. SDR will have a key role to play in the cognitive System.
The SDR algorithms for successful data transmission in bandwidth available are proposed here.
CODEC adaptations, OQPSK to replace QPSK, the implementation of FHSS modulation &
demodulation in MATLAB, to be utilized to maintain the BER at high data rates and the perceptual
coding techniques for lossless data compression are presented. The degree of compression and
modification in already existing algorithms is again another critical issue to handle by SDR. Future
work focuses on experimentation of same spectrum sensing techniques for improving the performance
in cognitive radio and also finding out the one which is more suitable to work in wireless
environment. Further this can be extended for simultaneous transmission of multiple signals and use
of multiple frequency bands. Also this work will be quite helpful for implementation of real time
projects such as traffic control which can use this spectrum sensing method for wireless transmission
and detection of traffic video signals data from multiple signal posts to one master check post. This
can be further transferred to control unit which will use this information for controlling the traffic. So
decisive aim of this system is design and implementation of CR based traffic control system
63
REFERENCE
1. Federal Communications Commission, “Spectrum policy task force,” Report ET Docket no
02-135, 2002.View at: Google Scholar
2. S.-S. Byun, K. Kansanen, I. Balasingham, and J.-M. Gil, “Achieving fair spectrum
allocation and reduced spectrum handoff in wireless sensor networks: modeling via
biobjective optimization,” Modelling and Simulation in Engineering, vol. 2014, Article ID
406462, 12 pages, 2014.View at: PublisherSite | Google Scholar
3. J. Mitola and G. Q. Maguire, “Cognitive radio: making software radios more personal,”
IEEE Personal Communications, vol. 6, no. 4, pp. 13–18, 1999.View at: Publisher Site |
Google Scholar 4. B. Wang and K. J. R. Liu, “Advances in cognitive radio networks: a
survey,” IEEE Journal of Selected Topics in Signal Processing, vol. 5, no. 1, pp. 5–23,
2011.View at: Publisher Site | Google Scholar
5. Z. Tong, M. S. Arifianto, and C. F. Liau, “Wireless transmission using universal software
radio peripheral,” in Proceedings of the International Conference on Space Science and
Communication (IconSpace '09), pp. 19–23, Negeri Sembilan, Malaysia, October 2009.View
at: Publisher Site | Google Scholar
6. I. F. Akyildiz, W.-Y. Lee, M. C. Vuran, and S. Mohanty, “NeXt generation/dynamic
spectrum access/cognitive radio wireless networks: a survey,” Computer Networks, vol. 50,
no. 13, pp. 2127–2159, 2006.View at: Publisher Site | Google Scholar
7. H. Urkowitz, “Energy detection of unknown deterministic signals,” Proceedings of the
IEEE, vol. 55, no. 4, pp. 523–531, 1967.View at: Publisher Site | Google Scholar
8. T. Ulversoy, “Software defined radio: Challenges and opportunities,” IEEE
Communications Surveys & Tutorials, vol. 12, no. 4, pp. 531–550, 2010.View at: Publisher
Site | Google Scholar
9. R. Farrell, M. Sanchez, and G. Corley, “Software-defined radio demonstrators: an
example and future trends,” International Journal of Digital Multimedia Broadcasting, vol.
2009, Article ID 547650, 12 pages, 2009.View at: Publisher Site | Google Scholar84
10. E. Blossom,“GNU radio:tools for exploring the radio frequency spectrum,”
for real time video transmission
11. GNU Radio, 2017, http://gnuradio.org/.
12. SDR Kit, 2017, http://sdr-lab.com/.
13. S. Haykin, Communication Systems, John Wiley & Sons, New York, NY, USA, 4th edition,
2001.
14. R. Tandra and A. Sahai,“SNR walls for signal detection,” IEEE Journal of Selected Topics in
Signal Processing, vol. 2, no. 1, pp. 4–17, 2008.
64