DSPRelated.com
Forums

measuruement of peak amplitude of each cycle of sinusoid having varying frequency

Started by Unknown August 22, 2011
On Aug 31, 9:14&#4294967295;pm, dbd <d...@ieee.org> wrote:
> On Aug 31, 11:10&#4294967295;am, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On Aug 31, 5:33&#4294967295;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > ... > > > Dear doctor Rune, > > > > Isn't it obvious that the 3-pt parametric model could be just as well > > > defined in the frequency domain? > > > > BTW, not very long ago a madman was proposing exactly this idea here and > > > was catcalled for that. > > > > Vladimir Vassilevsky > > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com > > > No, it's not. The 3-pt interpolation works because of the > > known sinusoidal form. I can't see that this would work > > in the genersl case. > > > Rune > > Yes, 3 point frequency domain interpolation to determine the frequency > of a sinusoid only works for sinusoids. There is no "general case". > There is time interpolation in the time domain and frequency > interpolation in the frequency domain. No one has said that they are > the same thing. Only that both have definitions relevant to their > respective domains. In your youth you may only have been taught time > domain interpolation, but "interpolation" isn't only "time domain > interpolation" anymore, and hasn't been since the 1940s or 1950s (or > before). > > Dale B. Dalrymple
Frequency-domsin interpolation is trivial. But this is not about interpolation, which only can be expected to produce an *approximation* to the desired result, but about (using Eric's term) *deducing* the frequency. Two vastly different problem statements. And, of course, parametric methods are yet another kettke of fish, altogether. Rune
On Wed, 31 Aug 2011 12:46:09 -0700 (PDT), Rune Allnor
<allnor@tele.ntnu.no> wrote:

>On Aug 31, 9:14=A0pm, dbd <d...@ieee.org> wrote: >> On Aug 31, 11:10=A0am, Rune Allnor <all...@tele.ntnu.no> wrote: >> >> >> >> >> >> > On Aug 31, 5:33=A0pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote: >> > ... >> > > Dear doctor Rune, >> >> > > Isn't it obvious that the 3-pt parametric model could be just as well >> > > defined in the frequency domain? >> >> > > BTW, not very long ago a madman was proposing exactly this idea here = >and >> > > was catcalled for that. >> >> > > Vladimir Vassilevsky >> > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com >> >> > No, it's not. The 3-pt interpolation works because of the >> > known sinusoidal form. I can't see that this would work >> > in the genersl case. >> >> > Rune >> >> Yes, 3 point frequency domain interpolation to determine the frequency >> of a sinusoid only works for sinusoids. There is no "general case". >> There is time interpolation in the time domain and frequency >> interpolation in the frequency domain. No one has said that they are >> the same thing. Only that both have definitions relevant to their >> respective domains. In your youth you may only have been taught time >> domain interpolation, but "interpolation" isn't only "time domain >> interpolation" anymore, and hasn't been since the 1940s or 1950s (or >> before). >> >> Dale B. Dalrymple > >Frequency-domsin interpolation is trivial. > >But this is not about interpolation, which only can be >expected to produce an *approximation* to the desired >result, but about (using Eric's term) *deducing* the frequency.
It is interpolation, IMHO. If the spectral peak for a FD tone from a sinusoid is in between bin samples (which will often be the case), then the peak location and amplitude must be computed (or estimated, or whatever you want to call it) using the surrounding samples. To me that means it's being interpolated. A FT is an estimator, anyway, and sampled signals are essentially estimated from their analog realities, so nearly everything we do in DSP is an estimate or approximation. Very often the estimates and approximations are accurate enough that we can nearly forget that they're not "reality", whatever that is, and use the results with good confidence. I think many of these techniques for finding amplitude and frequency in DFT outputs fall into that category for many applications, i.e., they can be pretty accurate if well executed.
>Two vastly different problem statements. > >And, of course, parametric methods are yet another >kettke of fish, altogether. > >Rune
Eric Jacobsen http://www.ericjacobsen.org http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
Eric Jacobsen <eric.jacobsen@ieee.org> wrote:

(snip someone wrote)
>>> Yes, 3 point frequency domain interpolation to determine the frequency >>> of a sinusoid only works for sinusoids. There is no "general case".
(then someone else wrote)
>>Frequency-domsin interpolation is trivial.
>>But this is not about interpolation, which only can be >>expected to produce an *approximation* to the desired >>result, but about (using Eric's term) *deducing* the frequency.
> It is interpolation, IMHO. If the spectral peak for a FD tone from a > sinusoid is in between bin samples (which will often be the case), > then the peak location and amplitude must be computed (or estimated, > or whatever you want to call it) using the surrounding samples. To > me that means it's being interpolated.
If you have a true sinusoid (single frequency) of unknown amplitude and phase, and three samples (not so far apart that there could be a whole cycle in between) then you can exactly determine the frequency, phase, and amplitude. (Three equations, three unknowns.) Similarly, Nyquist supposedly allows us to exactly determine a band-limited waveform from samples, though that does require an infinite number of samples. And with quantized samples, it will only be approximate in any case.
> A FT is an estimator, anyway, and sampled signals are essentially > estimated from their analog realities, so nearly everything we do in > DSP is an estimate or approximation. Very often the estimates and > approximations are accurate enough that we can nearly forget that > they're not "reality", whatever that is, and use the results with good > confidence.
Yes. Since we never have pure (t=-infinity to +infinity) sinusoids, in the actual case it will be approximate.
> I think many of these techniques for finding amplitude and frequency > in DFT outputs fall into that category for many applications, i.e., > they can be pretty accurate if well executed.
Well, if it is already known to be a pure tone (single sinusoid) then DFT may not be the best tool. -- glen
On Aug 31, 10:28&#4294967295;pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote:
> On Wed, 31 Aug 2011 12:46:09 -0700 (PDT), Rune Allnor > > > > > > <all...@tele.ntnu.no> wrote: > >On Aug 31, 9:14=A0pm, dbd <d...@ieee.org> wrote: > >> On Aug 31, 11:10=A0am, Rune Allnor <all...@tele.ntnu.no> wrote: > > >> > On Aug 31, 5:33=A0pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > >> > ... > >> > > Dear doctor Rune, > > >> > > Isn't it obvious that the 3-pt parametric model could be just as well > >> > > defined in the frequency domain? > > >> > > BTW, not very long ago a madman was proposing exactly this idea here = > >and > >> > > was catcalled for that. > > >> > > Vladimir Vassilevsky > >> > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com > > >> > No, it's not. The 3-pt interpolation works because of the > >> > known sinusoidal form. I can't see that this would work > >> > in the genersl case. > > >> > Rune > > >> Yes, 3 point frequency domain interpolation to determine the frequency > >> of a sinusoid only works for sinusoids. There is no "general case". > >> There is time interpolation in the time domain and frequency > >> interpolation in the frequency domain. No one has said that they are > >> the same thing. Only that both have definitions relevant to their > >> respective domains. In your youth you may only have been taught time > >> domain interpolation, but "interpolation" isn't only "time domain > >> interpolation" anymore, and hasn't been since the 1940s or 1950s (or > >> before). > > >> Dale B. Dalrymple > > >Frequency-domsin interpolation is trivial. > > >But this is not about interpolation, which only can be > >expected to produce an *approximation* to the desired > >result, but about (using Eric's term) *deducing* the frequency. > > It is interpolation, IMHO. &#4294967295;If the spectral peak for a FD tone from a > sinusoid is in between bin samples (which will often be the case), > then the peak location and amplitude must be computed (or estimated, > or whatever you want to call it) using the surrounding samples. &#4294967295; To > me that means it's being interpolated.
A 'frequency estimator' is a technique that can be *proved* to extract the 'true' frequency from a sinusoidal under ideal circumstances. The term 'estimator' is used for the non-ideal case that includes noise and other signsl imperfections. An interpolator merely comes up with a location for a peak, irrespective of whether this peak is in any way related to any signal contents. If I were to review the paper you cited, I'd advice against it being published.
> A FT is an estimator, anyway, and sampled signals are essentially > estimated from their analog realities, so nearly everything we do in > DSP is an estimate or approximation. &#4294967295;
No. DSP is a set of tools that work exactly in a particular exact 'universe' with exacly defined properties.
> Very often the estimates and > approximations are accurate enough that we can nearly forget that > they're not "reality", whatever that is, and use the results with good > confidence.
True, but one oversteps a significant line when one presents a pragmatic, off-the-inspiration-of-the-moment improvisation of the kind I suppose most people here come up with three times per day, as something more.
> I think many of these techniques for finding amplitude and frequency > in DFT outputs fall into that category for many applications, i.e., > they can be pretty accurate if well executed.
Again, that doesn't warrant that such tricks and methods shold be presented as more than they really are. I have no problems with such techniques being presentef as 'spectrum interpolators'. If you want to use the term 'frequency estimator' about the same techniques, you need to prove that whatever spectrum peaks are found have anything to do with spectral contents.
> >Two vastly different problem statements. > > >And, of course, parametric methods are yet another > >kettke of fish, altogether. > > >Rune > > Eric Jacobsenhttp://www.ericjacobsen.orghttp://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
Rune
On Wed, 31 Aug 2011 15:04:02 -0700 (PDT), Rune Allnor
<allnor@tele.ntnu.no> wrote:

>On Aug 31, 10:28=A0pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote: >> On Wed, 31 Aug 2011 12:46:09 -0700 (PDT), Rune Allnor >> >> >> >> >> >> <all...@tele.ntnu.no> wrote: >> >On Aug 31, 9:14=3DA0pm, dbd <d...@ieee.org> wrote: >> >> On Aug 31, 11:10=3DA0am, Rune Allnor <all...@tele.ntnu.no> wrote: >> >> >> > On Aug 31, 5:33=3DA0pm, Vladimir Vassilevsky <nos...@nowhere.com> wr= >ote: >> >> > ... >> >> > > Dear doctor Rune, >> >> >> > > Isn't it obvious that the 3-pt parametric model could be just as w= >ell >> >> > > defined in the frequency domain? >> >> >> > > BTW, not very long ago a madman was proposing exactly this idea he= >re =3D >> >and >> >> > > was catcalled for that. >> >> >> > > Vladimir Vassilevsky >> >> > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com >> >> >> > No, it's not. The 3-pt interpolation works because of the >> >> > known sinusoidal form. I can't see that this would work >> >> > in the genersl case. >> >> >> > Rune >> >> >> Yes, 3 point frequency domain interpolation to determine the frequency >> >> of a sinusoid only works for sinusoids. There is no "general case". >> >> There is time interpolation in the time domain and frequency >> >> interpolation in the frequency domain. No one has said that they are >> >> the same thing. Only that both have definitions relevant to their >> >> respective domains. In your youth you may only have been taught time >> >> domain interpolation, but "interpolation" isn't only "time domain >> >> interpolation" anymore, and hasn't been since the 1940s or 1950s (or >> >> before). >> >> >> Dale B. Dalrymple >> >> >Frequency-domsin interpolation is trivial. >> >> >But this is not about interpolation, which only can be >> >expected to produce an *approximation* to the desired >> >result, but about (using Eric's term) *deducing* the frequency. >> >> It is interpolation, IMHO. =A0If the spectral peak for a FD tone from a >> sinusoid is in between bin samples (which will often be the case), >> then the peak location and amplitude must be computed (or estimated, >> or whatever you want to call it) using the surrounding samples. =A0 To >> me that means it's being interpolated. > >A 'frequency estimator' is a technique that can be >*proved* to extract the 'true' frequency from a >sinusoidal under ideal circumstances. The term >'estimator' is used for the non-ideal case that includes >noise and other signsl imperfections. > >An interpolator merely comes up with a location >for a peak, irrespective of whether this peak is in >any way related to any signal contents. > >If I were to review the paper you cited, I'd advice >against it being published. > >> A FT is an estimator, anyway, and sampled signals are essentially >> estimated from their analog realities, so nearly everything we do in >> DSP is an estimate or approximation. =A0 > >No. DSP is a set of tools that work exactly in a >particular exact 'universe' with exacly defined properties. > >> Very often the estimates and >> approximations are accurate enough that we can nearly forget that >> they're not "reality", whatever that is, and use the results with good >> confidence. > >True, but one oversteps a significant line when one >presents a pragmatic, off-the-inspiration-of-the-moment >improvisation of the kind I suppose most people here >come up with three times per day, as something more. > >> I think many of these techniques for finding amplitude and frequency >> in DFT outputs fall into that category for many applications, i.e., >> they can be pretty accurate if well executed. > >Again, that doesn't warrant that such tricks and methods >shold be presented as more than they really are. > >I have no problems with such techniques being presentef >as 'spectrum interpolators'. > >If you want to use the term 'frequency estimator' about >the same techniques, you need to prove that whatever >spectrum peaks are found have anything to do with >spectral contents.
Unfortunately you're kind of late with the suggestion, since Dale's correct that this sort of thing has been done (with numerous publications to the effect) for several decades. Since the parameter being estimated/computed/approximated/guessed/betted on/promoted is often frequency, I don't think the term "frequency estimator" is out of place, especially since the location of the peak in question is scaled as "frequency" in a FT of time-sampled data. I'm not sure it matters what's in the box to call the box a "frequency estimator", if it can be shown that putting a signal into the box results in an output that is practically consistent with the frequency of what was put in.
> >> >Two vastly different problem statements. >> >> >And, of course, parametric methods are yet another >> >kettke of fish, altogether. >> >> >Rune >> >> Eric Jacobsenhttp://www.ericjacobsen.orghttp://www.dsprelated.com/blogs-1= >//Eric_Jacobsen.php > >Rune
Eric Jacobsen http://www.ericjacobsen.org http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
On 1 Sep, 01:34, eric.jacob...@ieee.org (Eric Jacobsen) wrote:
> On Wed, 31 Aug 2011 15:04:02 -0700 (PDT), Rune Allnor > > > > > > <all...@tele.ntnu.no> wrote: > >On Aug 31, 10:28=A0pm, eric.jacob...@ieee.org (Eric Jacobsen) wrote: > >> On Wed, 31 Aug 2011 12:46:09 -0700 (PDT), Rune Allnor > > >> <all...@tele.ntnu.no> wrote: > >> >On Aug 31, 9:14=3DA0pm, dbd <d...@ieee.org> wrote: > >> >> On Aug 31, 11:10=3DA0am, Rune Allnor <all...@tele.ntnu.no> wrote: > > >> >> > On Aug 31, 5:33=3DA0pm, Vladimir Vassilevsky <nos...@nowhere.com> wr= > >ote: > >> >> > ... > >> >> > > Dear doctor Rune, > > >> >> > > Isn't it obvious that the 3-pt parametric model could be just as w= > >ell > >> >> > > defined in the frequency domain? > > >> >> > > BTW, not very long ago a madman was proposing exactly this idea he= > >re =3D > >> >and > >> >> > > was catcalled for that. > > >> >> > > Vladimir Vassilevsky > >> >> > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com > > >> >> > No, it's not. The 3-pt interpolation works because of the > >> >> > known sinusoidal form. I can't see that this would work > >> >> > in the genersl case. > > >> >> > Rune > > >> >> Yes, 3 point frequency domain interpolation to determine the frequency > >> >> of a sinusoid only works for sinusoids. There is no "general case". > >> >> There is time interpolation in the time domain and frequency > >> >> interpolation in the frequency domain. No one has said that they are > >> >> the same thing. Only that both have definitions relevant to their > >> >> respective domains. In your youth you may only have been taught time > >> >> domain interpolation, but "interpolation" isn't only "time domain > >> >> interpolation" anymore, and hasn't been since the 1940s or 1950s (or > >> >> before). > > >> >> Dale B. Dalrymple > > >> >Frequency-domsin interpolation is trivial. > > >> >But this is not about interpolation, which only can be > >> >expected to produce an *approximation* to the desired > >> >result, but about (using Eric's term) *deducing* the frequency. > > >> It is interpolation, IMHO. =A0If the spectral peak for a FD tone from a > >> sinusoid is in between bin samples (which will often be the case), > >> then the peak location and amplitude must be computed (or estimated, > >> or whatever you want to call it) using the surrounding samples. =A0 To > >> me that means it's being interpolated. > > >A 'frequency estimator' is a technique that can be > >*proved* to extract the 'true' frequency from a > >sinusoidal under ideal circumstances. The term > >'estimator' is used for the non-ideal case that includes > >noise and other signsl imperfections. > > >An interpolator merely comes up with a location > >for a peak, irrespective of whether this peak is in > >any way related to any signal contents. > > >If I were to review the paper you cited, I'd advice > >against it being published. > > >> A FT is an estimator, anyway, and sampled signals are essentially > >> estimated from their analog realities, so nearly everything we do in > >> DSP is an estimate or approximation. =A0 > > >No. DSP is a set of tools that work exactly in a > >particular exact 'universe' with exacly defined properties. > > >> Very often the estimates and > >> approximations are accurate enough that we can nearly forget that > >> they're not "reality", whatever that is, and use the results with good > >> confidence. > > >True, but one oversteps a significant line when one > >presents a pragmatic, off-the-inspiration-of-the-moment > >improvisation of the kind I suppose most people here > >come up with three times per day, as something more. > > >> I think many of these techniques for finding amplitude and frequency > >> in DFT outputs fall into that category for many applications, i.e., > >> they can be pretty accurate if well executed. > > >Again, that doesn't warrant that such tricks and methods > >shold be presented as more than they really are. > > >I have no problems with such techniques being presentef > >as 'spectrum interpolators'. > > >If you want to use the term 'frequency estimator' about > >the same techniques, you need to prove that whatever > >spectrum peaks are found have anything to do with > >spectral contents. > > Unfortunately you're kind of late with the suggestion, since Dale's > correct that this sort of thing has been done (with numerous > publications to the effect) for several decades.
If so, it's yet another reason why DSP is a degenerating subject.
> Since the parameter > being estimated/computed/approximated/guessed/betted on/promoted is > often frequency, I don't think the term "frequency estimator" is out > of place, especially since the location of the peak in question is > scaled as "frequency" in a FT of time-sampled data.
That's not the issue. The issue is whether the computed peak in the interpolated spectrum can be justified to have anything, whatsoever, to do with the frequency of the sinusoidal. Let's say a stupident gets the impression that "interpolation = frequency estimation", which seems to be your position. What argument to correct him, if any, would you use if he chooses to use linear interpolation between Fourier coefficients? What criterium, if any, would you use to argue that quadratic interpolation is 'better'than cubic interpolation? Or vice versa? And where do splines fit into this picture?
> I'm not sure it matters what's in the box to call the box a "frequency > estimator", if it can be shown that putting a signal into the box > results in an output that is practically consistent with the frequency > of what was put in.
What matters is the use of the term 'practically' in the paragraph above. Yes, I agree that crude, pragmatic methods like cubic interpolation might give results that are not vastly different from those obtained by zero-padding + DFT, but I would never promote that technique as viable. It's the kind of half-dirty trick one might use, but that would not stand up to rigorous challenges in peer review or by clients. Rune
On 9/1/11 2:21 PM, Rune Allnor wrote:
> > That's not the issue. The issue is whether the computed peak in > the interpolated spectrum can be justified to have anything, > whatsoever, to do with the frequency of the sinusoidal. > > Let's say a stupident gets the impression that "interpolation = frequency > estimation", which seems to be your position. What argument to correct > him, if any, would you use if he chooses to use linear interpolation between > Fourier coefficients? What criterium, if any, would you use to argue that > quadratic interpolation is 'better'than cubic interpolation? Or vice versa?
Rune and Eric et. al., i've only been marginally watching this thread. the only justification i would make that the quadratically-fitted peak has something to do with the "true frequency" one is that, given any even-symmetry window applied to a solid sinusoid (having the "true frequency", we'll call it "f0"), the peak and sidelobes should also have even symmetry about both sides of the frequency of that sinusoid. so, suppose you *did* know that frequency a priori, that peak should have a shape that is even-symmetry and would be expressed as only even powers of f-f0 X(f) = a0 + a2*(f-f0)^2 + a4*(f-f0)^4 + a6*(f-f0)^6 + ... (this does not deal with the overlap from sidelobes of other exponential-sinusoidal terms, including the one we know is at -f0.) there are no odd order terms in that series. now i know how to take 3 points (the discrete peak and its two adjacent neighbors) and turn that into a0, a2, and f0, if we were to toss out the higher order terms. to include a4, we would need one more point but should it be one added from the left or the right? if we used the five points, the discrete peak in the middle and the 4 neighbors, 2 on the left and 2 on the right, we should be able to solve for a0, a2, a4, a6, and f0 and that might be a better f0 than we get with just quadratic. but it's all an approximation. also, if you use a gaussian window and fit to the *log* magnitude, quadratic fit is perfectly correct. (assuming no noise or interference from other peaks.) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 1 Sep, 20:43, robert bristow-johnson <r...@audioimagination.com>
wrote:

