Rune Allnor <allnor@tele.ntnu.no> writes:> On 20 Feb, 16:57, Randy Yates <ya...@ieee.org> wrote: >> Rune Allnor <all...@tele.ntnu.no> writes: >> > On 20 Feb, 13:36, Randy Yates <ya...@ieee.org> wrote: >> >> Rune Allnor <all...@tele.ntnu.no> writes: >> >> > On 20 Feb, 08:34, "kungcoccos" <c...@hallqvist.biz> wrote: >> >> >> Hi! >> >> >> >> I would like to create a filter with an inverse sinc-like form in the >> >> >> passband >> >> >> > What does 'inverse sinc' mean? Are you talking about time domain >> >> > or frequency domain? Do you know how to design FIR filters by >> >> > the window method? If so, how is what you want to do different >> >> > from that method? >> >> >> >> using the most effective algoritm. For now I using fir2, but I >> >> >> suspect that it is not the most cost efficient method. Is it any? >> >> >> > A somewhat unique problem. Cost efficiency is usually a >> >> > very important issue at the *implementation* stage; cost >> >> > efficiency has not been an issue in design stages for >> >> > decades. >> >> >> You're being too pedantic/anal, Rune (good in design, bad in human >> >> interaction). The OP probably meant "implementation efficiency" - it >> >> seems to make more sense given the context. >> >> > If I need to use terms like 'probably' and 'seem' to understand >> > a question, I ask for clarifications. If you think that is >> > too pedantical then that's your problem. >> >> I think asking for clarification is good. However, I didn't see you >> asking anything with respect to the efficiency issue. What I saw is you >> hammering someone for not asking a question in precisely the right way. > > So what?So it gives folks a bad experience and bad impression of this group.> If you take half the time you spend nagging on me and actually > check out what the guy in fact asks for, you will find that the > matlab function FIR2 is a filter *design* function. Just check > out the online matlab docs if you don't have access to the SP > toolbox.I wasn't aware that I was confused about the function FIR2.> Since you are so upset about this (and for to settle my own > curiosity) -- when was the last time you encountered computational > efficiency issues as the main limitation when computing coefficients > of filters?One of us is really confused. It could be me, but I don't think it is. My original thought was that the OP was seeking design methods that generated more computationally efficient filters (i.e., at run-time), not which were more computionally efficient themselves (i.e., not at design-time). -- % Randy Yates % "How's life on earth? %% Fuquay-Varina, NC % ... What is it worth?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://www.digitalsignallabs.com
Arbitrary frequence response
Started by ●February 20, 2008
Reply by ●February 20, 20082008-02-20
Reply by ●February 20, 20082008-02-20
On 20 Feb, 19:08, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> Rune Allnor wrote: > > [...] > > > �when was the last time you encountered computational > > efficiency issues as the main limitation when computing coefficients > > of filters? > > This is a routine situation in my job.... do you mean that you think your job is impaired by lacking computational resources?> 1. I have to compute the coefficients for ~200 IIR sections using a > 8-bitter. With all sorts of optimizations, it takes about half of > second, and I wouldn't mind if it could be done faster then that.Half a second seems OK. Unless you are really 'in the zone' that ought not to be a major penalty.> 2. The other problem is the calculation and adjustment of the > coefficients on the fly, so the filter is tracking some external input.Seems like an adaptive filter. There ought to be specialized routines for that sort of thing?> 3. The third problem is the design of a filter to the arbitrary > requirements (by shamanistic optimization). You have to do many iterations.That's the situation I was hinting at in my first reply: One comes up with something, checks how it works, alters, checks again, etc. Tedious, but usually labour intensive, not limited by computational resources. Rune
Reply by ●February 20, 20082008-02-20
Hi Carl, The first thing you should know is that an FIR filter designed by windowing will give you any degree of performance that you want. The only down side to these filters is their execution time, because of the large number of point in their filter kernels. Look at figure 17-2 in the reference below to see how different length filter kernels provide different levels of accuracy in the frequency spectrum. http://www.dspguide.com/ch17/1.htm http://www.dspguide.com/ch17/2.htm This should be your benchmark-- how much performance you can get for how much execution time. Can you improve upon this method? The answer is yes, depending on how much effort you want to spend. The first way to do this is by designing a better FIR filter. For instance, Rick Lyons recently posted a blog on using Chebyshev windows. Also, there are more advanced algorithms for designing FIR filters. But before you go down this road, understand that you will probably get little improvement. For instance, you might obtain a filter kernel that is 20% shorter for a given level of performance. In other words, not much bang for your buck. The other approach would be to try an IIR filter. These execute very quickly, say, equivalent to an FIR of only 20 points. However, getting an arbitrary frequency response from IIR filters is very difficult. Unless a rough approximation will do, going down the IIR path will be a great deal of work and probably give you little success. Here is the bottom line. Unless you are very very motivated to make the execution time faster, my advice is to concentrate on the windowed FIR method. Regards, Steve
Reply by ●February 20, 20082008-02-20
Rune Allnor wrote:> On 20 Feb, 19:08, Vladimir Vassilevsky <antispam_bo...@hotmail.com> > wrote: >>Rune Allnor wrote: >> >>> when was the last time you encountered computational >>>efficiency issues as the main limitation when computing coefficients >>>of filters? >> >>This is a routine situation in my job. > > ... do you mean that you think your job is impaired by > lacking computational resources?I wish I could focus on the problems as a whole instead of messing with the minor technical issues. However the solution of the large problems with the small resources is one of the reasons why they do pay me a big bucks :)>>1. I have to compute the coefficients for ~200 IIR sections using a >>8-bitter. With all sorts of optimizations, it takes about half of >>second, and I wouldn't mind if it could be done faster then that. > > Half a second seems OK. Unless you are really 'in the zone' > that ought not to be a major penalty.The 0.5s of reaction time is marginal for the interaction with a human.>>2. The other problem is the calculation and adjustment of the >>coefficients on the fly, so the filter is tracking some external input. > > Seems like an adaptive filter. There ought to be specialized > routines for that sort of thing?Not an adaptive filter. Just a filter designed to a spec which changes in the real time. Such as a bandpass controlled by the RPM of the engine.>>3. The third problem is the design of a filter to the arbitrary >>requirements (by shamanistic optimization). You have to do many iterations. > > That's the situation I was hinting at in my first reply: > One comes up with something, checks how it works, alters, > checks again, etc. Tedious, but usually labour intensive, > not limited by computational resources.The requirements can be formalized so the whole procedure can be fully automatic. However the design of a moderately complex IIR filter by optimization can easily take many millions of iterations and hours of work on the modern PC. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●February 20, 20082008-02-20
Randy Yates wrote:> Jerry Avins <jya@ieee.org> writes: > >> I'm with Rune here. > > <waves> > > I'm with helping people rather than bashing them. I like a well-formed > question just as much as the next person, and perhaps the OP needs some > "correction" in this area, but this group has gotten too unfriendly > lately in my opinion. If you aren't in the same corner, then so-be-it.I'm not an unfriendly sort. I was frankly wondering why he wanted what he seemed to ask for. I didn't wonder enough to ask. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������






