The problem:
Suppose you had a 6 second sample that consisted of a continuous 10 Hz
and 13 Hz signal in addition to an 80 Hz signal that turned off and on
briefly
at one second and then off entirely at 3 seconds.
A Fourier transform
of this signal would show three peaks at 10 Hz, 13 Hz and 80 Hz but
give no indication of the duration of each part of the signal:

Potential improvement?
-
Collect a series of
Fourier Transforms for short
overlapping time intervals (a windowed Fourier transform).
- Plot the intensity of the FFT for each frequency
and each time as a density plot (called a spectrogram).
But!
- If the window is too small you cannot resolve low
frequencies well:

- If the window is too big you do not get good time
resolution:

Solution:
- Use a continuously varying window size. Here a
spectrogram of the same data made using the Morlet wavelet window:
Examples of the CWT:
- The author singing the notes "do", "re", "me":

- Screen shot of Chris Lang's C++ program of whistle spectrogram:

Download a zip
file with the
following software:
- Brief sketch of how a CWT works (in pdf format)
- C++ code for a CWT
- Compiled CWT program
- sample data file for a test run
- C++ code that generated the sample data
Return to the IUS Physics
Top
Page.
Contact Kyle Forinash,
for comments/suggestions/corrections.