---
title: Differential signaling
heading: Two wires carrying opposite signals: odd and even modes, termination, and why skew matters
eyebrow: C10 · Lesson 22 · Differential signaling
xp: 40
---

::: hook
USB, Ethernet, PCI Express, HDMI and the LVDS links inside displays all send each bit on two wires driven in opposite directions, and the receiver looks only at the difference. Noise that couples onto both wires equally, from a ground shift or a nearby field, cancels. Lesson 21 showed that two coupled lines support two modes, and a differential pair uses one of them on purpose. Designing one means choosing the odd-mode impedance, terminating both modes properly, and keeping the two wires the same length, because a few picoseconds of skew turn part of the signal into exactly the common-mode noise the scheme was meant to avoid.
:::

::: play
- A differential pair's two legs switching with a skew between them. Their difference (the signal) and their average (the common mode) are plotted while each leg ramps over a 50 ps rise time.
- With no skew, the legs move in opposite directions at the same instant and the common mode stays flat. Add skew and a common-mode pulse appears, as tall as the skew is long compared with the rise time.
:::

```sim plot
view: graph
x: t = -50..150
y: v = -50..450
slider: s = 0..50 step 1 = 10
plot: 200*((t/50)*step(t)*step(50 - t) + step(t - 50)) + 200*(((t - s)/50)*step(t - s)*step(50 - t + s) + step(t - s - 50)) | label: difference, mV
plot: 0.5*(200*((t/50)*step(t)*step(50 - t) + step(t - 50)) + (-200)*(((t - s)/50)*step(t - s)*step(50 - t + s) + step(t - s - 50))) | dashed | color: ch2 | label: common mode, mV
readout: common-mode peak, mV = 200*s/(2*50)*step(50 - s) + 100*step(s - 50)
```

::: predict
## An LVDS driver pushes 3.5 mA around a loop through a 100 Ω termination at the receiver. What differential voltage does the receiver see?

- [ ] 3.5 V
- [x] 350 mV
- [ ] 175 mV
- [ ] 35 mV

::: reveal
350 mV: the current flows out on one wire, through the 100 Ω across the pair, and back on the other. Flipping the current's direction flips the sign, so the swing is ±350 mV, 700 mV peak to peak. The small swing keeps power and emissions low, and the receiver needs only to tell positive from negative.
:::
:::

::: nameit
## Modes on a pair

Two signals $V_p$ and $V_n$ on a pair can be rewritten as a differential part and a common-mode part:

$$V_d = V_p - V_n, \qquad V_{cm} = \frac{V_p + V_n}{2}$$

A pair of coupled lines (lesson 21) has two natural modes, each with its own impedance:

- **Odd mode** (equal and opposite): the lines' mutual coupling lowers the impedance to $Z_{odd}$. The **differential impedance** is $Z_{diff} = 2Z_{odd}$.
- **Even mode** (equal and the same): coupling raises it to $Z_{even}$. The **common-mode impedance** is $Z_{cm} = Z_{even}/2$.

Tighter coupling (closer lines) spreads $Z_{odd}$ and $Z_{even}$ further apart. Standards specify the differential impedance: 90 Ω for USB, 100 Ω for Ethernet and most others.

## Termination

A single resistor of $Z_{diff}$ across the pair terminates the differential mode but leaves the common mode open, so common-mode noise reflects. A **π termination**, a resistor of $Z_{even}$ from each line to ground (or to a capacitor) and one across, terminates both:

$$R_{across} = \frac{2Z_{even}Z_{odd}}{Z_{even} - Z_{odd}}$$

so that differentially $R_{across} \| 2Z_{even} = 2Z_{odd}$ and in common mode $Z_{even}/2$.

## Skew and mode conversion

If one leg is delayed by $\Delta t$ relative to the other, during the edge one leg has moved and the other hasn't, and their average jumps. With each leg swinging by $a$ over a rise time $t_r$ and $\Delta t < t_r$,

$$V_{cm,peak} = \frac{a\,\Delta t}{2t_r}$$

That common-mode pulse radiates and couples to other circuits; at high rates skew also eats into the eye. High-speed designs match the two legs' lengths to within a fraction of a rise time, often a few hundred micrometers.

## Why it works

A receiver with common-mode rejection ignores noise that appears equally on both legs. Opposite currents in the two legs mean their magnetic fields mostly cancel, so a tightly coupled pair radiates little and picks up little. The return current flows in the partner wire instead of in the ground, so ground noise matters less.
:::

::: example
## A coupled pair has $Z_{odd}$ = 45 Ω and $Z_{even}$ = 60 Ω. Find its differential and common-mode impedances, and design a π termination.

::: solution
1. **Differential impedance.**
   $$\begin{aligned} Z_{diff} &= 2 \times 45\ \Omega \\ &= 90\ \Omega \end{aligned}$$
   right for USB.
