Re: [time-nuts] TIC Characterization

2018-12-31 Thread Poul-Henning Kamp

In message , Magnus D
anielson writes:

>> measure (start=house_std, stop=siggen) and (start=siggen, stop=house_std) for
>> as many siggen phase settings as you have patience for.
>
>Well, this was the second setup I was talking about. To disclose the
>full non-linearity you want to tweak it to 9.999 MHz rather than 10 MHz.

Yes, that is a fall-back if your siggen cannot control the phase.

Of course if you both set 9.999 MHz *and* sweep the phase, you will
be able to separte the effects of the siggen and counter even better.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] TIC Characterization

2018-12-31 Thread Tom Van Baak
> Thanks Tom for your quick and extensive reply. 
> Indeed I confused Time Interval with Phase Difference… 
...
> By the way, it also seems that HDEV at Tau=1 is  2/sqrt(3) * Sigma = 1.15 
> SigmaTIC
>

I don't believe that HDEV result. For many large runs of simulated normalized 
white phase noise input I get:
adev(1) = 1.732, mdev(1) = 1.732, tdev(1) = 1.000, hdev(1) = 1.825


See: https://en.wikipedia.org/wiki/Sum_of_normally_distributed_random_variables
or google for topics like:
sums of independent random variables
normal sum distribution
linear combinations of normal random variables

Then look at both calc_adev() and calc_hdev() in 
http://leapsecond.com/tools/adev_lib.c
Assuming you have white phase noise input with mean=0, stdev=1 and using tau=1, 
then,

1) The key lines for ADEV are:
v = data[i + 2*tau] - 2 * data[i + tau] + data[i];
sum /= 2.0;
So you would expect sqrt( (1 + 4 + 1) / 2 ) = sqrt(6/2) = 1.7321

2) The key lines for HDEV are:
v = data[i + 3*tau] - 3 * data[i + 2*tau] + 3 * data[i + tau] - data[i];
sum /= 6.0;
So you would expect sqrt( (1 + 9 + 9 + 1) / 6 ) = sqrt(20/6) = 1.8257

3) MDEV is the same as ADEV for tau = 1 so that's why it is also 1.7321.

4) TDEV is MDEV / sqrt(3) so that why it gives 1..


For testing counter resolution TDEV is often more instructive than ADEV:

a) TDEV doesn't have that misleading, distracting, prolonged -1 slope that ADEV 
plots often show.
b) TDEV has the nice property of reporting 1 when given 1 RMS data.
c) The units for TDEV are seconds, which is appropriate for a TIC (time 
interval counter).
d) The units for ADEV are fractional frequency, which is natural for frequency 
standards.
e) Unless there are design flaws, instrument drift, or environmental issues, 
TDEV should be flat from tau 1 to forever.
f) Subtle, unwanted variations are much easier to observe in a flat line (TDEV) 
than a -1 line (ADEV).

/tvb


- Original Message - 
From: "Club-Internet Clemgill" 
To: "Tom Van Baak" ; "Discussion of precise time and 
frequency measurement" 
Sent: Sunday, December 30, 2018 1:07 AM
Subject: Re: [time-nuts] TIC Characterization


Thanks Tom for your quick and extensive reply. 
Indeed I confused Time Interval with Phase Difference… 

Corrected calc: 
4/ [(Xi+2 - Xi+1) - (Xi+1 - Xi)]^2 = [(To + Ti+2) - 2(To + Ti+1) + (To + Ti)]^2 
= [Ti+2 - 2Ti+1 + Ti]^2 
=  (Ti+2)^2 + 4(Ti+1)^2 + (Ti)^2 + 2(-2Ti+2*Ti+1 + Ti+2*Ti - 2Ti+1*Ti)

5/ <(Ti+1)^2> # <(Ti+1)^2> #  < (Ti)^2> for large samples and  
<(Ti+a * Ti+b)> = 0 as Ti+1 and Ti are independent
Then AVAR =  (1/2Tau^2) * 6 < (Ti)^2>  = (1/Tau^2) * 6  * SigmaTIC^2

6/ Hence ADEV = sqrt(3) * SigmaTIC / Tau

So ADEV(Tau=1)  = 1.73 * SigmaTIC (indeed…)

By the way, it also seems that HDEV at Tau=1 is  2/sqrt(3) * Sigma = 1.15 
SigmaTIC

Best, 
Gilles.

 


> Le 30 déc. 2018 à 07:14, Tom Van Baak  a écrit :
> 
> Hi Gilles,
> 
> Correct, the log-log slope will be -1.
> 
> But I'm not sure about your ADEV and SigmaTIC claim.
> 
> Assume the 53132A has 150 ps RMS resolution. The standard deviation is also 
> 150 ps. The Allan deviation at tau=1 would be 1.73 * 150 ps/s or 2.60e-10.
> 
> Look at calc_adev() in http://leapsecond.com/tools/adev_lib.c and note the 
> three data[] terms. With multiple uncorrelated terms you simply sum the 
> variances. There are three terms so that's 3 * stdev. When you convert AVAR 
> to ADEV the 3 becomes sqrt(3), or 1.73. Make sense?
> 
> For extra credit, note that MDEV at tau=1 is the same as ADEV. However, TDEV 
> at tau=1 is 1.50e-10, the same as stdev. In the same file, see that the 
> sqrt(3) factor is removed in calc_tdev().
> 
> 
> 
> The best and largest pile of ADEV documentation is:
> 
> "information about frequency stability analysis"
> http://www.wriley.com/Freq%20Stab%20Analy%20Links.htm
> 
> There is also a wikipedia page:
> 
> https://en.wikipedia.org/wiki/Allan_variance
> 
> For simpler introductions see:
> 
> "Analysis of Time Domain Data"
> https://tf.nist.gov/phase/Properties/four.htm
> 
> "Clock Performance and Performance Measures"
> https://tycho.usno.navy.mil/mclocks2.html
> 
> "Fundamentals of Time and Frequency"
> https://tf.nist.gov/general/pdf/1498.pdf
> 
> 
> 
> If you want to play with ADEV check out Stable32 [1] or TimeLab [2]. Both are 
> highly recommended and are also free. For questions like yours the Stable32 
> noise generator feature is very useful to explore the shape(s) of ADEV for 
> given noise types. It was used to create:
> 
> "Exploring Allan Deviation"
> http://leapsecond.com/pages/allan/Exploring_Allan_Deviation_v2.pdf
> 
> /tvb
> 
> [1] http://www.stable32.com/
> [2] http://www.ke5fx.co

Re: [time-nuts] TIC Characterization

2018-12-30 Thread Poul-Henning Kamp

In message , Magnus D
anielson writes:
>Hi Gilles,
>
>On 12/29/18 11:28 PM, Club-Internet Clemgill wrote:
>> Hi, 
>> Looking to testing my HP53132A in TIC mode. 
>> I considered the Time Interval measurement technique: 
>> The start channel is connected to a 1 PPS signal, and to the stop channel 
>> though a coax cable (constant delay line).
>
>Fair enough setup. This is a static test setup which works as long as
>you do not lock the counter up to a 10 MHz of the same source as the
>PPS, and for all maters not accurate enough, so it's best for the test
>for it to be free-running.

Here is another test-setup, which is very revealing about non-white
noise in TIC counters:

You need a signal generator which can be locked to an external
frequency and control the phase of the output signal relative to
that external frequency.  The HP3336 is a good cancidate.

Lock both the counter under investigation and the siggen to the
same house standard.  Set the siggen to output same frequency as
house standard.

measure (start=house_std, stop=siggen) and (start=siggen, stop=house_std) for
as many siggen phase settings as you have patience for.

Plot results, and wonder why you don't get a straight line...

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] TIC Characterization

2018-12-30 Thread Magnus Danielson
Hi Gilles,

On 12/29/18 11:28 PM, Club-Internet Clemgill wrote:
> Hi, 
> Looking to testing my HP53132A in TIC mode. 
> I considered the Time Interval measurement technique: 
> The start channel is connected to a 1 PPS signal, and to the stop channel 
> though a coax cable (constant delay line).

