EE Primers · Sensing & Analog · Clocking · Phase-locked loops

The phase-locked loop: six circuits that make a clean clock

A phase-locked loop (PLL) takes a slow, accurate reference, usually a crystal, and produces a fast clock whose frequency is an exact multiple of it and whose edges stay in a fixed phase relationship with it. Every SoC, SerDes, radio, ADC and DDR interface has at least one. This page takes the modern charge-pump PLL apart: the reference oscillator, phase-frequency detector, charge pump, loop filter, voltage-controlled oscillator and feedback divider, each with the transistor- or gate-level circuit that does the job. It then builds the loop up one block at a time, draws the whole PLL as one schematic with every section marked, designs a 25 MHz → 2.5 GHz synthesizer with real component values, and follows that PLL cycle by cycle from power-up to lock in an interactive simulation.

The short version

  1. A PLL is a feedback loop on phase. It divides its own output by \(N\), compares that with the reference, and steers the oscillator until the two match in phase. Matching phase forces the frequency to be exactly \(N \times f_{\text{ref}}\).
  2. The phase-frequency detector (PFD) measures the timing error. Two flip-flops and an AND gate produce an UP pulse when the reference edge comes first and a DN pulse when the divided clock comes first. The pulse width is the error.
  3. The charge pump turns the pulse into charge. Two switched current sources push \(+I_{\text{CP}}\) or pull \(-I_{\text{CP}}\) for exactly the pulse width.
  4. The loop filter stores and smooths that charge. A capacitor integrates it (memory of the right frequency), a series resistor adds an immediate kick (stability), and a small shunt capacitor removes the ripple.
  5. The VCO converts the filter voltage to frequency, and integrates frequency into phase. The divider brings that phase back down to the reference rate.
  6. Loop bandwidth is the main design choice. Inside it the output follows the reference (and its noise, multiplied by \(N\)); outside it the output has the VCO's own noise. A good default is a bandwidth of \(f_{\text{ref}}/10\) to \(f_{\text{ref}}/30\) with 50–65° phase margin.
01 · The job

What a PLL does, and why it is needed

Quartz crystals make excellent clocks: a 25 MHz crystal is accurate to a few tens of ppm and has very low phase noise close to the carrier. But crystals are only practical up to about 50–100 MHz in fundamental mode, and one crystal gives one frequency. A chip needs 2.5 GHz for its SerDes, 1.6 GHz for DDR, 800 MHz for the CPU and perhaps a programmable radio frequency. Oscillators that run at those frequencies (LC tanks, ring oscillators) are easy to integrate but drift with temperature and supply and have poor close-in noise.

A PLL combines the two. The on-chip oscillator provides the high frequency; the crystal provides the accuracy. Feedback forces the oscillator, divided by \(N\), to stay in phase with the crystal, so

$$f_{\text{out}} = N \cdot f_{\text{ref}} \qquad\text{exactly, on average, with no accumulated error.}$$

