On-Line FIR Filter Resource?

Anything not specifically related to NBTV, but at least of some technical nature that might be of interest to NBTV members. Items for sale and links to retailers do not belong here.

Moderators: Dave Moll, Steve Anderson

On-Line FIR Filter Resource?

Postby Steve Anderson » Sun Apr 02, 2017 4:06 pm

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.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: On-Line FIR Filter Resource?

Postby Andrew Davie » Sun Apr 02, 2017 6:12 pm

Are you aware of Octave? It's a free compatible replacement for Matlab.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: On-Line FIR Filter Resource?

Postby Steve Anderson » Sun Apr 02, 2017 7:34 pm

Nope, a new one to me. I'll certainly have a look at it.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: On-Line FIR Filter Resource?

Postby Steve Anderson » Mon Apr 03, 2017 2:53 pm

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.
Attachments
T-Filter Step Response !.gif
T-Filter Step Response !.gif (7.14 KiB) Viewed 9669 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: On-Line FIR Filter Resource?

Postby gary » Mon Apr 03, 2017 3:44 pm

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.
gary
 

Re: On-Line FIR Filter Resource?

Postby Steve Anderson » Mon Apr 03, 2017 5:31 pm

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.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: On-Line FIR Filter Resource?

Postby Klaas Robers » Mon Apr 03, 2017 11:47 pm

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.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: On-Line FIR Filter Resource?

Postby Steve Anderson » Tue Apr 04, 2017 11:50 am

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.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: On-Line FIR Filter Resource?

Postby ppppenguin » Thu Apr 06, 2017 5:59 pm

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.
Jeffrey Borinsky www.borinsky.co.uk
User avatar
ppppenguin
Research Scientist
 
Posts: 44
Joined: Fri Nov 04, 2016 5:30 am


Return to Off Topic

Who is online

Users browsing this forum: No registered users and 11 guests

cron