0% found this document useful (0 votes)
35 views29 pages

WC Record To Students

anna university wireless communication lab record.

Uploaded by

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

WC Record To Students

anna university wireless communication lab record.

Uploaded by

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

EX.

NO :1 MODELLING OF WIRELESS COMMUNICATION SYSTEM

MODEL USING OKUMURA-HATA MODEL

AIM:To model the wireless communication system model using


Okumura-hata model.
APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform.
THEORY:

The Okumura model is a radio propagation model that was built using
the data collected in the city of Tokyo, Japan. The model is ideal for
using in cities with many urban structures but not many tall blocking
structures. The model served as a base for the Hata model.
Okumura model was built into three modes. The ones for urban,
suburban and open areas. The model for urban areas was built first and
used as the base for others.
The Hata model is a radio propagation model for predicting the path
loss of cellular transmissions in exterior environments, valid
for microwave frequencies from 150 to 1500 MHz. It is an empirical
formulation based on the data from the Okumura model, and is thus also
commonly referred to as the Okumura–Hata model. The model
incorporates the graphical information from Okumura model and
develops it further to realize the effects of diffraction, reflection and
scattering caused by city structures. Additionally, the Hata Model
applies corrections for applications in suburban and rural environments.

PROGRAM

clc ;
clear all;
d =[1 2 3 4 5]; // i n km
hb =30; // H eig h t of BS a n t e n na i n m e t r e s
hm =2; // h e i g h t of m o bil e a n t e n na i n me t r e s
fc =900; // c a r r i e r f r e q u e n c y i n MHz
W =15; // s t r e e t wid th (m)
b =30; // d i s t a n c e be tween b u i l d i n g al o n g r a d i o pa th (m)
phi =90; // i n c i d e n t a n g l e r e l a t i v e to t h e s t r e e t
hr =30; // i n m
// s o l u t i o n
dellhm = hr - hm ;
//L50=Lf+L r t s+Lms
// By COST 231 model
Lf =32.4+20* log10 ( d ) +20* log10 ( fc ) ;
L0 =4 -0.114*( phi -55) ;
Lrts = -16.9 -10* log10 ( W ) +10* log10 ( fc ) +20* log10 ( dellhm ) + L0 ;
Lbsh = -18* log10 (11) ;
ka =54 -0.8* hb ;
dellhb = hb - hr ;
kd =18 -15* dellhb / dellhm ;
kf =4+0.7*( fc /925 -1) ; 25
Lms = Lbsh + ka + kd * log10 ( d ) + kf * log10 ( fc ) -9* log10 ( b ) ;
L50 =[0 0 0 0 0];
L50 = Lf + Lrts + Lms ;
//Okumura/Hata model
ahm =(1.1* log10 ( fc ) -0.7) * hm -(1.56* log10 ( fc ) -0.8) ;
L_50 =69.55+26.16* log10 ( fc ) +(44.9 -6.55* log10 ( hb ) ) * log10 ( d ) -13.82*
log10 ( hb ) - ahm ;
xlabel (”DISTANCE FROM TRANSMITTER IN KM”) ;
ylabel (”PATH LOSS i n dB”) ;
plot2d (d ,[ L50 ’ , L_50 ’] ,[1 ,2]) ;
legends ([ ’ Co s t 231 Model ’ ; ’ Okumura/ Hata Model ’ ] ,[1 ,2 ] , opt =2)
xgrid () ;
disp (” L50 v a l u e s by Co s t 231 model ”) ;
printf ( ’%. 2 f %. 2 f %. 2 f %. 2 f %. 2 f \n ’ , L50 (1) , L50 (2) , L50 (3) , L50 (4)
, L50 (5) ) ;
disp (” L50 v a l u e s bu Okumura/ Hata model ”) ;
printf ( ’%. 2 f %. 2 f %. 2 f %. 2 f %. 2 f \n ’ , L_50 (1) , L_50 (2) , L_50 (3) ,
L_50 (4) , L_50 (5) ) ;
disp (”The r e s u l t s f rom t h e p l o t of two mo d el s shows t h a t t h e c a l c u l
a t e d pa th l o s s wi t h t h e COST 231 model i s h i g h e r than t h e v a l u e o b
t a i n e d by t h e Okumura/ Hata model . ”) ;
OUTPUT:

RESULT: Thus the program was successfully executed and the output was
verified
EX.NO:2 SIMULATION OF MULTIPATH FADING CHANNELS

AIM:To Simulate the Multipath Fading Channel.


APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform
THEORY:

In a multipath fading environment, the relative motion between the


