I'm working on a project for the university about the anti aliasing filter.

I have a small audio file, which has a sampling rate of 22KHz. Now when I downsample it 8 times, the file sounds weird. So far so good.

Now I should design an anti aliasing filter to avoid that. But how do I choose the cut off frequency based on the spectrum of the 8-time downsampled signal?

Anyhelp would be appreciated.The first one in the original, the second one is the 8 time downsampled


1 Answer 1


From your statement, i understand a discrete-time downsampling of a sequence $x[n]$ already converted to digital, without aliasing, previously.

So to prevent any aliasing on the downsampled sequence $y[n]$, you should first apply an anti-aliasing lowpass filter to the input sequence $x[n]$. The cutoff frequency of the lowpass filter is given by the downsampling ratio $D$ and is:

$$ \omega_c = \frac{ \pi }{D }$$ radians per sample. The gain of the lowpass filter is one.

The following Matlab\Octave code designs a linear phase, type-I, FIR lowpass filter of odd length $L = 2K+1$ with a group delay of $K$ samples :

D = 8;     % downsampling factor
K = 256;   % group delay of FIR linear phase filter.
h = fir1(2*K, 1/D); % FIR, LPF, Type-I, L = 2K+1, wc = pi/D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.