---
title: Carrier and symbol synchronization
heading: Recovering the carrier's phase and the symbol clock from the received signal, squaring, Costas and Mth-power loops, the cost of phase and timing errors, and frame synchronization
eyebrow: S8 · Lesson 22 · Carrier and symbol synchronization
xp: 50
---

::: hook
Every error-rate formula so far assumed the receiver knew the carrier's exact phase and the exact instant to sample each symbol. It doesn't: it has to extract both from the noisy signal itself, which usually contains no pure carrier and no clock tone at all. Synchronization loops, built from the PLL of lesson 6, strip off the modulation and lock onto what's left. How well they do it matters: a QPSK receiver with a 20° phase error loses far more than one with 20° of error on BPSK, because the error doesn't just shrink the signal, it leaks one channel into the other.
:::

::: play
- Bit error probability against Eb/N0 for BPSK and QPSK when the receiver's carrier phase is off by φ (dashed: perfect synchronization).
- BPSK only loses $20\log\cos\phi$ of signal, 0.54 dB at 20°.
- QPSK suffers more: its two channels leak into each other, and at 20° and 9.6 dB its bit error rate is over 200 times worse than with perfect sync.
:::
:::

```sim plot
view: graph
x: E = 4..16 dB
y: P = 1e-9..0.1 log
slider: p = 0..30 = 10 °
plot: Q(sqrt(2*10^(E/10))) | samples: 400 | dashed | color: ch3 | label: perfect sync
plot: Q(sqrt(2*10^(E/10))*cos(p*pi/180)) | samples: 400 | label: BPSK with phase error
plot: 0.5*(Q(sqrt(2*10^(E/10))*(cos(p*pi/180) - sin(p*pi/180))) + Q(sqrt(2*10^(E/10))*(cos(p*pi/180) + sin(p*pi/180)))) | samples: 400 | color: ch2 | label: QPSK with phase error
```

::: predict
## A QPSK carrier-recovery loop locks to the fourth power of the received signal. At how many phases can it settle?

- [ ] One
- [ ] Two
- [x] Four, 90° apart
- [ ] Eight

