I am using MIT-BIH arrhythmical database where I have a digital signal of 1200 Hz so 1200 samples per second. This means that analog filters have already applied to remove the frequencies over Nyquist frequency, so no aliasing.

However, I want to take equispaced sampling, every two sample, simply by the following in Matlab


I am reading Andre Quinquils' book Digital Signal Processing Using Matlab 2008:

It is always necessary to use an anti-aliasing filter before the sampling stage in order to avoid any spectral aliasing risk and to set an appropriate sampling frequency. In practice, a causal approximation of this ideal filter is used. Thus, depending on the chosen filter synthesis method, some imperfections are introduced, such as a passband amplitude ripple, a transition band and a stopband finite attenuation.

Does this mean that I need to apply a new anti-aliasing filter before the sampling stage in oder to avoid aliasing? I think the sampling stage here is the equalspaced sampling. I have not applied any new special anti-aliasing filter.

Which antialiasing filter can you use before equalspaced sampling stage?

  • $\begingroup$ In reality, the sampling frequency is 360Hz in the database and Nyquist frequncy is 180Hz. Here, I used for some reason 1200 Hz as an example. $\endgroup$ Dec 16, 2013 at 9:32

1 Answer 1


Yes, you have to apply another filter before downsampling in order to avoid aliasing. Your original signal has been acquired with a sampling rate $f_\mathrm{s} = 1.2\,\text{kHz}$. Taking every second sample effectively means that you divide the sampling rate by two, so your new sampling rate $f_\mathrm{s}'= f_\mathrm{s}/2 = 600\, \text{Hz}$. To avoid aliasing you have to make sure that the signal contains no frequencies above $f_\mathrm{s}'/2 = 300\, \text{Hz}$ before you apply the downsampling. If it is certain that your signal does not contain any frequencies above $f_\mathrm{s}'/2$ then you don't need a filter.

The anti-aliasing filter can be implemented by an FIR filter. Its properties like stopband attenuation and width of transition band depend on your signal: if you have spectral components near to 300 Hz, the filter needs to be quite steep and it will consequently have a high order. If hardware implementation is an issue, have a look at Cascaded Integrator-comb filters.

  • $\begingroup$ There is analog filters in the hardware. So the existing digital signal does not have any frequencies over f_s. So I think I do not need apply any filters before downsampling. Is this true? $\endgroup$ Dec 16, 2013 at 9:57
  • $\begingroup$ If the analog filter has a cut-off frequency of $f_\mathrm{s}'/2$ you do not need an additional digital filter before downsampling. If its cut-off frequency is $f_\mathrm{s}/2$, you generally do need a digital filter before downsampling. $\endgroup$
    – Deve
    Dec 16, 2013 at 10:01

Your Answer

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

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