Professional Documents
Culture Documents
D Com Experiment 03
D Com Experiment 03
D Com Experiment 03
Objectives:
The purpose of this experiment is to analyze the concept of Pulse Amplitude Modulation using
MATLAB Software which is the language of technical computing. It presents the MATLAB
programming for PAM modulation technique. The PAM waveform obtained in accordance with
the variations of the continuous varying information signal along with the carrier signal is also
studied. It also describes the different types of PAM signals and their applications in various
systems.
Theoretical Concept:
Pulse-amplitude modulation (PAM): Pulse amplitude modulation is a technique in which the
amplitude of each pulse is controlled by the instantaneous amplitude of the modulation signal. It
is a modulation system in which the signal is sampled at regular intervals and each sample is
made proportional to the amplitude of the signal at the instant of sampling. This technique
transmits the data by encoding in the amplitude of a series of signal pulses.
A Computer
MATLAB software.
Input Code:
clc;
clear all;
close all;
wm=1.05*pi;
res=0.01;
fs=1;
sam=floor(1/(fs*res));
t=0:res:10-res;
m=sin(wm*t);
allT=[0.05,.1,.2,.3,.4,.5];
f=(1/res)*([0:1/(length(t)-1):1]-.5);
figure
subplot(1,1,1);
plot(t,m);
title(['Sampling frequency='num2str(fs)'Hz']);
xlabel('Time(s)');
ylabel('Magnitude');
advance=33;
for k=1:6;
T=allT(k);
durInSam=floor(T/res);
sm=zeros(size(t));
for i=0:floor(length(t)/sam)-1,sm(advance+(i*sam)+1:advance+(i*sam)
+durInSam)=m(i*sam+1+advance);
end
y=fftshift(abs(fft(sm)));
figure
subplot(2,1,1);
plot(t,m,'-.');
hold on;
plot(t,sm);
axis([0 10 -1.2 1.2]);
xlabel('Time(s)');
ylabel('Magnitude');
legend('Signal','PAM-Signal');
title(['T='num2str(T)'s']);
subplot(2,1,2);
plot(f,y);
xlabel('Frequency(Hz)');
ylabel('Magnitude');
end
Outputs:
Figure 11: Cycle of the continuous signal, when L=1025 and fsim=2225
Figure 16: Spectrum of continuous sinusoid & PAM signal, when L=1025 and
fsim=2225
Discussion: