]> Sound and music - Digital Filters

Digital Filters

Suppose we have a digital with transfer function

H(z)=a 0 (zz 1 )...(zz n)(zp 1 )...(zp n)

i.e. z 1 ,...,z n are the zeroes and p 1 ,...,p n are the poles of H(z).

Geometrically speaking, we see that for any point z in the complex plane, H(z) is simply a 0 times the product of the lengths of the distances of z from each zero, divided by the product of the lengths of the distances of z from each pole.

Using this fact, one can predict the behaviour of simple digital filters by hand, by looking at the distances between points on the unit circle and the zeroes and poles of the transfer function.

Since roots of a polynomial with real coefficients are real or occur in pairs as complex conjugates, to understand filters, we can first study filters with up to two zeroes or poles, and then view all other filters as a combination of them.

One-Pole Filters

Consider the transfer function

H(z)=1 /(1 rz 1 )=z/(zr)

for some real number r. (We consider the complex case when discussing two-pole filters.) If we want a stable filter we must have r<1 . If r>0 , the closest point on the unit circle to r is 1, and the furthest is 1 , thus we can see that H(z) decreases as we go from 1 to 1 along the unit circle. Thus we have a lowpass filter. Similarly, if r<0 , we have a highpass filter.

The square of the frequency response is

H(e iθ)=1 r 2 +1 2 rcosθ

Thus if r>0 , the peak gain is 1 /(1 r) at θ=0 , otherwise it is 1 /(1 +r) at θ=π.

One-Zero Filters

Now consider a digital filter with transfer function

H(z)=(zr)/z

Since this is the reciprocal of the previous case, its frequency response is simply the reciprocal of that of the one-pole filter. Thus for r<0 we obtain a lowpass filter and for r>0 we obtain a highpass filter.

The square of the frequency response is

H(e iθ)=r 2 +1 2 rcosθ

Thus if r>0 , the peak gain is 1 +r at θ=π, otherwise it is 1 r at θ=0 .

If we graph the equations for the frequency responses of the one-zero and one-pole filters, we find that the one-pole filter is "sharper".

Two-Pole Filters

If both poles are real, then we may view the filter as a cascade of two one-pole filters that we have described above. Otherwise the poles are complex conjugates.

Consider a single complex pole Re ia with R<1 for stability. The closest point on the unit circle is e ia, thus it acts as a bandpass filter with resonance at a. But at a the gain is not maximal which means the peak gain is not actually at a. The conjugate to this pole has the same effect. Adding them together guarantees the output is real but the peak gain will not be at a.

It turns out that the 3dB (half-power) bandwidth is approximately

B=ln(R)πT

where R is the pole radius, and T is the sampling interval in seconds [Smith04].

Two-Zero Filters

When both zeroes are real, again we may consider the filter as a cascade of two one-zero filters. Otherwise we have the reciprocal of the previous case, so we end up with a notch filter.

Examples

Some simple digital filters:

Allpass Filter: Consider a filter where for each pole p there exists a zero z with z=1 /p. Then it turns out the filter will have constant gain across all frequencies. Only the phases of the input signal frequencies are affected. Such a filter is called an allpass filter.

DC Blocker: By placing a zero at 1, and pole very close to it (e.g. 0.995 for a 44.1kHz sampling rate [Smith04]) we obtain a filter that removes the DC component of a signal.