---
title: Frequency synthesis
heading: Integer-N and fractional-N phase-locked loops, in-band noise, jitter and direct digital synthesis
eyebrow: S6 · Lesson 42 · Frequency synthesis
xp: 50
---

::: hook
Every radio needs local oscillators that land exactly on its channels and stay there, with phase noise low enough for the reciprocal mixing of lesson 40 not to bury weak signals. A free-running VCO can't do it: it drifts and, with an on-chip Q of 10 or 20, is noisy close in. A phase-locked loop divides the VCO down, compares it with a crystal reference and steers it, so the output inherits the crystal's stability and, inside the loop bandwidth, a noise floor set by the loop's own circuits multiplied up by the division ratio. How large that ratio is, and how to keep it small, is the central trade in synthesizer design.
:::

::: play
- The curve is a synthesizer's phase noise against offset: inside the loop bandwidth B the PLL's flat in-band noise dominates; outside it the free-running VCO's noise, falling 20 dB per decade, takes over.
- The in-band level is $L_\text{norm} + 10\log_{10}f_\text{PFD} + 20\log_{10}N$: raising N by ten raises it 20 dB.
- Widening the loop suppresses more of the VCO's noise but passes more of the in-band floor and the reference's spurs.
:::

```sim plot
view: graph
x: f = 1..10000 kHz log
y: L = -160..-60 dBc/Hz
slider: N = 10..5000 = 2400 log
slider: B = 10..1000 = 100 kHz log
plot: 10*log(10^((-226 + 10*log(2.4e9/N) + 20*log(N))/10)/(1 + (f/B)^4) + 10^((-120 - 20*log(f/1000))/10)*(f/B)^4/(1 + (f/B)^4)) | label: output phase noise
```

::: predict
## A 2.4 GHz synthesizer for 1 MHz channels uses an integer-N PLL with a 1 MHz reference and a normalized noise floor of −226 dBc/Hz. A fractional-N design runs its detector at 40 MHz instead. How much quieter is its in-band noise?

- [ ] No quieter: the output frequency is the same
- [ ] 32 dB quieter
- [x] 16 dB quieter
- [ ] 6 dB quieter

::: reveal
In-band noise is $L_\text{norm} + 10\log_{10}f_\text{PFD} + 20\log_{10}N$. Integer-N: N = 2400, so −226 + 60 + 67.6 = −98.4 dBc/Hz. Fractional-N: N = 60, so −226 + 76 + 35.6 = −114.4 dBc/Hz. For a fixed output, the in-band noise falls as $10\log_{10}f_\text{PFD}$: 40 times the detector frequency is 16 dB.
:::
:::

::: nameit
## The phase-locked loop

A **phase-frequency detector** (PFD) compares the reference $f_\text{ref}$ with the VCO divided by N; a **charge pump** and **loop filter** turn the difference into the VCO's tuning voltage. In lock $f_\text{out} = Nf_\text{PFD}$.

- **Integer-N**: N is an integer, so the channel spacing equals $f_\text{PFD}$; fine channels force a low $f_\text{PFD}$ and a large N.
- **Fractional-N**: a ΣΔ modulator dithers the divider between integers so the average is $N + K/F$, with steps $f_\text{PFD}/F$ (for a 24-bit modulator, $F = 2^{24}$). $f_\text{PFD}$ can be large and N small; the modulator's quantization noise is shaped to high offsets, where the loop filter removes it.

## Noise inside and outside the loop

Inside the loop bandwidth the output follows the reference path: reference noise and divider and detector noise, multiplied by N. A synthesizer chip's in-band floor is often quoted as a normalized figure of merit:
$$\mathcal{L}_\text{in-band} = \mathcal{L}_\text{norm} + 10\log_{10}f_\text{PFD} + 20\log_{10}N$$
Outside the bandwidth the VCO's own noise appears, high-passed by the loop. The best loop bandwidth puts the crossover where the two curves meet.

## Jitter

