Demodulating signal with AWGN
4 views (last 30 days)
Show older comments
We were given a modulated signal corrupted by an additive white Gaussian noise. We should be able to get the original message. My thought process was to demodulate it first and then filter it to get rid of the noise. The modulated signal's frequency is 32000, the carrier frequency is 9600 and the bandpass filter's cutoff frequency (which was used in modulating the signal) was [9600, 14400]. The message was said to have a cutoff frequency of [0,4800].
Here's my code:
[y_message,fs_message] = audioread('modulatemessage.wav');
fc_message = 9600;
fc_1 = 14400;
N_message=length(y_message);
t_message = 0:N_message-1;
% this is where i demodulate the signal
x_message = y_message.*cos(2*pi*(fc_message/fs_message)*t_message)';
[b_message,a_message] = butter(16,[fc_message*2/fs_message,fc_1*2/fs_message],'stop');
x_message = filter(b_message,a_message,x_message);
% this is where i filter the signal to get rid of the noise
blitter_message = fir1(50,0.3,'low');
out_message = filter(blitter_message,1,x_message);
%play the signal
sound(out_message,fs_message)
The problem is, I can hear the message but there's still some noise which prevents me from hearing it clearly. Any thoughts on what I was doing wrong? Thanks!
0 Comments
Answers (0)
See Also
Categories
Find more on PHY Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!