COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Frequency Interpolation - Grandke's Method

• Email
• Follow

```I have a question about Grandke's method of frequency interpolation.  (I suspect this question has been asked before).  Using the Hanning window (and Schoukens, 1991 notation), he derives

f_interp = (i + delta) * fo, where

delta = (2*alpha - 1) / (alpha + 1), and

alpha = abs(X(i+1) / X(i)), and

{X(i), X(i+1)} includes the peak.  By definition,

0 < delta < 1, which implies 1/2 < alpha < 2.  Why must

alpha satisfy this?

---
```
 0
Reply creekmor (2) 4/20/2011 7:28:13 PM

See related articles to this posting

```On Wed, 20 Apr 2011 14:28:13 -0500, creekmor <user@compgroups.net/>
wrote:

>I have a question about Grandke's method of frequency interpolation.  (I suspect this question has been asked before).  Using the Hanning window (and Schoukens, 1991 notation), he derives
>
>f_interp = (i + delta) * fo, where
>
>delta = (2*alpha - 1) / (alpha + 1), and
>
>alpha = abs(X(i+1) / X(i)), and
>
>{X(i), X(i+1)} includes the peak.  By definition,
>
>0 < delta < 1, which implies 1/2 < alpha < 2.  Why must
>
>alpha satisfy this?

The units on delta are DFT bins, so if delta > 1 then you picked the
wrong bin for the maximum.   The correction is just to find a finer
estimate between bins, so the assumption is that the peak is already
determined within one bin.

Eric Jacobsen
http://www.ericjacobsen.org
http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
```
 0
Reply eric.jacobsen (2636) 4/20/2011 8:32:56 PM

```On Apr 20, 3:28=A0pm, creekmor <u...@compgroups.net/> wrote:
> I have a question about Grandke's method of frequency interpolation. =A0(=
I suspect this question has been asked before). =A0Using the Hanning window=
(and Schoukens, 1991 notation), he derives
>
> f_interp =3D (i + delta) * fo, where
>
> delta =3D (2*alpha - 1) / (alpha + 1), and
>
> alpha =3D abs(X(i+1) / X(i)), and
>
> {X(i), X(i+1)} includes the peak.

so the discrete peak can be either X[i] or X[i+1]?  what if you
included the wrong "2nd place" with the discrete peak?  e.g.  what if
X[i] is the discrete peak, but you should have chosen X[i-1] instead
of X[i+1]?

dunno who Grandke is, but i think this method sorta sucks.  a simple
quadratic peak interpolation with three points (the discrete peak and
its two adjacent neighbors) is better, both analytically and, since
division is required in both cases, in practice.  this method has a
name (i think i saw the person's name in Numerical Recipes) but i
dunno who it is.

r b-j
```
 0
Reply rbj (4090) 4/20/2011 9:01:16 PM

```On Apr 20, 2:01=A0pm, robert bristow-johnson <r...@audioimagination.com>
wrote:

>
> so the discrete peak can be either X[i] or X[i+1]? =A0what if you
> included the wrong "2nd place" with the discrete peak? =A0e.g. =A0what if
> X[i] is the discrete peak, but you should have chosen X[i-1] instead
> of X[i+1]?

Is there some reason to think it is unreasonably more difficult to
locate the peak value and the next greatest value than to find the
peak and the two adjacent values?

>
> dunno who Grandke is, but i think this method sorta sucks. =A0a simple
> quadratic peak interpolation with three points (the discrete peak and
> its two adjacent neighbors) is better, both analytically ...

Analytically, Grandke's method is derived from and exact for the von
Hann weighting. The quadratic peak interpolator is exact for the log
of the power spectrum for the Gaussian window and very good for large
transforms or high sidelobe rejection Gaussian windows for the
discrete case. The quadratic method may be more robust to some
mismatched window choices and is commonly used by people who accept
the inaccuracy for the benefit of code reuse.

Dale B. Dalrymple

```
 0
Reply dbd1 (1036) 4/21/2011 5:42:05 PM

