---
title: Modulation and filtering
heading: Multiplying in time, shifting in frequency
eyebrow: A10 · Lesson 14 · Modulation and filtering
xp: 40
---

::: hook
An AM radio station puts a voice, which lives below 5 kHz, onto a carrier at 1 MHz, and a receiver tuned to that station somehow ignores hundreds of others. Both halves rest on two Fourier facts. Multiplying a signal by a cosine slides its whole spectrum up to the carrier frequency. And filtering, which is convolution in time, is just multiplication in frequency: keep the band you want, zero the rest. Those two facts are the basis of every radio, from AM broadcast to Wi-Fi.
:::

::: play
- An AM signal: a 10 kHz carrier whose amplitude follows a tone at $f_m$, $(1 + m\cos 2\pi f_mt)\cos 2\pi f_ct$. The lower panel is its spectrum.
- You see three lines: the carrier and a sideband on each side. How far from the carrier are the sidebands?
- Raise the modulation depth $m$. What happens to the sidebands' height?
:::
:::

```sim plot
view: spectrum
x: t = 0..4m s
y: v = -2.2..2.2 V
samples: 2048
freq: f = 0..20k Hz
slider: fm = 0.5..4 step 0.25 = 2 kHz
slider: m = 0..1 step 0.05 = 0.5
plot: (1 + m*cos(2*pi*fm*1000*t))*cos(2*pi*10000*t) | label: AM signal
marker: f = 10000 + fm*1000 | label: upper sideband
marker: f = 10000 - fm*1000 | label: lower sideband
readout: sideband amplitude = m/2 | digits: 3
readout: bandwidth, kHz = 2*fm | digits: 3
```

::: predict
## A 1 MHz carrier is amplitude-modulated by audio up to 5 kHz. What range of frequencies does the station occupy?

- [ ] 1.000 to 1.005 MHz
- [x] 0.995 to 1.005 MHz
- [ ] 0 to 5 kHz
- [ ] Just 1 MHz

::: reveal
0.995 to 1.005 MHz. Multiplying by the carrier copies the audio spectrum to both sides of 1 MHz: an upper sideband and a mirror-image lower sideband. The station needs 10 kHz of bandwidth, twice the audio's, which is why AM stations are spaced 10 kHz apart (9 kHz in some regions).
:::
:::

::: nameit
## The modulation theorem

$$x(t)\cos(2\pi f_ct) \quad\longleftrightarrow\quad \tfrac{1}{2}X(f - f_c) + \tfrac{1}{2}X(f + f_c)$$

Multiplying by a cosine shifts the spectrum up and down by $f_c$, each copy at half height. It follows from $\cos\theta = \frac{e^{j\theta} + e^{-j\theta}}{2}$ and the frequency-shift property.

## Amplitude modulation

$$s(t) = A[1 + mx(t)]\cos(2\pi f_ct)$$

with $|x| \le 1$ and modulation depth $m \le 1$. For a single tone $x = \cos 2\pi f_mt$: a carrier of amplitude $A$ plus two sidebands of amplitude $\frac{mA}{2}$ at $f_c \pm f_m$. The bandwidth is twice the highest audio frequency.

**Demodulating:** multiply by the carrier again. That shifts a copy back down to 0 Hz (and another up to $2f_c$); a low-pass filter keeps the audio.

## Mixing

Multiplying two tones gives their sum and difference frequencies. A **superheterodyne** receiver multiplies the antenna signal by a local oscillator at $f_\text{LO}$ to move the wanted station to a fixed **intermediate frequency** $f_\text{IF} = |f_\text{RF} - f_\text{LO}|$, where sharp filters are easy to build. A station at the **image frequency**, on the other side of $f_\text{LO}$ by the same $f_\text{IF}$, would land there too, so it must be filtered out first.

## Filtering

Convolution in time is multiplication in frequency: $y = h * x \;\Longleftrightarrow\; Y = HX$. A filter's frequency response $H(f)$ simply scales each frequency. An ideal band-pass that passes one station and blocks the rest would be perfect in frequency but needs a sinc-like impulse response extending forever, so real filters trade sharpness for delay and ringing.
:::

