DSPRelated.com
Forums

My Sinc Estmator

Started by Michael P. May 17, 2011

"dbd" <dbd@ieee.org> wrote in message 
news:c5cd23f0-a8ba-4a27-aa33-f7235f1559e8@k3g2000prl.googlegroups.com...
> On May 24, 7:19 am, steve <bungalow_st...@yahoo.com> wrote: >> On May 23, 2:40 pm, "Michael P." <m...@home.com> wrote: >> >> >> >> > "Fred Marshall" <fmarshallxremove_th...@acm.org> wrote in message >> >> >news:iKwCp.274$AU4.220@en-nntp-07.dc1.easynews.com... >> >> > > On 5/23/2011 9:35 AM, Michael P. wrote: >> >> > >> If it is so easy then why haven't we seen the result of it in any >> > >> books >> > >> or webpages. >> > >> E.g. I have never seen my formula for magnitude anywhere. >> >> > >> Michael >> >> > > I think folks are trying to be supportive and have pointed out some >> > > rather >> > > obvious things: >> >> > > - A formula for a single, noiseless sinusoid isn't very useful. So, >> > > why >> > > bother? >> > > - That the approach is purely analytical isn't much of a defense and >> > > suggests other purely analytical treatments as below. >> >> > > One might suggest that the "formula" is a restatement of a truism: >> >> > > This is an analytical treatment. Here, I'm going to sample in >> > > frequency >> > > without sampling in time .. just to make it easier and to make an >> > > important point: >> >> > > Take a continuous, infinite sinusoid. >> > > Chop it with a rectangular window of length W. >> > > Assume that the content of the rectangular window is one cycle of a >> > > periodic waveform. (This is what makes frequency "sampled" / >> > > discrete) >> > > Compute the Fourier Series. >> > > Now you have a set of Fourier Coefficients which represent the >> > > magnitude >> > > and frequency of the chopped/periodic version of the sinusoid. >> >> > > To me, this is obvious and is a restatement of the notion that one >> > > can >> > > find the magnitude and frequency of a sinusoid from the Fourier >> > > Coefficients - which, with judicious treatment of conventions, is the >> > > same >> > > as a Fourier Transform of a periodic waveform. >> > > Merely sampling in time and using the DFT doesn't change things that >> > > much - so the point is still made. >> >> > > Look familiar? I'd say that this is found in books. >> >> > > Fred >> >> > > Notes: >> > > If the Window chops the sinusoid so that there is exactly some >> > > integer >> > > number of cycles of the sinusoid in the window, then the assumed >> > > periodic >> > > waveform is the original sinusoid and the Fourier Series has but one >> > > term - all but one of the harmonics are zero-valued. This harmonic >> > > is >> > > related to the number of cycles in the Window and the "fundamental" >> > > remains at 1/W. >> > > This is the same as the trivial case where a sinusoid results in but >> > > a >> > > single sample (well, 2 samples) in a DFT. >> >> > > If the Window chops the sinusoid differently, then there are >> > > discontinuities at the "edges" in the periodic waveform and the sinc >> > > shape >> > > in frequency represents the additional frequencies that are created >> > > by the >> > > discontinuity. >> > > This is the same as the more interesting case you study where the >> > > underlying sinusoid is at a frequency where there are no samples - >> > > because >> > > the underlying sinusoidal frequency is not a multiple of 1/W. >> >> > Hi Fred >> >> > Thank you for being honest and telling me how it is. >> > I was beginning to wonder why people didn't comment on the >> > formulas themselves. >> > I am not an expert, so I didn't know that I was stating the obvious. >> > Maybe I can use the fact that a triangle window has sinc squared >> > as it's impulse response in a new formula. >> > As I say, I am not that experienced with dsp. So far I have only >> > used the FFT to analyse music and make effects by altering >> > the bins in the freq. domain and doing the IFFT. >> >> > Best wishes, Michael- Hide quoted text - >> >> > - Show quoted text - >> >> yikes tough crowd mike, most of the "new schemes" presented in DSP >> articles in IEEE are rehash of old stuff so don't sweat it, (except in >> those articles you have to penetrate the obscure language before you >> realize, oh, that is all is saying) > > Even in the old stuff you had to penetrate the obscure language. > Consider: > Use of the Discrete Fourier Transform in the Measurement of > Frequencies and Levels of Tones PDF > Rife, D.C.; Vincent, G.A. > Bell System Technical Journal > Volume 49, Issue 2, February 1970 | 11095.4K > http://www.alcatel-lucent.com/bstj/vol49-1970/articles/bstj49-2-197.pdf > > This is a classic (but far from the first) interpolation paper. Three > types of windows are discussed: > class I: maximum sidelobe rolloff windows > class II: (two parameter) Taylor windows > class III: an ad hoc set of windows > > The maximum sidelobe rolloff windows are a frequent "rediscovery" in > the IEEE literature. The richest collection of fft interpolation > windows in the IEEE literature seems to be in the Transactions on > Instrumentation and Measurement For example: > http://wwwir.vub.ac.be/elec/Papers%20on%20web/Papers/JohanSchoukens/IM92Schoukens-The%20Interpolated.pdf > > For comparison to other methods: > http://home.mit.bme.hu/~sarhegyi/pubs/msthesis.pdf > > The optical guys have a long history of fft interpolation, too: > http://www.eng.tau.ac.il/~yaro/RecentPublications/ps&pdf/EfficientSincInterpolation_ApllOpt.pdf > > Dale B. Dalrymple
Thank you for the links Dale and your support. Best wishes, Michael

