DSPRelated.com
Forums

My Sinc Estmator

Started by Michael P. May 17, 2011

"Eric Jacobsen" <eric.jacobsen@ieee.org> wrote in message 
news:4dd55138.92909577@www.eternal-september.org...
> On Wed, 18 May 2011 20:49:40 +0200, "Michael P." <me@home.com> wrote: > >> >> >>"Vladimir Vassilevsky" <nospam@nowhere.com> wrote in message >>news:v4adneR1RPw3j0nQnZ2dnUVZ_sydnZ2d@giganews.com... >>> >>> >>> Michael P. wrote: >>> >>>> "Michael P." <me@home.com> wrote in message >>>> news:TcednVNkjp6OcU_QnZ2dnUVZ8iadnZ2d@giganews.com... >>>> >>>>> Hi Group >>>>> >>>>> I have deduced/discovered some formulas >>>>> for interpolating between FFT bins when >>>>> calculating frequency and magnitude. >>> >>> >>>> I know that there are other methods and formulas. >>>> My formulas were deduced using pure mathematics >>>> from the fact that FFT transforms a rectangular window >>>> to a Sinc curve. >>>> I just wanted your opinion about my formulas. >>> >>> Michael, >>> >>> Before even getting to the consideration of your formulae, I would like >>> to >>> know in which way your estimator is supposed to be better then many >>> other >>> methods. >>> >>> In the other words, what point are you trying to make? >>> >>> >>> >>> Vladimir Vassilevsky >>> DSP and Mixed Signal Design Consultant >>> http://www.abvolt.com >> >>I am not claiming that my estimator is better! >>The only thing I am saying is that it is a direct calculation as opposed >>to an interpolation. >>I just want to hear if you guys agree with my reasoning or if there are >>flaws in my deductions. >> >>Michael >> > > You're interpolating, too, you're just taking a slightly different > approach. So the obvious questions hinge around whether your method > is better than others and in what way. > > The page I linked previously has matlab code for various similar > estimators, and it might be interesting if yours was compared against > the others that are already coded and perhaps even other candidates. > That would help understand any benefits that might exist in your > approach. > > There are lots of things to trade off with these types of estimators. > A short list off the top of my head: > > Bias > Variance > Performance in noise > Computational Complexity > Performance in the presence of other tones or signals > > So there's alwasy a chance that yours might be better in one of these > aspects or perhaps some other. Without comparisons there's no way to > know. > > > > Eric Jacobsen > http://www.ericjacobsen.org > http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
Hi Eric I have read all of your articles many times. They are very interesting and inspirational. I completely agree - comparisons are necessary to evaluate estimators. However, my viewpoint is purely theoretical and mathematical. So I am just considering a pure sine signal with no noise. I don't know if my method would be useful in practise. I don't think that I am interpolating. I know that I used the term myself. Normally interpolation is fitting a curve (usually a polynomial) to a number of points. In my case the magnitudes actually ARE points on a Sinc curve. I am just shifting the curve along the X-axis. In other words I am not fitting a curve. The points are part of the curve. Please look at the graphs in the document I have uploaded at http://users.cybercity.dk/~dsl70261/The%20Sinc%20Estimator.pdf A picture says more than a 1000 words :-) Best wishes, Michael
On May 19, 12:45&#4294967295;pm, glen herrmannsfeldt <g...@ugcs.caltech.edu>
wrote:
> dbd <d...@ieee.org> wrote: > > (snip) > > > If a signal has no window it has infinite extent. The rectangular > > window may require no multiplications to scale values within the > > window, but if a sampled signal has a finite number of samples, it has > > a window. > > Unless it has periodic boundary conditions. &#4294967295;Consider a weather > forecasting program sampling data around the earth. &#4294967295;It is naturally > periodic, for a finite number of samples without a window. >
Periodic boundary conditions are the window. One can sample around a closed loop forever. The infinite sequence may be periodic and described by a finite set of samples. But any place you decide to call the boundary defines a window. It could be the first time around the contour, the second, or from half way around the first time to a sample before half way around the second time. Even if you "sample around the contour once", the location you call the first sample becomes the definition of the window. The boundary condition has both period and location.
> There is no problem with a window, but assuming that everything > you can't see while looking through one is zero (black) doesn't > seem obvious to me. &#4294967295;It may be true in some cases, but not much > of the time.
Sinc interpolation doesn't assume that values outside the window are zero.
> > To me, it makes more sense to treat them as "don't care" and ask > what functions go through the remaining points. > > -- glen
It is nonsense to claim that they have been treated as zero. There may be interpretations of the FFT an analyst could make that would be equivalent to assuming zero, but sinc interpolation is not one of them. Dale B. Dalrymple
On 5/19/2011 1:52 PM, Michael P. wrote:
> > > "Eric Jacobsen" <eric.jacobsen@ieee.org> wrote in message > news:4dd55138.92909577@www.eternal-september.org... >> On Wed, 18 May 2011 20:49:40 +0200, "Michael P." <me@home.com> wrote: >> >>> >>> >>> "Vladimir Vassilevsky" <nospam@nowhere.com> wrote in message >>> news:v4adneR1RPw3j0nQnZ2dnUVZ_sydnZ2d@giganews.com... >>>> >>>> >>>> Michael P. wrote: >>>> >>>>> "Michael P." <me@home.com> wrote in message >>>>> news:TcednVNkjp6OcU_QnZ2dnUVZ8iadnZ2d@giganews.com... >>>>> >>>>>> Hi Group >>>>>> >>>>>> I have deduced/discovered some formulas >>>>>> for interpolating between FFT bins when >>>>>> calculating frequency and magnitude. >>>> >>>> >>>>> I know that there are other methods and formulas. >>>>> My formulas were deduced using pure mathematics >>>>> from the fact that FFT transforms a rectangular window >>>>> to a Sinc curve. >>>>> I just wanted your opinion about my formulas. >>>> >>>> Michael, >>>> >>>> Before even getting to the consideration of your formulae, I would >>>> like to >>>> know in which way your estimator is supposed to be better then many >>>> other >>>> methods. >>>> >>>> In the other words, what point are you trying to make? >>>> >>>> >>>> >>>> Vladimir Vassilevsky >>>> DSP and Mixed Signal Design Consultant >>>> http://www.abvolt.com >>> >>> I am not claiming that my estimator is better! >>> The only thing I am saying is that it is a direct calculation as opposed >>> to an interpolation. >>> I just want to hear if you guys agree with my reasoning or if there are >>> flaws in my deductions. >>> >>> Michael >>> >> >> You're interpolating, too, you're just taking a slightly different >> approach. So the obvious questions hinge around whether your method >> is better than others and in what way. >> >> The page I linked previously has matlab code for various similar >> estimators, and it might be interesting if yours was compared against >> the others that are already coded and perhaps even other candidates. >> That would help understand any benefits that might exist in your >> approach. >> >> There are lots of things to trade off with these types of estimators. >> A short list off the top of my head: >> >> Bias >> Variance >> Performance in noise >> Computational Complexity >> Performance in the presence of other tones or signals >> >> So there's alwasy a chance that yours might be better in one of these >> aspects or perhaps some other. Without comparisons there's no way to >> know. >> >> >> >> Eric Jacobsen >> http://www.ericjacobsen.org >> http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php > > Hi Eric > > I have read all of your articles many times. They are very interesting > and inspirational. > > I completely agree - comparisons are necessary to evaluate estimators. > However, my viewpoint is purely theoretical and mathematical. > So I am just considering a pure sine signal with no noise. > I don't know if my method would be useful in practise. > > I don't think that I am interpolating. I know that I used the term myself. > Normally interpolation is fitting a curve (usually a polynomial) to a > number of points. In my case the magnitudes actually ARE points > on a Sinc curve. I am just shifting the curve along the X-axis. > In other words I am not fitting a curve. The points are part of the curve. > Please look at the graphs in the document I have uploaded at > > http://users.cybercity.dk/~dsl70261/The%20Sinc%20Estimator.pdf > > A picture says more than a 1000 words :-) > > Best wishes, > Michael
Michael, I guess there are a couple of viewpoints: - when one is interpolating, one is trying to connect points of data. - when one is interpolating, one is trying to find a function that will connect points of data. - when one is interpolating, there are always underlying "rules" or constraints whether you know it or not. I believe your rule/constraint is that you will use a sinc because you know it has certain relationship to the task at hand. You aren't trying to "connect points" but you are trying to find a function that is based on data points. And, then, in the end the interpolation connects those points to determine the peak frequency, etc. You have to determine the amplitude and the phase of the sinc in order to do it. That's the interpolating function when you've found it. So, I'd have to agree that the process is one of interpolation - even though it may seem that it isn't. Maybe it would be easier to see if one viewed a sinc as a constrained sum of sinusoids. Then do the interpolation with those instead. It can be shown that a sinc interpolation of multiple samples can be resolved into a sum of sinusoids that do the same thing exactly. There may be other necessary conditions but that's the crux of it. Maybe I mean Dirichlets here but the idea is the same. I'd have to look it up. The constraint on the sine summation is probably the periodic zeros that must result. Would that make it easier to see as an interpolation? In your special case there is assumed to be but one sinusoid over finite time and thus one sinc envelope or Dirichlet envelope in frequency. Fred
"Fred Marshall" <fmarshallxremove_the_x@acm.org> wrote in message 
news:PlvBp.164719$vb5.1760@en-nntp-12.dc1.easynews.com...
> On 5/19/2011 1:52 PM, Michael P. wrote: >> >> >> "Eric Jacobsen" <eric.jacobsen@ieee.org> wrote in message >> news:4dd55138.92909577@www.eternal-september.org... >>> On Wed, 18 May 2011 20:49:40 +0200, "Michael P." <me@home.com> wrote: >>> >>>> >>>> >>>> "Vladimir Vassilevsky" <nospam@nowhere.com> wrote in message >>>> news:v4adneR1RPw3j0nQnZ2dnUVZ_sydnZ2d@giganews.com... >>>>> >>>>> >>>>> Michael P. wrote: >>>>> >>>>>> "Michael P." <me@home.com> wrote in message >>>>>> news:TcednVNkjp6OcU_QnZ2dnUVZ8iadnZ2d@giganews.com... >>>>>> >>>>>>> Hi Group >>>>>>> >>>>>>> I have deduced/discovered some formulas >>>>>>> for interpolating between FFT bins when >>>>>>> calculating frequency and magnitude. >>>>> >>>>> >>>>>> I know that there are other methods and formulas. >>>>>> My formulas were deduced using pure mathematics >>>>>> from the fact that FFT transforms a rectangular window >>>>>> to a Sinc curve. >>>>>> I just wanted your opinion about my formulas. >>>>> >>>>> Michael, >>>>> >>>>> Before even getting to the consideration of your formulae, I would >>>>> like to >>>>> know in which way your estimator is supposed to be better then many >>>>> other >>>>> methods. >>>>> >>>>> In the other words, what point are you trying to make? >>>>> >>>>> >>>>> >>>>> Vladimir Vassilevsky >>>>> DSP and Mixed Signal Design Consultant >>>>> http://www.abvolt.com >>>> >>>> I am not claiming that my estimator is better! >>>> The only thing I am saying is that it is a direct calculation as >>>> opposed >>>> to an interpolation. >>>> I just want to hear if you guys agree with my reasoning or if there are >>>> flaws in my deductions. >>>> >>>> Michael >>>> >>> >>> You're interpolating, too, you're just taking a slightly different >>> approach. So the obvious questions hinge around whether your method >>> is better than others and in what way. >>> >>> The page I linked previously has matlab code for various similar >>> estimators, and it might be interesting if yours was compared against >>> the others that are already coded and perhaps even other candidates. >>> That would help understand any benefits that might exist in your >>> approach. >>> >>> There are lots of things to trade off with these types of estimators. >>> A short list off the top of my head: >>> >>> Bias >>> Variance >>> Performance in noise >>> Computational Complexity >>> Performance in the presence of other tones or signals >>> >>> So there's alwasy a chance that yours might be better in one of these >>> aspects or perhaps some other. Without comparisons there's no way to >>> know. >>> >>> >>> >>> Eric Jacobsen >>> http://www.ericjacobsen.org >>> http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php >> >> Hi Eric >> >> I have read all of your articles many times. They are very interesting >> and inspirational. >> >> I completely agree - comparisons are necessary to evaluate estimators. >> However, my viewpoint is purely theoretical and mathematical. >> So I am just considering a pure sine signal with no noise. >> I don't know if my method would be useful in practise. >> >> I don't think that I am interpolating. I know that I used the term >> myself. >> Normally interpolation is fitting a curve (usually a polynomial) to a >> number of points. In my case the magnitudes actually ARE points >> on a Sinc curve. I am just shifting the curve along the X-axis. >> In other words I am not fitting a curve. The points are part of the >> curve. >> Please look at the graphs in the document I have uploaded at >> >> http://users.cybercity.dk/~dsl70261/The%20Sinc%20Estimator.pdf >> >> A picture says more than a 1000 words :-) >> >> Best wishes, >> Michael > > Michael, > > I guess there are a couple of viewpoints: > - when one is interpolating, one is trying to connect points of data. > - when one is interpolating, one is trying to find a function that will > connect points of data. > - when one is interpolating, there are always underlying "rules" or > constraints whether you know it or not. > > I believe your rule/constraint is that you will use a sinc because you > know it has certain relationship to the task at hand. > > You aren't trying to "connect points" but you are trying to find a > function that is based on data points. And, then, in the end the > interpolation connects those points to determine the peak frequency, etc. > > You have to determine the amplitude and the phase of the sinc in order to > do it. That's the interpolating function when you've found it. > > So, I'd have to agree that the process is one of interpolation - even > though it may seem that it isn't. > > Maybe it would be easier to see if one viewed a sinc as a constrained sum > of sinusoids. Then do the interpolation with those instead. > > It can be shown that a sinc interpolation of multiple samples can be > resolved into a sum of sinusoids that do the same thing exactly. There > may be other necessary conditions but that's the crux of it. Maybe I mean > Dirichlets here but the idea is the same. I'd have to look it up. The > constraint on the sine summation is probably the periodic zeros that must > result. > > Would that make it easier to see as an interpolation? > > In your special case there is assumed to be but one sinusoid over finite > time and thus one sinc envelope or Dirichlet envelope in frequency. > > Fred
I see what you mean Fred. So let's call it an interpolation. It doesn't matter that much to me. The formulas are still the same. Best wishes, Michael

"Jason" <cincydsp@gmail.com> wrote in message 
news:33a48305-0900-4c3d-9111-bfc68da2a826@f11g2000vbx.googlegroups.com...
> On May 18, 2:49 pm, "Michael P." <m...@home.com> wrote: >> "Vladimir Vassilevsky" <nos...@nowhere.com> wrote in message >> >> news:v4adneR1RPw3j0nQnZ2dnUVZ_sydnZ2d@giganews.com... >> >> >> >> >> >> >> >> >> >> >> >> > Michael P. wrote: >> >> >> "Michael P." <m...@home.com> wrote in message >> >>news:TcednVNkjp6OcU_QnZ2dnUVZ8iadnZ2d@giganews.com... >> >> >>> Hi Group >> >> >>> I have deduced/discovered some formulas >> >>> for interpolating between FFT bins when >> >>> calculating frequency and magnitude. >> >> >> I know that there are other methods and formulas. >> >> My formulas were deduced using pure mathematics >> >> from the fact that FFT transforms a rectangular window >> >> to a Sinc curve. >> >> I just wanted your opinion about my formulas. >> >> > Michael, >> >> > Before even getting to the consideration of your formulae, I would like >> > to >> > know in which way your estimator is supposed to be better then many >> > other >> > methods. >> >> > In the other words, what point are you trying to make? >> >> > Vladimir Vassilevsky >> > DSP and Mixed Signal Design Consultant >> >http://www.abvolt.com >> >> I am not claiming that my estimator is better! >> The only thing I am saying is that it is a direct calculation as opposed >> to an interpolation. >> I just want to hear if you guys agree with my reasoning or if there are >> flaws in my deductions. >> >> Michael > > From my reading, if appears that you are doing an interpolation; > you're just fitting a sinc function to the samples about the peak. For > the case of a rectangular-windowed signal with a pure non-bin-centered > tone, the spectral leakage that you observe in the magnitude of the > FFT has the shape of a sinc function; you're just fitting one to the > samples that you have, inferring that the actual peak location is at > the peak of the sinc function. Seems to me that you should be able to > generalize this to any window by using the window's magnitude response > as the fitting function. Not sure that its performance provides > anything compelling to you, though. > > I've used simple quadratic interpolation about the observed peak many > times in the past. It performs well under many cases and is very > simple to implement; as Eric pointed out, there are many criteria to > evaluate the estimator by. > > Jason
Hi Jason You make a very interesting point about using the window's magnitude response to use this estimator with windowed signals. I hadn't thought of that myself. Best wishes, Michael
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.
steve <bungalow_steve@yahoo.com> wrote:

