Frequency Domain Analysis-Analog Communication-Matlab Codes, Exercises of Analog Communication

This is code in MATLAB. Its soution to lab assignment by Sir Bhanuprasad Venkatesan at Shree Ram Swarup College of Engineering and Management for Analog Communication course. It includes: Frequency, Modulation, Close, Variables, Integrate, Signal, Values, Samples, Amplitude, Time

Typology: Exercises

2011/2012

Uploaded on 07/30/2012

gajkaraan
gajkaraan 🇮🇳

4.6

(16)

45 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
% Frequency Modulation:
close all
syms A t wm fs kf kp wc A1 % Constucted variables to integrate the
message signal for FM
m = A1*cos(wm*t) % Message Signal
i = int(m,t) % Integrated Signal
% Arguments:
t = 0:0.002:2; % Time vector with values 0 to 2, taking 1000
samples
A = 1; % Amplitude of both message signal and of the
expression of FM and PM
wm = 2*pi*0.5; % Frequency of message signal
fs = 500; % Sampling rate
kf = pi/4; % Constant
kp = pi/3; % Constant
wc = 2*pi*10; % Frequency of carrier signal
A1 = 10; % Amplitude of message signal
% After giving values:
m = A1*cos(wm*t);
i = A1/wm*sin(wm*t);
% Time Domain:
phiFM = A*cos((wc*t)+(kf*i));
phiPM = A*cos((wc*t)+(kp*m));
figure, plot(t,m), title('Original
Signal'),xlabel('time'),ylabel('Amplitude')
figure, plot(t,phiFM), title('Frequency Modulated
Signal'),xlabel('time'),ylabel('Amplitude')
figure, plot(t,phiPM), title('Phase Modulated
Signal'),xlabel('time'),ylabel('Amplitude')
% Frequency Domain:
w=-250:(2*250)/1000:250;
PHIFM = fftshift(abs(fft(phiFM)));
PHIPM = fftshift(abs(fft(phiPM)));
figure, stem(w,PHIFM), title('Fourier Transform of FM signal that shows
the frequencies produced'), xlabel('linear
frequency'),ylabel('Amplitude')
figure, stem(w,PHIPM), title('Fourier Transform of PM signal that shows
the frequencies produced'), xlabel('linear
frequency'),ylabel('Amplitude')
docsity.com

Partial preview of the text

Download Frequency Domain Analysis-Analog Communication-Matlab Codes and more Exercises Analog Communication in PDF only on Docsity!

% Frequency Modulation: close all syms A t wm fs kf kp wc A1 % Constucted variables to integrate the message signal for FM

m = A1cos(wmt) % Message Signal i = int(m,t) % Integrated Signal

% Arguments: t = 0:0.002:2; % Time vector with values 0 to 2, taking 1000 samples A = 1; % Amplitude of both message signal and of the expression of FM and PM wm = 2pi0.5; % Frequency of message signal fs = 500; % Sampling rate kf = pi/4; % Constant kp = pi/3; % Constant wc = 2pi10; % Frequency of carrier signal A1 = 10; % Amplitude of message signal

% After giving values: m = A1cos(wmt); i = A1/wmsin(wmt);

% Time Domain: phiFM = Acos((wct)+(kfi)); phiPM = Acos((wct)+(kpm));

figure, plot(t,m), title('Original Signal'),xlabel('time'),ylabel('Amplitude') figure, plot(t,phiFM), title('Frequency Modulated Signal'),xlabel('time'),ylabel('Amplitude') figure, plot(t,phiPM), title('Phase Modulated Signal'),xlabel('time'),ylabel('Amplitude')

% Frequency Domain: w=-250:(2*250)/1000:250; PHIFM = fftshift(abs(fft(phiFM))); PHIPM = fftshift(abs(fft(phiPM)));

figure, stem(w,PHIFM), title('Fourier Transform of FM signal that shows the frequencies produced'), xlabel('linear frequency'),ylabel('Amplitude') figure, stem(w,PHIPM), title('Fourier Transform of PM signal that shows the frequencies produced'), xlabel('linear frequency'),ylabel('Amplitude')

docsity.com