D5 · Lesson 11 · Phase-locked loops
A feedback loop that makes an oscillator track the phase of an incoming signal, the phase detector, loop filter and controlled oscillator, the second-order loop's natural frequency and damping, its response to a frequency step, noise bandwidth, and frequency synthesizers that multiply a crystal reference
Every radio, every Ethernet port and every processor clock depends on a phase-locked loop. A PLL compares an oscillator's phase with a reference, filters the difference, and nudges the oscillator until the two march in step. Locked to a noisy received carrier, it recovers a clean one for demodulation; locked to a crystal through a frequency divider, it makes a gigahertz clock with the crystal's stability. It's a control loop (D3) whose controlled variable happens to be phase, and the same ideas of damping, bandwidth and stability decide how well it works.
- The phase error of a second-order PLL after the input's frequency jumps by Δf, with loop natural frequency and damping ratio ζ.
- The error rises as the input pulls ahead, then the loop filter's integrator catches up and the error returns to zero: a type-2 loop tracks a frequency step with no lasting phase error.
- A wider loop recovers faster with a smaller peak error, but lets through more of the input's noise.
Predict
A Wi-Fi radio's synthesizer locks to a 1 MHz reference through a divide-by-N counter. What N gives 2.412 GHz, the center of channel 1?
The loop locks when the divided-down VCO matches the reference: , so . Changing N by one moves the output by the 1 MHz reference: the channel step. Channel 6, at 2.437 GHz, needs N = 2437.
Name it
The loop
- A phase detector outputs a signal proportional to the phase difference between the input and the oscillator (a multiplier, an XOR gate or a phase-frequency detector with a charge pump).
- A loop filter, usually proportional plus integral, smooths it.
- A voltage-controlled oscillator (or a numerically controlled one in software) changes its frequency in proportion to the filter's output.
Because frequency is the derivative of phase, the oscillator acts as an integrator in the phase loop. With a PI loop filter the loop is second order, described by a natural frequency and damping ratio ζ (0.707 is the common choice), and it's type 2: a step in the input's frequency leaves no steady phase error.
Frequency step
For a frequency step Δω and ζ < 1, the phase error is
peaking at for ζ = 0.707. If the peak exceeds the phase detector's range, the loop slips cycles before it relocks.
Noise bandwidth
The loop passes input noise within its noise bandwidth
so a narrow loop gives a cleaner recovered carrier but tracks changes slowly.
Synthesizers
Dividing the oscillator by N before the phase detector makes it lock at . A fractional-N divider, switching N between neighbors, gets finer steps from a fast reference.
Worked example
A loop with = 100 Hz and ζ = 0.707 sees a 1 kHz frequency step. What's the peak phase error, and its noise bandwidth?
Show the solution
- Size of the step.
- Peak phase error. At ζ = 0.707 the peak is 0.456 of that:
- Cycle slip. That's more than a phase detector's half-cycle, so the loop would slip a cycle.
- Noise bandwidth.
Answer the peak phase error is 4.56 rad (261°), enough to slip a cycle, and the noise bandwidth is 333 Hz.
Worked example
Why does the sim's peak at ζ = 0.5 come out higher?
Show the solution
- Why it climbs further. With less damping the loop pulls the phase back more gently at first, so the error climbs further before it turns.
- The peak factor.
- Compare the dampings. It's 0.546 at ζ = 0.5, against 0.456 at 0.707 and 0.368 near critical damping.
Answer less damping lets the error climb further before the loop turns it, so the peak factor rises to 0.546 at ζ = 0.5 from 0.456 at 0.707.
Worked example
The loop with = 100 Hz and ζ = 0.707: about how long does it take to lock after a step?
Show the solution
- Decay rate. Its transients decay as , with
- Settling to 2%.
- The trade-off. Narrower loops reject more noise but take longer to lock, which is why many loops start wide and narrow once locked.
Answer it locks in about 9.0 ms.
Check
A synthesizer must make 2437 MHz from a 2 MHz reference. What divider N does it need?
Check
A second-order PLL has = 100 Hz and ζ = 0.5. What's its noise bandwidth?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
A PLL with ζ = 0.707 and = 50 Hz sees the input frequency jump by 50 Hz. What's its peak phase error?
Check
A synthesizer divides by 100 and locks to a 1 MHz reference. What frequency does it make?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
A PLL has natural frequency 100 Hz and damping 0.5.
(a)
About how long does it take to lock after a step?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
(b)
What is its noise bandwidth, ?
Check
A PLL with natural frequency 10 Hz and ζ = 0.707 sees a 100 Hz frequency step.
(a)
What is , which sets the scale of the phase error?
Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.
(b)
At ζ = 0.707 the peak error is about . What is it?
Explain why
Why does a PLL with an integrator in its loop filter end up with no phase error after a frequency step?
After the input's frequency jumps, the oscillator must run at the new frequency to keep up, which requires a new, steady control voltage. With only proportional gain in the loop filter, that voltage can only come from a steady phase error, so some error would remain. An integrator in the loop filter keeps accumulating the phase error for as long as any exists and holds its output once the error is gone, so it can supply the new steady control voltage on its own. The loop therefore settles with the oscillator at the new frequency and the phase error back at zero, which is why practical PLLs use proportional-plus-integral loop filters.
Practice
Keep practicing
8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.