Reply by Jon Harris January 12, 20042004-01-12
"spasmous" <spasmous@yahoo.com> wrote in message
news:2f066762.0401111218.78f9e69e@posting.google.com...
> robert bristow-johnson <rbj@surfglobal.net> wrote in message
news:<BC26579A.7998%rbj@surfglobal.net>...
> > >> > > >> maybe use a Kaiser window? > > > > > > OK. Any reason? > > > > > > I just read somewhere that Hamming is supposed to give the smallest > > > side lobes, so I was thinking of using that. > > > > Hamming is easier to calculate (so it might be okay). Kaiser is much
more
> > optimizes and has a control parameter to trade off main lobe width with > > stopband attenuation. you will probably need MATLAB or some good C math > > library to compute the Kaiser window. > > I don't think additional control parameters are very helpful are they? > It's just one more variable to have to optimise - so far I have window > width as a variable, now I have to select a windowing function, then a > parameter for the windowing function. Much better to have less > variables, no? Hamming at least has some optimal property (minimises > lobes) rather than just being an arbitrary choice out of all possible > functions/parameters. > > I'd be interested in comments (nice ones, please)! :>
Not every design has the same goal--you may want minimal side lobes, but someone else may want wider main lobe, etc.. The nice thing about the Kaiser is that you can make it look like many of the other windows out there just by changing the single parameter. Then you don't have to search between the myriad of other windows out there to get what you're looking for--just pick Kaiser and tune it to your needs. To many, this simplifies things. However, if there is a simpler window out there that already meets your requirements, by all means use it and be happy! Regarding "Much better to have less variables, no?" that depends on if your goal is simplicity or fine control/optimization. For many people, it is the latter. Nice enough for you? -Jon
Reply by Jerry Avins January 11, 20042004-01-11
spasmous wrote:

> robert bristow-johnson <rbj@surfglobal.net> wrote in message news:<BC26579A.7998%rbj@surfglobal.net>... > >>>>maybe use a Kaiser window? >>> >>>OK. Any reason? >>> >>>I just read somewhere that Hamming is supposed to give the smallest >>>side lobes, so I was thinking of using that. >> >>Hamming is easier to calculate (so it might be okay). Kaiser is much more >>optimizes and has a control parameter to trade off main lobe width with >>stopband attenuation. you will probably need MATLAB or some good C math >>library to compute the Kaiser window. >> > > > I don't think additional control parameters are very helpful are they? > It's just one more variable to have to optimise - so far I have window > width as a variable, now I have to select a windowing function, then a > parameter for the windowing function. Much better to have less > variables, no? Hamming at least has some optimal property (minimises > lobes) rather than just being an arbitrary choice out of all possible > functions/parameters. > > I'd be interested in comments (nice ones, please)! :>
The parameter is easy to choose, looking at plotted results. If you don't want to do that, but you want better sidelobe attenuation, try Nuttall or Blackman windows. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by spasmous January 11, 20042004-01-11
robert bristow-johnson <rbj@surfglobal.net> wrote in message news:<BC26579A.7998%rbj@surfglobal.net>...
> >> > >> maybe use a Kaiser window? > > > > OK. Any reason? > > > > I just read somewhere that Hamming is supposed to give the smallest > > side lobes, so I was thinking of using that. > > Hamming is easier to calculate (so it might be okay). Kaiser is much more > optimizes and has a control parameter to trade off main lobe width with > stopband attenuation. you will probably need MATLAB or some good C math > library to compute the Kaiser window. >
I don't think additional control parameters are very helpful are they? It's just one more variable to have to optimise - so far I have window width as a variable, now I have to select a windowing function, then a parameter for the windowing function. Much better to have less variables, no? Hamming at least has some optimal property (minimises lobes) rather than just being an arbitrary choice out of all possible functions/parameters. I'd be interested in comments (nice ones, please)! :>
Reply by robert bristow-johnson January 11, 20042004-01-11
In article 2f066762.0401101614.10b9f1b5@posting.google.com, spasmous at
spasmous@yahoo.com wrote on 01/10/2004 19:14:

> robert bristow-johnson <rbj@surfglobal.net> wrote in message > news:<BC24FD42.7925%rbj@surfglobal.net>... >> In article 2f066762.0401092050.6dbda29e@posting.google.com, spasmous at >> spasmous@yahoo.com wrote on 01/09/2004 23:50: >> >>> For interpolation, I'm using a truncated sinc function to get >>> interpolation coefficients. It appears that I'm getting Gibbs ripple, >>> as expected within this kernal. >>> >>> So I'd like to taper the sinc. Any suggestions? <snip excreta> >> >> so what you want is a "windowed sinc", ain't it? your "truncated sinc" >> (they're all truncated, one way or another) is actually a windowed sinc() >> using the rectangular window, often considered to be the worst window. >> >> maybe use a Kaiser window? >> > > > OK. Any reason? > > I just read somewhere that Hamming is supposed to give the smallest > side lobes, so I was thinking of using that.
Hamming is easier to calculate (so it might be okay). Kaiser is much more optimizes and has a control parameter to trade off main lobe width with stopband attenuation. you will probably need MATLAB or some good C math library to compute the Kaiser window. r b-j
Reply by Clay S. Turner January 10, 20042004-01-10
Hello Spasmous,

The difficulty (infinite extent of the interpolation function) comes from
trying to handle frequencies all of the way up to one half of the sampling
rate. If your system is oversampled at all, then you can design an
interpolation filter whose frequency support just covers the necessary
range. You can use a PM algo for instance to design such a filter (design a
lowpass for the desired freq. range) and it will even let you see what the
error is going to be. Overwise you can play will some standard windows. R
B-J suggested a Kaiser window as this is useful in that it is adjustable.
You can also play with using a truncated raised cosine function. This is
sort of like using a PM algo to design a flat filter for part of the
allowable frequency domain but instead of using a filter design program, you
get to use an analytical formula. But the true raised cosine has infinite
temporal extent so you will introduce some error when you truncate it, but
it may be good enough. I posted  formulae for the raised cosine and the root
raised cosine impulse responses here long ago. You can find them at dspguru
at the following link:

http://www.dspguru.com/info/faqs/rcform.htm

Clay





"spasmous" <spasmous@yahoo.com> wrote in message
news:2f066762.0401092050.6dbda29e@posting.google.com...
> Hi, > > For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x? > > Thanks.
Reply by spasmous January 10, 20042004-01-10
robert bristow-johnson <rbj@surfglobal.net> wrote in message news:<BC24FD42.7925%rbj@surfglobal.net>...
> In article 2f066762.0401092050.6dbda29e@posting.google.com, spasmous at > spasmous@yahoo.com wrote on 01/09/2004 23:50: > > > For interpolation, I'm using a truncated sinc function to get > > interpolation coefficients. It appears that I'm getting Gibbs ripple, > > as expected within this kernal. > > > > So I'd like to taper the sinc. Any suggestions? <snip excreta> > > so what you want is a "windowed sinc", ain't it? your "truncated sinc" > (they're all truncated, one way or another) is actually a windowed sinc() > using the rectangular window, often considered to be the worst window. > > maybe use a Kaiser window? >
OK. Any reason? I just read somewhere that Hamming is supposed to give the smallest side lobes, so I was thinking of using that.
Reply by spasmous January 10, 20042004-01-10
spasmous@yahoo.com (spasmous) wrote in message news:<2f066762.0401092050.6dbda29e@posting.google.com>...
> Hi, > > For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x? > > Thanks.
Whooops, sinc(x)/x is *dismal*, I didn't mean that really. I meant sinc(x)/(1+|x|). Well anyway...
Reply by Fred Marshall January 10, 20042004-01-10
"spasmous" <spasmous@yahoo.com> wrote in message
news:2f066762.0401092050.6dbda29e@posting.google.com...
> Hi, > > For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x?
using 0.5 sinc(-T) + sinc(0) + 0.5 sinc(T) as the interpolating function is better - the transition is wider and the ripple decays faster - as 1/t^3 rather than as 1/t. You have to interpolate over 3 points at each step this way so the computation is a little more. Fred
Reply by robert bristow-johnson January 10, 20042004-01-10
In article 2f066762.0401092050.6dbda29e@posting.google.com, spasmous at
spasmous@yahoo.com wrote on 01/09/2004 23:50:

> For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x?
so what you want is a "windowed sinc", ain't it? your "truncated sinc" (they're all truncated, one way or another) is actually a windowed sinc() using the rectangular window, often considered to be the worst window. maybe use a Kaiser window?
> Thanks.
FWIW. r b-j
Reply by Paul Russell January 10, 20042004-01-10
spasmous wrote:

> Hi, > > For interpolation, I'm using a truncated sinc function to get > interpolation coefficients. It appears that I'm getting Gibbs ripple, > as expected within this kernal. > > So I'd like to taper the sinc. Any suggestions? What about sinc(x)/x? >
Try Lanczos - it's my personal favourite. Paul