WC Lab Mannual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 78

STUDENT NAME

REG. NUMBER
YEAR
SEMISTER
SECTION

FACULTY NAME
INTRODUCTION

Wireless and Cellular Communication lab manual covers those practical that are very
knowledgeable and quite beneficial in grasping the core objective of the subject. These practical solidify
the theoretical and practical concepts that are very essential for the Electronics and communication
engineering students.

This manual comprise of practical’s covering the topics of Wireless and Cellular Communication
that are to be simulated using MATLAB/SIMULINK. This Manual contains a relevant theory about the
Lab session.

Objectives:

The Objective is to expose the students to the various key technologies used in wireless communication and
the impairments in the various wireless environments.

Pre-requisites:
1. Basic knowledge on modulation schemes
2. Basic knowledge on signal processing like Implementing Digital filters.
3. Awareness regarding any simulation tool
Acknowledgement

Faculty Authors

Dr. K.S. Ramesh Professor


Dr. Vipul Agarwal Associate Professor
Dr. C. Vardhan Associate Professor
Dr. G. Siva Prasad Assistant Professor

Cover Design Team

170040638 Pavan Sai


170040686 Pathan Jafar

Course Cordinator HOD I/C Peer mentor


LIST OF EXPERIMENTS:

1) Analyze the BER for the M-ary PSK Using Matlab/Simulink for Rayleigh fading with AWGN.

2) Analyze the power received at the receiver w.r.t to the distance for different path loss exponents.
3) Analysis of multipath signal reception with equalizer and without equalizer for different path delays
4) Performance analysis of SISO and SIMO using equal gain combining method
5) Simulation of basic OFDM

6) Performance Analysis of Various Modulation Techniques in Rayleigh and Rician Wireless Channel
Models

7) To mitigate the distortion introduced by the channel on the transmitted signal using Adaptive Linear
Equalizer (LE) on the received samples from ADC output.

8) To observe the BER performance of DS-CDMA using mixed codes in multipath channel using
RAKE receiver for single user case

9) To study Gaussian Minimum Shift Keying (GMSK) modulation technique.

10) To determine the freespace loss and the power received using Matlab program

11) To write a Matlab program to calculate the median path loss for Okumura model for outdoor
propagation.

12) To write a Matlab program to calculate the median path loss for Hata model for outdoor
propagation.

13) To understand the basic aspects of DS-CDMA in single user case and two user case.
Organization of the LAB MANUAL

The laboratory framework includes a creative element but shifts the time- intensive aspects outside of
the Two-Hour closed laboratory period. Within this structure, each laboratory includes three parts:
Prelab, In-lab, and Post-lab.

A. Pre-Lab
The Prelab exercise is a homework assignment that links the lecture with the laboratory period -
typically takes 2 hours to complete. The goal is to synthesize the information they learn in lecture
with material from their textbook to produce a working piece of software. Prelab Students attending a
two-hour closed laboratory are expected to make a good-faith effort to complete the Prelab exercise
before coming to the lab. Their work need not be perfect, but their effort must be real (roughly 80
percent correct).

B. In-Lab
The In-lab section takes place during the actual laboratory period. The First hour of the laboratory
period can be used to resolve any problems the students might have experienced in completing the
Prelab exercises. The intent is to give constructive feedback so that students leave the lab with
working Prelab software
- a significant accomplishment on their part. During the second hour, students complete the In-lab
exercise to reinforce the concepts learned in the Prelab. Students leave the lab having received
feedback on their Prelab and In-lab work.

C. Post-Lab
The last phase of each laboratory is a homework assignment that is done following the laboratory
period. In the Post-lab, students analyses the efficiency or utility of a given system call. Each Post-
lab exercise should take roughly 120 minutes to complete.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-1

Aim: Analyze the BER for the M-ary PSK Using Matlab/Simulink for Rayleigh fading with AWGN.

Date of the Session: / / Time of the Session: to

Prerequisite:

 General idea about M-ary PSK, Rayleigh fading and AWGN

 General idea about Matlab programming

Pre- Lab task:

1) What do you understand by M-ary PSK?

2) Explain Rayleigh fading.

3) What do you understand by AWGN


In lab Task:

Software used: Matlab

Objective of the experiment:


 To understand the effect of the fading environment for different M-ary PSK schemes with different
levels of AWGN.
Theory:
Modulation is a process by which a carrier signal is altered according to information in a message
signal. The carrier frequency, denoted F c, is the frequency of the carrier signal. The sampling rate is the rate at
which the message signal is sampled during the simulation. The frequency of the carrier signal is usually much
greater than the highest frequency of the input message signal. The Nyquist sampling theorem requires that the
simulation sampling rate F s be greater than two times the sum of the carrier frequency and the highest frequency
of the modulated signal, in order for the demodulator to recover the message correctly.

Binary Phase Shift Keying signal (BPSK)


In carrier-phase modulation, the information that is transmitted over a communication channel is
impressed on the phase of the carrier. Since the range of the carrier phase is 0 ≤ θ ≤ 2Π, the carrier phases
used to transmit digital information via digital-phase modulation are θm=2Πm/M, for m=0,1,2…..,M-
1.Thus for binary phase modulation(M=2), the two carrier phase are θ0 =0 and θ1 = Π radian. For M-array
phase modulation=2k, where k is the number of information bits per transmitted symbol.

The general representation of a set of M carrier-phase-modulated signal waveforms is

um (t) = AgT(t) cos(2Πfct+2Πm/M) , m=0,1,………,M-1


Where, gT(t) is the transmitting filter pulse shape, which determines the spectral characteristics of
the transmitted signal, and A is the signal amplitude. This type of digital phase modulation is called phase-
shift-keying.
QPSK Modulation

Quadrature Phase Shift Keying (QPSK) is the digital modulation technique. Quadrature Phase Shift
Keying (QPSK) is a form of Phase Shift Keying in which two bits are modulated at once, selecting one of
four possible carrier phase shifts (0, Π/2, Π, and 3Π/2). QPSK perform by changing the phase of the In-
phase (I) carrier from 0° to 180° and the Quadrature-phase (Q) carrier between 90° and 270°. This is used
to indicate the four states of a 2-bit binary code. Each state of these carriers is referred to as a Symbol.
QPSK perform by changing the phase of the In-phase (I) carrier from 0° to 180° and the
Quadrature-phase (Q) carrier between 90° and 270°. This is used to indicate the four states of a 2-bit binary
code. Each state of these carriers is referred to as a Symbol. Quadrature Phase-shift Keying (QPSK) is a
widely used method of transferring digital data by changing or modulating the phase of a carrier signal.
Signal point constellations for M=2, 4 and 8 are illustrated in figure.

Algorithm:
 Generate the random sequence of numbers between 0 to M-1.
 Modulate the random data
 Generate Rayleigh fading channel
 Pass the modulated data through the generated channel
 Add AWGN with various SNR to the output of the channel
 Demodulate the received data.
 Find BER for all the SNR values and plot semi-log graph SNR vs BER for all SNR values.
Matlab Program:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%Simulation of BPSK in rayleigh fading with AWGN%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

close all
clear all
clc
snr=-5:1:10;
lsn=length(snr);
M=2;
% Generating data
t_data=randi([0 M-1],100000,1);
% modulating data
mod_data = pskmod(t_data,M);
h=rayleighchan (1/100000,10);
changain1=filter(h,ones(size(t_data)));
a=max(max(abs(changain1)));
changain1=changain1./a;
chan_data = changain1.*mod_data;
%chan_data = filter(h,mod_data);
no_of_error=zeros(1,lsn);
ratio=zeros(1,lsn);
no_of_error_1=zeros(1,lsn);
ratio_1=zeros(1,lsn);
for ii=1:lsn
chan_awgn = awgn(chan_data,snr(ii),'measured'); % awgn addition
no_chan_awgn=awgn(mod_data,snr(ii),'measured');
chan_awgn =a*chan_awgn./changain1; % assuming ideal channel estimation
demod_Data = pskdemod(chan_awgn,M); %demodulating the data
[no_of_error(ii),ratio(ii)]=biterr(t_data,demod_Data) ; % error rate calculation
demod_Data_1 = pskdemod(no_chan_awgn,M); %demodulating the data
[no_of_error_1(ii),ratio_1(ii)]=biterr(t_data,demod_Data_1) ; % error rate calculation
End
% plotting the result
semilogy(snr,ratio,'--*b','linewidth',2);
hold on;
EbN0Lin = 10.^(snr/10);
theoryBer_rf = 0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1)));
theoryBer = 0.5*erfc(sqrt(10.^(snr/10)));
semilogy(snr,theoryBer_rf,'--or','linewidth',2);
semilogy(snr,theoryBer,'--og','linewidth',2);
semilogy(snr,ratio_1,'--om','linewidth',2);
legend('Rayleigh simulted','Rayleigh theoritical','Only AWGN Theoritical',' only AWGN
simulated')
grid on
xlabel('SNR');
ylabel('BER')
title('Bit error probability curve for BPSK');

Plots:

Observations:

Result:
Post Lab

1) Comment on the graph obtained BER and SNR.


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-2

Aim: Analyze the power received at the receiver w.r.t to the distance for different path loss exponents.

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to path loss.

 Relation between power received and wrt to distance.

Pre- Lab task:

1) Explain how received power varies with respect to distance.

2) If transmitted power is increased, what happens to path loss?


In Lab Task:

Software used: Matlab

Objective of the experiment:


To understand large scale fading environment and attenuation of the signal strength for different
path-loss exponent w.r.t. distance.
Theory:

Path loss normally includes propagation losses caused by the natural expansion of the radio wave front in
free space (which usually takes the shape of an ever-increasing sphere), absorption losses (sometimes called
penetration losses), when the signal passes through media not transparent to electromagnetic waves, diffraction
losses when part of the radio wave front is obstructed by an opaque obstacle, and losses caused by other
phenomena.

The signal radiated by a transmitter may also travel along many and different paths to a receiver
simultaneously; this effect is called multipath. Multipath can either increase or decrease received signal
strength, depending on whether the individual multipath wave fronts interfere constructively or destructively.
The total power of interfering waves in a Rayleigh fading scenario vary quickly as a function of space (which is
known as small scale fading), resulting in fast fades which are very sensitive to receiver position
In the study of wireless communications, path loss can be represented by the path loss exponent, whose
value is normally in the range of 2 to 4 (where 2 is for propagation in free space, 4 is for relatively lossy
environments and for the case of full reflection from the earth surface—the so-called flat-earth model). In some
environments, such as buildings, stadiums and other indoor environments, the path loss exponent can reach
values in the range of 4 to 6. On the other hand, a tunnel may act as a waveguide, resulting in a path loss
exponent less than 2.
As a result of this it is found that the signal decreases in a way that is inversely proportional to the
square of the distance from the source of the radio signal.

Free space path loss formula


The free space path loss formula or free space path loss equation is quite simple to use. Not only is
the path loss proportional to the square of the distance between the transmitter and receiver, but the signal
level is also proportional to the square of the frequency in use.
FSPL = (4πd/ λ) 2 = (4πdf/ c) 2

 FSPL is the Free space path loss


 d is the distance of the receiver from the transmitter (metres)
 λ is the signal wavelength (metres)
 f is the signal frequency (Hertz)
 c is the speed of light in a vacuum (metres per second)

Decibel version of free space path loss equation

Most RF comparisons and measurements are performed in decibels. This gives an easy and
consistent method to compare the signal levels present at various points. Accordingly it is very convenient
to express the free space path loss formula, FSPL, in terms of decibels..

FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.44

Where: d is the distance of the receiver from the transmitter (km) f is the signal frequency (MHz)

Affect of antenna gain on path loss equation

The equation above does not include any component for antenna gains. It is assumed that the
antenna gain is unity for both the transmitter. In reality, though, all antennas will have a certain amount of
gain and this will affect the overall affect. Any antenna gain will reduce the "loss" when compared to a
unity gain system. The figures for antenna gain are relative to an isotropic source, i.e. an antenna that
radiates equally in all directions.

FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.44 -Gtx - Grx

Where: Gtx is the gain of the transmitter antenna relative to an isotropic source (dBi) Grx is the gain
of the receiver antenna relative to an isotropic source (dBi)

The free space path loss equation or formula given above is an essential tool that is required when
making calculations for radio and wireless systems either manually or within applications such as wireless
survey tools, etc. By using the free space path loss equation, it is possible to determine the signal strengths
that may be expected in many scenarios. While the free space path loss formula is not fully applicable
where there are other interactions, e.g. reflection, refraction, etc as are present in most real life applications,
the equation can nevertheless be used to give an indication of what may be expected. It is obviously fully
applicable to satellite systems where the paths conform closely to the totally free space scenarios

Power Received:

[Pr] = [pt] + [Gt] + [Gr] – [FSPL]

Pr – Received power Pt – Transmitted power


Gt – Gain of the transmitting antenna
Gr – Gain of the receiving antenna
Matlab code:
%LARGE SCALE PATH LOSS
clear all;
close all;
clc;
d = 1000:1000:30000;
Pt=2; %Transmited Power
for n=1.5:0.5:3
Pr=Pt*(1./(d.^n));%formula for received power
Prdb = 10.*log(Pr);%coverting to db scale
ptdb=10.*log(Pt);%coverting to db scale
pldb= ptdb-Prdb;
figure(1);
plot(d,Prdb);%plot for received power vs distance
hold all;
grid on;
legend('n=1.5','n=2.0','n=2.5','n=3')
title('Received power for Different pathloss exponents');
xlabel('Kilometers');
ylabel('Received Power (dB)');
figure(2);
plot(d,pldb);%plot for patlloss vs distance
hold all;
grid on;
legend('n=1.5','n=2.0','n=2.5','n=3')
title('Pathloss analysis for Different pathloss exponents');
xlabel('Kilometers');
ylabel('Pathloss (dB)');
end
Plots:

Result:
Post Lab Task:

1) Plot the graph between received power (in Watts) and distance.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-3
Aim: Analysis of multipath signal reception with equalizer and without equalizer for different path delays

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to path multipath signal.

 Working of Equalizer.

 Understanding of path delays

Pre- Lab task:

1) Explain the working of Equalizer

2) What do you understand by path delays?

3) What do you mean by multipath signal?


In- Lab task:

Software used: Matlab


Objective of the experiment:
 To understand the performance of the equalizer and recovery of the signal under multipath
environment considering different path delays.
Theory:

Multipath Fading
In real-world wireless communications suffer with multipath scattering effects, time dispersion, and
Doppler shifts that arise from relative motion between the transmitter and receiver. The major paths result
in the arrival of delayed versions of the signal at the receiver. These irresolvable components combine at
the receiver and give rise to the phenomenon known as multipath fading. To combat this effect the
equalizers are used which is capable to compensate the inter symbol interference (ISI).

Equalization Features:
Time-dispersive channels can cause inter symbol interference (ISI), a form of distortion that causes
symbols to overlap and become indistinguishable by the receiver. For example, in a multipath scattering
environment, the receiver sees delayed versions of a symbol transmission, w hich can interfere w ith other
symbol transmissions. An equalizer attempts to mitigate ISI and improve receiver performance.

Linear equalizers, a class that is further divided into these categories:


 Symbol-spaced equalizers
 Fractionally spaced equalizers (FSEs)
 Decision-feedback equalizers (DFEs)
 MLSE (Maximum-Likelihood Sequence Estimation) equalizers
Equalizer Structure

Adaptive Equalization Simulation


Equalizer begins by using a known sequence of transmitted symbols w hen adapting the equalizer
weights. The known sequence, called a training sequence, enables the equalizer to gather information about
the channel characteristics. After the equalizer finishes processing the training sequence, it adapts the
equalizer w eights in decision directed mode using a detected version of the output signal.

The following code illustrates how to use equalize with a training sequence. The training sequence in this case is just
the beginning of the transmitted message
Algorithm:
 Generate the random sequence of numbers between 0 to M-1.
 Modulate the random data
 Generate Rayleigh fading channel
 Pass the modulated data through the generated channel
 Add AWGN with various SNR to the output of the channel
 The channel output will be given to the equalizer and the equalizer is provided with the known
training sequence.
 Equalizer will take the few symbols to converge then the data will be recovered.
 Demodulate the received data.
 Plot the constellation for the faded signal, recovered signal with equalizer and the ideal constellation.
Matlab Code:
M = 4; % Alphabet size for modulation
msg = randi([0 M-1],1500,1); % Random message
hMod = comm.QPSKModulator('PhaseOffset',0);
modmsg = step(hMod,msg); % Modulate using QPSK.
trainlen = 500; % Length of training sequence
chan = [.986; .845; .237; .123+.31i]; % Channel coefficients
filtmsg = filter(chan,1,modmsg); % Introduce channel distortion.
% Equalize the received signal.
eq1 = lineareq(8, lms(0.01)); % Create an equalizer object.
eq1.SigConst = step(hMod,(0:M-1)')'; % Set signal constellation.
[symbolest,yd] = equalize(eq1,filtmsg,modmsg(1:trainlen)); % Equalize.
% Plot signals.
h = scatterplot(filtmsg,1,trainlen,'bx'); hold on;
scatterplot(symbolest,1,trainlen,'g.',h);
scatterplot(eq1.SigConst,1,0,'k*',h);
legend('Filtered signal','Equalized signal',...
'Ideal signal constellation');
hold off;
% Compute error rates with and without equalization.
hDemod = comm.QPSKDemodulator('PhaseOffset',0);
demodmsg_noeq = step(hDemod,filtmsg); % Demodulate unequalized signal.
demodmsg = step(hDemod,yd); % Demodulate detected signal from
equalizer.
hErrorCalc = comm.ErrorRate; % ErrorRate calculator
ser_noEq = step(hErrorCalc, ...
msg(trainlen+1:end), demodmsg_noeq(trainlen+1:end));
reset(hErrorCalc)
ser_Eq = step(hErrorCalc,
msg(trainlen+1:end),demodmsg(trainlen+1:end));
disp('Symbol error rates with and without equalizer:')
disp([ser_Eq(1) ser_noEq(1)])
Plots:

Observations:

 The simulation creates a scatter plot that shows the signal before and after equalization, as well as
the signal Constellation for QPSK modulation.

 Notice on the plot that the points of the equalized signal are clustered more closely around the
points of the signal constellation

Results:
Post - Lab task:

1) Explain different types of equalizers and their characterstics.


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-4

Aim: Performance analysis of SISO and SIMO using equal gain combining method

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to SISO and MIMO

 Understanding of gain combining method

Pre- Lab task:


1) Explain the working od SISO and MIMO

2) What do you understand by gain combining method. Explain in detail.

3) Explain different performance parameters in calculation of bit error rate

In Lab Task:
Software used: Matlab

Objective of the experiment:


 To understand the effect of the fading environment for different M-ary PSK schemes with different
levels of AWGN.
Theory:
Diversity:
The different forms of antenna technology refer to single or multiple inputs and outputs. These are related
to the radio link. In this way the input is the transmitter as it transmits into the link or signal path, and the
output is the receiver. It is at the output of the wireless link.

therefore the different forms of single / multiple antenna links are defined as below:

 SISO - Single Input Single Output

 SIMO - Single Input Multiple output

 MISO - Multiple Input Single Output

 MIMO - Multiple Input multiple Output

SISO - Single Input Single Output

The simplest form of radio link can be defined in MIMO terms as SISO - Single Input Single
Output. This is effectively a standard radio channel - this transmitter operates with one antenna as does the
receiver. There is no diversity and no additional processing required. SIMO has the advantage that it is
relatively easy to implement although it does have some disadvantages in that the processing is required in
the receiver. The use of SIMO may be quite acceptable in many applications, but where the receiver is
located in a mobile device such as a cellphone handset, the levels of processing may be limited by size, cost
and battery drain.

SIMO - Single Input Multiple output

The SIMO or Single Input Multiple Output version of MIMO occurs where the transmitter has a
single antenna and the receiver has multiple antennas. This is also known as receiving diversity. It is often
used to enable a receiver system that receives signals from a number of independent sources to combat the
effects of fading. It has been used for many years with short wave listening / receiving stations to combat
the effects of ionospheric fading and interference.

Combining Techniques for Diversity:


Three types of linear diversity combining schemes are popular:
1. Selective Combining
2. Maximum Ratio Combining
3. Equal Gain Combining
Equal Gain Combining
It is a co-phase combining that brings all phases to a common point and combines them. The
combined signal is the sum of the instantaneous fading envelopes of the individual branches.

Algorithm: (using EGC)


 Generate the random sequence of numbers between 0 to M-1.
 Modulate the random data
 Generate two independent Rayleigh fading channels
 Pass the modulated data through the two independent channel for SIMO
 Pass the modulated data through the one channel for SISO
 Add AWGN with various SNR to the output of the channels
 Perform the ideal channel estimation
 Sum the two independent channel outputs for SIMO
 Demodulate the received data.
 Find BER for all the SNR values and plot semi-log graph SNR vs BER for all SNR values and
compare it with SISO and SIMO
Matlab Code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Performance analysis of SISO and SIMO using Equal gain combining method%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all
clear all
clc
snr=0:1:25;
lsn=length(snr);
M=2;
% Generating data
t_data=randi([0 M-1],100000,1);
% modulating data
mod_data = pskmod(t_data,M);
h1=rayleighchan (1/100000,10);
changain1=filter(h1,ones(size(t_data)));
% a1=max(abs(changain1));
% changain1=changain1/a1;
chan_data1 = changain1.*mod_data;
h2=rayleighchan (1/100000,20);
changain2=filter(h2,ones(size(t_data)));
% a2=max(abs(changain2));
% changain2=changain2/a2;
chan_data2 = changain2.*mod_data;
for ii=1:lsn
chan_awgn1 = awgn(chan_data1,snr(ii),'measured'); % awgn addition
chan_awgn1_si =chan_awgn1./changain1; % assuming ideal channel estimation
chan_awgn1=chan_awgn1.*exp(-1i*angle(changain1));
demod_Data1 = pskdemod(chan_awgn1_si,M); %demodulating the data
[no_of_error(ii),ratio(ii)]=biterr(t_data,demod_Data1,log2(M)) ; % error rate
calculation
chan_awgn2 = awgn(chan_data2,snr(ii),'measured'); % awgn addition
% chan_awgn2 =chan_awgn2./changain2; % assuming ideal channel estimation
chan_awgn2=chan_awgn2.*exp(-1i*angle(changain2));
chan_awgn_sm=chan_awgn1+chan_awgn2;
demod_Data_sm = pskdemod(chan_awgn_sm,M); %demodulating the data
[no_of_error_1(ii),ratio_1(ii)]=biterr(t_data,demod_Data_sm,log2(M)) ; % error rate
calculation
end
% plotting the result
semilogy(snr,ratio,'--*b','linewidth',2);
hold on;
semilogy(snr,ratio_1,'--om','linewidth',2);
legend('sim rx1',' sim rx2')
grid on
xlabel('SNR');
ylabel('BER')
title('Bit error probability curve for BPSK');

Plots:

Result:
Post Lab Task
1) Comment on the graph obtained between BER and SNR
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-5
Aim:Simulation of basic OFDM

Date oftheSession: / / Time ofthe Session:to

Prerequisite:

 Basics of Orthogonal Frequency-Division Multiplexing

 General idea about Matlab programming

Pre- Lab task:

1) Why OFDM Is Efficient?

2)Explain the Benefits Of OFDM.

3) What do you understand by OFDM?


In lab Task:

Software used: Matlab

Objective of the experiment:


 To analyse the performance of OFDM over different channel models.

Theory:

Introduction to OFDM
Orthogonal frequency division multiplexing (OFDM) is based on multicarrier communication
techniques. The idea of multicarrier communications is to divide the total signal bandwidth into number of
subcarriers and information is transmitted on each of the subcarriers. Unlike the conventional multicarrier
communication scheme in which spectrum of each subcarrier is non-overlapping and band-pass filtering is
used to extract the frequency of interest, in OFDM the frequency spacing between subcarriers is selected
such that the subcarriers are mathematically orthogonal to each others. The spectra of subcarriers overlap
each other but individual subcarrier can be extracted by baseband processing. This overlapping property
makes OFDM more spectral efficient than the conventional multicarrier communication scheme.
In the more conventional approach the traffic data is applied directly to the modulator with a carrier
frequency at the center of the transmission band f0 ,..., fN-1, i.e., at(fN-1+f0)/2, and the modulated signal
occupies the entire bandwidth W. When the data is applied sequentially the effect of a deep fade in a
mobile channel is to cause burst errors. Figure 2.1 shows the serial transmission of symbols S 0 , S1 , ..., SN−1
, while the solid shaded block indicates the position of the error burst which effects only k < N symbols. By
contrast, during the N-symbol period of the conventional serial system, each OFDM modulator carries only
one symbol, and the error burst causes severe signal degradation of the duration of k-serial symbols. This
degradation is shown crosshatched. However, if the error burst is only a small fraction of the symbol period
than each of the OFDM symbols may only be slightly affected by the fade and they can still be correctly
demodulated. Thus while the serial system exhibits an error burst, no errors or few errors may occur using
the OFDM approach.
A baseband OFDM symbol can be generated in the digital domain before modulating on a carrier for
transmission. To generate a baseband OFDM symbol, a serial digitized data stream is first modulated using
common modulation schemes such as the phase shift keying (PSK) or quadrature amplitude modulation
(QAM). These data symbols are then converted to parallel streams before modulating subcarriers.
Subcarriers are sampled with sampling rate N/T S, where N is the number of subcarriers and T s is the
OFDM symbol duration. The frequency separation between two adjacent subcarriers is 2/N. Finally,
samples on each subcarrier are summed together to form an OFDM sample. An OFDM symbol generated
by an N -subcarrier OFDM system consists of N samples and the m-th sample of an OFDM symbol is
given by.
𝑁−1 𝑗2Πmn /N
𝑋𝑚 = 𝑛 =1 𝑋𝑛 𝑒 0≤𝑚≤𝑁−1 …(1.1)
where Xn is the transmitted data symbol on the nth carrier. Equation (2.1) isequivalent to the N -point
inverse discrete Fourier transform (IDFT) operation onthe data sequence with the omission of a scaling
factor. It is well known thatIDFT can be implemented efficiently using inverse fast Fourier transform
(IFFT).Therefore, in practice, the IFFT is performed on the data sequence at an OFDMtransmitter for
baseband modulation and the FFT is performed at an OFDM receiver for baseband demodulation. Size of
FFT and IFFT is N, which is equal tothe number of sub channels available for transmission, but all of the
channels needs to be active.
The sub-channel bandwidth is given by
1 𝑓𝑠𝑎𝑚𝑝
𝑓𝑠𝑐 = 𝑇 = …(1.2)
𝑠 𝑁

where fsamp is the sample rate and Ts is the symbol time.


Finally, a baseband OFDM symbol is modulated by a carrier to become a bandpass signal and
transmitted to the receiver. In the frequency domain, this corresponds to translating all the subcarriers from
baseband to the carrier frequency simultaneously. Figure 1.2 shows a 3-subcarrier OFDM transmitter and
the process of generating one OFDM symbol.
OFDM Basic System Model:

Algorithm:

 Generate Data Bits


 Apply modulation and Reshape
 Perform ifft operation
 Assume Channel and add AWGN and Aayleigh noise
 At receiver equalize and take FFT
 Reshape and demodulate
 Find bit error rate
Matlab Program:
%% OFDM - Multiple Subcarriers
%% Code
clear all; close all; clc;
data= randi([0 1], 2^16 ,1);
for i=6:1:9
for j=1:1:4
if j<3
mod_data= pskmod(data,2^j);
elseif j==3
mod_data= qammod(data,16);
elseif j==4
mod_data= qammod(data,64);
end
mod_data=reshape(mod_data,[2^i,((2^16)/(2^i))]);
mod_data=ifft(mod_data,2^i);
k=1;
for l=0:1:40
h=1/(sqrt(randn(1,1)+i*randn(1,1)));
channel_rayleigh=h*mod_data;
noise_gaussian=awgn(channel_rayleigh,l,'measured');
rec_mod_data=inv(h)*noise_gaussian;
rec_mod_data=fft(rec_mod_data,2^i);
rec_mod_data=reshape(rec_mod_data,[2^16,1]);
if j<3
rec_demod_data=pskdemod(rec_mod_data,2^j);
elseif j==3
rec_demod_data=qamdemod(rec_mod_data,16);
elseif j==4
rec_demod_data=qamdemod(rec_mod_data,64);
end
[number,ratio]=biterr(rec_demod_data,data);
err(k)=ratio;
k=k+1;
end
m=0:1:40;
semilogy(m,err);
hold on;
end
hold off;
figure();
end
Plots:

Observations:

Result:
Post Lab

1) Build and evaluate OFDM with different modulation schemes:


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-6
Aim: Performance Analysis of Various Modulation Techniques in Rayleigh and Rician Wireless Channel
Models

Date oftheSession: / / Time of the Session: to

Prerequisite:

 Basics of Various Modulation Techniques

 Significance of Rayleigh and Rician Wireless Channel Models

 General idea about Matlab programming

Pre- Lab task:

1) What are various modulation techniques and why we need them?

2) Explain Rayleigh Wireless Channel Model.

3) Explain Rician Wireless Channel Model.

4) What is the difference between Rayleigh and Rician Wireless Channel Models
In lab Task:

Software used: Matlab

Objective of the experiment:


 Analysis of fading effect on BER performance for BPSK modulation signals for Rayleigh and
Rician channel models.
Theory:
Rayleigh and Rician fading channels are useful models of real-world phenomena in wireless
communications. These phenomena include multipath scattering effects, time dispersion, and Doppler
shifts that arise from relative motion between the transmitter and receiver

The major paths result in the arrival of delayed versions of the signal at the receiver. In addition, the
radio signal undergoes scattering on a local scale for each major path. Such local scattering is typically
characterized by a large number of reflections by objects near the mobile. These irresolvable components
combine at the receiver and give rise to the phenomenon known as multipath fading. Due to this
phenomenon, each major path behaves as a discrete fading path. Typically, the fading process is
characterized by a Rayleigh distribution for a nonline-of-sight path and a Rician distribution for a line-of-
sight path.

Implement Fading Channel Using an Object


A baseband channel model for multipath propagation scenarios that you implement using objects includes:
 N discrete fading paths, each with its own delay and average power gain.
 A channel for which N = 1 is called a frequency-flat fading channel. A channel for which N > 1 is
experienced as a frequency-selective fading channel by a signal of sufficiently wide bandwidth.
 A Rayleigh or Rician model for each path.
 Default channel path modeling using a Jakes Doppler spectrum, with a maximum Doppler shift that
can be specified. Other types of Doppler spectra allowed.
 If the maximum Doppler shift is set to 0 or omitted during the construction of a channel object, then
the object models the channel as static (i.e., fading does not evolve with time), and the Doppler
spectrum specified has no effect on the fading process.

Implement Fading Channel Using a Block:


The Channels block library includes Rayleigh and Rician fading blocks that can simulate real-world
phenomena in mobile communications. These phenomena include multipath scattering effects, as well as
Doppler shifts that arise from relative motion between the transmitter and receiver.
(If both of these parameters are vectors, they must have the same length; if exactly one of these
parameters is a scalar, the block expands it into a vector whose size matches that of the other vector
parameter.)

Matlab Program:
Results:

Post Lab:

Comment on the result obtained for Performance Analysis of Various Modulation Techniques
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-7
 Aim: To mitigate the distortion introduced by the channel on the transmitted signal using Adaptive
Linear Equalizer (LE) on the received samples from ADC output.

Date oftheSession: / / Time ofthe Session: to

Prerequisite:

 Equalization, Fundamentals of Equalizers

 Linear equalizers, nonlinear equalizers, Decision feedback equalizers

 General idea about Matlab programming

Pre- Lab task:

1) What is significance of Equalization? Types of Equalizers?

2) Explain Linear equalizers and Fractionally spaced Equalizers.

3) Explain nonlinear equalizers and Adaptive Linear Fractionally Spaced Equalizer.


4) What are algorithms for adaptive equalization?

In lab Task:

Software used: Matlab

Objective of the experiment:


 To mitigate the distortion introduced by the channel on the transmitted signal using Adaptive Linear
Equalizer (LE) on the received samples from ADC output.

Theory:

Why Equalization?

