Phase-locked Loops
   HOME

TheInfoList



OR:

A phase-locked loop or phase lock loop (PLL) is a
control system A control system manages, commands, directs, or regulates the behavior of other devices or systems using control loops. It can range from a single home heating controller using a thermostat controlling a domestic boiler to large industrial c ...
that generates an output signal whose phase is related to the phase of an input signal. There are several different types; the simplest is an
electronic circuit An electronic circuit is composed of individual electronic components, such as resistors, transistors, capacitors, inductors and diodes, connected by conductive wires or traces through which electric current can flow. It is a type of electrical ...
consisting of a variable frequency oscillator and a phase detector in a feedback loop. The oscillator's frequency and phase are controlled proportionally by an applied voltage, hence the term voltage-controlled oscillator (VCO). The oscillator generates a periodic signal of a specific frequency, and the phase detector compares the phase of that signal with the phase of the input periodic signal, to adjust the oscillator to keep the phases matched. Keeping the input and output phase in lockstep also implies keeping the input and output frequencies the same. Consequently, in addition to synchronizing signals, a phase-locked loop can track an input frequency, or it can generate a frequency that is a multiple of the input frequency. These properties are used for computer clock synchronization,
demodulation Demodulation is extracting the original information-bearing signal from a carrier wave. A demodulator is an electronic circuit (or computer program in a software-defined radio) that is used to recover the information content from the modulated ...
, and
frequency synthesis A frequency synthesizer is an electronic circuit that generates a range of frequencies from a single reference frequency. Frequency synthesizers are used in many modern devices such as radio receivers, televisions, mobile telephones, radiotelephone ...
. Phase-locked loops are widely employed in radio, telecommunications,
computer A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
s and other electronic applications. They can be used to demodulate a signal, recover a signal from a noisy communication channel, generate a stable frequency at multiples of an input frequency (
frequency synthesis A frequency synthesizer is an electronic circuit that generates a range of frequencies from a single reference frequency. Frequency synthesizers are used in many modern devices such as radio receivers, televisions, mobile telephones, radiotelephone ...
), or distribute precisely timed clock pulses in digital logic circuits such as microprocessors. Since a single
integrated circuit An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, usually silicon. Large numbers of tiny ...
can now provide a complete phase-locked-loop building block, the technique is widely used in modern electronic devices, with output frequencies from a fraction of a hertz up to many gigahertz.


History

Spontaneous synchronization of weakly coupled pendulum clocks was noted by the Dutch physicist
Christiaan Huygens Christiaan Huygens, Lord of Zeelhem, ( , , ; also spelled Huyghens; la, Hugenius; 14 April 1629 – 8 July 1695) was a Dutch mathematician, physicist, engineer, astronomer, and inventor, who is regarded as one of the greatest scientists of ...
as early as 1673. Around the turn of the 19th century, Lord Rayleigh observed synchronization of weakly coupled organ pipes and tuning forks. In 1919, W. H. Eccles and J. H. Vincent found that two electronic oscillators that had been tuned to oscillate at slightly different frequencies but that were coupled to a resonant circuit would soon oscillate at the same frequency. Automatic synchronization of electronic oscillators was described in 1923 by
Edward Victor Appleton Sir Edward Victor Appleton (6 September 1892 – 21 April 1965) was an English physicist, Nobel Prize winner (1947) and pioneer in radiophysics. He studied, and was also employed as a lab technician, at Bradford College from 1909 to 1911. He w ...
. In 1925, David Robertson, first professor of electrical engineering at the
University of Bristol The University of Bristol is a Red brick university, red brick Russell Group research university in Bristol, England. It received its royal charter in 1909, although it can trace its roots to a Society of Merchant Venturers, Merchant Venturers' sc ...
, introduced phase locking in his clock design to control the striking of the bell Great George in the new Wills Memorial Building.  Robertson’s clock incorporated an electro-mechanical device that could vary the rate of oscillation of the pendulum, and derived correction signals from a circuit that compared the pendulum phase with that of an incoming telegraph pulse from Greenwich Observatory every morning at 10:00 GMT.  Apart from including equivalents of every element of a modern electronic PLL, Robertson’s system was notable in that its phase detector was a relay logic implementation of the phase/frequency detector not seen in electronic circuits until the 1970s.  Robertson’s work predated research towards what was later named the phase-lock loop in 1932, when British researchers developed an alternative to
Edwin Armstrong Edwin Howard Armstrong (December 18, 1890 – February 1, 1954) was an American electrical engineer and inventor, who developed FM (frequency modulation) radio and the superheterodyne receiver system. He held 42 patents and received numerous awa ...
's
superheterodyne receiver A superheterodyne receiver, often shortened to superhet, is a type of radio receiver that uses frequency mixing to convert a received signal to a fixed intermediate frequency (IF) which can be more conveniently processed than the original carr ...
, the
Homodyne In electrical engineering, homodyne detection is a method of extracting information encoded as modulation of the phase and/or frequency of an oscillating signal, by comparing that signal with a standard oscillation that would be identical to the ...
or direct-conversion receiver. In the homodyne or synchrodyne system, a local oscillator was tuned to the desired input frequency and multiplied with the input signal. The resulting output signal included the original modulation information. The intent was to develop an alternative receiver circuit that required fewer tuned circuits than the superheterodyne receiver. Since the local oscillator would rapidly drift in frequency, an automatic correction signal was applied to the oscillator, maintaining it in the same phase and frequency of the desired signal. The technique was described in 1932, in a paper by Henri de Bellescize, in the French journal ''L'Onde Électrique''. In analog television receivers since at least the late 1930s, phase-locked-loop horizontal and vertical sweep circuits are locked to synchronization pulses in the broadcast signal. In 1969, Signetics introduced a line of low-cost monolithic integrated circuits like the NE565, that were complete phase-locked loop systems on a chip, and applications for the technique multiplied. A few years later, RCA introduced the " CD4046"
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss", ) is a type of metal–oxide–semiconductor field-effect transistor (MOSFET) fabrication process that uses complementary and symmetrical pairs of p-type and n-type MOSFE ...
Micropower Phase-Locked Loop, which also became a popular integrated circuit building block.


Structure and function

Phase-locked loop mechanisms may be implemented as either analog or digital circuits. Both implementations use the same basic structure. Analog PLL circuits include four basic elements: * Phase detector * Low-pass filter * Voltage controlled oscillator *
Feedback Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause-and-effect that forms a circuit or loop. The system can then be said to ''feed back'' into itself. The notion of cause-and-effect has to be handled ...
path, which may include a frequency divider


Variations

There are several variations of PLLs. Some terms that are used are "analog phase-locked loop" (APLL), also referred to as a linear phase-locked loop" (LPLL), "digital phase-locked loop" (DPLL), "all digital phase-locked loop" (ADPLL), and "software phase-locked loop" (SPLL). ; Analog or linear PLL (APLL):Phase detector is an analog multiplier. Loop filter is active or passive. Uses a voltage-controlled oscillator (VCO). APLL is said to be a ''type II'' if its loop filter has transfer function with exactly one pole at the origin (see also Egan's conjecture on the pull-in range of type II APLL). ; Digital PLL (DPLL): An analog PLL with a digital phase detector (such as XOR, edge-trigger JK, phase frequency detector). May have digital divider in the loop. ; All digital PLL (ADPLL): Phase detector, filter and oscillator are digital. Uses a numerically controlled oscillator (NCO). ; Software PLL (SPLL): Functional blocks are implemented by software rather than specialized hardware. ; Charge-pump PLL (CP-PLL):CP-PLL is a modification of phase-locked loops with phase-frequency detector and square waveform signals. See also Gardner's conjecture on CP-PLL.


Performance parameters

*Type and order. * Frequency ranges: hold-in range (tracking range), pull-in range (capture range, acquisition range), lock-in range. See also Gardner's problem on the lock-in range, Egan's conjecture on the pull-in range of type II APLL. *Loop bandwidth: Defining the speed of the control loop. *Transient response: Like overshoot and settling time to a certain accuracy (like 50 ppm). *Steady-state errors: Like remaining phase or timing error. *Output spectrum purity: Like sidebands generated from a certain VCO tuning voltage ripple. *Phase-noise: Defined by noise energy in a certain frequency band (like 10 kHz offset from carrier). Highly dependent on VCO phase-noise, PLL bandwidth, etc. *General parameters: Such as power consumption, supply voltage range, output amplitude, etc.


Applications

