m
m
Line 34: Line 34:
 
=== Analyzing Your Signal ===
 
=== Analyzing Your Signal ===
  
 +
[[File:linear_chirp.jpeg|thumbnail|Spectrogram of Chirp1]]
 +
 +
[[File:Quadratic_chirp.jpeg|thumbnail|Spectrogram of Chirp2]]
  
 
=== Conclusion ===
 
=== Conclusion ===

Revision as of 18:28, 2 December 2017

Sound & Color - Using Spectrograms to Analyze Sound Signals

By: Emma Gihl


Background

A spectrogram is the visual representation of the frequency changes in a signal as they vary with time. This image can be useful when analyzing changes in frequency that cannot be easily seen in waveform view. A spectrogram is created by taking the DTFT at a certain time and displaying it vertically. This is done repeatedly to create the overall image. Spectrograms can be manipulated to analyze specific signal properties by altering the DTFT used to create it.

Wideband spectrograms limit the time window to about the length of one period for the DTFT. This increases resolution in the time domain and decreases it in the frequency domain.

Narrowband spectrograms use a longer DTFT that covers several periods of the signal. This increases resolution in the frequency domain and decreases it in the time domain.

Processing & Displaying Your Signal

In order to create your spectrogram you first need to create a series of windowed DFTs. The Matlab function 'spectrogram' makes processing & displaying a spectrogram very easy.

First generate some audio signals:

% Create a 'chirp' sound using the chirp command

t = 0:.001:3;

chirp1 = chirp(t,0,2,500); % creates signal sampled at 1 kHz for 3 seconds & crosses 500 Hz at t = 2 seconds

chirp2 = chirp(t,50,1.75,200,'quadratic'); % creates quadratic signal sampled at 1 kHz for 3 seconds & crosses 400 at t = 1.75 seconds

Then use the spectrogram command to create a spectrogram:

% Using a window of 120, an overlap of 120, 128 DFT sampling points, and a sampling rate of 1 kHz

spectrogram(chirp1,128,120,128,1000);

% Using a window of 320, an overlap of 300, 512 DFT sampling points, and a sampling rate of 1 kHz

spectrogram(chirp2, 320, 300, 512, 1000);

Analyzing Your Signal

File:Linear chirp.jpeg
Spectrogram of Chirp1
File:Quadratic chirp.jpeg
Spectrogram of Chirp2

Conclusion

Sources

[1] Understanding Spectrograms : https://www.izotope.com/en/community/blog/tips-tutorials/2014/09/understanding-spectrograms.html

[2] Lab 9a Speech Processing : https://engineering.purdue.edu/VISE/ee438L/lab9/pdf/lab9a.pdf

[3] Matlab Documentation on Spectrogram : https://www.mathworks.com/help/signal/ref/spectrogram.html#outputarg_s

Subcategories

This category has only the following subcategory.

Alumni Liaison

Abstract algebra continues the conceptual developments of linear algebra, on an even grander scale.

Dr. Paul Garrett