Transfer Functions

Transfer functions concisely describe the frequency response of a given filter.

LTI Systems

Filters are linear time-invariant (LTI) systems.

Write \(f(x)\) for the output of \(x\). A system is linear if \(f(x + x') = f(x) + f(x')\) and \(f(a x) = a f(x)\). Below we shall use the notation \(x \rightarrow y\) to mean \(y\) is the output of the system when the input is \(x\), i.e. \(y = f(x)\).

Time-invariance means that the behaviour of the system is independent of the current time; it only depends on the previous inputs.

LTI systems can be continuous (where the input is a function of time) or discrete (where the input is a sequence of values). Analog filters are continuous, whilst digital filters are discrete.

Digital Filters

Write \(x[n]\) for the \(n\)th input and \(y[n]\) for the corresponding output.

Suppose the discrete input signal is \(x[n] = z^n\) for some complex number \(z\).

By linearity, \(x[n] = z^n = z x[n-1] \rightarrow z y[n-1]\). Hence by induction, \(y[n] = H z^n\) for some \(H\) that depends on \(z\).

Since \(H\) depends on \(z\), we write \(H = H(z)\). It is called the transfer function. If the output is real when the input is real (which is always the case for audio filters), then it is easy to show that \(H(z^*) = H(z)^*\) (see the \(z\) transform).

Points on the unit circle of \(H(z)\) determine the filter’s effect on sinusoids: for all \(a\), \(|H(e^{ia})|\) is the amount a sinusoid of the form \(\cos(a n + b)\) is amplified after passing through the filter (i.e. \(|H(e^{ia})|\) is the filter’s frequency response). As any periodic signal can be represented as a sum of sinusoids, \(H(z)\) determines the effect of a filter on any periodic signal.

Proof: Suppose the input signal is

\[x[n] = \cos(a n + b) = \frac{e^{i(a n+b)} + e^{-i(a n+b)}}{2}\]

Then by linearity, and using the above observations,

\[y[n] = \frac{e^{i b}H(e^{i a})e^{i a n} + e^{-i b}H(e^{-i a}) e^{-i a n}}{2}\]

Letting \(H(e^{i a}) = re^{i \theta}\), we see

\[y[n] = r\frac{e^{i(a n + b + \theta)} + e^{-i(a n + b + \theta)}}{2} = r \cos(a n + b + \theta) \]

For a low-pass filter we want \(|H(e^{i \theta})| \approx 1\) when \(\theta \approx 0\), so that low frequencies pass through unchanged, and \(|H(e^{i \theta})| \approx 0\) when \(\theta \approx \pi\), in order to cutoff higher frequencies.

Note that the phase response is determined by \(\angle H(e^{i a})\).

Analog Filters

Consider an analog filter, whose input at time \(t\) is \(x(t)\), and has corresponding output \(y(t)\).

Suppose the input is the signal \(x(t) = e^{s t}\). Then by linearity,

\[\frac {x(t+d) - x(t)}{d} \rightarrow \frac{y(t+d) - y(t)}{d}\]

Letting \(d\) approach zero shows that \(x'(t) \rightarrow y'(t)\). But since \(x'(t) = s e^{s t}\), we have

\[y'(t) = s y(t)\]

which means \(y(t) = H e^{s t}\) for some \(H\) depending on \(s\), so write \(H = H(s)\). (Proof: \(d y/d t = s y\) implies \(d t/d y = 1/s y\) which implies \(t = (\ln y)/s + C\), for some constant \(C\), in other words \(y = H e^{s t}\) for some constant \(H\).)

The function \(H(s)\) is the transfer function for the analog filter. As in the digital case, consider what happens to the input

\[x(t) = \cos(a t + b) = \frac{1}{2} (e^{i a t} + e^{-i a t})\]

If we let \(H(i a) = re^{i \theta}\) then the output is \(y(t) = r \cos(a t + b + \theta)\), so we see that the effect of the filter on sinusoids is determined by the values of \(H(s)\) on the imaginary axis (for example \(H(2 \pi i)\) determines the behaviour of 1Hz sinusoids).

For a low-pass analog filter, we want \(|H(s)| \approx 1\) on the imaginary axis near the origin, and near zero as \(s\) approaches infinity, so that \(\cos(a t)\) is cut off for high \(a\) but let through unchanged for low \(a\).

Stability

A filter is stable if the output tends to zero if the input becomes zero, otherwise it is unstable. It turns out a digital filter is stable if and only if the poles of its transfer function lie within the unit circle. Similarly an analog filter is stable if and only if the poles of its transfer function lie on the left side of the imaginary axis.


Ben Lynn blynn@cs.stanford.edu 💡