In the previous two experiments, we discussed the transmission of digital information through a
White Gaussian Noise Channel (AWGN) where the channel was assumed to have ideal response
(ie. have a constant gain and phase) over the band-width of the signal. In this experiment, we
consider the problem of signal transmission when the channel is band limited to some specified
bandwidth of BHz. Thus when the channel is ideal and the bandwidth is B, a signal pulse can be
designed to allow us to transmit at 2B symbols/s without ISI and the bits that can be transmitted
depend on the type of modulation technique employed. On the other hand, when the channel is
not ideal, signal transmission at symbol rate equal to or exceeding 2B results in inter symbol
interferences (ISI) among the adjacent symbols. In order to have a design with zero ISI, it is
necessary to reduce the symbol rate 1 / T below the Nyquist rate of 2B symbols/s and hence we
can realize practical transmitting and receiving filters. But to achieve a symbol transmission rate
of 2B symbols/s we should relax the condition of zero ISI to have a controlled amount of ISI. In
a design where the channel frequency response is known for |f| < B then we can design a
modulator and demodulator using filters whose responses may be selected to minimize the error
probability at the detector. However in practical digital communication system transmitting
through band-limiting channels, the frequency response of the channel c(f) is not known a priori
to design an optimum filter for modulator and demodulator. We need to design a receiver in the
presence of channel distortion (which is not known), AWGN and ISI to compensate for the high
error rates. An equalizer is one such compensator that reduces high error rates.
Types of equalizers

There are different equalization methods available. An optimum equalization technique is


available based on the maximum likelihood sequence detection (MLSE) criterion. But MLSE is
computationally complex and the complexity grows exponentially with the length of the channel
time dispersion. So a sub optimum equalization technique is discussed in this experiment and in
the next experiment. In experiment 5, MLSE using Viterbi Algorithm is given as exercise for the
students to try out. One method of doing the sub optimal detection is based on the use of a linear
filter with adjustable coefficients known as Linear Equalizers. Second one is the method that
uses the previously detected symbols to suppress the ISI in the present symbol being detected
and is called Decision FeedbackEqualizers.

Fractionally spaced Equalizers

In Linear Equalizers the equalizer taps are spaced at the reciprocal of the symbol rate ie. at the
reciprocal of the signaling rate 1/T. This sampling time is optimum if the equalizer is proceeded
by the filter matched to the channel distorted transmitted pulse. When the channel characteristics
are unknown, the receiver filter is matched to the transmitted signal pulse and the sampling time
is optimized for the filter. But the limitation of the symbol rate equalizer is that it can only
compensate for the frequency response characteristics for the aliased received signals and not
compensate for the channel distortion inherent in the signal. To overcome this problem we are
using fractionally spaced equalizer in which the incoming signal is sampled at least as fast as the
Nyquist rate. For example, if the transmitted signal consists of pulses having a raised cosine
spectrum with a roll off factor r then it is passed through an equalizer with tap spacing of T /
(1+r). When r is 1 we would have T/2 spaced equalizer and when r = 0.5 then would have 2T/3
and so on. In general the fractionally spaced equalizer compensates for the channel distortion in
the received signal before the aliasing effects due to symbol rate sampling. In effect, the
fractionally spaced equalizer is equivalent to the optimum linear equalizer consisting of the
matched filter followed by a symbol rate equalizer.

Adaptive Linear Equalizers

The objective of the Adaptive Linear Equalizer is to adapt the coefficients to minimize the noise
and ISI at the output. The adaptation of the equalizer is driven by the error signal which is
computed using an adaptive algorithm like Least Mean Square (LMS). There are 2 modes that
the Adaptive equalizers work. One is the training mode and the other is the decision directed
mode. In training Mode, to make equalizer suitable in the initial acqusition duration, a training
signal is needed. This is done to gather information about the channel. In this mode of operation,
the transmitter generates a data symbol sequence known to the receiver. The error signal e[k] is
computed from the training signal d[n]. The error signal e[k] = d[n] – y[k] where d[n] = I[k-Δ].
Here Δ is called as decision delay. The training mode adaptive equalizer is shown in Figure 1.
The error signal generated based on the known training sequence is used initially to adjust the
coefficients of the equalizer. Once the coefficients are converged to their optimum values using
the training sequence, the decisions at the output of the slicer are generally sufficiently reliable
so that they may be used to continue the coefficient adaptation process. This is called a decision
directed mode.
Fig 1 : Block Diagram of Adaptive Linear Equalizer – Training Sequence Mode

In Decision Directed Mode the receiver decisions are used to generate the error signal. Decision
directed equalizer adjustment is effective in tracking slow variations in the channel response.
However, this approach is not effective during initial acqusition. Here in WiCOMM-T the pre-
distortion given in the transmitter part is equalized using an FIR filter. A fractionally spaced
adaptive linear filter of order L is used for this purpose. The error signal between slicer input and
output will be used to adapt the adaptive filter in the decision directed mode. Since it is a
fractionally spaced equalizer, the filter operates at twice the symbol rate. The decision directed
mode adaptive equalizer is shown in Figure 2

Fig 2 : Block Diagram of Adaptive Linear Equalizer – Decision Directed Mode –


L tapped filter
MATLAB IMPLEMENTATION

Transmitter

Fig:3 Transmitter block diagram in MATLAB

1. A RRC pulse of duration -3Tb to +3Tb (where Tb is the bit duration) is generated. The roll
factor r can be changed between 0.11 and 0.99. The default value of r is0.65.
2. Random data to be transmitted isgenerated.
3. Random data is QAMmodulated.
4. The QAM symbols are upsampled by a factor of 8 samples per symbol. For a sampling rate
of 2Msamples /sec, the symbol rate is 2 x 106 / 8 =250Ksymbols/sec
5. The upsampled QAM symbols are convolved with the RRC pulse to obtain the pulse shaped
bits.
6. The pre-distorted Channel with the FIR channel coefficients as given in Table 3.0 (Ref.
WiCOMM-T user Mannual) is imposed on these RRC pulse shaped QAMsymbols.
7. Pre-distorted symbols are given to the WiCOMM-T Tx interface block to send through
WiCOMM-T.

Receiver

Receive block diagram in Matlab

The samples are received from the WiCOMM-T Rx interface blocks


1. The linear adaptive equalizer is applied to mitigate the channeleffect.
2. The equalizer output is passed to the slicer fordecisions.
3. The mean square error curve, constellation plot before and after equalizer and the frequency
response plot of the equalizer are plotted.

Procedure

The following are the default values used for this experiment.

Transmitter

WiCOMM-Tsamplingrate = 2MBps

Roll-offfactor(alpha) = 0.65

block_size = 20000 (Number ofsymbols)

upsample_facto = 8

Channel = Channel# 1 - BenignChannel

Receiver

WiCOMM-Tsamplingrate = 2MBps

block_size = 20000 (Number ofsymbols)

upsample_factor = 8

decimation_factor = 1

number_of_taps(L) = 20

DecisionDelay(∆) = 0

learningconstant(µ) = 0.01

1. Connect WiCOMM-T in base-band loop back with the sampling rate set to2MBps.
2. Generate the transmitter modemsample.
3. Transmit and receive the modem sample through WiCOMM-T and analyze the received
modemsamples.
4. Varylearningconstant between 0.001 and 0.02, decision delay between 0 and 9 and
observe the performance

5. Observe the various plots generated byMATLAB.


6. Connect WiCOMM-T in IF loop-back and repeat steps 2 to6.
7. Connect 2 WiCOMM-Ts such that one is transmitter and the other is receiver and repeat
steps 2 to6

Post Lab:

1. Explain the working of MLSE with diagram.


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-8
 Aim: To observe the BER performance of DS-CDMA using mixed codes in multipath channel
using RAKE receiver for single user case.

Date oftheSession: / / Time ofthe Session: to

Prerequisite:

 Digital Modulation techniques-CDMA

 General idea about Matlab programming

Pre- Lab task:

1) What is Multipath?

2) Explain effect of Multipath on the performance of CDMA

3) What is RAKE Receiver?


In lab Task:

Software used: Matlab

Objective of the experiment:


 To observe the BER performance of DS-CDMA using mixed codes in multipath channel using
RAKE receiver for single user case.
 Theory:
What is Multipath?

Multipath occurs when a radio signal is split into two or more signals causing the receiving
antenna to receive multiple copies of the same signal. The radio signal can be split by obstacles
such as walls, chairs, tables and other objects. As the signal bounces off an object it causes a
longer path to the receiver. Some signals may bounce off several objects before reaching the
receiver. The longer the path, the greater the amount of delay. As radio signals are delayed, they
reach the receiving antenna at different times sometimes overlapping. The receiver becomes
confused by the signals and is unable to interpret them correctly which causes data errors
requiring retransmission of the signal. Performance can be significantly reduced by the delayed
signals and retransmissions.