::: reveal
Raising QPSK to the fourth power removes the modulation (each symbol's phase times four is a multiple of 2π) and leaves a tone at four times the carrier, whose phase the loop tracks. Dividing back by four gives four possible answers 90° apart. Differential encoding (lesson 19) or a known preamble resolves which one is right.
:::
:::

::: nameit
## Carrier recovery

Suppressed-carrier signals need the carrier regenerated.

- **Squaring loop** (BPSK): squaring removes the ±1 modulation, leaving a tone at $2f_c$; a PLL locks to it and its output is divided by 2. Ambiguity of 180°.
- **Costas loop**: multiplies the in-phase and quadrature arms and uses their product as the phase error, equivalent to squaring but working at baseband; it can also make decisions and use them (**decision-directed**).
- **Mth-power loop** (M-PSK): raising to the Mth power leaves $Mf_c$, with ambiguity 360°/M and noise worsened by the power law at low SNR.

A frequency offset Δf rotates the constellation by $360°\,\Delta f\,T_s$ per symbol until the loop removes it.

## The cost of phase error

- BPSK: $P_b = Q\left(\sqrt{2E_b/N_0}\cos\phi\right)$, a loss of $20\log\cos\phi$ dB.
- QPSK: each channel receives $\cos\phi$ of its own signal plus $\pm\sin\phi$ of the other's,

$$P_b = \frac{1}{2}\left[Q\left(\sqrt{\frac{2E_b}{N_0}}(\cos\phi - \sin\phi)\right) + Q\left(\sqrt{\frac{2E_b}{N_0}}(\cos\phi + \sin\phi)\right)\right]$$

Denser constellations are more sensitive still: 64-QAM needs phase errors of a degree or two.

## Symbol timing

**Early–late gate**, **Gardner** and **Mueller–Müller** detectors compare samples around the expected instant and steer the sampling clock. A timing error ε reduces the eye opening, more for small rolloff β.

## Frame synchronization

A known **preamble** is correlated against the received bits or symbols; its correlation peak marks the frame start. Barker sequences have peak N and sidelobes no larger than 1, a peak-to-sidelobe ratio of $20\log N$ (22.3 dB for N = 13).
:::

::: example
## A BPSK link at 9.6 dB has a 20° carrier phase error. What's its bit error rate?

::: solution
1. **Amplitude loss.** The useful amplitude falls by
   $$\cos 20° = 0.940$$
   a 0.54 dB loss.
2. **Bit error rate.**
   $$\begin{aligned} P_b &= Q(4.27 \times 0.940) \\ &= Q(4.01) \\ &= 3.0 \times 10^{-5} \end{aligned}$$
   three times worse than the ideal 10⁻⁵.

**Answer:** the bit error rate is 3.0 × 10⁻⁵, three times the ideal 10⁻⁵.
:::
:::

::: example
## The same 20° error on QPSK at 9.6 dB: how bad is it, and what about 10°?

::: solution
1. **At 20°.**
   $$\begin{aligned} P_b &= \frac{1}{2}[Q(4.27(0.940 - 0.342)) \\ &\quad + Q(4.27(0.940 + 0.342))] \\ &= \frac{1}{2}[Q(2.55) + Q(5.48)] \\ &= 2.7 \times 10^{-3} \end{aligned}$$
2. **At 10°.**
   $$P_b = 1.3 \times 10^{-4}$$
3. **Why QPSK is touchier.** QPSK's channels interfere, so its phase tolerance is much tighter than BPSK's.

**Answer:** 2.7 × 10⁻³ at 20° and 1.3 × 10⁻⁴ at 10°.
:::
:::

::: example
## How much carrier phase error can 64-QAM tolerate before its corner points cross a decision boundary, ignoring noise?

::: solution
1. **Distance to a boundary.** Points are 2d apart, so decision boundaries sit d from each point.
2. **How far the corner moves.** The corner point is at radius $7\sqrt2\,d$, and a rotation φ moves it about $7\sqrt2\,d\,\phi$ sideways.
3. **Largest rotation.** It reaches the boundary at
   $$\begin{aligned} \phi &= \frac{1}{7\sqrt2} \\ &= 0.101\ \text{rad} \\ &= 5.8° \end{aligned}$$
4. **With noise.** Noise uses up most of the margin, so practical receivers hold the error to a degree or two, as the lesson says.

**Answer:** about 5.8° (0.101 rad), ignoring noise.
:::
:::

::: check
given: p = 15 | 30 | 45
answer: 20*log(cos(p*pi/180))
unit: dB
tolerance: 0.05

## A BPSK receiver's carrier is {p}° off. How much SNR does it lose?

::: right
Right. $20\log\cos\phi$ = {answer} dB.
:::

::: misses
- [10*log(cos(p*pi/180))] The amplitude scales by cos φ; power by cos² φ: 20 log.
- [any] Not yet. The matched filter output scales by cos φ.
:::
:::

::: check
given: E = 8 | 10 | 12; p = 10 | 25
answer: Q(sqrt(2*10^(E/10))*cos(p*pi/180))
tolerance: 1%

## BPSK at Eb/N0 = {E} dB with a {p}° phase error. What's its bit error probability?

::: right
Right. $Q(\sqrt{2E_b/N_0}\cos\phi)$ = {answer}.
:::

::: misses
- [Q(sqrt(2*10^(E/10)))] That's with perfect sync.
- [any] Not yet. The decision variable shrinks by cos φ.
:::
:::

::: check
given: E = 9 | 11 | 13; p = 5 | 10 | 15
answer: 0.5*(Q(sqrt(2*10^(E/10))*(cos(p*pi/180) - sin(p*pi/180))) + Q(sqrt(2*10^(E/10))*(cos(p*pi/180) + sin(p*pi/180))))
tolerance: 1%

## QPSK at Eb/N0 = {E} dB with a {p}° phase error. What's its bit error probability?

::: right
Right. {answer}.
:::

::: misses
- [Q(sqrt(2*10^(E/10))*cos(p*pi/180))] QPSK also suffers crosstalk of sin φ from the other channel.
- [any] Not yet. Average the two cases where the crosstalk adds and subtracts.
:::
:::

::: check
given: M = 2 | 4 | 8 | 16
answer: 360/M
unit: °
tolerance: 0.2

## An Mth-power carrier loop for {M}-PSK: how far apart are its possible lock phases?

::: right
Right. 360°/M = {answer}°.
:::

::: misses
- [180/M] Dividing the recovered phase by M leaves M solutions spread around the full circle.
- [any] Not yet. M equally spaced solutions.
:::
:::

::: check
given: f = 100 | 500 | 2000; R = 10 | 100 | 1000
answer: 360*f/(R*1000)
unit: °
tolerance: 0.5%

## A {R} kbaud receiver has a {f} Hz carrier frequency offset. How far does the constellation rotate per symbol?

::: right
Right. $360°\,\Delta f\,T_s$ = {answer}°.
:::

::: misses
- [f/(R*1000)] Express the rotation in degrees: multiply by 360.
- [any] Not yet. Phase advances $2\pi\Delta f$ radians per second.
:::
:::

::: check
given: N = 5 | 7 | 11 | 13
answer: 20*log(N)
unit: dB
tolerance: 0.05

## A Barker sequence of length {N} is used as a frame preamble. What's its correlation peak-to-sidelobe ratio?

::: right
Right. Peak N, sidelobes at most 1: {answer} dB.
:::

::: misses
- [10*log(N)] It's an amplitude ratio: 20 log.
- [any] Not yet. Barker sidelobes never exceed 1.
:::
:::

::: check
kind: parts
given: R = 1 | 10 | 100; f = 10 | 100 | 1000

## A {R} kbaud QPSK receiver has a {f} Hz carrier frequency offset its loop hasn't removed.

::: part
answer: 360*f/(R*1000)
unit: °
tolerance: 0.5%

### How far does the constellation rotate each symbol?

::: misses
- [any] $360°\,\Delta f\,T_s$.
:::
:::

::: part
answer: 45/(360*f/(R*1000))
unit: symbols
tolerance: 0.5%

### After how many symbols has it rotated 45°, onto QPSK's decision boundaries?

::: misses
- [any] 45° over the rotation per symbol.
:::
:::
:::

::: check
kind: derivation
vars: M = 4..4096, p = 0..0.5, E = 1..100

## A square M-QAM receiver ignores noise; separately, BPSK runs at Eb/N0 = E (linear) with phase error p.

::: step
answer: 1/(sqrt(2)*(sqrt(M) - 1))

### What phase error (radians, small-angle) brings its corner point to a decision boundary?
:::

::: step
answer: Q(sqrt(2*E)*cos(p))

### What is BPSK's bit error probability?
:::

::: step
answer: -20*log(cos(p))

### What SNR loss does the phase error cost BPSK, in dB?
:::

::: right
Right. Dense constellations shrink the tolerable phase error in proportion to $1/\sqrt M$.
:::
:::

::: explain
## Why is QPSK so much more sensitive to carrier phase error than BPSK?

::: model
In BPSK all the information is on one axis, so a phase error just rotates the signal partly away from that axis: the projection that the detector uses shrinks by cos φ, a small loss for small φ. In QPSK both axes carry independent bits. A phase error rotates each channel's signal partly onto the other axis, so each detector receives cos φ of its own bit plus sin φ of the other channel's, with a sign that depends on the other bit. Half the time that crosstalk subtracts, cutting the margin by roughly sin φ in addition to the cos φ shrinkage, and since sin φ grows much faster than 1 − cos φ for small angles, the penalty is far larger.
:::
:::

::: practice

::: check
given: p = 5 | 8 | 15 | 20 | 30 | 35 | 45
answer: 20*log(cos(p*pi/180))
unit: dB
tolerance: 0.05

## BPSK loss at {p}°?

::: misses
- [any] $20\log\cos\phi$.
:::
:::

::: check
given: E = 10 | 12; p = 8 | 12
answer: 0.5*(Q(sqrt(2*10^(E/10))*(cos(p*pi/180) - sin(p*pi/180))) + Q(sqrt(2*10^(E/10))*(cos(p*pi/180) + sin(p*pi/180))))
tolerance: 1%

## QPSK with {p}° error at {E} dB?

::: misses
- [any] Average of the two crosstalk cases.
:::
:::

::: check
given: f = 300 | 1500; R = 50 | 500
answer: 360*f/(R*1000)
unit: °
tolerance: 0.5%

## Rotation per symbol: {f} Hz offset, {R} kbaud?

::: misses
- [any] $360\Delta fT_s$.
:::
:::
:::
