time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Sub Pico Second Phase logger

JM
Joseph M Gwinn
Thu, Dec 18, 2008 10:20 PM

Bruce,

time-nuts-bounces@febo.com wrote on 12/17/2008 03:43:16 PM:

Joe

Joseph M Gwinn wrote:

Bruce,

time-nuts-bounces@febo.com wrote on 12/16/2008 10:21:55 PM:

[snip]

[BG] Obtaining suitable mixers for 5MHz and 10MHz input frequencies

or even

100MHz is easy.

However for the higher microwave frequencies most mixers come

complete

with connectors attached and share a common ground.

[JG] True.  However, I don't think we will be going from 1 GHz to 1 Hz

in a

single step, and the last mixer can have separate grounds.

An upper limit of at least 100MHz should be feasible for the final

mixer.

A dual conversion scheme will be essential if one uses a triple balanced
or similar first mixer that has an IF response that doesn't extend down
to the low frequencies that a sound card can use.

Yes.  We will see if it's needed.

[BG] If we can devise a suitable test setup then one could just log

the

samples to a file for whatever sound card one has and make the data
available to others for analysis.

Yes.

This allows a wide variety of sound cards to be evaluated without one
person having to test them all.

And evaluation of the same test data by multiple people usingdifferent

tools also allows us to distinguish test artifacts from processing
artifacts.

[BG] Proposed test setup:
(preliminary to be refined)

Drive 2 sound card inputs in parallel with the same source.

Source amplitude:
Max sound card input -3dB

What kind of dB?

Sources:

  1. Wien bridge or equivalent (eg state variable oscillator with soft
    clamping) relatively low distortion oscillator.

  2. Buffered low pass filtered output of binary divider driven by a
    crystal oscillator

RC oscillator sounds far simpler and more flexible.

Test frequencies:

100Hz

1kHz

Why no 10 Hz?  (Well, 20 Hz.)

Sound card sample rate:

~24KSPS

I assume that this is the lowest rate supported, and certainly is overkill
for 1 KHz.

Test duration:

1000 sec

At least initially, but we will need longer datasets to see thermal
effects clearly.

File format:

Wave file??
Resolution 24 bits for 24 bit sound cards, 16 bits for 16bit and lower
resolution sound cards, etc.

Some refinement of sample rates and test duration is required to keep
the data file sizes manageable.
With a 24 bit sound card sampling at 96KSPS or 192KSPS for 1000sec can
produce file sizes of 1GB or more.
Some preprocessing (low pass filter and decimation) may also be

required.

I agree that a simple preprocessor will be needed.  This would be the
place to convert from the raw adc 16 or 24 bit format into something
universal, perhaps 24 bit or 32 bit (with zero padding as needed).  It
probably should be written in C, for speed and portability.  I expect that
there are open-source libraries available to read and write wav files, and
many analysis programs will accept wav.  However, it would be easy to make
the preprocesor able to emit other formats as needed.

Bruce, time-nuts-bounces@febo.com wrote on 12/17/2008 03:43:16 PM: > Joe > > Joseph M Gwinn wrote: > > Bruce, > > > > > > time-nuts-bounces@febo.com wrote on 12/16/2008 10:21:55 PM: > > [snip] > > > >> [BG] Obtaining suitable mixers for 5MHz and 10MHz input frequencies or even > >> 100MHz is easy. > > > >> However for the higher microwave frequencies most mixers come complete > >> with connectors attached and share a common ground. > >> > > > > [JG] True. However, I don't think we will be going from 1 GHz to 1 Hz in a > > single step, and the last mixer can have separate grounds. > > > > > > > An upper limit of at least 100MHz should be feasible for the final mixer. > A dual conversion scheme will be essential if one uses a triple balanced > or similar first mixer that has an IF response that doesn't extend down > to the low frequencies that a sound card can use. Yes. We will see if it's needed. > > > >> [BG] If we can devise a suitable test setup then one could just log the > >> samples to a file for whatever sound card one has and make the data > >> available to others for analysis. > >> > > > > Yes. > > > > > > > >> This allows a wide variety of sound cards to be evaluated without one > >> person having to test them all. > >> > > > > And evaluation of the same test data by multiple people usingdifferent > > tools also allows us to distinguish test artifacts from processing > > artifacts. > > > > [BG] Proposed test setup: > (preliminary to be refined) > > Drive 2 sound card inputs in parallel with the same source. > > Source amplitude: > Max sound card input -3dB What kind of dB? > Sources: > > 1) Wien bridge or equivalent (eg state variable oscillator with soft > clamping) relatively low distortion oscillator. > > 2) Buffered low pass filtered output of binary divider driven by a > crystal oscillator RC oscillator sounds far simpler and more flexible. > Test frequencies: > > 100Hz > > 1kHz Why no 10 Hz? (Well, 20 Hz.) > Sound card sample rate: > > ~24KSPS I assume that this is the lowest rate supported, and certainly is overkill for 1 KHz. > Test duration: > > 1000 sec At least initially, but we will need longer datasets to see thermal effects clearly. > File format: > > Wave file?? > Resolution 24 bits for 24 bit sound cards, 16 bits for 16bit and lower > resolution sound cards, etc. > > Some refinement of sample rates and test duration is required to keep > the data file sizes manageable. > With a 24 bit sound card sampling at 96KSPS or 192KSPS for 1000sec can > produce file sizes of 1GB or more. > Some preprocessing (low pass filter and decimation) may also be required. I agree that a simple preprocessor will be needed. This would be the place to convert from the raw adc 16 or 24 bit format into something universal, perhaps 24 bit or 32 bit (with zero padding as needed). It probably should be written in C, for speed and portability. I expect that there are open-source libraries available to read and write wav files, and many analysis programs will accept wav. However, it would be easy to make the preprocesor able to emit other formats as needed.
JM
Joseph M Gwinn
Thu, Dec 18, 2008 11:00 PM