Effect of Multipath on the performance of DS-CDMA

CDMA is inherently tolerant to multipath delay spreading signals as any signal that is delayed by
more than one chip time becomes uncorrelated to the PN code used to decode the signal. This
results in the multipath simply appearing as noise. This noise leads to an increase in the amount
of interference seen by each user subjected to the multipath and thus increases the received BER.
The BER is essentially flat for delay spreadings of greater than one chip time (0.8 ms), which is
to be expected as the reflected signal becomes uncorrelated. Also the multipath delay spreading
leads to an increase in the equivalent number of users in the cell, as it increases the amount of
interference seen by the receiver.
RAKE Receiver

A RAKE receiver is a radio receiver designed to nullify the effect of multipath fading. It uses
number of sub-receivers called fingers. Each finger is a correlator and is designed to a different
multipath component. Each finger independently decodes a single multipath component. The
output of all the correlators is combined to increase the SNR in a multipath environment. The
multipath channel through which a radio wave transmits can be viewed as transmitting the line of
sight wave plus a number of multipath components. Multipath components are delayed copies of
the original transmitted wave traveling through a different echo path, each with a different
magnitude and time of arrival at the receiver. Since each component contains the original
information, if the magnitude and phase of each component is computed at the receiver through a
method called channel estimation then all the components can be added coherently to improve
the information reliability. The RAKE receiver is so named because it looks like a garden rake,
each finger collecting the symbol energy similar to how the fingers in a garden rake collects
leaves. To minimize the distortions introduced in the DS-CDMA systems, RAKE receiver uses a
technique called diversity.
RAKE Receiver

In our case, RAKE receiver has 2 fingers. Each finger of the receiver process one path of the
composite multipath signal. All the processing in the RAKE fingers should be done at chip level.
Here c(k)indicates the spreading code used for that particular user. h0 and hL are the multipath
channel coefficients. LTc is the delay that is used in the multipath channel model.

MATLAB

Code:Implementation:Transmitter

Block diagram of CDMA- Multipath Transmitter

Steps:
1. Random data to be transmitted for User1 isgenerated.
2. Random data of User1 is QAMmodulated.
3. The QAM modulated User1 data is convolved with its spreadingcode.
4. The convolved data of User1 is RC Pulseshaped.
5. The RC pulse shaped data is multiplied with different channels to show the multipath effect.
6. The data convolved with channel 1 and channel 2 are summed together.
7. The summed up data is up sampled.

Receiver

1. The samples are received from the WiCOMM-T Rx interfaceblock


2. The received samples are downsampled
3. The down sampled signals are de-spreaded using User1 de-spreading codes using MRC and
EGC technique
4. The de-spreaded data are QAM demodulated for both MRC andEGC.
5. BER is calculated for the QAM demodulated data for both MRC andEGC.

Block diagram of CDMA- Multipath Receiver

Procedure
Note: Refer Appendix A on how to setup WiCOMM-T and Appendix B on how to generate the
modem samples, vary the parameters, transmit, receive and analyzing the received modem
samples etc. The following are the default values used for this experiment.

1. Connect WiCOMM-T for baseband loopback.


2. Select CDMAPART2 from the experiments list in EXPERIMNTwindow.Select the SNR
maximum and minimum value from pop up menu for generating the transmitter
modemsample.
3. Transmit and receive the modem sample throughWiCOMM-T.
4. Analyse the received modemsamples.
5. Observe the BER plot generated by MATLAB for MRC and EGCtechniques.
6. Connect WiCOMM-T in IF loop back and repeat steps 2 to6
7. Connect 2 WiCOMM-Ts in baseband level and repeat steps 2 to6
8. Connect the 2 WiCOMM-Ts in IF level and repeat steps 2 to6
Post Lab:
Explain the working of QAM with the help of block diagram
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-9
 Aim: To study Gaussian Minimum Shift Keying (GMSK) modulation technique

Date oftheSession: / / Time ofthe Session: to

Prerequisite:

 Digital Modulation techniques-CDMA

 General idea about Matlab programming

Pre- Lab task:

1) What is Multipath?

2) Explain effect of Multipath on the performance of CDMA

3) What is RAKE Receiver?


In lab Task:

Software used: Matlab

Objective of the experiment:


 To study Gaussian Minimum Shift Keying (GMSK) modulation technique

Theory:

GMSK Modulation

Offset QPSK (OQPSK) is obtained from QPSK by delaying the Q data stream by 1 bit with
respect to the I data stream. MSK is derived from OQPSK by replacing the rectangular pulses in
amplitude with a half cycle sinusoidal pulse. MSK modulation makes the phase change linear
and limited to +π /2 over a bit interval of T. Because of this linear phase change, the power
spectral density has low side lobes that help to control adjacent channel interference. In MSK
when the half sinusoidal pulse is replaced by Gaussian Pulse shape then the modulation is
Gaussian Minimum Shift Keying(GMSK)

Why GMSK Modulation for GSM?

The phase of the transmitted signal in GMSK scheme is continuous and smoothed by a Gaussian
filter. This results in more compact spectrum which enables better utilization of the available
frequency spectrum. The side lobe energy for GMSK is less and hence channel spacing can be
tighter. The compact spectrum is beneficial in a mobile communication scenario where the
operators pay premium for bandwidth. Phase modulation, further, makes the transmitted signal
to have constant envelope. The constant envelope property enables employing lower cost class
C power amplifiers at the receiver end thereby reducing the overallcost.

GSM Transmitter

Each GSM transmitter frame consists of 156.25 symbols. Six such frames constitute a hyper
frame. Ten hyper frames repeated one after the other constitute the transmitted information.
Total number of samples transmitted is N samples = 8 x 156.25 x 6 x 10 = 75000. The frame
structure of the GSM transmitter consists of first 2 frames for the identification. They are the
FCCH (Frequency Control Channel) and the SCH (Synchronization Channel). The remaining 4
frames carry the actual data to betransmitted.

 The FCCH consists of a 148 '0' bits followed by 8.25 random guard bits. It is mainly used to
estimate the frequency difference between received and transmitted frequenciesS 4(n).
 The SCH channel has a known 64 bit sequence with good correlation properties. Hence this
channel is used for frame synchronization. (In our case we use the whole SCH frame for
synchronization)
 The traffic channel contains the data to bedecoded.
 In this experiment, the parameters are estimated under noise freeconditions.

GSM Receiver

GMSK signals can be detected in many ways. Optimal GMSK detection can be performed using
MLSE, which is nonlinear and highly complex. Here for bit recovery Viterbi algorithm is used

Frequency Synchronization

Take samples of the received data, and calculate the FFT. The difference between the most
dominant frequency component of the transmitted and received spectrum will give us the
frequency offset between the transmitter and receiver. Necessary corrections are performed on
the receiveddata.

Frame Synchronization

Correlate the received data with the actual transmitted SCH channel and look for the peaks. The
location of peak helps in identifying the beginning of the SCH channel. The beginning of the
FCCH and the traffic channels are also identified.

Offset Phase Estimation

Carrier phase offset estimation is done with the help of FCCH channel. The received FCCH
channel, previously identified through the frame synchronization, is decimated by a factor of 8
and the sequence S4(n) is chosen [i.e. the samples S(4), S(12), S(20) are selected]. Deterministic
autocorrelation is performed over this set of data to estimate the carrier phase offset. The
necessary phase corrections are made to the received data. The received data is now ready for
demodulation of the traffic channels.

Traffic Channel Demodulation

The demodulation algorithm previously described is applied individually to each of the traffic
channels to receive the transmitted data.

MATLAB Code implementation

Transmitter

1. Random data to be transmitted isgenerated.


2. FCCH and SCH channel are generated and then added to the randomdata.
3. The added data is then sent through Gaussianfilter.
4. The Gaussian pulse shaped data is given to the WiCOMM-T Tx interface block to send
through theWiCOMM-T.

Fig1. : Transmitter block diagram in MATLAB

Receiver

1. The samples are received from the WiCOMM-T Rx interfaceblock


