Matlab script from q2 onwards. f1.1. Sketch S(f), the spectrum of the signal s(t).As discussed in class, the frequency resolution of the spectrogram is inversely proportional to length of...


Matlab script from q2 onwards.



2.1 Spectrogram Frequency Resolution<br>This part considers signals of the form:<br>s(t) = cos(27 (f1)t) + cos(27(f2)t).<br>Assume that f2 > f1.<br>1. Sketch S(f), the spectrum of the signal s(t).<br>As discussed in class, the frequency resolution of the spectrogram is inversely proportional to length of the<br>window. When the spectrum has two lines at fi and f2 Hz, these lines will be clearly visible in the spectrogram<br>when Twin F2-fil'<br>The duration of the window is related to the window length in samples via the sample frequency, i.e., Twin =<br>nwin/fs.<br>For all the parts below, assume that the sample frequency fs is 10,000 Hz.<br>where C is a proportionality constant and Twin is the duration of the window in seconds.<br>2. Assume that fi = 500 Hz and f2 = 520 Hz. Generate 2 seconds of samples of the signal s(t). Compute<br>the spectrogram using a window length of nwin=200. Make a plot. Zoom in and verify that two separate<br>spectral lines are not visible in the plot. Note that there are several ways to zoom in on the plot:<br>• Click on the zoom button at the top of the figure window. Select the part of the plot you want to<br>highlight.<br>• Use the axis command. This may not work reliably under all versions of MATLAB.<br>• Use a command like set (gca,'YLim', [2 4]) to set the y-axis lower limit to 2 and upper<br>limit to 4. You can use set (gca,'XLim' , [2 4]) to set the x-axis limits. These commands<br>seem to work even when the axis command is unreliable.<br>3. Increase the window length until you can see two spectral lines in your spectrogram plot. Getting a<br>window length value correct to the nearest 100 samples is sufficient. Based on this window length,<br>estimate the proportionality constant C.<br>4. Now assume that fi = 2500 Hz and f2 = 2520 Hz. Use the value of C derived in the previous part to<br>predict the window length you should use for this example. Compute the spectrogram. Can you see two<br>lines in the spectrum? This should confirm that C depends only on the difference in the two frequencies<br>(not the exact values associated with those frequencies).<br>5. Now assume that f1<br>= 500 Hz and f2 = 600 Hz. Use the value of C you derived to predict the window<br>length you should use for this example. Can you see two lines in the spectrum?<br>6. Summarize what you learned about the segment length required to resolve two closely-spaced sinusoids<br>based on the spectrogram.<br>

Extracted text: 2.1 Spectrogram Frequency Resolution This part considers signals of the form: s(t) = cos(27 (f1)t) + cos(27(f2)t). Assume that f2 > f1. 1. Sketch S(f), the spectrum of the signal s(t). As discussed in class, the frequency resolution of the spectrogram is inversely proportional to length of the window. When the spectrum has two lines at fi and f2 Hz, these lines will be clearly visible in the spectrogram when Twin F2-fil' The duration of the window is related to the window length in samples via the sample frequency, i.e., Twin = nwin/fs. For all the parts below, assume that the sample frequency fs is 10,000 Hz. where C is a proportionality constant and Twin is the duration of the window in seconds. 2. Assume that fi = 500 Hz and f2 = 520 Hz. Generate 2 seconds of samples of the signal s(t). Compute the spectrogram using a window length of nwin=200. Make a plot. Zoom in and verify that two separate spectral lines are not visible in the plot. Note that there are several ways to zoom in on the plot: • Click on the zoom button at the top of the figure window. Select the part of the plot you want to highlight. • Use the axis command. This may not work reliably under all versions of MATLAB. • Use a command like set (gca,'YLim', [2 4]) to set the y-axis lower limit to 2 and upper limit to 4. You can use set (gca,'XLim' , [2 4]) to set the x-axis limits. These commands seem to work even when the axis command is unreliable. 3. Increase the window length until you can see two spectral lines in your spectrogram plot. Getting a window length value correct to the nearest 100 samples is sufficient. Based on this window length, estimate the proportionality constant C. 4. Now assume that fi = 2500 Hz and f2 = 2520 Hz. Use the value of C derived in the previous part to predict the window length you should use for this example. Compute the spectrogram. Can you see two lines in the spectrum? This should confirm that C depends only on the difference in the two frequencies (not the exact values associated with those frequencies). 5. Now assume that f1 = 500 Hz and f2 = 600 Hz. Use the value of C you derived to predict the window length you should use for this example. Can you see two lines in the spectrum? 6. Summarize what you learned about the segment length required to resolve two closely-spaced sinusoids based on the spectrogram.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here