• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

ALLSIGNALPROCESSING.COM

Learn signal processing online

  • Home
  • Courses
  • Courses
  • About
  • FAQ
  • My Account
  • Blog
  • News
  • Contact
  • Login
  • Logout
  • Get All Access

Very Low Frequency Filtering: Do It Right Using Downsampling

December 14, 2014 by 3200 Creative

Very Low Frequency Filtering

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 z=1 in the z-plane.  The figure at left illustrates a low pass filter whose poles are about 0.001 from z=1.  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

y[n] = \alpha y[n-1] + \beta x[n]

and the frequency response is

H(e^{j2\pi f /f_s}) = \beta/(1-\alpha e^{j2\pi f /f_s})

where f is frequency in Hz and f_s is the sampling frequency.  Note that here we have written discrete-time frequency \omega = 2\pi f/f_s.  Unit gain at f=0 is obtained when  \beta = 1-\alpha . Now suppose we find the pole location \alpha required to achieve a half-power cutoff frequency at f_c Hz.  A list of the values of \alpha required for decreasing values of f_c/f_s is:

f_c/f_s= 0.1 \rightarrow \alpha =  0.5441

f_c/f_s=0.01\rightarrow \alpha =  0.9391

f_c/f_s= 0.001 \rightarrow \alpha =  0.9937

f_c/f_s= 0.0001 \rightarrow \alpha = 0.9994

An example corresponding to the last case is f_s = 1000 Hz and f_c = 0.1 Hz. Note that each factor of ten decrease in f_c/f_s, \beta decreases by approximately a factor of ten. The factor of 10 decrease from f_c/f_s = 0.001 to f_c/f_s = 0.0001 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 af_c = 0.01 - 0.1 Hz band pass filter but our data is sampled at f_s=1000 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.

Very Low Frequency Filtering by Downsampling
Reducing the Sampling Rate by 1000 Prior to Filtering. The passband of the low-pass filter in the downsampling operation is specified in units of rads as a discrete-time frequency.

Filed Under: Blog

Primary Sidebar

Courses

  • Foundations

  • Time Domain LTI Systems

  • Fourier Series and Transforms

  • Sampling and Reconstruction

  • The DFT and Applications

  • The Z-Transform

  • Intro to Filter Design

  • IIR Filter Design

  • FIR Filter Design

  • Random Signal Characterization

  • Basis Representations of Signals

  • Estimation of Power Spectra and Coherence

  • Introduction to Signal Estimation and Detection Theory

  • MMSE Filtering and Least-Squares Problems

Copyright © 2023 ALLSIGNALPROCESSING.COM | Site Design by 3200 Creative

  • Terms of Service
  • Privacy Policy
  • Contact