- From: Daniel Nilsson <daniel_at_oden.homeip.net>
- Date: Sun, 6 Mar 2005 22:26:21 -0500
On Sun, Mar 06, 2005 at 10:07:06PM -0500, Sandy Pond wrote: > On Sun, 2005-03-06 at 18:32 -0500, Daniel Nilsson wrote: > > > I've been playing with different kinds of filters to compare > > performance, while doing so I found that I could create an IIR filter > > with a relatively small order (4 for example) that would act as a very > > efficient low-pass filter. To get the same characteristics using an > > FIR filter I had to create a much higer order (>30), this makes sense > > to me. Correct me if I'm wrong... > > Although your question wasn't directed to me I suggest you try comparing > to a 4 order of the low_pass_filter.c I posted before. Didn't really intend to make it directed actually, your answers are very welcome ! > I attached an example2_low_pass_filter.c which uses 4 poles. Thanks, I have been looking at your code trying to figure out if you are implementing an FIR or IIR filter ? Or is it some other kind of filter ? Sorry for the basic questions here... I found some free FIR filter implementations in C as well if anyone else following this thread is interested: http://www.dspguru.com/sw/opendsp/alglib.htm > > From reading various FAQs I find that one of the concerns with IIR > > filter over FIR filters is stability. Would that be a concern in an > > application where I use samples from Comedi ? > > > > Since the low_pass_filter.c has no zeros it's always stable and > guarantied to have unity steady state gain. The code is very efficient > as well. That sounds good, I'll give your code a try. I'm been working in octave to filter my samples (hacked up one of the comedi demos to just dump the data in a format that can be read into octave). I can't figure out from you code how to extract the A and B filter coefficients though so that I can run my samples using your filter using the filter and freqz functions in octave (or Matlab) ? Thanks -- Daniel Nilsson
Received on 2005-03-07Z03:26:21