UW Seal UW logo

K2K GPS Time Clock System Shift Manual

R. J. Wilkes, H. G. Berns, last update: 23 Sep. 2004

This manual will be updated (in)frequently as we acquire experience with the system. A hard copy should be posted next to the TrueTime GPS receiver in the North Hall Control Room.

QUICK REFERENCE


INTRODUCTION

HARDWARE

The GPS receivers are located in the North Hall Control room. Details of the hardware installation are given here.

There are two GPS receivers: TrueTime XL-DC (primary clock) and Motorola UT (backup clock, mounted as a daughtercard on a board in the VME crate).

Each receiver delivers two kinds of data: a character string with date and conventional time-of-day, and a 1-PPS (pulse-per-second) signal. The leading edges of the 1 PPS pulses are accurately synchronized with seconds rollovers in GPS time.

We determine event (spill trigger) times in 3 semi-independent ways, which are then compared as a data quality check.

  1. The TrueTime (primary) clock has a built-in event time output which delivers the spill trigger time with 30 nsec precision. The absolute accuracy for all GPS data is approximately 100 nsec.
  2. We independently determine the fractional-second part of the time using a 50 MHz counter (ie, clock with 20 nsec ticks) on the LTC (Local Time Clock) board in the VME crate. Spill triggers latch the TrueTime clock date/time data, and also latch the LTC count. 1-PPS triggers are separately latched and logged. The difference between a spill count and the most recent 1 PPS count gives fractional-second part of the trigger time in units of 20-nsec ticks. This is added to the date and time (to integer seconds) supplied by the clock to obtain the exact GPS time of the spill.
  3. The same procedure (with an independent counter, but using the same 50 MHz source oscillator) is applied to the Motorola (secondary) receiver 1-PPS signal.

A 120-second running average of LTC counts per second (defined by consecutive 1-PPS edges) is used to determine the oscillator frequency and hence the time scale. Numerous checks are imposed to correct for routine minor glitches.

If the sytem is operating properly, the TrueTime "event time" (supplied directly by the commercial module) should be within a few 20-nsec ticks of the "1-PPS" times delivered by the LTC board from the TrueTime and Motorola 1-PPS signals. Also, the two clocks' 1-PPS times should also be within a few ticks of one another. The online display window on nubl01 shows such a comparison.

Note: The 50 MHz LTC base frequency was improved in the summer 2003 with an external 10 MHz rubidium frequency standard and a 1:5 PLL frequency multiplier to provide a highly stable 50 MHz source to the LTC module with 10-11 stability.
The rubidium clock's output frequency is phase-locked to the 1PPS signal of the Motorola GPS and the resulting 50 MHz reference signal is therefore expected to stay stable at 50,000,000.00 Hz with a small error of only +/- 0.01 Hz or better.
The rubidium clock also provides its own 1PPS output, also phase-locked to the incoming 1PPS of the Motorola GPS, and with an accuracy of better than +/- 10 ns. This 1PPS signal is now used for computing the GPS2 (backup) time. The absolute error between GPS1 and GPS2 is now typically 20 ns rms and +/- 100 ns at about 99.99% of the time.

REALTIME SOFTWARE

The VME crate and TrueTime clock data are acquired by a process gpstrg running on nubl01. This process continually checks data quality, and also writes data to files for use by K2K run control, and for transmission to SuperK. See documentation by Hans Berns for a description of the algorithm. See below for how to restart the process if necessary.

Normally, gpstrg should be running at all times, and should not be terminated by killing its window or ctrl-c. If desired, data logging can be paused or the process can be stopped by creating flag files resident in nubl01:/home/online/flags/:

To perform any of these actions, open a kterm as user online, cd flags/, and "touch filename", with filename as above. These actions can be done remotely.

DATA STRUCTURES

Raw data structures (used in gpstrg) are described here.

NEVER edit or delete GPS code, data or log files!

Source code in /home/online/gps/, data files in /home/online/gpsdata, and logfiles in /home/online/log/ should never be altered by shift workers. All changes needed can be made remotely by experts. Tools will be provided to display performance data plots and histograms from log files.

See nubl01:/home/online/log/summary.current for a data quality summary (mainly for experts, will not be explained in detail here) since the last restart of gpstrg. An archive of all such summaries is in summaries.gpstrg.

The data used for the quality control histograms are stored in nubl01:/home/online/log/histograms/ltchist.yymmdd.

In addition, there are 3 log files created daily and updated event-by-event or 1PPS-by-1PPS if the debug.flag file exists in the flags directory. Plots and a summary of the data of the last 7 days can be viewed here:

  1. ~log/data/gpstrg.data.YYMMDD contains one line for each spill with CPU time, spill number, VMETRG 48-bit time, and the 3 final GPS times in UNIX format (TrueTime EventTime, TrueTime TRG-1PPS time, Motorola TRG-1PPS time).
  2. ~log/data/ttet.data.YYMMDD contains raw TrueTime EventTime as received via the serial port, with year value added.
  3. ~log/performance/ltcperf.YYMMDD contains one line for each GPS second rollover (1PPS) with CPU time, data quality flags, raw LTC times, momentary and averaged LTC frequency (only if the debug.log file exists).

