Re: [time-nuts] uncertainty calculations
Below your post are posts I copied from last year from me and others about the pseudo-random phase modulation in certain Tektronix counters from the 1980's and 1990's. You can read more about metastability at these links: http://www-classes.usc.edu/engr/ee-s/552/coursematerials/ee552-G1.pdf http://www-s.ti.com/sc/psheets/sdya006/sdya006.pdf My main point is that averaging quantized values (contents of a counter at the end of a gated input) doesn't always work as intended if there is some bias in the quantization process due to metastability or other timing nonlinearities or if the random timing jitter is very small. Here are some examples: (1) Let's say that the 1 PPS signal is is generated by a process which has NO sawtooth timing edge delay errors (jitter) due to resynchronization. We use that signal to gate a counter which is clocked by a 10 MHz signal with very low jitter. If the gating and counting circuits use fast logic and they react to the rising edge of both signals, then as long as the timing relationship between these two input signals is stable and the rising edge of the 1 PPS signal is coincident with the falling edge of the 10 MHz clock, there will be no metastability and the counter will always register 10^7 counts per gate. The system is deterministic over time intervals of many years. See Figure 8 (on page 6) of the second link above (TI application note). In this case, averaging has no effect. Over time intervals longer than the lifetime of a human the count will always be 10^7. (2) Now let's say we adjust the delay of the 10 MHz clock so the 1 PPS rising edges coincide with 10 MHz rising edges. We now have the metastable situation shown in Figure 2 (on page 2) of the TI application note. We now don't know if the first clock rising edge within the gate interval will be counted. Similarly, we don't know if the last clock rising edge within a specific gate interval will be counted. If neither edge is recognized the count will be 9,999,999. If one edge is recognized the count will be 10,000,000. If both edges are recognized the count will be 10,000,001. The system may jump between these three cases slowly in a manner which is not completely random. So if you average you might get the correct result (remember - we are assuming that the frequencies and timings of the external signals are perfect), or have an average result anywhere between -1 count and +1 count from 10,000,000. (3) Finally, consider the case of a GPS 1 PPS output with sawtooth timing jitter due to the manner the 1 PPS signal is generated by one clock sampling another signal. If there is any bias in the sawtooth delay my guess is that averaging might not produce the desired result, especially if some process in the accumulation of the counter results does not perform end-to-end data collection and only averages some of the counts. With regards to error introduced by the purposeful phase jitter imposed on the clock: Voltage digitizing systems often add known analog dither noise before an A/D, then remove that noise digitally from the result. This can improve the accuracy of systems by reducing the effect of differential nonlinearity and other system errors. -- Bill Byrom N5BB Full disclosure: I am a Tektronix Application Engineer - Original message - From: Hal Murray To: Discussion of precise time and frequency measurement Cc: hmur...@megapathdsl.net Subject: Re: [time-nuts] uncertainty calculations Date: Sat, 15 Apr 2017 21:46:22 -0700 t...@radio.sent.com said: > * You might have any possible phase relationship between the two > signals. If they are exactly related by a 10^7 ratio, it's possible > for the 1 PPS edges to exactly coincide with the 10 MHz edges. > Depending on the type of gating circuit, you will have jitter and > possibly metastability resolving whether which edge occured first. ... > * To stay away from such problems, most precision counters add a small > amount of controlled jitter (phase modulation) to the clock. ... My experience with metastability is that it's really hard to make it happen. Are the clock and data in a good lab setup really stable enough to make metastability a problem? How much does the added jitter screw up measurements where it isn't needed? -- These are my opinions. I hate spam. ___ - Original message - From: Bill Byrom To: time-nuts@febo.com Subject: Re: [time-nuts] How does sawtooth compensation work? Date: Sun, 07 Aug 2016 21:36:21 -0500 A slight correction to a typo in the description below (sorry for the long delay). The correct Tektronix model numbers of these counters start with DC (not TM). The Tektronix TM500 (manual control) and TM5000 (GPIB or manual control) instruments which used the National Semiconductor MM5837 noise generator chip were the following: DC509 DC510 DC5009 DC5010 These models were manu
Re: [time-nuts] uncertainty calculations
t...@radio.sent.com said: > * You might have any possible phase relationship between the two > signals. If they are exactly related by a 10^7 ratio, it's possible > for the 1 PPS edges to exactly coincide with the 10 MHz edges. > Depending on the type of gating circuit, you will have jitter and > possibly metastability resolving whether which edge occured first. ... > * To stay away from such problems, most precision counters add a small > amount of controlled jitter (phase modulation) to the clock. ... My experience with metastability is that it's really hard to make it happen. Are the clock and data in a good lab setup really stable enough to make metastability a problem? How much does the added jitter screw up measurements where it isn't needed? -- These are my opinions. I hate spam. ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
Re: [time-nuts] uncertainty calculations
I believe that the problem is that the error in any one measurement is not uniformly distributed in exactly that way. If you are trying to count how many 10 MHz (100 ns interval) intervals occur between the 1 PPS edges in a period counter, you have to deal with the following? * You might have any possible phase relationship between the two signals. If they are exactly related by a 10^7 ratio, it's possible for the 1 PPS edges to exactly coincide with the 10 MHz edges. Depending on the type of gating circuit, you will have jitter and possibly metastability resolving whether which edge occured first. The same thing happens on the end of the measured interval, but (depending on how it's set up) the propagation delays and metastability and jitter might be different. So you could get millions of sequential counts which were 1 count low, followed by millions of counts which were one count high, with no counts exactly at 10^7. * To stay away from such problems, most precision counters add a small amount of controlled jitter (phase modulation) to the clock. When averaged over many measurements the effects of the two edges (gate and clock) lining up exactly are greatly reduced, since you are sliding one back and forth across the other with the modulation and the chance of metastability is small (assuming the signal being measured doesn't happen to match the phase modulation frequency). * The metastability problem depends on how the edges are compared. Some traditional flip-flops and latches can be thought of as analog gain elements connected so that they tend to sit in state A or state B, which involve analog voltages and currents. If you graph the energy in the system, the energy is low in state A, rises to a peak halfway between A and B, and falls to a low value at state B. If the recognition of the timing edge occurs early enough the system remains in state A. If the timing is later the system is pushed toward the peak, but doesn't get over it and returns to state A. But if the timing is at the perfect location the system is balanced at the potential energy peak, and only random noise can push the system into a final state A or B over a significant length of time. Sorry if this is considered obvious or trivial. -- Bill Byrom N5BB - Original message - From: jimlux To: Discussion of precise time and frequency measurement Subject: Re: [time-nuts] uncertainty calculations Date: Fri, 14 Apr 2017 08:49:07 -0700 On 4/14/17 8:37 AM, jimlux wrote: > If one is counting an unknown 1pps source with a counter that > runs at 10 > MHz (e.g. the error in any one measurement is uniformly > distributed over > 1 ppm) and you collect 100 samples, > is the (1 sigma) measurement uncertainty 0.1ppm * sqrt(100)/sqrt(12) > > (standard deviation of a uniform distribution is 1/sqrt(12) ) > > (assuming for the moment that both sources have no underlying > variability - we're talking about the *measurement uncertainty*) > Oops.. 0.1 ppm * 1/sqrt(N) * 1/sqrt(12) That is, the standard deviation goes down as sqrt(N) ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there. ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
Re: [time-nuts] uncertainty calculations
On 4/14/17 8:37 AM, jimlux wrote: If one is counting an unknown 1pps source with a counter that runs at 10 MHz (e.g. the error in any one measurement is uniformly distributed over 1 ppm) and you collect 100 samples, is the (1 sigma) measurement uncertainty 0.1ppm * sqrt(100)/sqrt(12) (standard deviation of a uniform distribution is 1/sqrt(12) ) (assuming for the moment that both sources have no underlying variability - we're talking about the *measurement uncertainty*) Oops.. 0.1 ppm * 1/sqrt(N) * 1/sqrt(12) That is, the standard deviation goes down as sqrt(N) ___ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.