Re: [time-nuts] PLL Digital Loop Filter

2017-03-21 Thread James Peroulas
Thanks for the hints and references everyone. I'll dig in and possibly come
back with some more questions.

BR,
James
___
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] PLL Digital Loop Filter

2017-03-20 Thread James Peroulas
I'm trying to understand how to design and analyze the loop filters in a
digital PLL. Specifically, because of digital processing delays, the phase
offset measured at time t will only produce a change on the VCXO input at
time t+T, where T is the sampling period of the digital loop.

I've found plenty of texts describing analog loop filters. Are there any
recommendations for digital loop filter PLL design?

Thanks,
James
___
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] HP5328A + NI GPIB-ENET/1000

2017-02-24 Thread James Peroulas
Thanks for the suggestions Scott(s)!

It ended up being something simple. With no signal coming into the 5328A,
it did not produce any output over GPIB. I would have expected a continuous
readout of 0Hz. Once I applied a signal, a simple GPIB "read" request
returned the measurements I needed. No need to send any commands. This is
in talk-only mode.

James
___
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] HP5328A + NI GPIB-ENET/1000

2017-02-23 Thread James Peroulas
Does anyone have experience using older HP equipment with the NI
GPIB-ENET/1000 GPIB to ethernet box? Is this even possible with such an old
piece of equipment? I'm very familiar with using SCPI commands over telnet
but not so familiar with HPIB.

So far I've installed the NI 488.2 software which has successfully found
both the GPIB-ENET/1000 box and the HP5328A connected to it. I've opened
the NI-488.2 communicator which should allow me to send commands to the
counter and read back results. However, anything I type in the "send
string" returns a timeout.

The manual for the 5328A shows example commands such as:
CMD"?U*","T"
But it's not clear to me what portion (all?) is the string that I should be
sending to the 5328a.

The 5328a is set to "Talk Only" mode via dip switch. I would expect that I
should be able to just 'read' the results, but 'read' also times out...

Thanks for any pointers,
James
___
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] Modified Allan Deviation and counter averaging

2015-07-30 Thread James Peroulas
My understanding is that MVAR(m*tau0) is equivalent to filtering the phase
samples x(n) by averaging m samples to produce x'(n)
[x'(n)=1/m*(x(n)+x(n+1)..x(n+m-1))] and then calculating AVAR for
tau=m*tau0 on the filtered sequence. Thus, MVAR already performs an
averaging/ lowpass filtering operation. Adding another averaging filter
prior to calculating MVAR would seem to be defining a new type of stability
measurement.

Not familiar with the 5370... Is it possible to configure it to average
measurements over the complete tau0 interval with no dead time between
measurements? Assuming the 5370 can average 100 evenly spaced measurements
within the measurement interval (1s?), calculating MVAR on the captured
sequence would produce MVAR(m*.01)) for m being a multiple of 100. i.e.,
tau0 here is actually .01, not 1, but values for MVAR(tau) for tau's less
than 1s are not available.