"Rune Allnor" <allnor@tele.ntnu.no> wrote in message 
news:635f727a-6dd6-4523-9de9-328fd7bd79cc@g12g2000yqd.googlegroups.com...
> On May 23, 6:35 pm, "Michael P." <m...@home.com> wrote: >> "Rune Allnor" <all...@tele.ntnu.no> wrote in message >> >> news:73674982-5695-47ba-847d-d6d135b92901@c41g2000yqm.googlegroups.com... >> >> >> >> >> >> > On May 17, 11:43 pm, "Michael P." <m...@home.com> wrote: >> >> Hi Group >> >> >> I have deduced/discovered some formulas >> >> for interpolating between FFT bins when >> >> calculating frequency and magnitude. >> >> >> I have written a "formal" pdf document. >> >> For posting I have made this text version. >> >> I hope it still makes sense. >> >> >> I would appreciate you comments and thoughts >> >> very much. Do you agree with my reasoning? >> >> >> TIA, Michael >> >> >> Here is the document: (Sorry, it's a bit long) >> >> >> --------------------- >> >> >> T h e S i n c E s t i m a t o r >> > ... >> >> All calculations and graphs have been made using a computer program. >> >> > Why??? >> >> > The estimation of the sinc must be just about the easiest >> > estimation ever, concocted - why the hect start writing >> > theses about it??? >> >> > Rune >> >> If it is so easy then why haven't we seen the result of it in any books >> or >> webpages. > > Two reasons: > > 1) The sinc is a function that appears in one very spesific > context. > 2) The sinc is never actually computed. > >> E.g. I have never seen my formula for magnitude anywhere. > > Then read the books more carefully. Contemplate the material > the text attempts to communictae rather than just look > for formulas. > > Rune
That is good advice Rune. I will do that. Hilsen Michael (ikke langt fra Norge)
Michael P. <me@home.com> wrote:

(snip, someone wrote)
>> The sinc response is purely a filter characteristic of a process of >> truncating a signal. It has nothing to do with an FFT or assumptions >> of what the signal is doing before or after the truncated record.
> This is one very important piece of information that I have learned > from this discussion. Thank you Steve. > I thought the sinc response came from the FFT. But now that I understand it, > it's obvious. Truncating a sine and considering the result as one cycle of > a periodic signal will not result in a periodic pure sine signal. Unless you > are lucky.
Well, it comes from the FFT in the sense that FFT encourages the use of truncated, especially of length power of two, signals. One simple change one could make is to round off the ends, or 'fade to black' as they might say in Hollywood. But truncation is easier. -- glen
On May 24, 1:44&#4294967295;pm, "Michael P." <m...@home.com> wrote:
> "steve" <bungalow_st...@yahoo.com> wrote in message > > news:806aba6c-3965-4613-b359-a706b32d7e29@e17g2000prj.googlegroups.com... > > > > > > > On May 18, 2:02 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: > >> Michael P. <m...@home.com> wrote: > > >> (snip) > > >> > Well put Dave. > >> > All bin magnitudes are points on a scaled Sinc curve. > >> > As I say in the document now window must be used. > >> > That is because only a rectangular window (= no window) is tranformed > >> > to a Sinc curve. > > >> Yes, but why the sinc in the first place? > > >> The Sinc comes out as the Fourier transform of Rect, the result > >> of reconstructing an infinitely long periodic signal. > > >> If one does an FFT on a finite duration signal, then adds the > >> constraint that all the points not sampled (to plus and minus infinity) > >> are zero, then one finds Sinc as the inverse transform. > > > The sinc response is purely a filter characteristic of a process of > > truncating a signal. It has nothing to do with an FFT or assumptions > > of what the signal is doing before or after the truncated record. > > This is one very important piece of information that I have learned > from this discussion. Thank you Steve. > I thought the sinc response came from the FFT. But now that I understand it, > it's obvious. Truncating a sine and considering the result as one cycle of > a periodic signal will not result in a periodic pure sine signal. Unless you > are lucky. > > Michael- Hide quoted text - > > - Show quoted text -
Yes, that is important, the FFT is perfect,it is telling you exactly the frequency content of the signal you fed it, it's the truncation that introduces the errors. Interestingly, multiplying the truncated input by a sinc function gives you a perfectly flat filter response, so you don't need to do your estimation. (transform of a sinc is a pulse in frequency domain). But sinc window is not time limited, so it's unrealizable, so a truncated sinc is used, this family of sinc like windows are known as flatop windows. http://en.wikipedia.org/wiki/File:Window_function_(flat_top).png

"steve" <bungalow_steve@yahoo.com> wrote in message 
news:76b7b3b9-f0b4-49d9-8aed-097850631f85@e8g2000vbz.googlegroups.com...
> On May 24, 1:44 pm, "Michael P." <m...@home.com> wrote: >> "steve" <bungalow_st...@yahoo.com> wrote in message >> >> news:806aba6c-3965-4613-b359-a706b32d7e29@e17g2000prj.googlegroups.com... >> >> >> >> >> >> > On May 18, 2:02 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: >> >> Michael P. <m...@home.com> wrote: >> >> >> (snip) >> >> >> > Well put Dave. >> >> > All bin magnitudes are points on a scaled Sinc curve. >> >> > As I say in the document now window must be used. >> >> > That is because only a rectangular window (= no window) is >> >> > tranformed >> >> > to a Sinc curve. >> >> >> Yes, but why the sinc in the first place? >> >> >> The Sinc comes out as the Fourier transform of Rect, the result >> >> of reconstructing an infinitely long periodic signal. >> >> >> If one does an FFT on a finite duration signal, then adds the >> >> constraint that all the points not sampled (to plus and minus >> >> infinity) >> >> are zero, then one finds Sinc as the inverse transform. >> >> > The sinc response is purely a filter characteristic of a process of >> > truncating a signal. It has nothing to do with an FFT or assumptions >> > of what the signal is doing before or after the truncated record. >> >> This is one very important piece of information that I have learned >> from this discussion. Thank you Steve. >> I thought the sinc response came from the FFT. But now that I understand >> it, >> it's obvious. Truncating a sine and considering the result as one cycle >> of >> a periodic signal will not result in a periodic pure sine signal. Unless >> you >> are lucky. >> >> Michael- Hide quoted text - >> >> - Show quoted text - > > Yes, that is important, the FFT is perfect,it is telling you exactly > the frequency content of the signal you fed it, it's the truncation > that introduces the errors. > > Interestingly, multiplying the truncated input by a sinc function > gives you a perfectly flat filter response, so you don't need to do > your estimation. (transform of a sinc is a pulse in frequency domain). > > But sinc window is not time limited, so it's unrealizable, so a > truncated sinc is used, this family of sinc like windows are known as > flatop windows. > > http://en.wikipedia.org/wiki/File:Window_function_(flat_top).png >
Yes, what you say about the flat_top window is very interesting. If I understand it correctly, the bin magnitude is the real magnitude. If the frequency lies between bins would that mean that you would do a linear interpolation to find the frequency? I also read that a gaussian window has a parabolic impulse response, making it possible to do exact parabolic interpolation. Michael

