---
title: Mixers
heading: Frequency conversion, images and spurious responses, switching diode mixers, balanced and double-balanced designs, conversion loss and noise, and image-reject mixers
eyebrow: S6 · Lesson 43 · Mixers
xp: 50
---

::: hook
Almost every radio moves its signal from one frequency to another at least once: down from the antenna's gigahertz to an intermediate frequency where filters are sharp and amplifiers are cheap, or up from a modulator to the transmit band. The mixer does it by multiplying the signal with a local oscillator, which shifts its spectrum to the sum and difference frequencies. Multiplication also brings trouble: a second input frequency, the image, converts to exactly the same output, and the harmonics of a switching LO create a whole family of spurious responses. Balanced designs cancel some of them, and the image-reject mixer cancels the image with phase alone.
:::

::: play
- The output of a switching mixer: an RF tone multiplied by a 9 kHz square-wave LO, with its time waveform and spectrum. Frequencies are scaled down to kilohertz so they fit on one axis; the pattern is the same at gigahertz.
- With a double-balanced (bipolar) switch the output holds only $f_{RF} \pm f_{LO}$, $f_{RF} \pm 3f_{LO}$ and so on: no RF and no LO feedthrough.
- Slide toward a single-ended (on/off) switch and the RF itself leaks through at full strength, with the even-order products of an unbalanced mixer.
:::
:::

```sim plot
view: spectrum
x: t = 0..20m s
y: v = -1.5..1.5 V
samples: 2048
freq: f = 0..40k Hz
slider: F = 5k..15k = 10k Hz step 100
slider: u = 0..1 = 0 step 0.05
plot: cos(2*pi*F*t)*((1 - u)*sign(cos(2*pi*9000*t)) + u*step(cos(2*pi*9000*t))) | label: mixer output
marker: f = abs(F - 9000) | label: IF
marker: f = F | label: RF
```

::: predict
## A receiver tunes 2.45 GHz with a 70 MHz IF and an LO below the signal, at 2.38 GHz. Which other input frequency also comes out at 70 MHz?

- [ ] 2.52 GHz
- [x] 2.31 GHz
- [ ] 70 MHz
- [ ] 4.83 GHz

::: reveal
2.31 GHz, the image: it lies 70 MHz on the other side of the LO, so $|2.31 - 2.38|$ = 70 MHz too. The mixer can't tell the two apart, so the image must be filtered out before the mixer. A higher IF moves the image further away and makes that filter easier, at the cost of harder IF filtering: the central trade-off of the superheterodyne receiver (lesson 44).
:::
:::

::: nameit
## Frequency conversion

Multiplying $\cos\omega_{RF}t$ by $\cos\omega_{LO}t$ gives $\frac{1}{2}\cos(\omega_{RF} - \omega_{LO})t + \frac{1}{2}\cos(\omega_{RF} + \omega_{LO})t$.

- **IF**: $f_{IF} = |f_{RF} - f_{LO}|$ for down-conversion.
- **Image**: the other input frequency at the same distance from the LO, $f_{IM} = f_{RF} \mp 2f_{IF}$ (minus for a low-side LO, plus for high-side).
- **Spurious responses**: real mixers also produce $|mf_{RF} \pm nf_{LO}|$ for integers m, n. A spur chart shows which land in the IF band for a given plan.

## Diode and switching mixers

A diode driven hard by the LO acts as a switch, and a switch multiplies the RF by a square wave containing $f_{LO}$, $3f_{LO}$, $5f_{LO}$, …

- **Single-ended**: one diode; RF and LO both reach the IF port; even and odd products.
- **Single-balanced**: two diodes and a hybrid; cancels one input at the output, and even LO harmonics.
- **Double-balanced** (a diode ring with two baluns): bipolar switching, so the output is RF times ±1 with no RF or LO feedthrough and no even-order products. An ideal one's conversion loss is $20\log(\pi/2)$ = 3.92 dB (IF amplitude $2A/\pi$ from an RF amplitude A); real ones manage 5 to 7 dB.
- The **noise figure** of a passive mixer roughly equals its conversion loss for single-sideband (SSB) signals; a double-sideband (DSB) measurement, where both sidebands carry signal, reads 3 dB lower.
- Active mixers (the Gilbert cell, S2) give conversion gain at the cost of linearity and noise.

## Image-reject mixers

The **Hartley** architecture uses two mixers with LOs in quadrature and a 90° shift at the IF, so the wanted signal adds and the image cancels. With gain imbalance $a = 10^{\epsilon/20}$ (ε in dB) and phase error φ:

$$\text{IRR} = \frac{1 + 2a\cos\phi + a^2}{1 - 2a\cos\phi + a^2}$$

