ntpstats.edf¶
Equivalent degrees of freedom (EDF) for stability variance estimates.
Every estimator in :mod:ntpstats.stability (ADEV, OADEV, MDEV, TDEV, HDEV)
is the mean of squares of a linear filter applied to the phase samples::
z_i = sum_k c_k x_{i*stride + k}, var_hat = mean(z_i^2) / norm
For Gaussian power-law noise the phase is itself a linear filter of white
noise, x = h_alpha * w (Kasdin & Walter 1992, the same model used to
generate test data), so z = (c * h_alpha) * w and its autocovariance
rho(k) follows exactly from the combined impulse response. Then::
EDF = 2 E[var_hat]^2 / Var[var_hat] = M^2 rho(0)^2 / sum_{|k|<M} (M - |k|) rho(k*stride)^2
This is the discrete-time counterpart of the algorithm of Greenhall & Riley
("Uncertainty of stability variances based on finite differences", PTTI
2003). Their continuous-time model assumes the phase is averaged over each
sample interval, which over-estimates the EDF for instantaneous samples at
small averaging factors (for example by 17 % for white FM at m = 1). The
discrete computation is exact for sampled clock offsets and is verified by
Monte Carlo in tests/test_edf.py.
edf(kind, alpha, m, terms)
¶
EDF of the kind estimate at averaging factor m built from
terms squared filter outputs, for power-law noise alpha.