Integrating phase noise gives the rms phase error, $\sigma_\phi^2 = 2\int\mathcal{L}(f)\,df$ (both sidebands), and the rms timing jitter is $\sigma_t = \sigma_\phi/(2\pi f_0)$. For a flat level $\mathcal{L}$ over a bandwidth B, $\sigma_\phi = \sqrt{2 \times 10^{\mathcal{L}/10}B}$.

## Direct digital synthesis

A DDS adds a tuning word M to an N-bit phase accumulator every clock, looks up a sine and converts it: $f_\text{out} = Mf_\text{clk}/2^N$, with resolution $f_\text{clk}/2^N$ and instant, phase-continuous hops. Its output is limited to below about 40% of $f_\text{clk}$ and carries spurs from phase truncation and DAC errors; a DDS often serves as a fine-tuned reference for a PLL.
:::

::: example
## A synthesizer's in-band phase noise is a flat −100 dBc/Hz out to 1 MHz, and negligible beyond. What rms phase error and jitter does a 2.4 GHz output have?

::: solution
1. **Rms phase error.**
   $$\begin{aligned} \sigma_\phi &= \sqrt{2 \times 10^{-10} \times 10^6} \\ &= 0.0141\ \text{rad} \end{aligned}$$
   or 0.81°.
2. **Jitter.**
   $$\begin{aligned} t_j &= \frac{0.0141}{2\pi \times 2.4 \times 10^9} \\ &= 0.94\ \text{ps} \end{aligned}$$
3. **Is it good enough.** A 64-QAM signal tolerates about a degree of rms phase error before its error-vector magnitude suffers, so this is near the limit for it.

**Answer:** 0.0141 rad (0.81°) of rms phase error and 0.94 ps of jitter.
:::
:::

::: example
## A DDS has a 32-bit accumulator clocked at 1 GHz. What is its resolution, and what does it actually produce when asked for 100 MHz?

::: solution
1. **Resolution.**
   $$\begin{aligned} \Delta f &= 10^9/2^{32} \\ &= 0.233\ \text{Hz} \end{aligned}$$
2. **Tuning word.** The exact word would be
   $$2^{32} \times 0.1 = 429\,496\,729.6$$
   which rounds to 429 496 730.
3. **Actual output.** That gives 100.000 000 093 MHz, 0.09 Hz high.
4. **Exact frequencies.** Where exact decimal frequencies matter, designers pick clock rates or accumulator lengths that divide evenly.

**Answer:** a 0.233 Hz resolution; asked for 100 MHz, it produces 100.000 000 093 MHz, 0.09 Hz high.
:::
:::

::: example
## A fractional-N PLL runs its detector at 40 MHz with a 24-bit modulator. What is its frequency step, and what N reaches 2412 MHz?

::: solution
1. **Frequency step.**
   $$\begin{aligned} \Delta f &= 40 \times 10^6/2^{24} \\ &= 2.38\ \text{Hz} \end{aligned}$$
2. **Division ratio.**
   $$\begin{aligned} N &= 2412/40 \\ &= 60.3 \end{aligned}$$
   an integer part of 60 and a fractional part of 0.3.
3. **Fractional word.**
   $$\begin{aligned} K &= 0.3 \times 2^{24} \\ &= 5\,033\,164.8 \end{aligned}$$
   which rounds to 5 033 165, leaving a residual error of 0.5 Hz.
4. **Why fractional-N.** Fine resolution from a fast detector is exactly what integer-N can't do.

**Answer:** a 2.38 Hz step; N = 60.3, an integer part of 60 with K = 5 033 165, which leaves a 0.5 Hz error.
:::
:::

::: check
kind: parts
given: f = 900 | 2400 | 5800; c = 0.2 | 1 | 5; n = -226 | -230

## An integer-N synthesizer at {f} MHz must step in {c} MHz channels; its normalized in-band floor is {n} dBc/Hz.

::: part
answer: f/c
tolerance: 0.5%

### What division ratio does it use?

::: misses
- [any] $N = f_\text{out}/f_\text{PFD}$ with $f_\text{PFD}$ equal to the channel spacing.
:::
:::

::: part
answer: n + 10*log(c*1e6) + 20*log(f/c)
unit: dBc/Hz
tolerance: 0.5%

### What is its in-band phase noise?