Bruce,

time-nuts-bounces@febo.com wrote on 12/17/2008 06:26:00 PM:

[snip]

[BG] It isn't necessary to use a pair of mixers and an offset source

to

characterise the sound card, driving both sound card inputs from the
same audio source should suffice.

[JG] Yes.  One input at a time, with the other input shorted, so we

can also

see the crosstalk.

The audio source need not have low ultra low distortion (the IF

output

signals in a dual mixer system won't have ultra low distortion) or

very

high frequency stability (the IF output signals in a dual mixer

system

won't necessarily have particularly high frequency stability).

But ... but ... but ... I thought Time Nuts used only atomic frequency

refs, and crystals only if oven stabilized.

If one mixes down a 10MHz source to 100Hz the fractional frequency
instability (of the beat frequency) is magnified by a factor of 1E5 over
that of the 10MHz source.
This assumes that the offset source has significantly lower instability
than the source under test.
In the special case when the offset source and the test source are phase
locked the offset frequency will have much greater stability.

Yes.  One approach is to use the two 10 MHz signals as the clocks of a
pair of DDS chips programmed to generate ~ 1MHz and ~1 MHz + 10 Hz.  When
mixed, these will yield a 10 Hz difference signal.

The same game can be performed in the software driving a soundcard, as
discussed later.

A standard RC audio oscillator with distortion lower than 1% or so
should suffice.
At least the resultant frequency fluctuations should thoroughly

exercise

the phase extraction algorithms.

Another option would be to low pass filter the output of a divider.
Using a sound card to generate the test signal is also possible but

it

can potentially introduce extraneous noise and other artifacts such

as

phase truncation spurs.

If one chooses the test frequencies correctly, one can eliminate the
spurs.  The trick is to choose frequencies that lead to DDS tuning

words

that have zeroes in the accumulator bits that are truncated (that is,

do

not make it into the sin/cos lookup table).

This just adds another layer of complexity for little immediate gain.
Making the algorithms robust against small drifts in beat frequency is
more useful in the general case (when 2 different test sources are being
compared) than just assuming that the the beat frequency is very stable
and fixed.

Yes, but I'm not sure we are solving the same problem.

I suppose the sound card could drive a simple PLL signal cleanup circuit.

Step one of planning an experiment is to decide on the objectives. The

large scale objective is to determine which sound cards are suitable

for a

number of time-related tasks, so we should enumerate and describe

these

tasks.

Task 1.  The immediate task is to receive and digitize the sinewave

output

from a mixer, the sinewave being the offset frequency coming out of a

DMTD

apparatus. Offset frequencies will range from 10 Hz to 1 KHz, will be
known with great precision from the design of the apparatus, and need

not

be measured.  This sinewave is high amplitude (at least one volt rms,
matched to the needs of the soundcard) and very high SNR.  This will

be

done in two channels in parallel.  The signals are at the same

frequency

but differ in phase.  The intent is to extract the phases of these two

sinewaves, the difference in phase being the ultimate output.The phase

of a signal will be extracted by least-squares fitting of a sine

function

to the measured data.

And so on.  We need to list the tasks, and to use this task list to

inform

the experiment design.

The immediate task is actually to evaluate sound cards for their
suitability, preferably without the added cost and complexity of a DDS
LO and mixer.

Suitability for what?  That is the point of enumerating tasks.

I don't see where Task 1 above requires or even mentions a specific
implementation, such as a DDS LO and mixer.

Once this evaluation is done, using a mixer and a DDS based LO to
generate a beat frequency is the next step.
Eliminating the mixer and DDS allows a greater number of participants at
this stage than would otherwise be the case.

True.

10Hz resolution whilst avoiding phase truncation spurs is impractical
with a DDS chip by itself.
Depending on the DDS and its clock frequency, the frequency spacing of
phase truncation spur free outputs may be as large as several kHz.

Is this true of concatenated DDS chips?  I recall a patent to the
contrary.

A few divide and mix stages will be required to achieve a spur free
resolution of 10Hz.

That is a traditional approach.  But are there alternate approaches that
have now become practical?

A DDS chip with higher resolution phase outputs after truncation such as
the AD99XX series are better in this respect than the earlier
AD98XX series.

Absolutely.

Actually, if we use a sound card to generate the test signals, the "DDS"
will be a bit of non-realtime math code in our computers.  If we choose
the sample window size and test frequency correctly, we can arrange for
very low spurs and other errors.  The spur reduction is largely due to the
fact that being offline one can use all of the phase bits to compute
sin/cos values, rather than truncating phase to say 14 bits.

The algorithm is something like this:  Figure out how many samples there
will be per cycle of the test frequency.  Adjust test frequency slightly
to eliminate any residue.  Compute a full cycle of exact phase values.

From these phase values, compute the corresponding signal voltages using a

full-precision sine function.  Fill the drive file with multiple copies of
this one-cycle file placed nose-to-tail.  Feed to soundcard hardware.  If
the soundcard has some kind of buffer and buffer-repeat function, one can
eliminate generation of the big file.

This kind of software approach would eliminate a whole lot of uncommon
hardware, so we really ought to see if it can be made to work well enough
for our purposes, as it would be such a big win.

To broaden participation we need to broaden the scope of the project to
include dual mixer system with statistically independent test sources as
well as the more specialised case where the 2 input frequencies differ
only in phase.

  1. Evaluate sound cards for suitablility.
    Initially use simple less stable sources and follow up with more stable
    test sources for the more promising cards.
    Need to measure crosstalk, temporal instability of interchannel phase
    shift, system noise etc.

Generally agree, but there is that undefined elastic term "suitability"
again.

  1. Develop robust algorithms for phase extraction.
    Use the data produced by the less stable sources and that produced by
    the more stable sources

Agree.

  1. Repeat testing using a dual mixer system complete with offset LO.
    Test frequencies identical to evaluate system noise floor.

  2. Repeat testing using a dual mixer system complete with offset LO.
    Test frequencies differ to help the effect of residual crosstalk and
    other artifacts.

  3. Split the project into 2 branches:
    A) where mixer inputs differ only by a phase shift to be measured.
    Useful for measuring effect on ADEV of various components and their
    phase shift tempcos etc.

B) Where the mixer input test sources are statistically independent.
Useful for measuring pairwise source ADEV etc.

