Application Note – 34
Phase Error Correction – Precision versus Speed
Overview
In our application note App_33 we described a special technique for making precision phase measurements based on a combination of coarse measurement by a simple clock method, and a fine phase measurement using a novel interpolator technique.
Of course, measuring phase difference is just the first step. The next, and possibly more important, step is to do something with the measurement information. There are a variety of things that might be required, but in this case we are considering what is probably the most popular, which is to adjust the phase error measured to a value of “zero” between a reference (REF) and the unit under test (UUT).
This paper describes a novel technique for rapidly eliminating very large phase offsets (up to 0.5 seconds) between two 1 pulse per second pulses. Achieved without a sudden step change (that can be very unwelcome in a number of applications) while retaining the ability to tune the phase with high precision (resolution of 0.006 pico seconds) once the large error is eliminated.
Operation
Typically the UUT pulse is derived from a divided down RF signal. In this case we start with a 10MHz RF sine wave emanating from a precision voltage controlled ovenized oscillator usually referred to as OVCXO or OCXO. The frequency of the oscillator is determined by two mechanisms, a coarse mechanical (potentiometer) adjustment, and a very fine electrical control voltage adjustment.
The position of the UUT pulse relative to the REF on successive pulse comparisons/measurements is determined by the exact frequency of the OCXO.
If the frequency of the OCXO increases, the UUT pulse advances relative to the REF pulse, and in fact advances by the same amount for each successive pulse, gradually increasing (or decreasing) the phase difference between REF and UUT pulses. Conversely, if the frequency of the OCXO decreases, the UUT pulse retards relative to the REF pulse, and retards by the same amount for each successive pulse, again gradually increasing (or decreasing) the phase difference in the opposite direction between REF and UUT pulses.
In order to achieve a very fine control, the total range of frequency adjustment by the control voltage applied to the OCXO is typically around 1E-7. On a 10MHz oscillator, this represents a maximum total frequency change of only 1Hz.
An approximation of the relationship between frequency change and phase (time) error rate of change can be described by the equation:
df/F = dt / T
where df/F is the fractional frequency (1E-7 max.) and dt/T is the rate of time change per interval T.
The implementation described here is by means of a microprocessor driving a 24 bit digital to analog convertor (DAC). This yields a potential resolution (one bit change) on the OCXO control voltage adjustment of 1Hz (total range) divided by 2^24 i.e.
resolution = 1E-7 / 16777216 = 5.96E-15 Hz
Therefore the minimum control voltage change results in a frequency offset change of df / F = 5.96E-15
For a 1 second interval (T=1), dt / 1 = 5.96E-15 or dt = 1 x 5.96E-15
One nano second is 1E-9 seconds, and one pico second is 1E-12 seconds, therefore this resolution equates to a minimum time domain adjustment (phase change) of approximately 0.00596 pico seconds per second.
At the other end of the scale, the maximum frequency offset is 1E-7,
df / F = 1E-7
Therefore the maximum change dt, per second (i.e. where T=1), is :
dt / 1 = 1E-7 or dt = 1 x 1E-7 seconds which equates to 0.1 micro seconds per second
Practical Application
This technique provides the potential for excellent control in a situation where the REF and UUT pulses are close to their target of zero phase error.
In order to achieve a reasonable starting point, there is usually an initialization phase that “jam synchs” the two pulses (REF and UUT) in order to start at a reasonably low (<1 microsecond) phase error.
In practice however, there are situations where it may be necessary to transition from a large error (up to 0.5 seconds) to zero error, without a large step change. The reason for this is that the pulse signal is often used for synchronizing other instruments and if there is a sudden step change (i.e. “jam synch”) in the signal, the other instrumentation can become unlocked (unsynchronized).
This requirement presents somewhat of a quandary due to the fact that, as demonstrated above, the maximum rate of change on the phase error is limited to 0.1 micro seconds per second.
In one day there are 24 x 60 x 60 seconds = 86,400 seconds so the maximum phase change attainable per day by the described method is:
1E-7 x 86,400 = 0.00864 seconds, or 8.6 milli seconds per day.
The maximum starting error could be +/- 0.5 seconds, or restated +/- 500 milliseconds. At a rate of change of 8.6 milli seconds per day, the time to reduce the error to zero could be 500 / 8.6 = 58 days !
Clearly, in most situations, this is unacceptable and therefore, to overcome this, a novel way of smoothly reducing the phase error much more rapidly has been implemented. The technique relies on manipulating the way that the UUT pulse is developed.
Normally the one second pulse is generated by dividing down the 10MHz RF signal by 107 in a 24 bit divisor. At a frequency of 10MHz, each complete cycle represents a time period of 100 nano seconds.
In normal operation, the RF frequency of exactly 10MHz (10E7) is divided by 10,000,000 (10E7) resulting in exactly a 1 second pulse.
If we instead divide the 10MHz signal by a value of 10,000,001, the next pulse occurs 100 nano seconds later, or 1 second plus 100 nano seconds. Conversely, if we divide the 10MHz signal by 9,999,999, the next pulse occurs 100 nano seconds earlier, or 1 second minus 100 nano seconds. Similarly, if we were to divide the 10MHz by 5E6 (5 million) instead of 1E7 (10 million), a factor of 2 difference, we would advance the next pulse by 5E6 x 100 nano seconds which is :
5E6 *100E-9 = 500E-3 or 0.5 seconds
The result is that if we manipulate the divisor, we can effectively manipulate the pulse period in increments down to 100 nano seconds or, if we so desired, to a maximum change up to 0.5 seconds in 1 second.
The equation that describes the relationship between the divider value and desired slew rate is:
n10 = ( 107 x T ) / ( T +/- dT )
where: T = time period over which to slew (seconds)
n10 = counter divisor (base 10)
dT = total time (phase) change (in seconds) over slew time T
as an example, if we wish to advance the phase by 1 milli second over a period of 100 seconds,
n = 107 x 100 / 100 + 0.001 where 0.001 is 1 milli second represented in seconds
i.e. n = 10,000,100
Conversely, if we wish to retard the pulse:
n = 107 x 100 / 100 – 0.001
i.e. n = 9999900 (rounded to nearest integer)
Using this technique, the phase error is reduced to a value that is within the reasonable capture range of the analog control loop over an acceptable period.
For the purposes of the ptf precision frequency references, the slew rates is varied dependent upon the size of the error. In this way, large errors are quickly eliminated, while as the error homes in towards zero, the slew rate reduces allowing the control loop to settle and transition to the high resolution adjustment without introducing unwanted perturbations into the control loop.
In addition, the control loop itself adapts according to the size of the phase error, providing faster control at large errors and backing off through a medium response control to finally a very slow control loop, maximizing the benefits attainable from the very high quality internal oscillator.
Summary
Like many novel ideas, the simplicity of this technique belies its effectiveness. With hindsight it seems like an obvious solution, however the engineering mind is trained to know that to generate a one second pulse from a reference frequency (in this case 10MHz) it must be divided by the frequency itself, and the concept of an “incorrect” divisor is not necessarily so obvious. In this case however, the technique provides an ideal solution that reduces the phase lock capture time from something that would be intolerable to a very acceptable time period.