You are on page 1of 12

REPORT

Table of Contents
OBJECTIVE ................................................................................................................................... 3
Part I. Motivation and Message Synthesis .......................................................................................... 3
Part II. Signal Analysis and Processing ................................................................................................ 4
Implementation .................................................................................................................................. 4
OBJECTIVE
Part I. Motivation and Message Synthesis
1. What are the components of the ordinary AM signal that can be removed for
efficiency in a DSB-SC signal?
Solution
By removing one side band suppressed carrier efficiency can be improved.
Single-sideband The numeric value of efficiency when m = 1.0 is about 33
%. We conclude that AM has a maximum practical efficiency of about 33 % due
to the limitations placed on modulation index.
DSB-SC is basically an amplitude modulation wave without the carrier, therefore
reducing power waste, giving it a 50% efficiency. This is an increase compared to
normal AM transmission (DSB) that has a maximum efficiency of 33.333%, since
2/3 of the power is in the carrier which conveys no useful information and both
sidebands containing identical copies of the same information. Single Side Band
Suppressed Carrier (SSB-SC) is 100% efficient
2. Assume we have a message signal that looks like the following: Synthesize the
signal in MATLAB. (Show the Code and attach the m-file)
Implementation

MATLAB Code

clc
clear all
close all
%Genaration of Message Signal
dt = 1e-7 ;
t = 0 : dt : 0.5-dt ;
fs= 10 ;
y = sin(2*pi*fs*t).*(t<=0.35) ;
figure,plot(t,y)

Result
Part II. Signal Analysis and Processing
With carrier frequency fc = 10kHz. Your simulation should take 1000 samples per carrier-
signal period. It should also simulate one signal period of each modulated signal. Define your
signal as: Where: Ac is the carrier amplitude (equals 1), Describe your modulated signals.

1. Obtain the Power Spectral Analysis for the message signal of part I.

Implementation
MATLAB Code

clc
clear all
close all
%Genaration of Message Signal
dt = 1e-7 ;
t = 0 : dt : 0.5-dt ;
fs= 10 ;
y = sin(2*pi*fs*t).*(t<=0.35) ;
figure,plot(t,y)
%Power Spectrum Analysis
x=fft(y); %dft
n = length(y); % number of samples
f = (0:n-1)*(fs/n); % frequency range
power = abs(x).^2/n; % power of the DFT
figure,plot(f,power)
xlabel('Frequency')
ylabel('Power')

Result
1. Obtain the DFT of the message signal.
Solution
x=fft(y);
2. Write MATLAB code to simulate creating:

a. DSB-SC modulation and demodulation:


b. FM modulation and demodulation
c. PM modulation and demodulation

solution (a)
MATLAB Code

% ACS DSB-SC Modulation & De-Modulation

fc=10000;
f=9995;
fs=1000;
Ts=1;fs;
t = 0:1/1000:Ts;
fH = fc-f;
fL = fc+f;
xH = sin(2*pi*fH.*t);
xL = sin(2*pi*fL.*t);

% Modulation
y = xL.*xH;

% De-Modulation By Synchoronous Method


m = y.*xH;

% Filtering High Frequencies


[n,w] = buttord(2/1000,4/1000,.5,5);
[a,b] = butter(n,w,'low');
dem = filter(a,b,m);

subplot(2,2,1);
plot(t,xH,'b',t,xL,'r');
title('m(t) & c(t)');
grid;
axis([0 2 -1.2 1.2]);

subplot(2,2,2);
plot(t,y,'k');
title('DSBSC');
grid;
axis([0 2 -1.2 1.2]);

subplot(2,2,3);
plot(t,m);
title('De-Modulated');
grid;
axis([0 2 -1.2 1.2]);

subplot(2,2,4);
plot(t,dem);
title('Filtered Signal');
grid;
axis([0 2 -1.2 1.2]);

Results
Explanation