Although these are likely future directions, we probably should focus on
your Tasks 1 and 2 for now, and see how much we can wring out of commonly
available soundcards.  Tasks 3 et seq may change depending on the results
of 1 and 2.

Our two Task 1 items appear to be compatible.

Joe

Bruce, time-nuts-bounces@febo.com wrote on 12/17/2008 06:26:00 PM: [snip] > > > > > > > >> [BG] It isn't necessary to use a pair of mixers and an offset source to > >> characterise the sound card, driving both sound card inputs from the > >> same audio source should suffice. > >> > > > > [JG] Yes. One input at a time, with the other input shorted, so we can also > > see the crosstalk. > > > > > > > >> The audio source need not have low ultra low distortion (the IF output > >> signals in a dual mixer system won't have ultra low distortion) or very > >> high frequency stability (the IF output signals in a dual mixer system > >> won't necessarily have particularly high frequency stability). > >> > > > > But ... but ... but ... I thought Time Nuts used only atomic frequency > > refs, and crystals only if oven stabilized. > > > > > If one mixes down a 10MHz source to 100Hz the fractional frequency > instability (of the beat frequency) is magnified by a factor of 1E5 over > that of the 10MHz source. > This assumes that the offset source has significantly lower instability > than the source under test. > In the special case when the offset source and the test source are phase > locked the offset frequency will have much greater stability. Yes. One approach is to use the two 10 MHz signals as the clocks of a pair of DDS chips programmed to generate ~ 1MHz and ~1 MHz + 10 Hz. When mixed, these will yield a 10 Hz difference signal. The same game can be performed in the software driving a soundcard, as discussed later. > >> A standard RC audio oscillator with distortion lower than 1% or so > >> should suffice. > >> At least the resultant frequency fluctuations should thoroughly exercise > >> the phase extraction algorithms. > >> > >> Another option would be to low pass filter the output of a divider. > >> Using a sound card to generate the test signal is also possible but it > >> can potentially introduce extraneous noise and other artifacts such as > >> phase truncation spurs. > >> > > > > If one chooses the test frequencies correctly, one can eliminate the > > spurs. The trick is to choose frequencies that lead to DDS tuning words > > that have zeroes in the accumulator bits that are truncated (that is, do > > not make it into the sin/cos lookup table). > > > > > > > This just adds another layer of complexity for little immediate gain. > Making the algorithms robust against small drifts in beat frequency is > more useful in the general case (when 2 different test sources are being > compared) than just assuming that the the beat frequency is very stable > and fixed. Yes, but I'm not sure we are solving the same problem. I suppose the sound card could drive a simple PLL signal cleanup circuit. > > Step one of planning an experiment is to decide on the objectives. The > > large scale objective is to determine which sound cards are suitable for a > > number of time-related tasks, so we should enumerate and describe these > > tasks. > > > > Task 1. The immediate task is to receive and digitize the sinewave output > > from a mixer, the sinewave being the offset frequency coming out of a DMTD > > apparatus. Offset frequencies will range from 10 Hz to 1 KHz, will be > > known with great precision from the design of the apparatus, and need not > > be measured. This sinewave is high amplitude (at least one volt rms, > > matched to the needs of the soundcard) and very high SNR. This will be > > done in two channels in parallel. The signals are at the same frequency > > but differ in phase. The intent is to extract the phases of these two > > sinewaves, the difference in phase being the ultimate output.The phase > > of a signal will be extracted by least-squares fitting of a sine function > > to the measured data. > > > > And so on. We need to list the tasks, and to use this task list to inform > > the experiment design. > > > > > > > The immediate task is actually to evaluate sound cards for their > suitability, preferably without the added cost and complexity of a DDS > LO and mixer. Suitability for what? That is the point of enumerating tasks. I don't see where Task 1 above requires or even mentions a specific implementation, such as a DDS LO and mixer. > Once this evaluation is done, using a mixer and a DDS based LO to > generate a beat frequency is the next step. > Eliminating the mixer and DDS allows a greater number of participants at > this stage than would otherwise be the case. True. > 10Hz resolution whilst avoiding phase truncation spurs is impractical > with a DDS chip by itself. > Depending on the DDS and its clock frequency, the frequency spacing of > phase truncation spur free outputs may be as large as several kHz. Is this true of concatenated DDS chips? I recall a patent to the contrary. > A few divide and mix stages will be required to achieve a spur free > resolution of 10Hz. That is a traditional approach. But are there alternate approaches that have now become practical? > A DDS chip with higher resolution phase outputs after truncation such as > the AD99XX series are better in this respect than the earlier > AD98XX series. Absolutely. Actually, if we use a sound card to generate the test signals, the "DDS" will be a bit of non-realtime math code in our computers. If we choose the sample window size and test frequency correctly, we can arrange for very low spurs and other errors. The spur reduction is largely due to the fact that being offline one can use all of the phase bits to compute sin/cos values, rather than truncating phase to say 14 bits. The algorithm is something like this: Figure out how many samples there will be per cycle of the test frequency. Adjust test frequency slightly to eliminate any residue. Compute a full cycle of exact phase values. >From these phase values, compute the corresponding signal voltages using a full-precision sine function. Fill the drive file with multiple copies of this one-cycle file placed nose-to-tail. Feed to soundcard hardware. If the soundcard has some kind of buffer and buffer-repeat function, one can eliminate generation of the big file. This kind of software approach would eliminate a whole lot of uncommon hardware, so we really ought to see if it can be made to work well enough for our purposes, as it would be such a big win. > To broaden participation we need to broaden the scope of the project to > include dual mixer system with statistically independent test sources as > well as the more specialised case where the 2 input frequencies differ > only in phase. > > 1) Evaluate sound cards for suitablility. > Initially use simple less stable sources and follow up with more stable > test sources for the more promising cards. > Need to measure crosstalk, temporal instability of interchannel phase > shift, system noise etc. Generally agree, but there is that undefined elastic term "suitability" again. > 2) Develop robust algorithms for phase extraction. > Use the data produced by the less stable sources and that produced by > the more stable sources Agree. > 3) Repeat testing using a dual mixer system complete with offset LO. > Test frequencies identical to evaluate system noise floor. > > 4) Repeat testing using a dual mixer system complete with offset LO. > Test frequencies differ to help the effect of residual crosstalk and > other artifacts. > > 5) Split the project into 2 branches: > A) where mixer inputs differ only by a phase shift to be measured. > Useful for measuring effect on ADEV of various components and their > phase shift tempcos etc. > > B) Where the mixer input test sources are statistically independent. > Useful for measuring pairwise source ADEV etc. Although these are likely future directions, we probably should focus on your Tasks 1 and 2 for now, and see how much we can wring out of commonly available soundcards. Tasks 3 et seq may change depending on the results of 1 and 2. Our two Task 1 items appear to be compatible. Joe
BG
Bruce Griffiths
Thu, Dec 18, 2008 11:17 PM

Joe

Joseph M Gwinn wrote:

Bruce,

time-nuts-bounces@febo.com wrote on 12/17/2008 03:43:16 PM:

Joe

Joseph M Gwinn wrote:

Bruce,

time-nuts-bounces@febo.com wrote on 12/16/2008 10:21:55 PM:

[snip]

[BG] Obtaining suitable mixers for 5MHz and 10MHz input frequencies

or even

100MHz is easy.

However for the higher microwave frequencies most mixers come

complete

with connectors attached and share a common ground.

[JG] True.  However, I don't think we will be going from 1 GHz to 1 Hz

in a

single step, and the last mixer can have separate grounds.

An upper limit of at least 100MHz should be feasible for the final

mixer.

A dual conversion scheme will be essential if one uses a triple balanced
or similar first mixer that has an IF response that doesn't extend down
to the low frequencies that a sound card can use.

Yes.  We will see if it's needed.

[BG] If we can devise a suitable test setup then one could just log

the

samples to a file for whatever sound card one has and make the data
available to others for analysis.

Yes.

This allows a wide variety of sound cards to be evaluated without one
person having to test them all.

And evaluation of the same test data by multiple people usingdifferent

tools also allows us to distinguish test artifacts from processing
artifacts.

[BG] Proposed test setup:
(preliminary to be refined)

Drive 2 sound card inputs in parallel with the same source.

Source amplitude:
Max sound card input -3dB

What kind of dB?

Peak input signal voltage = 70% of sound card maximum peak input voltage.
Just to leave some margin for gain tolerances.

Sources:

  1. Wien bridge or equivalent (eg state variable oscillator with soft
    clamping) relatively low distortion oscillator.

  2. Buffered low pass filtered output of binary divider driven by a
    crystal oscillator

RC oscillator sounds far simpler and more flexible.

A Wien bridge using a lamp is perhaps the simplest.
I'll create a circuit schematics for this using an OPA2134 (dual lowish
noise JFET opamp).
One opamp for the oscillator one to drive the sound card (attenuation of
the oscillator output will be required for some sound cards and it is
desirable to have a low output impedance driver).

