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.

Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:Robert L. Boylestad
Chapter1: Introduction
Section: Chapter Questions
Problem 1P: Visit your local library (at school or home) and describe the extent to which it provides literature...
icon
Related questions
Question

Matlab script from q2 onwards. 

 

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.
Transcribed Image 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Bode Plot
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Introductory Circuit Analysis (13th Edition)
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:
9780133923605
Author:
Robert L. Boylestad
Publisher:
PEARSON
Delmar's Standard Textbook Of Electricity
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Electrical Engineering
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education
Fundamentals of Electric Circuits
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:
9780078028229
Author:
Charles K Alexander, Matthew Sadiku
Publisher:
McGraw-Hill Education
Electric Circuits. (11th Edition)
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:
9780134746968
Author:
James W. Nilsson, Susan Riedel
Publisher:
PEARSON
Engineering Electromagnetics
Engineering Electromagnetics
Electrical Engineering
ISBN:
9780078028151
Author:
Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:
Mcgraw-hill Education,