0
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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
$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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