Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PLL redirects here. For other uses, see PLL (disam- During most of the race, each car is on its own and the
biguation).
driver of the car is trying to beat the driver of every other
car on the course, and the phase of each car varies freely.
A phase-locked loop or phase lock loop (PLL) is a
control system that generates an output signal whose
phase is related to the phase of an input signal. While
there are several diering types, it is easy to initially visualize as an electronic circuit consisting of a variable
frequency oscillator and a phase detector. The oscillator
generates a periodic signal. The phase detector compares
the phase of that signal with the phase of the input periodic signal and adjusts the oscillator to keep the phases
matched. Bringing the output signal back toward the input signal for comparison is called a feedback loop since
the output is 'fed back' toward the input forming a loop.
1
1.1
Phase can be proportional to time,[1] so a phase dierence can be a time dierence. Clocks are, with varying degrees of accuracy, phase-locked (time-locked) to a
master 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. Over time, that time dierence would become
substantial.
To keep his clock in sync, each week the owner compares
the time on his wall clock to a more accurate clock (a
phase comparison), and he resets his clock. Left alone,
the wall clock will continue to diverge from the reference
clock at the same few seconds per hour rate.
Practical analogies
Some clocks have a timing adjustment (a fast-slow control). When the owner compared his wall clocks time to
the reference time, he noticed that his clock was too fast.
Consequently, he could turn the timing adjust a small
amount to make the clock run a little slower. If things
work out right, his clock will be more accurate. Over a
series of weekly adjustments, the wall clocks notion of
a second would agree with the reference time (within the
wall clocks stability).
History
Spontaneous synchronization of weakly coupled pendulum clocks was noted by the Dutch physicist Christiaan
Huygens as early as 1673.[2] Around the turn of the
19th century, Lord Rayleigh observed synchronization of
weakly coupled organ pipes and tuning forks.[3] 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.[4] Automatic synchronization of electronic oscillators was described in 1923 by Edward Victor Appleton.[5]
3.1 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).[11]
Analog or linear PLL (APLL) Phase detector is an
analog multiplier. Loop lter is active or passive.
Uses a Voltage-controlled oscillator (VCO).
Low-pass lter,
4.3
Clock generation
Applications
3
received and amplied before it can drive the ip-ops
which sample the data, there will be a nite, 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 ip-op
is phase-matched to the received clock. In that type of application, a special form of a PLL called a delay-locked
loop (DLL) is frequently used.[12]
6 ELEMENTS
the phase and frequency of its output until the reference cally built with a frequency synthesizer integrated circuit
and feedback clocks are phase and frequency matched.
and discrete resonator VCOs.
PLLs are ubiquitousthey 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.
4.6
5 Block diagram
A phase detector compares two input signals and produces an error signal which is proportional to their phase
dierence. The error signal is then low-pass ltered 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 at
the other input. This input is called the reference.
Analog phase locked loops are generally built with an analog phase detector, low pass lter and VCO placed in a
negative feedback conguration. 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 PLLs output signal frequency
a rational multiple of the reference frequency. A noninteger 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. This technique is usually referred to as a
fractional-N synthesizer or fractional-N PLL.
6.3
6.1
Oscillator
Phase detector
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
Main article: phase detector
integral (low pass lter) and/or derivative (high pass lter). Loop parameters commonly examined for this are
A phase detector (PD) generates a voltage, which reprethe loops gain margin and phase margin. Common consents the phase dierence between two signals. In a PLL,
cepts in control theory including the PID controller are
the two inputs of the phase detector are the reference inused to design this function.
put and the feedback from the VCO. The PD output voltage is used to control the VCO such that the phase dif- The second common consideration is limiting the amount
ference between the two inputs is held constant, making of reference frequency energy (ripple) appearing at the
it a negative feedback system. There are several types of phase detector output that is then applied to the VCO conphase detectors in the two main categories of analog and trol input. This frequency modulates the VCO and produces FM sidebands commonly called reference spurs.
digital.
The low pass characteristic of this block can be used to
Dierent types of phase detectors have dierent perforattenuate this energy, but at times a band reject notch
mance characteristics.
may also be useful.
For instance, the frequency mixer produces harmonics
The design of this block can be dominated by either of
that adds complexity in applications where spectral purity
these considerations, or can be a complex process jugof the VCO signal is important. The resulting unwanted
gling the interactions of the two. Typical trade-os are:
(spurious) sidebands, also called "reference spurs" can
increasing the bandwidth usually degrades the stability
dominate the lter requirements and reduce the capture
or too much damping for better stability will reduce the
range and lock time well below the requirements. In these
speed and increase settling time. Often also the phaseapplications the more complex digital phase detectors are
noise is aected.
used which do not have as severe a reference spur component on their output. Also, when in lock, the steady-state
phase dierence at the inputs using this type of phase 6.3 Oscillator
detector is near 90 degrees. The actual dierence is determined by the DC loop gain.
Main article: Electronic oscillator
A bang-bang charge pump phase detector must always
have a dead band where the phases of inputs are close
enough that the detector detects no phase error. For this
reason, bang-bang phase detectors are associated with
signicant minimum peak-to-peak jitter, because of drift
within the dead band. However these types, having outputs consisting of very narrow pulses at lock, are very
useful for applications requiring very low VCO spurious
outputs. The narrow pulses contain very little energy and
are easy to lter out of the VCO control voltage. This
results in low VCO control line ripple and therefore low
FM sidebands on the VCO.
6.2
Filter
MODELING
large number of transmit frequencies can be produced The loop lter can be described by system of linear diffrom a single stable, accurate, but expensive, quartz ferential equations
crystalcontrolled 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.
x
xf (t)
= Ax + bxm (t),
= c x,
x(0) = x0 ,
7
7.1
Modeling
Time domain model
x(0) = x0 ,
The equations governing a phase-locked loop with an analog multiplier as the phase detector and linear lter may e = r (t) c (t).
be derived as follows. Let the input to the phase detector
Then the following dynamical system describes PLL bebe xr (r (t)) and the output of the VCO is xc (c (t)) with
havior
phases r (t) and c (t) . Functions xc () and xr () describe waveforms of signals. Then the output of the phase
detector xm (t) is given by
x = Ax + b(e ),
x(0) = x0 , e (0) = 0 .
e = e + gv (c x).
xm (t) = xr (r (t))xc (c (t))
the VCO frequency is usually taken as a function of the
VCO input g(t) as
c (0) = 0 .
7.3
and simple one-pole RC circuit as a lter. The timedomain model takes the form
1
1
x =
x+
Ac Ar sin(r (t)) cos(c (t)),
RC
RC
c = c + gv (c x)
7
F (s) is the loop lter transfer function (dimensionless)
The loop characteristics can be controlled by inserting
dierent types of loop lters. The simplest lter is a onepole RC circuit. The loop transfer function in this case
is:
Ac Ar
sin(r c )
2
x =
1
1 Ac Ar
x+
sin(r c ),
RC
RC 2
1
1 + sRC
o
=
i
s2 +
Kp Kv
RC
Kp Kv
s
RC + RC
This is the form of a classic harmonic oscillator. The denominator can be related to that of a second order system:
c = c + gv (c x).
This system of equations is equivalent to the equation of s2 + 2sn + 2
n
mathematical pendulum
Where
x=
x =
c c
r e c
=
,
gv c
gv c
c
,
gv c
r = r t + ,
Kp Kv
RC
e = r c ,
n =
e = r c = r c ,
1
=
2 Kp Kv RC
Ac Ar
1
1
c r
e
e
sin e =
.
gv c
gv c RC
2RC
gv c RC
Kp Kv F (s)
o
=
i
s + Kp Kv F (s)
Where
o is the output phase in radians
i is the input phase in radians
1
2Kp Kv
c = Kp Kv 2
RC =
F (s) =
1 + sCR2
1 + sC(R1 + R2 )
8 SEE ALSO
Kp Kv
frequency should increase or decrease) % Error signal is
n =
1
given by one or the other ip op signal % Implement
a pole-zero lter by proportional and derivative input to
1
n 2
frequency ltered_ersig = ersig + (ersig - lersig) * deriv;
=
+
2n 1
2
% Keep error signal for proportional output lersig =
The loop lter components can be calculated indepen- ersig; % Integrate VCO frequency using the error signal
dently for a given natural frequency and damping factor freq = freq - 2^16 * ltered_ersig * prop; % Frequency
is tracked as a xed-point binary fraction % Store the
current VCO frequency vcofreq(1, it) = freq / 2^16; %
Kp Kv
Store the error signal to show whether signal or reference
1 =
n2
is higher frequency ervec(1, it) = ersig; end
2 =
2
1
n
Kp Kv
7.4
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 is presented in MATLAB, as this type of phase
detector is robust and easy to implement. This example
uses integer arithmetic rather than oating point, as such
an example is likely more useful in practice.
% 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 lter 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 =
8 See also
Direct-digital synthesis
Costas loop
Kalman lter
Direct conversion receiver
Circle map - a simple mathematical model of the
phase-locked loop showing both mode-locking and
chaotic behavior.
9
Carrier recovery
Delay-locked loop (DLL)
PLL multibit
Shortt-Synchronome clock - slave pendulum phaselocked to master (ca 1921).
References
10 Further reading
Banerjee, Dean (2006), PLL Performance, Simulation and Design Handbook (4th ed.), National Semiconductor.
Best, R. E. (2003), Phase-locked Loops: Design,
Simulation and Applications, McGraw-Hill, ISBN 007-141201-8
de Bellescize, Henri (June 1932), La rception
Synchrone, L'Onde Electrique 11: 230240
Dorf, Richard C. (1993), The Electrical Engineering
Handbook, Boca Raton: CRC Press, ISBN 0-84930185-8
Egan, William F. (1998), Phase-Lock Basics, John
Wiley & Sons. (provides useful Matlab scripts for
simulation)
Egan, William F. (2000), Frequency Synthesis by
Phase Lock (2nd ed.), John Wiley and Sons. (provides useful Matlab scripts for simulation)
10
Gardner, Floyd M. (2005), Phaselock Techniques
(3rd ed.), Wiley-Interscience, ISBN 978-0-47143063-6
Klapper, J.; Frankle, J. T. (1972), Phase-Locked and
Frequency-Feedback Systems, Academic Press. (FM
Demodulation)
Kundert, Ken (August 2006), Predicting the Phase
Noise and Jitter of PLL-Based Frequency Synthesizers (4g ed.), Designers Guide Consulting, Inc.
Liu, Mingliang (February 21, 2006), Build a 1.5-V
2.4-GHz CMOS PLL, Wireless Net Design Line. An
article on designing a standard PLL IC for Bluetooth
applications.
Wolaver, Dan H. (1991), Phase-Locked Loop Circuit
Design, Prentice Hall, ISBN 0-13-662743-9
Signal processing and system aspects of all-digital
phase-locked loops (ADPLLs)
Phase-Locked Loop Tutorial, PLL
Ahissar, E. (1998), Temporal-code to rate-code
conversion by neuronal phase-locked loops, Neural
Computation 10 (3): 597650, PMID 9527836
10 FURTHER READING
11
11
11.1
11.2
Images
11.3
Content license