::: example
## A 100 MHz FM station is received with a local oscillator at 110.7 MHz. What is the IF, and where is the image?

::: solution
1. **The IF.**
   $$\begin{aligned} f_\text{IF} &= 110.7 - 100 \\ &= 10.7\ \text{MHz} \end{aligned}$$
   the standard FM radio IF.
2. **The image.** It's the same distance above the LO:
   $$110.7 + 10.7 = 121.4\ \text{MHz}$$
3. **What the front end must do.** A filter before the mixer must block 121.4 MHz while passing 100 MHz.

**Answer:** the IF is 10.7 MHz, and the image is at 121.4 MHz.
:::
:::

::: example
## An AM transmitter has a 100 W carrier and 100% modulation by a tone. How much power is in the sidebands?

::: solution
1. **The sideband amplitude.** Each sideband has amplitude $\frac{m}{2} = \frac{1}{2}$ of the carrier's.
2. **The sideband power.** So each has $\frac{1}{4}$ of the carrier's power:
   $$\frac{100\ \text{W}}{4} = 25\ \text{W}$$
   25 W each, 50 W in both.
3. **Where the power goes.** Two thirds of the 150 W total goes into the carrier, which carries no information: one reason AM is inefficient.

**Answer:** 25 W in each sideband, 50 W in both.
:::
:::

::: example
## An AM signal has modulation index 0.5. What fraction of its power carries the information?

::: solution
1. **The sideband power.** With index $m$, each sideband has amplitude $\frac m2$ of the carrier, so the sidebands together carry $\frac{m^2}{2}$ of the carrier power.
2. **The fraction of the total.**
   $$\begin{aligned} \frac{m^2/2}{1 + m^2/2} &= \frac{m^2}{2 + m^2} \\ &= \frac{0.25}{2.25} \\ &= 11\% \end{aligned}$$
3. **At full modulation.** Even at 100% modulation it's only a third.
4. **Doing better.** Suppressing the carrier (DSB) or one sideband as well (SSB) puts all the power into the information, at the cost of a harder receiver.

**Answer:** 11% of the power carries the information.
:::
:::

::: check
given: fc = 1000 | 600; fm = 3 | 5
answer: fc + fm
unit: kHz
tolerance: 0.01%

## A {fc} kHz carrier is modulated by a {fm} kHz tone. Where is the upper sideband?

::: right
Right. $f_c + f_m$ = {answer}.
:::

::: misses
- [fc - fm] That's the lower sideband.
- [any] Not yet. The tone's spectrum shifts up by $f_c$.
:::
:::

::: check
given: B = 4 | 5 | 10
answer: 2*B
unit: kHz

## Audio up to {B} kHz amplitude-modulates a carrier. How much bandwidth does the signal occupy?

::: right
Right. Both sidebands: $2B$ = {answer}.
:::

::: misses
- [B] AM has two sidebands, one on each side of the carrier.
- [any] Not yet. From $f_c - B$ to $f_c + B$.
:::
:::

::: check
given: A = 10 | 2; m = 0.5 | 0.8
answer: m*A/2
unit: V
tolerance: 0.5%

## An AM signal has a {A} V carrier and modulation depth {m}. What is each sideband's amplitude?

::: right
Right. $\frac{mA}{2}$ = {answer}.
:::

::: misses
- [m*A] The modulation splits between two sidebands.
- [any] Not yet. Expand $A(1 + m\cos\omega_mt)\cos\omega_ct$.
:::
:::

::: check
given: frf = 88.1 | 90.5 | 94.7 | 98.3 | 100 | 104.5 | 107.9; fif = 10.7
answer: frf + 2*fif
unit: MHz
tolerance: 0.1%

## A receiver tunes {frf} MHz with its local oscillator {fif} MHz above it. What is the image frequency?

::: right
Right. The LO is at $f_\text{RF} + f_\text{IF}$, and the image another $f_\text{IF}$ above it: {answer}.
:::

