Fast Fourier Transform

This routine uses a Fast Fourier Transform (FFT) to calculate the frequency structure of cyclic data.  Theoretically, any waveform can be decomposed into a set of simple sine waves of different frequencies and phases.  The FFT algorithm finds these fundamental frequencies and displays them as peaks in the plot area.

Complex 'summed' frequency data occur frequently in biology (and in other areas of science).  For example, you might want to use an impedance converter to measure the heart rate in a small mammal or bird.   Unfortunately, in addition to heart rate, you will also pick up signals produced by breathing movements.  Therefore the instrument output will contain a confusing summation of the combined effects of breathing and heart rate.  It may also contain 'noise' from random or irregular events (such as muscle movement from minor postural adjustments).

Another example might be searching for a circadian 'signal' in long-term environmental data, as in the example above.  Although it is obviously complex, a visual inspection suggests that it does contain some regularity.  However, this periodicity is not readily studied with either the WAVEFORM or TIME SERIES operations.  Fortunately, the FFT procedure can help find the important underlying components of this complex wave.  In many cases it can detect basic cycles in a data set even if they are visually 'buried' by random noise.

The first step in the FFT procedure is selection of the size of the block of data to be analyzed.  The FFT algorithm requires that the block size be a power of two; depending on the size of your data set you can select any block size from 128 samples up to a maximum of 262,144 (256K) samples (in this example, the total number of samples in the file was about 700; accordingly, the largest possible block for FFT analysis is 32,568 samples).

After you select a block size, the program will prompt you to go to the plot window and select the block to be analyzed.  Do this by moving the cursor into the plot area, where it will outline a block of the size you selected.  Fit the cursor block over the subset of data you wish to analyze and click the mouse once.  This will select the desired FFT block.

Once the block is chosen, click the Do FFT button, and the FFT will be computed and displayed (depending on the block size and the complexity of the waveform, this may take several seconds).  Subsequently you can examine the details of the FFT, select another block size ( ‘∆ interval’ ), or exit.  You may choose whether or not the results are smoothed; they are always shown initially as 'raw' FFT scores.

After completing the FFT, the waveform's fundamental frequencies are shown graphically in the plot area.  An example from the waveform shown in the first image above is shown at right.   Note that the complex-appearing waveform can be described as the combination of two (or maybe thre) fundamental frequencies, shown in the plot area as sharp peaks.   You can examine the details of this structure by moving the cursor over the plot; the fundamental frequencies that have been 'decomposed' from the original signal, and their amplitudes (which are arbitrary but 'proportional' to other peaks and hence are useful for comparing among them), are shown numerically as peaks in the results window.   Another example of the FFT results window is shown below.

In this example, the analysis was performed on 16,384 points, and the strongest (most fundamental) underlying frequency in the waveform was almost exactly one day (this is unsurprising, since the data are of environmental temperature variation over several years).  The cursor is over one of the peaks, which corresponds to a period of 0.995 days and a magnitude (useful for comparisons among peaks) of 0.55 (magnitude data are displayed in the plot window data bar).  You have a choice of output units (frequency in Hz, kHz, etc.; period in sec, min, etc.).   The software will attempt to use the most reasonable units.

After the transform is complete, you can expand or shrink the plot window display using the spacebar or return key (similar to the regular 'entire file' versus 'one screenful' display modes modes), or smooth (or unsmooth) the data.

FFT results are stored in channel zero (not normally used by LabAnalyst); use the copy button to move them to a 'regular' data channel if you want to save them to disk (copying is only possible if the number of 'regular' channels is <40).  Alternately, you can use the 'save FFT…' button to produce an Excel-compatible or .cvs spreadsheet containing the frequency and magnitude data (saved in whatever frequency or period you selected with the popup menu) and amplitudes.

Note that if you click the exit button, you are transferred back to the original data channel.  You cannot get back to the FFT results in channel zero except by re-running the FFT procedure.


go to: