xfir - Finite Impulse Response Filter Design

Contents

Synopsis


-----------------------------------------------------------------------------
EEP 3.1  Max-Planck-Institute of Cognitive Neuroscience 1996-99
xfir 3.2   (OSF1 V4.0 alpha)                  Wed Sep 15 13:30:18 1999
-----------------------------------------------------------------------------
  xfir [<fir>]


Description

xfir is a X/Motif based Finite Impulse Response(FIR) Filter design program. It allows the interactive design of the filter coefficient sets which are needed by cntfilter, xcnt, avrfilter and xavr to filter signals.

Usage

You will enter the desired design method and filter characteristics in the File - Modify dialog and calculate the actual response using the Apply button of this dialog. This must be repeated until an acceptable solution is found. The result can be written to disk as a .fir file using File - Save.

The filter length must be an odd number and all the frequencies must have plausible values. The error checking is quite sensitive but the messages are spartan.

The Remez-Exchange design offers an Auto toggle. When set, xfir ignores the given length and tries to find the shortest filter which fullfills the given passband ripple and stopband gain requirements. The optimization which is done here is not very sophisticated. It is slow, it fails often to find any solution - especially for "extreme" filters (see below) and you can stop it only by cancelling the whole program...

xfir is integrated with the EEP viewer programs. With Options - Export Now, the current filter is exported (surprise!) and all instances of xcnt and/or xavr at the same screen show how the data would look if they were filtered with this coefficient set. With the Options - Export Always toggle enabled, this is done automatically for each calculated filter. Note that this can be slow for expensive filters.

The xfir Screen

The upper two diagrams show the actual (black) and the desired(red-dotted) magnitude response, according to the actual design parameters. Fourier Series filters have a desired stopband gain of -infinite dB; this is replaced with -90 dB to allow the display at a finite monitor. The frequency axis limits are configurable via the Options - Format dialog.

The desired response is not displayed when the filter cofficients are loaded from a file. The design parameters are not reliably known in this case.

The lower diagram shows a sample 1 Hz rectangular pulse (red-dotted) and it's filtered version (black). The textfield lists some attributes and characteristic points of the actual filter.

screenshot
xfir screenshot

Practical Design Rules

FIR Files

The files created by xfir are different from the classic EEP 2.0 *.fir files. They store both the filter design parameters and the calculated FIR coefficients. EEP 2.0 had a separate configuration file for the design.

EEP 3.1 modules (xfir, xcnt, xavr, cntfilter, avrfilter) can read the filter coefficients from both flavours of *.fir. xfir can read the filter design only from its own files. The EEP 2.0 programs cannot read the new *.fir files. Use your favourite text editor for conversions.

Some example fir files are available.

References

The SciPlot Widget
Copyright (c) 1996 Robert W. McMullen

FIR LINEAR PHASE FILTER DESIGN PROGRAM
James H. McClellan, Thomas W. Parks, Lawrence R. Rabiner

Rorabaugh, Britt.
Digital Filter Designer's Handbook, McGraw-Hill 1993


EEP 3.1 - MPI/ANT(eeprobe@ant-software.nl), 15.09.1999
Copyright © 1996-99 Max-Planck-Institute of Cognitive Neuroscience. All rights reserved.