Test frequencies:

100Hz

1kHz

Why no 10 Hz?  (Well, 20 Hz.)

No particular reason other than some complications if a lamp stabilised
oscillator is used.
A diode soft (series R) clamped RC oscillator is more flexible in this
regard.
I'll also produce a circuit schematic for one of these oscillators.

Sound card sample rate:

~24KSPS

I assume that this is the lowest rate supported, and certainly is overkill
for 1 KHz.

It varies with the sound card.
I just suggested that for a starting point in the discussion.

For an AP192 the directly (without sample rate interpolation) available
output sample rates are:

192, 96, 64, 48, 32, 8 KSPS.

Test duration:

1000 sec

At least initially, but we will need longer datasets to see thermal
effects clearly.

File format:

Wave file??
Resolution 24 bits for 24 bit sound cards, 16 bits for 16bit and lower
resolution sound cards, etc.

Some refinement of sample rates and test duration is required to keep
the data file sizes manageable.
With a 24 bit sound card sampling at 96KSPS or 192KSPS for 1000sec can
produce file sizes of 1GB or more.
Some preprocessing (low pass filter and decimation) may also be

required.

I agree that a simple preprocessor will be needed.  This would be the
place to convert from the raw adc 16 or 24 bit format into something
universal, perhaps 24 bit or 32 bit (with zero padding as needed).  It
probably should be written in C, for speed and portability.  I expect that
there are open-source libraries available to read and write wav files, and
many analysis programs will accept wav.  However, it would be easy to make
the preprocesor able to emit other formats as needed.

