INDEX
S.No. Name of Experiment Date Sign
1 To Plot the power spectrum pattern of the Gaussian
Minimum Shift keying
2 Write a program to plot the attenuated signal pattern,
when the signal is propagated over a long distance (Km)
3 Write a program to Plot the different Pattern of Gaussian
Function by varying the standard deviation.
4 Write a program to plot different pattern of Rayleigh
function by varying the Rayleigh constant
5 Write a program to plot the Doppler fading power
spectrum pattern & compare the result by varying the
Doppler frequency shift.
6 To find the output of convolution encoder & decoder
7 To Plot the power spectrum pattern of the
Gaussian frequency shift keying.
8 To Plot the power spectrum pattern of the Minimum
Shift keying
It is hereby certified that …………………………………………, student of M.tech(ECE), Final
year, Roll No……………………………….has performed all the above experiments
successfully.
(Assoc. Prof. Alka Kalra)Teacher Incharge
Experiment No. – 1
Aim:- To Plot the power spectrum pattern of the Gaussian Minimum Shift keying.
Theory:
GMSK modulation is based on MSK, which is itself a form of phase shift keying. One of
the problems with standard forms of PSK is that sidebands extend out from the carrier.
To overcome this, MSK and its derivative GMSK can be used.
MSK and also GMSK modulation are known as a continuous phase scheme. It means
there are no phase discontinuities in MSK and GMSK. This arises as a result of the
unique factor of MSK that the frequency difference between the logical one and logical
zero states is always equal to half the data rate. This can be expressed in terms of the
modulation index, and it is always equal to 0.5.
Figure : Signal using MSK modulation
In GMSK ,the sidelobe levels of the spectrum are further reduced by passing the
modulating signal through a low pass filter prior to applying it to the carrier. The
requirements for the filter are that it should have a sharp cut-off, narrow bandwidth. The
ideal filter is known as a Gaussian filter which has a Gaussian shaped response to an
impulse.
Figure : Spectral density of MSK and GMSK signals
Generating GMSK modulation
One of the way in which GMSK modulation can be done is to filter the modulating
signal using a Gaussian filter and then apply this to a frequency modulator where the
modulation index is set to 0.5. This method is very simple and straightforward but it has
the drawback that the modulation index must exactly equal 0.5. In practice this method is
not suitable because component tolerances drift and cannot be set exactly.
Figure : Generating GMSK using a Gaussian filter and VCO
Block Diagram
GMSK filter may be completely defined from the 3 dB baseband bandwidth, B and
baseband symbol duration,T. It is therefore customary to define GMSK by its BT
product. As the BT product decreases, the sidelobe levels falls off very rapidly. However
reducing BT increases the error rate produced by filter due to intersymbol interference.
Experiment No. – 2
Aim :- Write a program to plot the attenuated signal pattern, when the signal is propagated
over a long distance (Km)
Theory:- Free-space path loss (FSPL) is the loss in signal strength of an electromagnetic wave
that would result from a line-of-sight path through free space, with no obstacles
nearby to cause reflection or diffraction. It does not include factors such as the gain of
the antennas used at the transmitter and receiver, nor any loss associated with
hardware imperfections.
To understand the reasons for the free space path loss, it is convenient to imagine a
signal spreading out from a transmitter. The signal 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. According to law of conservation of energy, as the surface area of the
sphere increases, so the strength of the signal must decrease. As a result of this it is
found that the signal strength decreases in a way that is inversely proportional to the
square of the distance from the source of the radio signal.
Pr(d) =
Pt = Transmitted Power
Pr= Received Power
L= System Loss Factor not related to propagation (L1)
= wavelength in meters
Gain of an Antenna
Where Ae = effective Aperture.
Program
% To plot the Attenuated signal Pattern
pt=50; % transmitted power in watt
Gt=1; % gain of transmitter
Gr=1; % gain of receiver
λ =.6; % wavelength
l=1; % loss factor
d=10:10:100; % distance between transmitter and receiver
pr(d)=(pt*Gt*Gr*( λ )^2)./((4*pi)^2*(d).^2); % Received power in watt
subplot(2,1,1);
plot(d,pr(d));
xlabel(‘Distance between Transmitter and Receiver’);
ylabel(‘Received power in Watt’);
title(‘Attenuated signal Pattern’)
Experiment No. – 3
Aim :- Write a program to Plot the different Pattern of Gaussian Function by varying the
standard deviation.
Theory: A Gaussian function, or distribution, has the form:
where σ is the standard deviation, and μ is the x-offset of the Gaussian function from
zero.
Gaussian functions approximate the shapes of many observables in astronomy, such as
the profiles of seeing disks, the width of spectral lines, and the distribution of noise in
radio receivers. In error analysis, the Gaussian function is often used to determine the
significance of a measurement. Astronomers like to talk about whether a result is 2-σ, or
3-σ etc. This refers to the likelihood that an experimental result is a certain number of
standard deviations from the measured value. 67% of all results are within 1-σ of the
mean whereas 95.4% of within 2-σ and 99.7% with 3-σ. Thus a 1-σ result is 33% likely
to be due to random fluctuations, whereas a 3-σ result is very secure. The Gaussian
distribution is sometimes called the "normal distribution ".
Program
clear all
% To Plot the different Pattern of Gaussian Function by varying the standard deviation.
n=[1 2 3 4 5];
j=1;
for i=1:5
for x=-25:0.1:25;
X(j,1)=x;
Y(j,i)=(exp((-x.^2)./(2*(n(i)).^2)))./(sqrt(2*pi.*(n(i)).^2));
j=j+1;
end
end
plot(X,Y,'linewidth',2);
grid on
legend('\sigma= 1','\sigma = 2','\sigma = 3','\sigma = 4','\sigma = 5',5);
xlabel('x')
ylabel('F(x)')
AS the value of standard deviation increases, Gaussian PDF decreases. Gaussian PDF has
peak at the point where random variable has its value equal to its mean.
Experiment No. – 4
Aim :- Write a program to plot different pattern of Rayleigh function by varying the Rayleigh
constant
Theory:-
Rayleigh fading is a model that can be used to describe the form of fading that occurs
when multipath propagation exists. In built-up urban areas, fading occurs because the
height of the mobile antennas are well below the height of surrounding structures, so
there is no single line-of-sight path to the base station. Even when a line of sight path
exists, multipath still occur due to reflections from the ground and surrounding structures.
Also there is often movement of the transmitter or the receiver and it can cause the path
lengths to change and accordingly the signal level will vary.
The incoming radio waves arrive at receiver from different directions with different
propagation delays. The composite signal at the receiver is a combination of all the
signals that have reached the receiver via the multitude of different paths that are
available. The resultant signal will depend upon the phase of different individual
multipath signals. Dependent upon the way in which these multipath signals sum
together, the resultant signal will vary in strength. If the former are all in phase with each
other, they would all add together. However this is not normally the case, as some will be
in phase and others out of phase, depending upon the various path lengths, and therefore
some will tend to add to the overall signal, whereas others will subtract.
Rayleigh distribution
It is a continuous probability distribution. A Rayleigh distribution is often observed
when the overall magnitude of a vector is related to its directional components. One
example where the Rayleigh distribution naturally arises is when wind speed is analyzed
into its orthogonal 2-dimensional vector components. Assuming that the magnitude of
each component is uncorrelated and normally distributed with equal variance, and then
the overall wind speed (vector magnitude) will be characterized by a Rayleigh
distribution.
FORMULAE:
The Rayleigh probability density function is
and Rayleigh cumulative distribution function
for and parameter σ.
Program
%Rayleigh Function
close all
clear all
N = 100;
x = randn(1,N); % gaussian random variable, mean 0, variance 1
y = randn(1,N); % gaussian random variable, mean 0, variance 1
z = (x + j*y); % complex random variable
% probability density function of abs(z)
r = [0:0.01:7];
sigma2 = 1;
pzTheory = (r/sigma2).*exp(-(r.^2)/(2*sigma2)); % theory
plot(r,pzTheory,'b.-')
xlabel('z');
ylabel('probability density, p(z)');
title('Probability density function of Rayleigh distribution' )
axis([0 7 0 0.7]);
grid on
figure(2)
%%calculate power of rayleigh channel
h = 1/sqrt(2)*(randn(1,N) + j*randn(1,N)) % rayleigh random variable
hP = h.*conj(h); % finding the power
hist(hP) % plotting the histogram
xlabel('z'); ylabel('CDF(z)');
title(' Rayleigh cumulative distribution function ' )
0 1 2 3 4 5 6 70
0.1
0.2
0.3
0.4
0.5
0.6
z
prob
abili
ty d
ensi
ty, p
(z)
Probability density function of Rayleigh function
Experiment No. – 5
Aim :- Write a program to plot the Doppler fading power spectrum pattern & compare the
result by varying the Doppler frequency shift.
Theory:-
To mitigate the effects of multipath interference, which prevail in mobile wireless
communication systems, directional antennas may be used at one or both ends of the
radio link . A good understanding of the channel behaviors is essential for evaluating and
analyzing the performance of the systems employing directional antennas. The Doppler
power spectral density is the key parameter in the description of mobile radio channel
The Doppler power spectral density of a fading channel describes how much spectral
broadening it causes. This shows how a pure frequency e.g. a pure sinusoid, which is an
impulse in the frequency domain is spread out across frequency when it passes through
the channel. It is the Fourier transform of the time-autocorrelation function. For Rayleigh
fading with a vertical receive antenna with equal sensitivity in all directions, power
spectral density has been shown as
Where v is the frequency shift relative to the carrier frequency. This spectrum is shown
in the figure for a maximum Doppler shift of 10 Hz. The 'bowl shape' or 'bathtub shape' is
the classic form of this Doppler spectrum.
Program
clc;
clear all;
%10Hz max doppler.
v=-9.9:0.1:9.9;
fd=10;
jakes_psd=1./(pi*fd*sqrt(1-(v./fd).^2));
plot(v,jakes_psd);
xlabel('Frequency -Hz');
ylabel('Power Spectral Density - watts/Hz');
title('Doppler Frequency spectrum');
Experiment No. – 6
Aim :- To find the output of convolution encoder & decoder
Theory
In telecommunication, a convolutional code is a type of error-correcting code in which
each m-bit information symbol (each m-bit string) to be encoded is transformed into
an n-bit symbol, where m/n is the code rate (n ≥ m) and
the transformation is a function of the last k information symbols, where k is the
constraint length of the code.
Convolutional codes are used extensively in numerous applications in order to achieve
reliable data transfer, including digital video, radio, mobile communication, and satellite
communication. These codes are often implemented in concatenation with a hard-
decision code, particularly Reed Solomon. Prior to turbo codes, such constructions were
the most efficient, coming closest to the Shannon limit.
convolutional encoding
To convolutionally encode data, start with k memory registers, each holding 1 input bit.
Unless otherwise specified, all memory registers start with a value of 0. The encoder
has n modulo-2 adders (a modulo 2 adder can be implemented with a
single Boolean XOR gate, where the logic is: 0+0 = 0, 0+1 = 1, 1+0 = 1, 1+1 = 0),
and n generator polynomials — one for each adder (see figure below). An input bit m1 is
fed into the leftmost register. Using the generator polynomials and the existing values in
the remaining registers, the encoder outputs n bits. Now bit shift all register values to the
right (m1 moves to m0, m0 moves to m-1) and wait for the next input bit. If there are no
remaining input bits, the encoder continues output until all registers have returned to the
zero state.
The figure below is a rate 1/3 (m/n) encoder with constraint length (k) of 3. Generator
polynomials are G1 = (1,1,1), G2 = (0,1,1), and G3 = (1,0,1). Therefore, output bits are
calculated (modulo 2) as follows:
n1 = m1 + m0 + m-1
n2 = m0 + m-1
n3 = m1 + m-1.
Figure: Convolution encoder
Trellis decoding of convolution codes
To implement the decoding of convolution codes is trellis decoding which involves the
use of a trellis, which is a time-indexed graph that represents a given linear code. More
formally, a trellis T = (V, E) of depth n is a finite, directed, edge-labeled graph with the
following properties:
1. Each vertex v V has an associated depth dv {0, 1, 2, 3,...n}.
2. Each edge e E connects a vertex at depth i to a vertex at depth i + 1, for some i.3. There is one vertex, called the root, at depth 0 and one vertex, called the toor, at
depth n.A trellis for a code establishes a one-to-one correspondence between code words and
paths from the root to the toor. One may consider a trellis to be a definite finite
automaton with one start state and one finish state and no loops, so that a code
represented by the trellis is precisely the language of the trellis.
Figure : A trellis for the linear code. Solid lines represent transition on 1 bits and dashed
lines represent transitions on 0 bits.
Given a received, possibly error-corrupted word, we may associate bit-error probabilities with
weights on each edge in the trellis so that the problem of maximum-likelihood decoding reduces to
the problem of finding the minimum-weight path from the root to the toor in the trellis.
Program
%% convolution encoder
close all;
clear all;
%input_bit_num is the number of bits entering
%the memory register of encoder at one time
input_bit_num=1;
% g is the generator matrix of the convolution code
%determine the output sequence of a binary convolution code
%with no rows at p*input_bit_num colomns,its row are
%g1,g2........gn
g=[1 0 1;1 1 1;];
%input the binary input sequence
input=[1 0 1 1 1 0 0];
n=length(input)/input_bit_num;
%determine p and no
p=size(g,2)/input_bit_num;
no=size(g,1);
%add extra zeros
encd_seq=[zeros(1,2),input,zeros(1,2)];
%generate uu,a matrix whose colomns are the contents of
%convolution encoder at various clock pulses
u1=encd_seq(p*input_bit_num:-1:1);
for i=1:n+p-2
u1=[u1,encd_seq((i+p)*input_bit_num:-1:i*input_bit_num+1)];
end
uu=reshape(u1,p*input_bit_num,n+p-1);
%dtermine the output
output=reshape(rem(g*uu,2),1,no*(p+n-1))
Input
1 0 1 1 1 0 0
output
1 1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 0 0
%Convolution decoder
clear all;
close all;
u=[1 0 1 1 1 0 0 ];trellis=poly2trellis(3,[5 7]);
codeword=convenc(u,trellis)
msg=vitdec(codeword,trellis,5,'term','hard')
codeword =
1 1 0 1 0 0 1 0 0 1 1 0 1 1
msg =
1 0 1 1 1 0 0
Experiment No. – 7
Aim :- To Plot the power spectrum pattern of the Gaussian frequency shift keying.
Theory:-
Gaussian Frequency-Shift Keying (GFSK) is a type of Frequency Shift
Keying modulation that uses a Gaussian filter to smooth positive/negative frequency
deviations, which represent a binary 1 or 0.
In a GFSK modulator, everything is same as an FSK modulator except that before
the baseband pulses (-1, 1) go into the FSK modulator, they are passed through Gaussian
filter to make the pulse smoother so as to limit its spectral width. Gaussian filtering is
one of the very standard ways for reducing the spectral width and it is known as "pulse
shaping".
If we use -1 for fc − fd and 1 for fc + fd, once when we jump from -1 to 1 or 1 to -1, the
modulated waveform changes rapidly, which introduces large out-of-band spectrum. If
we change the pulse going from -1 to 1 as -1, -.98, -.93 ..... .96, .99, 1, and we use this
smoother pulse to modulate the carrier, the out-of-band spectrum will be reduced
BT = 0.3
BT = 0.3
BT = 0.5
Thus increasing the BT product results into reduction of sidelobes but at the same time width of
main lobe increases reuting into poor spectral efficiency.
BT = 0.5
Experiment No. – 8
Aim :- To Plot the power spectrum pattern of the Minimum Shift keying.
Theory:-
One of the problems with standard forms of PSK is that sidebands extend out from the
carrier. To overcome this, MSK can be used. MSK is known as a continuous phase
scheme. It means there are no phase discontinuities in MSK.. This arises as a result of the
unique factor of MSK that the frequency difference between the logical one and logical
zero states is always equal to half the data rate. This can be expressed in terms of the
modulation index, and it is always equal to 0.5.
Figure : Signal using MSK modulation
MSK is a special type of continuous phase shift keying (CPFSK) where the peak
frequency deviation is equal to ¼ the bit rate. In the other words, MSK is CPFSK with a
modulation index of 0.5. The modulation index of an PSK signal is similar to FM
modulation index.
KFSK = 2Δf / Rb
Where Δf is peak frequency deviation and Rb is bit rate
A modulation index of 0.5 corresponds to the minimum frequency spacing that allows
two FSK signals to be coherently orthogonal or MSK implies the minimum frequency
spectrum (i.e. bandwidth) that allows orthogonal detection.
MSK is spectrally efficient modulation scheme and is particularly attractive for use in
mobile radio channel communication software. It posses properties such as constant
envelope, spectral efficiency, good BER performance.
Block Diagram
MSK spectrum has lower sidelobes than Quadrature Phase Shift Keying and Offset QPSK. Main
lobe of MSK is wider than that of QPSK and hence when compared in terms of first null
bandwidth, MSK is less spectrally efficient than QPSK and OQPSK. Continuous phase property
of MSK results into simple demodulation circuits.