B U F F E R S A N D S A M P L E R A T E
A P P E N D I X A
transform, however, is that it needs to “know” the temporal signal over a time domain of ±infinity.
Needless to say, this is not practical.
We can limit the time domain T to a limited number of samples (equal to the “slice” of time represented
by the
DSP Buffer
) if we assume the temporal signal to repeat continuously, with a period T. The
result is, however, no longer a continuous function of the frequency, but a discrete function, that is, the
power spectrum is only calculated at frequency intervals equal to 1/T. These discrete frequencies are
called
bins.
These bins can be envisioned as a series of 1/T Hz wide parallel filters, spaced every 1/T
Hz. Each bin “fills” with the average power at its center frequency and averaged over 1/T Hz. The
frequency resolution is therefore limited to 1/T Hz.
Because we assume the time domain signal at hand to repeat with period T, any discontinuity
between the last sample in a buffer and the first sample in the next buffer will violate this
condition. To understand this, it helps to know that the result of an FFT is complex, including
magnitude and phase information (this is even true if the temporal signal is real). In other
words, rather than on a straight line, the FFT writes the data on a circle in the complex plane,
where one revolution represents N/T Hz (N being the number of samples in the DSP Buffer).
When the last sample in the DSP Buffer meets the first sample in the next DSP Buffer, chances
are they will not meet in a continuous fashion. Any discontinuity will lead to a wide associated
spectrum across multiple bins, a phenomenon known as “bleed-through”.
Another way of looking at this is that a signal with period T (and any harmonic thereof), can be
represented as a combination of its fundamental frequency 1/T Hz and higher order harmonics,
all spaced at multiples of its fundamental frequency. These spectral components are therefore
at the center of each FFT bin. If on the other hand, the temporal signal does not have a
periodicity equal to (an integer multiple of )the fundamental frequency, it's spectral components
will not be centered on each bin and bleed through will occur from one bin to the next, resulting
in a loss of frequency resolution.
To avoid this happening, the samples in the DSP Buffer are first multiplied by a window function
(see page 83 and Appendix D), such that the spectral smearing is limited, but it is not
completely eliminated. Each window function has advantages and disadvantages depending on
the situation at hand. For our purposes, the Blackman-Harris window offers the best trade-off
between loss of frequency resolution and stop-band characteristics.
The time slice T that the DSP buffer represents, often called the FFT size, equals the number of
samples it can hold (the Buffer size N) divided by the
Sample Rate
f
s
, e.g. if the Buffer size equals
1024 and the sample rate 96kHz, the DSP Buffer represents a time slice of 1024/96kHz = 10.67ms.
If a signal suddenly appears, we will need to wait until the Buffer is filled, at which time it can
be processed by the FFT. Waiting for the buffer to fill limits our resolution in the time domain
(we have to wait T seconds). This temporal resolution is also known as latency: a high temporal
resolution equals a low latency. To decrease our latency (increase our temporal resolution), we
therefore need to keep T
small
by either reducing the Buffer size or increasing the Sample
Rate, or both.
However, we have already seen that the frequency resolution equals 1/T Hz (ignoring effects
due to windowing). Therefore to increase frequency resolution, we need to increase T as much
as possible by using a
large
Buffer Size and a low Sample Rate. It is this frequency resolution
that determines the possible steepness and narrowness of our filters. A higher resolution
enables steeper and narrower filters.
176
2003-2009 FlexRadio Systems