Bruce

Joe Joseph M Gwinn wrote: > Bruce, > > time-nuts-bounces@febo.com wrote on 12/17/2008 03:43:16 PM: > > >> Joe >> >> Joseph M Gwinn wrote: >> >>> Bruce, >>> >>> >>> time-nuts-bounces@febo.com wrote on 12/16/2008 10:21:55 PM: >>> >>> > [snip] > >>>> [BG] Obtaining suitable mixers for 5MHz and 10MHz input frequencies >>>> > or even > >>>> 100MHz is easy. >>>> >>>> However for the higher microwave frequencies most mixers come >>>> > complete > >>>> with connectors attached and share a common ground. >>>> >>>> >>> [JG] True. However, I don't think we will be going from 1 GHz to 1 Hz >>> > in a > >>> single step, and the last mixer can have separate grounds. >>> >>> >>> >>> >> An upper limit of at least 100MHz should be feasible for the final >> > mixer. > >> A dual conversion scheme will be essential if one uses a triple balanced >> or similar first mixer that has an IF response that doesn't extend down >> to the low frequencies that a sound card can use. >> > > Yes. We will see if it's needed. > > > >>>> [BG] If we can devise a suitable test setup then one could just log >>>> > the > >>>> samples to a file for whatever sound card one has and make the data >>>> available to others for analysis. >>>> >>>> >>> Yes. >>> >>> >>> >>> >>>> This allows a wide variety of sound cards to be evaluated without one >>>> person having to test them all. >>>> >>>> >>> And evaluation of the same test data by multiple people usingdifferent >>> > > >>> tools also allows us to distinguish test artifacts from processing >>> artifacts. >>> >>> >> [BG] Proposed test setup: >> (preliminary to be refined) >> >> Drive 2 sound card inputs in parallel with the same source. >> >> Source amplitude: >> Max sound card input -3dB >> > > What kind of dB? > > Peak input signal voltage = 70% of sound card maximum peak input voltage. Just to leave some margin for gain tolerances. > > >> Sources: >> >> 1) Wien bridge or equivalent (eg state variable oscillator with soft >> clamping) relatively low distortion oscillator. >> >> 2) Buffered low pass filtered output of binary divider driven by a >> crystal oscillator >> > > RC oscillator sounds far simpler and more flexible. > > A Wien bridge using a lamp is perhaps the simplest. I'll create a circuit schematics for this using an OPA2134 (dual lowish noise JFET opamp). One opamp for the oscillator one to drive the sound card (attenuation of the oscillator output will be required for some sound cards and it is desirable to have a low output impedance driver). > > >> Test frequencies: >> >> 100Hz >> >> 1kHz >> > > Why no 10 Hz? (Well, 20 Hz.) > > No particular reason other than some complications if a lamp stabilised oscillator is used. A diode soft (series R) clamped RC oscillator is more flexible in this regard. I'll also produce a circuit schematic for one of these oscillators. > > >> Sound card sample rate: >> >> ~24KSPS >> > > I assume that this is the lowest rate supported, and certainly is overkill > for 1 KHz. > > It varies with the sound card. I just suggested that for a starting point in the discussion. For an AP192 the directly (without sample rate interpolation) available output sample rates are: 192, 96, 64, 48, 32, 8 KSPS. > > >> Test duration: >> >> 1000 sec >> > > At least initially, but we will need longer datasets to see thermal > effects clearly. > > >> File format: >> >> Wave file?? >> Resolution 24 bits for 24 bit sound cards, 16 bits for 16bit and lower >> resolution sound cards, etc. >> >> Some refinement of sample rates and test duration is required to keep >> the data file sizes manageable. >> With a 24 bit sound card sampling at 96KSPS or 192KSPS for 1000sec can >> produce file sizes of 1GB or more. >> Some preprocessing (low pass filter and decimation) may also be >> > required. > > I agree that a simple preprocessor will be needed. This would be the > place to convert from the raw adc 16 or 24 bit format into something > universal, perhaps 24 bit or 32 bit (with zero padding as needed). It > probably should be written in C, for speed and portability. I expect that > there are open-source libraries available to read and write wav files, and > many analysis programs will accept wav. However, it would be easy to make > the preprocesor able to emit other formats as needed. > > Bruce
BG
Bruce Griffiths
Thu, Dec 18, 2008 11:48 PM

Joe

Joseph M Gwinn wrote:

Bruce,

time-nuts-bounces@febo.com wrote on 12/17/2008 06:26:00 PM:

[snip]

[BG] It isn't necessary to use a pair of mixers and an offset source

to

characterise the sound card, driving both sound card inputs from the
same audio source should suffice.

[JG] Yes.  One input at a time, with the other input shorted, so we

can also

see the crosstalk.

The audio source need not have low ultra low distortion (the IF

output

signals in a dual mixer system won't have ultra low distortion) or

very

high frequency stability (the IF output signals in a dual mixer

system

won't necessarily have particularly high frequency stability).

But ... but ... but ... I thought Time Nuts used only atomic frequency

refs, and crystals only if oven stabilized.

If one mixes down a 10MHz source to 100Hz the fractional frequency
instability (of the beat frequency) is magnified by a factor of 1E5 over
that of the 10MHz source.
This assumes that the offset source has significantly lower instability
than the source under test.
In the special case when the offset source and the test source are phase
locked the offset frequency will have much greater stability.

Yes.  One approach is to use the two 10 MHz signals as the clocks of a
pair of DDS chips programmed to generate ~ 1MHz and ~1 MHz + 10 Hz.  When
mixed, these will yield a 10 Hz difference signal.

The same game can be performed in the software driving a soundcard, as
discussed later.

A standard RC audio oscillator with distortion lower than 1% or so
should suffice.
At least the resultant frequency fluctuations should thoroughly

exercise

the phase extraction algorithms.

Another option would be to low pass filter the output of a divider.
Using a sound card to generate the test signal is also possible but

it

can potentially introduce extraneous noise and other artifacts such

as

phase truncation spurs.

If one chooses the test frequencies correctly, one can eliminate the
spurs.  The trick is to choose frequencies that lead to DDS tuning

words

that have zeroes in the accumulator bits that are truncated (that is,

do

not make it into the sin/cos lookup table).

This just adds another layer of complexity for little immediate gain.
Making the algorithms robust against small drifts in beat frequency is
more useful in the general case (when 2 different test sources are being
compared) than just assuming that the the beat frequency is very stable
and fixed.

Yes, but I'm not sure we are solving the same problem.

I suppose the sound card could drive a simple PLL signal cleanup circuit.

One potential problem with using a sound card for a test source is that
the output DAC may share the same clock as the ADC ensuring that the
output signal is locked to the ADC sampling rate.
In an actual dual mixer system the beat frequency and the ADC clock wont
necessarily be synchronised (its difficult to lock the sampling clock of
most sound cards to an external reference).

If one isnt careful the algorithms developed may work well when the ADC
sample clock and the test frequencies are locked, but have problems when
they are not.

Using a second sound card to generate the test signal may overcome this
problem at increased cost, and for some it may not even be an option.

Step one of planning an experiment is to decide on the objectives. The

large scale objective is to determine which sound cards are suitable

for a

number of time-related tasks, so we should enumerate and describe

these

tasks.

Task 1.  The immediate task is to receive and digitize the sinewave

output

from a mixer, the sinewave being the offset frequency coming out of a

DMTD

apparatus. Offset frequencies will range from 10 Hz to 1 KHz, will be
known with great precision from the design of the apparatus, and need

not

be measured.  This sinewave is high amplitude (at least one volt rms,
matched to the needs of the soundcard) and very high SNR.  This will

be

done in two channels in parallel.  The signals are at the same

frequency

but differ in phase.  The intent is to extract the phases of these two

sinewaves, the difference in phase being the ultimate output.The phase

of a signal will be extracted by least-squares fitting of a sine

function

to the measured data.

And so on.  We need to list the tasks, and to use this task list to

inform

the experiment design.

The immediate task is actually to evaluate sound cards for their
suitability, preferably without the added cost and complexity of a DDS
LO and mixer.

Suitability for what?  That is the point of enumerating tasks.

Suitability for use in a dual mixer system.

I don't see where Task 1 above requires or even mentions a specific
implementation, such as a DDS LO and mixer.

Once this evaluation is done, using a mixer and a DDS based LO to
generate a beat frequency is the next step.
Eliminating the mixer and DDS allows a greater number of participants at
this stage than would otherwise be the case.

True.

10Hz resolution whilst avoiding phase truncation spurs is impractical
with a DDS chip by itself.
Depending on the DDS and its clock frequency, the frequency spacing of
phase truncation spur free outputs may be as large as several kHz.

Is this true of concatenated DDS chips?  I recall a patent to the
contrary.

Which patent?
If the zero crossings are time stamped and do not occur simultaneously
in each channel then the phase noise of the offset oscillator will
affect the measurement.

A few divide and mix stages will be required to achieve a spur free
resolution of 10Hz.

That is a traditional approach.  But are there alternate approaches that
have now become practical?

Diophantine frequency synthesis?

A DDS chip with higher resolution phase outputs after truncation such as
the AD99XX series are better in this respect than the earlier
AD98XX series.

Absolutely.

Actually, if we use a sound card to generate the test signals, the "DDS"
will be a bit of non-realtime math code in our computers.  If we choose
the sample window size and test frequency correctly, we can arrange for
very low spurs and other errors.  The spur reduction is largely due to the
fact that being offline one can use all of the phase bits to compute
sin/cos values, rather than truncating phase to say 14 bits.

The algorithm is something like this:  Figure out how many samples there
will be per cycle of the test frequency.  Adjust test frequency slightly
to eliminate any residue.  Compute a full cycle of exact phase values.

From these phase values, compute the corresponding signal voltages using a

full-precision sine function.  Fill the drive file with multiple copies of
this one-cycle file placed nose-to-tail.  Feed to soundcard hardware.  If
the soundcard has some kind of buffer and buffer-repeat function, one can
eliminate generation of the big file.

This kind of software approach would eliminate a whole lot of uncommon
hardware, so we really ought to see if it can be made to work well enough
for our purposes, as it would be such a big win.

To broaden participation we need to broaden the scope of the project to
include dual mixer system with statistically independent test sources as
well as the more specialised case where the 2 input frequencies differ
only in phase.

  1. Evaluate sound cards for suitablility.
    Initially use simple less stable sources and follow up with more stable
    test sources for the more promising cards.
    Need to measure crosstalk, temporal instability of interchannel phase
    shift, system noise etc.

Generally agree, but there is that undefined elastic term "suitability"
again.

Replace suitability with:
Measure the characteristics of a sound card that affect the performance
when used in a dual mixer system used to measure the relative phases of
a pair of RF signals.
Where the pair of RF signals may either

  1. originate from 2 statistically independent sources (OCXOs, GPSDO's etc)

OR

  1. originate from the same source and just differ in phase.
  1. Develop robust algorithms for phase extraction.
    Use the data produced by the less stable sources and that produced by
    the more stable sources

Agree.

  1. Repeat testing using a dual mixer system complete with offset LO.
    Test frequencies identical to evaluate system noise floor.

  2. Repeat testing using a dual mixer system complete with offset LO.
    Test frequencies differ to help the effect of residual crosstalk and
    other artifacts.

  3. Split the project into 2 branches:
    A) where mixer inputs differ only by a phase shift to be measured.
    Useful for measuring effect on ADEV of various components and their
    phase shift tempcos etc.

B) Where the mixer input test sources are statistically independent.
Useful for measuring pairwise source ADEV etc.

Although these are likely future directions, we probably should focus on
your Tasks 1 and 2 for now, and see how much we can wring out of commonly
available soundcards.  Tasks 3 et seq may change depending on the results
of 1 and 2.

Our two Task 1 items appear to be compatible.

Joe

Bruce

Joe Joseph M Gwinn wrote: > Bruce, > > > time-nuts-bounces@febo.com wrote on 12/17/2008 06:26:00 PM: > > [snip] > >>> >>> >>>> [BG] It isn't necessary to use a pair of mixers and an offset source >>>> > to > >>>> characterise the sound card, driving both sound card inputs from the >>>> same audio source should suffice. >>>> >>>> >>> [JG] Yes. One input at a time, with the other input shorted, so we >>> > can also > >>> see the crosstalk. >>> >>> >>> >>> >>>> The audio source need not have low ultra low distortion (the IF >>>> > output > >>>> signals in a dual mixer system won't have ultra low distortion) or >>>> > very > >>>> high frequency stability (the IF output signals in a dual mixer >>>> > system > >>>> won't necessarily have particularly high frequency stability). >>>> >>>> >>> But ... but ... but ... I thought Time Nuts used only atomic frequency >>> > > >>> refs, and crystals only if oven stabilized. >>> >>> >>> >> If one mixes down a 10MHz source to 100Hz the fractional frequency >> instability (of the beat frequency) is magnified by a factor of 1E5 over >> that of the 10MHz source. >> This assumes that the offset source has significantly lower instability >> than the source under test. >> In the special case when the offset source and the test source are phase >> locked the offset frequency will have much greater stability. >> > > Yes. One approach is to use the two 10 MHz signals as the clocks of a > pair of DDS chips programmed to generate ~ 1MHz and ~1 MHz + 10 Hz. When > mixed, these will yield a 10 Hz difference signal. > > The same game can be performed in the software driving a soundcard, as > discussed later. > > > >>>> A standard RC audio oscillator with distortion lower than 1% or so >>>> should suffice. >>>> At least the resultant frequency fluctuations should thoroughly >>>> > exercise > >>>> the phase extraction algorithms. >>>> >>>> Another option would be to low pass filter the output of a divider. >>>> Using a sound card to generate the test signal is also possible but >>>> > it > >>>> can potentially introduce extraneous noise and other artifacts such >>>> > as > >>>> phase truncation spurs. >>>> >>>> >>> If one chooses the test frequencies correctly, one can eliminate the >>> spurs. The trick is to choose frequencies that lead to DDS tuning >>> > words > >>> that have zeroes in the accumulator bits that are truncated (that is, >>> > do > >>> not make it into the sin/cos lookup table). >>> >>> >>> >>> >> This just adds another layer of complexity for little immediate gain. >> Making the algorithms robust against small drifts in beat frequency is >> more useful in the general case (when 2 different test sources are being >> compared) than just assuming that the the beat frequency is very stable >> and fixed. >> > > Yes, but I'm not sure we are solving the same problem. > > I suppose the sound card could drive a simple PLL signal cleanup circuit. > > > One potential problem with using a sound card for a test source is that the output DAC may share the same clock as the ADC ensuring that the output signal is locked to the ADC sampling rate. In an actual dual mixer system the beat frequency and the ADC clock wont necessarily be synchronised (its difficult to lock the sampling clock of most sound cards to an external reference). If one isnt careful the algorithms developed may work well when the ADC sample clock and the test frequencies are locked, but have problems when they are not. Using a second sound card to generate the test signal may overcome this problem at increased cost, and for some it may not even be an option. >>> Step one of planning an experiment is to decide on the objectives. The >>> > > >>> large scale objective is to determine which sound cards are suitable >>> > for a > >>> number of time-related tasks, so we should enumerate and describe >>> > these > >>> tasks. >>> >>> Task 1. The immediate task is to receive and digitize the sinewave >>> > output > >>> from a mixer, the sinewave being the offset frequency coming out of a >>> > DMTD > >>> apparatus. Offset frequencies will range from 10 Hz to 1 KHz, will be >>> known with great precision from the design of the apparatus, and need >>> > not > >>> be measured. This sinewave is high amplitude (at least one volt rms, >>> matched to the needs of the soundcard) and very high SNR. This will >>> > be > >>> done in two channels in parallel. The signals are at the same >>> > frequency > >>> but differ in phase. The intent is to extract the phases of these two >>> > > >>> sinewaves, the difference in phase being the ultimate output.The phase >>> > > >>> of a signal will be extracted by least-squares fitting of a sine >>> > function > >>> to the measured data. >>> >>> And so on. We need to list the tasks, and to use this task list to >>> > inform > >>> the experiment design. >>> >>> >>> >>> >> The immediate task is actually to evaluate sound cards for their >> suitability, preferably without the added cost and complexity of a DDS >> LO and mixer. >> > > Suitability for what? That is the point of enumerating tasks. > > Suitability for use in a dual mixer system. > I don't see where Task 1 above requires or even mentions a specific > implementation, such as a DDS LO and mixer. > > > >> Once this evaluation is done, using a mixer and a DDS based LO to >> generate a beat frequency is the next step. >> Eliminating the mixer and DDS allows a greater number of participants at >> this stage than would otherwise be the case. >> > > True. > > > >> 10Hz resolution whilst avoiding phase truncation spurs is impractical >> with a DDS chip by itself. >> Depending on the DDS and its clock frequency, the frequency spacing of >> phase truncation spur free outputs may be as large as several kHz. >> > > Is this true of concatenated DDS chips? I recall a patent to the > contrary. > > > Which patent? If the zero crossings are time stamped and do not occur simultaneously in each channel then the phase noise of the offset oscillator will affect the measurement. >> A few divide and mix stages will be required to achieve a spur free >> resolution of 10Hz. >> > > That is a traditional approach. But are there alternate approaches that > have now become practical? > > Diophantine frequency synthesis? > > >> A DDS chip with higher resolution phase outputs after truncation such as >> the AD99XX series are better in this respect than the earlier >> AD98XX series. >> > > Absolutely. > > Actually, if we use a sound card to generate the test signals, the "DDS" > will be a bit of non-realtime math code in our computers. If we choose > the sample window size and test frequency correctly, we can arrange for > very low spurs and other errors. The spur reduction is largely due to the > fact that being offline one can use all of the phase bits to compute > sin/cos values, rather than truncating phase to say 14 bits. > > The algorithm is something like this: Figure out how many samples there > will be per cycle of the test frequency. Adjust test frequency slightly > to eliminate any residue. Compute a full cycle of exact phase values. > >From these phase values, compute the corresponding signal voltages using a > full-precision sine function. Fill the drive file with multiple copies of > this one-cycle file placed nose-to-tail. Feed to soundcard hardware. If > the soundcard has some kind of buffer and buffer-repeat function, one can > eliminate generation of the big file. > > This kind of software approach would eliminate a whole lot of uncommon > hardware, so we really ought to see if it can be made to work well enough > for our purposes, as it would be such a big win. > > > >> To broaden participation we need to broaden the scope of the project to >> include dual mixer system with statistically independent test sources as >> well as the more specialised case where the 2 input frequencies differ >> only in phase. >> >> 1) Evaluate sound cards for suitablility. >> Initially use simple less stable sources and follow up with more stable >> test sources for the more promising cards. >> Need to measure crosstalk, temporal instability of interchannel phase >> shift, system noise etc. >> > > Generally agree, but there is that undefined elastic term "suitability" > again. > > Replace suitability with: Measure the characteristics of a sound card that affect the performance when used in a dual mixer system used to measure the relative phases of a pair of RF signals. Where the pair of RF signals may either 1) originate from 2 statistically independent sources (OCXOs, GPSDO's etc) OR 2) originate from the same source and just differ in phase. > > >> 2) Develop robust algorithms for phase extraction. >> Use the data produced by the less stable sources and that produced by >> the more stable sources >> > > Agree. > > > >> 3) Repeat testing using a dual mixer system complete with offset LO. >> Test frequencies identical to evaluate system noise floor. >> >> 4) Repeat testing using a dual mixer system complete with offset LO. >> Test frequencies differ to help the effect of residual crosstalk and >> other artifacts. >> >> 5) Split the project into 2 branches: >> A) where mixer inputs differ only by a phase shift to be measured. >> Useful for measuring effect on ADEV of various components and their >> phase shift tempcos etc. >> >> B) Where the mixer input test sources are statistically independent. >> Useful for measuring pairwise source ADEV etc. >> > > Although these are likely future directions, we probably should focus on > your Tasks 1 and 2 for now, and see how much we can wring out of commonly > available soundcards. Tasks 3 et seq may change depending on the results > of 1 and 2. > > Our two Task 1 items appear to be compatible. > > Joe > > Bruce