by Barry Van Veen
Interest in signals that are a very small fraction of the sampling frequency is increasingly common due to the widespread availability of high speed digital-to-analog converters. For example, infra-slow oscillations (0.01 - 0.1 Hz) are sometimes of interest in electroencephalography (EEG) for understanding large-scale cortical organization. EEG signals are often sampled at 500 Hz or more. Isolating very low frequency signals requires a more sophisticated approach than directly filtering the data. The solution is to use downsampling to change the sampling rate.
Very Low Frequency Filtering: The Problem
It is not wise to directly design an IIR low pass filter that has a passband a very small fraction, say less than 1%, of the sampling frequency. Such filters require extremely high numerical precision for both design and implementation. This is because IIR filters normally cluster poles close to the unit circle in the vicinity of frequencies corresponding to the passband. (See Frequency Response Magnitude from Poles and Zeros.) If the filter passband is a very small fraction of the sampling frequency, then the poles must be clustered very close together in the vicinity of in the
-plane. The figure at left illustrates a low pass filter whose poles are about 0.001 from
. Very small perturbations of the filter coefficients, such as caused by numerical rounding, can cause the poles to move slightly. The frequency response magnitude is very sensitive to the pole locations when poles are close to the unit circle, so slight movement of the poles ruins the desired frequency response.
To illustrate this problem, consider designing a first-order all pole lowpass filter. A difference equation describing this filter is
and the frequency response is
where is frequency in Hz and
is the sampling frequency. Note that here we have written discrete-time frequency
. Unit gain at
is obtained when
. Now suppose we find the pole location
required to achieve a half-power cutoff frequency at
Hz. A list of the values of
required for decreasing values of
is:
0.5441
0.9391
0.9937
0.9994
An example corresponding to the last case is Hz and
Hz. Note that each factor of ten decrease in
,
decreases by approximately a factor of ten. The factor of 10 decrease from
to
corresponds to less than a one percent change in the pole location. Clearly the filter characteristics become extremely sensitive to pole locations when the poles are very close to the unit circle.
The problem illustrated above is even more severe for bandpass filters or higher order filters.
Very Low Frequency Filtering: The Solution
Fortunately there is a simple solution to the very low frequency filtering problem. We can decrease the effective sampling rate by downsampling the signal. In its simplest implementation, downsampling involves throwing away samples. For example, in order to reduce the sampling rate by a factor of five, we only keep every fifth sample. Samples at indices which are not an integer multiple of five are discarded. This process can cause aliasing, so a discrete-time low pass filter is applied before discarding samples. This process is described in more detail in Downsampling: Reducing the Sampling Rate.
Large reductions in the sampling frequency are best accomplished in multiple stages, so that the lowpass filter applied before discarding data does not suffer from the very problem that we are trying to avoid. I usually like to limit the reduction in the sampling rate to a factor of ten in any one stage. For example, returning the the infra-slow EEG filtering problem, suppose we seek a Hz band pass filter but our data is sampled at
Hz. I would successively reduce the sampling frequency by a factor of ten in each of three stages, as illustrated below. Hence the effective sampling rate at the output of the third stage is 1 Hz and the desired passband ranges from 1% to 10% of the sampling frequency. This leads to a much, much easier filtering problem.
