Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

NEED HELP WITH ONLY THIRD PART! Communication systems are often subject to inter

ID: 2988203 • Letter: N

Question

NEED HELP WITH ONLY THIRD PART!

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

NEED HELP WITH ONLY THIRD PART!

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.

In this project, we are interested in plotting the magnitude of the Fourier transforms as a function of ?. Normally, what we would like to get is the function X(j?) for all values of ?. However, on a digital computer, we cannot do this. We have to evaluate X(j?) for a some finitely many values of ?. A built in function in MATLAB called fft can be used to obtain the DTFT of a signal x[n] of length N, namely X(ej?) for N uniformly spaced values in the interval [-pi,pi].

? - Omega

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)|')