DV247 Forums DV Retail Warehouse
Go Back   DV247 Forums > Music Equipment Discussion > Music Software
Forgot Password? Join Us!
Home Register Groups FAQ Members List Calendar Search Today's Posts Mark Forums Read Go to DV247.com
New to Forums or just joined? Why not start your journey here?

Music Software Virtual instruments, plug-ins, effects, audio-editing, processing & scoring software

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26th November 2008 , 05:33 PM
Professor Sunshine
 
EdRyan's Avatar
          
           
Join Date: Jul 2008
Location: Birmingham
Posts: 697
Default Filter Design questions...

Another programming related question. This time using Mathworks matlab..

I need to design the following FIR Filter

16K sample rate
3.625K cutoff, as a low pass

Best design using 60 taps (not including kaiser window)

The problem I'm having is specifying the transition width at the edge of the passband. I know its related to the sample rate, but can't remember exactly what it is. I've tried googling it and I just get a lot of stuff I don't need !
I'm also stuck on how you write the ideal low pass function equation as a piece of code...
And why specify the filter length (60) without including the window. Whats going on here ?

I realise it might be a bit too geeky here, but thought it might be worth a shot with people like Khazul, stagesound etc..
EdRyan is offline Offline
Reply With Quote
  #2 (permalink)  
Old 26th November 2008 , 05:55 PM
Furry Filter Phreak
 
Khazul's Avatar
          
           
Join Date: Jul 2008
Location: Reading, UK
Posts: 559
Default

Been a while since I mess with filters and I usually went for simpler reproductions of analog filter behaviour which you can hack up using basic integration techniques

Out of curiosity, whats your application for this - as this sounds quite steep?
Khazul is offline Offline
Last edited by Khazul; 26th November 2008 at 06:04 PM .
Reply With Quote
  #3 (permalink)  
Old 26th November 2008 , 06:05 PM
Professor Sunshine
 
EdRyan's Avatar
          
           
Join Date: Jul 2008
Location: Birmingham
Posts: 697
Default

This is a piece of coursework.

I struggle with the maths side of it lol.
EdRyan is offline Offline
Reply With Quote
  #4 (permalink)  
Old 26th November 2008 , 06:25 PM
Furry Filter Phreak
 
Khazul's Avatar
          
           
Join Date: Jul 2008
Location: Reading, UK
Posts: 559
Default

Ah OK... then you probably know way more than me - it not something the was available for study when I was young

As a guess from what little I know of some DSP theory - I think FIR filters are based upon calculating taps in the frequency domain - the more taps, the greater the accuracy of the filter response to a desired filter response. I think the window function effectly tells you the response for each tap.

Thinking about it - I dont get the thing about specifying the number of taps *not* including those within the window as I thought you basically only had to calculate (as a minumum) the taps within the window function - as anything outside is a zero and so can be omitted from some of the calculations - either yielding effectively a tend to zero or a tend to unity gain outide the window - depending on the filter repsonse type?

Within the window - I think more taps = more accurate fitting of the frequency repsonse curve to a desired frequency reponse - then the question becomes whats the definition of a 'best' design for the given application.
Khazul is offline Offline
Reply With Quote
  #5 (permalink)  
Old 26th November 2008 , 09:17 PM
Professor Sunshine
 
EdRyan's Avatar
          
           
Join Date: Jul 2008
Location: Birmingham
Posts: 697
Default

You are partly correct there dude.

The ideal transfer function of a filter is defined as an IIR and analogous process. As a result of that, it would have infinite + or - values. That means the filter couldn't be realised as a digital FIR.

The window function effectively transforms the ideal IIR function into a FIR by specifying N (tap) points. The easiest way of describing it is that it samples the shape of the filter. therefore, the more samples. the more accurate the digital version will be. There are other important factors associated with this. Things like ripple in the passband and rate of attenuation are also linked to the number of taps.

Alto, the moer taps you have, the more coeffecients you generate (I think)...and so he more demanding the filter is. Like you say, 'best' is just another word for comprimise.

I'm gonna email my tutor now and ask him about deltaf (passband width) and why he spec'd the taps without the window. It's a bit cryptic. Everyone else's either tells you straight which window to use, or specifies passband/ripple/attenuation functions that are more then a clue as to which window to use.. I jsut feel Im missing some info.
EdRyan is offline Offline
Reply With Quote
  #6 (permalink)  
Old 27th November 2008 , 02:50 PM
Professor Sunshine
 
EdRyan's Avatar
          
           
Join Date: Jul 2008
Location: Birmingham
Posts: 697
Default

sorted.

I was correct, it needed to be either 59 or 61 taps, to keep the filter order even. Essentially, the value of 0 has to be the extra 1. So that if you divide 61/2 ( to cover negative and positve ranges)..you get 30 taps in either direction, with the remaining 1 being used as 0.
Also found out the dsp board we're running on can't run at sample rates lower then 48k.

And his just meant to say not to use the kaiser window, use an alternative (I picked the blackman as its the next best overall).

Calculating the transition width turns out to be easy. The width of the blackman transition band is 5.5/N. So it's normalised value is 5.5/60. You can then go one step 'backwards' with equations and calculate the non normal transfer required.

And so, I present to you lot. My linear phase low pass filter



I've jsut gotta write the program to derive the co-effs, and then load them onto the dsp codec...and I will have my first working dsp hardware routine
EdRyan is offline Offline
Last edited by EdRyan; 27th November 2008 at 08:35 PM .
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trevor Horn N.I.ne Questions sureno The Hot Link 3 4th October 2008 05:46 PM
Recording vinyl questions EdRyan Pro Audio 15 1st September 2008 09:19 PM
Ben Burtt on Wall•E sound design! JBL4645 Off Topic 5 28th August 2008 09:54 PM


All times are GMT. The time now is 05:40 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 1999-2008 Digital Village. All rights reserved.