[sdiy] Digital filtering question

Richie Burnett rburnett at richieburnett.co.uk
Mon Aug 23 22:29:00 CEST 2010


Hi Tom,

> All the textbooks tell me that the ideal digital lowpass filter has a 
> filter kernel that is the Sinc function, Sin(x)/x.
> This function needs windowing for practical use since it continues to 
> infinity in both directions, but that's just an implementation detail!

This is a bit misleading.  The ideal brickwall lowpass filter in the 
frequency domain is equivalent to a sinc function that extends to plus and 
minus infinity in the time domain.  This is of academic significance only 
since practical systems need to give results in finite time.  Once you 
truncate and window the sinc function it is no longer the optimal solution 
to get close to an ideal filter with a finite number of coefficients.  There 
are better FIR filter kernels with the same number of sample points.

Firstly, it is more helpful to think of the the sinc function as: 
sin(pi*x*n) / (pi*x*n)

Where n is the sample number and x is the "design parameter" that is used to 
dilate the sinc function in the time domain and control the cutoff frequency 
in the frequency domain.

> My question is: What's the cutoff frequency?

The cutoff frequency is equal to the Nyquist frequency of the system (Fs/2) 
divided by the number of samples between zero crossings in the sinc 
function.   The number of samples between the zero crossings in the sinc 
function is equal to 1/x in the above equation.

Or to put it another way, if you want your filter to cutoff at a tenth of 
the system's Nyquist frequency then you need to set x to 0.1 in the above 
equation, and it will result in a discrete sinc function with ten sample 
points between each zero crossing.

All this assumes that the sinc function exists for infinite time in both 
directions.  Truncation and windowing of the sinc function in the time 
domain both move the frequency domain behaviour away from the ideal 
brickwall lowpass response.  Passband droop, ripples in the stopband and a 
wide gradual transition region are the main symptoms of truncation and 
windowing.

If you know the filter design requirements and the number of taps then 
iterative techniques like Remez exchange (Parks McClellan) will give a more 
optimal FIR filter design.

I hope this info helps,

-Richie, 




More information about the Synth-diy mailing list