Phase-locked loops are widely used for
synchronization Synchronization is the coordination of events to operate a system in unison. For example, the conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are said to be synchronou ...
purposes; in space communications for
coherent demodulation A carrier recovery system is a circuit used to estimate and compensate for frequency and phase differences between a received signal's carrier wave and the receiver's local oscillator for the purpose of coherent demodulation. In the transmitter ...
and
threshold extension A noise gate or gate is an electronic device or software that is used to control the amplitude, volume of an audio signal. Comparable to a dynamic range compression, compressor, which attenuates signals ''above'' a threshold, such as loud attack ...
, bit synchronization, and symbol synchronization. Phase-locked loops can also be used to demodulate frequency-modulated signals. In radio transmitters, a PLL is used to synthesize new frequencies which are a multiple of a reference frequency, with the same stability as the reference frequency. Other applications include: *
Demodulation Demodulation is extracting the original information-bearing signal from a carrier wave. A demodulator is an electronic circuit (or computer program in a software-defined radio) that is used to recover the information content from the modulated ...
of frequency modulation (FM): If PLL is locked to an FM signal, the VCO tracks the instantaneous frequency of the input signal. The filtered error voltage which controls the VCO and maintains lock with the input signal is demodulated FM output. The VCO transfer characteristics determine the linearity of the demodulated out. Since the VCO used in an integrated-circuit PLL is highly linear, it is possible to realize highly linear FM demodulators. * Demodulation of
frequency-shift keying Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier signal. The technology is used for communication systems such as telemetry, weather ball ...
(FSK): In digital data communication and computer peripherals, binary data is transmitted by means of a carrier frequency which is shifted between two preset frequencies. * Recovery of small signals that otherwise would be lost in noise ( lock-in amplifier to track the reference frequency) * Recovery of clock timing information from a data stream such as from a disk drive * Clock multipliers in microprocessors that allow internal processor elements to run faster than external connections, while maintaining precise timing relationships * Demodulation of modems and other tone signals for telecommunications and remote control. * DSP of video signals; Phase-locked loops are also used to synchronize phase and frequency to the input analog video signal so it can be sampled and digitally processed *
Atomic force microscopy Atomic force microscopy (AFM) or scanning force microscopy (SFM) is a very-high-resolution type of scanning probe microscopy (SPM), with demonstrated resolution on the order of fractions of a nanometer, more than 1000 times better than the op ...
in frequency modulation mode, to detect changes of the cantilever resonance frequency due to tip–surface interactions *
DC motor A DC motor is any of a class of rotary electrical motors that converts direct current (DC) electrical energy into mechanical energy. The most common types rely on the forces produced by induced magnetic fields due to flowing current in the coil ...
drive Drive or The Drive may refer to: Motoring * Driving, the act of controlling a vehicle * Road trip, a journey on roads Roadways Roadways called "drives" may include: * Driveway, a private road for local access to structures, abbreviated "drive" ...


Clock recovery

Some data streams, especially high-speed serial data streams (such as the raw stream of data from the magnetic head of a disk drive), are sent without an accompanying clock. The receiver generates a clock from an approximate frequency reference, and then phase-aligns to the transitions in the data stream with a PLL. This process is referred to as clock recovery. For this scheme to work, the data stream must have a transition frequently enough to correct any drift in the PLL's oscillator. Typically, some sort of line code, such as
8b/10b encoding In telecommunications, 8b/10b is a line code that maps 8-bit words to 10-bit symbols to achieve DC balance and bounded disparity, and at the same time provide enough state changes to allow reasonable clock recovery. This means that the diff ...
, is used to put a hard upper bound on the maximum time between transitions.


Deskewing

If a clock is sent in parallel with data, that clock can be used to sample the data. Because the clock must be received and amplified before it can drive the flip-flops which sample the data, there will be a finite, and process-, temperature-, and voltage-dependent delay between the detected clock edge and the received data window. This delay limits the frequency at which data can be sent. One way of eliminating this delay is to include a deskew PLL on the receive side, so that the clock at each data flip-flop is phase-matched to the received clock. In that type of application, a special form of a PLL called a
delay-locked loop In electronics, a delay-locked loop (DLL) is a pseudo-digital circuit similar to a phase-locked loop (PLL), with the main difference being the absence of an internal voltage-controlled oscillator, replaced by a delay line. A DLL can be used to ch ...
(DLL) is frequently used.


Clock generation

Many electronic systems include processors of various sorts that operate at hundreds of megahertz. Typically, the clocks supplied to these processors come from clock generator PLLs, which multiply a lower-frequency reference clock (usually 50 or 100 MHz) up to the operating frequency of the processor. The multiplication factor can be quite large in cases where the operating frequency is multiple gigahertz and the reference crystal is just tens or hundreds of megahertz.


Spread spectrum

All electronic systems emit some unwanted radio frequency energy. Various regulatory agencies (such as the FCC in the United States) put limits on the emitted energy and any interference caused by it. The emitted noise generally appears at sharp spectral peaks (usually at the operating frequency of the device, and a few harmonics). A system designer can use a spread-spectrum PLL to reduce interference with high-Q receivers by spreading the energy over a larger portion of the spectrum. For example, by changing the operating frequency up and down by a small amount (about 1%), a device running at hundreds of megahertz can spread its interference evenly over a few megahertz of spectrum, which drastically reduces the amount of noise seen on broadcast
FM radio FM broadcasting is a method of radio broadcasting using frequency modulation (FM). Invented in 1933 by American engineer Edwin Armstrong, wide-band FM is used worldwide to provide high fidelity sound over broadcast radio. FM broadcasting is cap ...
channels, which have a bandwidth of several tens of kilohertz.


Clock distribution

