Computer Problem: Envelop detector. Capture a voice/music signal with your compu
ID: 1716990 • Letter: C
Question
Computer Problem: Envelop detector. Capture a voice/music signal with your computer sound card and modulate it by AM modulation. Simulate the AM demodulation to get the message signal. Please show AM modulation/demodulations with 30% modulation and over-modulation cases.
You may use Fs = 16000 Hz to sample the voice signal m(t), and let carrier frequency to be fc = 8000 Hz. The lowpass filter can still be designed with cutoff frequency 0.2 (corresponding to 1600 Hz), which is good enough for speech signal.
Explanation / Answer
Matlab commands:
%clearing window, variables and figures
clear all;
close all;
clf;
clc;
Fs=16000;
Fc=8000;
t=0:1/Fs:1;
s=sin(2.*pi.*300.*t)+2*sin(2.*pi.*600.*t);
%commands to ontain the amplitude of the signal
xdft = fft(s); % Obtain the DFT
camp = 2/length(s)*xdft(101);
A=abs(camp); % amplitude
mi=30/100; %for 30% modulation
y=(A+mi*s).*sin(2*pi*Fc*t); %modulation
plot(t,y);
title('modulated signal vs t');
xlabel('Time (s)');
ylabel('Amplitude');
[num,den] = butter(10,Fc*0.2/Fs); %Create a lowpass filter.
s1 = amdemod(y,Fc,Fs*2,0,0,num,den);
figure
plot(t,s,'c',t,s1,'b--')
legend('Original Signal','Demodulated Signal')
xlabel('Time (s)')
ylabel('Amplitude')
%type following after above commands for over modulatio case
mi=120/100; %for over modulation
y=(A+mi*s).*sin(2*pi*Fc*t); %modulation
plot(t,y);
title('modulated signal vs t');
xlabel('Time (s)');
ylabel('Amplitude');
[num,den] = butter(10,Fc*0.2/Fs); %Create a lowpass filter.
s1 = amdemod(y,Fc,Fs*2,0,0,num,den);
figure
plot(t,s,'c',t,s1,'b--')
legend('Original Signal','Demodulated Signal')
xlabel('Time (s)')
ylabel('Amplitude')
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.