Shouldn't the quantization/ measurement noise power be easy to measure?
Can't it just be subtracted from the MVAR plot? I've done this with AVAR in
the past to produce 'seemingly' meaningful results (i.e. I'm not an expert).

I calculated the PSD of x(n) and it was clear where the measurements were
being limited by noise (flat section at higher frequencies). From this I
was able to estimate the measurement noise power.

AVAR_MEASURED(tau)=AVAR_CUT(tau)+AVAR_REF(tau)+AVAR_MEAS(tau)

i.e. The measured AVAR is equal to the sum of the AVAR of the clock under
test (CUT), the AVAR of the reference clock, and the AVAR of the
measurement noise. If the reference clock is much better than the CUT
AVAR_REF(tau) can be ignored. AVAR_MEAS(tau) is known from the PSD of x(n)
and can be subtracted from AVAR_MEASURED(tau) to produce a better estimate
of AVAR_CUT(tau).

Depending on the confidence intervals of AVAR_MEASURED(tau) and the noise
power estimate, you can get varying degrees of cancellation. 10dB of
improvement seemed quite easy to obtain.

James


Message: 7
 Date: Tue, 28 Jul 2015 21:51:07 +
 From: Poul-Henning Kamp p...@phk.freebsd.dk
 To: time-nuts@febo.com
 Subject: [time-nuts] Modified Allan Deviation and counter averaging
 Message-ID: 2884.1438120...@critter.freebsd.dk
 Content-Type: text/plain; charset=us-ascii

 Sorry this is a bit long-ish, but I figure I'm saving time putting
 in all the details up front.

 The canonical time-nut way to set up a MVAR measurement is to feed
 two sources to a HP5370 and measure the time interval between their
 zero crossings often enough to resolve any phase ambiguities caused
 by frequency differences.

 The computer unfolds the phase wrap-arounds, and calculates the
 MVAR using the measurement rate, typically 100, 10 or 1 Hz, as the
 minimum Tau.

 However, the HP5370 has noise-floor in the low picoseconds, which
 creates the well known diagonal left bound on what we can measure
 this way.

 So it is tempting to do this instead:

 Every measurement period, we let the HP5370 do a burst of 100
 measurements[*] and feed the average to MVAR, and push the diagonal
 line an order of magnitude (sqrt(100)) further down.

 At its specified rate, the HP5370 will take 1/30th of a second to
 do a 100 sample average measurement.

 If we are measuring once each second, that's only 3% of the Tau.

 No measurement is ever instantaneous, simply because the two zero
 crossings are not happening right at the mesurement epoch.

 If I measure two 10MHz signals the canonical way, the first zero
 crossing could come as late as 100(+epsilon) nanoseconds after the
 epoch, and the second as much as 100(+epsilon) nanoseconds later.

 An actual point of the measurement doesn't even exist, but picking
 with the midpoint we get an average delay of 75ns, worst case 150ns.

 That works out to one part in 13 million which is a lot less than 3%,
 but certainly not zero as the MVAR formula pressume.

 Eyeballing it, 3% is well below the reproducibility I see on MVAR
 measurements, and I have therefore waved the method and result
 through, without a formal proof.

 However, I have very carefully made sure to never show anybody
 any of these plots because of the lack of proof.

 Thanks to Johns Turbo-5370 we can do burst measurements at much
 higher rates than 3000/s, and thus potentially push the diagonal
 limit more than a decade to the left, while still doing minimum
 violence to the mathematical assumptions under MVAR.

 [*] The footnote is this: The HP5370 firwmare does not make triggered
 bust averages an easy measurement, but we can change that, in
 particular with Johns Turbo-5370.

 But before I attempt to do that, I would appreciate if a couple of
 the more math-savy time-nuts could ponder the soundness of the
 concept.

 Apart from the delayed measurement point, I have not been able
 to identify any issues.

 The frequency spectrum filtered out by the averaging is wy to
 the left of our minimum Tau.

 Phase wrap-around inside bursts can be detected and unfolded
 in the processing.

 Am I overlooking anything ?


 

Re: [time-nuts] NTP to discipline Raspberry Pi

2013-07-26 Thread James Peroulas

 Date: Fri, 26 Jul 2013 12:27:50 +0200
 From: mike cook mc235...@gmail.com
 To: Discussion of precise time and frequency measurement
 time-nuts@febo.com
 Subject: Re: [time-nuts] NTP to discipline Raspberry Pi
 Message-ID: d7f2de71-32bc-4f54-8fff-5e2027a57...@gmail.com
 Content-Type: text/plain; charset=windows-1252

 Le 25 juil. 2013 ? 05:21, James Peroulas a ?crit :

  I was hoping to measure the ppm error of a Raspberry Pi's crystal using
 an
  NTP client running on the Pi itself. The NTP client reports a ppm
  correction that I find to be consistently (measurements performed over
  several days) off by about 10 ppm compared to what I measure using my GPS
  calibrated frequency counter (HP5328). Specifically, the Pi reports a
  required ppm correction of -33 ppm whereas I consistenngtly measure a
  required correction of -43 ppm on my frequency counter.

Could you let us know what crystal you were measuring? From the  design
 docs there are 2 on the board  , one at 25 MHz and one  at 19,2MHz. The
 19.2MHz is the one used to derive the ARM clocks.


Apparently, the 25MHz crystal is used only for the ethernet port, so I
didn't bother with it at all. To measure the 19.2MHz clock, I brought it
out to one of the GPIO pins, after dividing by 2. Assuming that the
internal divider was working properly, I _should_ have been measuring the
crystal's PPM error, but I didn't actually probe the crystal itself... I
just added the utility I used for this (gpioclk) to my WSPR fork, in case
you find it useful. You can place either the crystal or PLLD (after
dividing) on the gpioclk pin using the gpioclk program:
https://github.com/JamesP6000/WsprryPi

NTP reports the system clock frequency drift ( which I guess is the pll
 drift), and not the crystal frequency drift, so that may explain what you
 are seeing.


Well, the pll output error would be the same as the crystal error, assuming
that NTP was correctly informed of the nominal PLL frequency. What I think
might be happening is that the NTP reference clock might have a nominal
frequency of (something like) 1.02MHz but NTP was incorrectly told
(through kernel headers) that the nominal frequency was 1.00MHz. It
would then have to apply a -2PPM correction in addition to the actual PPM
error of the crystal in order to discipline the clock.

I'm embarrassed to admit it, but I hadn't updated the system on this RPi's
SD card. After a dist-upgrade, there is still a bias, but it's only 2.5 PPM
or so now, which isn't a problem for WSPR. I'm still going to try to track
it down. This does at least show that there is a software issue somewhere...

James

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] NTP to discipline Raspberry Pi (Hal Murray)

2013-07-25 Thread James Peroulas

 Date: Wed, 24 Jul 2013 20:46:51 -0700
 From: Hal Murray hmur...@megapathdsl.net
 ja...@peroulas.com said:
  Any ideas on where I can look to track down the discrepancy?

 Dig out the kernel sources.


This would be my first time looking at kernel sources. Any suggestions as
to where to start?


 Who but
 a time-nut would care if the crystal was off by 33 ppm or 43 ppm?


So 10ppm qualifies me as a time nut? Yay! :)

James

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] NTP to discipline Raspberry Pi

2013-07-24 Thread James Peroulas
I was hoping to measure the ppm error of a Raspberry Pi's crystal using an
NTP client running on the Pi itself. The NTP client reports a ppm
correction that I find to be consistently (measurements performed over
several days) off by about 10 ppm compared to what I measure using my GPS
calibrated frequency counter (HP5328). Specifically, the Pi reports a
required ppm correction of -33 ppm whereas I consistently measure a
required correction of -43 ppm on my frequency counter.

Any ideas on where I can look to track down the discrepancy? Perhaps the
timers on the RPi are configured incorrectly in the kernel? Or is this the
best I can expect from NTP? I would understand the situation if the NTP
reported correction drifted above and below -43ppm, but it seldom departs
from -33ppm by more than 1 or 2 ppm...

Thanks,
James

P.S. I apologize if this isn't time-nutty enough :) I only need about 1ppm
accuracy in my corrections :)

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] time-nuts Digest, Vol 104, Issue 37

2013-03-11 Thread James Peroulas

 Date: Sun, 10 Mar 2013 17:37:13 -0700
 From: gary li...@lazygranch.com
 To: time-nuts@febo.com
 Subject: Re: [time-nuts] frequency reference for portable operation
 Message-ID: 513d2739.8030...@lazygranch.com
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 I haven't researched this yet, but the SDR crowd is using GSM and LTE
 for tuning their sample clocks.

  https://github.com/steve-m/kalibrate-rtl
  https://github.com/Evrytania/LTE-Cell-Scanner


 I have no idea what kind of accuracy you can get from a tower.


GSM and LTE (and WCDMA and TD-SCDMA for that matter) are spec'd for 50 PPB
accuracy. However, these networks are 'often' synchronized to an external
reference which would presumably be GPS. This would give better long term
accuracy, but the short term accuracy would depend on the actual
implementation of the basestation.

JP

P.S. I'm the author of LTE-Cell-Scanner.
___
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] question for expert time guys

2013-02-04 Thread James Peroulas
About this subject, are you concerned with multipath? The signal from two
of the basestations might arrive over a line-of-sight path whereas for the
third basestation the signal might bounce around before arriving...

JP


-

To time experts/EE's.

I would like to triangulate a position of a device which moves using 3
fixed positions devices of known location.
The idea is to have these operate on 915mhz or 434mhz or 2.4ghz or
appropriate frequency.
These two type of devices (fixed and mobile) are all under my control and
thus customized as needed.

The mobile device (not a phone, custom device) would be the least expensive
item.  I'd like a range of 150 feet or better and accuracy of 3 feet or
better.
When manufactured these items they can be calibrated in order to adjust for
any variation in IC's, discrete components etc...
We can assume for now the temperature is constant 70 degree temperature.
Cost is the key design factor.

The general flow is:

   1. base station 1 indicates we are determining position of device A.
   2. Each base station 1, 2, 3 take turns pinging the device to determine
distance.
   3. A ping consists of (something like, e.g. frequencies as examples)
-send 915mhz signal from base station to device
-device response ASAP on different frequency
-station waits and counts 'time' for return
-this is repeated N? times to get best avg/accuracy.
-The mobile device does not move very fast
   4. Since delays of the process on each unit is calibrated the device and
base station would subtrack that time out from the results.
   5. obviously with 3 distances we can determine the 2D position of the
mobile device

I know the time accuracy is the key to count time =  feet, 1ns.  This
overall project is not new concept.   How to make it inexpensive is key.
how inexpensive, very ;-)   no OCXO or expensive components like that.

That's my goal, and I'm looking for help on the design/thought process of
getting there.
I am open to a consulting arrangement for a fee, please email if you like.
 I've worked with 'regular' EE's (I'm a software guy) but this time
accuracy is too much for them.
Esp. finding a way to do it inexpensively.

Thanks for any thoughts.



--
Integrity is a binary state - either you have it or you don’t. - John Doerr
___
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] FE-5680A OSMT connector / RS232

2012-12-11 Thread James Peroulas
Thanks for all your suggestions!

Ends up that I seem to have found yet a different version of the 5680a :)
My DDS board did have an RS232 level shifter but for some reason, the RS232
TX signal was not being brought out to the 5 pin connector. Once I soldered
the TX wire directly to the SP233ACT level shifter (pin 5), I was able to
communicate with the device.

Thanks,
James


Date: Sun, 09 Dec 2012 23:25:25 -0800
 From: Hal Murray hmur...@megapathdsl.net
 To: Discussion of precise time and frequency measurement
 time-nuts@febo.com
 Subject: Re: [time-nuts] FE-5680A OSMT connector / RS232
 Message-ID:
 20121210072525.7b0ef800...@ip-64-139-1-69.sjc.megapath.net
 Content-Type: text/plain; charset=us-ascii


 ja...@peroulas.com said:
  I'm not able to get it to respond to the 'S' command and when I measure
 the
  voltage on the RS232 TX pin (#2 from the left) it's always 0v. Shouldn't
 it
  be -12v when idle?

 Newer RS-232 allows 6V rather than 12.

 In practice, it's not all that uncommon for designers to save a chip and
 just
 send 5V CMOS signals.  That works fine for short distances.

 If you can get a scope on it, sometimes embedded boxes send out a hello
 message at power up.

 I'd also check pin 3 in case you or they got things swapped.


 --
 These are my opinions.  I hate spam.


-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] FE-5680A OSMT connector / RS232

2012-12-09 Thread James Peroulas
For the record, my device did have an OSMT (not Hirose) connector on the
DDS board.

I'm having trouble getting the internal RS232 port on the DDS board to work
and I was wondering if there were any tricks to it? I'm not able to get it
to respond to the 'S' command and when I measure the voltage on the RS232
TX pin (#2 from the left) it's always 0v. Shouldn't it be -12v when idle?

Thanks,
James


On Mon, Nov 26, 2012 at 11:22 PM, James Peroulas ja...@peroulas.com wrote:

 Was wondering if anyone ever confirmed the type of RF connector found
 internally in the FE-5860a?

 I've seen several posts calling it a Hirose U.FL, but the linked thread
 suggests that it might actually be an OSMT connector:
 http://www.vklogger.com/forum/viewtopic.php?t=10289

 Or is everyone simply soldering cable directly to the center pin?

 Thanks,
 James

 --
 *Integrity is a binary state - either you have it or you don’t.* - John
 Doerr




-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] FE-5860a internal RF connector?

2012-11-26 Thread James Peroulas
Was wondering if anyone ever confirmed the type of RF connector found
internally in the FE-5860a?

I've seen several posts calling it a Hirose U.FL, but the linked thread
suggests that it might actually be an OSMT connector:
http://www.vklogger.com/forum/viewtopic.php?t=10289

Or is everyone simply soldering cable directly to the center pin?

Thanks,
James

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] FE-5680A no 10MHz RF output?

2012-11-25 Thread James Peroulas
 Message: 3
 Date: Sat, 24 Nov 2012 11:10:02 -0600
 From: Ed Palmer ed_pal...@sasktel.net
 To: Discussion of precise time and frequency measurement
 time-nuts@febo.com
 Subject: Re: [time-nuts] FE-5680A no 10MHz RF output?
 Message-ID: 50b0ff6a.7030...@sasktel.net
 Content-Type: text/plain; charset=windows-1252; format=flowed

 I have a similar unit that I picked up a few years ago.  It only has a 1
 PPS output.  That's the way it was designed.  There are so many
 different versions of this stupid model that it's impossible to be sure
 what you're buying until you get it on your bench.

 If yours is like mine, the DDS is putting out 2^23 Hz (~8.39 MHz) which
 then goes through a fixed divider to 1 Hz.  You can access the 8 MHz
 signal via a tiny socket on the DDS board.  There is info online on how
 to modify the unit to bring that signal out to a connector and program
 it for other frequencies.  If you change the frequency, the 1 PPS also
 changes frequency.

 Ed


Ugh... Hopefully he'll let me return it. This is the first time I've bought
an $80 item from China and I've been burned :(

JP

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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] FE-5680A no 10MHz RF output?

2012-11-24 Thread James Peroulas
I received a 'programmable' FE-5680A from nichegeek recently and I'm able
to get it to lock (pin 3 goes low) and produce a PPS output (pin 6).
However, it never produces a 10MHz output on pin 7.

Is this unit defective, or is there something I might be doing wrong?

My unit is labeled: FE-5680A UN 32575 S/N 45531 Revision: B. It's pretty
banged up too, like someone took a drill to it :(

James

-- 
*Integrity is a binary state - either you have it or you don’t.* - John
Doerr
___
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.