Question
The purpose of this exercise is to learn the use of discrete Fourier transform in MATLAB ie the functions fft (-) and ifft (-). Alaising
The purpose of this exercise is to learn the use of discrete Fourier transform in MATLAB ie the functions fft (-) and ifft (-). Alaising is an inevitable problem in discrete Fourier transform, but the problem can be reduced with filtering.
A) Create a square pulse using ones (-) and zeros (-). The pulse should be 1 second long, x (t) = 1 for t = (0, 1) and zero otherwise. Use sampling interval, T = 0.1s, and number of points, N = 128. Find the pulse frequency spectrum using fft. Plot the pulse and the absolute value of the frequency spectrum. The frequency spectrum must be plotted on the frequency axis (Hz). The frequency resolution is f0 = 1 / (TN).
B) Alaising is seen in the spectrum in that the amplitude does not go towards zero around fs / 2 (here 5Hz) which means overlap of positive and negative frequencies. Make an ideal low-pass filter using ones () and zeros () which removes the frequencies f = (fs / 4.3fs / 4), the middle part of the spectrum, which are the highest frequencies. Apply the filter to the pulse, Y (f) = H (f) X (f). Find the filtered pulse y (t) using ifft. Plot the filtered pulse and the absolute value of the frequency spectrum. Remember to use the correct axis on the plots. What does the pulse look like? Why is this filter not realizable in real time?
C) An ideal filter is not realizable in real time, therefore we will make a Hanning filter that is somewhat close to realizable. Make a Hanning filter defined as: Han (f) = (1 + cos (2f / fs)) / 2 for f = (0, fs). Apply this filter on the square pulse. Plot the pulse and the absolute value of the frequency spectrum. What does the pulse look like now? Is this filter realizable in real time? Justify the answer.
I already have the answer for a and this needs to be done on matlab
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started