so 1 dB and 2° give only 24 dB; good layouts reach 30 to 40 dB.
:::

::: example
## A receiver tunes 2.45 GHz with a 70 MHz IF. Find the LO and image frequencies for low-side and high-side injection.

::: solution
1. **Low-side injection.**
   $$\begin{aligned} f_{LO} &= 2.45 - 0.07 \\ &= 2.38\ \text{GHz} \\ f_\text{image} &= 2.38 - 0.07 \\ &= 2.31\ \text{GHz} \end{aligned}$$
2. **High-side injection.** The LO is at 2.52 GHz and the image at 2.59 GHz.
3. **The pattern.** The image is always $2f_{IF}$ = 140 MHz from the wanted signal, on the LO's far side.

**Answer:** low side, the LO is at 2.38 GHz and the image at 2.31 GHz; high side, the LO is at 2.52 GHz and the image at 2.59 GHz.
:::
:::

::: example
## A Hartley image-reject mixer has 1 dB of gain imbalance and 2° of phase error. What image rejection does it give? What would 0.1 dB and 1° give?

::: solution
1. **Gain ratio.** With cos 2° = 0.9994,
   $$\begin{aligned} a &= 10^{1/20} \\ &= 1.122 \end{aligned}$$
2. **Image rejection.** Here $2a\cos\phi$ = 2.243 and $a^2$ = 1.259:
   $$\begin{aligned} \text{IRR} &= \frac{1 + 2a\cos\phi + a^2}{1 - 2a\cos\phi + a^2} \\ &= \frac{4.502}{0.0163} \end{aligned}$$
   which is 24.4 dB.
3. **Better balance.** With 0.1 dB and 1°, the IRR is 39.6 dB.
4. **Why filters too.** Each improvement is hard won, which is why many receivers add a filter as well.

**Answer:** 24.4 dB of image rejection, and 39.6 dB with 0.1 dB and 1°.
:::
:::

::: example
## A receiver tunes 2450 MHz with a 2380 MHz LO and a 70 MHz IF. Which input frequencies produce the (1, 2) and (2, 2) spurious responses?

::: solution
1. **Spur condition.** A response (m, n) appears wherever
   $$|mf - nf_{LO}| = f_{IF}$$
2. **The (1, 2) response.**
   $$f = 2 \times 2380 \pm 70$$
   at 4830 or 4690 MHz, far outside any preselector.
3. **The (2, 2) response.**
   $$f = (4760 \pm 70)/2$$
   at 2415 or 2345 MHz.
4. **The half-IF spur.** The first of those is only 35 MHz below the wanted signal, the half-IF spur of lesson 44, and the preselector barely touches it, so the mixer's own second-order balance must suppress it.

**Answer:** the (1, 2) responses are at 4830 and 4690 MHz, and the (2, 2) responses at 2415 and 2345 MHz.
:::
:::

::: check
given: f = 900 | 2450 | 5800; i = 10.7 | 70 | 160
answer: f - 2*i
unit: MHz
tolerance: 0.01%

## A receiver tunes {f} MHz with a {i} MHz IF and a low-side LO. Where is the image?

::: right
Right. $f_{RF} - 2f_{IF}$ = {answer} MHz.
:::

::: misses
- [f - i] That's the LO.
- [f + 2*i] That's the image for a high-side LO.
- [any] Not yet. The image sits $f_{IF}$ beyond the LO.
:::
:::

::: check
given: f = 900 | 2450 | 5800; i = 10.7 | 70 | 160
answer: f + i
unit: MHz
tolerance: 0.01%

## The same receiver uses a high-side LO instead. What's the LO frequency?

::: right
Right. $f_{RF} + f_{IF}$ = {answer} MHz.
:::

::: misses
- [f - i] That's a low-side LO.
- [any] Not yet. A high-side LO sits $f_{IF}$ above the signal.
:::
:::

::: check
given: e = 0.2 | 0.5 | 1 | 2; p = 0.5 | 2 | 5
answer: 10*log((1 + 2*10^(e/20)*cos(p*pi/180) + 10^(e/10))/(1 - 2*10^(e/20)*cos(p*pi/180) + 10^(e/10)))
unit: dB
tolerance: 0.05

## A Hartley image-reject mixer has {e} dB of gain imbalance and {p}° of phase error. What image rejection does it give?

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

::: misses
- [any] Not yet. $\text{IRR} = \frac{1 + 2a\cos\phi + a^2}{1 - 2a\cos\phi + a^2}$ with $a = 10^{\epsilon/20}$.
:::
:::

::: check
given: r = 1900 | 2450; l = 1700 | 2000; m = 1 | 2 | 3; n = 2 | 3
answer: abs(m*r - n*l)
unit: MHz
tolerance: 0.01%

