Synchronization circuit using a high speed digital slip counter

Abstract: Simplified measurement equipment (100) is described in which any two frequency sources can be accurately and quantitatively compared to each other. With this simplified measurement equipment, calibration can be performed on an oscillator (102,103) using an external reference signal (119), while the oscillator is being used in an active system. By simplifying the measurement equipment, the equipment can be built into a time base unit allowing recalibration to be performed at relatively short time intervals. A frequency difference detector (100) based on ring counters (108,109) and an existing controller (101) in a telecommunication switching system compare an accurate external reference (119) against an oscillator (102,103) of the time base unit for calibration in the field. Within the telecommunication switching system, a highly accurate external reference signal (119) is normally available from an interconnected telecommunication network. The use of ring counters (108,109) in the frequency difference detector (100) allows for simple measurement equipment which adds little to the cost of the time base unit. Further, since measurement equipment is all digital, no tuning of the equipment is necessary as is required of measurement equipment having analog components.

Description: This invention relates to apparatus and methods for detecting a difference in frequency between an oscillator signal and a reference signal. In precision synchronization systems, a local time base reference of great accuracy and stability is required to generate and measure clock signals in a system within a certain accuracy. These time bases have normally crystal frequency sources; the characteristics of such devices are well known. In addition to variations in output frequency resulting from temperature and supply voltage changes, these devices have an aging characteristic which implies that, over a long period of time, the output frequency will depart from the desired, nominal value. In order to maintain accuracies required in many telecommunication systems, either expensive oscillators must be used to overcome the aging effect or periodic calibration of the oscillators is required. Calibration is often done manually; time base units are sent in to a calibration facility for extremely precise applications or can be field adjusted for less critical applications. In either case, the reference frequency source used for calibration must be more accurate than the time base unit to be calibrated. By measuring the adjustable time base with respect to the reference, the correction information can be obtained for adjusting the oscillator of the time base unit. The measurement equipment is extremely complicated and expensive, since it is designed to perform over a large range of frequencies. Additionally, the calibration procedure is expensive and usually requires the unit to be taken out of service. GB-A-2 122 822 discloses a first counter counting at the frequency of a signal from an oscillator, and a second counter counting at the frequency of a reference signal. It also discloses a method for starting the first and second counters and for generating a signal upon the difference between the frequency of the reference signal and the oscillator signal differing by a predetermined amount. Research Disclosure, No. 344, December 1992, Havant, GB, "Automatic Detection of Oscillator Frequency Drift", page 964 discloses a method for detecting a frequency drift between two oscillators. The method uses two free-running gray-code counters each clocked by a different oscillator. With the initial state of one counter being zero and the initial state of the other counter being one-half of the maximum value of the counter, the frequency drift is detected whenever the values of the two counters become equal to each other According to one aspect of this invention there is provided an apparatus as claimed in claim 1. According to another aspect of this invention there is provided a method as claimed in claim 6. This invention is directed to simplifying measurement equipment so that any two frequency sources can be accurately and quantitatively compared to each other. With this simplified measurement equipment, calibration can be performed on an oscillator using an external reference signal, while the oscillator is being used in an active system. By simplifying the measurement equipment, the equipment can be built into a time base unit allowing recalibration to be performed at relatively short time intervals. The invention uses a frequency difference detector based on ring counters and an existing controller in a telecommunication switching system to compare an accurate external reference against an oscillator of the time base unit for calibration in the field. Within the telecommunication switching system, a highly accurate external reference signal is normally available from an interconnected telecommunication network. The use of ring counters in the frequency difference detector allows for simple measurement equipment which adds little to the cost of the time base unit. Further, since measurement equipment is all digital, no tuning of the equipment is necessary as is required of measurement equipment having analog components. Advantageously, since the measurement equipment is an integral part of the time base unit, small corrections are made over an extended period of time which allows for the calibration of an active time base unit without affecting service. Brief Description of the Drawing FIG. 1 illustrates a system for calibrating an oscillator from an external reference signal; FIG. 2 illustrates the states that a ring counter of FIG. 1 goes through; and FIG. 3 illustrates, in flow chart form, the program executed by the controller of FIG. 1. Detailed Description FIG. 1 illustrates apparatus for determining the difference between a local time base unit (local oscillator 103 and oscillator adjuster 102) and reference signal 119 being received on conductor 131. Controller 101 supplies overall control for this apparatus. In addition, controller 101 adjusts the frequency of local oscillator 103 via oscillator adjuster 102. Reference signal 119 is illustratively a 64 kHz signal. Local oscillator 103 runs at a nominal value of 5 MHz which is reduced down by divider 104 to a nominal 64 kHz signal on conductor 142. Reference signal 119 is a highly stable accurate external frequency which in telecommunication would be received from the telecommunication network. Ring counters 108 and 109, AND gates 112-115 and flip-flop 117 detect when the relative time interval error (RTIE) between local oscillator 103 and reference signal 119 has exceeded specified number of clock pulses of reference signal 119. Binary counters 106 and 107 are utilized to determine whether the frequency of local oscillator 103 is greater or less than reference signal 119. Ring counters 108 and 109 are utilized to detect the RTIE between reference signal 119 and the output signal of divider 104 because only one flip-flop of a ring counter changes state for each clock signal as illustrated in FIG. 2. This avoids the problem of race conditions which would be caused by multiple flip-flops simultaneously changing states such as in a binary counter. Race conditions cause momentary "1's" and "0's" to appear on the inputs of AND gates 112-115. This is important, since ring counter 108 is clocked by the output signal from divider 104 and ring counter 109 is clocked by reference signal 119. These two clock signals are not in correlated with each other; hence, potential race conditions would exist if the states of binary counter were compared by AND gates 112-115. At the beginning of the synchronization process, controller 101 is transmitting a "1" to the D input of flip-flop 111 via conductor 138 as a result of the last recalibration operation. This "1" is continuously clocked into flip-flop 111 by reference signal 119 resulting in flip-flop 111 being set. When flip-flop 111 is set, a "0" is transmitted on conductor 133. This "0" resets binary counters 106 and 107, divider 104, flip-flop 117, and ring counter 109 and sets ring counter 108. At this point in time, the state of ring counter 109 is shown in line 201 (000) of FIG. 2, and the state of ring counter 108 is shown in line 202 (111) of FIG. 2. To start the synchronization process, controller 101 supplies a "0" on conductor 138 which resets flip-flop 111. In the reset state, flip-flop 111 transmits a "1" on conductor 133. The "1" on conductor 133 removes the reset input to ring counter 109, flip-flop 117, binary counter 107, binary counter 106, and divider 104, and the set input to ring counter 108. With flip-flop 117 in the reset state, the clock enable inputs of binary counter 106 and binary counter 107 are enabled. All counters commence counting in response to their clock input signals. Counters 106-109 count at a nominal frequency of 64 kHz. Binary counter 106 and ring counter 108 are clocked by the signal from divider 104 received via conductor 142, and binary counter 107 and ring counter 109 are clocked by reference signal 119 received via conductor 131. AND gates 112, 113, and 114 compare the stages of ring counters 108 and 109. An AND gate outputs a "1", if both of its corresponding stages in ring counters 108 and 109 are at a "1" state. After some period of time, if a frequency difference exists between oscillator 103 and reference signal 119, ring counter 108 and ring counter 109 will be simultaneously in the "1" state in all stages together. When this occurs, AND gates 112-114 transmit "1s" to AND gate 115 which transmits a "1" via conductor 139 to flip-flop 117. The "1" on conductor 139 is synchronously clocked into flip-flop 117 and sets that flip-flop on the inverted state of reference signal 119 on conductor 131. In the set state, flip-flop 117 transmits a "1" on conductor 132. A "1" on conductor 132, inhibits the counting by binary counters 106 and 107 which saves their contents for later reading by controller 101. Since flip-flop 117 is clocked by inverter 118 inverting reference signal 119, ring counter 108 and ring counter 109 will be simultaneously in the "111" state after a difference of 2.5 clock pulses of reference signal 119 have occurred if the frequency of reference signal 119 is greater than oscillator 103 and after a difference of 3.5 pulses of reference signal 119 have occurred if the frequency of reference signal 119 is less than oscillator 103. Controller 101 uses the contents of binary counter 106 and binary counter 107 to determine the time interval to be used for calculating the adjustment to oscillator 103. Controller 101 is responsive to a "1" received from flip-flop 117 via conductor 132 to determine the time that has lapsed between the starting of the ring counters and the presence of a "1" on conductor 132. This time defines the difference in frequency between local oscillator 103 and reference signal 119. Controller 101 calculates this time interval utilizing oscillator 105 as its time base. Whereas, oscillator 105 is not as accurate as local oscillator 103, the time interval between the starting of the ring counters and the presence of "1" on conductor 132 is illustratively many hundreds of seconds; hence, the accuracy of oscillator 105 does not have to approach that of local oscillator 103. Controller 101 determines an adjustment to be made to the frequency of local oscillator 103 and then makes that adjustment using oscillator adjuster 102. This adjustment causes local oscillator 103 to more closely approach the frequency of reference signal 119. Once again, controller 101 actuates the counting by ring counters 108 and 109. The resulting time interval before the ring counters have a RTIE equal to the specified clock times should be larger the second time. This clearly shows that oscillator 105 does not have to approach the accuracy of local oscillator 103 in order to be able to adjust local oscillator 103 to approach the frequency of reference signal 119. If reference signal 119 becomes unstable, this condition is detected by detector 110 which signals this fact to controller 101. In addition, the output of detector 110 causes monostable 120 to transmit a pulse to the set input of flip-flop 117 setting flip-flop 117. As previously described, controller 101 responds to the setting of flip-flop 117; however as is detailed in FIG. 3, controller 101 determines by reading detector 110 that an error has occurred. FIG. 3 illustrates, in flowchart form, the functions performed by controller 101. Decision block 301 determines, when sufficient time has elapsed since the last calibration procedure. If sufficient time has elapsed control is transferred to decision block 303. The latter block checks detector 110 to establish that reference signal 119 is present. If reference signal 119 is not present, control is transferred to block 302 which times for a first predefined time interval before transferring control back to decision block 303. If the reference signal 119 is present, control is transferred to block 304 which sets flip-flop 111. The setting of flip-flop 111 actuates counters 106 through 109. Control is then transferred to block 305 which starts an internal software timer in controller 101. Block 305 then transfers control to decision block 306. Decision blocks 306 and 312 determine when sufficient time has elapsed for the output of divider 104 and reference signal 119 to become 3 clock pulses out of synchronization. Decision block 312 is used to assure that controller 101 does not wait more than a second predefined interval of time for flip-flop 117 to be set. If this second predefined interval of time is exceeded, then oscillator 103 meets the specifications with respect to reference signal 119 and control is transferred to block 313. The latter block stores the value used to adjust adjuster 102 and transfers control back to block 301. Once flip-flop 117 is set, block 310 checks to assure that the reference signal 119 has been stable during the recalibration procedure. If reference signal 119 has been stable, control is transferred to block 307 which calculates the frequency change for oscillator 103. The calculated change is checked by decision block 308 to make sure that it is reasonable. If the calculated change is not reasonable, control is transferred to block 309 for error recovery. If the calculated change is reasonable, block 311 updates oscillator adjuster 102 and returns control to decision block 301. If reference signal 119 was not stable, control is transferred to block 309 for error recovery.

