Professional Documents
Culture Documents
TO ACQUAINT YOU
ALL WITH THE POWER
OF ‘MATLAB’ IN
CONTEXT TO COMN
ENGG BY CARRYING
OUT SIMULATION
SHOWING DSB AND
SSB (PHASE SHIFT)
AMPLITUDE
MODULATION ON A
USER DEFINED MSG
AS WELL AS CARRIER
SIGNAL
WHY MODULATE?
UNDERSTANDING AM
Vm
vmo Vc 1 m sin m t sin c t m
Vc
SSB-AM USING PHASE SHIFT
SSB – AM
ONLY HALF OF THE SIGNAL OF DSB-SC IS USED.
THIS METHOD EFFICIENTLY USES POWER AND BANDWIDTH.
CURRENT
DIRECTORY
WINDOW
MATLAB PROMPT
MATLAB READY
FOR YOUR
COMMAND
COMMAND COMMAND
HISTORY WINDOW
WINDOW
MATLAB BASICS
VARIABLE NAMES:
Starts with a Letter
Up to 31 characters can be used
May contain letters, digits and underscore_
X=[3.5 6.3, 33] X is a 1X3 matrix with elements 3.5 , 6.3 and 33.
Commas or space are used to separate the
elements in a row
% Amplitude Modulation with Single Tone Signal and its Spectrum Analysis
% Show the Time Domain and Frequency Domain Representation of DSB-AM
clc;
A
% Taking User Input for Frequencies
% This is a Cell Array!
prompt={'Enter Carrier Frequency','Enter Message Signal Frequncy'};
% Creating the Dialog box where the User Input is stored into a Cell Array
answer=inputdlg(prompt,name,numlines,defaultanswer);
% Default Answer
defaultanswer={'0','0'};
% Creating the Dialog box where the User Input is stored into a Cell Array
answer1=inputdlg(prompt,name,numlines,defaultanswer);
Vc1 = Vc*sin(2*pi*fc*t);
Vm1 = Vm*sin(2*pi*fm*t);
INPUT
OUTPUT
SSB-AM APPROACH
MATLAB CODE
N = 1024;
fs = 2048;
t = (0:N-1)/fs;
% Creating the Dialog box where the User Input is stored into a Cell Array
answer=inputdlg(prompt,name,numlines,defaultanswer);
% Creating the Dialog box where the User Input is stored into a Cell Array
answer1=inputdlg(prompt,name,numlines,defaultanswer);
m = Vm*sin(2*pi*fm*t); %Message
n = Vm*sin(2*pi*fm*t+(pi*90/180)); % 90 Degree Phase Shift of Message Signal
a = Vc*sin(2*pi*fc*t); % Carrier
A
b = Vc*sin(2*pi*fc*t+(pi*90/180)); % 90 Degree Phase Shift of Carrier Signal
x=n.*a;
y=m.*b;
p=x+y;
q=x-y;
SBU=2/N*abs(fft(p));
SBL=2/N*abs(fft(q));
freq=fs*(0:N/2)/N;
figure('Name','Time Domain Representation of BM Outputs');
subplot(211); % Time Domain Plot
plot(t(1:200),x(1:200),'b'); % Take First 200 Samples
title('Time Domain Representation - OUTPUT AT BM-A ');
xlabel('Time');
ylabel('Modulated Signal');
A
OUTPUT SCREENS
INPUT OUTPUT
CONCLUSION
REFERENCE
www.mathworks .com
www.blinkdagger.com
ASK US ??