Typically, the reference clock enters the chip and drives a phase locked loop (PLL), which then drives the system's clock distribution. The clock distribution is usually balanced so that the clock arrives at every endpoint simultaneously. One of those endpoints is the PLL's feedback input. The function of the PLL is to compare the distributed clock to the incoming reference clock, and vary the phase and frequency of its output until the reference and feedback clocks are phase and frequency matched. PLLs are ubiquitous—they tune clocks in systems several feet across, as well as clocks in small portions of individual chips. Sometimes the reference clock may not actually be a pure clock at all, but rather a data stream with enough transitions that the PLL is able to recover a regular clock from that stream. Sometimes the reference clock is the same frequency as the clock driven through the clock distribution, other times the distributed clock may be some rational multiple of the reference.


AM detection

A PLL may be used to synchronously demodulate amplitude modulated (AM) signals. The PLL recovers the phase and frequency of the incoming AM signal's carrier. The recovered phase at the VCO differs from the carrier's by 90°, so it is shifted in phase to match, and then fed to a multiplier. The output of the multiplier contains both the sum and the difference frequency signals, and the demodulated output is obtained by low-pass filtering. Since the PLL responds only to the carrier frequencies which are very close to the VCO output, a PLL AM detector exhibits a high degree of selectivity and noise immunity which is not possible with conventional peak type AM demodulators. However, the loop may lose lock where AM signals have 100% modulation depth.


Jitter and noise reduction

One desirable property of all PLLs is that the reference and feedback clock edges be brought into very close alignment. The average difference in time between the phases of the two signals when the PLL has achieved lock is called the static phase offset (also called the steady-state phase error). The variance between these phases is called tracking
jitter In electronics and telecommunications, jitter is the deviation from true periodicity of a presumably periodic signal, often in relation to a reference clock signal. In clock recovery applications it is called timing jitter. Jitter is a significa ...
. Ideally, the static phase offset should be zero, and the tracking jitter should be as low as possible.
Phase noise In signal processing, phase noise is the frequency-domain representation of random fluctuations in the phase of a waveform, corresponding to time-domain deviations from perfect periodicity (jitter). Generally speaking, radio-frequency engineers ...
is another type of jitter observed in PLLs, and is caused by the oscillator itself and by elements used in the oscillator's frequency control circuit. Some technologies are known to perform better than others in this regard. The best digital PLLs are constructed with emitter-coupled logic ( ECL) elements, at the expense of high power consumption. To keep phase noise low in PLL circuits, it is best to avoid saturating logic families such as transistor-transistor logic ( TTL) or
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss", ) is a type of metal–oxide–semiconductor field-effect transistor (MOSFET) fabrication process that uses complementary and symmetrical pairs of p-type and n-type MOSFE ...
. Another desirable property of all PLLs is that the phase and frequency of the generated clock be unaffected by rapid changes in the voltages of the power and ground supply lines, as well as the voltage of the substrate on which the PLL circuits are fabricated. This is called substrate and supply noise rejection. The higher the noise rejection, the better. To further improve the phase noise of the output, an
injection locked oscillator Injection locking and injection pulling are the frequency effects that can occur when a harmonic oscillator is disturbed by a second oscillator operating at a nearby frequency. When the coupling is strong enough and the frequencies near enough, t ...
can be employed following the VCO in the PLL.


Frequency synthesis

In digital wireless communication systems (GSM, CDMA etc.), PLLs are used to provide the local oscillator up-conversion during transmission and down-conversion during reception. In most cellular handsets this function has been largely integrated into a single integrated circuit to reduce the cost and size of the handset. However, due to the high performance required of base station terminals, the transmission and reception circuits are built with discrete components to achieve the levels of performance required. GSM local oscillator modules are typically built with a frequency synthesizer integrated circuit and discrete resonator VCOs.


Block diagram

