Nicolas.Brisset at eurocopter.com
Thu Nov 24 18:31:06 CET 2005
> Is this an IIR filter implementation? Or FIR? FIR can be
> pretty slow for large SR to cutoff ratios (though there are
> some special case exceptions, like sequential boxcars). IIRs
> can quickly become unstable.
Yes, this is an IIR filter implementation.
> Can you provide a reference (pref online) for how this filter
> implementation works? Over what range of coefficients is it stable?
This implementation uses a standard bilinear transform. The nice thing
here is that the polynom class handles all the computations you would
need to do by hand. The files I committed are quite small and contain
some comments. You may want to look at the filter constructor to see how
it works in more detail. I don't have links to online documentation, as
this has been developed by a colleague of mine in an effort to provide a
generic filter implementation. We have investigated the stability issues
a bit and noticed that an 8th order Butterworth filter has indeed some
numeric instability, which is helped by a synthesis using only
biquadratic cells. This is also why the classes use templates, and are
currently instantiated with long doubles. But you are right, in
principle there can be stability problems. You just have to use
reasonable orders and it should not be a problem in practice.
> > will be causal (which is not the case right now)
> But will not be zero phase shift (which is the case right now).
> You always have a choice: causal, with a phase shift (which
> can be fairly flat, eg, Bessel filter, or a symetric time
> domain FIR, or really whacky, like a Butterworth, or any
> IIR), or acausal, but zero phase, as with our current fourier
We seem to have different uses of filters. We always want to use filters
that we can implement in our real-time controllers (i.e., causal
discrete filters). If you are looking at data offline, there are indeed
other possibilities. In that respect, we were actually even wondering
why you don't use cardinal filters (i.e. once you are in the frequency
domain, remove all points whith frequencies you want to exclude before
coming back to the time domain) ?
Feel free to ask further questions, or experiment with this plugin (once
the link problems are solved!). I believe it has potential for some
users (at least, it does for us!).
In the longer term, we were discussing an even nicer idea: we could
develop a kst extension with means to visually define filter specs and
see immediately the result (a bit like in Matlab's filter design
toolbox, but with the real curve). If anybody is interested, we can
spawn a more focussed discussion.
More information about the Kst