2. **Common-mode impedance.**
   $$\begin{aligned} Z_{cm} &= \frac{60}{2}\ \Omega \\ &= 30\ \Omega \end{aligned}$$
3. **The π network.** Put 60 Ω from each line to ground, and across the lines
   $$\begin{aligned} R_{across} &= \frac{2 \times 60 \times 45}{60 - 45}\ \Omega \\ &= 360\ \Omega \end{aligned}$$
4. **Check the differential mode.** 360 Ω in parallel with the two 60 Ω resistors in series (120 Ω) is 90 Ω.
5. **Check the common mode.** The across resistor carries no current, and the two 60 Ω resistors in parallel give 30 Ω. Both modes are matched.

**Answer:** 90 Ω differential and 30 Ω common mode, terminated by 60 Ω from each line to ground and 360 Ω across.
:::
:::

::: example
## A 400 mV differential step (each leg swinging 200 mV) has a 50 ps rise time, and one leg arrives 10 ps late. How big is the common-mode pulse, and how much length mismatch is that on a board where signals travel 6.5 ps/mm?

::: solution
1. **Common-mode pulse.**
   $$\begin{aligned} V_{cm,peak} &= \frac{200 \times 10}{2 \times 50}\ \text{mV} \\ &= 20\ \text{mV} \end{aligned}$$
   for the 40 ps while one leg is moving and the other isn't.
2. **Length mismatch.**
   $$\frac{10\ \text{ps}}{6.5\ \text{ps/mm}} = 1.5\ \text{mm}$$
   That's why high-speed pairs are routed with serpentine "length matching" bumps on the shorter leg.

**Answer:** a 20 mV common-mode pulse, from 1.5 mm of extra length.
:::
:::

::: example
## A receiver has 40 dB of common-mode rejection at the frequency of a 1 V common-mode ground noise. How much appears as differential signal, compared with a 350 mV LVDS swing?

::: solution
1. **Convert the rejection.** 40 dB is a factor of 100.
2. **Differential leak.**
   $$\frac{1\ \text{V}}{100} = 10\ \text{mV}$$
3. **Compare with the swing.** That's under 3% of the 350 mV swing, well inside the receiver's ±100 mV threshold.
4. **Single-ended for comparison.** A single-ended link with the same ground shift would see the full 1 V.

**Answer:** 10 mV appears as differential signal, under 3% of the 350 mV swing.
:::
:::

::: check
given: Zo = 40 | 45 | 50; Ze = 55 | 60 | 70
answer: 2*Zo
unit: Ω
tolerance: 0.5%

## A pair has $Z_{odd}$ = {Zo} Ω and $Z_{even}$ = {Ze} Ω. What's its differential impedance?

::: right
Right. $Z_{diff} = 2Z_{odd}$ = {answer}.
:::

::: misses
- [Zo] The differential signal sees both lines in series: twice the odd-mode impedance.
- [Ze/2] That's the common-mode impedance.
- [any] Not yet. $Z_{diff} = 2Z_{odd}$.
:::
:::

::: check
given: Zo = 40 | 45 | 50; Ze = 55 | 60 | 70
answer: 2*Ze*Zo/(Ze - Zo)
unit: Ω
tolerance: 0.5%

## For a π termination of a pair with $Z_{odd}$ = {Zo} Ω and $Z_{even}$ = {Ze} Ω, with {Ze} Ω from each line to ground, what resistor goes across the pair?

::: right
Right. $2Z_{even}Z_{odd}/(Z_{even} - Z_{odd})$ = {answer}.
:::

::: misses
- [2*Zo] That would be right with no resistors to ground. With them, the across resistor must be larger.
- [any] Not yet. Solve $R \| 2Z_{even} = 2Z_{odd}$.
:::
:::

::: check
given: a = 100 | 200 | 400; dt = 2 | 5 | 10 | 20; tr = 30 | 50 | 100
answer: a*dt/(2*tr)
unit: mV
tolerance: 0.5%

## Each leg of a pair swings {a} mV with a {tr} ps rise time, and one leg is {dt} ps late. What's the common-mode pulse's height?

::: right
Right. $a\Delta t/(2t_r)$ = {answer}.
:::

::: misses
- [a*dt/tr] The common mode is the average of the legs: halve it.
- [a/2] That would be with the skew at least as long as the rise time.
- [any] Not yet. $V_{cm} = a\Delta t/(2t_r)$.
:::
:::

::: check
given: I = 2.5 | 3.5 | 4.5; R = 85 | 100 | 120
answer: I*R
unit: mV
tolerance: 0.5%

## A current-mode driver pushes {I} mA through an {R} Ω termination. What differential voltage results?

::: right
Right. $IR$ = {answer}.
:::

::: misses
- [I*R/2] The full current flows through the termination.
- [any] Not yet. Ohm's law: $V = IR$.
:::
:::

::: check
given: dt = 1 | 5 | 20; v = 6 | 6.5 | 7
answer: dt/v
unit: mm
tolerance: 0.5%

## Signals travel {v} ps/mm on a board. What length mismatch between the legs of a pair causes {dt} ps of skew?

::: right
Right. $\Delta t/v$ = {answer}.
:::

::: misses
- [dt*v] Divide the skew by the delay per millimeter.
- [any] Not yet. Length = delay ÷ delay per length.
:::
:::

::: check
kind: choice

## A 100 Ω resistor across a differential pair terminates it, yet common-mode noise still rings on the line. Why?

- [x] The resistor across the pair carries no common-mode current, so the common mode sees an open end and reflects
- [ ] 100 Ω is the wrong differential value
- [ ] The resistor is too far from the receiver
- [ ] Differential lines can't carry common-mode signals

::: right
Right. A common-mode signal puts the same voltage on both ends of the resistor, so no current flows in it. Terminating the common mode needs resistors from each line to ground or to a capacitor, as a π or T network does.
:::

::: misses
- [2] The differential mode is terminated; the problem is the other mode.
- [3] Placement matters, but even ideally placed it can't terminate the common mode.
- [4] They can, and do, whenever the legs aren't perfectly balanced.
:::
:::

::: check
kind: python
given: a = 200 | 400; tr = 30 | 60; dt = 5 | 15 | 40

## Simulate skew. Each leg ramps linearly over `tr` ps: `p(t)` rises from 0 to `a` starting at t = 0, `n(t)` falls from 0 to `-a` starting at t = `dt`. On `t = numpy.linspace(-20, 200, 22001)` (ps), compute the common mode `(p + n)/2` and set `cm_peak` (its largest absolute value, mV) and `cm_width`, the time it spends above half its peak (ps). Compare with $a\Delta t/(2t_r)$ when $\Delta t < t_r$.

```python starter
import numpy as np
cm_peak = a * dt / (2 * tr)
cm_width = 0.0
```

```python solution
import numpy as np
t = np.linspace(-20, 200, 22001)
ramp = lambda x: np.clip(x / tr, 0, 1)
p = a * ramp(t)
n = -a * ramp(t - dt)
cm = (p + n) / 2
cm_peak = float(np.max(np.abs(cm)))
dtt = t[1] - t[0]
cm_width = float(np.sum(np.abs(cm) > cm_peak / 2) * dtt)
```

```python tests
import numpy as np
t = np.linspace(-20, 200, 22001)
r = lambda x: np.clip(x / tr, 0, 1)
cm = (a * r(t) - a * r(t - dt)) / 2
pk = np.max(np.abs(cm))
assert abs(cm_peak - pk) < 1e-9, f"The peak should be {pk:.4f} mV."
if dt < tr:
    assert abs(pk - a * dt / (2 * tr)) < 1e-6, "For skew shorter than the rise time, the peak is aΔt/(2t_r)."
w = np.sum(np.abs(cm) > pk / 2) * (t[1] - t[0])
assert abs(cm_width - w) < 1e-6, "cm_width counts the time above half the peak."
```

::: right
Right. Once the skew reaches the rise time, the common-mode pulse is a full half swing, as if the pair were two separate single-ended lines.
:::
:::

::: explain
## A gigabit Ethernet cable runs past a motor drive whose switching couples several volts of noise onto both conductors of each pair equally. Explain why the link still works, and what could make it fail.

::: model
Each Ethernet pair carries its data as the difference between its two conductors, and the receiver responds only to that difference, through a transformer or a differential input with high common-mode rejection. Noise that couples equally onto both conductors, as it does for a tightly twisted pair, shifts their common mode but not their difference, so the receiver rejects it, and the transformer also blocks a large common-mode voltage. It fails if the coupling stops being equal: an imbalance between the conductors, a poorly twisted section, mismatched lengths or terminations, or a receiver whose rejection is poor at the noise's frequency converts part of the common-mode noise into a differential signal that the receiver can't distinguish from data. Very large common-mode voltages can also exceed the receiver's input range.
:::
:::

::: practice

::: check
given: Ze = 50 | 80; Zo = 35 | 42
answer: Ze/2
unit: Ω
tolerance: 0.5%

## What common-mode impedance does a pair with $Z_{even}$ = {Ze} Ω and $Z_{odd}$ = {Zo} Ω present?

::: misses
- [2*Zo] That's the differential impedance.
- [any] $Z_{cm} = Z_{even}/2$.
:::
:::

::: check
given: a = 150 | 300; dt = 3 | 12; tr = 40 | 80
answer: a*dt/(2*tr)
unit: mV
tolerance: 0.5%

## Legs swinging {a} mV with {tr} ps edges and {dt} ps of skew: how big is the common-mode pulse?

::: misses
- [a*dt/tr] Average the legs: divide by 2.
- [any] $a\Delta t/(2t_r)$.
:::
:::
:::
