[time-nuts] A simple sampling DMTD

Jan-Derk Bakker jdbakker at gmail.com
Sat May 30 09:43:40 UTC 2020


Dear Joe,

Thank you for your mail; always happy with the dialogue.

In a way we have come full circle; the Sherman/Jördens NIST paper was one
of my primary references for the design I made last summer. (It would have
been helpful had I linked to it upthread; I could have sworn I had done so,
but I cannot find the post.)

The arctan-based approach in the NIST paper is computationally infeasible
on an 8-bit processor. Even so, back in November I have dumped raw samples
over USB to a PC to see how much improvement can be seen over a simple
least squares linear ZCD. As was discussed before, bandpass filtering and
more advanced phase estimation are complementary in their results: with
ideal band pass filtering, the phase detection becomes much less critical
(and vice versa). The best balance I could find at the time was a tracking
loop which runs a 501-point BPF FIR kernel on three points of the period of
both channels (expected on-time, ~1/6th period early, ~1/6th period late)
and then uses the arctangens to determine the phase. This produced ADEV
results about 1dB worse than running the FIR+arctan on all samples, and
about 1dB better than the simple ZCD with cascaded
differentiators/integrators as computationally inexpensive filters. This
gave me a workable baseline for the DMTD with reduced sampling rate and
reduced computational effort.

(One of the limiting factors with the arctan-approach was that the quality
of the amplitude estimator plays a large role in the accuracy of the end
result. With arctan2 on I/Q data this is less of an issue; a FPGA can
efficiently do both in one go with a CORDIC)

Inspired by the NIST paper my sampling DMTD was designed to take an FPGA
daughterboard (the two rows of headers visible on
http://www.lartmaker.nl/time-nuts/dmtd-proto.jpg ). Last February I have
designed such a daughterboard (see attached image). Sadly, due to the
COVID-19 crisis my lab has closed for the foreseeable future; as I don't
have facilities to reliably populate 0402 parts and QFN packages at home,
this will have to wait for now.

(@Luciano: Yes, having this available as a solution accessible to amateurs
has always been one of my goals)

Sincerely,

JDB.
[I've been working on other mildly time-nutty things that *can* be soldered
at home lately; hope to have a post in a week or two]

[image: timenuts-dmtd-fpga.png]

On Fri, May 29, 2020 at 6:07 PM Joseph Gwinn <joegwinn at comcast.net> wrote:

> On Sun, 01 Dec 2019 01:01:34 -0500, time-nuts-request at lists.febo.com
> wrote:
> Re: time-nuts Digest, Vol 185, Issue 1
>
> ---------------------------------
> >
> > Message: 1
> > Date: Sat, 30 Nov 2019 12:23:07 -0500
> > From: Joseph Gwinn <joegwinn at comcast.net>
> > To: time-nuts at lists.febo.com
> > Subject: Re: [time-nuts] A simple sampling DMTD
> > Message-ID: <20191130122307326859.fc045b7c at comcast.net>
> > Content-Type: text/plain; charset=us-ascii
> >
> > Re: time-nuts Digest, Vol 184, Issue 40
> > On Fri, 29 Nov 2019 20:37:02 -0500, time-nuts-request at lists.febo.com
> > wrote:
> >
> > [snip]
> >> Message: 6
> >> Date: Fri, 29 Nov 2019 20:37:16 +0100
> >> From: Gerhard Hoffmann <dk4xp at arcor.de>
> >> To: time-nuts at lists.febo.com
> >> Subject: Re: [time-nuts] A simple sampling DMTD
> >> Message-ID: <f34ec823-04f2-a92f-b7a1-85ab165cdc6a at arcor.de>
> >> Content-Type: text/plain; charset=utf-8; format=flowed
> >>
> [snip]
> > The fundamental problem to be solved is to estimate the phases of two
> > beatnotes, one per channel (ref, signal under test), the phase
> > difference being converted into a relative time delay.  So, we are
> > estimating phase twice, against an unknown but common internal
> > reference, and the key question here is how best to measure those two
> > phases.  Detection of zero crossings is one way, but there are others.
>
> FYI, while looking for something unrelated, I recently ran across a
> relevant article from the NIST of Japan, published in 2007:
>
> "Frequency-Stability Measurement System Using High-Speed ADCs and
> Digital Signal Processing", Ken Mochizuki, Masaharu Uchino, and Takao
> Morikawa, IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL.
> 56, NO. 5, OCTOBER 2007, pages 1887-1893, Digital Object Identifier
> 10.1109/TIM.2007.895588.
>
> This can be implemented using a modern Software Defined Radio system.
>
> No zero-crossing detecter is used.  Computation of the time difference
> is detailed in reference [16] therein:
>
> [16] M. Uchino and K. Mochizuki, "Frequency stability measuring
> technique using digital signal processing," Electron. Commun. Jpn.,
> vol. 87, no. 1, pp. 21–33, 2004.   IEEE Xplore has it.
>
> Searching for Uchino et al led me to the following:
>
> "Oscillator metrology with software defined radio, Jeff A. Sherman and
> Robert Jördens (of NIST),  Review of Scientific Instruments 87, 054711
> (2016); https://doi.org/10.1063/1.4950898.  (Open version:
> <https://arxiv.org/pdf/1605.03505.pdf>)
>
> Joe Gwinn
>
>
> > We know the frequencies of the beatnotes quite accurately, and that the
> > waveforms are sine waves (which we will have band-pass filtered in
> > hardware before conversion to digital data).  Here, I will assume that
> > the frequencies are the same.  The only free variables are thus
> > amplitude and phase; these can be estimated using least squares applied
> > to successive batches of I&Q samples.  Windowing is still useful to
> > reduce end splice effects, as previously discussed.  Given that we are
> > working in the numerical domain, it's probably adequate to apply the
> > window function to the product of the proposed match and the actual
> > data, and then sum the windowed products.
> >
> > As a quality check, if the estimated amplitude is too small (or too
> > large), reject the phase estimate and try again.  If this condition
> > persists too long or becomes too common, something is broken.
> >
> > I doubt that anything of the 8-bit class is practical for this, and
> > certainly not for a small-volume product, because programming effort
> > increases sharply if the chosen processor is too limited.  Ardinuo and
> > maybe StrawberryPi seem more like it.
> >
> > As for emulation of floating point, the least-squares algorithm defined
> > above can certainly be implemented in fixed-point arithmetic, called
> > fractional integers above.
> > <https://en.wikipedia.org/wiki/Fixed-point_arithmetic>
> >
> > In the extreme, this kind of algorithm will work with data clipped to a
> > few bits per sample.  The underwater sonar folk are masters of this,
> > especially back in the days when signal processors were necessarily
> > bespoke hardware.  The search term is "one-bit correlator" (without the
> > quotes).
> >
> > ------------------------------
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com
> To unsubscribe, go to
> http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
> and follow the instructions there.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timenuts-dmtd-fpga.png
Type: image/png
Size: 33698 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20200530/c67059cc/attachment.png>


More information about the Time-nuts_lists.febo.com mailing list