0% found this document useful (0 votes)
17 views2 pages

9/3/21 10:14 PM D:/IV Sem/Commlab/Lab1/lab13.m 1 of 2: All All

The document contains MATLAB code for generating and analyzing a Single Sideband Suppressed Carrier (SSB-SC) Amplitude Modulated signal. It includes the creation of modulating and carrier signals, their modulation, demodulation, and the frequency domain representation of both the modulated and demodulated signals using Fourier Transform. The results are visualized through various plots to illustrate the signals and their frequency components.

Uploaded by

u23ec106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

9/3/21 10:14 PM D:/IV Sem/Commlab/Lab1/lab13.m 1 of 2: All All

The document contains MATLAB code for generating and analyzing a Single Sideband Suppressed Carrier (SSB-SC) Amplitude Modulated signal. It includes the creation of modulating and carrier signals, their modulation, demodulation, and the frequency domain representation of both the modulated and demodulated signals using Fourier Transform. The results are visualized through various plots to illustrate the signals and their frequency components.

Uploaded by

u23ec106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

9/3/21 10:14 PM D:\IV Sem\Commlab\Lab1\lab13.

m 1 of 2

clc;
clear all;
close all;

t=0:0.001:1; %creating values for x axis


Am=1; %amplitude of message signal
Ac=1; %amplitude of carrier signal
fm=5; %frequency of modulating signal
fc=250; %frequency of carrier signal
%message signal

ym=Am*cos(2*pi*fm*t); %message signal


figure(1)
subplot(6,1,1)
plot(t,ym)
title('Modulating signal')

%carrier signal
yc=Ac*cos(2*pi*fc*t); %carrier signal
subplot(6,1,2)
plot(t,yc)
grid on;
title('Carrier signal')

%SSB-SC AM Modulation
y = (Am*Ac)/2*cos(2*pi*(fc+fm)*t); %multiplying message signal with carrier
subplot(6,1,3)
plot(t,y)
title('Amplitude Modulated SSB-SC Signal') %plotting SSB-SC modulated signal
grid on;

%demodulation of SSB-SC
d=y.*yc; %multiplying the modulated signal with cos(2pifct)
[b,a]=butter(5,0.1); %butterworth filter
d1=filter(b,a,d); %implementing the filter passing the modulated signal
through filter
subplot(6,1,4)
plot(d1)
title('demodulated Signal')
grid on;

%frequency domain plots


%modulated signal
%Spectrum of modulated signal
N=length(t);
ymf=fftshift(fft(y,N)/N); %using fft to calculate fourier transform and
fftshift is used to center the fourier transform
f=(-N/2:N/2-1); %creating range for x axis
subplot(6,1,5)
plot(f,real(ymf),'b') %plotting the real part of fourier transform of
modulating signal
hold on;
plot(f,imag(ymf),'r') %plotting the imagfinary part of fourier transform
9/3/21 10:14 PM D:\IV Sem\Commlab\Lab1\lab13.m 2 of 2

of modulating signal
title('frequency plot of SSB-SC modulated signal' )

%demodulated signal
%Spectrum of demodulated signal
N=length(t);
ydf=fftshift(fft(d1,N)/N); %using fft to calculate fourier transform and
fftshift is used to center the fourier transform
f=(-N/2:N/2-1); %creating range for x axis
subplot(6,1,6)
plot(f,real(ydf),'b') %plotting the real part of fourier transform of
modulating signal
hold on;
plot(f,imag(ydf),'r') %plotting the imagfinary part of fourier transform of
modulating signal
title('frequency plot of demodulated signal')

You might also like