Question

In frequency Modulation (FM), the instantaneous frequency of a sinusoidal carrier wave will be modified proportionally to the variation of amplitude of the message signal. Use Matlab to build an FM modulation and demodulation process. The FM coefficient is Kf=80, and the carrier frequency is 300Hz.

1. Generate a baseband signal as show below. Plot the baseband signal in time domain and frequency domain. -1 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 t (sec)2. Create an FM process and plot the modulated signal in time and frequency domain.

(t) Acoswet can be calculated by using function cumsum in Matlab)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters with comments for explanation.

clc;
close all;
clear all;

% define sample time
ts = 1e-5;
fs = 1/ts;

% define time vector
t = -0.04:ts:0.04;

% now define the signal x(t)
x = (t>-0.02).*(t<=-0.01).*(100*t+2) + (t>-0.01).*(t<=0.01).*(-100*t)+...
(t>0.01).*(t<=0.02).*(100*t-2);

% plotting the baseband signal in time domain
figure;subplot(211);
plot(t,x,'linewidth',2);grid on;
xlabel('t(sec)');ylabel('m(t)');


% plotting the baseband signal in frequency domain
N = nextpow2(length(x));
X = fftshift(fft(x,2^N));
X = 2* X / length(x);
k = -(length(X)-1)/2:1:length(X)/2;
f = k/length(X) * fs;
subplot(212);plot(f,abs(X));grid;
xlabel('Frequency in Hz');
ylabel('Amplitude');xlim([-400 400]);
title('Double sided Magnitude spectrum');

% modulation of FM
kf = 80;fc = 300;
y = fmmod(x,fc,fs,kf);

% now define the signal x(t)
figure;subplot(211);
plot(t,y,'linewidth',2);grid on;
xlabel('t(sec)');ylabel('modulated signal y(t)');


% plotting the modulated signal in frequency domain
N = nextpow2(length(y));
X = fftshift(fft(y,2^N));
X = 2* X / length(y);
k = -(length(X)-1)/2:1:length(X)/2;
f = k/length(X) * fs;
subplot(212);plot(f,abs(X));grid;
xlabel('Frequency in Hz');
ylabel('Amplitude');xlim([-1000 1000]);
title('Double sided Magnitude spectrum of fm signal');

% demodulate the FM signal
z = fmdemod(y,fc,fs,kf);
figure;
plot(t,z,'linewidth',2);grid on;
xlabel('t(sec)');title('Demodulated signal z(t)');

0.5 0.5 0.04 0.03 0.02 0.01 0 0.01 0.02 0.03 0.04 t(sec) Double sided Magnitude spectrunm 0.8 0.6 400 300 -200 100 0 100 2000.5 -0.5 0.04 0.03 0.02 -0.01 0 0.01 0.02 0.03 0.04 t(sec) Double sided Magnitude spectrum of fm signal 0.8 0.6 0.4 0.2 1000Demodulated signal z(t) 0.6 0.2 0.6. 0.8 0.04 0.03 0.02 0.01 0 0.01 0.02 0.03 0.04 t(sec)

Add a comment
Know the answer?
Add Answer to:
In frequency Modulation (FM), the instantaneous frequency of a sinusoidal carrier wave will be modified proportionally...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT