0% found this document useful (0 votes)
3 views10 pages

Communication System File-2

The document is a practical lab file for communication systems, detailing various modulation techniques including Amplitude Modulation (AM), Frequency Modulation (FM), Pulse Amplitude Modulation (PAM), Pulse Width Modulation (PWM), Pulse Position Modulation (PPM), and Pulse Code Modulation (PCM). Each section includes MATLAB code to plot the respective signals, illustrating the message, carrier, and modulated signals. The practical exercises aim to enhance understanding of signal modulation in communication systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views10 pages

Communication System File-2

The document is a practical lab file for communication systems, detailing various modulation techniques including Amplitude Modulation (AM), Frequency Modulation (FM), Pulse Amplitude Modulation (PAM), Pulse Width Modulation (PWM), Pulse Position Modulation (PPM), and Pulse Code Modulation (PCM). Each section includes MATLAB code to plot the respective signals, illustrating the message, carrier, and modulated signals. The practical exercises aim to enhance understanding of signal modulation in communication systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Communication system

LAB Practical File


Name = RAJA KUMAR
ROLL NUMBER-6241

Q1. Plot the carrier , message and amplitude modulated signal .


clc; clf; clear all;
fm = 5;
fc = 50;
t = 0:0.001:1;
mt = sin(2 * %pi * fm * t);
ct = sin(2 * %pi * fc * t);
am = (1 + mt) .* ct;

subplot(3,1,1);
plot(t, mt, 'r');
xlabel('Time (s)');
ylabel('m(t)');
title('Message Signal m(t) = sin(2 * pi * fm * t)');

subplot(3,1,2);
plot(t, ct, 'g');
xlabel('Time (s)');
ylabel('c(t)');
title('Carrier Signal c(t) = sin(2 * pi * fc * t)');

subplot(3,1,3);
plot(t, am, 'b');
xlabel('Time (s)');
ylabel('AM Signal');
title('Amplitude Modulated (AM) Signal');
Q2. Plot the frequency modulation .

clc; clf; clear;


t = 0:1/1000:1;
Ac = 1;
Am = 1;
fc = 20;
fm = 10;
Vc = Ac.*cos(2*%pi*fc*t);
Vm = Am.*sin(2*%pi*fm*t);
m = 1;
Vfm = Ac.*cos((2*%pi*fc*t)+(m*sin(2*%pi*fm*t)));
subplot(3,1,1);
plot(t,Vm, 'm');
xlabel('time');
ylabel('amplitude');
title('message signal');
subplot(3,1,2);
plot(t,Vc,'m');
xlabel('time');
ylabel('amplitude');
title('carrier signal');
subplot(3,1,3);

plot(t,Vfm,'m');
xlabel('time');
ylabel('amplitude');
title('frequency modulating');

Q3. Plot the Pulse Amplitude Modulation.

clf;
clear all;
clc;
Am= 50;
fm= 10;
t=linspace(0,1,100);
m=Am*cos(2*%pi*fm*t);
subplot(2,1,1);
plot2d3(t,m);
xlabel('Time (s)');
ylabel('PAM Signal');
title('Pulse (AM) Signal');
Q4. Plot the PWM and PPM signal?

clc;
clf;
clear all;

fm =5
fc = 15

t = linspace(0,1,1000);

m = sin(2*%pi*fm*t);
c = sin(2*%pi*fc*t);

n = length(c)
pwm = zeros(1,n);
ppm = zeros(1,n);

for i = 1:n
if m(i)>c(i) then;
pwm(i) = 1;
elseif m(i) < c(i) then;
pwm(i) = 0;
end
end
for i = 1:n-1
if pwm(i) == 1 & pwm(i+1) == 0 then;
ppm(i) = 1;
end
end

subplot(411);
title("Messege");
plot(t,m);
subplot(412);
title("Carrier");
plot(t,c);
subplot(413);
title("PWM");
plot(t,pwm);
subplot(414);
title("ppm");
plot(t,ppm);
Q5. Plot the pulse code modulation signal.

clc; clf; clear all;


Fs = 1000;
t=0:10/Fs:1;
f=5;
asignal = sin(2 * %pi * f *t);
L = 8;
Vmax = max(asignal);
Vmin = min(asignal);
quant = (Vmax-Vmin)/L;
disp(quant);
quant_sig = Vmin + quant * floor ((asignal - Vmin)/ quant);
pcm_encode = floor((quant_sig - Vmin) / quant);
subplot(3,1,1);
plot(t, asignal);
xlabel('Time (s)');
ylabel('Amplitude');
title('analog signal');

subplot(3,1,2);
plot2d3(t, pcm_encode);
xlabel('Time (s)');
ylabel('PCM Code');
title('quantized');

You might also like