(snip on sinc interpolation, then I wrote)

>> 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.
Yes.
> It has nothing to do with an FFT or assumptions of what > the signal is doing before or after the truncated record.
Then why truncate the signal? Specifically, why to zero? The FFT of a finite set of data points contains a discrete set of frequencies. There is nothing in between. It is only by making assumptions about what the signal does before and after the sampled region (window) that you can get frequencies in between. OK, why not linear interpolation? Why not cubic splines? Why not any other interpolation function? -- glen
On May 22, 12:01 am, glen herrmannsfeldt <g...@ugcs.caltech.edu>
wrote:
> steve <bungalow_st...@yahoo.com> wrote: > > (snip on sinc interpolation, then I wrote) > > >> 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. > > Yes. > > > It has nothing to do with an FFT or assumptions of what > > the signal is doing before or after the truncated record. > > Then why truncate the signal? Specifically, why to zero? > > The FFT of a finite set of data points contains a discrete set > of frequencies. There is nothing in between.
If it's bandlimited to B and sampling is 2B there are no frequencies in between (fourier series). It is only by
> making assumptions about what the signal does before and after > the sampled region (window) that you can get frequencies in between. >
If not bandlimited, then yes you have to guess to get a better answer, but FFT will spit out an answer that is identical to the answer if the signal is periodic outside the window, which is a pretty good guess in reality, most of the time, especially if you average FFT's.
> OK, why not linear interpolation? Why not cubic splines? > Why not any other interpolation function? > > -- glen
c
On May 22, 8:58 am, steve <bungalow_st...@yahoo.com> wrote:
> On May 22, 12:01 am, glen herrmannsfeldt <g...@ugcs.caltech.edu> > wrote: > > > > > steve <bungalow_st...@yahoo.com> wrote: > > > (snip on sinc interpolation, then I wrote) > > > >> 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. > > > Yes. > > > > It has nothing to do with an FFT or assumptions of what > > > the signal is doing before or after the truncated record. > > > Then why truncate the signal? Specifically, why to zero? > > > The FFT of a finite set of data points contains a discrete set > > of frequencies. There is nothing in between. > > If it's bandlimited to B and sampling is 2B there are no frequencies > in between (fourier series). > > It is only by > > > making assumptions about what the signal does before and after > > the sampled region (window) that you can get frequencies in between. > > If not bandlimited, then yes you have to guess to get a better answer, > but FFT will spit out an answer that is identical to the answer if the > signal is periodic outside the window, which is a pretty good guess in > reality, most of the time, especially if you average FFT's. > > > OK, why not linear interpolation? Why not cubic splines? > > Why not any other interpolation function? > > > -- glen > > c
I meant to say averaging overlapped FFT's.
On May 22, 12:01 am, glen herrmannsfeldt <g...@ugcs.caltech.edu>
wrote:
> steve <bungalow_st...@yahoo.com> wrote: > ... > > The sinc response is purely a filter characteristic of a process of > > truncating a signal. > > Yes. > > > It has nothing to do with an FFT or assumptions of what > > the signal is doing before or after the truncated record. > > Then why truncate the signal?
The signal is truncated to control the memory, processing, and latency required for the calculation.
> Specifically, why to zero?
There is no zero except in a defective meme that attempts interpret the FFT in terms of what would have to be done to make a continuous/ infinte Fourier transform give the same answer. The FFT is not a continuous or infinite calculation. It is a discrete and finite approximation. The values not used in the calculation are perhaps "don't know" or "don't care". Real world instruments like real time dynamic signal analyzers sample input signals continuously but can only store a finite record. The analyst often chooses to perform a calculation with a finite set of samples much smaller than the available stored history because it provides adequate accuracy and limits delay. The calculation, such as the interpolation of the FFT to determine frequency to finer resolution may be performed over and over to track the behavior of a slowly varying sinusoid. Understand that, the signal is known to continue with non-zero value, but the choice is made to exclude samples outside the sliding window at the time of each calculation because the analyst wants local information
> > The FFT of a finite set of data points contains a discrete set > of frequencies.
The is one possible interpretation. If you believe it, limit yourself to estimating frequency by peak-picking the periodogram and ignore those who claim to interpolate. They can't be right if the FFT outputs are "a discrete set of frequencies.
> There is nothing in between.
If you believe that, why participate in a dicsussion about which interpolation methods to use? Analysts interpret the finite output set in many ways.
> It is only by > making assumptions about what the signal does before and after > the sampled region (window) that you can get frequencies in between.
Yes. And the assumptions about what the signal does outside the window are rarely that it is zero. Often the assumption is that the signal consists of the sum of sinusoids that vary only slowly in amplitude and frequency. People who interpolate FFT bins to get more accurate estimates are also assuming that the signals are "well separated" and at a usefully high SNR. Analysts often repeat the calculations with different data sets to follow the changes. No assumption of zeroing anywhere in the system.
> > OK, why not linear interpolation?
It is used where the speed of computation justifies the loss of accuracy.
> Why not cubic splines?
For what windows do spline provide economy and efficiency? If there are any, they are probably in use.
> Why not any other interpolation function? >
Others are in use. People who don't want to take the time to match their algorithm to their window often use brute force numerical approaches such as table look-up as well as the parabolic estimator. There are always trade-offs between performance, efficiency and required knowledge and understanding Dale B. Dalrymple