Fair enough setup. This is a static test setup which works as long as
you do not lock the counter up to a 10 MHz of the same source as the
PPS, and for all maters not accurate enough, so it's best for the test
for it to be free-running. When you lock it up, you get a very static
behavior of the systematic noise of quantization resolution, and you
will be hitting essentially the same bin all the time, and well, you are
not that lucky on real-life signals since the phase relationship glides
ever so slightly that you want to make sure you do that. So, either you
use the time-base offset to cause the quantization of the counter glide
relative to the PPS reference or you use an offset oscillator for your
signal, both achieve the same goal. The difference lies in wither you
have both start and stop channels glide, as for internal reference
offset, or you have only the stop channel glide, as you do with an
offset oscillator but have time-base and start channel being
synchronous. The jitter for the later one is expected lower, because it
will have the start-channel banging the same bin more or less each time
since the time-base of the counter, steering the phase of the
quantization is synchronous to the start-channel, thus essentially
removing the noise of the start-channel.

While you get an ADEV slope of -1 and it looks like white phase
modulation noise, the counters resolution is a very systematic noise and
you should not forget that, rather, you can use this fact in your tests
to learn more about it. You will find that it is not perfectly linear
slope either, so for an average performance you want to average over the
full set of phase-relationships between time-base and start/stop channels.

> I found some references on the web, but no one with the associated maths.

The counter resolution and slope is somewhat of a white spot. It is
"known" but not very well researched. I did one presentation on it with
associated paper, but I need to redo that one because it does not
present it properly.

> So I tried the following :
> 
> 1/ AVAR  =  (1/2*Tau^2) * < [(Xi+2 - Xi+1) - (Xi+1 - Xi)]^2 >
> with (Xi+1 - Xi) = phase difference = time interval 
> 
> 2/ Phase difference = To + Ti 
> where To is the constant delay between start and stop (coax line)
> and Ti is the counter's resolution at time i
> 
> 3/ Assuming that Ti is a Central Gaussian distribution then:
> mean = < Ti > = 0 and variance = < Ti ^2> = SigmaTIC^2

It will not be completely true, but a dominant feature.
Turns out that the quantization staircase is a very systematic property,
but then offset by the white phase modulation and flicker phase
modulation that you can expect. However, the staircase quantization will
dominate for these short taus and it is only for longer taus you go into
the flicker part.

> 4/ [(Xi+2 - Xi+1) - (Xi+1 - Xi)]^2 = [(To + Ti+1) - (To + Ti)]^2 = (Ti+1 - 
> Ti)^2 
> =  (Ti+1)^2 + (Ti)^2 - 2(Ti+1 * Ti)
> 
> 5/ <(Ti+1)^2> #  < (Ti)^2> for large samples and 
> <2(Ti+1 * Ti)> = 0 because Ti+1 and Ti are independent
> Then AVAR =  (1/2Tau^2) * 2< (Ti)^2>  = (1/Tau^2) * SigmaTIC^2
> 
> 6/ Hence ADEV = SigmaTIC / Tau
> 
> So ADEV (log log) is a straight line with -1 slope
> And ADEV(Tau=1) provides the standard deviation = SigmaTIC  of the Time 
> Interval Counter's resolution 
> 
> Is this right ? 
> Thanks to point me at related articles or web pages if you know any.

You do indeed get an ADEV -1 slope for the counter quantization, I've
done essentially the same analysis.

I've then done a paper showing how noise and quantization interacts and
somewhat shifts this around in, ehm, interesting ways. Unfortunately the
paper as presented was not all that good, but I should do work on that,
because there is some further insights to present more thoroughly as
well as making the real point go through better.

I have only seen an Agilent app-note which addresses some of this, but
then with the focus on frequency measurements. Others seems to have
treated the subject as a fact of life and moved on.

So, thank you for reminding me about this property, it is indeed
somewhat of a white spot.

Cheers,
Magnus

___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


Re: [time-nuts] TIC Characterization

2018-12-29 Thread Tom Van Baak
Hi Gilles,

Correct, the log-log slope will be -1.

But I'm not sure about your ADEV and SigmaTIC claim.

Assume the 53132A has 150 ps RMS resolution. The standard deviation is also 150 
ps. The Allan deviation at tau=1 would be 1.73 * 150 ps/s or 2.60e-10.

Look at calc_adev() in http://leapsecond.com/tools/adev_lib.c and note the 
three data[] terms. With multiple uncorrelated terms you simply sum the 
variances. There are three terms so that's 3 * stdev. When you convert AVAR to 
ADEV the 3 becomes sqrt(3), or 1.73. Make sense?

For extra credit, note that MDEV at tau=1 is the same as ADEV. However, TDEV at 
tau=1 is 1.50e-10, the same as stdev. In the same file, see that the sqrt(3) 
factor is removed in calc_tdev().



The best and largest pile of ADEV documentation is:

"information about frequency stability analysis"
http://www.wriley.com/Freq%20Stab%20Analy%20Links.htm

There is also a wikipedia page:

https://en.wikipedia.org/wiki/Allan_variance

For simpler introductions see:

"Analysis of Time Domain Data"
https://tf.nist.gov/phase/Properties/four.htm

"Clock Performance and Performance Measures"
https://tycho.usno.navy.mil/mclocks2.html

"Fundamentals of Time and Frequency"
https://tf.nist.gov/general/pdf/1498.pdf



If you want to play with ADEV check out Stable32 [1] or TimeLab [2]. Both are 
highly recommended and are also free. For questions like yours the Stable32 
noise generator feature is very useful to explore the shape(s) of ADEV for 
given noise types. It was used to create:

"Exploring Allan Deviation"
http://leapsecond.com/pages/allan/Exploring_Allan_Deviation_v2.pdf

/tvb

[1] http://www.stable32.com/
[2] http://www.ke5fx.com/timelab/readme.htm


- Original Message - 
From: "Club-Internet Clemgill" 
To: "Discussion of precise time and frequency measurement" 

Sent: Saturday, December 29, 2018 2:28 PM
Subject: [time-nuts] TIC Characterization


> Hi, 
> Looking to testing my HP53132A in TIC mode. 
> I considered the Time Interval measurement technique: 
> The start channel is connected to a 1 PPS signal, and to the stop channel 
> though a coax cable (constant delay line).
> I found some references on the web, but no one with the associated maths.
> So I tried the following :
> 
> 1/ AVAR  =  (1/2*Tau^2) * < [(Xi+2 - Xi+1) - (Xi+1 - Xi)]^2 >
> with (Xi+1 - Xi) = phase difference = time interval 
> 
> 2/ Phase difference = To + Ti 
> where To is the constant delay between start and stop (coax line)
> and Ti is the counter's resolution at time i
> 
> 3/ Assuming that Ti is a Central Gaussian distribution then:
> mean = < Ti > = 0 and variance = < Ti ^2> = SigmaTIC^2
> 
> 4/ [(Xi+2 - Xi+1) - (Xi+1 - Xi)]^2 = [(To + Ti+1) - (To + Ti)]^2 = (Ti+1 - 
> Ti)^2 
> =  (Ti+1)^2 + (Ti)^2 - 2(Ti+1 * Ti)
> 
> 5/ <(Ti+1)^2> #  < (Ti)^2> for large samples and 
> <2(Ti+1 * Ti)> = 0 because Ti+1 and Ti are independent
> Then AVAR =  (1/2Tau^2) * 2< (Ti)^2>  = (1/Tau^2) * SigmaTIC^2
> 
> 6/ Hence ADEV = SigmaTIC / Tau
> 
> So ADEV (log log) is a straight line with -1 slope
> And ADEV(Tau=1) provides the standard deviation = SigmaTIC  of the Time 
> Interval Counter's resolution 
> 
> Is this right ? 
> Thanks to point me at related articles or web pages if you know any.
> 
> Gilles. 
> 
> 
> ___
> time-nuts mailing list -- time-nuts@lists.febo.com
> To unsubscribe, go to 
> http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
> and follow the instructions there.


___
time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to 
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.