::: misses
- [n + 10*log(c*1e6) + 10*log(f/c)] The division ratio multiplies phase, so noise power rises as $N^2$: 20 log N.
- [any] $\mathcal{L}_\text{norm} + 10\log_{10}f_\text{PFD} + 20\log_{10}N$.
:::
:::
:::

::: check
kind: parts
given: a = 0.2 | 1; b = 10 | 50 | 100

## A synthesizer's detector frequency is raised from {a} MHz to {b} MHz (fractional-N), for the same output.

::: part
answer: 10*log(b/a)
unit: dB
tolerance: 0.5%

### By how much does its in-band noise fall?

::: misses
- [20*log(b/a)] N falls by the same ratio (−20 log), but the detector term rises by 10 log: net 10 log.
- [any] $10\log_{10}(f_2/f_1)$.
:::
:::
:::

::: check
kind: parts
given: L = -110 | -100 | -90; B = 0.1 | 1 | 10; f = 1 | 2.4 | 10

## A {f} GHz synthesizer has a flat phase noise of {L} dBc/Hz over {B} MHz, and none beyond.

::: part
answer: sqrt(2*10^(L/10)*B*1e6)*180/pi
unit: °
tolerance: 0.5%

### What is its rms phase error?

::: misses
- [sqrt(10^(L/10)*B*1e6)*180/pi] Count both sidebands: $\sigma_\phi^2 = 2\mathcal{L}B$.
- [any] $\sqrt{2\times10^{\mathcal{L}/10}B}$ rad.
:::
:::

::: part
answer: sqrt(2*10^(L/10)*B*1e6)/(2*pi*f*1e9)*1e12
unit: ps
tolerance: 0.5%

### What is its rms jitter?

::: misses
- [any] $\sigma_\phi/(2\pi f_0)$.
:::
:::
:::

::: check
kind: parts
given: N = 24 | 28 | 32; c = 0.5 | 1 | 3.5; f = 10 | 70 | 140

## A DDS has an {N}-bit accumulator clocked at {c} GHz and is asked for {f} MHz.

::: part
answer: c*1e9/2^N
unit: Hz
tolerance: 0.5%

### What is its frequency resolution?

::: misses
- [any] $f_\text{clk}/2^N$.
:::
:::

::: part
answer: round(f*1e6/(c*1e9)*2^N)
tolerance: 0

### What tuning word gives the nearest frequency?

::: misses
- [any] Round $2^Nf_\text{out}/f_\text{clk}$.
:::
:::
:::

::: check
kind: parts
given: L = -150 | -140; r = 10 | 100; f = 1 | 10

## A {r} MHz crystal reference has {L} dBc/Hz of phase noise at 1 kHz; the loop multiplies it to {f} GHz.

::: part
answer: f*1000/r
tolerance: 0.5%

### What is the multiplication ratio?

::: misses
- [any] $f_\text{out}/f_\text{ref}$.
:::
:::

::: part
answer: L + 20*log(f*1000/r)
unit: dBc/Hz
tolerance: 0.5%

### What phase noise does the reference contribute at the output, 1 kHz off?

::: misses
- [L + 10*log(f*1000/r)] Multiplying frequency by N multiplies phase deviations by N: 20 log N.
- [any] $\mathcal{L}_\text{ref} + 20\log_{10}N$.
:::
:::
:::

::: check
kind: parts
given: p = 10 | 40 | 100; F = 16 | 20 | 24

## A fractional-N PLL runs its detector at {p} MHz with an {F}-bit modulator.

::: part
answer: p*1e6/2^F
unit: Hz
tolerance: 0.5%

### What is its frequency step?

::: misses
- [any] $f_\text{PFD}/2^F$.
:::
:::
:::

::: check
kind: choice

## Why does a synthesizer's phase noise look like the reference's (times N) close to the carrier and like the free-running VCO's far from it?

- [ ] The VCO only produces noise far from the carrier
- [x] Inside the loop bandwidth the loop corrects the VCO's slow phase wander, so the output follows the multiplied reference and detector; beyond it the loop can't respond fast enough, so the VCO's own noise passes through
- [ ] The reference only has noise near the carrier
- [ ] The divider filters the VCO's noise at high offsets

