From: Nasser M. Abbasi on
Hello,

I wrote a small program for class to design a low pass digital filter. it is
an IIR filter designed using Butterworth.

We are given the specifications, and I have generated H(s) and H(z) (using
impulse invariance, and using bilinear methods).

What is considered as a "standard" output to print as a result of such a
design run? I am now printing the pole locations for Butterworth and for
H(z). I also print the spectrums (mag and phase).

I wanted to print H(s), but need to decide the best way to do this. I was
thinking to print only the coefficients of the denominator polynomial and
the numerator polynomial for both H(s) and H(z). i.e. write H(s) =
N(s)/D(s), and H(z)=N(z)/D(z), and make a table listing the power of s or z,
and the coefficient of this term.

Printing H(s) and H(z) itself is hard to format correctly due to size change
as order of the filter can change with each run, but printing the
coefficients only is easier to format as I can make a table, the length of
table can change, but I have more control of formatting its columns.

Would this be OK? Or is there another standard format I should be aware of
for this sort of thing? Any examples I can look at? I've seen many examples
googling around, but each seems to generate different output, and wanted to
check if there is a standard one.

thanks
--Nasser



From: Rune Allnor on
On 4 Mai, 04:51, "Nasser M. Abbasi" <n...(a)12000.org> wrote:


> Would this be OK? Or is there another standard format I should be aware of
> for this sort of thing? Any examples I can look at? I've seen many examples
> googling around, but each seems to generate different output, and wanted to
> check if there is a standard one.

As others already said, this as much about art as about anything
else.

I would prefer to keep internal data formats as generic as
possible, and instead derive whatever representations of the
system is required. When I wrote my filter design program I
kept everything represented as biquads internally, and derived
everything else from the biquads. It is far simpler to derive
a frequency response from a set of biquads than the other way
around.

What one ends up with, is a filter design program that designs
the set of biquads, and a set of functions for converting the
biquads to whatever format one wants. If somebody wants a
format you don't already can deliver, all you need to do is
to write nother formatting function.

Very convenient.

Rune