DSPRelated.com
Forums

FIR windowing design

Started by pinkisntwell December 9, 2009
On Dec 10, 1:00&#4294967295;pm, Grant Griffin <nob...@example.com> wrote:
> pinkisntwell wrote: > > Let's say I decide on a desired frequency response, for example a > > highpass filter with zero phase. I can then take the samples of that > > frequency response and take their inverse DFT to get the impulse > > response of a truncated IIR system, essentially windowed with the > > rectangular window. I can then calculate its frequency response and > > plot it:http://i47.tinypic.com/vrg941.pngLW > > > If I apply the Hanning window to that impulse response (so the peak of > > the Hanning window is in the middle of my impulse response, as > > described by Oppenheim) the frequency response is unsatisfactory: > >http://i50.tinypic.com/103wktu.jpgLE > > > I need to circularly shift the impulse response by roughly N/2, where > > N the length of the response, to get a satisfying result: > >http://i50.tinypic.com/2ly036d.pngLR > > > Why is it so? In Discrete-Time Signal Processing Oppenheim doesn't > > mention this problem. > > The method of window-based FIR design that I'm more familiar with is the > &#4294967295; &#4294967295;method of designing by windowing the sinc function. &#4294967295;Steven Smith > gives a very nice explanation of that in Chapter 16 of his book "The > Scientist and Engineer's Guide to Digital Signal Processing", which is > available online athttp://www.dspguide.com/ch16.htmLJ. &#4294967295;The formulas are > fairly simple to &#4294967295;implement in the programming language of your choice. > &#4294967295; (Smith uses BASIC <silly-boy>.) > > Iowegian's ScopeFIR provides this as one of its FIR design methods, > along with several others such as the much more popular Parks-McClellan. > &#4294967295; In my experience, the benefits of the windowed sync approach compared > to PM are: > > 1) The filter can be designed directly by formula rather than by > iteration: therefore, there's no possibility of the filter design > process failing to converge; at worst, the filter doesn't meet your > specifications. &#4294967295;This might be important in embedded applications where > the FIR response is designed on the fly. &#4294967295;However, it's not important > for the more common case where the filter is designed in advance and is > fixed throughout the life of the system > 2) You can have more gentle rolloff and can have monotonic responses. > In that vein, one of my personal favorites <nerd-alert> is the Gaussian > window. &#4294967295;It's not a champion, but it's more gentle on the spectrum than > Puffs tissues are on the nose > <hoping-to-pick-up-Tiger-Woods'-lost-endorsements>. > > Grant
Your comment is indeed informative and thus welcome, but it doesn't address the original issue.
On 10 Des, 16:42, pinkisntwell <pinkisntw...@gmail.com> wrote:
> On Dec 10, 12:44&#4294967295;pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On 10 Des, 13:24, pinkisntwell <pinkisntw.....@gmail.com> wrote: > > > > On Dec 10, 11:57&#4294967295;am, Rune Allnor <all.....@tele.ntnu.no> wrote: > > > > > On 10 Des, 04:03, pinkisntwell <pinkisntw.......@gmail.com> wrote: > > > > > > Let's say I decide on a desired frequency response, for example a > > > > > highpass filter with zero phase. I can then take the samples of that > > > > > frequency response and take their inverse DFT to get the impulse > > > > > response of a truncated IIR system, essentially windowed with the > > > > > rectangular window. > > > > > Why is it so? In Discrete-Time Signal Processing Oppenheim doesn't > > > > > mention this problem. > > > > > Just out of curiosity - where does Oppenheim and Schafer > > > > (or anyone else, for that matter) mention FIR design by > > > > window-weighted impulse responses? > > > > > Rune > > > > In Discrete-Time Signal Processing, Second Edition, section 7.2, > > > "Design of FIR Filters by Windowing". > > > Where does it say that the impulse response comes from > > an IIR system? > > > Rune > > If you want to help, by all means do so. If not, try to find something > better to do than what you're doing right now. > > And yes, it does say so in the book, as the authors are windowing a > "desired impulse response", most of the time corresponding to a > bandpass filter, so said impulse response is infinite. If you want > more info about the book, you can read it. Otherwise, shut the fuck up.
You do obviously not have the intellectual capacity to read the book, let a lone design filters. You have to find ou what the book *actually* says, not what you *think* it says. If you were able to read - which you aren't - you would notice that except for a few initial lines to set up the context of FIR filters, the term 'IIR', let alone 'IIR system', is used nowhere during design of FIR filters. So go back to basics - reading class in primary school might be a good starting point - and not just watch the letetr on the pages, but *read* the text. That means, contemplate what the authurs try - and fail, in your case - to communicate to their readers. Rune
On Dec 10, 4:06&#4294967295;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 10 Des, 16:42, pinkisntwell <pinkisntw...YD@gmail.com> wrote: > > > > > On Dec 10, 12:44&#4294967295;pm, Rune Allnor <all...YQ@tele.ntnu.no> wrote: > > > > On 10 Des, 13:24, pinkisntwell <pinkisntw.....YW@gmail.com> wrote: > > > > > On Dec 10, 11:57&#4294967295;am, Rune Allnor <all.....YE@tele.ntnu.no> wrote: > > > > > > On 10 Des, 04:03, pinkisntwell <pinkisntw.......YR@gmail.com> wrote: > > > > > > > Let's say I decide on a desired frequency response, for example a > > > > > > highpass filter with zero phase. I can then take the samples of that > > > > > > frequency response and take their inverse DFT to get the impulse > > > > > > response of a truncated IIR system, essentially windowed with the > > > > > > rectangular window. > > > > > > Why is it so? In Discrete-Time Signal Processing Oppenheim doesn't > > > > > > mention this problem. > > > > > > Just out of curiosity - where does Oppenheim and Schafer > > > > > (or anyone else, for that matter) mention FIR design by > > > > > window-weighted impulse responses? > > > > > > Rune > > > > > In Discrete-Time Signal Processing, Second Edition, section 7.2, > > > > "Design of FIR Filters by Windowing". > > > > Where does it say that the impulse response comes from > > > an IIR system? > > > > Rune > > > If you want to help, by all means do so. If not, try to find something > > better to do than what you're doing right now. > > > And yes, it does say so in the book, as the authors are windowing a > > "desired impulse response", most of the time corresponding to a > > bandpass filter, so said impulse response is infinite. If you want > > more info about the book, you can read it. Otherwise, shut the fuck up. > > You do obviously not have the intellectual capacity to > read the book, let a lone design filters. You have to > find ou what the book *actually* says, not what you > *think* it says. > > If you were able to read - which you aren't - you would > notice that except for a few initial lines to set up the > context of FIR filters, the term 'IIR', let alone 'IIR > system', is used nowhere during design of FIR filters. > > So go back to basics - reading class in primary school > might be a good starting point - and not just watch the > letetr on the pages, but *read* the text. That means, > contemplate what the authurs try - and fail, in your > case - to communicate to their readers.
The fact that you have written about a page of text so far while avoiding the question, suggests that you're the prime example of what you're accusing me of. Never mind, good luck with your shitty life.
pinkisntwell wrote:
> On Dec 10, 1:00 pm, Grant Griffin <nob...@example.com> wrote:
...
> Your comment is indeed informative and thus welcome, but it doesn't > address the original issue.
Guilty as charged. give-a-man-a-fish-ly y'rs, Grant -- _____________________________________________________________________ Grant R. Griffin Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com See http://www.iowegian.com/img/contact.gif for e-mail address
On Dec 10, 2:16&#4294967295;pm, pinkisntwell <pinkisntw...@gmail.com> wrote:
>> > The fact that you have written about a page of text so far while > avoiding the question, suggests that you're the prime example of what > you're accusing me of. Never mind, good luck with your shitty life.
so pinkisntwell or commegnr or whomever is next have to pay for asking (possibly naive) questions here by enduring some pretty nasty abuse? i thought it was only Vlad that they had to watch out for. i confess that i have gotten into some nasty tiffs here, but it was not with those openly asking basic questions. so they didn't read the book; tell them to read the book. so they read the book and didn't get it; tell them to read it again. so they want you to do their homework; tell them to do their own homework or ask their prof or class teaching assistant. so they are trying to do something with a little more sophistication than they had before; tell them to hire you to do it (i don't mind seeing Vlad say that). when i get in fights here, it's almost always with another know-it-all (i'm the pot calling the kettle "black") who "knows" something that i may "know" is not entirely correct. but, pleeeeeze, don't bite the newbies. it makes me cringe. oh, BTW (here comes a self-serving plug...), if you live in or near NYC, do not miss this gig: http://eve-fest.org http://bk.knittingfactory.com/event-details/?tfly_event_id=3125 unless you like to keep your hosiery on. r b-j
On Dec 10, 6:27&#4294967295;pm, Grant Griffin <nob...@example.com> wrote:
> pinkisntwell wrote: > > On Dec 10, 1:00 pm, Grant Griffin <nob...@example.com> wrote: > ... > > Your comment is indeed informative and thus welcome, but it doesn't > > address the original issue. > > Guilty as charged. > > give-a-man-a-fish-ly y'rs, >
yeah, we should be nice about it, like Grant. welcome back, Grant. r b-j
robert bristow-johnson wrote:
> On Dec 10, 6:27 pm, Grant Griffin <nob...@example.com> wrote: >> pinkisntwell wrote: >>> On Dec 10, 1:00 pm, Grant Griffin <nob...@example.com> wrote: >> ... >>> Your comment is indeed informative and thus welcome, but it doesn't >>> address the original issue. >> Guilty as charged. >> >> give-a-man-a-fish-ly y'rs, >> > > yeah, we should be nice about it, like Grant.
Now let's not discern a pattern from one sample point. ;-)
> > welcome back, Grant.
Thanks, r. Glad to see you're still holding down the fort after all these years. Grant -- _____________________________________________________________________ Grant R. Griffin Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com See http://www.iowegian.com/img/contact.gif for e-mail address
robert bristow-johnson wrote:
> On Dec 10, 2:16 pm, pinkisntwell <pinkisntw...@gmail.com> wrote: >> The fact that you have written about a page of text so far while >> avoiding the question, suggests that you're the prime example of what >> you're accusing me of. Never mind, good luck with your shitty life. > > so pinkisntwell or commegnr or whomever is next have to pay for asking > (possibly naive) questions here by enduring some pretty nasty abuse? > i thought it was only Vlad that they had to watch out for. > > i confess that i have gotten into some nasty tiffs here, but it was > not with those openly asking basic questions. > > so they didn't read the book; tell them to read the book.
Better yet, give them a link to something - possibly an online book like the Smith book.
> > so they read the book and didn't get it; tell them to read it again. > > so they want you to do their homework; tell them to do their own > homework or ask their prof or class teaching assistant. > > so they are trying to do something with a little more sophistication > than they had before; tell them to hire you to do it (i don't mind > seeing Vlad say that). > > when i get in fights here, it's almost always with another know-it-all > (i'm the pot calling the kettle "black") who "knows" something that i > may "know" is not entirely correct. > > but, pleeeeeze, don't bite the newbies. it makes me cringe.
Speaking as a newbie here, I wholeheartedly agree. My own experience with this is as a newbie in comp.lang.python years ago. There's one character there who answers a lot of questions and has made great contributions to Python over the years. However, he does it in such a tart and unloving way that he generates (or whatever the proper term is) very little, if any, good Karma in the process. And if we aren't generating (net) good Karma, why are we doing this? There are very few books that can change your life (aside from the Holy book of one's choice, of course), but one I found a couple of years ago is "How to Win Friends and Influence People", by Dale Carnegie. I know, I know, it sounds corney. But it's loaded with good advice. Even the title is a lesson: the *goal* is to win friends an influence people (which, coincidently, is not incompatible with good Karma or the Holy book of one's choice.) One key concept I found is the phrase "feeling of importance". This also is called things like "ego", but that isn't nearly as insightful of a term - it's just a word that Siggy Freud stole from the Greeks or somebody. But "feeling of importance" is a real insight. We tend to lash out when someone challenges our feeling of importance. Also, sometimes we increase our feeling of importance by decreasing the feeling of importance of others, aka, bashing newbies - which is all too common in newsgroups. As it turns out, most human interactions involve some exchange of feeling of importance. A waiter is rude to you. Your boss tells you that you did a good job. Your kids kiss you at the door. Someone gives you the finger when you cut them off in the car. Although many of these, most exchanges of feeling of importance can be a win-win situation. In fact, one of the very *best* ways to feel important is to make others feel important. So, the best way to respond in comp.dsp (or elsewhere) is to heap knowledge, understanding, and praise on newbies. But even with this understanding, if you're imperfect like most of us, you'll find yourself indulging in a little lashing out every now and then. Just try to keep it to the bare minimum.
> > oh, BTW (here comes a self-serving plug...), if you live in or near > NYC, do not miss this gig:
Darn, I haven't been there since the 1963 World's Fair. I was too young to remember it (Jerry, help me out here. ;-), but luckily the "Carousel of Progress" and "It's a Small World" perpetually grind on wherever Disney reigns. That said, there's no denying that it *is* a small world after all (QED).
> > http://eve-fest.org > > http://bk.knittingfactory.com/event-details/?tfly_event_id=3125
>
> unless you like to keep your hosiery on.
It's not really my personal preference, but I tend to go along with the consensus around my place. Grant -- _____________________________________________________________________ Grant R. Griffin Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com See http://www.iowegian.com/img/contact.gif for e-mail address
On 11 Des, 08:52, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Dec 10, 2:16&#4294967295;pm, pinkisntwell <pinkisntw...@gmail.com> wrote: > > > > > The fact that you have written about a page of text so far while > > avoiding the question, suggests that you're the prime example of what > > you're accusing me of. Never mind, good luck with your shitty life. > > so pinkisntwell or commegnr or whomever is next have to pay for asking > (possibly naive) questions here by enduring some pretty nasty abuse? > i thought it was only Vlad that they had to watch out for.
Did *you* read the first couple of posts in this thread? First of all this guy is a megalomaniac at the outset, where he doesn't ask 'why is this wrong', but 'why isn't the blunder I made mentioned in the textbook.' Second, he mixes terminology from more than a couple of different design methods (IIRs vs FIRs; impulse invariance vs window method). The guy has at best browsed the book, and when he is probed about exactly what he is up to, he reacts like our old friend JJ. The guy is an illiterate megalomaniac. The only question here is how to make him aware of the fact. You might prefer to tip-toe around such stuff; I don't. Rune
Okay Robert,

If you enjoy spoon feeding imbecilles for charity, I got some for you. 
But be careful with those pets - they bite. Should I forward all stupid 
requests that I am receiving to you?
You see, there is quite enough of idiots in real life; at least it seems 
possible to clean them up from here. Why can't they go where they 
belong, something like alt.moron.help.with.homework or such?

VLV


robert bristow-johnson wrote:

> On Dec 10, 2:16 pm, pinkisntwell <pinkisntw...@gmail.com> wrote: > >>The fact that you have written about a page of text so far while >>avoiding the question, suggests that you're the prime example of what >>you're accusing me of. Never mind, good luck with your shitty life. > > > so pinkisntwell or commegnr or whomever is next have to pay for asking > (possibly naive) questions here by enduring some pretty nasty abuse? > i thought it was only Vlad that they had to watch out for. > > i confess that i have gotten into some nasty tiffs here, but it was > not with those openly asking basic questions. > > so they didn't read the book; tell them to read the book. > > so they read the book and didn't get it; tell them to read it again. > > so they want you to do their homework; tell them to do their own > homework or ask their prof or class teaching assistant. > > so they are trying to do something with a little more sophistication > than they had before; tell them to hire you to do it (i don't mind > seeing Vlad say that). > > when i get in fights here, it's almost always with another know-it-all > (i'm the pot calling the kettle "black") who "knows" something that i > may "know" is not entirely correct. > > but, pleeeeeze, don't bite the newbies. it makes me cringe. > > oh, BTW (here comes a self-serving plug...), if you live in or near > NYC, do not miss this gig: > > http://eve-fest.org > > http://bk.knittingfactory.com/event-details/?tfly_event_id=3125 > > unless you like to keep your hosiery on. > > r b-j