]> Sound and music - Example: Digital Lowpass Filter

Example: Digital Lowpass Filter

Suppose we want to construct a digital filter with cutoff f c from a 2-pole Butterworth lowpass filter. Then start with its transfer function

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

which has 1 as the cutoff freqency.

In order for the transformation to work we need the cutoff to be tan(a/2 ) instead of 1 , where a=2 πf c/f s. So we compute ω=tan(πf c/f s) and replace s with s/ω so that the cutoff is at iω instead of i. Then we perform a bilinear transform by replacing s with z1 z+1 . We end up with

H(z)=1 1 ω 2 (z1 z+1 ) 2 +2 1 ωz1 z+1 +1 =z 2 +2 z+1 (1 ω 2 +2 ω+1 )z 2 +(2 2 ω 2 )z+(1 ω 2 2 ω+1 )

So letting d=1 ω, c=1 /(d 2 +2 d+1 ), we have the filter coefficients:

a 0 =c,a 1 =2 c,a 2 =c,b 1 =(2 2 d 2 )c,b 2 =(d 2 +1 2 d)c