transmitter and receiver may also cause broadening of the power
spectrum. Additionally, the wireless channel, or the over-the-air link
between a transmitter and a receiver, is subject to interference from
other users in the system.
Multipath fading affects most forms of radio communications links in
one form or another.Multipath fading can affect signals on frequencies
from the LF portion of the spectrum and below right up into the
microwave portion of the spectrum.
Multipath fading occurs in any environment where there is multipath
propagation and the paths change for some reason. This will change not
only their relative strengths but also their phases, as the path lengths will
change.
Program:
clc;

clear;

xdel(winsid());

sym=10000;//No . of s ym bol s

data1 = grand(1,sym,"uin",0,1);

bpsk_mod=2*data1-1;//BPSK Mo d ula tio n

snr=1:20;//s i g n a l to N oi s e R a tio

for k =1:1:length(snr)

H1=1/sqrt(2)*(rand(1,length(bpsk_mod),'normal')+
%i*(rand(1,length(bpsk_mod),'normal')));

// R a yl ei g h f a d i n g g e n e r a t i o n

noise=1/sqrt(2)*(10^(-(k/20)))*(rand(1,length(bpsk_mod),'normal')+
%i*(rand(1,length(bpsk_mod),'normal')));// WhiteGa u s sia n N oi s e g e n e r a t i
on

rec1_bpsk =bpsk_mod + noise;//BPSK modulated sig n a l o v e r AWGN c h a n n


el

rec1_bpsk_ray1=H1.*bpsk_mod + noise ; //BPSK modula ted s i g n a l o v e r


AWGNch a n n el and R a yl ei g h Fadingch a n n el

rec1_bpsk_ray =conj( H1 ).* rec1_bpsk_ray1; // m u l t i p l i c a t i o n wi t h c o nj


u g a t e ofr a y l e i g h f a d i n g to n u l l i f y p ha s eading

rec_data_bpsk =[]; rec_ray_bpsk =[];

for i =1:1: length ( data1 ) //BPSK Demodula tion of r e c e i v e d s i g n a l o v e r


AWGN c h a n n el
if real(rec1_bpsk(i))>=0

demod_out_bpsk =1;

else real(rec1_bpsk(i))<0

demod_out_bpsk =0;

end

rec_data_bpsk =[ rec_data_bpsk demod_out_bpsk ]; // R e c ei v e d s i g n a l

if real ( rec1_bpsk_ray ( i ) ) >=0 //BPSK Demodula tion of r e c e i v e d s i g n a l


o v e r AWGN c h a n n el and R a yl ei g h c h a n n el

demod_ray_bpsk =1;

else real ( rec1_bpsk_ray (i ) ) <0

demod_ray_bpsk =0;

end

rec_ray_bpsk =[ rec_ray_bpsk demod_ray_bpsk ]; // // R e c ei v e d s i g n a l

end

errB =0; errC =0;

for i =1: sym

if rec_data_bpsk ( i ) == data1 ( i ) // E r r o r r a t e c a l c u l a t i o n of r e c e i v e
d s i g n a l by c o n s i d e r i n g o nl y AWGN Channel

errB = errB ;

else

errB = errB +1;

end

BER_bpsk ( k ) = errB / sym ; //BER a t r e c e i v e r by c o n s i d e r i n g o nl y


AWGN Channel
if rec_ray_bpsk ( i ) == data1 ( i ) // E r r o r r a t e c a l c u l a t i o n of r e c e i v e
d s i g n a l by c o n s i d e r i n g AWGN Channel and R a yl ei g h c h a n n el

errC = errC ;

else

errC = errC +1;

end

BER_bpsk_ray ( k ) = errC / sym ; //BER a t r e c e i v e rby c o n s i d e r i n g


AWGN Channel and r a y l e i g hc h a n n el

end

end

snr =1:1:20;

plot2d ( snr, BER_bpsk, 5, logflag = "nl");

plot2d ( snr, BER_bpsk_ray, 3, logflag = "nl");

mtlb_axis ([0 20 10^-5 0.5]);

xgrid(10);