The amplitude of the carrier signal is changed in proportion to the message/information signal,
whereas the frequency and the phase are kept constant Spectrum DSB-SC is basically
an amplitude modulation wave without the carrier, therefore reducing power waste, giving it
a 50% efficiency. This is an increase compared to normal AM transmission (DSB) that has a
maximum efficiency of 33.333%, since 2/3 of the power is in the carrier which conveys no
useful information and both sidebands containing identical copies of the same
information. Single Side Band Suppressed Carrier (SSB-SC) is 100% efficient

solution (b)
MATLAB Code

%A frequency-modulated signal can be generated using the following MATLAB


code:
clc
clear all
close all
t = 0:255;
t = t/256;
f = 2;
Fs=1000;
Ts=1/Fs;
fc = 10000;
beta = 5;
m = sin(2*pi*f*t);
xc = cos(2*pi*fc*t + beta*m);
figure,
plot (t,xc)

%demodulation

fo = zeros(1,256);
ff = zeros(1,256);
ff = fc + 4*cos(2*pi*f*t);
x = zeros(1,256);
disc = zeros(1,256);
fo(1) = 20;
for i=1:256
disc(i) = 2*pi*fc*t(i) + beta*m(i) - 2*pi*fo(i)*t(i);
if (i ~= 1)
x(i) = (disc(i) - disc(i-1))*256/(2*pi);
else
x(i) = disc(i)*256/(2*pi);
end;
if (i ~= 256)
fo(i+1) = fc + 0.001*x(i);
end;
end;

figure,
plot(t,disc);
title('Output of reciever');

Results
Modulated signal

Received Signal
Explanation
The frequency of the carrier signal is altered in proportion to the message/information signal,
whereas the amplitude and the phase are kept constant
solution (c)
MATLAB Code

%PM modulation

clear all
close all
fs=1000;
ts=1/fs;
t = 0:0.01:ts; % time variable
fc =10000; % carrier frequency

%------------------------------------------
% create message signal m(t)
m = sin(2*pi*t);
%------------------------------------------

kp = pi/2; % phase deviation constant

%------------------------------------------------
% modulating the carrier with the message signal
carrier = cos(2*pi*fc*t);
modulated = cos(2*pi*fc*t + kp*m);
% Plotting the signals
plot(t,m,'b',t,carrier,'r',t,modulated,'k--')
axis([0 1 -1.5 1.5]);
xlabel('Time(seconds)');
ylabel('Amplitude(volt)');
title('Phase modulation');
legend('Message','Carrier','Modulated');

Results
Explanation
The phase of the carrier signal is altered in proportion to the message/information signal,
whereas the amplitude and the frequency are kept constant.

3. Verify your modulated signals by using the


‘ammod’,’amdemod’,’fmmod’,’fmdemod’,’pmmod’,’pmdemod’ functions in MATLAB,
and compare the results with part 3.

➢ AM MODULATION/DEMODULATION
fs = 5;
t = (0:1/fs:100)';
fc =1;
x = sin(2*pi*t);
ydouble = ammod(x,fc,fs);
plot(t,ydouble)
z = amdemod(ydouble,fc,fs);
figure,
plot(t,z)

➢ FM MODULATION/DEMODULATION

%fm
fs = 1000;
fc = 200;
t = (0:1/fs:0.2);
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
fDev = 50;
y = fmmod(x,fc,fs,fDev);
x = fmdemod(y,fc,fs,fDev);
figure,
plot(t,y)
figure,
plot(t,x)
➢ PM MODULATION/DEMODULATION

%pm
fs = 50;
t = (0:2*fs+1)'/fs;
j= sin(2*pi*t) + sin(4*pi*t);
fc = 10;
phasedev = pi/2;
tx = pmmod(j,fc,fs,phasedev);
figure,plot(t,j)
k=pmdemod(tx,fc,fs,phasedev);
figure,plot(t,j)
********************

You might also like