Lab Goals
The goals of this lab are to explore some of the experimental issues of the Fourier Transform.
Lab Manifest
- LabVIEW ScopeTest program. (right-click and save to Desktop)
- Pasco Function Generator
- Casio Keyboard
- National Instruments NI USB-6009 or Vernier SensorDAQ data acquisition board
- Lab Handout
General Instructions
The lab handout, linked above, gives detailed instructions for this lab.
This lab is much more qualitative than those you have done recently.
In general, you don't have to measure anything, but rather the idea is
to give you some experience with the FFT algorithm in real life.
Your lab writeup needs to describe carefully the steps you took
in this lab and give some descriptive explanations of what you observed
and why.
Code Assignment
Here is an extra-credit assignment, worth up to 6 extra points on your overall grade.
We're interested in dumping some data from a struck guitar string into Matlab and then analyzing it using Matlab's spectra tools. In particular, we want to explore how the frequency content of the recorded data changes as a function of time. Think of this as recording a long time series of sound pressure data, and then sliding a window along the time series while examining the spectrum.
- Download the pre-recorded .wav file of a struck open-A string of a guitar.
- Figure out how to import that file into Matlab
- Write a Matlab function that does the following:
- gets passed your sound data vector, the sample rate, the length of the sliding
window.
- makes a 'spectrum object' with predefined method (I suggest welch), window (try
'Tukey') and a pre-specified sliding window length (that you passed the routine).
- step through your entire (guitar note) data set in some sensible fashion, and use
the Matlab 'psd' command to estimate the 'power spectral density' for each sliding
window. Note that a call of psd such as 'psd(H512,my_A_string(:,2),'Fs',20000)'
makes a pre-defined plot that I don't find useful. Instead, use a call like
'mypsd = psd(....)' and parse mypsd for the psd and associated (Fourier
frequencies.
- figure out some way to show the time evolution of the psd (check out, for example,
the 'waterfall' plot. I strongly encourage you to consider sensible ranges of frequency for your 3D plot.
- try this for a few different lengths of sliding windows, e.g., 256, 512, 1024. Discuss the tradeoff between frequency resolution and time resolution (of frequency content). Cite your newly-made plots in doing so.
- say what you can about the time evolution of the 'overtones' of the guitar? Discuss your data in terms of the fundamental and overtones of the note on the string, and how they each decay over time (refer to your plots).
- submit your function and calling script, and your response to 4, above (as text) to me in a zip file.
Errata
For reference, the USB-6009 Data Sheet and Users Guide, and the Vernier SensorDAQ Data Sheet and Users Guide.