xtitle('Bi t E r r o r Rate p l o t f o r BPSK modula ted s i g n a l o v e r AWGN c h


a n n el and AWGN and R a yl ei g h c h a n n el bo th ', 'SNR' , 'BER ' ) ;

legend([ 'BER BPSK AWGN ’ ; ’BER BPSK AWGN & R a yl ei g h ' ]);
OUTPUT DIAGRAM:
RESULT: Thus the program was successfully executed and the output was
verified
Ex.No:3 Direct sequence spread spectrum.
Aim: To generate the waveform in Direct Sequence BPSK spread spectrum.
APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform
THEORY:

Direct-sequence spread spectrum (DSSS) is a spread-


spectrum modulation technique primarily used to reduce overall
signal interference. The direct-sequence modulation makes the
transmitted signal wider in bandwidth than the information bandwidth.
After the despreading or removal of the direct-sequence modulation in
the receiver, the information bandwidth is restored, while the
unintentional and intentional interference is substantially reduced.
With DSSS, the message symbols are modulated by a sequence of
complex values known as spreading sequence. Each element of the
spreading sequence, a so-called chip, has a shorter duration than the
original message symbols. The modulation of the message symbols
scrambles and spreads the signal in the spectrum, and thereby results in a
bandwidth of the spreading sequence. The smaller the chip duration, the
larger the bandwidth of the resulting DSSS signal; more bandwidth
multiplexed to the message signal results in better resistance against
narrowband interference.
Some practical and effective uses of DSSS include the code-division
multiple access (CDMA) method, the IEEE 802.11b specification used
in Wi-Fi networks, and the Global Positioning System.

PROGRAM:

clear all;
clc ;
close ;
//function [ st , mt ]= DS_Spread_Spectrum ( bt , ct_polar )

// G e n e r a ti o n of wavefo rm s i n DS/BPSK s p r e a d s p e c t r um
//t r a n s m i t t e r
// b t : I n p u t Data S e q u e n c e ( b i p o l a r fo rma t )
// c t p o l a r : S p r e a di n g co d e ( b i p o l a r fo rma t )

// b t = [ 1 ∗ o n e s ( 1 ,N) −1∗ o n e s ( 1 ,N) ] ;


Ft = 0:0.01:1;

bt = [1 ,1 ,1 ,1 ,1 ,1 ,1 , -1 , -1 , -1 , -1 , -1 , -1 , -1]
ct_polar = [ -1 , -1 ,1 ,1 ,1 , -1 ,1 , -1 , -1 ,1 ,1 ,1 , -1 ,1]
t = 0: length ( bt ) -1;
// c t p o l a r = [ −1 , −1 ,1 ,1 ,1 , −1 ,1 , −1 , −1 ,1 ,1 ,1 , −1 ,1];
mt = bt .* ct_polar ;
Carrier = 2* sin( Ft *2* %pi ) ;
st = [];
for i = 1: length ( mt )
st = [ st mt ( i) * Carrier ];
end

figure
subplot (3 ,1 ,1)
a = gca () ;
a.x_location = ” o r i g i n ”;
a.y_location = ” o r i g i n ”;
a.data_bounds = [0 ,-2;20 ,2];
plot2d2 (t ,bt ,5)
xlabel ( ’t ’ )
ylabel ( ’b ( t ) ’ )
title ( ’ Data ’ )
subplot (3 ,1 ,2)
a = gca () ;
a . x_location = ” o r i g i n ”;
a . y_location = ” o r i g i n ”;
a . data_bounds = [0 , -2;20 ,2];
plot2d2 (t , ct_polar ,5)
xlabel ( ’t ’ )
ylabel ( ’c ( t ) ’ )
title ( ’ S p r e a di n g co d e ’ )
subplot (3 ,1 ,3)
a = gca () ;
a . x_location = ” o r i g i n ”;
a . y_location = ” o r i g i n ”;
a . data_bounds = [0 , -2;20 ,2];
plot2d2 (t ,mt ,5)
xlabel ( ’t ’ )
ylabel ( ’m( t ) ’ )
title ( ’ P ro d u c t S i g n a l ’ )

figure
subplot (3 ,1 ,1)
a = gca () ;
a . x_location = ” o r i g i n ”;
a . y_location = ” o r i g i n ”;
a . data_bounds = [0 , -2;20 ,2];
plot2d2 (t ,mt ,5)
xlabel ( ’t ’ )
ylabel ( ’m( t ) ’ )
title ( ’ P ro d u c t S i g n a l ’ )
subplot (3 ,1 ,2)
a = gca () ;
a . x_location = ” o r i g i n ”;
a . y_location = ” o r i g i n ”;
a . data_bounds = [0 , -2;20 ,2];
plot ( Carrier )

xlabel ( ’t ’ )
ylabel ( ’c ( t ) ’ )
title ( ’ C a r r i e r S i g n a l ’ )
subplot (3 ,1 ,3)
a = gca () ;
a . x_location = ” o r i g i n ”;
a . y_location = ” o r i g i n ”;
a . data_bounds = [0 , -2;20 ,2];
plot ( st )
xlabel ( ’t ’ )
ylabel ( ’s ( t ) ’ )
title ( ’DS/BPSK s i g n a l ’ )
endfunction

bt = [1 ,1 ,1 ,1 ,1 ,1 ,1 , -1 , -1 , -1 , -1 , -1 , -1 , -1]
ct_polar = [ -1 , -1 ,1 ,1 ,1 , -1 ,1 , -1 , -1 ,1 ,1 ,1 , -1 ,1]
[ st , mt ]= DS_Spread_Spectrum ( bt , ct_polar )
RESULT: Thus the program was successfully executed and the output was
verified
EX.NO:4 TO FIND MULTIPLE ACCESS SPECTRAL EFFICIENCY FOR
TDMA

AIM:To calculate the s p e c t r a l e f f i c i e n c y of TDMA


APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform

THEORY:

TIME DIVISION MULTIPLE ACCESS:

Time-division multiple access (TDMA) is a channel access


method for shared-medium networks. It allows several users to share the
same frequency channel by dividing the signal into different time slots.
The users transmit in rapid succession, one after the other, each using its
own time slot. This allows multiple stations to share the same
transmission medium (e.g. radio frequency channel) while using only a
part of its channel capacity. Dynamic TDMA is a TDMA variant that
dynamically reserves a variable number of time slots in each frame to
variable bit-rate data streams, based on the traffic demand of each data
stream.
PROGRAM:

To find multiple access spectral efficiency of the TDMA system


clc ;
clear all;
Tf =40; //Frame d u r a t i o n i n msec
Mt =6; // Frames p e r s l o t
Bu =30; // bandwid th (KHz) of an i n d i v i d u a l u s e r d u ri n g h i s o r h e r
tim e s l o t
Nu =395; // number of u s e r s s h a r i n g t h e same tim e s l o t i n t h e sy s
tem , bu t ha vi ng a c c e s s to d i f f e r e n t f r e q u e n c y sub−bands
Bw =12.5; // i n MHz
DR =16.2; // Data r a t e i n kbps
FDur =40; // Frame d u r a t i o n i n msec
slots =6; //No of s l o t s p e r tim e f ram e
IndiRate =16.2; // I n d i v i d u a l da ta r a t e i n kbps
Srate =13; // S p e e c h r a t e i n kbps
TimeSlot =( Srate / IndiRate ) *( FDur / slots ) ;
Seff = TimeSlot * slots * Bu * Nu /( FDur * Bw *1000) ;
printf ( ’ M u l t i p l e a c c e s s s p e c t r a l e f f i c i e n c y of TDMA i s %. 2 f \
n ’ , Seff ) ;
printf ( ’ The o v e r h e a d p o r t i o n of t h e f ram e i s %d p e r c e n t \n
’ ,round ((1 - Seff ) *100) ) ;
OUTPUT:

RESULT: Thus the program was successfully executed and the output was
verified
Ex.no: 5 EQUALIZER

AIM: To Simulate the Wireless Channel Equalization.


APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform
THEORY:

Equalization is the reversal of distortion incurred by a signal transmitted


through a channel. Equalizers are used to render the frequency response
—for instance of a telephone line—flat from end-to-end. When
a channel has been equalized the frequency domain attributes of the
signal at the input are faithfully reproduced at the output.
Telephones, DSL lines and television cables use equalizers to prepare
data signals for transmission.
Equalizers are critical to the successful operation of electronic systems
such as analog broadcast television. In this application the
actual waveform of the transmitted signal must be preserved, not just its
frequency content. Equalizing filters must cancel out any group delay
and phase delay between different frequency components.
PROGRAM:

fs=1e6;
f1=50e3;
fsymb=20e3;
wf=wf_init('qpsk');
b=prbs(10);
mod=mod_init(wf,fs,f1,fsymb);
[mod,x]=mod_process(mod,b);
clf();
subplot(311);
plot(x);
xlabel("frequency");
ylabel("amplitude");
title("transmitter.input.without.noise");
y=awgn(x,.2);
subplot(312);
plot(y);
xlabel("frequency");
ylabel("amplitude");
title("equalised.output");
OUTPUT:

Result: Thus the Wireless Channel Equalization was simulated and the output was
verified.
EX.NO:6 TO FIND MULTIPLE ACCESS SPECTRAL EFFICIENCY FOR
FDMA

AIM:To calculate the s p e c t r a l e f f i c i e n c y of FDMA


APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform

THEORY:

FREQUENCY DIVISION MULTIPLE ACCESS:


Frequency-division multiple access (FDMA) is a channel access
method used in some multiple-access protocols. FDMA allows multiple
users to send data through a single communication channel, such as
a coaxial cable or microwave beam, by dividing the bandwidth of the
channel into separate non-overlapping frequency sub-channels and
allocating each sub-channel to a separate user. Users can send data
through a subchannel by modulating it on a carrier wave at the
subchannel's frequency. It is used in satellite communication systems
and telephone trunklines.
FDMA splits the total bandwidth into multiple channels. Each ground
station on the earth is allocated a particular frequency group (or a range
of frequencies). Within each group, the ground station can allocate
different frequencies to individual channels, which are used by different
stations connected to that ground station. Before the transmission begins,
the transmitting ground station looks for an empty channel within the
frequency range that is allocated to it and once it finds an empty
channel, it allocates it to the particular transmitting station.

PROGRAM:

a)// To calculate spectral efficiency of FDMA.


