Communication systems are often subject to interference from a variety of source
ID: 2988111 • Letter: C
Question
Communication systems are often subject to interference from a variety of sources. In this project, you will use MATLAB to read a wav file, simulate the effect of narrowband interference and process the distorted signal to recover the original signal. You should write a MATLAB program that performs the following functions.
1) Read a speech file which is available in wav format. The file anykey.wav is available for download. But I encourage you to find your own wav file on the internet or you can also create your own speech file if you prefer. Use wavread function in MATLAB to read the file. Play the sound file through the speakers and observe that you can hear the speech file. Plot the magnitude of the Fourier transform of the speech file. The x-axis should be in rad/s.
2) Simulate the effect of interference. We will model the interference as being composed of 10 cosinusoid functions at frequencies 4500,4550,..,4950 Hz whose amplitudes are all Gaussian random variables with zero mean and variance 1/10. Play this through the speakers and observe that you can see the effect of interference. Plot the magnitude of the Fourier transform of the speech file with interference. You should see that the interference is dominant.
3) Design an LTI system to remove the interference by designing a filter that cuts off all frequencies greater than 4000 Hz. Process the received signal by passing it through a LTI system to mitigate the effect of interference. Play this through the speakers and observe that the effect of interference has been largely mitigated. Notice here that you are processing the received signal in the discrete-time domain. The conv function in MATLAB can be used to perform convolution. Another alternative is to use the filter command. Think about how you may have to truncate any impulse responses that are of infinite duration. Plot the magnitude of the Fourier transform of the processed signal as a function of ?. The units for ? should be rad/s.
Please help with the above questions! I know we might need to use convolution somewhere, and a loop will definitely help. I just don't know how to solve it. Thanks in advance!
Explanation / Answer
Add the following code to that of the last part :
%% Design low-pass Filter with cut-off 4000 Hz
[b,a] = butter(8,2*pi*4000,'s'); %Design Analog filter with cut-off 4 kHz
[hb,ha] = bilinear(b,a,Fs); %Convert to discrete domain
%% Apply Filter to Distorted Signal
SpeechFilt = filter(hb,ha,SpeechDist);
fprintf(' Playing Filtered Recording ')
soundsc(SpeechFilt,Fs);
%% Calculating and Plotting Fourier Transform
NFFT = 2^nextpow2(L);
fourier = fft(SpeechFilt,NFFT)/L;
w = 2*pi*Fs*linspace(0,1,NFFT);
plot(w,2*abs(fourier(1:NFFT)))
title('Fourier Transform of Filtered Speech Signal, y(t)')
xlabel('Angular Frequency (rad/s)')
ylabel('|Y(f)|')
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.