Page 1 of 1

On-Line FIR Filter Resource?

PostPosted: Sun Apr 02, 2017 4:06 pm
by Steve Anderson
Any ideas on a source of either on-line or off-line FIR filter coefficients calculator? I'm currently using T-Filter which isn't that flexible. I've Googled and come across a few but they're all lacking in some area or another. Any suggestions? Matlab will do it, but at a price!

I DO NOT want to do the calculations by hand!!

Steve A.

Re: On-Line FIR Filter Resource?

PostPosted: Sun Apr 02, 2017 6:12 pm
by Andrew Davie
Are you aware of Octave? It's a free compatible replacement for Matlab.

Re: On-Line FIR Filter Resource?

PostPosted: Sun Apr 02, 2017 7:34 pm
by Steve Anderson
Nope, a new one to me. I'll certainly have a look at it.

Steve A.

Re: On-Line FIR Filter Resource?

PostPosted: Mon Apr 03, 2017 2:53 pm
by Steve Anderson
I've had a look at Octave, It's largely compatible with Matlab. But not being familiar with either it's going to be quite a steep learning curve. Something I'm going to have to defer until I have the time.

In the meantime I'll work on getting the basic filtering code into a PIC and test it. For other filter types/specification it's a simple case of changing coefficients/quantity of delay taps/sample rates as required.

I suspect the T-Filter site I mentioned only generates Butterworth filters, there's no options for Bessel or any others. The output ringing is consistent whatever filter you design...just like an analogue Butterworth version...though it is phase-linear. There is no mention of the windowing used, if any. Example follows.

Steve A.

Re: On-Line FIR Filter Resource?

PostPosted: Mon Apr 03, 2017 3:44 pm
by gary
http://www-users.cs.york.ac.uk/~fisher/ ... /trad.html

Edit: apologies, I see you want a FIR filter - a Bessel is an IIR filter (I think the best you can do for FIR is an approximation).

This might be as close as you will get:
http://www.arc.id.au/FilterDesign.html

Edit 2: By approximation I mean design a Bessel IIR filter then window the coefficients with a window of choice to create an FIR response.

Re: On-Line FIR Filter Resource?

PostPosted: Mon Apr 03, 2017 5:31 pm
by Steve Anderson
Thanks Gary, I'll check it out.

However, the more I look into this the more I'm beginning to think the problem is a result of successive analog filters in the chain rather than a single source of the overshoot I'm getting. I need to investigate this further.

But this is an interesting and educational exercise in its right and may result in the elimination of most, if not all analogue filters.

Steve A.

Re: On-Line FIR Filter Resource?

PostPosted: Mon Apr 03, 2017 11:47 pm
by Klaas Robers
Steve, in TV technology we always used Butterworth filters as a usefull compromise between filtering and ringing. In analogue filters an all pass section was added to devide half the ringing from after to before the transient. This ringing gives an impression of sharpness, so there is no need to avoid it.

The curve that you gave looks familiar to me, this is quite optimal for video. My analogue filter, 7th order Butterworth with second order all pass, gives comparable transients. It is nor completely symetrical, which the FIR filter is. So that is slightly better.

Re: On-Line FIR Filter Resource?

PostPosted: Tue Apr 04, 2017 11:50 am
by Steve Anderson
I agree Klaas, and its use in NBTV and SSTV could be advantageous. But there are other applications where you really don't want any ringing, so I'm trying to find a lazy-mans way to generate the coefficients without all the effort usually required. But no real success thus far.

I'm going to give it a try 'as is; if nothing else than to generate a FIR module in code that can be used when eventually I find a user-friendly coefficient generator for various other filter types. After that I may try the same exercise for IIR filters.

This is nothing new and has been in use for years/decades, I could ask others to do it for me but I prefer to do things myself if it's within my capabilities.

Steve A.

Re: On-Line FIR Filter Resource?

PostPosted: Thu Apr 06, 2017 5:59 pm
by ppppenguin
The most powerful FIR design method is Parks-McLellan, often called Remez or Remez Exchange. I make no claim to understand the maths. Some years ago I used a 30 day free trial version of the expensive Nuhertz filter design software to do some "brick wall" filters with many dozens of taps.
http://www.nuhertz.com/

Somebody made the point that FIRs are linear phase. This is true if the coefficients are symmetric but not otherwise.

For conventional Butterworth, Bessel etc filters an IIR will usually implement in less hardware/processor cycles than a FIR. Of course it won't be linear phase.

Thanks for mentioning Octave - I hadn't realised thre was a free alternative to Matlab. Looking around, it seems there are some Remez tools available for Octave.