::: misses
- [1] A VCO's noise is largest close in; the loop suppresses it there.
- [3] The reference's noise reaches every offset, but the loop filters it beyond its bandwidth.
- [4] Dividers don't filter; they scale phase.
:::
:::

::: check
kind: derivation
vars: n = -235..-215, p = 1e5..1e8, f = 1e8..1e10

## A synthesizer with normalized floor n runs its detector at p and outputs f.

::: step
answer: f/p

### What is N?
:::

::: step
answer: n + 10*log(p) + 20*log(f/p)

### What is its in-band phase noise?
:::

::: step
answer: n + 20*log(f) - 10*log(p)

### Written without N?
:::

::: right
Right. For a given output, in-band noise falls 10 dB for every tenfold increase in detector frequency.
:::
:::

::: check
kind: python

## Write `jitter_ps(f0, offsets, L_dbc)`: the rms jitter of a carrier at f0 hertz whose single-sideband phase noise is L_dbc (a list, dBc/Hz) at the given offsets (a list, increasing), integrating $2\cdot10^{\mathcal{L}/10}$ by the trapezoid rule between consecutive points.

```python starter
def jitter_ps(f0, offsets, L_dbc):
    return 0.0
```

```python solution
import math

def jitter_ps(f0, offsets, L_dbc):
    s = 0.0
    for i in range(len(offsets) - 1):
        a = 2 * 10 ** (L_dbc[i] / 10)
        b = 2 * 10 ** (L_dbc[i + 1] / 10)
        s += (a + b) / 2 * (offsets[i + 1] - offsets[i])
    return math.sqrt(s) / (2 * math.pi * f0) * 1e12
```

```python tests
assert abs(jitter_ps(2.4e9, [0, 1e6], [-100, -100]) - 0.938) < 0.001, "Flat −100 dBc/Hz over 1 MHz at 2.4 GHz: 0.94 ps."
f = [10 ** (3 + k / 100) for k in range(401)]
L = [-100 if x <= 1e5 else -100 - 20 * math.log10(x / 1e5) for x in f]
j = jitter_ps(1e9, f, L)
assert 0.97 < j < 1.03, "A 100 kHz loop with −20 dB/decade beyond: about 1.0 ps at 1 GHz."
```

::: right
Right. With the noise falling 20 dB per decade beyond the loop, the region outside adds about as much as the flat region inside.
:::
:::

::: explain
## Why is fractional-N synthesis preferred when a radio needs both fine channel spacing and low phase noise?

::: model
In an integer-N loop the output can only move in steps equal to the detector frequency, so fine channels force a low detector frequency and a large division ratio. The loop's in-band noise is the detector's noise multiplied by the division ratio squared, so a large N means high phase noise close to the carrier, and a low detector frequency also forces a narrow loop that settles slowly and suppresses little of the VCO's noise. A fractional-N loop averages between integer division ratios, so it can run its detector fast with a small N while still stepping in hertz; the cost is the modulator's quantization noise and fractional spurs, which careful noise shaping pushes to offsets the loop filter removes.
:::
:::

::: practice
::: check
given: f = 1800 | 5200; c = 0.2 | 5
answer: f/c
tolerance: 0.5%

## Integer-N division ratio for {f} MHz in {c} MHz steps?

::: misses
- [any] $f_\text{out}/f_\text{PFD}$.
:::
:::

::: check
given: L = -105 | -95; B = 0.3 | 3; f = 2 | 6
answer: sqrt(2*10^(L/10)*B*1e6)/(2*pi*f*1e9)*1e12
unit: ps
tolerance: 0.5%

## Jitter at {f} GHz from flat {L} dBc/Hz over {B} MHz?

::: misses
- [any] $\sqrt{2\times10^{\mathcal{L}/10}B}/(2\pi f_0)$.
:::
:::

::: check
given: N = 28 | 32; c = 0.25 | 2
answer: c*1e9/2^N
unit: Hz
tolerance: 0.5%

## DDS resolution: {N} bits at {c} GHz?

::: misses
- [any] $f_\text{clk}/2^N$.
:::
:::
:::