2. Frequency offset of the received samples are estimated and thencorrected.
3. Identification of the SCH, FCCH channels and the burst data are done in the frequency offset
correctedsamples.
4. The phase offset is estimated andcorrected.
5. The phase offset corrected samples are convolved with the Matched filter to recover the
Burstdata.
6. BER is calculated for various values of SNR and is plotted against the theoreticalvalue.

Fig 2. : Receiver block diagram in MATLAB


Procedure

Note: Refer Appendix A on how to setup WiCOMM-T and Appendix B on how to generate the
modem samples, vary the parameters, transmit, receive and analyze the received modem samples
etc.

1. Connect WiCOMM-T in baseband loop back with the sampling rate set to2MBps.
2. Generate the transmitter modemsample.
3. Transmit and receive the modem sample through WiCOMM-T and analyse the received
modemsamples.
4. Observe various plots generated byMATLAB.
5. Connect WiCOMM-T in IF loop-back and repeat steps 2 to4
6. Connect 2 WiCOMM-Ts such that one as transmitter and other as receiver in baseband and
in IF and repeat steps 2 to4

Note: For running this experiment between two WiCOMM-Ts such that one will be transmitter
and other will be receiver, ‘bits.bin’, generated by transmitter Matlab file under ‘C:\WiCOMM-
T\EXPERIMENTS\GMSK\REF_Data’ directory should be copied to receiver ‘C:\WiCOMM-
T\EXPERIMENTS\GMSK\REF_Data’ directory since receiver Matlab code refers ‘bits.bin’ file
for synchronization & BER calculation.

Result:
Post Lab:
Explain GSM, CDMA and WiMAX Channel Models
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-10
Aim: To determine the freespace loss and the power received using Matlab program

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to free space loss

 Understanding of Matlab programming

Pre- Lab task:

1) Explain the meaning of free space loss.

2) What are the factors that contribute free space loss.

3) What do you mean by multipath signal?


In- Lab task:

Theory:

Theory:

The free space path loss, also known as FSPL is the loss in signal strength that occurs when an
electromagnetic wave travels over a line of sight path in free space. In these circumstances there
are no obstacles that might cause the signal to be reflected refracted, or that might cause
additional attenuation.

The free space path loss calculations only look at the loss of the path itself and do not contain
any factors relating to the transmitter power, antenna gains or the receiver sensitivity levels.

To understand the reasons for the free space path loss, it is possible to imagine a signal spreading
out from a transmitter. It will move away from the source spreading out in the form of a sphere.
As it does so, the surface area of the sphere increases. As this will follow the law of the
conservation of energy, as the surface area of the sphere increases, so the intensity of the signal
must decrease.

As a result of this it is found that the signal decreases in a way that is inversely proportional to
the square of the distance from the source of the radio signal

Free space path loss formula

The free space path loss formula or free space path loss equation is quite simple to use. Not only
is the path loss proportional to the square of the distance between the transmitter and receiver,
but the signal level is also proportional to the square of the frequency in use.

FSPL = (4πd/ λ)2 = (4πdf/ c)2

FSPL is the Free space path loss


d is the distance of the receiver from the transmitter (metres)
λ is the signal wavelength (metres)
f is the signal frequency (Hertz)
c is the speed of light in a vacuum (metres per second)

The free space path loss formula is applicable to situations where only the electromagnetic wave
is present, i.e. for far field situations. It does not hold true for near field situations.
Decibel version of free space path loss equation

Most RF comparisons and measurements are performed in decibels. This gives an easy and
consistent method to compare the signal levels present at various points. Accordingly it is very
convenient to express the free space path loss formula, FSPL, in terms of decibels..

FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.44

Where:
d is the distance of the receiver from the transmitter (km)
f is the signal frequency (MHz)

Affect of antenna gain on path loss equation

The equation above does not include any component for antenna gains. It is assumed that the
antenna gain is unity for both the transmitter. In reality, though, all antennas will have a certain
amount of gain and this will affect the overall affect. Any antenna gain will reduce the "loss"
when compared to a unity gain system. The figures for antenna gain are relative to an isotropic
source, i.e. an antenna that radiates equally in all directions.

FSPL (dB) = 20 log10 (d) + 20 log10 (f) + 32.44 -Gtx - Grx

Where:
Gtx is the gain of the transmitter antenna relative to an isotropic source (dBi)
Grx is the gain of the receiver antenna relative to an isotropic source (dBi)

The free space path loss equation or formula given above, is an essential tool that is required
when making calculations for radio and wireless systems either manually or within applications
such as wireless survey tools, etc. By using the free space path loss equation, it is possible to
determine the signal strengths that may be expected in many scenarios. While the free space path
loss formula is not fully applicable where there are other interactions, e.g. reflection, refraction,
etc as are present in most real life applications, the equation can nevertheless be used to give an
indication of what may be expected. It is obviously fully applicable to satellite systems where the
paths conform closely to the totally free space scenarios

Power Received :

[Pr] = [pt] + [Gt] + [Gr] – [FSPL]

Pr – Received power Pt – Transmitted power


Gt – Gain of the transmitting antenna Gr – Gain of the receiving antenna
Program:

close all
clear all
clc

f=input('enter the frequency in Mhz: ');


L=300/f; %calculating wavelength
disp('thus the wavelength is: ');
L %displaying wavelength
d=input('enter the distance in km: ');
Gt=input('enter the transmitting antenna gain in db: ');
Gr=input('enter the receiving antenna gain in db: ');
Wt=input('enter the transmitted power in db: ');
ls=32.44+20*log10(d)+20*log10(f);% path loss
disp(sprintf('%s %d %s','the path loss is:',ls,'db'));%displaying path loss
Wr=Wt+Gt+Gr-ls; %calculating recieved power in db
disp(sprintf('%s %d %s','the recieved power is:',Wr,'db'));
wr=10^(Wr/10); %calculating recieved power in watts
disp(sprintf('%s %d %s','the recieved power is:',wr,'watts')); %displaying recieved
power in watts

Results:
Post - Lab task:

1) Comment on the received power with respect to path loss of signal


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-11
Aim: To write a Matlab program to calculate the median path loss for Okumura model for outdoor propagation.

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to Okumura model

 Understanding of outdoor propogation

Pre- Lab task:

1) Explain Okumura model.

2) Explain different pathloss models you know

In lab- Lab task:

Theory:

The Okumura model for Urban Areas 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.

Coverage
Frequency = 150 MHz to 1920 MHz
Mobile Station Antenna Height: between 1 m and 10 m
Base station Antenna Height: between 30 m and 1000 m
Link distance: between 1 km and 100 km
Mathematical formulation

The Okumura model is formally expressed as:

L = LFSL + AMU – HMG – HBG – ∑ KCORRECTION

where,

L = The median path loss. Unit: Decibel (dB)


LFSL = The Free Space Loss. Unit: Decibel(dB)
AMU Median attenuation.Unit: Decibel(dB) HMG
= Mobile station antenna height gain factor. HBG
= Base station antenna height gain factor.
Kcorrection = Correction factor gain (such as type of environment, water surfaces, isolated obstacle
etc.)

Okumura model does not provide a mean to measure the Free space loss. However, any standard
method for calculating the free space loss can be used.

Program:
Result:

Post Lab:

1) Comment on the median pathloss obtained in this experiment.


DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-12
Aim: To write a Matlab program to calculate the median path loss for Hata model for outdoor propagation.

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to Hata model

 Understanding of outdoor propogation

Pre- Lab task:

3) Explain Hata model.

4) Explain the term path loss.

In lab- Lab task:

In wireless communication, the Hata Model for Urban Areas, also known as the Okumura-Hata
model for being a developed version of the Okumura Model, is the most widely used radio
frequency propagation model for predicting the behaviour of cellular transmissions in built up
areas. This 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.
This model also has two more varieties for transmission in Suburban Areas and Open Areas.

Hata Model predicts the total path loss along a link of terrestrial microwave or other type of
cellular communications.

This particular version of the Hata model is applicable to the radio propagation within urban
areas.

This model is suited for both point-to-point and broadcast transmissions and it is based on
extensive empirical measurements taken.

PCS is another extension of the Hata model. The Walfisch and Bertoni Model is further
advanced.

Coverage
Frequency: 150 MHz to 1500 MHz
Mobile Station Antenna Height: between 1 m and 10 m
Base station Antenna Height: between 30 m and 200 m
Link distance: between 1 km and 20 km.

