Reply by Himanshu Chauhan April 26, 20052005-04-26
Now here I say, Jerry even if you are not talking DSP, I fail to
understand half of your thoughts :-)
Thanks anyways. I learnt alot here. Probably you will see me here more
often until DSP is in my hands :-)

Thanx
--Himanshu

Reply by Jon Harris April 26, 20052005-04-26
"Himanshu Chauhan" <hs.chauhan@gmail.com> wrote in message
news:1114481876.078948.323460@o13g2000cwo.googlegroups.com...
> Yes, Jim you are right. Thats what I asked. That was partly the reason > that I didn't understand when jerry said FFT coefficients. I am not > doing any FFT in my code anywhere.
Replace "FFT coefficients" with "FIR coefficients". That's what Jerry meant.
Reply by Jerry Avins April 26, 20052005-04-26
jim wrote:

   ...

>>You _did_ get an answer to your question; from me, if from no one else. >>I repeat it here with added emphasis: "The filter kernel _is_ the set of >>FFT coefficients -- same thing." > > > I don't get it. He never said anything about doing an FFT. > His question was if he samples a sinc function (sinx/x) and multiplies > that by a window function (Hamming I believe he mentioned) will the > result be a set of FIR coefficients which he intends to use for > interpolation.
My goof, an unfortunate brainfart. In my mind I wrote, "The filter kernel _is_ the set of FIR coefficients -- same thing." 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 Fred Marshall April 26, 20052005-04-26
"Himanshu Chauhan" <hs.chauhan@gmail.com> wrote in message 
news:1114481876.078948.323460@o13g2000cwo.googlegroups.com...
> Yes, Jim you are right. Thats what I asked. That was partly the reason > that I didn't understand when jerry said FFT coefficients. I am not > doing any FFT in my code anywhere. > > Thanks and regards > --Himanshu
Oh... Well in that case then you do recognize that a sinc is the ideal - which means a lowpass filter. And, you understand that sampling the impulse response give the unit sample response. And, you understand that windowing does two things: - it makes the the unit sample response a finite length - it makes the frequency transitions and ripples about as good as they can be. Sharper windows (those only tapered at the edges) cause the transtions to be narrower and the ripples to be larger. Smoother windows (those that taper across their entire width) cause the transitions to be wider and the ripples to be smaller. So, a compromise according to your requirements is had by choosing the window. And, the minimum transition band width in frequency is had by choosing the length of the window. Fred
Reply by Fred Marshall April 26, 20052005-04-26
"Himanshu Chauhan" <hs.chauhan@gmail.com> wrote in message 
news:1114481242.270269.4400@l41g2000cwc.googlegroups.com...
> Hello all! > > Thanks I got my answer now. Jerry I read your answer as well. But your > term "FFT Coefficients" still misleads me. Could you please elaborate > it. I am very much new to this. You all are veterans. So what seems to > be quite obvious to you all, I might have difficulty understanding > that. > > Jim's answer was pretty straightforward. That satisfies my query and I > can think "Ok I am right! Now I can proceed with why I am right?" This > is the way I learn. > > Other thing.... > 1. we define a ideal frequency response. > 2. take an IFFT of it to move into time domain. > 3. take a window to limit and smooth things out. > 4. and, finally do the convolution. > > Isn't it so, Fred? > > My question is :- If I already know that a windowedsinc filter is what > I need. Why would I need to do all that described above. There are > straight formulas to find windowed sinc? It all that worth a trouble? I > think above steps can be useful only if you are trying to create a > custom filter. Ain't it so? >
Himanshu, Yes, I think you've got it! Well, a windowed sinc, if that's truly what you mean, would be: A perfect continuous lowpass filter in frequency - thus an infinite sinc in time. This is the only case that results in a temporal sinc. Then it is windowed to a finite length. The window could be a rectangle in which case there would be Gibbs phenomenon in frequency. The window could be smoother, in which case the frequency response would also be smoother at the transitions and the ripples would decay better than 1/w or be lower or both. If you know you want a lowpass filter which results in a sinc, then simply window the proper sinc and be done with it. However, if you have a filter that's more complicated then you need to apply an IFFT to the ideal shape in order to know what to window. Fred
Reply by Jerry Avins April 26, 20052005-04-26
Himanshu Chauhan wrote:
> Hello all! > > Thanks I got my answer now. Jerry I read your answer as well. But your > term "FFT Coefficients" still misleads me. Could you please elaborate > it. I am very much new to this. You all are veterans. So what seems to > be quite obvious to you all, I might have difficulty understanding > that. > > Jim's answer was pretty straightforward. That satisfies my query and I > can think "Ok I am right! Now I can proceed with why I am right?" This > is the way I learn. > > Other thing.... > 1. we define a ideal frequency response. > 2. take an IFFT of it to move into time domain. > 3. take a window to limit and smooth things out. > 4. and, finally do the convolution. > > Isn't it so, Fred? > > My question is :- If I already know that a windowedsinc filter is what > I need. Why would I need to do all that described above. There are > straight formulas to find windowed sinc? It all that worth a trouble? I > think above steps can be useful only if you are trying to create a > custom filter. Ain't it so? > > I know I didn't post the code in its entirity, which I will do soon. > But your help is what I will always need :-) > > Thanks and regards > --Himanshu
Himanshu, Consider my experience in Germany, the week I chipped out and collected pieces of the Berlin Wall. I know a little German, and my accent, while not like a native's, doesn't immediately mark me as a non-speaker. I could formulate my questions passably well by using the words I know, but I found it very difficult to understand the answers because the contained words I didn't know, and they were spoken too fast. My frequent plea was, "Langsammer, bitte!" One fellow jokingly told me that I brought this misery on myself, by appearing to be more fluent than I in fact was. Now consider your original question. You write glibly of having made a program that returned an FIR filter kernel. It was clear that something was askew when you weren't sure that those were the coefficients you seek, but it wasn't clear what. Now it seems that have no idea how the kernel (or coefficients, or tap weights -- all the same numbers) is calculated. It's clear because you asked Fred why you should calculate a windowed sync filter the way windowed sync filters are calculated. (What does your function "get_filter_kernel" actually do?) Nowadays, most FIRS aren't calculated using windowed sync (which can be done by hand if need be), but instead with an optimizing procedure (Parks-Mcclellan) which usually achieves the specified performance with a shorter filter. These are done with computer programs, many of which are free or have free trial versions. (See http://www.iowegian.com and others.) There are good books for self study, and on-line instruction. On line, try www.dspguide.com for an on-line book and and www.bores.com for a free on-line guided course. There are even on-line filter-design programs whose URLs I don't know off hand. 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 Himanshu Chauhan April 25, 20052005-04-25
Yes, Jim you are right. Thats what I asked. That was partly the reason
that I didn't understand when jerry said FFT coefficients. I am not
doing any FFT in my code anywhere.