```>On Wed, 20 Apr 2011 14:28:13 -0500, creekmor <user@compgroups.net/>
>wrote:
>
>>I have a question about Grandke's method of frequency interpolation.  (I
suspect this question has been asked before).  Using the Hanning window
(and Schoukens, 1991 notation), he derives
>>
>>f_interp = (i + delta) * fo, where
>>
>>delta = (2*alpha - 1) / (alpha + 1), and
>>
>>alpha = abs(X(i+1) / X(i)), and
>>
>>{X(i), X(i+1)} includes the peak.  By definition,
>>
>>0 < delta < 1, which implies 1/2 < alpha < 2.  Why must
>>
>>alpha satisfy this?
>
>The units on delta are DFT bins, so if delta > 1 then you picked the
>wrong bin for the maximum.   The correction is just to find a finer
>estimate between bins, so the assumption is that the peak is already
>determined within one bin.
>
>
>Eric Jacobsen
>http://www.ericjacobsen.org
>http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
>
I agree with that; however, the quantity

alpha = abs(X(i+1) / X(i))

clearly could be between 0 and infty.  For example, if the peak is located
at bin # i, and the next largest bin # is i+1, then

0 < alpha < 1

while if the peak is located at bin # i+1 and the next largest bin # is i,
then

1 < alpha < infty

However, to ensure that the fractional bin spacing delta satisfies

0 < delta < 1,

alpha must then satisfy

1/2 < alpha < 2

which contradicts the above.  In comparison, the interpolation formula for
the rectangular window is

delta = alpha / (alpha+1)

which causes no similar problem.

```
 0
Reply creekmor1 (1) 4/29/2011 1:02:13 PM

4 Replies
384 Views

Similar Articles

12/5/2013 2:14:01 AM
page loaded in 2173 ms -0

Similar Artilces:

:S
http://www.theregister.co.uk/content/3/32878.html Surely this defies the point of RISC processors? -- Russ Tarbox Biog: http://www.userve.co.uk/russbiog.htm Shop: http://www.stores.ebay.co.uk/riscitfromruss Remove THELID to reply by e-mail On Thu, 18 Sep 2003 09:12:27 +0000 (UTC) "Russ Tarbox" <russ-ebay@THELIDuserve.co.uk> wrote: > http://www.theregister.co.uk/content/3/32878.html > > Surely this defies the point of RISC processors? SIMD instructions themselves arent such a bad idea, and dont go against RISC per se. but MMX? how does that happen on ARM?? I&#

�Ѫ���S������
���� �K�Q�ө����f �v�t�q�e�F �v�t�Ҵ��� �W�p������ �l���s���Ի� (���q�|���E���u��.���ŷ|���K�����u��.�p�۷|���K���u��) �I�ڤ覡 �@.�f��I��: �G.ATM��b(���ھ�) �T.�H�Υd�u�W��d http://www.sexezgo.com ���ѱ���Ϋ~�B���H�Ϋ~����T�C ... ����Ϋ~,���H����,�i�f����Ϋ~,���H����,�R�𫽫�,�ʷR�ӫ~,�ʷP����,�O�I�M,���� ... �Ϋ~,�ʪ���,���k�� ����Ϋ~,��,���H�`,����Ϋ~,���H����,�i�f����Ϋ~,���H����,�R�� ... http://www.sexezgo.com �ʷP���ǯݸn�B�¦ӬX�B�i�f���[�G�B�ׯݾ��BSM�D��BAV�����B �S��R��ɡB����§�~�B�饻�s�_�����ΡB���줺�������Φ�ݸn�B �k�kDIY�βn�Ψ�B�ҩd���R�ձ��Ϋ~�B��ƲG�B�R�R�����զX http://www.sexezgo.com ���ѳf��I�ڡBSSL��d�B�l���N���B�v�t������~ �����K�]�˫��w�ɶ��ֳt�e�F�B���~�@�ߥH§�~�H�X�A���~�~ �]�˵L��󱡽�r�ˡA�Цw�߿��ʡC���z�R�o�w�ߥαo�}��!! �[�J�ڭ̪��u�� �K�����B�K�g��B�K�ٿn�ӫ~�B�K�ӫ~�P����B�K�[�]����B�K�{���]�p�A�u�n�A���@�x�q���i�H�W��A�A�N�i�H�}�@�a�֦��W�d�ذӫ~������Ϋ~���A�A�N�i�H���P�������ƿ��A�A�u�ݺ޲z�n�A���ө��A�t�d��P�A���ӫ~�A�@��������ڭ̳��|���A�B�z�A�ڭ̦�10�~����Ϋ~�}���g��A�ڭ̪����~���靈�v���ʡA�Ĥ@�B���~�̫K�y�F�ĤG�B�ӫ~����A�Ƥd�ذӫ~���A�g��F�ĤT�B�ڭ̪��t�e�t�ק֡A�o�˪��u�յ������z���P���P��X�C��ӫ~�A���P�ۦb�A�@�L���O���ȿ��C �������� (1)�����o��G�u�n�A���q��A�B�ڭ̤w�g�N�ӫ~�����H�X�ʧ@�A�Ȥ᧹���I�ڡA�z�N

Couple ?s
Question 1 concerning the RegQueryValueEx API REG_BINARY When it says binary data in any form, what does that specifically entail. (as opposed to REG_SZ used for strings) Question 2 How can I automate this to check for multiple characters in a string. I tried a inc esi statement. lea esi, szBigBuffer[0] ;look at 1st character in buffer for a match lodsb ..if EAX==31h ; the '1' character Thanks. "Andy Kennedy" <spamtrap@crayne.org> wrote: > >Question 1 concerning the RegQueryValueEx API >REG_BINARY > > When it says binary data in any form, what

root(s)
power(s)\n", stderr); exit(EXIT_FAILURE); } double base, power, powers; base = strtod(argv[1], NULL); power = strtod(argv[2], NULL); if (argv[4] == NULL) { printf("%.2f\n", base / power); exit(0); if (argv[4] != NULL) { powers = strtod(argv[4], NULL); printf("%.2f\n", (base * power) / powers); exit(0); } } return 0; } This is pretty complex for me. Bill On 2009-07-08, Bill Cunningham <nospam@nspam.invalid> wrote: > the 5th power. I received...(int argc, char **argv) >{ > if (argc < 3 || argv > 4) { > fputs("root usage error\n base power(s)\n", stderr); > exit(EXIT_FAILURE); > } > double base, power, powers; > base = strtod(argv[1], NULL); > power = strtod(argv[2], NULL); > if (argv[4] == NULL) { This is undefined behavior when argc is 3. If argc is 4, this expression always evaluates to 1. > printf("%.2f\n", base / power); > exit(0); > if (argv[4] != NULL) { This statement can never be reached. >

WinDuh!s
With all that talk about double-extensions a while ago, I took the time to give it a try, just out of curiosity. I created a file called "test.txt.exe" on the desktop. Now, it won't delete. If I hold [Shift] and press [Delete], I get an error message that reads that the file cannot be deleted since it's in use. If, on the other hand, I press [Delete] without hold [Shift], no error message shows, but the file doesn't actually delete. That's Duh number 1. Duh number 2 follows. I was browsing the "My Documents" folder of this hard disc, from another box on the local network. Now, the path for "My Documents" on here is: "C:\Documents and Settings\Tom\My Documents". When I browse to the "C:\Documents and Settings\Tom" directory from the other box, which is running under another username (not "Tom"), there is no "My Documents" folder there. Instead, there is [other box's username]'s Documents. I then double-click this to get access to "[...]\Tom\My Documents". Duh! "Tom B." wrote: > With all that talk about double-extensions a while ago, I took

.S GForth?
GForth: Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc. Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' Type `bye' to exit 1 2 3 4 5 6 7 8 9 10 ok 5 roll ok ..s <10> 2 3 4 6 7 8 9 10 5 ok Swift Forth: SwiftForth i386-Win32 3.1.11 03-Mar-2009 1 2 3 4 5 6 7 8 9 10 ok 5 roll ok ..s 1 2 3 4 6 7 8 9 10 5 <-Top ok Note that GForth shows 10 items on the stack, yet .S only displays nine. What happened to 1? The 1 is there, but .S didn't display it: Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc. Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' Type `bye' to exit 1 2 3 4 5 6 7 8 9 10 ok 5 roll ok ..s <10> 2 3 4 6 7 8 9 10 5 ok .. 5 ok .. 10 ok .. 9 ok .. 8 ok .. 7 ok .. 6 ok .. 4 ok .. 3 ok .. 2 ok .. 1 ok .. 0 *the terminal*:14: Stack underflow .. ^ Backtrace: Is this a problem in GForth, or simply more newbie stupidity? :-) Mark. MarkWills wrote: > Is this a problem in GForth, or simply more newbie stupidity? :-) Gforth prints only the topmost 10 stack elements. Very useful when you have hundreds of stack elements. Maybe we should print

Re: S A S ? #5 640860
Dear SAS-L-ers, Digime posted the following question: > Hi, > > Is this NewsGroup related to the SAS protocol used also for > exchange data in between Gambling Machines? > > thanx > No, and you can bet your bottom dollar on it! Nor, is this newsgroup related to the Special Air Service: http://britishsas.8m.com/ http://www.amazon.com/exec/obidos/tg/detail/-/0060578793/qid=1102712539/sr=1 -2/ref=sr_1_2/002-0803288-7179222?v=glance&s=books http://www.amazon.com/exec/obidos/tg/detail/-/1585740608/ref=pd_sim_b_3/002- 0803288-7179222?%5Fencoding=UTF8&v=glance ....though many of us do practice defensive programming! I hope that this suggestion proves helpful now, and in the future! Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote

Re: S A S ? #6 1545710
No. The discussion topic is the use of a group of computing products produced by the SAS Institute. In it's very early days, SAS stood for Statistical Analysis System but that name was dropped as the product expanded beyond purely statistical applications. Nat Wooding digime <digime@AUF_SERVE To: SAS-L@LISTSERV.UGA.EDU R.COM> cc: Sent by: "SAS(r) Subject: S A S ? Discussion" <SAS-L@LISTSERV.U GA.EDU> 12/10/04 02:27 PM Please respond to digime Hi, Is this NewsGroup related to the SAS protocol used also for exchange data in between Gambling Machines? thanx

5.0.6 O/S error(s)
appear on screen: | SWITCHDOS_FAIL: | dos: error:unix-dos communication failure. errno=6. SWITCHDOS_FAIL appears in the dosexec binary that Merge runs. | | How can I find an explanation of what "errno=6" is and what may have caused | it? man S Intro: [ENXIO] (6) No such device or address I/O on a special file refers to a subdevice which does not exist, or exists beyond the limit of the device. It may also occur when, for example, a tape drive is not on-line or no disk pack is loaded on a drive. | Additionally, I had the following... failure. errno=6. | | SWITCHDOS_FAIL appears in the dosexec binary that Merge runs. | | | | | How can I find an explanation of what "errno=6" is and what may have caused | | it? | | man S Intro: | | [ENXIO] (6) No such device or address | I/O on a special file refers to a subdevice which does not | exist, or exists beyond the limit of the device. It may | also occur when, for example, a tape drive is not on-line | or no disk pack is loaded on a drive. | | | Additionally, I had the following appear in the /usr/adm/messages file: | | Thu

s = std::string() vs. s = ""
constructor for strings, versus assigning > the null literal ""? I have found that my code typically uses "" for > returns and default arguments, but I am beginning to think this is poor > style. String() seems more direct. > I think they both almost come down to the same thing, they both call constructors.. s = std::string(); //calls the default constructor, string() s = ""; //calls the overloaded constructor, string(const char*) I guess the default constructor call is a little faster since it does not involve passing around a parameter...; out how much capacity you need, allocate it if necessary, and memcpy the > data in. if (!*str) 3 or 4 non-branching assembly language statements (inlined of course) That's almost certainly not going to be an application's primary bottleneck. <g> -- Pete Becker Dinkumware, Ltd. (http://www.dinkumware.com) [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] "Howard Hinnant" <hinnant@metrowerks.com> wrote in message news:hinnant-16A1AE.14294329092004@syrcnyrdrs-02->