A9 Exp5

You might also like

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

Experiment - 5

Group: A9
10-10-2022

Group Members Roll No. Email ID

Chanda Vamshi B191231EC chandavamshi_b191231ec@nitc.ac.in


Vardhan

Chandra Sekhar Kanuru B190470EC chandrasekhar_b190470ec@nitc.ac.in

Claret Thanikkal B191031EC claret_b191031ec@nitc.ac.in

Dadireddy Jahnavi B190181EC jahnavi_b190181ec@nitc.ac.in

David Joy B190825EC david_b190825ec@nitc.ac.in

a) Objective:

1. To characterize the ISI by transmitting PAM signal through a bandwidth-limited


channel.

2. To design a transmitting signal/pulse (i.e. pulse shaping) for zero-ISI.

b) Theoretical Background
Block Diagram:
Bandwidth limited channel:
The transmission channel is restricted to a finite bandwidth. All practical channels are
band-limited. Engineers limit the bandwidth of signals to enable multiple signals to share the
same channel with minimal interference.

Pulse Amplitude Modulation(PAM)


The transmission of data by altering the amplitudes (voltage or power levels) of individual
pulses in a regularly timed series of electrical or electromagnetic pulses is known as pulse
amplitude modulation (PAM).
Inter-Symbol Interference(ISI)
Bandwidth-limited channels suppress higher-frequency components of a signal, increasing
waveform rise and fall periods and extending the duration of each symbol. Each signal lasts
for the duration of the symbols that follow it. This means that each symbol has a chance of
interfering with later-transmitted symbols. This type of interference is known as inter-symbol
interference (ISI). ISI is often generated by multipath propagation or a communication
channel's inherent linear or nonlinear frequency response, which causes subsequent signals
to merge together.

Ways to avoid ISI


Some ways Inter-Symbol Interference can be avoided are:
● Symbols should be separated in time by guard intervals.
● By applying an equalization at the receiver, which, in general, seeks to reverse the
impact of the channel by using an inverse filter.
● At the receiver, use a sequence detector to estimate the sequence of transmitted
symbols using the Viterbi algorithm.
● Create systems with impulse responses that are brief enough that relatively little
energy from one symbol spreads onto the next.
Nyquist rule to avoid ISI
Consider a system that transmits symbols in the form of (infinitely-)short pulses
("impulses"). A low-pass channel will restrict the pulses' rising time, causing the impulses to
be spread out in time. The impulses will not interfere with each other if the channel's
reaction to these impulses crosses zero at multiples of the symbol period. This is known as
the Nyquist no-ISI criteria. So, the response h[n] should satisfy the following condition in the
time domain:

The above condition is represented in the continuous domain as follows:

An example of an impulse response that meets this criterion is the sinc() function:

which has a value of 1 at t = and 0 at multiples of T.


It is feasible to calculate the channel's frequency-domain transfer function characteristics
that result in no ISI. This condition is that the channel frequency response has odd symmetry
around half of the symbol frequency:

Both the real and imaginary parts of H(f) need to have this symmetry. We often have limited
control over the impulse response or transfer function of the channel and must apply
filtering at the transmit or receive sides of the channel to fulfill the Nyquist criterion.

Pulse-Shaping Filter:
It should be noted that the Nyquist no-ISI criterion applies to a channel that produces no ISI
for impulses rather than the square pulses that are typically used. Because actual systems do
not transmit impulses, the Nyquist criteria cannot be directly applied to the physical
channel. Instead, suppose the transmitter has a hypothetical filter that transforms impulses
into pulses before sending them across the channel. When calculating the channel ISI, the
response of this (im)pulse-shaping filter must be considered. The Nyquist criterion must be
met by the combination of this impulse-shaping filter and the channel.
Eye-diagram:

Low-Pass FIlter:

c) Pseudocode:

clear screen and cache

generate a rectangular pulse with duration of bit interval


loop from 1 to bit interval
store 1 in interval
end loop

plot bit pulse in time domain


compute fft of bit-pulse
plot absolute value of bit pulse in fourier domain after shifting to 0
generate finite length binary signal

loop from 1 to length of binary signal


if(binary signal element is 1)
pam stores 1 in size of the pulse length
else
pam stores 0 in size of the pulse length
end loop

plot the PAM signal in time domain


compute fft of the pam signal
plot the fourier transform of absolute value of PAM signal
define parameters of the window function

generate the blackman window function


generate sinc pulse for ideal low pass filter
multiply the sinc pulse and blackman window function to get FIR low pass filter

plot the time domain response of channel


plot the frequency response of the channel

convolute the bit pulse and the channel function


compute the frequency domain response of the convoluted function

plot channel response of the bit pulse in time domain


plot the fft of the absolute value of channel response

compute the convolution of the channel function and the pam signal
normalise the channel output with respect to maximum magnitude
plot the channel output of the PAM signal in the time domain
plot the absolute value of fft of channel output of the PAM

loop from 1 to length(binary signal)-1


plot the pam input signal superimposed on the channel output of pam signal
plot the section of the input pam signal and channel output for a bit interval duration
superimpose all the sections on the previous plot for eye diagram.
end loop

d) Results with explanation:


Rectangular 1-bit pulse along with its frequency domain representation:

● Above plots shows the graphical description of the 1-bit pulse which follows the
following property.

Where T is the bit interval.


● The second subplot describes the frequency representation of the 1-bit pulse. We
know that the FT of a rectangular pulse is a sinc pulse and the above depicts the
same.

Channel output of the Rectangular 1-bit pulse along with its frequency domain
representation:

● Above plots shows the graphical description of the output of the 1-bit pulse after
passing through a band-limited channel. The first subplot shows the time domain.
Since the channel is bandlimited, we know the rectangular pulse will be distorted
when passed through it. The above depicts the same.
● The second subplot shows the frequency domain representation of the channel
output. We can observe that the low ripples in the sinc pulse are attenuated due to
the band-limiting nature of the channel.
Binary input coded as PAM signal using 1-bit pulse along with its frequency response:

● Above plots depicts the time domain and the frequency domain representation of
the following input sequence.
x = [1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1]
Frequency response of the channel along with its time domain representation:

● Above plots show the frequency response and time domain representation of the
channel.
● To design the channel we first took the ideal sinc function and applied the window
function(Blackman Window) to truncate the pulse and obtain an FIR filter.
● We took the cut-off frequency of the channel as 1/T.
Channel output of the PAM signal along with its frequency response:

● Above plots depict the output of the channel of the PAM signal. We can observe that
the pulse received is distorted when compared with the transmitted pulse.
● We can also observe from the second subplot that the lower ripples are attenuated
when passed through the channel.
Eye-diagram:

e) Conclusion:
● We have designed a transmitted pulse to transmit the input data over a bandlimited
channel and observed the channel output for the transmitting pulse is a distorted
pulse due to the band-limiting nature of the channel.
● We have transmitted the PAM signal through the channel and observed if the cut-off
frequency of the channel(W) is less than 1/T(bit interval) we can observe more ISI. If
the cut-off frequency is greater than 1/T then there is less distortion.
● We can observe from the Eye-diagram that for larger ISI the eye closes reducing the
noise margins.

f) Appendix:
Code:
clc;

close all;

%defining the bit pulse

Tb = 0.0001;

fs = 100000;
t = 0:1/fs:Tb-(1/fs);

p_t = zeros(1,10*length(t));

pt0 = zeros(1,length(t));

t1 = 1:1:10*length(t);

for n=1:1:length(t)

p_t(n) = 1;

end

figure(1);

subplot(2,1,1);

plot(t1,p_t);

title('1-bit pulse');

P_f = fft(p_t);

subplot(2,1,2);

plot(fftshift(abs(P_f)));

title('Frequency response of 1-bit pulse');

%PAM generation

x = [1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1];

pam_x = [];

for i=1:1:length(x)

if(x(i)==1)

pam_x =[pam_x p_t(1:length(t))];

else

pam_x =[pam_x pt0];

end

end

X_f = fft(pam_x);

figure(2);

subplot(2,1,1);

plot(pam_x);

title('PAM signal of the binary data');

subplot(2,1,2);

plot(fftshift(abs(X_f)));

title('Frequency response of PAM signal');

%Defining the channel

fc = 1/Tb;

wc = 2*pi*(fc/fs);
N = 301;

M = N-1;

t1 = M/2;

n = 0:M;

%Blackman window function

W = 0.42 -0.5*(cos((2*pi*n)./M))+0.08*(cos((4*pi*n)./M));

h = sin(wc*(n-t1))./(pi*(n-t1));

h(t1+1) = wc/pi;

hd = h.*W;

h_f = fft(hd);

d = -1:2/length(h_f):(1-2/length(h_f));

figure(3);

subplot(2,1,1);

plot(d,fftshift(abs(h_f)));

title('Frequency response of Channel');

xlabel('Normalized(*pi)--->');

subplot(2,1,2);

plot(hd);

title('Impulse response of the channel');

%1-bit response

ypt = conv(p_t,hd);

ypt_f = fft(ypt);

figure(4);

subplot(2,1,1);

plot(ypt);

title('Channel output of the 1-bit pulse');

subplot(2,1,2);

plot(fftshift(abs(ypt_f)));

title('Channel frequency response of the 1-bit pulse');

%input response

yt = conv(pam_x,hd);

ryt = yt./max(yt);

yt_f = fft(yt);

figure(5);

subplot(2,1,1);

plot(ryt);

title('Channel output of the PAM signal');


subplot(2,1,2);

plot(fftshift(abs(yt_f)));

title('Channel frequency response of the PAM signal');

%eye diagram

figure(6);

plot(pam_x(1:length(t)));

title('Eye diagram');

hold on

plot(ryt(1:length(t)),'b');

for i=1:1:(length(x))-1

plot(pam_x((i*length(t))+1:(i+1)*length(t)),'r');

plot(ryt((i*length(t))+1:(i+1)*length(t)),'b');

end

hold off

legend('PAM signal','Ideal signal');

You might also like