SHIFT DUTIES

Daily (C shift) should check the histogram of GPS quality control data. Click here to view it. See below for explanation of quantities plotted. The histograms should all be narrower than about 100 nsec half-width at half max. Contact an expert if not. THAT'S ALL for routine duties.

The GPS system should not require routine attention. Periodically, you can check the grey GPS_TRIGGER window on nubl01. It should update with every spill:

############## event 00001 ######## TRG_time 1.680944620 ##############
TrueTime EventTime:  266-2004 21:07:06.739152225 = 1095887226.739152225
TrueTime TRG-1PPS: 09-22-2004 21:07:06.739152240 = 1095887226.739152240   -15ns
Motorola TRG-1PPS: 09-22-2004 21:07:06.739152222 = 1095887226.739152222     3ns   18ns
#@ LTC6 event 00001 TrueTime: 21:07:06.739152220 = 1095887226.739152220   -20ns
#@                  Motorola: 21:07:06.739152240 = 1095887226.739152240    18ns
#@                  Rubidium: 21:07:06.739152240 = 1095887226.739152240    15ns

############## event 00002 ######## TRG_time 3.680436320 ##############
TrueTime EventTime:  266-2004 21:07:08.738643946 = 1095887228.738643946
TrueTime TRG-1PPS: 09-22-2004 21:07:08.738643940 = 1095887228.738643940     6ns
Motorola TRG-1PPS: 09-22-2004 21:07:08.738643838 = 1095887228.738643838   108ns  102ns
#@ LTC6 event 00002 TrueTime: 21:07:08.738643920 = 1095887228.738643920   -20ns
#@                  Motorola: 21:07:08.738643860 = 1095887228.738643860    22ns
#@                  Rubidium: 21:07:08.738643940 = 1095887228.738643940    -6ns

############## event 00003 ######## TRG_time 5.679927280 ##############
TrueTime EventTime:  266-2004 21:07:10.738134874 = 1095887230.738134874
TrueTime TRG-1PPS: 09-22-2004 21:07:10.738134900 = 1095887230.738134900   -26ns
Motorola TRG-1PPS: 09-22-2004 21:07:10.738134819 = 1095887230.738134819    55ns   81ns
#@ LTC6 event 00003 TrueTime: 21:07:10.738134860 = 1095887230.738134860   -40ns
#@                  Motorola: 21:07:10.738134820 = 1095887230.738134820     1ns
#@                  Rubidium: 21:07:10.738134880 = 1095887230.738134880     6ns

example GPS_TRIGGER window on nubl01 display

The display gives 7 lines per spill event with the following information (as shown above)

Data quality parameters: In the shift plots we show these quantities, histogrammed for current and previous day (last 24 - 48 hours):

WATCH FOR PROBLEMS, such as:

Normally gpstrg should self-correct within 5 minutes. For example, gpstrg will automatically restart if nubl01 loses power or reboots for any reason. The GPS receivers should regain synchronization promptly within 1-5 minutes if there is no hardware problem. If we lose an antenna or one of the receivers fails, there is nothing the shift workers can do: CONTACT AN EXPERT.

Note that as long as either of the 2 clocks shows good data, we are OK, and it is not necessary to make an emergency call to experts, just send email. The software is designed to provide usable GPS times for K2K/Super-K event synchronization as long as one of the two receivers is delivering valid data, since both clock times are recorded at every spill.

If you need to phone the experts, please note time difference when calling: Seattle Time = Japan Time - 17 hours (16 hours in summer).

HOW TO RECOVER/RESTART AFTER POWER FAILURE

SPARES

A spare antenna is kept in the N-Hall control room cabinet (across from beam TV monitors). Replacement of GPS hardware should only be performed after contacting an expert.
NOTE: Tools and spare parts in this cabinet are the personal property of H. Berns and J. Wilkes. They may be borrowed in an emergency but must be promptly replaced.


EXPERTS

If alarms persist and the gpstrg display shows errors for >5 minutes, contact an expert:

nameemailphone(s)
Hans Berns berns@phys.washington.edu +1-206-685-4725 (UW office, Seattle)
+1-206-713-5919 (mobile, while in US)
0578-5-9616 (while at SuperK)
Rik Gran gran@phys.washington.edu +1-206-543-9584
Jeff Wilkes wilkes@phys.washington.edu +1-206-543-4232 (UW office, Seattle)
+1-206-282-5715 (home, Seattle)
UW group cell phone in Japan (if a UW member is at Super-K or KEK) 0901-636-4087


last updated Thu Sep 23 06:43:09 JST 2004