[Beowulf] more about crystal oscillators than you ever wanted to know, was Re: Benchmark results
Jim Lux
James.P.Lux at jpl.nasa.gov
Thu Jan 8 19:07:34 EST 2004
Fascinating as this is, it is straying pretty far afield from Beowulfery
though. I've put some comments on crystal oscillators below Josip's comments..
To keep it somewhat list related, I've looked over some documentation on
early PCs, and it appears that the 8253(PC)/8254 (AT and later) didn't have
any of the gate inputs brought out conveniently, so you can't use it for
timing. And, the game port is a latched input port, with some 555 type
timers, triggered by another port output, so you can't jam anything in
there either.
Looks like IRQs off the serial or parallel port is your best bet. I
haven't been able to fully determine how the usual chipsets these days
implement the 8259 interrupt controller logic, and how the average P4
handles the interrupt in the first place.
So, what one really needs is something that will field the IRQ, grab the
CPU counter, and stuff it in a known location somewhere. I should think
that this would have very much sub microsecond scatter, even if the entire
operation takes several microseconds to do. (and, on modern processors,
that's a bunch of ops you're giving up to do the timing...)
At 03:37 PM 1/8/2004 -0700, Josip Loncaric wrote:
>Jim Lux wrote:
>>We're talking parts per million here, though, just to keep things in
>>perspective.
>
>I just checked some quartz crystal oscillator specs, and they range all
>over the place. The cheap ones recommended for Gigabit Ethernet devices
>claim 100 ppm stability, but good quality ones can be ordered with 0.1 ppm
>specs.
>
>HP application node 200-2 "Fundamentals of Quartz Oscillators" (see
>http://www.measurement.tm.agilent.com/main.cgi?PSP_NEXT=Redirect&Document:CONTENT_ID=6980)
>says that temperature effects are the dominant influence (2.5 ppm within
>0-50 deg. C). This is followed by aging (<0.3ppm/month), line voltage
>change (<0.1ppm/10% change), and various other smaller effects.
>
>A good crystal may deliver <2.5 ppm frequency variation over a 0 to 50
>deg. C range, but the temperature dependence may be quite nonlinear.
>Temperature compensated crystals can deliver 0.5 ppm stability over the
>same range.
There's also the issue of phase noise.. you could have a fairly unstable
(in the long term sense), but very clean, oscillator. A cesium beam
standard is exactly the opposite.. very, very stable in the long term,
really noisy in the short term, so the usual standard source uses a very
clean quartz oscillator that is locked to the cesium reference (or to GPS,
nowadays.. GPS uses Cesium and Rubidium sources on board).
It kind of depends on what time scale you want to measure things over. If
it's down in the microseconds for the sort of nanobenchmarking that Robert
was talking about, then you need a good low jitter source.
In a typical Ethernet receiver, there's a tracking loop that acquires the
frequency (bit timing) of the incoming signal during the preamble, and it
can tolerate a fairly wide offset. However, it really depends on the bit
to bit timing being very stable, so it can make the decisions.
The internal oscillator in a lab time interval counter might be pretty
poor, noise wise,but very stable, since its function is to measure
frequency. An oscillator in a receiver, transmitter, or spectrum analyzer
may have poorer frequency stability, but be "cleaner" because noise in the
oscillator output shows up in the signal being transmitted or received
because of reciprocal mixing.
There's a tradeoff between aging and temperature dependence as well. A
temperature compensated oscillator uses a temperature dependent capacitor
in combination with the crystal to pull the crystal slightly to compensate
the variations in its resonant frequency. However, the fact that the
crystal can be pulled means that it has to be lower Q, and hence, poorer
close in noise. VCXOs (Voltage controlled oscillators) have the same
general problem.. if you can adjust it, it implies that "other things" can
also adjust it, causing random variations.
Aging is more a matter of drive power and mechanical stress. Driving the
crystal harder gives you a cleaner output (because your farther above the
thermal noise floor), but also heats the crystal, causing it to age faster.
The ideal scheme is to have a system that does not depend on the crystal
frequency being at a particular value, but, rather, can adapt to changing
frequencies. Then, you can have a very high quality (stiff) crystal (so
the environmental and loading effects don't affect it, and so it has low
phase noise), drive the heck out of it (causing it to drift and age
rapidly), and measure it periodically against an accurate clock (i.e. Cs,
Rb, or GPS).
This is basically the NTP approach... measure your computer's clock against
a higher stratum reference, and change the "ticks per second" number to
adjust so that the clock runs true.
You then apply a calibration factor, or retune the radio, or whatever, to
account for the known frequency of the oscillator. By the way, this is what
they do in GPS receivers.. one of the variables the receiver solves for (in
addition to pseudo range and pseudo range rate) is local clock offset and
offset rate. It also means you need more satellites to get a fix, though.
James Lux, P.E.
Spacecraft Telecommunications Section
Jet Propulsion Laboratory, Mail Stop 161-213
4800 Oak Grove Drive
Pasadena CA 91109
tel: (818)354-2075
fax: (818)393-6875
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
More information about the Beowulf
mailing list