# Category : C Source Code

Archive : CEPHES22.ZIP

Filename : ELLF.DOC

*

* This program calculates design coefficients for

* elliptic function digital filters.

*

* Inputs are entered by keyboard, as follows:

*

* Type of filter (1: low pass, 2: band pass, 3: high pass,

* 4: band reject, 0: exit to monitor)

* Order of filter (an integer)

* Passband ripple (peak to peak decibels)

* Sampling frequency (Hz)

* Passband edge frequency (Hz)

* Second passband edge frequency (for band pass or reject filters)

* Stop band edge frequency (Hz)

* or stop band attenuation (entered as -decibels)

*

* 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 return instead of typing it in again.

*

* The program displays all pass band and stop band edge frequencies,

* and the stop band attenuation. The z-plane coefficients are

* printed in these forms:

* Numerator and denominator z polynomial coefficients

* Pole and zero locations

* Polynomial coefficients of quadratic factors

*

* The following mathematical subroutines are required:

* asin(), atan(), atan2(), cos(), ellik()

* ellpj(), ellpk(), exp(), log(), sin(), sqrt().

* Of these, all but the elliptic functions are available in

* standard C function libraries.

*

* References:

* 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

*

*

* ellf.c

*

* System dependent aspects:

*

* This program has been tested on IBM PC with Microsoft C;

* DEC PDP-11 with Whitesmiths C; and DEC VAX with VAX C.

* All answers agreed within 1 in the last reported decimal place.

*

* It was also tried on a Unisoft 68000 Unix system, but did

* not work. The reason was traced to a serious problem

* in Unisoft's floating point arithmetic -- so that

* particular attempt was abandoned.

*

* The code was compiled without any complaints by the

* Greenhills 68000 cross compiler running on a VAX;

* but the object code was not tested.

*

* You need: this file; the three elliptic functions ellik.c,

* ellpk.c, and ellpj.c; and perhaps const.c (possibly named

* mthutl.c). If you don't have the necessary constants,

* define UNK below to be 1 and hope your C compiler converts

* the decimal values correctly.

*

* See the accompanying output listing file ellf.ans

* for a set of correct answers. 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 DECPDP to be 0. This should work

* with most Unix-like function libraries.

*

* All static variables are initialized in order to make

* the Whitesmiths C compiler happy.

*

* The program has been cut up into rather arbitrary subroutines

* to get it safely through the Microsoft C compiler on IBM PC.

*

* Function abs(x) returns the double precision absolute

* value of x. Function polevl() is needed by ellpk();

* Both abs() and polevl() are included with this listing.

*

*

* Steve Moshier, December 1986

*/

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/