|
| WaveWarp 2.0 Example DrawingBoard

TrackingSpectralThreePeakDetectionEducationalExample
Description
Tracking Spectral Three Peak Detection Educational Example
Illustrates the use of the Tracking 3-Peak Detector for determining the frequencies and amplitudes of the 3 dominant
spectral components in an audio signal. See the "TrackingPeakDetectionEducationalExample" for a detailed discussion on
the use of the FFT with phase tracking for instantaneous spectral peak determination. The extension to 3 peaks (instead of
just the dominant peak) is straightforward.
Run the DrawingBoard and observe (in the first, third, and fifth Simple Control Displays, respectively) that the peak
frequencies detected (with the default DrawingBoard settings) are 715.01 Hz, 79.96 Hz, and 3066.04 Hz. These represent
the approximations to the true frequencies (as set in the Sine Wave Generators) of 715 Hz, 80 Hz, and 3066 Hz,
respectively. The measurements are thus very close to the true values, despite the finite resolution of the FFT. This
illustrates how the phase tracking technique (implemented in the Tracking 3-Peak Detector) can be used to circumvent the
raw frequency resolution limitations associated with the FFT (see the "SpectralThreePeakDetectionEducationalExample"
DrawingBoard which is based on the simple method of identifying the FFT bins containing the largest values. By
comparison, for the same DrawingBoard settings, the simpler approach yields discrepancies in the determination of the
frequencies of approximately 21.5 Hz which corresponds to the frequency resolution limit for the chosen FFT settings).
Although the phase-tracking technique can alleviate the problem of limited frequency resolution associated with the FFT,
another limitation of the FFT representation is that the input signal is treated as a purely periodic signal which is exactly
repeated at intervals determined by the FFT buffer length. This means that only those input signals which happen to be
exactly periodic with respect to the FFT buffer length will be accurately represented by the FFT. Any signal which is not
exactly periodic with respect to the FFT buffer length will be "smeared" by the FFT into multiple frequency bins, yielding
an erroneous representation of the true spectral characteristics. Another way of interpreting this phenomenon is to consider
that a signal which is not exactly periodic with respect to the FFT buffer length will have "discontinuities" at the boundaries
between successive FFT buffer frames. Under the FFT transformation, these discontinuities introduce spurious spectral
contributions which are not present in the actual signal. Using this DrawingBoard, you can appreciate the effect of these
anomalies by slowly changing the frequency of the input signal whilst keeping its amplitude constant, and whilst keeping
the FFT buffer length constant. As the period of the signal changes with respect to the period determined by the FFT
buffer length, the peak detector amplitude output will not show a constant value, even though the signal amplitude is
unchanged.
The classic technique for reducing these anomalies is to "window" the input signal before performing the FFT. This
amounts to pre-multiplying the input data by a smooth function which falls to zero at the edges of the frame boundaries, thus
smoothing out the discontinuities and eliminating much of the spurious spectral content. You can investigate the effect of
windowing with this Drawing Board by selecting, say, the "Hanning" window type (instead of the default "None") and
repeating the previous exercise, i.e. varying the frequency of the input signal without changing its amplitude or FFT buffer
length. You will note that the amplitude output of the peak detector is now almost constant irrespective of the frequency,
thus demonstrating that the windowing has successfully eliminated most of the spurious spectral content associated with
the un-windowed case. However, you will also note that the numerical value of the detected rms amplitude is not exactly
what it should be. This is an unavoidable consequence of windowing whereby the effect of pre-multiplying the data by a
smoothing function is to modify the input signal from its original form. Generally, the amplitude of the signal is reduced
(particularly in the tails of the window) which explains why the amplitude output from the peak detector is generally
numerically smaller (but constant !) when compared with the un-windowed case.
Components used:

|
|