---
title: Transfer functions, H(jω)
heading: One function that says what a circuit does to every frequency
eyebrow: C4 · Lesson 1 · Transfer functions
xp: 40
---

::: hook
Feed a linear circuit a sine wave and a sine wave of the same frequency comes out, scaled and shifted. The scaling and shifting depend only on the frequency, so a single complex function, $H(j\omega) = \mathbf V_\text{out}/\mathbf V_\text{in}$, captures everything the circuit does to every possible input. Since any signal is a sum of sinusoids (A10), knowing $H$ means knowing the circuit.

::: play
- This is the transfer function of a network with one zero and one pole: $H = K\frac{1 + jf/f_z}{1 + jf/f_p}$. The top panel is the gain in dB, the bottom the phase.
- Put the pole below the zero. What does the network do to low frequencies compared with high ones? Now swap them.
- Where does the phase move most?
:::
:::

```sim plot
view: bode
x: f = 1..1M Hz log
slider: K = 0.1..10 = 1 log
slider: fz = 10..100k = 10k Hz log
slider: fp = 10..100k = 1k Hz log
H: K*(1 + j*f/fz)/(1 + j*f/fp)
marker: x = fz | label: zero
marker: x = fp | label: pole
readout: gain at DC = 20*log10(K) dB
readout: gain at high f = 20*log10(K*fp/fz) dB
```

::: predict
## A network has $H = \frac{1 + jf/10\text{k}}{1 + jf/1\text{k}}$. How does it treat a 100 kHz tone compared with a 10 Hz tone?

- [ ] Both pass equally
- [x] The 100 kHz tone comes out 10 times (20 dB) smaller
- [ ] The 100 kHz tone comes out 10 times larger
- [ ] The 100 kHz tone is blocked completely

::: reveal
10 times smaller. At 10 Hz both brackets are nearly 1, so $H \approx 1$. Far above both corners, $H \approx \frac{jf/10\text{k}}{jf/1\text{k}} = 0.1$. Between 1 kHz and 10 kHz the gain slopes down, then levels off. This "lag network" turns down high frequencies by a fixed amount, without blocking them.
:::
:::

::: nameit
## Transfer functions

**Definition.** For a linear circuit in the sinusoidal steady state:

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

The output's amplitude is $|H|$ times the input's, and its phase is shifted by $\angle H$.

**In s.** Replacing $j\omega$ by $s$ gives $H(s)$, the Laplace-domain transfer function (A10.20). For circuits of R, L and C it's a ratio of polynomials:

$$H(s) = K\frac{(1 + s/z_1)(1 + s/z_2)\cdots}{(1 + s/p_1)(1 + s/p_2)\cdots}$$

The roots of the numerator are **zeros** and of the denominator **poles**; for most circuits they sit at negative real $s$ (or come in complex pairs), at frequencies $f = p/2\pi$ called **corners**.

**Finding H.** Write impedances in $s$ ($R$, $sL$, $1/sC$) and solve the circuit as a divider or with nodal analysis. Some standards:

| Network | $H(s)$ |
|---|---|
| RC low-pass | $\dfrac{1}{1 + sRC}$ |
| RC high-pass | $\dfrac{sRC}{1 + sRC}$ |
| lag network ($R_1$ in series, then $R_2$ and C in series to ground) | $\dfrac{1 + sR_2C}{1 + s(R_1 + R_2)C}$ |

**Limits.** $H(0)$ is the DC gain (capacitors open, inductors short). $H(\infty)$ is the high-frequency gain (capacitors short, inductors open). Checking both against the circuit catches most algebra slips.

**Cascades.** If one stage's output drives the next without loading it (a buffer between them, lessons 13 and 20), the transfer functions multiply, and their gains in dB add.
:::


::: example
## An RC high-pass has R = 10 kΩ and C = 10 nF. What does it do to a 500 Hz sine?

::: solution
1. **Corner frequency.**
   $$\begin{aligned} f_c &= \frac{1}{2\pi RC} \\ &= 1.59\ \text{kHz} \end{aligned}$$
2. **Gain.** At $f/f_c = 0.314$,
   $$\begin{aligned} |H| &= \frac{0.314}{\sqrt{1 + 0.314^2}} \\ &= 0.300 \end{aligned}$$
   which is −10.5 dB.
3. **Phase.**
   $$\begin{aligned} \phi &= 90° - \arctan 0.314 \\ &= +72.6° \end{aligned}$$
   The output leads.

**Answer:** the 500 Hz sine comes out 0.300 times as large (−10.5 dB) and leads by 72.6°.
:::
:::

::: example
## A lag network has $R_1$ = 9 kΩ in series, then $R_2$ = 1 kΩ and C = 100 nF in series to ground. Where are its pole and zero, and what is its gain at high frequencies?

::: solution
1. **Pole.**
   $$\begin{aligned} f_p &= \frac{1}{2\pi(R_1 + R_2)C} \\ &= 159\ \text{Hz} \end{aligned}$$
2. **Zero.**
   $$\begin{aligned} f_z &= \frac{1}{2\pi R_2C} \\ &= 1.59\ \text{kHz} \end{aligned}$$
3. **High-frequency gain.** Far above both, C is a short and the network is a divider:
   $$\frac{R_2}{R_1 + R_2} = 0.1$$
   which is −20 dB.

**Answer:** the pole is at 159 Hz and the zero at 1.59 kHz, and the gain at high frequencies is 0.1 (−20 dB).
:::
:::

::: example
## An op-amp integrator has 10 kΩ in and 10 nF in feedback, so $H = -\frac{1}{j\omega RC}$. What does it do to a 1 kHz sine, and at what frequency is its gain 1?

::: solution
1. **ωRC at 1 kHz.**
   $$\begin{aligned} \omega RC &= 2\pi \times 1000 \times 10^{-4} \\ &= 0.628 \end{aligned}$$
2. **Gain at 1 kHz.**
   $$\begin{aligned} |H| &= \frac{1}{0.628} \\ &= 1.59 \end{aligned}$$
3. **Phase.**
   $$-\frac1j = j$$
   a lead of 90°, so the output is a cosine where the input was a sine.
4. **Unity-gain frequency.** The gain is 1 where ωRC = 1, at
   $$\begin{aligned} f &= \frac{1}{2\pi RC} \\ &= 1.59\ \text{kHz} \end{aligned}$$
5. **Slope.** The gain falls 20 dB per decade at every frequency, with no corner at all. One transfer function packs in both behaviors: a gain falling as 1/f and a constant 90° shift.

**Answer:** at 1 kHz it multiplies the sine by 1.59 and leads it by 90°, turning it into a cosine; its gain is 1 at 1.59 kHz.
:::
:::

::: check
given: K = 2 | 5 | 10; fz = 1 | 10; fp = 0.1 | 0.5
answer: K
tolerance: 0.5%

## A network has $H = \given{K}\frac{1 + jf/f_z}{1 + jf/f_p}$ with $f_z$ = {fz} kHz and $f_p$ = {fp} kHz. What is its gain at DC?

::: right
Right. At f = 0 both brackets are 1: {answer}.
:::

::: misses
- [K*fp/fz] That's the high-frequency gain.
- [any] Not yet. Set f = 0.
:::
:::

::: check
given: K = 2 | 5 | 10; fz = 1 | 10; fp = 0.1 | 0.5
answer: K*fp/fz
tolerance: 0.5%

## Same network, $H = \given{K}\frac{1 + jf/f_z}{1 + jf/f_p}$, $f_z$ = {fz} kHz, $f_p$ = {fp} kHz. What is its gain at very high frequencies?

::: right
Right. The 1s become negligible: $K f_p/f_z$ = {answer}.
:::

::: misses
- [K*fz/fp] It's $\frac{jf/f_z}{jf/f_p} = f_p/f_z$.
- [K] That's the DC gain.
- [any] Not yet. Keep only the $jf$ terms.
:::
:::

::: check
given: K = 1 | 2 | 4; fp = 1 | 2 | 5; f = 1 | 3 | 10
answer: K/sqrt(1 + (f/fp)^2)
tolerance: 0.5%

## A low-pass stage has $H = \given{K}/(1 + jf/f_p)$ with $f_p$ = {fp} kHz. What is $|H|$ at {f} kHz?

::: right
Right. $K/\sqrt{1 + (f/f_p)^2}$ = {answer}.
:::

::: misses
- [K/(1 + f/fp)] Take the magnitude: $\sqrt{1 + (f/f_p)^2}$ underneath.
- [any] Not yet. $|H| = K/\sqrt{1 + (f/f_p)^2}$.
:::
:::

::: check
given: g1 = 6 | 12 | 20; g2 = -3 | -10 | 14
answer: g1 + g2
unit: dB
tolerance: 0.5%

## Two buffered stages have gains of {g1} dB and {g2} dB at some frequency. What is the total gain?

::: right
Right. Gains multiply, so their decibels add: {answer}.
:::

::: misses
- [g1*g2] In dB, gains add.
- [any] Not yet. Add the dB values.
:::
:::

::: check
given: R1 = 9 | 19; R2 = 1; C = 10 | 100
answer: 1/(2*pi*(R1 + R2)*1e3*C*1e-9)
unit: Hz
tolerance: 0.5%

## A lag network has $R_1$ = {R1} kΩ in series, then $R_2$ = 1 kΩ and C = {C} nF in series to ground. Where is its pole?

::: right
Right. $f_p = 1/(2\pi(R_1 + R_2)C)$ = {answer}.
:::

::: misses
- [1/(2*pi*R2*1e3*C*1e-9)] That's the zero.
- [1/(2*pi*R1*1e3*C*1e-9)] Both resistors are in the denominator's time constant.
- [any] Not yet. The pole's time constant is $(R_1 + R_2)C$.
:::
:::

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

## An integrator has R = {R} kΩ in and C = {C} nF in feedback.

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

### What's its gain magnitude at {f} kHz?

::: misses
- [any] $\frac{1}{\omega RC}$.
:::
:::

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

### At what frequency is its gain 1?

::: misses
- [any] $\frac{1}{2\pi RC}$.
:::
:::
:::

::: check
kind: derivation
vars: R = 100..1000000, C = 0.000000000001..0.000001, w = 1..10000000

## An integrator $H = -\frac{1}{j\omega RC}$.

::: step
answer: 1/(w*R*C)

### What's |H|?
:::

::: step
answer: 1/(R*C)

### At what angular frequency is |H| = 1?
:::

::: step
answer: 20*log(1/(w*R*C))

### What's its gain in dB?
:::

::: right
Right. A straight line falling 20 dB per decade, through 0 dB at 1/RC.
:::
:::

::: explain
## Why does knowing a circuit's transfer function at every frequency tell you how it responds to any input?

::: model
Any signal can be built as a sum of sinusoids at different frequencies, by Fourier analysis. A linear circuit responds to a sum by summing its responses to each part, and to each sinusoid by scaling and shifting it by the transfer function's magnitude and phase at that frequency. So feeding every frequency component through $H$ and adding the results gives the output for any input.
:::
:::

::: practice

::: check
given: K = 3 | 10 | 30
answer: 20*log10(K)
unit: dB
tolerance: 0.5%

## A gain of {K}, in dB?

::: misses
- [10*log10(K)] Voltage gains use 20 log₁₀.
- [any] $20\log_{10}K$.
:::
:::

::: check
given: R = 1 | 10; C = 1 | 10
answer: 1/(2*pi*R*1e3*C*1e-9)/1000
unit: kHz
tolerance: 0.5%

## An RC high-pass with {R} kΩ and {C} nF. Corner frequency?

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

::: check
given: A1 = 2 | 5; A2 = 3 | 4
answer: A1*A2
tolerance: 0.5%

## Two buffered stages with gains {A1} and {A2}. Total gain?

::: misses
- [A1 + A2] Gains multiply (it's their dB values that add).
- [any] Multiply.
:::
:::
:::
