# [time-nuts] Allan variance by sine-wave fitting

Magnus Danielson magnus at rubidium.dyndns.org
Thu Nov 23 10:23:55 EST 2017

```Hi,

There is trivial ways to estimate phase and amplitude of a sine using
linear methods. I saw however none of these properly referenced or
described. It would have been good to see those approaches attempted in
parallel on the same data and compare their performance with the
proposed approach. It seemed "fuzzy" how it worked, and that is never a
good sign in a scientific article, especially as it is n the heart of
the method described in the paper. The actual method should be named,
referenced and then also referenced with "as implemented by..." and we
only got the last part.

Cheers,
Magnus

On 11/23/2017 01:34 PM, d.schuecker at avm.de wrote:
> Hi,
>
> just my two cents on sine wave fitting.
>
> A undamped sine wave is the solution of the difference equation
>
> sig(n+1)=2*cos(w)*sig(n)-sig(n-1)
>
> This is a linear system of equations mapping the sum of the samples n+1 and
> n-1 to the sample n. The factor 2*cos(w) is the unknown. The least-squares
> solution of the overdetermined system is pure linear algebra, no nonlinear
> fitting involved. The trick also works for a damped sine wave. Care must be
> taken for high 'oversampling' rates, it works best for 4samples/sinewave,
> ie near Nyquist/2.
>
> Cheers
> Detlef
> DD4WV
>
>
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>
```