WC Lab Mannual
WC Lab Mannual
WC Lab Mannual
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
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
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.
Prerequisite:
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
Experiment-2
Aim: Analyze the power received at the receiver w.r.t to the distance for different path loss exponents.
Prerequisite:
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.
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..
Where: d is the distance of the receiver from the transmitter (km) f is the signal frequency (MHz)
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.
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:
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
Prerequisite:
Working of Equalizer.
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.
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:
Experiment-4
Aim: Performance analysis of SISO and SIMO using equal gain combining method
Prerequisite:
In Lab Task:
Software used: Matlab
therefore the different forms of single / multiple antenna links are defined as below:
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.
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.
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
Prerequisite:
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)
𝑠 𝑁
Algorithm:
Observations:
Result:
Post Lab
Experiment-6
Aim: Performance Analysis of Various Modulation Techniques in Rayleigh and Rician Wireless Channel
Models
Prerequisite:
4) What is the difference between Rayleigh and Rician Wireless Channel Models
In lab Task:
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.
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.
Prerequisite:
In lab Task:
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
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.
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
Transmitter
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
Procedure
The following are the default values used for this experiment.
Transmitter
WiCOMM-Tsamplingrate = 2MBps
Roll-offfactor(alpha) = 0.65
upsample_facto = 8
Receiver
WiCOMM-Tsamplingrate = 2MBps
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
Post Lab:
Experiment-8
Aim: To observe the BER performance of DS-CDMA using mixed codes in multipath channel
using RAKE receiver for single user case.
Prerequisite:
1) 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.
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
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
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.
Experiment-9
Aim: To study Gaussian Minimum Shift Keying (GMSK) modulation technique
Prerequisite:
1) What is Multipath?
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)
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.
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.
The demodulation algorithm previously described is applied individually to each of the traffic
channels to receive the transmitted data.
Transmitter
Receiver
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
Prerequisite:
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
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.
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..
Where:
d is the distance of the receiver from the transmitter (km)
f is the signal frequency (MHz)
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.
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 :
close all
clear all
clc
Results:
Post - Lab task:
Experiment-11
Aim: To write a Matlab program to calculate the median path loss for Okumura model for outdoor propagation.
Prerequisite:
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
where,
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:
Experiment-12
Aim: To write a Matlab program to calculate the median path loss for Hata model for outdoor propagation.
Prerequisite:
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.
Where,
The term "small city" means a city where the mobile antenna height not more than 10 meters. i.e.
1 ≤ hM ≤ 10m
Program:
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.
Prerequisite:
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).
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.
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.
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.
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
Receiver
Result.
77
Post Lab Task:
78