::: misses
- [frf + fif] That's the local oscillator itself.
- [frf - fif] The image is on the far side of the LO.
- [any] Not yet. The image mixes to the same IF from the other side of the LO.
:::
:::

::: check
given: m = 0.3 | 0.5 | 1
answer: 100*(m^2/2)/(1 + m^2/2)
tolerance: 0.5%

## What percent of an AM signal's power is in its sidebands, for tone modulation of depth {m}?

::: right
Right. The sidebands carry $\frac{m^2}{2}$ of the carrier's power, so the share is $\frac{m^2/2}{1 + m^2/2}$ = {answer}%.
:::

::: misses
- [100*m^2/2] That's relative to the carrier alone, not the total.
- [any] Not yet. Each sideband has power $\frac{m^2}{4}$ of the carrier's.
:::
:::

::: check
given: f1 = 455 | 1000; f2 = 1455 | 1600
answer: f2 - f1
unit: kHz

## A mixer multiplies tones at {f1} kHz and {f2} kHz. What is the difference frequency it produces?

::: right
Right. {answer}, along with the sum, $f_1 + f_2$.
:::

::: misses
- [f1 + f2] That's the sum; the question asks for the difference.
- [any] Not yet. $\cos a\cos b = \frac{1}{2}[\cos(a - b) + \cos(a + b)]$.
:::
:::

::: check
kind: parts
given: m = 0.3 | 0.8; P = 50 | 1000

## An AM transmitter has a {P} W carrier and modulation index {m}.

::: part
answer: P*m^2/2
unit: W
tolerance: 0.5%

### How much power is in the two sidebands together?

::: misses
- [P*m^2/4] That's one sideband.
- [any] Each sideband has $\frac{m^2}{4}$ of the carrier power.
:::
:::

::: part
answer: m^2/(2 + m^2)
tolerance: 0.5%

### What fraction of the total is that?

::: misses
- [any] $\frac{m^2/2}{1 + m^2/2}$.
:::
:::
:::

::: check
kind: derivation
vars: fc = 50..150, fi = 5..20

## A superheterodyne receiver tunes a station at $f_c$ with a local oscillator above it and an IF of $f_i$ (both in MHz).

::: step
answer: fc + fi

### What is the local oscillator frequency?
:::

::: step
answer: fc + 2*fi

### Where is the image?
:::

::: right
Right. The image sits $2f_i$ from the wanted station, on the far side of the oscillator.
:::
:::

::: explain
## Why does multiplying a signal by a cosine shift its spectrum?

::: model
A cosine is the sum of two complex exponentials, $\frac{1}{2}(e^{j2\pi f_ct} + e^{-j2\pi f_ct})$. Multiplying a signal by $e^{j2\pi f_ct}$ adds $f_c$ to the frequency of every one of its components, sliding the whole spectrum up by $f_c$; multiplying by $e^{-j2\pi f_ct}$ slides it down. So the product is two half-size copies of the original spectrum, centered at $+f_c$ and $-f_c$. That's how a baseband signal gets moved up to a radio frequency, and how a receiver moves it back.
:::
:::

::: practice

::: check
given: fc = 10 | 455; fm = 1 | 4
answer: fc - fm
unit: kHz
tolerance: 0.01%

## Where is the lower sideband of a {fc} kHz carrier modulated by a {fm} kHz tone?

::: misses
- [fc + fm] That's the upper.
- [any] $f_c - f_m$.
:::
:::

::: check
given: Pc = 100 | 1000; m = 0.5 | 1
answer: Pc*m^2/4
unit: W
tolerance: 0.5%

## An AM transmitter has a {Pc} W carrier and tone modulation of depth {m}. How much power is in each sideband?

::: misses
- [Pc*m^2/2] That's both sidebands together.
- [any] $(m/2)^2$ of the carrier's power.
:::
:::

::: check
given: frf = 88 | 108; flo = 98.7 | 118.7
answer: abs(frf - flo)
unit: MHz
tolerance: 0.1%

## A receiver's local oscillator is at {flo} MHz and the station at {frf} MHz. What is the IF?

::: misses
- [any] $|f_\text{RF} - f_\text{LO}|$.
:::
:::
:::
