allantools icon indicating copy to clipboard operation
allantools copied to clipboard

add bias correction to totdev(), mtotdev(), htotdev(), theo1()

Open aewallin opened this issue 9 years ago • 2 comments

I implemented a first try at htotdev() following the description in NIST SP 1065. The algorithm seems very similar to mtotdev(), but using frequency input data where mtotdev uses phase input data.

However the numbers produced by the algorithm seem incorrect. Should be fixed.

aewallin avatar Mar 25 '16 19:03 aewallin

output of htotdev() test, as compared to Stable32 is below. If the correct bias-correction at AF=1 (tau= 1*tau0) is 0.5 and 0.995 for other tau, then the values seem correct.

Tau N DEV(Stable32) DEV(allantools) rel.error bias ERROR 1 998 0.29439 0.208164 -0.292897 0.5000 ERROR 2 995 0.20297 0.202466 -0.002482 0.9950 ERROR 4 989 0.14252 0.142165 -0.002493 0.9950 ERROR 8 977 0.10822 0.107953 -0.002469 0.9951 ERROR 16 953 0.065265 0.065102 -0.002497 0.9950 ERROR 32 905 0.044644 0.0445319 -0.002510 0.9950 ERROR 64 809 0.033576 0.0334922 -0.002496 0.9950 128 617 0.02879 0.0287899 -0.000002 1.0000 OK! 256 233 0.014773 0.0147734 0.000027 1.0001 OK!

aewallin avatar Mar 25 '16 19:03 aewallin

Updated the title to include all functions that need bias correction.

aewallin avatar Apr 08 '16 18:04 aewallin