While looking for a "simple" but precise program for designing passive elliptic (Cauer) lowpass filters and to calculate the components of the resulting ladder structure, I found the marvelous and compact paper:

- Elliptic Approximation and Elliptic Filter Design on Small Computers by Pierre Amstutz, IEEE Transactions on Circuits and Systems (Volume: 25, Issue 12, December 1978), pp. 1001--1011.
- Correction to 'Elliptic Approximation and Elliptic Filter Design on Small Computers' by Pierre Amstutz, IEEE Transactions on Circuits and Systems (Volume: 30, Issue 10, October 1983), p. 776.

This document indeed contains two "all-inclusive" Fortran programs for symmetric and antimetric ladder lowpass design and component calculation. It's just for compiling and running from the command line, open source and portable, no window fuzz, no licence costs, isn't this handy? However the listings were in a rather bad print/scan quality, and the Fortran sources could not be found anywhere in the depths of the internet. So my sparetime task was set up to recover the original source code.

First the listings from the paper were OCR'ed by tesseract, with only very marginal success. Then came to a help the nice book from the early PC days:

- Circuit Design using Personal Computers by Thomas R. Cuthbert, Wiley Interscience, 1983.

In Program B9-2 (Symmetric Elliptical Filters) and Program B9-3 (Antimetric Elliptical Filters) the book contains BASIC renderings of Amstutz' Fortran programs. BASIC is still better than nothing, and this allowed already a reasonable OCR. A further internet search brought up yet another document:

- U18213 LPF Designer Documentation.docx by James A Crawford, 2012-15, Version 1.30.

In Appendix IV on pages 125 and 126 the paper contains crisp renderings of the two original BASIC programs by Cuthbert, which allowed quite acceptable OCRing by tesseract (still with many errors). The following work steps consisted of a bit tedious manual corrections to the BASIC sources, checking against the code from Cuthbert and Crawford, and bringing the programs to life again with the bwbasic interpreter on my debian Linux PC.

The recovered BASIC programs from Cuthbert and slightly modified versions are here for download:

- cuthbert-1983-antimetric.pet.bas Original antimetric filter design, archaic PET BASIC code.
- cuthbert-1983-antimetric.bas Antimetric filter design, code modified for bwbasic.
- cuthbert-1983-symmetric.pet.bas Original symmetric filter design, archaic PET BASIC code.
- cuthbert-1983-symmetric.bas Symmetric filter design, code modified for bwbasic.

Happily the BASIC code structure follows quite strictly the structure of Amstutz' Fortran code. The Fortran line numbers where already there, just a few variables needed renaming, and the BASIC language needed to be massaged into Fortran. So after another sparetime editing round, through the described BASIC lap of honor, finally the original Fortran code from Amstutz' paper could be recovered:

- amstutz-1978-antimetric.orig.for Original antimetric filter design, Fortran code.
- amstutz-1978-antimetric.for Antimetric filter design, code modified for gfortran.
- amstutz-1978-symmetric.orig.for Original symmetric filter design, Fortran code.
- amstutz-1978-symmetric.for Symmetric filter design, code modified for gfortran.

Playing with the Fortran programs was fun (looking forward to their 40th anniversary), and a check against the examples from Amstutz' paper gave identical results.

Nowadays it seems to be more handy to have a Lua rendering of the filter design code, e. g., as basis for a library, and since the Lua memory management allows to extend the filter order arbitrarily, within the limits of the double precision arithmetics. And even this can be easily alleviated by modifying the Lua code further to use the MPFR library through the LUA MPFR API.

From the Fortran code basis the conversion into Lua was a quite straightforward, easy task. Here are the Lua programs for elliptic filter design after Pierre Amstutz' code:

- amstutz-1978-antimetric.lua Antimetric filter design, Lua code.
- amstutz-1978-symmetric.lua Symmetric filter design, Lua code.

I checked the BASIC, Fortran, and Lua programs with a few examples also against the tables in the classic engineering book:

- Handbuch zum Filterentwurf, Handbook of Filter design by Rudolf Saal, AEG Fachbücher, Dr. Alfred Hüthig Verlag 1988.

The program results were very similar to the table values in the Handbook, also the sequence of attenuation poles was identical. Actually the code can replace a large part of the Handbook tables, with greater flexibility regarding the parameters and towards higher filter degrees. Now the above programs are waiting for their first practical application here...

Beware: There may be errors in the sources introduced by me through the OCR and editing process. No warranty!

Anyhow: Have fun!

This page first put online 07 November 2017.Copyright © 2001 - 2017 by Hartmut Henkel

Disclaimer

Impressum

Last file change: