1. Field of the Invention
The present invention relates to communication networks and, more particularly, to a method and apparatus for synchronizing clock timing between network elements.
2. Description of the Related Art
Data communication networks may include various computers, servers, nodes, routers, switches, hubs, proxies, and other devices coupled to and configured to pass data to one another. These devices will be referred to herein as “network elements.” Data is communicated through the data communication network by passing data over an established circuit or by packetizing the data and routing the data packets between a series of network elements over the network.
There are two basic types of networks—Time Division Multiplexed (TDM) networks and packet networks. These two networks differ in how signals are separated on the physical medium. In a TDM network, the network elements rely on time to determine which signals belong to which connection, whereas in a packet network the packets are individually addressed in a manner that is able to be understood by the network elements. Since TDM networks rely on time to divide signals between multiple logical channels, timing requirements of TDM networks are relatively stringent. In a packet network, by contrast, timing is less important since each packet of data is self-contained and is able to specify to the network its size and other associated parameters. Since timing is not as important on a packet network, the network elements on a packet network are generally not synchronized. Hence, packet networks are generally implemented as asynchronous networks.
TDM networks are synchronous in nature. Consequently, the equipment connected to a TDM network has to be synchronized to it in some manner. In a TDM network, a timing distribution network typically will link the TDM nodes to provide a synchronization signal that is traceable to a Primary Reference Source (PRS). Networking synchronization is derived from the PRS and distributed through a hierarchy of network nodes with lesser stratum clocks. An alternative timing solution is to maintain a distributed PRS architecture, where for example, each TDM node is timed from an accurate timing source, such as a PRS/Stratum 1 clock, Global Positioning System (GPS) based clock, or a standalone accurate clock (e.g., H Maser, Cesium, Rubidium, etc.). The particular timing requirements on a service interface depend on the services (T1, E1, T3, E3, etc.) carried over the network, which are typically specified in a standard promulgated for that particular service type.
Timing signals in a synchronous network are used by the physical interfaces of the network elements to put data on the transmission media, and to extract data from the media. In other words, clocking at the physical interface of a network element controls the speed at which data is transmitted on the physical connection. Typically, to accommodate minor transmission jitter, a de-jittering or elastic buffer is implemented at the receiver. The arrival rate and the departure rate from the buffer are controlled, respectively, by the transmitter clock and the receiver clock. If the physical interfaces on a connection are not synchronized (not driven by a clocking signal of identical frequency), data can be lost due to buffer overflow or underflow, resulting in periodic line errors.
As packet technology has increased in reliability and sophistication, the cost of deploying packet-based networks such as Ethernet networks and Internet Protocol (IP) networks has dropped to the point where it is often cheaper to deploy a packet network than to deploy a TDM network. To take advantage of the lower costs of packet network technology, service providers have sought to implement a packet-based core network intermediate existing TDM networks. To allow a packet network to carry TDM traffic, the packet network must essentially behave as a transparent “link” in the end-to-end connection. The transparent inclusion of a packet network in an end-to-end path of a connection that carries circuit-switched time sensitive traffic is commonly referred to as “circuit emulation” on the packet network.
The non-synchronous nature of the packet network and the packetizing and depacketizing processes used to format the data for transmission over the packet network all contribute to increased jitter and delay in the transmission of traffic, which makes synchronization of the different TDM networks and network elements on these TDM networks difficult. Additionally, while packet networks are able to carry traffic between the end TDM networks, they do not naturally carry clock information due to their asynchronous nature. Thus, to enable TDM traffic to be carried over a packet network, it is necessary to have the end systems directly exchange clock information to allow the data ports on the network elements to be synchronized and to allow the different networks to be synchronized.
To overcome the inherent non-synchronous nature of a packet network, a network element or a downstream terminal mode may use an adaptive timing technique to reconstruct the timing signal of the upstream TDM terminal. In an adaptive clocking technique, the TDM receiver derives an estimate of the transmitter clock from the received data stream. This is commonly done using a phase-locked loop (PLL) that slaves the receiver clock to a transmitter clock. The slave PLL is able to process transmitted clock samples encoded within the data stream, or process data arrival patterns, to generate timing signals for the receiver. The purpose of the slave PLL is to estimate and compensate for the frequency drift occurring between the oscillators of the transmitter clock and the receiver clock.
Several adaptive timing techniques have been developed, including extracting clock information from arrival patterns over the network, observing the rate at which the buffers are being filled, and using encoded timing signals transmitted from the upstream terminal to the downstream terminal across the packet network. One example of the use of encode timing signals (timestamps) is described in U.S. patent application Ser. No. 10/076,415, entitled “Technique for Synchronizing Clocks in a Network”, the content of which is hereby incorporated by reference. Although several of the developed techniques are relatively good at transmitting clock signals on the network, it would still be advantageous to find a way to transmit better clock information across the network, and to find a way to use a less complicated circuit than a PLL to implement the slave clocks.
The present invention overcomes these and other drawbacks by providing a method and apparatus for synchronizing network elements. According to an embodiment of the invention, a master clock is implemented as an all digital phase locked loop. The loop filter output is used to control a Digitally Controlled Frequency Selector (DCFS). The output of the loop filter is also sampled and periodically transmitted to slave clocks to allow the slave clocks to emulate the state of the master clock. The slave clocks, in this embodiment, use the transmitted information as an input to directly control their output frequency to match the output frequency of the master DCFS. The DCFS may be implemented as a digitally controlled oscillator (DCO) or as a Direct Digital Synthesizer (DDS).
Where the master clock is implemented using a DCO as the DCFS, the slave clocks will also be implemented using DCOs. In the master clock, error signals are generated by a Phase Frequency Detector (PFD) and then processed by a loop filter to form a filtered error signal that is combined with a nominal control word to form a DCO control word. The DCO control word is in turn used to control the local DCO and the remote DCOs. Where the master clock is implemented using a DDS as the DCFS, the slave clocks will also be implemented using DDSs. The control word that is used to set the frequency of the master DDS is also transmitted to the slave DDSs, and used by the slave DDSs to cause the slave DDSs to generate the same frequency as the master DDS.
According to another embodiment of the invention, to ensure that the local oscillators in the slave DCFSs are oscillating at the same frequency as the master local oscillator, the slave local oscillators are formed as voltage controlled oscillators and a feedback loop is used to synchronize the slave local oscillators with the master local oscillator. In one embodiment, time stamps are used to transmit state information from the master local oscillator to the slave local oscillators so that the slave local oscillators may replicate the frequency of the master local oscillator to eliminate any long term drift of the slave local oscillator relative to the master local oscillator.
Aspects of the present invention are pointed out with particularity in the appended claims. The present invention is illustrated by way of example in the following drawings in which like references indicate similar elements. The following drawings disclose various embodiments of the present invention for purposes of illustration only and are not intended to limit the scope of the invention. For purposes of clarity, not every component may be labeled in every figure. In the figures:
The following detailed description sets forth numerous specific details to provide a thorough understanding of the invention. However, those skilled in the art will appreciate that the invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, protocols, algorithms, and circuits have not been described in detail so as not to obscure the invention.
In operation, the master clock PLL locks onto an external reference clock 24 by adjusting a control word input to the DCFS. The control word that is used by the master DCFS is transmitted via packets 12 across the network 10 to the slave clocks 18. The slave clocks extract the control word via processor 26 and use that as the new input to the slave DCFS 22. In this way, the same control word that has been derived from the master clock DCFS may be used to replicate the output frequency in the DCFSs forming the slave clocks. By periodically transmitting the control words from the master clock to the slave clocks, the slave clocks can be made to track operation of the master without requiring the slave clocks to be implemented as phase locked loops.
Communication between the master clock and the slave clocks over the packet network can be done in-band, for example by transmitting clock state samples with or without user data, or out-of-band, for example by using a separate physical or logical communication channel, for example, using Real Time Control Protocol (RTCP). The invention is not limited to the particular manner in which the DCFS control word is transmitted from the master clock 16 to the slave clocks 18 or the particular protocols or other technologies involved in the transportation of the control word from the master clock to the slave clocks. Additionally, although only one master and a plurality of slaves have been shown, in a practical embodiment multiple network elements would take place in the clock synchronization scheme, and the invention is not limited to the example network architectures shown in
Two examples of a DCFS that may be used in connection with embodiments of the invention will be described in greater detail below. The first example will describe an embodiment in which the DCFS is formed as a digitally controlled oscillator (DCO), and the second example will describe an embodiment in which the DCFS is formed as a Direct Digital Synthesizer (DDS). The invention is not limited to these two particular structures as other types of digitally controlled frequency selectors may also be used to enable synchronization between the master and slave clocks to occur by transmission of a control word to specify an operating frequency of the slave clocks.
Master Clock
A Phase Locked Loop (PLL) is one of the basic building blocks commonly used in frequency synthesis. A PLL can be constructed using analog technology, using a combination of analog and digital technology, and using only digital technology. As used herein, the term all-digital PLL (ADPLL) will be used to describe a PLL in which all of the signals within the system are digital values; no analog voltage signal is used anywhere in the system. Since analog PLLs are susceptible to temperature variations, DC drift, and numerous other factors, it is preferable to implement the master clock as an ADPLL.
A PLL receives as an input a reference signal (reference clock 24 in
As shown in
The master clock 16 may also include a clock selector 74 to allow the input reference frequency to be obtained from a plurality of different available sources. For example, the master clock may have access to a clock signal generated by a GPS clock, a BITS, line-timed clock signal, or a free-running oscillator.
The comparator 32, 42, compares the input reference clock 24 with the current output (the synthesized clock signal) of the master clock 44 (also referred to as the synthesized clock) and generates an error signal 46. The error signal 46 represents the difference between the reference clock 24 and the synthesized clock 44 signals. The error signal 46 is filtered by a loop filter 34 and combined with a nominal control word 48 to form an input 50 to the Master local DCFS (or DCO 52 or DDS 54). The nominal control word 48 allows the frequency of the DCFS to be set to a frequency close to the input reference frequency 24 and the error signal 46 adjusts the output 44 of the DCFS 36 to lock the synthesized clock 44 onto the reference clock 24.
To enable the slave clocks to operate at the same frequency as the master, the slave clocks are provided with the same input 50 as is provided to the master DCFS 36. This may be done by transmitting the nominal control word 48 to each of the slave clocks 18 and periodically transmitting a control word formed from the filtered error signal 56 to the slave clocks, or by transmitting the control word 50 formed from combining the filtered error signal 56 with the nominal control word 48 to the slave clocks.
To allow the master clock 16 to interwork with slave clocks that configured to implement a timestamp based scheme, rather than the clock synchronization scheme described herein, the master clock may also include a counter to allow the master clock to generate explicit time indications or timestamps that can then be transmitted to the slave clocks to allow the slave clocks to synchronize their local clocks to the master clock.
A digitally controlled oscillator (DCO) is a frequency synthesizer that takes a digital control word 50 as input and generates a corresponding frequency 44. According to one embodiment of the invention, the DCFS may be formed as a DCO. An example of this embodiment is illustrated in
The PFD 42 samples and compares the input reference signal fref 24 with the reconstructed reference (or synthesized clock) fT 44 to produce digitized error samples 46 which are proportional to their phase and frequency differences. The samples are filtered by a digital filter (loop filter 34) and corresponding output samples 56 are used to control the period of the DCO. The output of the loop filter is used to correct the phase and frequency of the DCO by changing the frequency of the DCO for the next clock period in an appropriate direction. If the loop is designed properly, the reconstructed reference fT will be forced to resemble the input reference signal fref. The PFD is described in more detail below in connection with
The PLL control section 58 generated the DCO input from the error signal 46 generated by the PFD 42 and the nominal DCO control word 48, which may be set depending by the network operator depending on the desired output frequency from the DCO. At sampling instant n, the error signal e(n) 46 produced by the PFD 42 is processed by the loop filter 34 F(z) to obtain the correction factor Ncorr(n) 56 (which could be positive or negative quantity). This correction factor is then subtracted at subtractor 60 from the nominal DCO control input Nnom 48 (which corresponds to the nominal system frequency fnom) to obtain a DCO control word NDCO(n) 50. A detail model of the DCO and the loop filter design is given below. Note that the nominal control word Nnom 48 can be set to any desired value depending on system requirements.
The loop filter output Ncorr 56 (or alternatively, the DCO input, NDCO 50) is sampled periodically, for example between about 1 and 20 times per second, and the sampled value is then transmitted to the slave clocks 18 to allow them to emulate the state of the master clock. Transmission of the filtered error signal Ncorr 56 may require fewer bits than transmission of the DCO input 50, since the filtered error signal is likely to be a smaller value than the DCO input which is a combination of the filtered error signal and the nominal DCO control word. Also, since the nominal DCO control word may be known at the slaves, transmission of this component of the input signal may be unnecessary.
Operation of the DCO is illustrated in
If the DCO is operating with a control input Nnom 48, which corresponds to the nominal frequency fDCO=fnom=1/τnom adding a negative quantity −Ncorr to Nnom results in an increase in the frequency of the output 44 (since the counter has to count fewer pulses from the local oscillator), τDCO=(Nnom−Ncorr)τo, whereas adding a positive quantity +Ncorr to Nnom results in a decrease in the frequency of the output 44, τDCO=(Nnom+Ncorr)τo. Thus, by appropriately controlling the correction factor Ncorr 56 added to Nnom 48, the output frequency of the DCO fDCO=1/τDCO can be controlled accordingly.
Another implementation of the DCO is shown in
Frequency quantization is an important consideration in the design of a digital loop, especially since this quantity can be a limiting factor in the performance of a practical implementation.
For small quantization errors, fo>>fnom, where fnom=1/τnom is the nominal frequency of operation (e.g., 1.544 MHz for a T1 link), the phase error which may occur in the DCO due to frequency quantization is
For small quantization errors, for example, Δφ≦7.2° requires that Nnom≧50.
Between samples, the phase error changes in a linear manner at a rate proportional to the difference between the input frequency and the DCO frequency. Since the loop averages two frequencies, one of which could be qf Hz from the input frequency, a phase change of
Δφ=2πqfTs, (3)
can occur between samples, where Ts is a sampling interval. Given that Δφ/2π=fnomτo, the quantization increment qf can be expressed as
A DCO has an inherent stability equal to that of the input high-speed oscillator. If the high-speed oscillator has a frequency range of fo±Δfo, and normalized error ±Δfo/fo (which is usually expressed in parts per million, (ppm)), then for a DCO input word Nnom, the output clock will have a corresponding frequency range
The error range of the output frequency is scaled accordingly by a factor of NDCO and is equal to
but the normalized error range stays the same as that of the high speed oscillator, i.e.,
Thus, the stability of the high-speed oscillator is an important factor to the overall stability of the DCO.
Several advantages of using a DCO for frequency synthesis include numeric frequency tuning, much faster tuning speed, very high tuning range, low phase noise dependent on the frequency ratio Nnom, very high frequency resolution dependent on the frequency ratio Nnom, excellent short and long term stability, highly linear frequency tuning range, and low cost and low complexity. However, the DCO will exhibit relatively high quantization noise if the value of Nnom is too small.
A master (or slave) clock has an inherent stability equal to that of the input high-speed oscillator at the master (or slave) clock. If the high-speed oscillator at the master (or slave) clock has a frequency stability of x ppm, the master (or slave) clock will also have a corresponding frequency stability of x ppm. For the clock synchronization scheme to be stable and accurate, the DCOs will require reasonably stable high-speed oscillators. Thus, the clock accuracy at a slave clock has an inherent stability equal to that of the input high-speed oscillators at the slave and master clock. If the high-speed oscillators at the master and slave clocks have frequency ranges of fo±Δfom and fo±Δfos, respectively, then for a given DCO control word NDCO generated by the master ADPLL, the slave clock will see a corresponding frequency range that embodies the error ranges ±Δfom/NDCO and ±Δfos/NDCO. For the clock synchronization scheme to be accurate, the DCOs will require reasonably stable high-speed oscillators depending on the application. A method and apparatus for implementing a second level control, in which the local high frequency generators of the master and slave DCOs may be synchronized, is discussed in greater detail below in part two hereof.
As shown in
If fref=fT but there is a phase difference between REF and DCO, as shown in
For example, assume that the PFD is in the {UP=0 and DOWN=0} state initially. If fref=fT and there is zero phase error between REF and DCO as shown in
Since the output signal of the PFD depends on the phase error in the locked state of the DPLL and on the frequency error in the unlocked state, a DPLL which uses a PFD will lock under any condition, irrespective of the type of loop filter used.
Assume now that the reference clock period is quantized (by the high-speed clock with frequency fos=1/τos) into M=Max steps, i.e., Max=τnom/τos. Note that the high-speed clock driving the PFD may be different from that driving the DCO. If the two clocks are equal, i.e., fos=fo, then Max=Nnom. The UP-DOWN counter is a binary counter of certain size whose upper limit can be denoted as Max. The counter operates at the speed (or multiple) of the high-speed DCO. It counts up or down, initially from zero, at every high-speed clock tick until it reaches Max-1, and then it will roll over and start again. The value stored in the counter is latched out by the active rising edge of the reference clock REF. Therefore, when the DCO is frequency locked to the reference clock, the counter value should be a fixed number (see
The D-type flip-flops 80 are triggered by the positive-going edges of inputs, REF and DCO, to the PFD. Initially, both outputs are low. When one of the PFD inputs rises, the corresponding output becomes high. The state of the finite-state machine 90 of
Two important observations may be made from the waveforms shown in
To illustrate this,
The slope of the PFD characteristic curve shown in
When the phase error is restricted to the range −2π<θe<2π, the counter output becomes
In
To interface with the loop filter, the PFD is implemented as follows (see
Under normal circumstances (typical applications), the DCO and the PFD will be driven by the same high-frequency oscillator fo. In this case, the high-frequency oscillator is selected to have a frequency of fos=fo=Max·fnom=Nnom·fnom. With this, the counter for both PFD and DCO will have the same maximum values.
In a practical implementation, to allow for the loop filter to be implemented in software on a processor, the inputs REF and DCO may be divided down to 8 KHz (or even 4 or 2 KHz) frame rates and fed to the PFD, as shown in
Where the inputs are divided by X before being fed to the PFD, the input REF and DCO frames would not necessarily be aligned initially before entering the PFD. An example of this is illustrated in
According to an embodiment of the invention, values obtained from the PFD are converted into error values meaningful for adjusting the DCO frequency. The error values may be obtained such that the conversion allows the initial misalignment error Coffset shown in
Monitoring Guidelines:
Interpreting C(n) as an error value:
Determining the Offset Configuration:
Effective Error Value:
Consolidated Algorithm:
Further Consolidation for Interpreting C(n) (Lines 2 & 4 Above Consolidated):
Processing of Phase Count Values to Obtain Error Values:
Initialization:
Procedure:
2. Do the following processing for all subsequent phase detector count values, C(n) to obtain their corresponding error values, where n>0
With this pseudo code, it is possible to generate the error signal e(n) that can be used to control the DCO 52 in the master clock PLL 30 to adjust the output frequency of the DCO 52. As shown in
Depending on the PFD sampling frequency, the low-pass filter can be implemented in software on a processor which controls the DCO. The processor computes the DCO control word NDCO by using the output from the PFD.
The acquisition mode, with faster response, is used to bring the ADPLL into synchronism with the reference. This faster response is necessary initially, and each time after an extended free-run period, whenever the DCO clock frequency 44 differs from the reference frequency 24 by more than the capture range of the tracking mode.
The normal or tracking mode, with very slow response provides the desired frequency stability and low-output jitter of the DCO which is master to a number of other DCOs in the timing hierarchy. It also permits integration and consequent attenuation of short-term (up to one day) phase wander which enables the DCO to free-run at very near the mean reference frequency after it is cut off from its own synchronization source. Other benefits of the slow tracking mode are the ability to detect unusual long-term disturbances (such as excessive frequency drift) by simple inspection of the phase detector output, and the ability to bridge short-term disturbances (phase hits).
To analyze and design a control system, it generally is necessary to obtain a quantitative mathematical description or model of the system. Since a person of ordinary skill in the art would be able to create a mathematical model of the PLL in connection with designing the PLL, additional details of a particular mathematical model have been omitted to avoid obscuring the invention. One example of a mathematical model that may be used to describe an example PLL is set forth in provisional application No. 60/674,231 the content of which is hereby incorporated herein by reference, although other mathematical models may be implemented as well and the invention is not limited to the embodiment(s) disclosed in this provisional application.
Direct Digital Synthesizer
As shown in
As discussed in greater detail below, the master clock 16 of this embodiment shown in
A DDS is able to produce an accurate reference signal whose frequency and phase can be precisely controlled in real time. The term “frequency synthesizer” defines an active electronic device that accepts an input reference frequency and then generates one or more new frequencies as commanded by a control word, whereby the stability, accuracy, and spectral purity of the output correlates with the performance of the input reference.
Direct digital synthesis generates a new output signal 44 based upon an original reference clock signal 112. While this technique essentially mimics traditional phase-locked loop synthesis, all frequencies are generated as digital representations of the desired signal using digital sampling techniques. This approach inherently affords great flexibility to the designer in terms of control and accuracy of the selected frequency. The digital output from the DDS is usually reconstructed with an accurate high-speed Digital-to-Analog Converter (DAC) 106 and then filtered via filter 108 to provide an analog output signal. Since the DDS chip contains all the digital processing to construct and manipulate a frequency, most analog circuitry (apart from the DAC) is eliminated, along with the disadvantages inherent to analog components.
The synthesis of frequencies via direct digital synthesis involves the generation of a waveform from a series of digital numbers which are then converted into analog form by a DAC. The DDS seems architecturally simple, yet provides persuasive advantages that are difficult or expensive to achieve with alternative synthesis methods. These advantages include, among other benefits, very fast switching, fine frequency resolution, excellent phase noise, transient-free (phase continuous) frequency changes, frequency agility and extraordinary flexibility as a modulator, and small size.
The DDS has disadvantages also, of which two may impose serious restrictions. First, the operating range of a DDS is limited by Nyquist sampling theory, which limits the output waveform to be at most half the input reference frequency. For practical reasons, this may be further limited to about one half of the maximum clock rate at which the logic can be operated where the logic operates at a slower clock speed than the input frequency. The second limitation is spectral purity, which is governed by the density/complexity of the logic circuitry that is attainable at the desired operating speed. Spectral purity and operating bandwidth are inversely correlated. When a DDS is to be implemented as part of the master clock, the DDS may be used to generate a Sine wave. Although each of the components of the DDS will be explained in connection with generation of a sine wave, the invention is not limited to use of a DDS to generate a Sine wave, as other waveforms may be used if desired.
The phase accumulator generates the phase component of the output clock. Specifically, the phase accumulator will cycle through 2π radians in increments specified by the change in phase per clock cycle. The change in phase per clock cycle is set by the DDS input control word 50. By changing the amount of phase that is accumulated during each clock cycle, the frequency of the output signal may be adjusted.
The phase accumulator may be implemented using a q-bit adder 114 and a register 116. The q-bit adder 114, in this embodiment, has two inputs, one of which is connected to the DDS input control word φ=Δθ (DDS control word 50) and the other of which is connected to the previous sum 118 stored in the register 116. The range of phase numbers 2q is spread across one cycle of the sine wave, thus 2π=2q. It may be shown that the generated output frequency may be expressed as:
The phase accumulator represents a cyclic phase generator producing a time series of binary integer values (phase sequence) corresponding to the oscillator progression of phase. Stated differently, the phase accumulator generates a phase value of the output waveform for each cycle of the fixed high-frequency oscillator. Since the phase of a Sine wave changes linearly with time, a set value may be added to the accumulator during each clock cycle to cause the output phase of the Sine wave to change a particular amount for the clock cycle. By changing the amount of phase accumulated during a given clock cycle (by changing the DDS input control word 50) the frequency of the output signal 44 may be adjusted.
The phase sequence is generated by a q-bit accumulator clocked at the sample rate, fo=1/δt 120, which accumulates a phase increment, φ, modulo 2q. As shown in
NPA(nδt)=[NPA(nδt−δt)+φ]modulo 2q, (11)
where NPA(nδt) is the content of the phase register (which represents DDS phase in fractional cycles), n is the time index, and δt is the sampling interval. The value of NPA(nδt) is bounded by the width (number of bits) of the input φ and of the accumulator (q number of bits). Note that a cycle is equal to 2q since the counter will overflow once it reaches 2q causing the phase to return to zero. Hence, NPA(nδt) is always modulo 2q. NPA(0) represents the accumulator initial condition at n=0, which can take a value of zero or higher value to produce an initial phase shift. The complete set of discrete states generated by the accumulator may be evenly mapped as phase values around a circle. This would correspond to the discrete output waveform values. The restriction imposed on the phase accumulator by the finite width results in an overflow inherent in the binary adder. This implies a phase zero crossing upon overflow. The frequency of overflow thus dictates the frequency of the output signal. The particular control word required to generate a particular output frequency will thus depend on the length of the register 116 and the speed of the reference clock 120.
From this it follows that the DDS phase output in radians is
which means that the DDS divides the range of the input signal (0,2π) into 2q equal increments. The DDS control word 50 indicates the step size 124 with which the phase will be incremented during each clock cycle. The stored value 116 in the accumulator represents the current phase of a cyclical function.
The input to the phase accumulator is the frequency control word φ 50. Since the control word 50 represents a q-bit digital value, the output frequency of the DDS fout 40 is changed by variation of the input control word. The above phase accumulator arrangement forms a frequency generator at a fixed rate for given values of φ and fo=1/δt.
Whereas the size of the phase increment determines the actual output frequency, the frequency resolution is determined by the number of bits in the phase accumulator register. The frequency increment (or resolution) of a DDS is defined as
As is readily apparent, the frequency resolution of the DDS is a function of the clock frequency fo and the number of bits q employed in the register 116 of the phase accumulator. A longer phase accumulator register, therefore, will allow finer frequency tuning to take place. The phase accumulator must have a sufficient field width to span the desired frequency resolution. For practical applications, a large number of bits are allocated to the phase accumulator in order to satisfy the system frequency resolution requirements. Given the resolution δfout and the clock frequency, the required number of bits is given as
The finite length of the register introduces a source of quantizing noise into the DDS. Commercially available DDSs with register lengths between 24 and 64 bits may be used to implement the DDS, although the invention is not limited to an implementation having a register in this length range as other DDSs may be used as well depending on the particular implementation. A longer register entails some penalty—in power consumption, cost, chip area, spurious outputs, or speed (i.e., a larger q results in a slower accumulator rate of internal addition due to carry propagation)—so there is an incentive to minimize its size. But an excessively short register entails a performance penalty because the quantization noise may become too large. To balance these competing considerations, the phase jitter caused by frequency quantization may be calculated using known techniques so that an informed trade-off can be made.
Once the phase information is generated, it will be converted to a sinusoidal value using the lookup table 104, which stores samples of a sinusoid according to phase. The phase accumulator is used to generate a suitable phase argument that is mapped by the lookup table to obtain the desired output waveform value. Thus, the second component in a DDS is a memory such as a Read Only Memory (ROM) or a Random Access Memory (RAM) or mapping device 104 that performs the nonlinear transformation of ωt sin(ωt). Given that the nth location of the lookup table is defined by sin(2πn/2q), with n ∈ [0, 2q−1], the phase mapped signal is simply sin(2πφn/2q). Comparing this with a generalized discrete-time sinusoid of frequency, fout, reveals the output frequency is fout=φfo/2q.
The ROM/RAM lookup table 104 thus acts as a phase-to-amplitude converter. The phase accumulator generates a discrete time phase sequence NPA(nδt), which is then mapped to the amplitude domain using a lookup table 104 containing amplitude values for the sinusoid. Where a different waveform is desired to be created, amplitude values for the different waveform may be stored in the lookup table 104. The digitized phase mapping from the phase accumulator is used to address the ROM/RAM which contains the stored values of the desired output waveforms. The phase-to-amplitude conversion process maps the sequence of instantaneous binary phase values provided by the phase accumulator through corresponding phase values into quantized amplitude time samples of the generated waveform. If the output is to be over a usable bandwidth, the memory must also be fast. Memory is the slowest digital device in the chain (logic gates operate today at 5 GHz, while memory is about an order of magnitude slower).
To convert the phase to amplitude a converter, ideally, would take the q accumulated phase bits as the input. Because lookup tables are mostly used for phase-to-sinusoid amplitude conversion, with linearly increasing q the table size increases exponentially. Due to excessive memory requirements, it may not be practical to use the full precision of the phase accumulator to index into the sine/cosine lookup table. A quantized (or truncated) version of the phase angle therefore may be used to index into the lookup table 104 such that only the p most significant bits are used to obtain the amplitude value of the Sine wave.
A phase quantizer 122 (see
As described above, not all of the bits recorded in the phase accumulator may be input to the sine lookup algorithm. Reducing the number of bits input to the sine lookup function is referred to herein as phase truncation. Phase truncation is an internal operation of DDSs and cannot be externally influenced. The truncation of the Least Significant Bits (LSB) is a loss of phase information and contributes errors. However, in most practical designs, the spurs caused by phase truncation error are low.
The size of the lookup table also can be reduced by taking advantage of the symmetry of the sine wave. First, there is symmetry about the x-axis, indicated by the most-significant bit (MSB) used as a sign bit. Next, there is vertical symmetry about each half sine wave, where the second MSB is used for quadrant information. Thus, due to the symmetry of the Sine wave, only one quadrant of the waveform must be stored in the lookup table 104. The 2 most significant bits from the accumulator, in this embodiment, may be used to identify the quadrant and the next m bits may be used to obtain an amplitude value from the data stored in the lookup table 104. This implementation results in a more area efficient implementation because the memory requirements are minimized: either fewer FPGA block RAM or reduced distributed memory may be implemented to access the requisite information.
Amplitude quantization occurs in the sine lookup process. The lookup takes in a fixed number of bits of phase information and converts it to the equivalent sine amplitude. Since an ideal sine representation would require an infinite number of bits for most values, the value must be truncated. Most DDSs quantize the values and output the 12 MSBs as the sine amplitude representation which is a typical value for practical high-speed DACs. Quantization beyond the value accepted by the DAC would be ignored by the DAC and, hence, is not beneficial.
If an analog output is required, the DDS presents the digital samples from the lookup table to a DAC to obtain an analog waveform with the specific frequency structure. Of course, the samples may also be used directly in the digital domain and the invention is not limited to an embodiment that implements a DAC.
The DAC converts the output values from the ROM/RAM lookup table 104 (i.e., the digital amplitude information) into an analog output Vout(t). A conventional high speed DAC 106 may be used to convert the output values from the lookup table 104 and the invention is not limited to implementation using a particular DAC.
The output of the DAC has the desired sine wave as a major component, but also includes higher frequency image components introduced by the DAC 106 and the other components of the DDS. A Low-Pass Filter (LPF) 108 may be used to reduce these image signals to the desired level, as shown in
Additional degradation of the output waveform signal may also occur due to harmonics of the frequency being generated and the clock rate of the DAC. Non-ideal behavior of the DAC will introduce distortion that shows up as harmonic spurs. Slow edge rates or delay mismatch on the signals switching the current or settling time, over/under shoot, and glitch impulses at the DAC output can lead to this harmonic distortion. When operating well below Nyquist, these harmonics appear directly in the pass band and usually can be handled with appropriate filter at the output. However, when generating frequencies that approach Nyquist, these harmonics can mix with the reference clock and can produce aliasing - spurs that fall onto or near the fundamental frequency.
The spectral quality of a DDS system is dependent upon a number of factors including the phase noise of the clock source, the number of phase bits applied to the sine lookup function (i.e., phase truncation, which is an internal operation of the DDS and cannot be externally influenced), and the number of bits output from the lookup (i.e., amplitude truncation).
The specifications of the DAC, LPF design, and circuit card design also affect the quality of the converted sine wave. The linearity and glitch energy specifications of the DAC are especially important to the generation of pure sine wave signals. Careful attention to layout of the printed circuit design is important to limiting the noise of the synthesizer. Digital switching and power supply noise should be limited from coupling with clock and analog signals.
The reference clock signal 120 input to a DDS system is a major contributor to the phase noise of the system, even though its effect is reduced by the frequency division process of the DDS. The phase noise of the DDS output will show an improvement over phase noise of the clock source itself of
The frequency accuracy of the clock is propagated through the DDS. Therefore, if the sampling frequency is 10 ppm higher than desired, it may be shown that the output frequency will also be higher by 10 ppm. Thus, the stability of the high-speed oscillator is important in determining the overall stability of the DDS. A method and apparatus for synchronizing the local reference clocks of the master and slave Digitally Controlled Frequency Selectors is described in greater detail below.
The frequencies of the discrete spurs and the amplitude of each are dependent on the ratio of the generated frequency fout to the clock frequency fo, as well as the phase relationship of the output waveform to the sample clock. The 12-bit digitized sine output may provide a broadband signal-to-spurious ratio of 72 dB, again depending on the quality of the DAC and the LPF design, as well as the printed circuit characteristics and the phase noise of the clock frequency.
The DDS is able to generate frequencies from 0 Hz to ½ the frequency of the reference clock. However, limitations on the slope of the roll off of the LPF may reduce the practical upper limit of the output frequency to about 40% of the reference clock frequency.
Phase truncation and amplitude quantization (discussed above) results in periodic noise, which results in undesired spectral line structures. To lower the spurious levels it is possible to spread them over the spectrum. While this will reduce the levels, it also causes the noise floor to rise. One way to lower the spurious levels is to use a phase dithered DDS architecture, an example of which is shown in
As shown in
One advantage of using a dithered DDS such as the one shown in
Controlling the DDS
The DDS is basically a digital frequency divider the incremental resolution of which is determined by the frequency of the reference clock divided by the 2q number of bits in the tuning word. The phase accumulator is a variable-modulus counter that increments the number stored in it each time it receives a clock pulse. When the counter overflows it wraps around, making the phase accumulator's output contiguous. The frequency tuning word sets the modulus of the counter that effectively determines the size of the phase increment (φ) that gets added to the value in the phase accumulator during each pulse of the reference clock. The larger the added increment, the faster the accumulator overflows, which results in a higher output frequency.
The output frequency fout of the DDS waveform is a function of the system clock frequency fo, the number of bits q in the phase accumulator and the phase increment value φ. The phase increment value required to generate an output frequency fout Hz is
The phase increment φ is an unsigned value and defines the DDS output frequency.
Assume that the DDS is operating with a control input φnom which corresponds to the nominal frequency fDDS=fnom. Adding a quantity −Δφ to φnom (i.e., φDCO=φnom−Δφ) results in a decrease in the output frequency, fDDS=fnom−Δf, whereas adding a quantity +Δφ to φnom (i.e., φDDS=φnom+Δφ) results in an increase in the output frequency, fDDS=fnom+Δf. Thus, by appropriately controlling the quantity Δφ added to φnom the output frequency of the DCO fDDS can be controlled accordingly. The size of the phase increment determines the actual output frequency and the fixed binary width q of the accumulator (which overflows) determines the minimum frequency resolution of the DDS. When the DDS is used as a DCFS in a master clock PLL, the value Δφ may be determined from the error signal 56 generated from the filtered phase frequency detector output. Since the details of obtaining an error signal Δφ are set forth in particularity above, a repeated exposition of this topic has been omitted to avoid obscuring the invention.
A DDS may be implemented as a single chip with high clock rates (greater 150 MHz). These devices are competitive in price and power when compared to analog PLLs, while offering high performance, and ease of use and assembly. A DDS can also provide high accuracy and versatile waveform generation. The output frequency of a DDS can be precisely controlled from a digital controller. The frequency can be changed rapidly, each time maintaining phase continuity. A DDS allows frequency resolution control on the order of milli-hertz step size and can likewise allow milli-hertz or even nano-hertz of phase resolution control. In addition, a DDS imposes no settling time constraints for frequency changes other than what is required for digital control. This results in extremely fast frequency switching speeds, on the order of nanoseconds or a few microseconds. In comparison, an analog PLL has a frequency resolution in the 100 s of Hz and settling time is a function of the loop filter characteristics, typically about 1 ms. Whereby analog PLL techniques employ feedback and filtering of error signals impeding the time required to change frequencies, a DDS is only constrained by the digital interface control and the settling time requirements of the DAC. DDSs switch frequencies at rates on the order of nanoseconds or a few microseconds, an improvement of at least one or two orders of magnitude faster than conventional PLL switching speeds.
In a DDS, frequency changes are automatically completed in a phase-continuous fashion—a change to a new frequency continues in-phase from the last point in the previous frequency. Since the signal being generated is in the digital domain, it can be manipulated with exceptional accuracy. Optionally, a microprocessor-controlled system can be implemented to store open loop compensation data vs. frequency for a particular device or system parameter. The microprocessor can then simply control the DDS to dynamically correct the frequency as needed. With a suitable frequency detector in a receiver system, a closed-loop system can easily be constructed.
While the DDS offers many design benefits, there are a few drawbacks that should be considered as well. The limitations imposed by the digital sampling process and the digital-to-analog reconstruction affect three primary areas of performance: maximum frequency limitations, spurious signals at output; and power consumption. Additional details associated with DDS design are set forth in Provisional U.S. Patent Application No. 60/674,231, the content of which is hereby incorporated herein by reference. The invention is not limited to the embodiment(s) disclosed in this provisional application, however, as other DDS designs may be utilized as well.
In the clock synchronization scheme described above, the master and slave clocks are implemented as Digitally Controlled Frequency Selectors (DCFS), each of which includes a local high frequency oscillator. For example, in the embodiment in which the DCFS is implemented as a Digitally Controlled Oscillator (DCO), illustrated for example in
In each of these embodiments, the local oscillator frequency directly affects the output frequency of the DCFS. For example, a DCO has an inherent stability equal to that of the input high-speed oscillator. If the high-speed oscillator has a frequency range of fo±Δfo, and normalized error ±Δfo/fo (which is usually expressed in parts per million, (ppm)), then for a DCO input word Nnom, the output signal will have a corresponding frequency range
The error range of the output frequency is scaled accordingly by a factor of NDCO and is equal to
but the normalized error range stays the same as that of the high speed oscillator, i.e.,
Thus, the stability of the high-speed oscillator is important in determining the overall stability of the DCO.
A DDS similarly is dependent on the stability of the local high-speed oscillator. Specifically, since frequency accuracy of the clock is propagated through the DDS, if the sampling frequency of the DDS is 10 ppm higher than desired (because the input reference clock signal is running 10 ppm too fast) the output frequency will also be higher by 10 ppm. Mathematically, this may be explained as follows. If the high-speed oscillator has a frequency range of fo±Δfo, and normalized error ±Δfo/fo, then for a DDS input word φnom (corresponding to the nominal out frequency fnom), the output clock will have a corresponding frequency range
The error range of the output frequency is scaled accordingly and is equal to
but the normalized error range stays the same as that of the high speed oscillator, i.e.,
Thus, the stability of the high-speed oscillator is also important in determining the overall stability of a DDS.
Since the slave and master DCFSs each implement their own local high frequency oscillator, any frequency variation between the high frequency oscillators will result in frequency discrepancies between the master and slave clock outputs. Thus, the inherent clock stability at a master (or slave) clock is dependent on the stability of the local high speed oscillator at that clock. Additionally, since the master clock is implemented as a PLL, any instability at the master will result in the generation of a control word that compensates for the local oscillator drift. This, accordingly, will manifest itself in the slave clock since the control word passed to the slave clock will reflect the master local oscillator drift. Accordingly, the slave clocks will experience drift not only from their own local oscillator, but also that of the master clock local oscillator.
To minimize the amount of drift experienced at the slaves, and for the clock synchronization scheme to be reasonably stable and accurate, DCFSs using free running oscillators would require fairly stable high-speed oscillators. However, even if all of the local oscillators are implemented to be highly stable, the fact that the local oscillators are free-running and are allowed to operate independently ultimately may cause long term drift to occur between the Master and slave DCFSs. According to an embodiment of the invention, operation of the local oscillator at the slave clock may be synchronized with operation of the local oscillator at the master clock, to thereby provide a second level of control to occur that will allow greater synchronization between the clocks to be achieved. For example, a stable local oscillator may be implemented at the master clock and frequency controlled oscillators may be used to implement the local high frequency oscillators at the slave clocks. Operation of the local oscillator of the master clock DCFS may then be monitored, and information associated with its operation may be transmitted to the slave clocks to allow the local oscillators at the slave clocks to mimic the behavior of the master clock local oscillator.
Time stamps may be used, for example, to transmit local oscillator frequency information from the master clock to the slave clocks. In the timestamp-based technique for clock synchronization, a transmitter periodically sends explicit time indications or timestamps to a receiver to enable the receiver to synchronize its local clock to the transmitter's clock. For example, as shown in
The use of timestamps to synchronize two signals is described in greater detail in U.S. patent application Ser. No. 10/076,415, entitled Technique For Synchronizing Clocks In A Network, the content of which is hereby incorporated by reference. In general, timestamps are a construct that allows the number of clock cycles that have occurred at a particular time to be captured and then replicated at another clock source so that the second clock source is able to recreate the operating frequency of the first clock source. If the two clocks are not generating the same number of clock cycles in a given period, the frequency of the tracking clock may be adjusted to more closely approximate the frequency of the master clock.
For example, let the value T(n) denote the time base (e.g., number of clock ticks) of the transmitter at a particular time n, and the value R(n) represent the time base (e.g. number of clock ticks) of the receiver at time n. In the embodiment shown in
The timestamp difference between the nth and (n-1)th timestamp generated at the transmitter 132 is defined as ΔT(n)=T(n)−T(n-1). Similarly, the timestamp difference between the nth and (n-1)th timestamp as measured by the receiver clock is defined as ΔR(n)=R(n)−R(n-1).
When timestamps are transmitted over the packet network, they will arrive at the receiver with variable delay. If d(n) and d(n-1) denote the delay experienced by the nth and (n-1)th timestamp at the receiver, respectively, then the jitter induced by the network is given as j(n)=d(n)−d(n-1). Accordingly, the timestamp difference measured by the receiver includes both the timestamp difference introduced by the transmitter ΔT(n) and the jitter j(n) experienced as the timestamp was transmitted over the network, that is, ΔR(n)=ΔT(n)+j(n).
Ideally, the jitter j(n) should not affect clock recovery at the receiver. To filter out the jitter, the receiver clock frequency {circumflex over (f)}=1/{circumflex over (τ)}s may be controlled such that the receiver clock measurements ΔR(n) are equal to the transmitter clock timestamp differences ΔT(n). To adjust the receiver clock, an error signal may be formed from the difference between ΔT(n) and ΔR(n): e(n)=ΔT(n)−ΔR(n). Over time, if the transmitter and receiver are operating at the same frequency, the error signal should tend toward zero.
The computed error signal may therefore be filtered and used as feedback in a PLL to adjust the operating frequency of the receiver clock. Specifically, the error signal may be input to a loop filter of a PLL whose output then controls the frequency {circumflex over (f)}s=1/{circumflex over (τ)}s of the oscillator of the receiver clock, where Ko is the gain of the VCO. The function of the PLL is to control the receiver clock frequency {circumflex over (f)}s such that the error e goes to zero at which point the receiver frequency equals the transmitter frequency {circumflex over (f)}s. The loop filter is a simple low-pass filter and may take the form, for example, of the loop filter shown in
In the embodiment shown in
In the example shown in
As shown in
The slave clock, as shown in
The DCFS 22 forming slave clock 18 has a local oscillator 138 configured to generate a local oscillator clock signal 142. Where the DCFS is implemented as a DCO, as shown in
In the second level control, the input timestamp T(n) is compared with a delayed timestamp T(n-1) at a first summing junction 148 to calculate the transmitter clock timestamp difference ΔT(n)=T(n)−T(n-1). At the same time, the oscillator is outputting a signal 142 that is used to run the DCFS which, in the embodiment shown in
The transmitter clock timestamp difference and receiver clock timestamp difference are compared at a third summing junction 154 to generate an error signal e(n)=ΔT(n)−ΔR(n) 156. The error signal 156 is filtered using loop filter 158 to form a filtered error signal u(n) 160. The filtered error signal, over time, should tend toward zero to allow the jitter to be filtered out, so that the reference frequency 142 of the slave local oscillator is able to track the reference frequency 134 of the master local oscillator 132.
The loop filter may be formed to be similar to the loop filter shown in
When the first transmitter timestamp arrives, it will be stored and the receiver counter value will be stored (204). When a subsequent timestamp arrives from the transmitter (206), and for each subsequent timestamp that arrives from the transmitter, the arrival index n will be incremented and the timestamp value of the transmitter and receiver timestamps will be stored. The transmitter clock timestamp difference ΔT(n)=T(n)−T(n-1) and receiver clock timestamp difference ΔR(n)=R(n)−R(n-1) will then be calculated (208) to allow an error signal to be generated. Knowing the two timestamp differences allows the error signal e(n)=ΔT(n)−ΔR(n) to be calculated (210), which may then be filtered by the loop filter to calculate the loop filter output (212).
Using timestamps to allow the slave local oscillators to synchronize with operation of the master local oscillators allows the stability of the high-speed oscillators to be increased by locking the slave clock's high-speed oscillator to the master's high-speed oscillator. Transmission of the control word to cause overall synchronization of the DCOs or DDSs thus provides a first level control, while allowing synchronization of the local oscillators provides a second level control that prevents frequency differences in the local oscillators from affecting the transmission scheme.
Although an embodiment has been described in which timestamps were generated at the master clock and transmitted to the slave clocks, alternatively the slave clocks may generate timestamps from their local oscillators and transmit the timestamps to the master clock. The master clock may use the values from the local oscillators, in this embodiment, to generate slave specific DCFS control words to compensate for the local oscillator drift and unicast those slave specific DCFS control words to the slave clocks. Performing local oscillator processing at the master clock allows the slave clocks to be kept very simple, which may be advantageous in particular environments. Requiring the master clock to process timestamps from each of the slaves, however, will require the master clock to be implemented with additional processing capacity. The invention is not limited, therefore, to an embodiment as shown in the several figures as other ways of synchronizing the state of an internal reference frequency may be implemented as well.
The circuits described herein that may be used to form master and slave clocks may be implemented using discrete components, integrated circuitry, or using a combination of hardware and control logic implemented as a set of program instructions that are stored in a computer readable memory within the network element and executed on a microprocessor. However, it will be apparent to a skilled artisan that all logic described herein can be embodied using discrete components, integrated circuitry, programmable logic used in conjunction with a programmable logic device such as a Field Programmable Gate Array (FPGA) or microprocessor, or any other device including any combination thereof. Programmable logic can be fixed temporarily or permanently in a tangible medium such as a read-only memory chip, a computer memory, a disk, or other storage medium. Programmable logic can also be fixed in a computer data signal embodied in a carrier wave, allowing the programmable logic to be transmitted over an interface such as a computer bus or communication network. All such embodiments are intended to fall within the scope of the present invention.
Although the invention has been described in the context of clock distribution over an asynchronous network the invention is not limited in this manner. For example, embodiments of the invention may also be used as a timing distribution technique for a packet backplane interconnect in a packet switch, router, or TDM switch, as a TDM backplane extension, for example to extend the reach of a TDM bus over a longer distance, and as a TDM backplane expansion, for example to scale up a TDM backplane to handle more cards and devices.
It should be understood that all functional statements made herein describing the functions to be performed by the methods of the invention may be performed by software programs implemented utilizing subroutines and other programming techniques known to those of ordinary skill in the art. It also should be understood that various changes and modifications of the embodiments shown in the drawings and described in the specification may be made within the spirit and scope of the present invention. Accordingly, it is intended that all matter contained in the above description and shown in the accompanying drawings be interpreted in an illustrative and not in a limiting sense. The invention is limited only as defined in the following claims and the equivalents thereto.
This application is related to and claims the benefit of U.S. Provisional Application No. 60/609,477, filed Sep. 13, 2004; U.S. Provisional Application No. 60/609,478, filed Sep. 13, 2004; U.S. Provisional application No. 60/630,550, filed Nov. 23, 2004; and U.S. Provisional Application No. 60/674,231, filed Apr. 23, 2004, and is also related to U.S. Patent Application entitled Method And Apparatus For Synchronizing Internal State of Frequency Generators On A Communications Network, filed on even date herewith. The content of each of these provisional and utility applications is hereby incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
60609477 | Sep 2004 | US | |
60630550 | Nov 2004 | US | |
60609478 | Sep 2004 | US | |
60674231 | Apr 2005 | US |