The primary motivation for the program is as an example and case study of optimum receiver design using a maximum likelihood approach and matched filter, synchronous detection and soft decision principles. The clock discipline is modelled as a Markov process, with probabilistic state transitions corresponding to a conventional time-of-century clock and the probabilities of received decimal digits. The result is a performance level which results in very high accuracy and reliability, even under conditions when the one-minute beep of the signal, normally its most prominent feature, cannot be detected by ear with the shortwave receiver.
The WWV signal format is described in NIST Special Publication 432 (Revised 1990). It consists of three elements, a 5-ms, 1000-Hz pulse, which occurs at the beginning of each second, a 800-ms, 1000-Hz pulse, which occurs at the beginning of each minute, and a pulse-width modulated 100-Hz subcarrier for the data bits, one bit per second. The WWVH format is identical, except that the 1000-Hz pulses are sent at 1200 Hz. Each minute encodes nine BCD digits for the time of century plus seven bits for the daylight savings time (DST) indicator, leap warning indicator and decisecond-UTC (DUT) correction.
The phase of the 100-Hz subcarrier relative to the 1-s sync pulse is fixed at the transmitter; however, the audio highpass filter in most radios affects the phase response at 100 Hz in unpredictable ways. The program adjusts for each radio using two 170-ms coherent matched filters. The I (in-phase) filter is used to demodulate the subcarrier envelope, while the Q (quadrature-phase) filter is used in a tracking loop to discipline the demodulator phase.
The data bit probabilities are determined from the subcarrier envelope using a threshold-corrected slicer. The envelope amplitude 30 ms from the beginning of the second establishes the minimum (noise floor) value, while the amplitude 200 ms from the beginning establishes the maximum (signal peak) value. The slice level is midway between these two values. The negative-going envelope transition at the slice level establishes the length of the data pulse, which in turn establishes probability estimates for each of three signals, binary zero (P0), binary one (P1) and a position identifier (P2). The probability values are established by linear interpolation between the pulse lengths for P0 (300 ms), P1 (500 ms) and P2 (800 ms) so that the sum of all three values is equal to one. If the program has not synchronized to the transmitter signal, or if the data bit amplitude, signal/noise ratio (SNR) or length are less than prespecified thresholds, the data bit is considered invalid and all three probabilities are set to zero.
The difference between the P1 and P0 probabilities for each data bit is exponentially averaged in a set of 60 accumulators, one for each second, to determine the semi-static timecode data, such as DST indicator, leap second warning and DUT correction. In this design, an average value larger than a positive threshold is interpreted as one and a value smaller than a negative threshold as zero. Values between the two thresholds, which can occur due to signal fades or loss of signal, are interpreted as "don't care," and result in no change of indication.
The BCD digit in each digit position of the timecode is represented as four data bits, all of which must be valid for the digit itself to be considered valid. If so, the bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If the digit is invalid, the correlated value for all digits in this position is assumed zero. In either case, the values for all digits are exponentially averaged in a likelihood vector associated with this position. The digit associated with the maximum over all of the averaged values then becomes the maximum likelihood selection for this position.
The decoding matrix contains nine row vectors, one for each timecode digit position. Each row vector includes the likelihood vector that determines the maximum likelihood decimal digit for that digit position, along with other related data. The maximum likelihood digit for each of the nine digit positions becomes the maximum likelihood time of the century. A built-in transition function implements a conventional clock with decimal digits that count the minutes, hours, days and years, as corrected for leap seconds and leap years. The counting operation also rotates the likelihood vector corresponding to each decimal digit as it advances. Thus, once the seconds and minutes have been synchronized, the maximum likelihood time in any minute should correspond to the BCD timecode transmitted in that minute.
Each row of the decoding matrix includes the likelihood vector, clock digit, a compare counter and the difference (mod 10) between the current clock digit and most recently determined maximum likelihood digit. If a digit probability exceeds the decision level and the difference is constant for a number of successive minutes in any row, the maximum likelihood digit replaces the clock digit in that row. When the differences are zero for all rows, the clock is synchronized and delivers correct time to the integral second. The millisecond within the second is derived from the A/D sample clock, which runs at 8000 Hz and drives all system timing functions.
The A/D sample clock is derived from the DSP-93 CPU clock and a system of hardware counters. Its frequency is disciplined by a frequency-lock loop (FLL) which operates independently of the data recovery functions. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the most recent and the current epoch divided by the interval. The sample clock frequency is then corrected by this amount using an exponential average. When first started, the frequency averaging interval is eight seconds, in order to compensate for DSP-93 CPU clock frequency offsets up to 62 PPM. Under most conditions, the averaging interval doubles in stages from eight seconds to over 1000 seconds, which results in an ultimate frequency precision of 0.125 PPM, or about 11 ms/day. This is consistent with the stability of a TCXO clock oscillator and somewhat better than the uncompensated oscillator used in the DSP-93.
The expected accuracy over a typical day has been determined using an oscilloscope and cesium oscillator calibrated with a GPS timing receiver. With marginal signals and allowing 15 minutes for initial synchronization and frequency compensation, the time accuracy determined from the WWV/H 1-s sync pulse is reliably within 125 us. In the particular DSP-93 used for program development, the uncorrected CPU clock frequency offset is 45.8+-0.1 PPM. Over the first hour after initial synchronization, the clock frequency drifts about 1 PPM as the frequency averaging interval increases to the maximum 1024 s. Once reaching the maximum, the frequency wanders over the day up to 1 PPM, but it is not clear whether this is due to the stability of the DSP-93 clock oscillator or the changing height of the ionosphere. Once the frequency has stabilized and after loss of the WWV/H signal, the frequency drift is less than 0.5 PPM, which is equivalent to 1.8 ms/h or 43 ms/d. This can result in a step phase correction up to several milliseconds when the signal returns.
The measured propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, is 23.5+-0.1 ms. This is measured to the peak of the pulse after the 1-s sync comb filter and includes components due to the ionospheric propagation delay, communications receiver delay and DSP-93 delay. The propagation delay can be expected to change about 0.2 ms over the day, as the result of changing F-layer height. The measured DSP-93 delay is 5.5 ms, most of which is due to the 400-Hz bandpass filter and 5-ms matched filter.
The program then begins accumulating likelihood values for each of the nine digits of the clock, plus the seven miscellaneous bits included in the WWV/H transmission format. LED6 flashes when the likelihood value is below the decision threshold for a digit or miscellaneous bit. LED7 flashes when the current clock digit disagrees with the maximum likelihood digit. The minute units digit is decoded first and, when several repetitions have compared correctly, the remaining eight digits are decoded. When several repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals and up to an hour when buried in noise, the clock is set within 125 us and can be read within 500 μs with the ASCII timecode formats described later.
At the same time, the clock discipline algorithm refines the frequency offset correction for use during times when the WWV/H signal is unavailable. The algorithm refines the offset using increasingly longer averaging intervals to 1024 s, where the precision is about 0.1 PPM. With good signals, it takes well over two hours to reach this degree of precision; however, it can take many more hours than this in case of marginal signals.
To work well, this program needs a communications receiver with good audio response at 100 Hz. Most shortwave and communications receivers roll off the audio response below 250 Hz, so this can be a problem, especially with receivers using DSP technology, since DSP filters can have very fast rolloff outside the passband. Some DSP transceivers, in particular the ICOM 775, have a programmable low frequency cutoff which can be set as low as 80 Hz. However, this particular radio has a strong low frequency buzz at about 10 Hz which appears in the audio output and can affect data recovery under marginal conditions. Although not tested, it would seem very likely that a cheap shortwave receiver could function just as well as an expensive communications receiver.
The on-time reference is the start bit of the first (CR) character. The sync indicator s is '?' until the clock is set by valid received data and SP after that. The quality character q is always SP in this format.
The leap second warning l is L if a leap second is expected at the end of the month and SP if not. By international agreement, the leap second is inserted in the last second of the last day of June or December and is numbered second 60 of that minute. The WWV/H timecode progression just before, during and after the leap on 30 June 1997 is shown below, where the first column is the year, followed by the day, time, leap second warning, DST state and DUT correction (see U command):
97 181 23:59:59 LD -5
97 181 23:59:60 LD -5
97 182 00:00:00 D +5
Note the seconds progression includes second 60 of the last minute and the day number advances at the next second. Also, the leap warning disappears and the DUT correction -5 changes to +5 at that time; however, in actual use these changes are delayed a few minutes as the result of the integration functions.
The DST state is determined from the DST1 and DST2 bits of the WWV/H timecode. The DST1 bit is set to one at 0h UTC on the day of transition to daylight time and thereafter. The bit is set to zero at 0h UTC on the day of transition to standard time and thereafter. The DST2 bit bit follows the state of the DST1 bit, but delayed 24 hours later. The values are decoded as follows: S standard time D daylight time I between 0h on the day to daylight time until 0h the next day O between 0h on the day to standard time until 0h the next day.
where the elements of the timecode are as described for the T command, with the addition of the following:
q quality character
a station select C (WWV) or H (WWVH)
dut DUT sign and magnitude in deciseconds (tenths of a second)
bbbbb count of invalid data bits during the current minute
fffff frequency offset in units of about 1.9 ns/s
ggggg frequency averaging interval in seconds
uuuuu interval since last clock update in minutes
The on-time reference is the start bit of the first (s) character. The quality character q encodes four bits of status formatted in hex. Reading from high to low order, the bits are:
0 low 1-s or 1-m sync pulse amplitude
1 too many invalid data bit errors
2 low decoded digit probability
3 timecode digit decoding error
The DUT sign and magnitude encode the UT1 time correction in deciseconds. The UT1 correction is used by astronomers and navigators to establish a precise star transit time.
c clock digit
m maximum likelihood digit
d difference (mod 10) between clock and maximum likelihood digits
n compare counter (max 3)
q quality character
sssss 1-s sync epoch
aaaaa 1-s sync amplitude (threshold 1500)
mmmmm 1-m sync amplitude (threshold 500)
ddddd 100-Hz subcarrier amplitude (threshold 1000)
nnnnn 100-Hz subcarrier SNR (dB times 10 - threshold 100)
eeeee digit correlator amplitude (threshold 1000)
qqqqq digit correlator SNR (dB times 10 - threshold 30)
aaaaa 1-s sync amplitude
eeeee median filter epoch of 1-s sync
ppppp median filter time offset
fffff time offset since last frequency update
ccccc compare counter (max 10)
jjjjj jitter counter (max equal to averaging cycle)
vvvvv averaging cycle counter
aaaaa Second number in the minute
eeeee data bit envelope amplitude
ppppp data bit envelope SNR (dB times 10)
fffff raw data bit pulse length (relative)
ccccc integrated data bit pulse length (relative)
ddddd DST1 integrator value
eeeee DST2 integrator value
fffff leap warning integrator value
ggggg DUT+- integrator value
hhhhh DUT1 integrator value
iiiii DUT2 integrator value
jjjjj DUT4 integrator value
A speaker can be connected to the DSP-93 output to monitor the operation of the program. The O1 signal is useful for general watchkeeping. The O2 signal is probably the best indication that the WWV/H signal is present. If a faint tick can be heard, the program can probably synchronize to the signal. Normally, at the decision threshold where the tick can barely be heard, the WWV/H signal cannot be heard in the unprocessed receiver output, although a faint beep may be heard marking the first second of the minute. The O3 signal is a good indication of the subcarrier SNR; however, there can be a huge degree of integration in this signal and it may take many minutes to stabilize. The O4 signal is best viewed with an oscilloscope, where the waveform should appear as a trapezoid rising at the second and decaying either 200, 500 or 800 ms later. When viewed on an oscilloscope with a calibrated sweep delay and triggered by a PPS signal from a source calibrated to UTC, the O5 signal becomes a precision proof-of-performance indicator.
There is a necessary design compromise between weak-signal sensitivity and DSP-93 CPU oscillator frequency tolerance. When first started, the program must discipline the sample clock to within 12.5 PPM, in order to reliably identify the 1-s sync signal epoch. At the smallest averaging interval (8 s) and largest jitter threshold (500 us) which can reliably extract the epoch, the tolerance must be less than 62.5 PPM. As the frequency offset of the DSP-93 used for program development is over 45 PPM, this could be a problem in some units. While not tested, the program should cope with tolerances greater than 62.5 PPM, but it will take significantly longer to synchronize.
Following is a list of shortcomings and proposed enhancements, which may be fixed/implemented in future: