---
title: A complex number that depends on frequency
heading: An RC filter as one arrow that moves
eyebrow: A3 · Lesson 19 · Frequency response
xp: 40
---

::: hook
Feed a sine wave into an RC low-pass filter and the output is a smaller, delayed copy. How much smaller and how much delayed depends on the frequency. Both facts live in one complex number, the filter's response $H = \frac{1}{1 + j\omega RC}$: its size is the gain and its angle is the phase shift. As the frequency sweeps, the arrow traces a path, and plotting its size and angle against frequency gives the Bode plot every datasheet uses.

::: play
- This Bode plot shows the size of $H$ in decibels (top) and its angle (bottom) against frequency, for an RC low-pass with corner $f_c = 1/(2\pi RC)$.
- Move $f_c$. What happens to the curves?
- Read the gain and phase right at the corner. Then go ten times higher. How far does the gain fall?
:::
:::

```sim plot
view: bode
x: f = 10..1M Hz log
slider: fc = 100..100k = 1k Hz log
H: 1/(1 + j*f/fc)
marker: x = fc | label: corner
```

::: predict
## At the corner frequency, $\omega RC = 1$, so $H = \frac{1}{1 + j}$. What are its size and angle?

- [ ] 0.5 at −90°
- [x] 0.707 at −45°
- [ ] 1 at 0°
- [ ] 0.707 at +45°

::: reveal
0.707 at −45°. $|1 + j| = \sqrt2$, so $|H| = 1/\sqrt2 = 0.707$, which is −3 dB. The bottom's angle is +45°, so dividing gives −45°: the output lags. That's why the corner is also called the −3 dB point.
:::
:::

::: nameit
## The response as a complex number

For a circuit driven by a sinusoid, the output phasor divided by the input phasor is a complex number that depends on $\omega$:

$$H(j\omega) = \frac{V_{out}}{V_{in}}$$

- $|H|$ is the **gain**: how much the amplitude is scaled.
- $\angle H$ is the **phase shift**: how far the output leads (positive) or lags (negative).

For the RC low-pass, the divider rule from lesson 5 with $Z_1 = R$ and $Z_2 = \frac{1}{j\omega C}$ gives

$$H = \frac{1/(j\omega C)}{R + 1/(j\omega C)} = \frac{1}{1 + j\omega RC}$$

so

$$|H| = \frac{1}{\sqrt{1 + (\omega RC)^2}} \qquad \angle H = -\tan^{-1}(\omega RC)$$

Written with $f_c = 1/(2\pi RC)$, $\omega RC = f/f_c$.

| $f$ | $\vert H \vert$ | in dB | $\angle H$ |
|---|---|---|---|
| $f \ll f_c$ | ≈ 1 | ≈ 0 dB | ≈ 0° |
| $f = f_c$ | 0.707 | −3.0 dB | −45° |
| $f = 10f_c$ | 0.0995 | −20.0 dB | −84.3° |
| $f \gg f_c$ | ≈ $f_c/f$ | falls 20 dB per decade | → −90° |

**Gain in decibels** is $20\log_{10}|H|$, since $H$ is a ratio of voltages. A Bode plot draws it against a log frequency axis, where the high-frequency part becomes a straight line falling 20 dB per decade: a power law, as in A1.

**A high-pass** swaps the parts, $H = \dfrac{j\omega RC}{1 + j\omega RC}$: the mirror image, passing high frequencies and leading in phase.
:::

::: example
## An RC low-pass has $R$ = 10 kΩ and $C$ = 10 nF. What does it do to a 5 kHz sine wave?

::: solution
1. **Corner frequency.**
   $$\begin{aligned} f_c &= \frac{1}{2\pi \times 10^4 \times 10^{-8}}\ \text{Hz} \\ &= 1592\ \text{Hz} \end{aligned}$$
   so $f/f_c = 3.14$.
2. **Gain.**
   $$\begin{aligned} |H| &= \frac{1}{\sqrt{1 + 3.14^2}} \\ &= 0.303 \end{aligned}$$
3. **Gain in decibels.**
   $$20\log_{10}0.303 = -10.4\ \text{dB}$$
4. **Phase.**
   $$\begin{aligned} \angle H &= -\tan^{-1}(3.14) \\ &= -72.3° \end{aligned}$$

**Answer:** the output is 30% of the input ($-10.4$ dB) and lags it by 72°.
:::
:::

::: example
## What frequency does a 1 kHz-corner low-pass attenuate by 40 dB?

::: solution
1. **Approximate.** Well above the corner, $|H| \approx f_c/f$, and −40 dB is a factor of 100, so
   $$\begin{aligned} f &\approx 100 f_c \\ &= 100\ \text{kHz} \end{aligned}$$
2. **Solve exactly.**
   $$\begin{aligned} \frac{1}{\sqrt{1 + x^2}} &= 0.01 \\ x^2 &= 9999 \\ x &= 99.995 \end{aligned}$$
3. **Compare.** The approximation is excellent this far out.

**Answer:** about 100 kHz.
:::
:::

::: example
## A high-pass filter takes its output across a 10 mH inductor in series with a 1 kΩ resistor. What does it do to a 5 kHz sine wave?

::: solution
1. **Transfer function.**
   $$H = \frac{j\omega L}{R + j\omega L}$$
2. **Corner frequency.** The corner is where $\omega L = R$:
   $$\begin{aligned} f_c &= \frac{R}{2\pi L} \\ &= 15.9\ \text{kHz} \end{aligned}$$
3. **Gain at 5 kHz.** At 5 kHz, $f/f_c = 0.314$, so
   $$\begin{aligned} |H| &= \frac{0.314}{\sqrt{1 + 0.314^2}} \\ &= 0.300 \end{aligned}$$
4. **Phase.**
   $$90° - \arctan(0.314) = 72.6°$$

**Answer:** the filter passes 30% of the amplitude, and the output leads the input by 72.6°.
:::
:::

::: check
given: fc = 100 | 1000 | 5000; m = 0.5 | 2 | 3 | 4
answer: 1/sqrt(1 + m^2)
tolerance: 0.5%

## An RC low-pass has its corner at {fc} Hz. What is the size of $H$ at $\given{m} \times \given{fc}$ Hz?

::: right
Right. $f/f_c$ = {m}, so $|H| = 1/\sqrt{1 + \given{m}^2}$ = {answer}.
:::

::: misses
- [1/(1 + m)] The size of $1 + jx$ is $\sqrt{1 + x^2}$, not $1 + x$.
- [1/m] That's the far-above-the-corner approximation. Use the exact size.
- [any] Not yet. $|H| = 1/\sqrt{1 + (f/f_c)^2}$.
:::
:::

::: check
given: m = 0.5 | 2 | 3 | 10
answer: -atan(m)*180/pi
unit: °
tolerance: 0.5%

## What is the phase of an RC low-pass at {m} times its corner frequency?

::: right
Right. $\angle H = -\tan^{-1}(\given{m})$ = {answer}.
:::

::: misses
- [atan(m)*180/pi] The output lags: the angle is negative.
- [-45*m] Phase isn't linear in frequency: use the arctangent.
- [any] Not yet. $-\tan^{-1}(f/f_c)$.
:::
:::

::: check
given: R = 1 | 4.7 | 10; C = 10 | 47 | 100
answer: 1/(2*pi*R*1e3*C*1e-9)
unit: Hz

## What is the corner frequency of an RC filter with {R} kΩ and {C} nF?

::: right
Right. $1/(2\pi RC)$ = {answer}.
:::

::: misses
- [1/(R*1e3*C*1e-9)] That's in rad/s. Divide by $2\pi$.
- [1/(2*pi*R*C)] Put R in ohms and C in farads.
- [any] Not yet. $f_c = 1/(2\pi RC)$.
:::
:::

::: check
given: m = 0.5 | 2 | 3 | 5
answer: 20*log10(1/sqrt(1 + m^2))
unit: dB
tolerance: 0.05

## What is an RC low-pass's gain in dB at {m} times its corner?

::: right
Right. $20\log_{10}(1/\sqrt{1 + \given{m}^2})$ = {answer} dB.
:::

::: misses
- [10*log10(1/sqrt(1 + m^2))] $H$ is a voltage ratio: use 20 log.
- [-20*log10(m)] That's the straight-line approximation. Use the exact size.
- [any] Not yet. Find $|H|$, then $20\log_{10}|H|$.
:::
:::

::: check
given: m = 0.5 | 2 | 3 | 10
answer: m/sqrt(1 + m^2)
tolerance: 0.5%

## An RC high-pass has $H = \dfrac{j\omega RC}{1 + j\omega RC}$. What is $|H|$ at {m} times its corner?

::: right
Right. $|H| = \frac{x}{\sqrt{1 + x^2}}$ with $x$ = {m}: {answer}.
:::

::: misses
- [1/sqrt(1 + m^2)] That's the low-pass. The high-pass has $j\omega RC$ on top.
- [any] Not yet. Divide the sizes of top and bottom.
:::
:::

::: check
kind: choice

## Far above its corner, by how much does an RC low-pass's gain fall for each factor of 10 in frequency?

- [ ] 3 dB
- [ ] 6 dB
- [x] 20 dB
- [ ] 40 dB

::: right
Right. $|H| \approx f_c/f$ there, a factor of 10 smaller each decade, and $20\log_{10}10 = 20$ dB.
:::

::: misses
- [2] That's per octave (a factor of 2 in frequency).
- [any] Far above the corner, $|H| \approx f_c/f$.
:::
:::

::: check
kind: parts
given: R = 1 | 4.7 | 10; C = 10 | 47 | 100; f = 200 | 1000 | 5000

## A high-pass filter has its output across a {R} kΩ resistor, in series with a {C} nF capacitor.

::: part
answer: 1/(2*pi*R*1e3*C*1e-9)
unit: Hz
tolerance: 0.5%

### What is its corner frequency?

::: misses
- [1/(R*1e3*C*1e-9)] That's in rad/s. Divide by $2\pi$.
- [any] $f_c = 1/(2\pi RC)$.
:::
:::

::: part
answer: (f*2*pi*R*1e3*C*1e-9)/sqrt(1 + (f*2*pi*R*1e3*C*1e-9)^2)
tolerance: 0.5%

### What is $|H|$ at {f} Hz?

::: misses
- [1/sqrt(1 + (f*2*pi*R*1e3*C*1e-9)^2)] That's the low-pass response, across the capacitor.
- [any] $|H| = \frac{f/f_c}{\sqrt{1 + (f/f_c)^2}}$.
:::
:::

::: part
answer: 90 - atan(f*2*pi*R*1e3*C*1e-9)*180/pi
unit: °
tolerance: 0.5%

### What is its phase at {f} Hz?

::: misses
- [-atan(f*2*pi*R*1e3*C*1e-9)*180/pi] That's the low-pass phase. The high-pass output leads by 90° more.
- [any] $90° - \arctan(f/f_c)$.
:::
:::
:::

::: check
kind: derivation
vars: w = 1..10000, R = 100..10000, C = 0.0000001..0.00001

## Derive the response of an RC low-pass, $H = \dfrac{1}{1 + j\omega RC}$.

::: step
answer: 1/sqrt(1 + (w*R*C)^2)

### What is $|H|$?
:::

::: step
answer: -atan(w*R*C)

### What is its phase, in radians?
:::

::: step
answer: -10*log(1 + (w*R*C)^2)

### What is $|H|$ in decibels, $20\log_{10}|H|$, written with one log?
:::

::: right
Right. At $\omega = 1/RC$ that's $-10\log_{10} 2 = -3.01$ dB with a phase of −45°: the corner.
:::
:::

::: explain
## Why does one complex number $H$ tell you both how much a filter shrinks a sine wave and how much it delays it?

::: model
For a sinusoid, the input and output are both represented by phasors, and the output phasor is the input phasor times $H$. Multiplying by a complex number scales the length by $|H|$ and turns the angle by $\angle H$. The length of a phasor is the sinusoid's amplitude and its angle is its phase, so $|H|$ is how much the amplitude is scaled and $\angle H$ is how much the phase, and so the timing, is shifted.
:::
:::

::: practice

::: check
given: m = 0.25 | 1 | 4 | 20
answer: 1/sqrt(1 + m^2)
tolerance: 0.5%

## What is $|H|$ for an RC low-pass at {m} times its corner?

::: misses
- [1/(1 + m)] Use Pythagoras for the size of $1 + jx$.
- [any] $1/\sqrt{1 + x^2}$.
:::
:::

::: check
given: m = 0.25 | 0.5 | 4 | 20
answer: -atan(m)*180/pi
unit: °
tolerance: 0.5%

## What phase does an RC low-pass give at {m} times its corner?

::: misses
- [atan(m)*180/pi] It lags.
- [any] $-\tan^{-1}(f/f_c)$.
:::
:::

::: check
given: R = 2.2 | 22 | 100; C = 1 | 22 | 220
answer: 1/(2*pi*R*1e3*C*1e-9)
unit: Hz

## Where is the corner of an RC filter with {R} kΩ and {C} nF?

::: misses
- [1/(R*1e3*C*1e-9)] Divide by $2\pi$.
- [any] $1/(2\pi RC)$.
:::
:::

::: check
given: m = 2 | 3 | 10
answer: atan(1/m)*180/pi
unit: °
tolerance: 0.5%

## An RC high-pass at {m} times its corner: by how many degrees does the output lead?

::: misses
- [atan(m)*180/pi] The top contributes +90°; subtract the bottom's angle: $90° - \tan^{-1}x$.
- [any] $90° - \tan^{-1}(f/f_c)$.
:::
:::

::: check
given: d = 20 | 40 | 60; fc = 100 | 2000
answer: fc*10^(d/20)
unit: Hz

## Far above its corner at {fc} Hz, at roughly what frequency is an RC low-pass down {d} dB? Use $|H| \approx f_c/f$.

::: misses
- [fc*10^(d/10)] For a voltage ratio, use $10^{\text{dB}/20}$.
- [any] $f = f_c \times 10^{d/20}$.
:::
:::
:::