In lab Task

Mathematical formulation
Hata Model for Urban Areas is formulated as:

LU = 69.55 + 26.16 log f – 13.82 log hB – CH + [ 44.9 – 6.55 log hB] log d.

For small or medium sized city,


CH = 0.8 + (1.1 log f – 0.7 ) hM – 1.56 log f.
and for large cities,

CH = 8.29 (log (1.54 hM))2 – 1.1 , if 150 ≤ f ≤ 200

CH = 3.2 (log (11.75 hM))2 – 4.97 , if 200 ≤ f ≤ 1500

Where,

LU = Path loss in Urban Areas (dB)


hB= Height of base station Antenna. (m)
hM = Height of mobile station Antenna. (m)
f= Frequency of Transmission (MHz).
CH = Antenna height correction factor
d= Distance between the base and mobile stations (km).

The term "small city" means a city where the mobile antenna height not more than 10 meters. i.e.
1 ≤ hM ≤ 10m
Program:

f=input('enter the frequency of transmisson in mhz:');


Hb=input('enter the height of base station Antenna in meter:');
Hm=input('enter the height of mobile station Antenna in meter:');
d=input('enter the distance between the base and mobile stations:');
n=input('enter 0 for small city and 1 for large city:');
close all
clear all
clc

if n==0
ch=0.8+(1.1*log10(f)-0.7)*Hm-1.56*log10(f);
else
if f>=150 && f<=200
ch=8.29*(log10(1.54*Hm))^.2-1.1;
else
if f>=200 && f<=1500
ch=3.2*(log10(11.75*Hm))^.2-4.97;
;

end;

Lu=69.55+26.26*log10(f)-13.82*log10(Hb)-ch+(44.9-6.55*log10(Hb))*log10(d);
disp(sprintf('%s %f %s','Path loss in Urban Areas=',Lu,'db'));

Result:
Post lab task:
Comment on the median path loss obtained for Hata model
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING COURSE CODE: 17EC3303

Experiment-13

Aim: To understand the basic aspects of DS-CDMA in single user case and two user case.

Date of the Session: / / Time of the Session: to

Prerequisite:

 Knowledge related to DS CDMA

Pre- Lab task:

1) Explain the working of DS-CDMA

2) Explain Rake reciever with respect to fadinf.


In Lab Task:

Software used: Matlab

Theory:
Why Spread Spectrum Technique?

Shannon’s formula for channel capacity is a relationship between achievable bit rate, signal
bandwidth and Signal to Noise Ratio (SNR).

Channel Capacity = Bandwidth*log2(1+SNR)

When the signal is much smaller than the noise or under very low SNR condition the above
relationship becomes much simpler as given below.

CMannel Capacity
=
1.44*SNR
BandwidtM
From the above relationship we can conclude that SNR can be traded for Bandwidth or vice
versa. If there is a way to encode our data into a large signal bandwidth, then error free
transmission is possible in a very low SNR condition. This is the reason why Spread Spectrum
technique is used.

Advantages of Spread Spectrum Technique

Ability to selectively address


If the signal is spread and encoded properly, then the signal can only be decoded by a receiver
which knows the transmitting code and hence a specific receiver in a group can be targeted. This
is termed as Code Division Multiple Access
Bandwidth Sharing
If the proper modulation codes are selected, it is feasible to have multiple pairs of receivers and
transmitters occupying the same bandwidth

Security

It is very difficult to intercept the signal if the modulation code of spread spectrum transmission
is not known. If the proper spreading code is not known to demodulate, the signal will be seen
as random electrical noise and not as useful signal. And also spread spectrum link puts out much
less power per bandwidth than a conventional radio link, having spreading it over a wider
bandwidth and hence a knowledge of the link’s spreading code is required to demodulate. Hence
it is very difficult to detect.

Immunity to Interference

If an external radio signal interferes with the spread spectrum signal, it will be rejected by the
demodulator much as random noise and hence provide excellent error rate even with faint
signals.

Direct Sequence Spread Spectrum

The Spread Spectrum technique can be divided into Direct Sequence Spread Spectrum (DSSS)
and Frequency Hopping Spread Spectrum (FHSS). In DSSS the Pseudo Random sequence is
applied directly to baseband data entering the carrier modulator. The modulator therefore sees a
much larger bit rate, which corresponds to the chip rate of the PN sequence. This code sequence
is typically Pseudo random binary code or PN specially chosen for desirable statistical
properties. In effect, we are transmitting a wideband noise like signal which contains embedded
message data.
Spreading codes

The spreading code or the PN sequence should be ideally balanced with equal number of ones
and zeros over the length of the sequence as well as cryptographically secure. Some of the most
popular PN sequences are Barker, M – Sequence, Gold and Walsh. More complex sequences
provide a more robust link but the implementation becomes very expensive. We have
Orthogonal spreading codes, Non-Orthogonal spreading codes and Mixed spreading codes.
Orthogonal codes are generated using Walsh-Hadamard series and the Non-orthogonal codes are
generated using Linear Feedback Shift Register (LFSR). The mixed codes are generated by
multiplying the orthogonal and non-orthogonal codes. The orthogonality property of the
orthogonal codes is very important for any communication system. Because of the orthogonality
property, two orthogonal signals can be transmitted at the same time and will not interfere with
each other. But the auto correlation function of the Walsh – Hadamard matrix can have more
than one peak and therefore it is not possible for the receiver to detect the beginning of code
word without an external synchronization scheme. Also the cross correlation can also be non-
zero for a number of time shifts and un-synchronous users can interfere with each other. The
spreading is not over the entire bandwidth instead it is over a number of discrete frequency
component. Orthogonality is affected by multi-path effect.
Gold sequences are popular for Non-orthogonal codes. Here the transmission can be
asynchronous. The receiver can synchronize using the auto correlation property of the Gold
Sequence.

Near - Far Problem

The main problem with CDMA is the Near-Far effect. Consider a receiver and two transmitters;
one close to the receiver; the other far away. If both transmitters transmit simultaneously and at
equal powers, then the receiver will receive more power from the nearer transmitter than the
farther transmitter. This makes the farther transmitter more difficult, if not impossible, to be
understood. Since the signal from one transmitter is the noise for the other transmitter, the
Signal-to-noise ratio (SNR) for the nearer transmitter is much higher. If the nearer
transmitter transmits a signal of higher power than the farther transmitter, then the
SNR for the farther transmitter may be below the detectable level and the farther
transmitter may look as if that it didn’t transmit at all. This effectively jams the
communication channel. In CDMA systems or other cellular phone-like networks, this
is commonly solved by dynamic output power adjustment of the transmitters by the
base stations.

This near-far problem is actually an uplink problem in reality. But in this experiment it
is assumed as a downlink problem for the ease of implementation. Single Base station
transmits the data at different powers to the two Users and thus the effect of one user
data on other user is studied. The constellation plots for the two users are provided for
ease of understanding of this phenomenon.
MATLAB Code Implementation

Transmitter

1. Random data to be transmitted for User1 and User2 are generated.


2. Random data of User1 and User2 are QAM modulated.
3. The QAM modulated User1 and User2 data are convolved with their
corresponding spreading codes.
4. The convolved data of User1 and User2 are RC pulse shaped.
5. Sync sequence is generated and inserted in pulse shaped User1 data.
6. The Pulse shaped data of User1 and User2 are multiplied with their corresponding
powers.
7. Two user data are added and then upsampled.
8. The upsampled data is then given to the WiCOMM-T Tx interface block to send
through the WiCOMM-T.

Receiver

1. The samples are received from the WiCOMM-T Rx interface block


2. The received samples are down sampled
3. The start of the frame information is found out using Schmildl & Cox.
Frequency offset in the down sampled signals are estimated using Schmidl Cox.
and the estimated offset is corrected.
4. These frequency offset corrected samples are de-spreaded using User1 and
User2 de- spreading codes
5. The phase offset in the de- spreaded data is estimated and corrected.
6. Then the residual frequency error is corrected by using LMS algorithm.
76
7. The residual frequency offset corrected data are QAM demodulated
8. BER is calculated for the QAM demodulated data

Result.

77
Post Lab Task:

Explain the working of DS-CDMA in detail.

78

You might also like