The same structure is used for four jobs: frequency synthesis (make \(N \times f_{\text{ref}}\), including programmable channels), clock de-skew (align an internal clock tree with an external clock, often done with a delay-locked loop instead), jitter cleaning (a narrow-bandwidth PLL follows a noisy clock's average frequency but rejects its fast jitter), and clock and data recovery (the reference is the data itself; see the CDR primer).

Fig 1. The charge-pump PLL. Colours match the sections in the full schematic of Fig 12. Signals in the loop: reference phase \(\varphi_{\text{ref}}\), divided phase \(\varphi_{\text{div}}\), pump current \(i_{\text{CP}}\), control voltage \(V_{\text{ctrl}}\), output \(f_{\text{out}}\).
02 · The key idea

Lock phase and the frequency follows

Phase is the integral of frequency. An oscillator running at \(f(t)\) has accumulated phase

$$\varphi(t) = 2\pi \int_0^t f(\tau)\, d\tau \qquad\Longleftrightarrow\qquad f(t) = \frac{1}{2\pi}\frac{d\varphi}{dt}$$

If two clocks keep a constant phase difference, their phase slopes are equal, so their frequencies are equal. If the divided VCO were even 1 ppm faster than the reference, its phase would pull ahead by one full cycle every \(10^6\) reference periods, and a phase detector would see that. Locking phase is therefore a stronger condition than locking frequency, and it is what gives a PLL zero long-term frequency error. A frequency-locked loop (comparing counts) can only get to within its counting resolution.

This is also why the VCO counts as an integrator in the loop: a step in control voltage is a step in frequency, which is a ramp in phase. That integrator is free, it comes with every oscillator, and it is half of the reason a PLL can be built as a type-II loop with zero static phase error.

Lock means the divided clock's edges arrive at a fixed time relative to the reference edges, cycle after cycle, with only small jitter. In an ideal charge-pump PLL that fixed offset is zero: the edges coincide.

03 · Component A

Reference oscillator: the Pierce crystal oscillator

The reference sets the PLL's accuracy and its noise inside the loop bandwidth. Almost every chip uses the same circuit: a CMOS inverter used as an amplifier, with the crystal and two load capacitors as its feedback network, the Pierce oscillator.

  • Inverter + \(R_f\): a 1 MΩ feedback resistor biases the inverter at its switching point, \(V_{DD}/2\), where it has high gain \(g_m\). It is a linear amplifier with 180° phase shift.
  • Crystal + \(C_1\), \(C_2\): near its series resonance the crystal looks like an inductor. With \(C_1\) and \(C_2\) to ground it forms a π network that adds another 180°, giving 360° around the loop at one frequency.
  • \(R_s\): limits the drive level into the crystal (too much ages or cracks it) and adds a little phase lag that suppresses overtones.
  • Output buffer: a second inverter or a comparator squares the sine-like waveform into the reference clock \(f_{\text{ref}}\) for the PFD.
Fig 2. Pierce crystal oscillator (section A of Fig 12). The crystal's motional model (\(L_m\), \(C_m\), \(R_m\) in parallel with \(C_0\)) is shown to the right.
$$C_L = \frac{C_1 C_2}{C_1 + C_2} + C_{\text{stray}} \qquad R_{\text{neg}} = -\frac{g_m}{\omega^2 C_1 C_2} \qquad \text{start-up: } |R_{\text{neg}}| \ge 3\text{–}5 \times R_m$$

Example. A 25 MHz crystal specified for \(C_L\) = 10 pF, with about 3 pF of stray: \(C_1 = C_2 = 14\) pF. With an inverter \(g_m\) of 5 mS, \(|R_{\text{neg}}| = 5\ \text{mS} / ((2\pi \cdot 25\ \text{MHz})^2 \cdot 14\ \text{pF} \cdot 14\ \text{pF}) \approx 1\ \text{k}\Omega\), twenty times a typical 50 Ω motional resistance: it starts reliably. Getting \(C_L\) wrong pulls the frequency by roughly 10–20 ppm per pF.

04 · Component B

Phase-frequency detector: two flip-flops and an AND gate

The PFD compares the rising edges of REF and DIV (the divided VCO). It has three states: UP, DN, and neither. Its circuit is two D flip-flops with their D inputs tied high:

  • A rising REF edge clocks a 1 into the top flip-flop: UP goes high.
  • A rising DIV edge clocks a 1 into the bottom flip-flop: DN goes high.
  • When both are high, the AND gate fires and, after a short reset delay \(\tau_{\text{rst}}\), clears both.

So UP is high from the REF edge until the DIV edge (if REF came first), or DN is high from the DIV edge until the REF edge (if DIV came first). The pulse width equals the time error, and its sign says which way to correct.

Fig 3. Phase-frequency detector (section B of Fig 12). Both flip-flops are reset together by the AND gate through the delay \(\tau_{\text{rst}}\).
Fig 4. PFD timing. Pick a case: the pulse widths follow the edge timing. In the frequency case DIV is slower, extra REF edges arrive while UP is already high and are ignored, so UP stays high most of the time: the PFD reports the sign of the frequency error.

Why it detects frequency too

A plain XOR or mixer phase detector gives an output that is periodic in phase error. With a frequency difference the phase error sweeps through all values and the average output is zero, so the loop gets no direction to move. The PFD's memory changes that. Once UP is set, further REF edges do nothing until a DIV edge arrives. If REF is faster, UP is set much more often than DN, the average is positive across the whole sweep, and the loop is driven the right way no matter how large the error. That is why a charge-pump PLL locks from almost any starting frequency within the VCO's range, with no separate frequency-acquisition circuit.

Transfer characteristic

Averaged over a reference period, the PFD + charge pump delivers a current proportional to the phase error over a range of \(\pm 2\pi\):

$$\bar i_{\text{CP}} = \frac{I_{\text{CP}}}{2\pi}\,\Delta\varphi \quad\Rightarrow\quad K_{\text{PD}} = \frac{I_{\text{CP}}}{2\pi}\ \ [\text{A/rad}], \qquad |\Delta\varphi| < 2\pi$$
Fig 5. Average charge-pump current against phase error. Linear over ±2π; beyond that the PFD saturates at ±ICP on average rather than wrapping back to zero, which is the frequency-detection property.
Dead zoneWhy the reset delay? Without it, a very small phase error produces UP and DN pulses too narrow for the charge-pump switches to turn fully on, so tiny errors produce no current: a dead zone around lock where the loop does not respond and the output wanders. \(\tau_{\text{rst}}\) (typically 100–300 ps, from a few inverters) guarantees that at lock both UP and DN are on for at least \(\tau_{\text{rst}}\) every cycle. Their currents cancel, and any error just widens one of the two pulses.
05 · Component C

Charge pump: two switched current sources

The charge pump converts the PFD's timing into a precise quantity of charge, \(Q = I_{\text{CP}}\,\Delta t\). It is a PMOS current source switched onto the output by UP and an NMOS current sink switched by DN. In Fig 6, M1 and M5 share one reference current \(I_{\text{REF}}\); M2 and M6 mirror it to make \(I_{\text{CP}}\). M3 and M4 are the switches: M3 (PMOS) conducts when \(\overline{\text{UP}}\) is low, M4 (NMOS) when DN is high.

Why current and not voltage? A current into a capacitor is an exact integrator: \(V = Q/C\) no matter what voltage the capacitor is already at, so long as the current sources stay in saturation. That gives the loop its second integrator, and makes the gain \(K_{\text{PD}} = I_{\text{CP}}/2\pi\) independent of supply and \(V_{\text{ctrl}}\).

Fig 6. Charge pump at transistor level (section C of Fig 12). Choose a PFD state to see where the current flows.

What goes wrong in real charge pumps

  • UP/DN current mismatch. M2 and M6 have different output resistance, so \(I_{\text{UP}} \ne I_{\text{DN}}\) away from mid-rail. At lock, both are on for \(\tau_{\text{rst}}\); a mismatch leaves net charge each cycle, the loop compensates with a static phase offset, and the periodic correction appears as reference spurs at \(f_{\text{out}} \pm f_{\text{ref}}\). Cascoded sources and a replica-biased (op-amp) charge pump reduce it.
  • Charge sharing and injection. When a switch opens, the node between it and its current source is at a different voltage from the output; when it next closes, that node's charge jumps onto the filter. Switching on the source side, a unity-gain buffer that holds the internal nodes at \(V_{\text{ctrl}}\), and dummy switches help.
  • Leakage. Any leakage on \(V_{\text{ctrl}}\) (varactor, ESD diodes, off switches) must be replaced by the pump every cycle, again as a static phase offset: \(\Delta t = (I_{\text{leak}}/I_{\text{CP}}) \cdot T_{\text{ref}}\).
  • Compliance. The sources leave saturation within a few hundred mV of the rails, so the usable \(V_{\text{ctrl}}\) range is narrower than the supply. Size \(K_{\text{VCO}}\) so the target frequencies land mid-range across PVT.
06 · Component D

Loop filter: memory, kick and smoothing

The loop filter is the impedance the charge pump drives. Its voltage is \(V_{\text{ctrl}}\). The standard filter is passive, three components, and each has a separate job:

  • \(C_1\): the memory. It integrates the pump current. At lock it holds exactly the voltage that sets the VCO to \(N f_{\text{ref}}\), with zero average current in. This is the integrator that makes the loop type II.
  • \(R_1\): the kick. Current through \(R_1\) produces an immediate voltage step \(I_{\text{CP}} R_1\) that lasts as long as the pulse. It is a proportional path, adds a zero at \(\omega_z = 1/R_1C_1\), and supplies the phase lead the loop needs to be stable.
  • \(C_2\): the smoothing. Without it, every pulse would put a voltage step \(I_{\text{CP}} R_1\) straight on the VCO. \(C_2\) (typically \(C_1/10\) to \(C_1/20\)) absorbs that, at the cost of a pole \(\omega_p\) above the bandwidth.
  • \(R_3\), \(C_3\) (optional): an extra RC pole after \(C_2\) for more attenuation of reference ripple (third-order filter, fourth-order loop). Put its pole about 5–10× above the crossover.
Fig 7. Passive loop filter (section D of Fig 12). The dashed R3/C3 stage is optional.
$$Z(s) = \frac{V_{\text{ctrl}}}{i_{\text{CP}}} = \frac{1 + s R_1 C_1}{s\,(C_1 + C_2)\,\bigl(1 + s R_1 \tfrac{C_1 C_2}{C_1 + C_2}\bigr)} \qquad \omega_z = \frac{1}{R_1 C_1} \qquad \omega_p = \frac{C_1 + C_2}{R_1 C_1 C_2}$$
Active filtersAn op-amp integrator can replace the passive filter when the VCO needs a wider control range than the charge pump can deliver (discrete PLLs with high-voltage varactors). It adds the op-amp's noise and needs its bandwidth well above the loop's. On-chip PLLs almost always use the passive form, and large \(C_1\) values are reduced with capacitance multipliers or a separate, smaller integral-path pump.
07 · Component E

Voltage-controlled oscillator

The VCO turns \(V_{\text{ctrl}}\) into frequency. Near the operating point it is linear: \(f = f_0 + K_{\text{VCO}}\,V_{\text{ctrl}}\), with \(K_{\text{VCO}}\) in Hz/V (or \(2\pi\) times that in rad/s/V for the loop equations). Two circuits cover almost every case.

LC VCO (cross-coupled pair). An inductor and capacitor resonate at \(f = 1/(2\pi\sqrt{LC})\). The tank's loss is equivalent to a parallel resistance \(R_p = Q\,\omega L\). The cross-coupled NMOS pair M1/M2 is a negative resistance of \(-2/g_m\) across the tank; when \(g_m R_p / 2 > 1\) (designed for 2–3× margin) oscillation builds until limited by the tail current \(I_{\text{tail}}\). The tuning element is a pair of MOS varactors whose capacitance depends on \(V_{\text{ctrl}}\). A switched capacitor bank (not drawn) selects a coarse band; the varactor fine-tunes within it, which keeps \(K_{\text{VCO}}\) small and the noise low. Used for multi-GHz synthesizers, SerDes and RF: low phase noise, narrow range (10–20 %), needs an inductor.

Ring VCO (current-starved inverters). An odd number \(n\) of inverters in a loop oscillates at \(f = 1/(2 n t_d)\). Limiting each inverter's current with transistors controlled by \(V_{\text{ctrl}}\) changes the delay \(t_d \approx C_{\text{load}} V_{DD}/(2 I)\), so frequency is roughly proportional to the starving current. Used for digital clocks and wide-range PLLs: small, very wide tuning range (often 10:1), multiple phases for free, but 10–20 dB worse phase noise than an LC VCO at the same power.

Fig 8. VCO circuits (section E of Fig 12 uses the LC version).

Example. For 2.5 GHz with a 2 nH differential inductor, the tank needs \(C = 1/(\omega^2 L) \approx 2.0\) pF in total. With an inductor \(Q\) of 10, \(R_p = Q\omega L \approx 314\ \Omega\), so each side of the pair needs \(g_m > 2/R_p \approx 6.4\) mS; design for about 15 mS. For the worked example below the VCO tunes from 2.18 GHz at \(V_{\text{ctrl}} = 0\) V with \(K_{\text{VCO}} = 400\) MHz/V, so 2.5 GHz falls at 0.8 V, mid-range.

08 · Component F

Feedback divider: from GHz back to the reference rate

The divider produces one output edge for every \(N\) VCO cycles, so the PFD compares \(f_{\text{VCO}}/N\) with \(f_{\text{ref}}\). It divides phase too: a one-cycle error at the VCO is \(2\pi/N\) at the PFD, which is why \(1/N\) appears in the loop gain.

  • ÷2: a D flip-flop with \(\overline{Q}\) fed back to D toggles on every clock edge. At multi-GHz the first stages are CML or TSPC (true single-phase clock) latches.
  • ÷2k: cascade k toggle stages. Simple, but only powers of two.
  • Any integer N: pulse-swallow divider. A fast dual-modulus prescaler divides by \(P\) or \(P+1\). A program counter \(M\) and a swallow counter \(S\) run at the slow rate. For each output cycle the prescaler divides by \(P+1\) for \(S\) of its cycles and by \(P\) for the other \(M - S\), so \(N = (P+1)S + P(M-S) = PM + S\). Only the prescaler runs at full speed.

Changing \(N\) by one moves the output by \(f_{\text{ref}}\): that is the channel step of an integer-N synthesizer. A fractional-N PLL toggles \(N\) between neighbouring integers with a sigma-delta modulator so the average is fractional, which allows a high \(f_{\text{ref}}\) (wide bandwidth, low noise) with fine steps.

Fig 9. Divider circuits (section F of Fig 12 uses the pulse-swallow divider).
09 · Supporting circuits

Lock detector and output buffer

Lock detector. At lock, UP and DN are both just \(\tau_{\text{rst}}\) wide. OR them together and sample the result with a copy of REF delayed by \(\tau_{\text{LD}}\) (a little more than \(\tau_{\text{rst}}\)). If the pulses are still high at that moment, the phase error is larger than \(\tau_{\text{LD}}\): reset a counter. If the sample is low for, say, 64 consecutive cycles, assert LOCK. Software waits for LOCK before switching a clock mux or enabling a SerDes.

Output buffer. The VCO tank is a sensitive node: loading it changes the frequency and couples noise in. A CML buffer or inverter chain isolates it and drives the clock distribution. A post-divider (÷1, ÷2, ÷4…) after the buffer lets one VCO band cover several output frequencies.

Fig 10. Lock detector (section G of Fig 12).
10 · Building the system

Assembling the loop one block at a time

Each block is in the loop for a reason. Step through the build to see what each one fixes.

11 · The whole circuit

The complete PLL schematic

Fig 12 joins the circuits of sections 3–9. Each dashed region is one section, lettered as in the text. Follow the loop clockwise: crystal reference (A) → PFD (B) → charge pump (C) → loop filter (D) → LC VCO (E) → output buffer → back through the pulse-swallow divider (F) to the PFD's second input. The lock detector (G) watches UP and DN.

Fig 12. Complete integer-N charge-pump PLL. Values are those of the worked example: 25 MHz reference, N = 100 (P = 8, M = 12, S = 4), ICP = 200 µA, R1 = 8.2 kΩ, C1 = 68 pF, C2 = 5.6 pF, KVCO = 400 MHz/V, fout = 2.5 GHz.
SectionCircuitInput → outputGain in the linear model
A · ReferencePierce crystal oscillator + squaring buffer— → REF edgessource of \(\varphi_{\text{ref}}\)
B · PFD2 × DFF, AND, reset delayREF, DIV edges → UP/DN pulse width\(K_{\text{PD}} = I_{\text{CP}}/2\pi\) [A/rad]
C · Charge pumpswitched PMOS source, NMOS sink, mirrorspulse width → charge
D · Loop filter\(R_1\)–\(C_1\) series, \(C_2\) shuntcurrent → \(V_{\text{ctrl}}\)\(Z(s)\) [V/A]
E · VCOLC tank, cross-coupled NMOS, varactors\(V_{\text{ctrl}}\) → frequency → phase\(K_{\text{VCO}}/s\) [rad/V]
F · Divider÷8/9 prescaler + M and S counters\(f_{\text{VCO}}\) → \(f_{\text{VCO}}/N\)\(1/N\)
G · Lock detectOR, delayed-REF sampler, counterUP, DN → LOCKoutside the loop
12 · Analysis

The linear model and stability

Near lock, the PFD's pulses are short and the loop can be treated as continuous: replace each block by its average gain in the phase domain (valid while the bandwidth is below about \(f_{\text{ref}}/10\)).

Fig 13. Phase-domain model of the charge-pump PLL.
$$G(s) = \frac{I_{\text{CP}}\,K_{\text{VCO}}}{2\pi N}\cdot\frac{Z(s)}{s} = \frac{I_{\text{CP}}\,K_{\text{VCO}}}{2\pi N\,(C_1+C_2)}\cdot\frac{1 + s/\omega_z}{s^2\,(1 + s/\omega_p)}$$ $$H(s) = \frac{\varphi_{\text{out}}}{\varphi_{\text{ref}}} = \frac{N\,G(s)}{1 + G(s)} \qquad \text{(low-pass, DC gain } N\text{)} \qquad \frac{\varphi_{\text{out}}}{\varphi_{\text{VCO}}} = \frac{1}{1 + G(s)} \qquad \text{(high-pass)}$$

Three results follow directly.

  • Zero static error. Two integrators (\(1/s^2\)) mean infinite DC loop gain: the loop removes any constant phase or frequency offset.
  • Stability from the zero. At low frequency \(\angle G = -180^\circ\). The zero lifts the phase toward −90°, the pole pulls it back down. Phase margin is the lift at the crossover \(\omega_c\) where \(|G| = 1\): \(\text{PM} = \arctan(\omega_c/\omega_z) - \arctan(\omega_c/\omega_p)\).
  • Noise shaping. Reference, PFD and charge-pump noise are low-passed and multiplied by \(N\) (\(20\log_{10}N\) dB: 40 dB for \(N\) = 100). VCO noise is high-passed: the loop suppresses it below the bandwidth. The best bandwidth for jitter is roughly where the two contributions cross.

The continuous model ignores the fact that the PFD only samples once per reference period. Gardner's analysis shows the sampled loop goes unstable when \(\omega_c\) approaches \(\omega_{\text{ref}}/\pi\); in practice keep \(f_c \le f_{\text{ref}}/10\) so the continuous model is accurate.

13 · Worked example A

Designing a 25 MHz → 2.5 GHz synthesizer

Specification. 25 MHz crystal reference. 2.5 GHz output (for a 5 Gb/s DDR serializer or a 10GBASE-R ÷4 clock). LC VCO with \(f = 2.18\ \text{GHz} + 400\ \text{MHz/V} \cdot V_{\text{ctrl}}\), usable \(V_{\text{ctrl}}\) 0.2–1.4 V. Charge pump \(I_{\text{CP}}\) = 200 µA. Target loop bandwidth (crossover) 1 MHz, phase margin 60°.

Step 1 · Divider ratio and PFD rate $$N = \frac{f_{\text{out}}}{f_{\text{ref}}} = \frac{2.5\ \text{GHz}}{25\ \text{MHz}} = 100 \qquad f_{\text{PFD}} = 25\ \text{MHz},\ T_{\text{ref}} = 40\ \text{ns}$$

With an 8/9 prescaler: \(N = PM + S = 8 \cdot 12 + 4\). The channel step is 25 MHz; \(N\) = 96…104 covers 2.4–2.6 GHz.

Step 2 · Check the VCO operating point $$V_{\text{ctrl}} = \frac{2.5\ \text{GHz} - 2.18\ \text{GHz}}{400\ \text{MHz/V}} = 0.80\ \text{V} \qquad K_{\text{VCO}} = 2\pi \cdot 400 \times 10^{6} = 2.51 \times 10^{9}\ \text{rad/s/V}$$

Mid-range, with room for ±0.5 V of PVT drift before the charge pump runs out of compliance.

Step 3 · Choose bandwidth and phase margin

\(f_c\) = 1 MHz is \(f_{\text{ref}}/25\): well inside the continuous-time limit. 60° phase margin gives about 2 dB of closed-loop peaking and a fast, lightly ringing step response. Converting PM to time constants (\(T_1 = R_1C_1C_2/(C_1+C_2)\) sets the pole, \(T_2 = R_1C_1\) the zero):

$$T_1 = \frac{\sec\phi - \tan\phi}{\omega_c} = \frac{2 - 1.732}{2\pi \cdot 1\ \text{MHz}} = 42.6\ \text{ns} \qquad T_2 = \frac{1}{\omega_c^2 T_1} = 594\ \text{ns}$$

That puts the zero at 268 kHz and the pole at 3.73 MHz: a factor of 3.73 either side of 1 MHz.

Step 4 · Total capacitance from the gain $$C_1 + C_2 = \frac{I_{\text{CP}} K_{\text{VCO}}}{2\pi N \omega_c^2}\sqrt{\frac{1 + (\omega_c T_2)^2}{1 + (\omega_c T_1)^2}} = \frac{200\ \mu\text{A} \cdot 2.51\times10^{9}}{2\pi \cdot 100 \cdot (6.28\times10^{6})^2}\cdot 3.73 = 75.6\ \text{pF}$$
Step 5 · Split into C₁, C₂ and R₁ $$C_2 = (C_1+C_2)\frac{T_1}{T_2} = 5.43\ \text{pF} \qquad C_1 = 75.6 - 5.43 = 70.2\ \text{pF} \qquad R_1 = \frac{T_2}{C_1} = 8.46\ \text{k}\Omega$$

Nearest standard values: \(C_1\) = 68 pF, \(C_2\) = 5.6 pF, \(R_1\) = 8.2 kΩ. All are practical on chip (68 pF of MOS capacitance is about 0.007 mm² at 10 fF/µm²).

Step 6 · Verify with the rounded values

Recomputing with the rounded parts: crossover \(f_c\) = 0.97 MHz, phase margin 59.1°, zero 285 kHz, pole 3.75 MHz, closed-loop −3 dB bandwidth 1.53 MHz, peaking 1.8 dB. The designer below reproduces these; change any input to see the trade-offs.

Step 7 · Ripple, spurs and static offset

At lock, UP and DN are both on for \(\tau_{\text{rst}}\) = 150 ps. A 5 % UP/DN mismatch leaves \(0.05 \cdot 200\ \mu\text{A} \cdot 150\ \text{ps} = 1.5\) fC per cycle, a 0.27 mV bump on \(C_2\) every 40 ns: a small reference spur, reduced further by an \(R_3C_3\) pole at about 5 MHz. A leakage of 1 nA on \(V_{\text{ctrl}}\) needs a phase offset of \(\Delta t = (1\ \text{nA}/200\ \mu\text{A}) \cdot 40\ \text{ns} = 0.2\) ps: negligible.

Step 8 · Noise budget, in words

Inside ~1 MHz the output's phase noise is the reference's plus 40 dB (\(20\log_{10}100\)), plus PFD/CP noise also multiplied by \(N^2\). Outside, it is the VCO's own. A 25 MHz crystal at −150 dBc/Hz becomes about −110 dBc/Hz at 2.5 GHz in band; a good LC VCO at 1 MHz offset is around −115 dBc/Hz. The two meet close to 1 MHz, so this bandwidth is near the jitter optimum for these parts.

14 · Worked example B

How the APLL locks: cycle by cycle from power-up

Now run the PLL of example A in the time domain. At power-up \(C_1\) and \(C_2\) are discharged, so \(V_{\text{ctrl}}\) = 0 V and the VCO runs at 2.18 GHz: 12.8 % slow. Divided by 100 that is 21.8 MHz against the 25 MHz reference. The table is produced by the same event-driven model as the simulator below (ideal PFD with 150 ps reset delay, ideal charge pump, exact filter), with the first REF edge at t = 0.

CycleREF edge (ns)DIV edge (ns)PulseWidth (ns)Charge into filter (pC)Filter settles to (V)VCO settles to (GHz)Peak \(V_{\text{ctrl}}\) in the cycle (V)
10.0041.58UP41.588.320.1132.2250.99
280.0082.37UP2.370.470.1192.2280.98
3120.00125.19UP5.191.040.1342.2330.53
5200.00210.78UP10.782.160.1852.2540.63
9360.00374.37UP14.372.870.3342.3140.98
10400.00414.15UP14.152.830.3732.3291.02
14560.00571.54UP11.542.310.5112.3841.08
20800.00806.78UP6.781.360.6522.4411.03
301200.001202.15UP2.150.430.7582.4830.89
401600.001600.60UP0.600.120.7892.4950.83
502000.002000.16UP0.160.0320.7972.4990.81
602400.002400.04UP0.040.0080.7992.49970.80

"Width" is the time from the leading edge to the lagging edge; the pulse itself lasts 150 ps longer, and the other output is on for those 150 ps. "Filter settles to" is the voltage once the charge on \(C_2\) has shared itself with \(C_1\), \((C_1V_{C1} + C_2V_{C2})/(C_1+C_2)\): the loop's memory after that cycle. "VCO settles to" is the matching frequency. During a pulse the VCO runs higher than that, pushed by the \(R_1\) kick (last column).

Phase 1 · Frequency acquisition (cycle 1)

REF rises at 0 ns and sets UP. The divider, counting a 2.18 GHz VCO, would not finish its 100 cycles until about 45.9 ns, so the second REF edge at 40 ns arrives while UP is still high and is ignored. This is the PFD's frequency detection at work: a phase detector without memory would now report the wrong sign. UP stays on for 41.6 ns and pushes 8.3 pC into the filter.

Watch where that charge goes. While the pump is on, the current flows mostly into \(C_2\) (the voltage on \(C_1\) cannot change fast through 8.2 kΩ), so \(V_{\text{ctrl}}\) shoots up to about 1 V within a few tens of ns and the VCO briefly runs at 2.57 GHz. That speed-up is what brings the DIV edge in at 41.6 ns instead of 45.9 ns. When the pulse ends, \(C_2\) shares its charge with \(C_1\) through \(R_1\) (time constant \(R_1 C_1 C_2/(C_1+C_2)\) = 43 ns) and the voltage settles to \(Q/(C_1+C_2) = 8.3\ \text{pC}/73.6\ \text{pF} = 0.113\) V: the VCO now idles at 2.225 GHz.

Phase 2 · Slewing (cycles 2–9)

From cycle 2 onward every DIV edge lands a few ns after its REF edge, so each cycle is an UP pulse. Between pulses the VCO is still slow, so the phase lag grows from cycle to cycle (2.4 ns, 5.2, 10.8 … 14.4 ns at cycle 9), each pulse is wider than the last, and the charge per cycle rises toward 2.9 pC. The filter voltage climbs steadily: the loop is slewing, its speed set by \(I_{\text{CP}}\) and \(C_1+C_2\).

Phase 3 · Phase acquisition (cycles 9–40)

At cycle 9 the lag stops growing, although the filter's memory corresponds to only 2.31 GHz. The difference is the proportional path: for 14 ns of each 40 ns cycle the \(R_1\) kick lifts \(V_{\text{ctrl}}\) to about 1 V, and averaged over the cycle the VCO now runs at \(N f_{\text{ref}}\). The resistor does the fast work; the capacitor catches up behind it. From here the lag shrinks every cycle (11.5 ns at cycle 14, 6.8 ns at 20, 2.2 ns at 30), the pulses and the kick shrink with it, and the filter voltage rises to meet the true operating point. This is the small-signal regime of section 12. With these values the filter voltage \(V_{C1}\) does not overshoot. The average VCO frequency does, by about 55 MHz around 0.6 µs: to win back 14 ns of accumulated lag the VCO has to run faster than \(N f_{\text{ref}}\) for a while. Lower phase margin would make \(V_{C1}\) itself ring around 0.8 V.

Phase 4 · Locked (cycle 40 onward)

By cycle 40 (1.6 µs) the error is 0.6 ns and shrinking by about 12 % per cycle. The average output frequency stays within 25 kHz (10 ppm) of 2.5 GHz from 3.2 µs on, about 80 reference cycles, or roughly 3 / \(f_c\) as expected for a 1 MHz loop. \(V_{C1}\) = \(V_{\text{ctrl}}\) = 0.800 V. From here every cycle has UP and DN both on for 150 ps, their currents cancel, and no net charge flows: \(C_1\) remembers the frequency, and the phase detector only has to correct disturbances.

15 · Practice

Design and debug checklist

ItemWhat to checkWhy
Bandwidth\(f_c \le f_{\text{ref}}/10\); at min and max \(K_{\text{VCO}}\), \(I_{\text{CP}}\) and \(N\)Loop gain scales with \(I_{\text{CP}}K_{\text{VCO}}/N\); \(K_{\text{VCO}}\) can vary 2:1 across the band
Phase margin45–65° across cornersLow PM: peaking amplifies in-band noise, ringing lock
VCO rangeTarget frequencies at mid-\(V_{\text{ctrl}}\) across PVT; band select calibratedAt the rails the pump leaves saturation and the loop gain collapses
Charge pumpUP/DN match over the \(V_{\text{ctrl}}\) range; charge sharing; leakageReference spurs and static phase offset
Dead zone\(\tau_{\text{rst}}\) longer than the switches' turn-on timeNo response to small errors → random walk near lock
DividerFirst stage meets max VCO frequency with margin; prescaler modulus timingA missed VCO edge looks like a frequency error; the loop can lock at the wrong frequency or not at all
Supply and substrateSeparate, quiet supply for VCO and CP; guard ringsSupply noise modulates \(f\) through the VCO's supply sensitivity (MHz/V)
ReferenceCrystal load capacitance, drive level, input slew rateWrong \(C_L\) shifts frequency; slow edges add jitter in the PFD, multiplied by \(N\)
Lock detectWindow and count chosen so LOCK does not chatterSoftware trusts it before enabling downstream logic
On the benchA spectrum analyser shows spurs at \(f_{\text{out}} \pm k f_{\text{ref}}\) (charge pump, reference feedthrough) and the loop's bandwidth as the shoulder in the phase-noise plot, where in-band noise meets the VCO's. A phase-noise analyser integrates that plot into rms jitter. Probing \(V_{\text{ctrl}}\) directly loads the filter; use a high-impedance buffer or look at the effect on the spectrum instead.
16 · Self-check

Questions

Why does doubling N (same fref) halve the loop bandwidth if nothing else changes?

The divider appears as \(1/N\) in \(G(s)\). Doubling \(N\) halves the loop gain; with a \(1/s^2\) slope around crossover, \(\omega_c\) drops by about \(\sqrt{2}\) in the pure second-order case and the phase margin also changes because \(\omega_c\) moves relative to the fixed zero and pole. Programmable synthesizers scale \(I_{\text{CP}}\) with \(N\) to keep the dynamics constant across channels.

What happens if you remove R1 from the filter?

The loop becomes two pure integrators with −180° of phase at every frequency: zero phase margin. It oscillates around lock (or with \(C_2\) still present, with negative phase margin, it is unstable).

Why can an XOR phase detector lock on a harmonic or fail to acquire, while a PFD cannot?

An XOR's output depends only on the phase error modulo π and averages to zero when there is a frequency error, so it gives no frequency information. The PFD's flip-flops remember which edge came last; with a frequency error it outputs mostly UP or mostly DN, which drives the VCO the right way from anywhere in its range.

In example B the VCO briefly reached 2.57 GHz during the first pulse, above its target. Why, and does it matter?

During a long pulse the pump current charges \(C_2\) faster than \(R_1\) lets it into \(C_1\), so \(V_{\text{ctrl}}\) rises toward \(V_{C1} + I_{\text{CP}}R_1\) (up to 1.6 V here, limited by the rail). It is a transient during acquisition only and does not matter unless the VCO or divider misbehave at the extreme of the range: check the divider at the maximum VCO frequency, not just the nominal one.

Your 2.5 GHz output has spurs at ±25 MHz. What do you suspect, in order?

Charge-pump mismatch or charge sharing (vary \(V_{\text{ctrl}}\) by changing \(N\) and see if the spur changes), leakage on \(V_{\text{ctrl}}\) (worse when hot), reference feedthrough through supply or substrate. Increase filter attenuation at 25 MHz (add or lower the \(R_3C_3\) pole) if the source can't be fixed.

17 · Sources

References

  1. F. M. Gardner, "Charge-pump phase-lock loops," IEEE Transactions on Communications, vol. COM-28, no. 11, 1980; and Phaselock Techniques, 3rd ed., Wiley, 2005.
  2. B. Razavi, Design of CMOS Phase-Locked Loops: From Circuit Level to Architecture Level, Cambridge University Press, 2020.
  3. D. Banerjee, PLL Performance, Simulation and Design, 5th ed. (Texas Instruments / National Semiconductor), 2017: loop-filter formulas used in example A.
  4. E. A. Vittoz, M. G. R. Degrauwe, S. Bitz, "High-performance crystal oscillator circuits: theory and application," IEEE JSSC, vol. 23, no. 3, 1988.
  5. A. Hajimiri, T. H. Lee, "A general theory of phase noise in electrical oscillators," IEEE JSSC, vol. 33, no. 2, 1998.
  6. B. Razavi (ed.), Phase-Locking in High-Performance Systems, IEEE Press, 2003.
← Relaxation oscillatorOp-amps and feedback →Ethernet MAC–PHY clocking →PCIe reference clocks →