]> Sound and music - Analog Filter Designs

Analog Filter Designs

These standard analog lowpass filters can be used as starting points for constructing digital filters. The filter descriptions are usually normalized, that is, the point of interest (such as the -3dB cutoff point) on the imaginary axis is always at i. If we want the point of interest to be at ω c instead (we may be designing a filter with a particular cutoff for example), H(s) can be scaled appropriately by replacing s with s/ω c. This procedure is known as prewarping.

Butterworth

The transfer function H(s) of the N-pole Butterworth filter has N poles evenly spaced around the left half of the unit circle. In other words, it has the form H(s)=1 /(sp 1 )(sp N) where

p k=e i(2 k+N1 )π2 N

The square of its frequency response is

H(iω) 2 =1 1 +ω 2 N

At a glance, we can see when ω=0 the gain is 1, when ω= the gain is 0, and when ω=1 , the gain is 1 /2 . In some sense the Butterworth is the best possible smooth lowpass filter: it has a maximally flat frequency response at low frequencies since the first 2 N derivatives of the frequency response take the value zero at ω=0 .

Chebyshev

By placing the poles on an ellipse instead of a circle, a lowpass filter with better rolloff can be achieved at the expense of allowing ripples in either the passband (Chebyshev Type I) or the stopband (Chebyshev Type 2).

Elliptic

The Butterworth and Chebyshev filters are special kinds of elliptic filters (also known as Cauer filters). These involve zeros as well as poles, and give very high performance filters at the expense of ripples in both the passband and stopband. They are tedious to compute.

Bessel

Bessel filters have maximally linear phase response at low frequencies, though their frequency response is not as good as the other three lowpass filters described here.

Filter Transformations

Once a lowpass filter is obtained, it may be transformed into other kinds of filters by a simple variable substitution.

Highpass

If s is replaced with 1 /s in H(s), we see the value of H(iω) is now what the value of H(1 /iω)=H(i/ω) was in the lowpass filter, thus low frequencies will now be cut off, while high ones are let through. This gives us a highpass filter.

Bandpass

Consider replacing s with s+c 2 /s. Then H(iω) will now have the value H(i(ωc 2 /ω)). Note ωc 2 /ω is zero when ω=c, tends to infinity as ω>c increases, and tends to minus infinity as ω<c tends to zero. Thus it is as if a lowpass filter has been placed on either side of c, which gives a bandpass filter.

To control the bandwidth of this filter, we replace s by s/B before applying the above transformation, where B is the desired bandwidth. This will place the lowpass cutoff at B (instead of 1). Then the positive solutions of ωc 2 /ω=±B are ω=(±B+B 2 +4 c 2 )/2 , and the difference between these two solution is precisely B.

Bandstop

By transforming to a highpass filter, and then applying the bandpass transformation, we will have placed a highpass filter on either side of the desired frequency, creating a bandstop (or notch) filter.

In other words, we end up the reciprocal of the above function, that is, we replace s by s/(s 2 +c 2 ). As expected, this maps ω to the reciprocal of the previous case. iω/(iω+c 2 ) takes the value 0 at zero, approaches infinity as ω approaches c from below, approaches minus infinity as ω approaches c from above, and lastly tends to zero as ω tends to infinity.

Shelving, Peaking

If the output of a lowpass filter is added to the input then the low frequencies are boosted. The combined transfer function has the form H(s)=1 +H LP(s) where H LP is the transfer function of the lowpass filter. Using this, an analog filter that performs shelving can be designed

Similarly, if the output of a bandpass filter added to the input signal then peaking occurs, that is, a certain band of frequencies is boosted.

The Cookbook Filters

Robert Bristow-Johnson’s text file “Cookbook formulae for audio EQ biquad filter coefficients” describes how to construct various types of analog filters using at most two poles and zeroes, and also derives digital versions of each filter.

Cookbook Lowpass

For a lowpass filter, the text file gives the transfer function

H(s)=1 s 2 +s/Q+1

where Q is a parameter called "resonance". (For Q=1 /2 we get the 2-pole Butterworth filter. Increasing Q moves the poles closer to the imaginary axis while keeping them on the unit circle.) The square of the frequency response of this filter is

H(iω) 2 =1 1 ω 2 +iω/Q 2 =1 ω 4 (2 1 /Q 2 )ω 2 +1

In particular, H(i)=Q.

Cookbook Bandpass

The cookbook’s bandpass filters are transformed 1-pole Butterworth lowpass filters.

From above the 1-pole Butterworth filter with cutoff B has transfer function

H(s)=Bs+B

Applying the above bandpass transformation gives a filter with transfer function

H(s)=Bss 2 +Bs+1

The cookbook describes a bandpass filter with this transfer function (with Q=1 /B), along with another with peak gain Q, which may be obtained by multiplication by Q. However, the cookbook measures the bandwidth in octaves, so we get

BW=lgB 2 +4 +B2 lgB 2 +4 B2

where lg denotes log base 2. Thus

2 BW=B 2 +4 +BB 2 +4 B

Rearranging gives

2 BWB 2 =(2 BW1 ) 2

Thus

1 /Q=B=2 BW/2 2 BW/2

which agrees with the formula given in the text file. Transforming to digital changes the bandwidth however: if the bandpass frequencies were ω 1 ,ω 2 , after a bilinear transform they are proportional to arctan(ω 1 ),arctan(ω 2 ).

Unfortunately it is not possible to obtain a closed formula that relates BW a and BW d, but a first-order approximation described in a paper by Robert Bristow-Johnson. gives BW a=BW dω 0 /sin(ω 0 ), which is used in the text file.

Cookbook Notch

The transfer function

H(s)=1 +s 2 1 +s/Q+s 2

can be derived from starting with a highpass 1-pole Butterworth filter with cutoff B

H(s)=1 B/s+1

and applying the bandpass transformation. Equivalently, we may start from a lowpass 1-pole Butterworth filter and apply the bandstop transformation.