> but it's all an approximation.
Exactly! It's an ad hoc, pragmatic, half-dirty trick that might work well enough. But nothing more. Rune
On Sep 1, 11:54&#4294967295;am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 1 Sep, 20:43, robert bristow-johnson <r...@audioimagination.com> > wrote: > > > but it's all an approximation. > > Exactly! > > It's an ad hoc, pragmatic, half-dirty trick that might work > well enough. > > But nothing more. > > Rune
Exactly! Time and frequency domain interpolations are exactly the same: approximations. The only necessary approximation in frequency domain interpolation when the proper algorithm is combined with the appropriate window is the limitation of DSP implementations to finite sets of samples. In the time domain? In the time domain, any DSP implementation is also only an approximation because of the limitation to calculations with finite sets of samples. How many time domain sinc interpolations have you completed with infinite sinc extents? Yes, even time domain interpolations are an "ad hoc, pragmatic, half-dirty trick that might work well enough. But nothing more." Dale B. Dalrymple
On 1 Sep, 22:47, dbd <d...@ieee.org> wrote:
> On Sep 1, 11:54&#4294967295;am, Rune Allnor <all...@tele.ntnu.no> wrote: > > > On 1 Sep, 20:43, robert bristow-johnson <r...@audioimagination.com> > > wrote: > > > > but it's all an approximation. > > > Exactly! > > > It's an ad hoc, pragmatic, half-dirty trick that might work > > well enough. > > > But nothing more. > > > Rune > > Exactly! Time and frequency domain interpolations are exactly the > same: approximations.
The only problem with that statement is that the starting point of the discussion is *frequency* *estimators*, not interpolations.
> The only necessary approximation in frequency domain interpolation > when the proper algorithm is combined with the appropriate window is > the limitation of DSP implementations to finite sets of samples.
There one fundamental problem with that statement: Why would one want to do a frequency-domain interpolation? Without answering that question, one can not possibly comment in any meaningful way on the necessity of any approximations.
> In > the time domain? In the time domain, any DSP implementation is also > only an approximation because of the limitation to calculations with > finite sets of samples. How many time domain sinc interpolations have > you completed with infinite sinc extents?
As a matter of fact, I can\t remember having computed any interpolations, in either frequency or time domains. I haven't needed to.
> Yes, even time domain > interpolations are an &#4294967295;"ad hoc, pragmatic, half-dirty trick that might > work well enough. But nothing more."
Right, but again, I can't see *why* one would want to compute the interpolation in the first place. If one does that, one either 1) Uses an "ad hoc, pragmatic, half-dirty trick that might work well enough" for some other, yet unspecified, purpose, or 2) does something wrong. Rune