clc ;
clear all;
TCH =395; // T r a f f i c C ha n n el s
SysBW =12.5; // i n MHz
CHspace =30; // i n kHz
// s o l u t i o n
Eff = TCH * CHspace /( SysBW *1000) ;
printf ( ’ M u l t i p l e a c c e s s s p e c t r a l e f f i c i e n c y of
OUTPUT:

RESULT: Thus the program was successfully executed and the output was
verified
EX.NO:7 TO FIND MULTIPLE ACCESS SPECTRAL EFFICIENCY FOR
CDMA

AIM:To calculate the s p e c t r a l e f f i c i e n c y of CDMA


APPARATUS REQUIRED:

Personal computer, SCILAB 6.1.1


PROCEDURE:

1. Click start, select All programs, select SCILAB 6.1.1


2. Click file, select new Console
3. Type the program
4. Save it with extension.sci
5. Click RUN to obtain the output waveform

THEORY:

CODE DIVISION MULTIPLE ACCESS:


Code-division multiple access (CDMA) is a channel access method used
by various radio communication technologies. CDMA is an example
of multiple access, where several transmitters can send information
simultaneously over a single communication channel. This allows
several users to share a band of frequencies (see bandwidth). To permit
this without undue interference between the users, CDMA
employs spread spectrum technology and a special coding scheme .
CDMA optimizes the use of available bandwidth as it transmits over the
entire frequency range and does not limit the user's frequency range.
PROGRAM:

To find multiple access spectral efficiency of the DS CDMA system


clc ;
clear all;
nb =0.9; // bandwid th e f ciency
nf =0.45; // f r e q u e n c y r e u s e e f ciency
Cd =0.8; // c a p a c i t y d e g r a d a t i o n f a c t o r
Vf =0.4; // v o i c e a c t i v i t y f a c t o r
Eb_I0 =7; // d e s i r e d e n e rg y−to−i n t e r f e r e n c e r a t i o i n dB
L =1; // e f ciency of s e c t o r −a n t e n na i n c e l l
BW =12.5; //One way s y s t em BW i n MHz
R =16.2; // I nf o r m a t i o n r a t e i n kbps
// s o l u t i o n
Eb_I =10^( Eb_I0 *0.1) ; //To c o n v e r t f rom dB to a no rmal v a l u e
Nu =( nf * nb * Cd * L/ Vf ) *( BW *1000/( Eb_I * R) ) ; // C a p a ci t y of s y s t
em
Seff = round ( Nu ) * R /(12.5*10^3) ;
printf ( ’ C a p a ci t y of s y s t em i s %d m o bil e u s e r s p e r c e l l \n ’ ,round
( Nu ) ) ;
printf ( ’ S p e c t r a l e f f i c i e n c y of cDMA s y s t em i s %. 3 f b i t s / s e
c /Hz\n ’ , Seff )
disp (” I n t h e s e c a l c u l a t i o n s , an o m n i d i r e c t i o n a l a n t e n na i s
assumed . I f a t h r e e s e c t o r a n t e n na ( i . e . , G=3) i s u s e d a t a c e l l s i t
e wi t h lamda ( e f f i c i e n c y of s e c t o r −a n t e n na i n a c e l l )= 2 . 6 , t h e
c a p a c i t y w i l l be i n c r e a s e d to 325 m o bil e u s e r s p e r c e l l , and s p
e c t r a l e f ciency w i l l be 0 . 4 2 1 b i t s / s e c /Hz . ”)
OUTPUT:

RESULT: Thus the program was successfully executed and the output was
verified

You might also like