The block diagram shown in the figure shows an input signal, ''F''''I'', which is used to generate an output, ''F''''O''. The input signal is often called the ''reference signal'' (also abbreviated ''F''''REF''). At the input, a phase detector (shown as the
Phase frequency detector A phase detector or phase comparator is a frequency mixer, analog multiplier or logic circuit that generates a signal which represents the difference in phase between two signal inputs. The phase detector is an essential element of the phase-l ...
and Charge pump blocks in the figure) compares two input signals, producing an error signal which is proportional to their phase difference. The error signal is then low-pass filtered and used to drive a VCO which creates an output phase. The output is fed through an optional divider back to the input of the system, producing a negative feedback loop. If the output phase drifts, the error signal will increase, driving the VCO phase in the opposite direction so as to reduce the error. Thus the output phase is locked to the phase of the input. Analog phase locked loops are generally built with an analog phase detector, low-pass filter and VCO placed in a
negative feedback Negative feedback (or balancing feedback) occurs when some function (Mathematics), function of the output of a system, process, or mechanism is feedback, fed back in a manner that tends to reduce the fluctuations in the output, whether caused by ...
configuration. A digital phase locked loop uses a digital phase detector; it may also have a divider in the feedback path or in the reference path, or both, in order to make the PLL's output signal frequency a rational multiple of the reference frequency. A non-integer multiple of the reference frequency can also be created by replacing the simple divide-by-''N'' counter in the feedback path with a programmable
pulse swallowing counter A pulse-swallowing counter is a component in an all-digital feedback system. The divider produces one output pulse for every N counts (N is usually a power of 2) when not swallowing, and per N+1 pulses when the 'swallow' signal is active. The ove ...
. This technique is usually referred to as a
fractional-N synthesizer In electronics, a frequency multiplier is an electronic circuit that generates an output signal and that output frequency is a harmonic (multiple) of its input frequency. Frequency multipliers consist of a nonlinear circuit that distorts the inpu ...
or fractional-N PLL. The oscillator generates a periodic output signal. Assume that initially the oscillator is at nearly the same frequency as the reference signal. If the phase from the oscillator falls behind that of the reference, the phase detector changes the control voltage of the oscillator so that it speeds up. Likewise, if the phase creeps ahead of the reference, the phase detector changes the control voltage to slow down the oscillator. Since initially the oscillator may be far from the reference frequency, practical phase detectors may also respond to frequency differences, so as to increase the lock-in range of allowable inputs. Depending on the application, either the output of the controlled oscillator, or the control signal to the oscillator, provides the useful output of the PLL system.


Elements


Phase detector

A phase detector (PD) generates a voltage, which represents the phase difference between two signals. In a PLL, the two inputs of the phase detector are the reference input and the feedback from the VCO. The PD output voltage is used to control the VCO such that the phase difference between the two inputs is held constant, making it a negative feedback system. Different types of phase detectors have different performance characteristics. For instance, the frequency mixer produces harmonics that adds complexity in applications where spectral purity of the VCO signal is important. The resulting unwanted (spurious) sidebands, also called "
reference spurs Reference is a relationship between objects in which one object designates, or acts as a means by which to connect to or link to, another object. The first object in this relation is said to ''refer to'' the second object. It is called a ''name'' ...
" can dominate the filter requirements and reduce the capture range well below or increase the lock time beyond the requirements. In these applications the more complex digital phase detectors are used which do not have as severe a reference spur component on their output. Also, when in lock, the steady-state phase difference at the inputs using this type of phase detector is near 90 degrees. In PLL applications it is frequently required to know when the loop is out of lock. The more complex digital phase-frequency detectors usually have an output that allows a reliable indication of an out of lock condition. An XOR gate is often used for digital PLLs as an effective yet simple phase detector. It can also be used in an analog sense with only slight modification to the circuitry.


Filter

The block commonly called the PLL loop filter (usually a low-pass filter) generally has two distinct functions. The primary function is to determine loop dynamics, also called stability. This is how the loop responds to disturbances, such as changes in the reference frequency, changes of the feedback divider, or at startup. Common considerations are the range over which the loop can achieve lock (pull-in range, lock range or capture range), how fast the loop achieves lock (lock time, lock-up time or settling time) and damping behavior. Depending on the application, this may require one or more of the following: a simple proportion (gain or attenuation), an integral (low-pass filter) and/or derivative ( high-pass filter). Loop parameters commonly examined for this are the loop's gain margin and phase margin. Common concepts in control theory including the PID controller are used to design this function. The second common consideration is limiting the amount of reference frequency energy (ripple) appearing at the phase detector output that is then applied to the VCO control input. This frequency modulates the VCO and produces FM sidebands commonly called "reference spurs". The design of this block can be dominated by either of these considerations, or can be a complex process juggling the interactions of the two. Typical trade-offs are increasing the bandwidth usually degrades the stability or too much damping for better stability will reduce the speed and increase settling time. Often also the phase-noise is affected.


Oscillator

All phase-locked loops employ an oscillator element with variable frequency capability. This can be an analog VCO either driven by analog circuitry in the case of an APLL or driven digitally through the use of a digital-to-analog converter as is the case for some DPLL designs. Pure digital oscillators such as a numerically controlled oscillator are used in ADPLLs.


Feedback path and optional divider

PLLs may include a divider between the oscillator and the feedback input to the phase detector to produce a frequency synthesizer. A programmable divider is particularly useful in radio transmitter applications, since a large number of transmit frequencies can be produced from a single stable, accurate, but expensive, quartz crystal–controlled reference oscillator. Some PLLs also include a divider between the reference clock and the reference input to the phase detector. If the divider in the feedback path divides by N and the reference input divider divides by M, it allows the PLL to multiply the reference frequency by N/M. It might seem simpler to just feed the PLL a lower frequency, but in some cases the reference frequency may be constrained by other issues, and then the reference divider is useful. Frequency multiplication can also be attained by locking the VCO output to the ''N''th harmonic of the reference signal. Instead of a simple phase detector, the design uses a harmonic mixer (sampling mixer). The harmonic mixer turns the reference signal into an impulse train that is rich in harmonics. The VCO output is coarse tuned to be close to one of those harmonics. Consequently, the desired harmonic mixer output (representing the difference between the ''N'' harmonic and the VCO output) falls within the loop filter passband. It should also be noted that the feedback is not limited to a frequency divider. This element can be other elements such as a frequency multiplier, or a mixer. The multiplier will make the VCO output a sub-multiple (rather than a multiple) of the reference frequency. A mixer can translate the VCO frequency by a fixed offset. It may also be a combination of these. An example being a divider following a mixer; this allows the divider to operate at a much lower frequency than the VCO without a loss in loop gain.


Modeling


Time domain model of APLL

The equations governing a phase-locked loop with an analog multiplier as the phase detector and linear filter may be derived as follows. Let the input to the phase detector be f_1(\theta_1(t)) and the output of the VCO is f_2(\theta_2(t)) with phases \theta_1(t) and \theta_2(t). The functions f_1(\theta) and f_2(\theta) describe waveforms of signals. Then the output of the phase detector \varphi(t) is given by :\varphi(t) = f_1(\theta_1(t)) f_2(\theta_2(t)) The VCO frequency is usually taken as a function of the VCO input g(t) as :\dot\theta_2(t) = \omega_2(t) = \omega_\text + g_v g(t)\, where g_v is the ''sensitivity'' of the VCO and is expressed in Hz / V; \omega_\text is a free-running frequency of VCO. The loop filter can be described by a system of linear differential equations : \begin \dot x & = & Ax + b \varphi(t), \\ g(t) & = & c^x, \end \quad x(0) = x_0, where \varphi(t) is an input of the filter, g(t) is an output of the filter, A is n-by-n matrix, x \in \mathbb^n,\quad b \in \mathbb^n, \quad c \in \mathbb^n, \quad. x_0 \in \mathbb^n represents an initial state of the filter. The star symbol is a conjugate transpose. Hence the following system describes PLL :\begin \dot x &= &Ax + b f_1(\theta_1(t)) f_2(\theta_2(t)),\\ \dot \theta_2 &= & \omega_\text + g_v (c^x) \\ \end \quad x(0) = x_0, \quad \theta_2(0) = \theta_0. where \theta_0 is an initial phase shift.


Phase domain model of APLL

Consider the input of PLL f_1(\theta_1(t)) and VCO output f_2(\theta_2(t)) are high frequency signals. Then for any piecewise differentiable 2\pi-periodic functions f_1(\theta) and f_2(\theta) there is a function \varphi(\theta) such that the output G(t) of Filter :\begin \dot x &= &Ax + b \varphi(\theta_1(t) - \theta_2(t)), \\ G(t) &= &c^x, \end \quad x(0) = x_0, in phase domain is asymptotically equal (the difference G(t)- g(t) is small with respect to the frequencies) to the output of the Filter in time domain model. Here function \varphi(\theta) is a phase detector characteristic. Denote by \theta_(t) the phase difference :\theta_ = \theta_1(t) - \theta_2(t). Then the following dynamical system describes PLL behavior :\begin \dot x &= &Ax + b \varphi(\theta_),\\ \dot \theta_ &= & \omega_ - g_v (c^x). \\ \end \quad x(0) = x_0, \quad \theta_(0) = \theta_(0) - \theta_2(0). Here \omega_ = \omega_1 - \omega_\text; \omega_1 is the frequency of a reference oscillator (we assume that \omega_\text is constant).


Example

Consider sinusoidal signals :f_1(\theta_1(t)) = A_1 \sin(\theta_1(t)), \quad f_2(\theta_2(t)) = A_2\cos(\theta_2(t)) and a simple one-pole RC circuit as a filter. The time-domain model takes the form :\begin \dot x &= -\fracx + \frac A_1A_2\sin(\theta_1(t)) \cos(\theta_2(t)),\\ pt \dot \theta_2 &= \omega_\text + g_v (c^x) \end PD characteristics for this signals is equalA. J. Viterbi, ''Principles of Coherent Communication'', McGraw-Hill, New York, 1966 to : \varphi(\theta_1 - \theta_2) = \frac\sin(\theta_1 - \theta_2) Hence the phase domain model takes the form :\begin \dot x &= -\fracx + \frac\frac\sin(\theta_),\\ pt \dot \theta_ &= \omega_ - g_v (c^x). \end This system of equations is equivalent to the equation of mathematical pendulum : \begin x & = \frac = \frac,\\ pt\dot x & = \frac,\\ pt\theta_1 & = \omega_1 t + \Psi,\\ pt\theta_ & = \theta_1 -\theta_2,\\ pt\dot\theta_ & = \dot\theta_1 - \dot\theta_2 = \omega_1 - \dot\theta_2,\\ pt& \frac\ddot\theta_ - \frac\dot\theta_ - \frac\sin\theta_ = \frac. \end


Linearized phase domain model

Phase locked loops can also be analyzed as control systems by applying the Laplace transform. The loop response can be written as :\frac = \frac Where * \theta_o is the output phase in radians * \theta_i is the input phase in radians * K_p is the phase detector gain in volts per radian * K_v is the VCO gain in radians per volt-
second The second (symbol: s) is the unit of time in the International System of Units (SI), historically defined as of a day – this factor derived from the division of the day first into 24 hours, then to 60 minutes and finally to 60 seconds ...
* F(s) is the loop filter transfer function (dimensionless) The loop characteristics can be controlled by inserting different types of loop filters. The simplest filter is a one-pole RC circuit. The loop transfer function in this case is :F(s) = \frac The loop response becomes: :\frac = \frac This is the form of a classic
harmonic oscillator In classical mechanics, a harmonic oscillator is a system that, when displaced from its Mechanical equilibrium, equilibrium position, experiences a restoring force ''F'' Proportionality (mathematics), proportional to the displacement ''x'': \v ...
. The denominator can be related to that of a second order system: :s^2 + 2 s \zeta \omega_n + \omega_n^2 where \zeta is the damping factor and \omega_n is the natural frequency of the loop. For the one-pole RC filter, :\omega_n = \sqrt :\zeta = \frac The loop natural frequency is a measure of the response time of the loop, and the damping factor is a measure of the overshoot and ringing. Ideally, the natural frequency should be high and the damping factor should be near 0.707 (critical damping). With a single pole filter, it is not possible to control the loop frequency and damping factor independently. For the case of critical damping, :R C = \frac :\omega_c = K_p K_v \sqrt A slightly more effective filter, the lag-lead filter includes one pole and one zero. This can be realized with two resistors and one capacitor. The transfer function for this filter is :F(s) = \frac This filter has two time constants :\tau_1 = C (R_1 + R_2) :\tau_2 = C R_2 Substituting above yields the following natural frequency and damping factor :\omega_n = \sqrt :\zeta = \frac + \frac The loop filter components can be calculated independently for a given natural frequency and damping factor :\tau_1 = \frac :\tau_2 = \frac - \frac Real world loop filter design can be much more complex e.g. using higher order filters to reduce various types or source of phase noise. (See the D Banerjee ref below)


Implementing a digital phase-locked loop in software

Digital phase locked loops can be implemented in hardware, using integrated circuits such as a CMOS 4046. However, with microcontrollers becoming faster, it may make sense to implement a phase locked loop in software for applications that do not require locking onto signals in the MHz range or faster, such as precisely controlling motor speeds. Software implementation has several advantages including easy customization of the feedback loop including changing the multiplication or division ratio between the signal being tracked and the output oscillator. Furthermore, a software implementation is useful to understand and experiment with. As an example of a phase-locked loop implemented using a
phase frequency detector A phase detector or phase comparator is a frequency mixer, analog multiplier or logic circuit that generates a signal which represents the difference in phase between two signal inputs. The phase detector is an essential element of the phase-l ...
is presented in MATLAB, as this type of phase detector is robust and easy to implement. % This example is written in MATLAB % Initialize variables vcofreq = zeros(1, numiterations); ervec = zeros(1, numiterations); % Keep track of last states of reference, signal, and error signal qsig = 0; qref = 0; lref = 0; lsig = 0; lersig = 0; phs = 0; freq = 0; % Loop filter constants (proportional and derivative) % Currently powers of two to facilitate multiplication by shifts prop = 1 / 128; deriv = 64; for it = 1:numiterations % Simulate a local oscillator using a 16-bit counter phs = mod(phs + floor(freq / 2 ^ 16), 2 ^ 16); ref = phs < 32768; % Get the next digital value (0 or 1) of the signal to track sig = tracksig(it); % Implement the phase-frequency detector rst = ~ (qsig & qref); % Reset the "flip-flop" of the phase-frequency % detector when both signal and reference are high qsig = (qsig , (sig & ~ lsig)) & rst; % Trigger signal flip-flop and leading edge of signal qref = (qref , (ref & ~ lref)) & rst; % Trigger reference flip-flop on leading edge of reference lref = ref; lsig = sig; % Store these values for next iteration (for edge detection) ersig = qref - qsig; % Compute the error signal (whether frequency should increase or decrease) % Error signal is given by one or the other flip flop signal % Implement a pole-zero filter by proportional and derivative input to frequency filtered_ersig = ersig + (ersig - lersig) * deriv; % Keep error signal for proportional output lersig = ersig; % Integrate VCO frequency using the error signal freq = freq - 2 ^ 16 * filtered_ersig * prop; % Frequency is tracked as a fixed-point binary fraction % Store the current VCO frequency vcofreq(1, it) = freq / 2 ^ 16; % Store the error signal to show whether signal or reference is higher frequency ervec(1, it) = ersig; end In this example, an array tracksig is assumed to contain a reference signal to be tracked. The oscillator is implemented by a counter, with the most significant bit of the counter indicating the on/off status of the oscillator. This code simulates the two D-type flip-flops that comprise a phase-frequency comparator. When either the reference or signal has a positive edge, the corresponding flip-flop switches high. Once both reference and signal is high, both flip-flops are reset. Which flip-flop is high determines at that instant whether the reference or signal leads the other. The error signal is the difference between these two flip-flop values. The pole-zero filter is implemented by adding the error signal and its derivative to the filtered error signal. This in turn is integrated to find the oscillator frequency. In practice, one would likely insert other operations into the feedback of this phase-locked loop. For example, if the phase locked loop were to implement a frequency multiplier, the oscillator signal could be divided in frequency before it is compared to the reference signal.


Practical analogies


Automobile race analogy

As an analogy of a PLL, consider a race between two cars. One represents the input frequency, the other the PLL's output voltage-controlled oscillator (VCO) frequency. Each lap corresponds to a complete cycle. The number of laps per hour (a speed) corresponds to the frequency. The separation of the cars (a distance) corresponds to the phase difference between the two oscillating signals. During most of the race, each car is on its own and free to pass the other and lap the other. This is analogous to the PLL in an unlocked state. However, if there is an accident, a yellow caution flag is raised. This means neither of the race cars is permitted to overtake and pass the other car. The two race cars represent the input and output frequency of the PLL in a locked state. Each driver will measure the phase difference (a fraction of the distance around the lap) between themselves and the other race car. If the hind driver is too far away, they will increase their speed to close the gap. If they are too close to the other car, the driver will slow down. The result is that both race cars will circle the track in lockstep with a fixed phase difference (or constant distance) between them. Since neither car is allowed to lap the other, the cars make the same number of laps in a given time period. Therefore the frequency of the two signals is the same.


Clock analogy

Phase can be proportional to time, so a phase difference can be a time difference. Clocks are, with varying degrees of accuracy, phase-locked (time-locked) to a leader clock. Left on its own, each clock will mark time at slightly different rates. A wall clock, for example, might be fast by a few seconds per hour compared to the reference clock at
NIST The National Institute of Standards and Technology (NIST) is an agency of the United States Department of Commerce whose mission is to promote American innovation and industrial competitiveness. NIST's activities are organized into physical sci ...
. Over time, that time difference would become substantial. To keep the wall clock in sync with the reference clock, each week the owner compares the time on their wall clock to a more accurate clock (a phase comparison), and resets their clock. Left alone, the wall clock will continue to diverge from the reference clock at the same few seconds per hour rate. Some clocks have a timing adjustment (a fast-slow control). When the owner compared their wall clock's time to the reference time, they noticed that their clock was too fast. Consequently, the owner could turn the timing adjust a small amount to make the clock run a little slower (frequency). If things work out right, their clock will be more accurate than before. Over a series of weekly adjustments, the wall clock's notion of a second would agree with the reference time (locked both in frequency and phase within the wall clock's stability). An early electromechanical version of a phase-locked loop was used in 1921 in the Shortt-Synchronome clock.


See also

* Frequency-locked loop * Charge-pump phase-locked loop * Carrier recovery * Circle map – A simple mathematical model of the phase-locked loop showing both mode-locking and chaotic behavior. * Costas loop *
Delay-locked loop In electronics, a delay-locked loop (DLL) is a pseudo-digital circuit similar to a phase-locked loop (PLL), with the main difference being the absence of an internal voltage-controlled oscillator, replaced by a delay line. A DLL can be used to ch ...
(DLL) * Direct conversion receiver * Direct digital synthesizer * Kalman filter *
PLL multibit A PLL multibit or multibit PLL is a phase-locked loop (PLL) which achieves improved performance compared to a unibit PLL by using more bits. Unibit PLLs use only the most significant bit (MSB) of each counter's output bus to measure the phase, whi ...
* Shortt–Synchronome clock – Slave pendulum phase-locked to master (ca 1921)


Notes


References


Further reading

*. * * * *. (provides useful Matlab scripts for simulation) *. (provides useful Matlab scripts for simulation) * *. (FM Demodulation) * *. An article on designing a standard PLL IC for Bluetooth applications. *


External links


Phase locked loop primer
– Includes embedded video
Excel Unusual hosts an animated PLL model
and the tutorial
to code such a model
{{Authority control Articles with example MATLAB/Octave code Communication circuits Electronic design Electronic oscillators Radio electronics