Thanks and regards
--Himanshu

Reply by Himanshu Chauhan April 25, 20052005-04-25
Hello all!

Thanks I got my answer now. Jerry I read your answer as well. But your
term "FFT Coefficients" still misleads me. Could you please elaborate
it. I am very much new to this. You all are veterans. So what seems to
be quite obvious to you all, I might have difficulty understanding
that.

Jim's answer was pretty straightforward. That satisfies my query and I
can think "Ok I am right! Now I can proceed with why I am right?" This
is the way I learn.

Other thing....
1. we define a ideal frequency response.
2. take an IFFT of it to move into time domain.
3. take a window to limit and smooth things out.
4. and, finally do the convolution.

Isn't it so, Fred?

My question is :- If I already know that a windowedsinc filter is what
I need. Why would I need to do all that described above. There are
straight formulas to find windowed sinc? It all that worth a trouble? I
think above steps can be useful only if you are trying to create a
custom filter. Ain't it so?

I know I didn't post the code in its entirity, which I will do soon.
But your help is what I will always need :-)

Thanks and regards
--Himanshu

Reply by jim April 25, 20052005-04-25

Jerry Avins wrote:
> > Himanshu Chauhan wrote: > > Hello Jerry, > > > > This might be because of lack of understanding because I am newbie in > > this field. > > But I think its not kind enough to call someone's work to be lame or > > copy-pasted. > > May be I am making mistakes and not understanding things but thats we > > all do when > > we are learning something new. > > > > Please, dont mind if any of my words hurt you. > > > > BTW, I still didn't get my answer :-) > > > > Regards > > --Himanshu > > Himanshu, > > You evidently wrote get_filter_kernel by calling a routine whose working > you don't understand. Being aware of what a library routine you use > does, but neither why nor how it does it, is what I meant by "cut and > paste". It was not a completely accurate characterization, but I hope > you understand what I tried to convey. > > You _did_ get an answer to your question; from me, if from no one else. > I repeat it here with added emphasis: "The filter kernel _is_ the set of > FFT coefficients -- same thing."
I don't get it. He never said anything about doing an FFT. His question was if he samples a sinc function (sinx/x) and multiplies that by a window function (Hamming I believe he mentioned) will the result be a set of FIR coefficients which he intends to use for interpolation. -jim ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Reply by Jerry Avins April 25, 20052005-04-25
jim wrote:
> > Himanshu Chauhan wrote: > >>Hello Jerry, >> >>This might be because of lack of understanding because I am newbie in >>this field. >>But I think its not kind enough to call someone's work to be lame or >>copy-pasted. >>May be I am making mistakes and not understanding things but thats we >>all do when >>we are learning something new. >> >>Please, dont mind if any of my words hurt you. >> >>BTW, I still didn't get my answer :-) > > > Well some people are so concerned about how well you communicate the > question they neglect to communicate an answer very well. The answer is > yes Your 'kernel' are the FIR coefficients. And so far, I don't see any > error in your thinking that you can use a set of coefficients such as > you have for interpolation. But as I'm sure you already know lots of > things can go wrong, so don't take that as a guarantee.
Evidently my last sentence so put him off that he didn't read the one before it. He got his answer in the post to which he responded with his plaint. (I think his rebuke would have been quite justified if the answer hadn't been there.) 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;