Question

Generate a Matlab Code for amplitude modulated signal by multiplying a message signal (a low frequency...

  1. Generate a Matlab Code for amplitude modulated signal by multiplying a message signal (a low frequency cosine signal) with a carrier signal (a high frequency cosine signal).
  1. Sketch the Fourier transform of the modulated signal.
  1. Demodulate the modulated signal (with no noise) by again multiplying it with the same carrier signal.
  1. Sketch the Fourier transform of the signal obtained in c).
  1. Your task is to recover the message signal from the signal in c). Determine the type of filter you have to use and get its coefficients.
  1. Apply filter coefficients to the signal in c) and check whether the filtered signal is similar to the original message signal in time domain?
  1. Repeat the above steps from c) by adding zero-mean Gaussian distributed noise to the modulated signal. Check if the same filter works using small, medium, and large values of noise power. Comment on your results.

Homework Answers

Answer #1

Script:

clc;clear all;close all;
%Message signal
fs=40000
t=0:1/fs:0.01;
fm=1000;
Am=sin(2*pi*fm*t);%low frequency cosine signal
fc=10000;
Ac=cos(2*pi*fc*t);%high frequency cosine signal

%Amplitude modulation
N=1024;f=[-fs/2:fs/N:fs/2-fs/N];
xAM=Am.*Ac;
f=[-fs/2:fs/N:fs/2-fs/N];

%Frequency domain of AM
figure;
subplot(311)
plot(f,fftshift(abs(fft(Am,N))),'b') ;
title('Fourier transform of Modulated signal');
xlabel('f in Hz');ylabel('XAM(f)');grid on;
xlim([-5000,5000])

%Demodulation
demod = xAM.*cos(2*pi*fc*t);
subplot(312)
plot(f,fftshift(abs(fft(demod,N))),'m') ;
title('Fourier transform of demodulated signal');
xlabel('f in Hz');ylabel('XDEMOD(f)');grid on;
xlim([-5000,5000])

%Filter design to recover message signal

[num den] = butter(5,fc*2/fs);
mf = filtfilt(num,den,demod).*2;
subplot(313)
plot(t,mf,'r','LineWidth',3,t,Am,'--b','LineWidth',3);grid on;
title('Demodulation ')
xlabel('t(s)')
legend('demodulated signal','Original message signal')


Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT