ELLF Digital Filter Calculator

  Get source code and executable program ellf.zip:

  This program calculates design coefficients for infinite impulse response (IIR) digital filters of the Butterworth, Chebyshev, or Cauer elliptic varieties. C compiler build scripts are provided for Borland C++ 4.5, Microsoft Visual C++ 6, Micrsoft C (old) version 6, gcc and Unix compilers. Latest update 6/4/00.



  Inputs are entered by keyboard, or are redirected to come from a command file, as follows:

  The "exit to monitor" type 0 may be used to terminate the program when input is redirected to come from a command file.

  If your specification is illegal, e.g. the stop band edge is in the middle of the passband, the program will make you start over. However, it remembers and displays the last value of each parameter entered. To use the same value, just hit carriage return instead of typing it in again.

  The program displays relevant pass band and stop band edge frequencies and stop band attenuation. The z-plane coefficients are printed in these forms:

  After giving all the coefficients, the program prints a table of the frequency response of the filter. You can get a picture by reading the table into gnuplot.


Filter design

  The output coefficients of primary interest are shown as follows:

  (z-plane pole location:)
pole 3.0050282041410E-001 9.3475816516366E-001
(quadratic factors:)
q. f.
z**2 9.6407477241696E-001
z**1 -6.0100564082819E-001
(center frequency, gain at f0, and gain at 0 Hz:)
f0 2.00496167E+003 gain 2.9238E+001 DC gain 7.3364E-001
zero 1.7886295237392E-001 9.8387399816648E-001
q. f.
z**2 1.0000000000000E+000
z**1 -3.5772590474783E-001
f0 2.21379064E+003 gain 0.0000E+000 DC gain 1.6423E+000

  To make a biquad filter from this, the equation for the output y(i) at the i-th sample as a function of the input x(i) at the i-th sample is

  y(i) + -6.0100564082819E-001 y(i-1) + 9.6407477241696E-001 y(i-2) = x(i) + -3.5772590474783E-001 x(i-1) + 1.0000000000000E+000 x(i-2).

  Thus the two coefficients for the pole would normally be negated in a typical implementation of the filter.



  This program has been compiled successfully on many different computers. See the accompanying output listing file ellf.ans, for a set of correct answers. Use the batch file test.bat to check your executable program. If the low pass and high pass options work but the others don't, then examine your atan2() function carefully for reversed arguments or perhaps an offest of pi. On most systems, define ANSIC to be 1. This sets the expected atan2() arguments but does not otherwise imply anything about the ANSI-ness of the program.



system configuration include file. Be sure to define type of computer here!
complex arithmetic subroutine package
right answer file for some elliptic filters
elliptic filter questions
main program
this file
Microsoft MSDOS makefile
Unix makefile
incomplete elliptic integral of the first kind
complete elliptic integral of the second kind
Jacobian Elliptic Functions
complete elliptic integral of the first kind
Unix makefile
common math function error handler
evaluates polynomials
batch file to run a test
VAX makefile
VAX makefile
VAX test



  A. H. Gray, Jr., and J. D. Markel, "A Computer Program for Designing Digital Elliptic Filters", IEEE Transactions on Acoustics, Speech, and Signal Processing 6, 529-538 (December, 1976)

  B. Gold and C. M. Rader, Digital Processing of Signals, McGraw-Hill, Inc. 1969, pp 61-90

  M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards AMS 55, 1964, Chapters 16 and 17

  - Steve Moshier, December 1986

Last rev: November, 1992

  Get ellf.zip:

  Up to home page:
The URL of this file is http://www.moshier.net/index.html.
Last update: 6 August 2000