"Michael P." <me@home.com> wrote in message 
news:LuednSneCfhmMUPQnZ2dnUVZ8rWdnZ2d@giganews.com...
> > > "steve" <bungalow_steve@yahoo.com> wrote in message > news:76b7b3b9-f0b4-49d9-8aed-097850631f85@e8g2000vbz.googlegroups.com... >> On May 24, 1:44 pm, "Michael P." <m...@home.com> wrote: >>> "steve" <bungalow_st...@yahoo.com> wrote in message >>> >>> news:806aba6c-3965-4613-b359-a706b32d7e29@e17g2000prj.googlegroups.com... >>> >>> >>> >>> >>> >>> > On May 18, 2:02 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: >>> >> Michael P. <m...@home.com> wrote: >>> >>> >> (snip) >>> >>> >> > Well put Dave. >>> >> > All bin magnitudes are points on a scaled Sinc curve. >>> >> > As I say in the document now window must be used. >>> >> > That is because only a rectangular window (= no window) is >>> >> > tranformed >>> >> > to a Sinc curve. >>> >>> >> Yes, but why the sinc in the first place? >>> >>> >> The Sinc comes out as the Fourier transform of Rect, the result >>> >> of reconstructing an infinitely long periodic signal. >>> >>> >> If one does an FFT on a finite duration signal, then adds the >>> >> constraint that all the points not sampled (to plus and minus >>> >> infinity) >>> >> are zero, then one finds Sinc as the inverse transform. >>> >>> > The sinc response is purely a filter characteristic of a process of >>> > truncating a signal. It has nothing to do with an FFT or assumptions >>> > of what the signal is doing before or after the truncated record. >>> >>> This is one very important piece of information that I have learned >>> from this discussion. Thank you Steve. >>> I thought the sinc response came from the FFT. But now that I understand >>> it, >>> it's obvious. Truncating a sine and considering the result as one cycle >>> of >>> a periodic signal will not result in a periodic pure sine signal. Unless >>> you >>> are lucky. >>> >>> Michael- Hide quoted text - >>> >>> - Show quoted text - >> >> Yes, that is important, the FFT is perfect,it is telling you exactly >> the frequency content of the signal you fed it, it's the truncation >> that introduces the errors. >> >> Interestingly, multiplying the truncated input by a sinc function >> gives you a perfectly flat filter response, so you don't need to do >> your estimation. (transform of a sinc is a pulse in frequency domain). >> >> But sinc window is not time limited, so it's unrealizable, so a >> truncated sinc is used, this family of sinc like windows are known as >> flatop windows. >> >> http://en.wikipedia.org/wiki/File:Window_function_(flat_top).png >> > > Yes, what you say about the flat_top window is very interesting. > If I understand it correctly, the bin magnitude is the real magnitude. > If the frequency lies between bins would that mean that you would > do a linear interpolation to find the frequency? > > I also read that a gaussian window has a parabolic impulse response, > making it possible to do exact parabolic interpolation. > > Michael >
This is what I read and meant to write: "Since the log of a Gaussian produces a parabola, this can be used for exact quadratic interpolation in frequency estimation" Michael
On May 26, 3:41&#4294967295;pm, "Michael P." <m...@home.com> wrote:
> "steve" <bungalow_st...@yahoo.com> wrote in message > > news:76b7b3b9-f0b4-49d9-8aed-097850631f85@e8g2000vbz.googlegroups.com... > > > > > > > On May 24, 1:44 pm, "Michael P." <m...@home.com> wrote: > >> "steve" <bungalow_st...@yahoo.com> wrote in message > > >>news:806aba6c-3965-4613-b359-a706b32d7e29@e17g2000prj.googlegroups.com... > > >> > On May 18, 2:02 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: > >> >> Michael P. <m...@home.com> wrote: > > >> >> (snip) > > >> >> > Well put Dave. > >> >> > All bin magnitudes are points on a scaled Sinc curve. > >> >> > As I say in the document now window must be used. > >> >> > That is because only a rectangular window (= no window) is > >> >> > tranformed > >> >> > to a Sinc curve. > > >> >> Yes, but why the sinc in the first place? > > >> >> The Sinc comes out as the Fourier transform of Rect, the result > >> >> of reconstructing an infinitely long periodic signal. > > >> >> If one does an FFT on a finite duration signal, then adds the > >> >> constraint that all the points not sampled (to plus and minus > >> >> infinity) > >> >> are zero, then one finds Sinc as the inverse transform. > > >> > The sinc response is purely a filter characteristic of a process of > >> > truncating a signal. It has nothing to do with an FFT or assumptions > >> > of what the signal is doing before or after the truncated record. > > >> This is one very important piece of information that I have learned > >> from this discussion. Thank you Steve. > >> I thought the sinc response came from the FFT. But now that I understand > >> it, > >> it's obvious. Truncating a sine and considering the result as one cycle > >> of > >> a periodic signal will not result in a periodic pure sine signal. Unless > >> you > >> are lucky. > > >> Michael- Hide quoted text - > > >> - Show quoted text - > > > Yes, that is important, the FFT is perfect,it is telling you exactly > > the frequency content of the signal you fed it, it's the truncation > > that introduces the errors. > > > Interestingly, multiplying the truncated input by a sinc function > > gives you a perfectly flat filter response, so you don't need to do > > your estimation. (transform of a sinc is a pulse in frequency domain). > > > But sinc window is not time limited, so it's unrealizable, so a > > truncated sinc is used, this family of sinc like windows are known as > > flatop windows. > > >http://en.wikipedia.org/wiki/File:Window_function_(flat_top).png > > Yes, what you say about the flat_top window is very interesting. > If I understand it correctly, the bin magnitude is the real magnitude. > If the frequency lies between bins would that mean that you would > do a linear interpolation to find the frequency? > > I also read that a gaussian window has a parabolic impulse response, > making it possible to do exact parabolic interpolation. > > Michael- Hide quoted text - > > - Show quoted text -
Yes the bin magnitude is the real magnitude (the gain is near 1 over the entire bin), it is not useful for frequency estimation.