]> Sound and music - Transfer Functions

## Transfer Functions

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

## LTI Systems

Filters are linear time-invariant (LTI) systems.

Write $f\left(x\right)$ for the output of $x$. A system is linear if $f\left(x+x\prime \right)=f\left(x\right)+f\left(x\prime \right)$ and $f\left(ax\right)=af\left(x\right)$. Below we shall use the notation $x\to y$ to mean $y$ is the output of the system when the input is $x$, i.e. $y=f\left(x\right)$.

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\left[n\right]$ for the $n$th input and $y\left[n\right]$ for the corresponding output.

Suppose the discrete input signal is $x\left[n\right]={z}^{n}$ for some complex number $z$.

By linearity, $x\left[n\right]={z}^{n}=zx\left[n-1\right]\to zy\left[n-1\right]$. Hence by induction, $y\left[n\right]=H{z}^{n}$ for some $H$ that depends on $z$.

Since $H$ depends on $z$, we write $H=H\left(z\right)$. 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\left({z}^{*}\right)=H\left(z{\right)}^{*}$ (see the $z$ transform).

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

Proof: Suppose the input signal is

$x\left[n\right]=\mathrm{cos}\left(an+b\right)=\frac{{e}^{i\left(an+b\right)}+{e}^{-i\left(an+b\right)}}{2}$

Then by linearity, and using the above observations,

$y\left[n\right]=\frac{{e}^{ib}H\left({e}^{ia}\right){e}^{ian}+{e}^{-ib}H\left({e}^{-ia}\right){e}^{-ian}}{2}$

Letting $H\left({e}^{ia}\right)={\mathrm{re}}^{i\theta }$, we see

$y\left[n\right]=r\frac{{e}^{i\left(an+b+\theta \right)}+{e}^{-i\left(an+b+\theta \right)}}{2}=r\mathrm{cos}\left(an+b+\theta \right)\blacksquare$

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

Note that the phase response is determined by $\angle H\left({e}^{ia}\right)$.

## Analog Filters

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

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

$\frac{x\left(t+d\right)-x\left(t\right)}{d}\to \frac{y\left(t+d\right)-y\left(t\right)}{d}$

Letting $d$ approach zero shows that $x\prime \left(t\right)\to y\prime \left(t\right)$. But since $x\prime \left(t\right)=s{e}^{st}$, we have

$y\prime \left(t\right)=sy\left(t\right)$

which means $y\left(t\right)=H{e}^{st}$ for some $H$ depending on $s$, so write $H=H\left(s\right)$. (Proof: $dy/dt=sy$ implies $dt/dy=1/sy$ which implies $t=\left(\mathrm{ln}y\right)/s+C$, for some constant $C$, in other words $y=H{e}^{st}$ for some constant $H$.)

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

$x\left(t\right)=\mathrm{cos}\left(at+b\right)=\frac{1}{2}\left({e}^{iat}+{e}^{-iat}\right)$

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

For a low-pass analog filter, we want $\mid H\left(s\right)\mid \approx 1$ on the imaginary axis near the origin, and near zero as $s$ approaches infinity, so that $\mathrm{cos}\left(at\right)$ 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.