On Tue, 21 Feb 2017 15:30:50 +0100, Michael Plet <me@home.com> wrote:
>On Tue, 21 Feb 2017 14:07:17 +0100, Michael Plet <me@home.com> wrote:
>
>>Hi Group
>>
>>This is a new estimator based on real and imaginary values of two DFT
>>bins.
>>The estimator is exact for a pure sinusoid without noise.
>>It performs well in the presence of noise.
>>
>
>
>Here is the result of a test run:
>
Thank you to Cedron for letting me use his test program!
Michael
Reply by Michael Plet●February 21, 20172017-02-21
On Tue, 21 Feb 2017 14:07:17 +0100, Michael Plet <me@home.com> wrote:
>Hi Group
>
>This is a new estimator based on real and imaginary values of two DFT
>bins.
>The estimator is exact for a pure sinusoid without noise.
>It performs well in the presence of noise.
>
Here is the result of a test run:
The sample count is 100
and the run size is 1000
The phase value is 0.785398
Errors are shown at 100x actual value
Target Noise Level = 0.000
Freq Plet's Second Estimator
---- -------------
3.0 -0.000 0.000
3.1 0.000 0.000
3.2 -0.000 0.000
3.3 0.000 0.000
3.4 0.000 0.000
3.5 0.000 0.000
3.6 0.000 0.000
3.7 0.000 0.000
3.8 -0.000 0.000
3.9 0.000 0.000
Target Noise Level = 0.001
Freq Plet's Second Estimator
---- -------------
3.0 0.000 0.023
3.1 -0.001 0.030
3.2 0.000 0.072
3.3 -0.001 0.062
3.4 -0.000 0.019
3.5 -0.000 0.011
3.6 0.000 0.009
3.7 -0.000 0.008
3.8 -0.000 0.009
3.9 -0.000 0.012
Target Noise Level = 0.010
Freq Plet's Second Estimator
---- -------------
3.0 0.001 0.229
3.1 -0.005 0.297
3.2 -0.014 0.715
3.3 -0.020 0.610
3.4 0.001 0.183
3.5 0.003 0.113
3.6 0.003 0.088
3.7 0.004 0.082
3.8 -0.001 0.096
3.9 0.004 0.117
Target Noise Level = 0.100
Freq Plet's Second Estimator
---- -------------
3.0 -0.035 2.217
3.1 -0.183 3.099
3.2 -0.074 7.428
3.3 -0.408 6.296
3.4 -0.129 1.903
3.5 0.003 1.116
3.6 -0.006 0.865
3.7 -0.033 0.816
3.8 -0.046 0.918
3.9 -0.001 1.138
Michael
Reply by Michael Plet●February 21, 20172017-02-21
Hi Group
This is a new estimator based on real and imaginary values of two DFT
bins.
The estimator is exact for a pure sinusoid without noise.
It performs well in the presence of noise.
Let k be the index of the DFT bin with the largest magnitude.
Let j be the index of the DFT bin with the largest magnitude
neigboring bin k.
That is j=k-1 or j=k+1.
Now let
Sk = Sin(2*PI*k/N)
Ck = Cos(2*PI*k/N)
Sj = Sin(2*PI*j/N)
Cj = Cos(2*PI*j/N)
Then the Cosine of the normalised angular frequency can be estimated
as the root
of the quadratic with the following coefficients:
A = Sj*Im[k] - Sk*Im[j]
B = Sj*Sk*Re[k] - 2*Sj*Ck*Im[k] - Sk*Sj*Re[j] + 2*Sk*Cj*Im[j]
C = - Sj*Sk*Ck*Re[k] + Sj*Ck^2*Im[k] + Sk*Sj*Cj*Re[j] - Sk*Cj^2*Im[j]
where Re[] is the real part of X[] and Im[] is the imaginary part of
X[].
The roots are
Cw1 = (-B + Sqr(B^2-4*A*C))/(2*A)
and
Cw2 = (-B - Sqr(B^2-4*A*C))/(2*A)
The root in the interval [Min(Ck,Cj), Max(Ck,Cj)] is the correct
answer, Cw.
The normalised frequency is then
Freq=(N/(2*PI))*Arccos(Cw)
Regards,
Michael Plet