Beruflich Dokumente
Kultur Dokumente
COGNITIVE RADIO
USING MATLAB
INDEX
ABSTRACT…….………………………………………………………………....................................5
Chapter 3- IMPLEMENTATION
3.1 Algorithm…………………………………….…….…….…….…….…….…….…….…….…15
3.2 Related Theory…………….………………………….…….…….…….…….…….….…….16
3.2.1 About MATLAB & Simulink
3.2.2 DSB-SC AM Modulation
3.2.3 Power Spectral Density
1
Chapter 4- SIMULATION
REFERENCES…..…………………………………………………………………………………….……35
2
ABSTRACT
3
Chapter 1
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.
4
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
The air interface and link-layer protocols differ across various geographies
(for e.g. European wireless networks are predominantly GSM/TDMA based 5
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.
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.
6
1.4 Features of SDR technology
7
Chapter 2
Additionally, it could use the frequencies and choose waveforms that minimize and
avoid interference with existing radio communication systems. It might be like
having a friend in everything that’s important to your daily life.
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.
a) Activity,
b) Channel conditions,
c) Codebooks,
d) Messages of other nodes with which it shares the spectrum.
9
Fig 1. The 7 layers of OSI Model
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
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 cordless phones. Unfortunately, the unlicensed
bands can be killed by their own success, since the more devices that occupy these
10 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.
Underlay typically coexists with licensed users. Licensed users paid for their 11
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 users’ codebooks and its messages as well. A noncognitive user
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
12
Chapter 3
IMPLEMENTATION
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
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.
13
3.2 Related Theory
3.2.1.1 MATLAB
You can use MATLAB in a wide range of applications, including signal and image
processing, communications, control design, test and measurement, financial
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
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
High-level language for technical computing
Development environment for managing code, files, and data
Interactive tools for iterative exploration, design, and problem solving
Mathematical functions for linear algebra, statistics, Fourier analysis, filtering,
optimization, and numerical integration
2-D and 3-D graphics functions for visualizing data
Tools for building custom graphical user interfaces
Functions for integrating MATLAB based algorithms with external applications and
languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel
14
3.2.1.2 SIMULINK
Simulink® is an environment for multidomain simulation and Model-Based Design for
dynamic and embedded systems. It provides an interactive graphical environment
and a customizable set of block libraries that let you design, simulate, implement,
and test a variety of time-varying systems, including communications, controls,
signal processing, video processing, and image processing.
Key Features
Extensive and expandable libraries of predefined blocks
15
3.2.2 DSB-SC AM Modulation
Double-sideband suppressed-carrier transmission (DSB-SC):
Transmission in which frequencies produced by amplitude modulation are
symmetrically spaced above and below the carrier frequency and the carrier level is
reduced to the lowest practical level, ideally completely suppressed.
In the double-sideband suppressed-carrier transmission (DSB-SC) modulation, unlike
AM, the wave carrier is not transmitted; thus, a great percentage of power that is
dedicated to it is distributed between the sideband, which implies an increase of the
cover in DSB-SC, compared to AM, for the same power used.
This is used for RDS (Radio Data System) because it is difficult to decouple.
The power spectral density (PSD) is a positive real function of a frequency variable
associated with a stationary stochastic process, or a deterministic function of time,
which has dimensions of power per hertz (Hz), or energy per hertz. It is often called
simply the spectrum of the signal. Intuitively, the spectral density measures the
frequency content of a stochastic process and helps identify periodicities.
16
Chapter 4
SIMULATION
17
4.1.1 Block Details
Spectrum Scope
The Spectrum Scope block computes and displays the periodogram of the input. The
input can be a sample-based or frame-based vector or a frame-based matrix.
Multiplexer
The Mux block combines its inputs into a single vector output. An input can be a
scalar or vector signal. All inputs should be of the same data type and numeric type.
The elements of the vector output signal take their order from the top to bottom, or
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
The Sine Wave block provides a sinusoid. The block can operate in either time-based
or sample-based mode. In Time-Based Mode the output of the Sine Wave block is
determined by
Y=Amplitude*sin(frequency*time+phase)+bias
Time-based mode has two sub modes: continuous mode or discrete mode.
The value of the Sample time parameter determines whether the block operates in
continuous mode or discrete mode:
The Bernoulli Binary Generator block generates random binary numbers using a
Bernoulli distribution. The Bernoulli distribution with parameter p produces zero
with probability p and one with probability 1-p. The Bernoulli distribution has mean
18 value 1-p and variance p(1-p). The Probability of a zero parameter specifies p, and
can be any real number between zero and one.
Scope
The Scope block displays its input with respect to simulation time. The Scope block
can have multiple axes (one per port); all axes have a common time range with
independent y-axes. The Scope allows you to adjust the amount of time and the
range of input values displayed. You can move and resize the Scope window and you
can modify the Scope's parameter values during the simulation. When you start a
simulation, Simulink does not open Scope windows, although it does write data to
connected Scopes. As a result, if you open a Scope after a simulation, the Scope's
input signal or signals will be displayed. If the signal is continuous, the Scope
produces a point-to-point plot. If the signal is discrete, the Scope produces a stair-
step plot.
19
4.1.2 Block Properties
ToWorkspace 1 To Workspace
Mux 1 Mux
20
Name P Seed Ts Frame Samp Orient Out
Based Per Data
Frame Type
Mux 5 bar
Name Sin Time Source Ampl Bias Frequency Phase Sampl Offset Sampl
Type es e Time
22
Scope Domain Use Buffer FFT Num Wintype Rs Beta Winsamp
Properties Buffer Size length Avg Spec Spec Spec Spec
Scope Scope Scope Scope
23
4.2 MATLAB Code
Fs=12000;
x1=in(:,1);
x2=in(:,2);
x3=in(:,3);
x4=in(:,4);
x5=in(:,5);
y=x1+x2+x3+x4+x5;
Pxx = periodogram(y);
Hpsd = dspdata.psd(Pxx,'Fs',Fs);
plot(Hpsd)
figure
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
plot(Pxx);
xlabel('Frequency (KHz)')
ylabel('Power/Frequency (dB/KHz)')
title('Power Spectral Density via Periodogram')
check1 = Pxx(53);
check2 = Pxx(105);
check6 = Pxx(150);
check3 = Pxx(187);
check4 = Pxx(223);
check5 = Pxx(239);
else
disp('All user slots in use. Try again later,');
tp=1;
end
figure
figure
plot(Pxx);
xlabel('Frequency (KHz)')
ylabel('Power/Frequency (dB/KHz)')
title('Power Spectral Density via Periodogram')
25
4.3 Results And Graphs
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
26
Plot 2. Primary User 2
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
Plot 3. Primary User 3
27
28
29
30
Plot 10. Power Spectral Density With Secondary User
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
Plot 11. Power Spectral Density With Secondary User via Periodogram
We’ve simulated the basics of a cognitive radio systems enabling dynamic spectrum
access at run time. Our approach was to take the decisions on the basis of power
spectral density of the channel which can be used cognitively to find out the
available gaps those can be assigned to new incoming users thus improving the
overall channel’s throughput. The project is still incomplete and needs a lot of
modifications which will be decided with the instructors. Overall the whole project
was a success though it took quite a lot of time and research in finding out some
generic algorithm for simulating the cognitive radio systems, but in the end we’d to
come around with our own idea and implementing it in Simulink and MATLAB. The
results are quite accurate and we’re still working on improving the code for more
presentable results.
31
Chapter 5
Cognitive radio technology is a smarter, faster, and more efficient way to transmit
information to and from fixed, mobile, other wireless communication devices.
Cognitive radio builds upon software-defined radio technology. A cognitive radio
system is 'aware' of its operating environment and automatically adjusts itself to
maintain desired communications it’s like having a trained operator inside the radio
making constant adjustments for maximum performance. Operating frequency,
SOFTWARE DEFINED COGNITIVE RADIO USING MATLAB
While CR devices are built with components that have been well-established in the
telecommunications and computer science disciplines, the existing approaches to
provide robustness and effective security for a network of CR devices are
inadequate. Due to the particular characteristics of the CR systems, new types of
attack are possible and some of the well-known types increase in complexity.
Therefore, new ideas are needed to make CR networks secure and robust against
specific attacks, especially against those that are inherent to the CR functionality.
There is, therefore, the need for comprehensive and energy efficient mechanisms to
32 discourage, identify and mitigate the attacks at all phases of the cognitive cycle, in
order to obtain CR systems that are trustworthy, efficient and dependable.
REFERENCES
[4] A.Venkata Reddy, E.Rama Krishna and , P.Mahipal Reddy, “Sensor Networks
for Cognitive Radio: Theory and System Design” | Volume: 3 , 2011 , pp 229 –
233
[5] Na Yi, YiMa, and Rahim Tafazolli, “Underlay Cognitive Radio with Full or
Partial Channel Quality Information” C.C.S.R., University of Surrey, Guildford GU2
7XH, UK, Research Article | June 2010
33