## A mixer has RF at {r} MHz and LO at {l} MHz. Where does the spurious product with m = {m} and n = {n} fall, $|mf_{RF} - nf_{LO}|$?

::: right
Right. $|\given{m} \times \given{r} - \given{n} \times \given{l}|$ = {answer} MHz.
:::

::: misses
- [m*r + n*l] That's the sum product.
- [any] Not yet. $|mf_{RF} - nf_{LO}|$.
:::
:::

::: check
given: A = 10 | 50 | 200
answer: 2*A/pi
unit: mV
tolerance: 0.5%

## An ideal double-balanced switching mixer receives an RF tone of amplitude {A} mV. What's the amplitude of the IF output?

::: right
Right. The square-wave LO's fundamental is 4/π, and half goes to each sideband: $2A/\pi$ = {answer} mV.
:::

::: misses
- [A/2] A sine LO gives half; a switching LO's fundamental is 4/π times bigger.
- [4*A/pi] The product splits between the sum and difference.
- [any] Not yet. Expand sign(cos ωt) as $\frac{4}{\pi}(\cos\omega t - \frac{1}{3}\cos 3\omega t + \cdots)$.
:::
:::

::: check
given: L = 5 | 6.5 | 8
answer: L - 3.01
unit: dB
tolerance: 0.05

## A passive mixer has {L} dB conversion loss and an SSB noise figure about equal to it. What DSB noise figure would a measurement report?

::: right
Right. About 3 dB lower: {answer} dB.
:::

::: misses
- [L + 3.01] DSB is lower: both sidebands carry signal.
- [any] Not yet. DSB noise figure ≈ SSB − 3 dB.
:::
:::

::: check
kind: parts
given: l = 1930 | 2380; i = 70 | 140; m = 2 | 3; n = 2 | 3

## A mixer has its LO at {l} MHz and its IF at {i} MHz.

::: part
answer: (n*l + i)/m
unit: MHz
tolerance: 0.5%

### Which input frequency produces the ({m}, {n}) response from $mf - nf_{LO} = f_{IF}$?

::: misses
- [any] $f = (nf_{LO} + f_{IF})/m$.
:::
:::

::: part
answer: (n*l - i)/m
unit: MHz
tolerance: 0.5%

### And from $nf_{LO} - mf = f_{IF}$?

::: misses
- [any] $f = (nf_{LO} - f_{IF})/m$.
:::
:::
:::

::: check
kind: derivation
vars: r = 500..6000, l = 400..5000

## A mixer has RF r above its LO l.

::: step
answer: r - l

### What is the IF?
:::

::: step
answer: 2*l - r

### Where is the image?
:::

::: step
answer: r + l

### Where is the sum product?
:::

::: right
Right. The image sits on the other side of the LO, at the same distance as the signal.
:::
:::

::: explain
## Why can't a mixer, on its own, tell a signal from its image?

::: model
A mixer's output depends only on the difference between the input frequency and the LO. A signal 70 MHz above a 2.38 GHz LO and another 70 MHz below it both produce a 70 MHz output, because multiplying by the LO shifts every input by the LO frequency and folds the result about zero: the difference frequency is the absolute value, and the sign that would distinguish the two is lost. Once both are at the IF they're superimposed and nothing downstream can separate them. Either a filter in front of the mixer must remove the image while it's still at a different frequency, or an image-reject mixer must keep track of the sign by using two LOs in quadrature, so that the signal and image come out with opposite phase relationships and can be separated.
:::
:::

::: practice

::: check
given: f = 1575 | 5200; i = 45 | 140
answer: f - 2*i
unit: MHz
tolerance: 0.01%

## Image for {f} MHz, IF {i} MHz, low-side LO?

::: misses
- [any] $f_{RF} - 2f_{IF}$.
:::
:::

::: check
given: e = 0.3 | 1.5; p = 1 | 4
answer: 10*log((1 + 2*10^(e/20)*cos(p*pi/180) + 10^(e/10))/(1 - 2*10^(e/20)*cos(p*pi/180) + 10^(e/10)))
unit: dB
tolerance: 0.05

## IRR for {e} dB and {p}°?

::: misses
- [any] $\frac{1 + 2a\cos\phi + a^2}{1 - 2a\cos\phi + a^2}$.
:::
:::

::: check
given: r = 2100 | 2600; l = 1950 | 2400; m = 2 | 3; n = 2 | 3
answer: abs(m*r - n*l)
unit: MHz
tolerance: 0.01%

## Spur $|mf_{RF} - nf_{LO}|$: RF {r}, LO {l}, m {m}, n {n}?

::: misses
- [any] $|mf_{RF} - nf_{LO}|$.
:::
:::
:::
