Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me finding the script relating to lab tasks 3 and 4. They re just looking for one script. I am super

Can someone please help me finding the script relating to lab tasks 3 and 4. They re just looking for one script. I am super lost. I have attached the two files that it mentions.

Lab: Get Rid of That Noise Please In this lab, your friend Bob will need your help to recover a music recording corrupted by background noise. You need to help him get rid of the noise and restore the music piece, which was originally played by piano and drum. To complete this task, you need to get familiar with Fourier analysis, a powerful tool to analyze and manipulate the frequency content of a signal. Many audio effects such as filter effects, noise reduction, and equalization are based on this frequency domain method. In contrast, in the Lets Make Music lab, the simple audio editing functions such as changing speed/tempo, fading (one way of manipulating the amplitude envelope) and time reversing are all time-domain methods, i.e., they manipulate signals in the time domain. An efficient tool to perform Fourier analysis of discrete time sequences is Fast Fourier Transform (FFT). Explaining how it works and how it relates to Discrete Time Fourier Transform (DTFT) is beyond the scope of this course. Only examples on how to use the tool are discussed here. Lets begin with analyzing the frequency content of the theme song Star Wars you made. Download the MATLAB script fft_star_wars.m and copy the star_wars.wav (the file you generated from the Lets Make Music lab) to the same directory as the script. Run the script and observe the frequency graph. Are the peaks of the graph related to the frequencies of the music notes? One important application of Fourier analysis is to filter1 out unwanted signals. If the desired signal and the unwanted signals dont have overlapped spectrum, a filter (low pass, high pass, band pass, or band stop) can be used to block the unwanted signals and only let the desired signal pass through. LTI, LPF h(t), H(f) x(t), X(f) y(t), H(f) Figure 1. Low pass filter LTI system with input and output As shown in Figure 1, an input signal x(t) composed of two sinusoids with frequencies 100Hz and 2000Hz goes through an LTI system, which is a low pass filter (5th order Butterworth digital filter) with cutoff frequency 500Hz. The spectrum (magnitude of FFT) of the input signal |X(f)| is shown in the first figure of Figure 2. The frequency response of the low pass filter |H(f)|, the Fourier transform of its impulse response h(t), is shown in the second figure. The spectrum |Y(f)|of the output signal y(t) is shown in the third figure. The figure shows that only the sinusoid with frequency 100Hz passes through the system, and the 2000Hz sinusoid gets filtered out. What is the equation relating |X(f)|, |H(f)| and |Y(f)|?

Lab Objectives: 1. Compute and plot a digital signals Fourier transform, and observe the signals spectrum in the frequency domain. (Here the emphasis is NOT how Fourier transform is computed, which is a topic for a more advanced signal processing class. But to observe the signal spectrum and understand a 1 https://en.wikipedia.org/wiki/Filter_(signal_processing) Dr. Chao Wang EEE203 Signals and Systems I Page 2 of 3 signals frequency content can be used to perform new signal processing functions, such as filtering, which cant be achieved by using the signals time domain information alone.) 2. Choose filter cutoff frequency to properly filter out unwanted signals. (Again the emphasis is NOT how to design a filter, which is a topic for a digital signal processing class, but how to choose the proper cutoff frequency and observe the filter effect.) 3. Understand how a system is characterized. (We use time domain impulse response before, now we can use frequency response.) 4. Understand how to generate system output given system input. (We use time domain convolution before, now we can use frequency domain multiplication and inverse Fourier transform. Another way is to use difference equation based on the time shifting property. )

Lab Tasks: 1. Download the MATLAB script fft_star_wars.m, copy the star_wars.wav (the file you generated from the Lets Make Music lab) to the same directory as the script, and run the script. Submit the frequency plot. Are the peaks of the graph related to the frequencies of the music notes? 2. Write down the equation relating |X(f)|, |H(f)| and |Y(f)| as described in the text above. (Hint: Fourier transform convolution property.) 3. Download the corrupted music file music_with_noise.wav. 4. Download the MATLAB script lab_filter_noise_music.m. Complete the script and submit the completed script. a. You need to follow the example in fft_star_wars.m, import and plot the FFT of the corrupted music signal. b. In the script, an example is used to demonstrate how to build a digital low pass filter, how to plot its frequency response and how to filter the signal using the filter, i.e., pass the signal through a LTI system which is a low pass filter. c. Your job is to observe the frequency content of the signal from the FFT you plotted (you can use xlim to zoom in on the spectrum if needed as shown in fft_star_wars.m), and update the cutoff variable to set up the proper cutoff frequency for the 5 th order Butterworth low pass digital filter to filter out the noise in the corrupted music file. d. You can hear the output of the filter and observe the spectrum of the filtered signal (code are provided), and they will help you choose the cutoff frequency. 5. Submit the MATLAB frequency domain plot with three subplots |X(f)|, |H(f)| and |Y(f)) as described in the text, like Figure 2, to show the effect of your filter.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Which of the following is NOT a metalloid? Pb B Ge Sb Te

Answered: 1 week ago