Claims: Apparatus for detecting a difference in frequency between an oscillator signal and a reference signal (119), comprising: a first counter (108) for counting at the frequency of the oscillator signal; a second counter (109) for counting at the frequency of the reference signal (119); controlling means (101,111) for controlling a starting of said first and second counters; and generating means (112-115, 117) for generating a signal when the number of periods of the oscillator signal counted by said first counter (108) differs from the number of periods of the reference signal (131) counted by said second counter (109) by a predetermined amount; CHARACTERISED IN THAT said first and second counters (108,109) are ring counters; and said controlling means (101, 111) is responsive to said signal from the generating means (112-115, 117) for calculating the difference in frequency between the oscillator signal and the reference signal. Apparatus as claimed in claim 1 wherein the controlling means (101, 111) comprises means for processing under control of a stored program; and means for timing; the processing means being for starting the timing means when starting the first and second counters (108, 109) and responsive to the signal from the generating means for reading the timing means to calculate the difference in frequency. Apparatus as claimed in claim 2 wherein the processing means is adapted to calculate a correction signal for the oscillator to reduce the difference in frequency between the oscillator signal and the reference signal. Apparatus as claimed in claim 3 comprising means for determining the stability of the reference signal, the processing means being responsive to the determined stability for reading the timing means to calculate the difference in frequency. Apparatus as claimed in claim 4 comprising a third counter (106) clocked at the frequency of the oscillator signal, and a fourth counter (107) clocked at the frequency of reference signal; the processing means being adapted to calculate the difference in frequency between the oscillator signal and the reference signal by reading the contents of the third and fourth counters. A method for detecting a difference in frequency between an oscillator signal and a reference signal (119), the method comprising the steps of: controlling by controlling means (101, 111) a starting of a first counter (108) for counting at the frequency of the oscillator signal and of a second counter (109) for counting at the frequency of the reference signal (119); and generating a signal when the number of periods of the oscillator signal counted by the first counter (108) differs from the number of periods of the reference signal (119) counted by the second counter (109) by a predetermined amount; the method being CHARACTERISED IN THAT said first and second counters (108, 109) are ring counters; and in that it comprises the step of calculating the difference in frequency between the oscillator signal and the reference signal (119) by the controlling means (101, 111) in response to the signal generated at the generating step. A method as claimed in claim 6 wherein the controlling step comprises the steps of processing under control of a stored program; and timing; the processing step starting the timing step when starting the ring counters (108, 109), and being responsive to the signal from the generating step for reading results of the timing step to calculate the difference in frequency. A method as claimed in claim 7 wherein the processing step is adapted to calculate a correction signal for the oscillator to reduce the difference in frequency between the oscillator signal and the reference signal. A method as claimed in claim 8 comprising the step of determining the stability of the reference signal, the processing step being responsive to the determined stability for reading the results of the timing step to calculate the difference in frequency. A method as claimed in claim 9 comprising the steps of counting with a third counter (106) clocked at the frequency of the oscillator signal, and counting with a fourth counter (107) clocked at the frequency of reference signal, the processing step being adapted to calculate the difference in frequency between the oscillator signal and the reference signal by reading the contents of the third and fourth counters.

Inventors: BORTOLINI JAMES ROBERT, BORTOLINI, JAMES ROBERT
Applicants: AT & T CORP, AT&T CORP.
Application year: 1994
Main classification: H03D13
IPC codes: G06F1, H03D13, G01R23, H04Q11, H03L7, H04L7