You are on page 1of 11

Experiment Title.

Student Name: Pritish Polley UID: 20BEC1075


Branch: ECE Section/Group : B
Semester: 4th Date of Performance: 23/03/22
Subject Name: Analog and Communication
Subject Code:

1. Aim/Overview of the practical:

To implement the circuit of PAM, PWM and PPM modulator & Demodulator and study
their response on various pulses for modulating signal input of 1 KHz to 2 KHz and pulse
output of 8 KHz to 64 KHz.

2. Task to be done:

3. Apparatus(For applied/experimental sciences/materials based labs): Mathlab installed in PC


THEORY:

THEORY

Pulse Amplitude Modulation -

In Pulse Amplitude Modulation message information is encoded in the amplitude of a


series of signal pulses. It is an analog pulse modulation scheme in which the amplitude
of train of carrier pulse are varied according to the sample value of the message signal. A
train of very short pulses of constant amplitude and fast repetition rate is chosen the
amplitude of these pulse is made to vary in accordance with that of a slower modulating
signal the result is that of multiplying the train by the modulating signal the envelope of
the pulse height corresponds to the modulating wave .the Pam wave contain upper and
lower side band frequencies besides the modulating and pulse signals. The demodulated
PAM waves, the signal is passed through a low pass filter having a cut –off frequencies
equal to the highest frequency in the modulating signal. At the output of the filter is
available the modulating signal along with the DC component. PAM has the same signal
to noise ratio as AM. In PAM natural sampling, the pulse has varying top in accordance
with signal variation. When these pulses are received at the receiver, it is always
contaminated by noise. Then it becomes difficult to determine the shape of the top of
the pulse and thus amplitude detection of the pulse is not accurate. Natural sampling
uses chopping principle. This method is used practically if it satisfies Nyquist criteria. In
this noise interference is minimum 

Pulse Width Modulation

Pulse Width Modulation (PWM) is a form of pulse modulation where the width of the
pulses in a carrier pulse train is made proportional to the instantaneous amplitude of the
modulating signal. A pulse width modulator circuit made up of 555 Timer is shown in
figure. Here the 555 timer is working in monostable mode. A negative trigger pulse at pin
2 sets the output. The modulating signal is applied to the control pin of the 555 which
varies the threshold voltage. This in turn varies the charging time of capacitor C2 and
makes the trailing edge of the output pulse proportional to the modulating signal. Thus
the leading edge of the output pulse is decided by the trigger pulse which occurs
periodically and the trailing edge is proportional to the amplitude of the modulating
signal. The resulting output will be pulse width modulated. The pulse width demodulator
circuit consists of an integrator and a low pass filter with a cut off frequency of 100Hz.
The integrator reconstructs the modulating signal which is further smoothened by the
low pass filter. The series capacitor eliminates the dc component from the demodulated
signal. 

Pulse Position Modulation

Pulse Position Modulation (PPM) is one of the pulse modulation schemes where the
relative position of the pulses in a carrier pulse train is made proportional to the
instantaneous value of the modulating signal. A pulse position modulator made up of IC
555 is shown in figure. Both the 555s are working in monostable mode. The first
monostable generates a PWM signal and this PWM output is used as the trigger input of
the second monostable. Since the monostable triggers at the trailing edge of the PWM
signal, the position of the resulting pulses will have position shift compared to the input
pulse train. The PPM demodulator is set up using an Op Amp SR flip flop, an integrator
and a low pass filter. The flip flop is set by the carrier pulses and reset by the PPM pulses.
The resulting output is a PWM signal. This PWM signal is then demodulated using the
integrator-low pass filter combination. 

CODE

PPM:
clc;

close all;

a = input('Enter the amplitude = ');

f = input('Enter the frequency = 1');

t = 0:0.02:2;
x1 = 1; %generation of an impulse signal

x2 = a*sin(2*pi*f*t); %generation of sine wave

y = x1.*x2; %modulation step

subplot(3,1,1); %for impulse signal plot

stem(x1);

title('Impulse Signal');

xlabel('Time');

ylabel('Amplitude ');

subplot(3,1,2) %for sine wave plot

plot(t,x2);

title('Sine Wave');

xlabel('Time ');

ylabel('Amplitude ');

subplot(3,1,3) %for PAM wave plot

stem(t,y);

title('PAM Wave');

xlabel('Time');

ylabel('Amplitude');

clc;

close all;

t=0:0.0001:1;
s=sawtooth(2*pi*10*t+pi);

m=0.75*sin(2*pi*1*t);

n=length(s);

for i=1:n

if (m(i)>=s(i))

pwm(i)=1;

elseif (m(i)<=s(i))

pwm(i)=0;

end

end

plot(t,pwm,'g',t,m,'r',t,s,'b');

ylabel('Amplitude');

axis([0 1 -1.5 1.5]);

xlabel('Time index');

title('PWM Wave');

grid on;

clc;

clear all;

close all;

fc=1000;

fs=10000;

fm=200;

t=0:1/fs:((2/fm)-(1/fs));

X= 0.5*cos(2*pi*fm*t)+0.5;

Y= modulate(X,fc,fs,'PPM');
subplot(2,2,1);

plot(X);

title('Msg Signal');

subplot(2,2,2);

plot(Y);

axis([0 500 -0.2 1.2]);

title('PPM');

PPM:

clc;
close all;
clear all;
a = input('Enter the amplitude = ');
f = input('Enter the frequency = ');
t = 0:0.02:2; % for a total of 16 samples
x1 = 1; %generation of an impulse signal
x2 = a*sin(2*pi*f*t); %generation of sine wave
y = x1.*x2; %modulation step
subplot(3,1,1); %for impulse signal plot

stem(x1);
title('Impulse Signal');
xlabel('Time');
ylabel('Amplitude ');
subplot(3,1,2) %for sine wave plot

plot(t,x2);
title('Sine Wave');
xlabel('Time ');
ylabel('Amplitude ');

subplot(3,1,3) %for PAM wave plot


stem(t,y);
title('PAM Wave');
xlabel('Time');
ylabel('Amplitude');

PWM
fs=input('Comparator Sawtooth frequency:');
fm=input('Message frequency(Assuming it to be a sine wave):');
a=input('Enter Amplitude of Message:');

t=0:0.0001:1; %sampling rate of 10kHz

stooth=1.01*a.*sawtooth(2*pi*fs*t); %generating a sawtooth wave


%to make the two non zero lobes of pwm not to overlap the amplitude of
%sawtooth wave must be atleast more than a bit to the message amplitude

subplot(3,1,1);
plot(t,stooth); % plotting the sawtooth wave
title('Comparator Wave');

msg=a.*sin(2*pi*fm*t); %generating message wave

subplot(3,1,2);
plot(t,msg); %plotting the sine message wave
title('Message Signal');

for i=1:length(stooth)
if (msg(i)>=stooth(i))
pwm(i)=1; %is message signal amplitude at i th sample is greater than
%sawtooth wave amplitude at i th sample
else
pwm(i)=0;
end
end

subplot(3,1,3);
plot(t,pwm,'r');
title('PWM');
axis([0 1 0 1.1]); %to keep the pwm visible during plotting.

11. Graphs (If Any): Image /Soft copy of graph paper to be attached here
PPM
PAM
PWM

Learning outcomes (What I have learnt):


1. Understand the basic concepts of transmission and reception of digital communication techniques.(CO1)
2. Assess and evaluate different modulation and demodulation techniques. (CO2)
3. Formulate and interpret the presentation and processing of signals in communication systems.(CO3)

Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1.
2.
3.

You might also like