[time-nuts] Sub Pico Second Phase logger

Bruce Griffiths bruce.griffiths at xtra.co.nz
Thu Dec 18 23:48:27 UTC 2008


Joe

Joseph M Gwinn wrote:
> Bruce,
>
>
> time-nuts-bounces at 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



More information about the time-nuts mailing list