Thursday, July 13, 2017

Filter design - Rules of thumb regarding ratio of sampling and stop/pass frequency


The issue: I have a signal in the time domain sampled at 51.2KHz. I want to apply a highpass filter with a pass frequency of 20 Hz.


The problem: Using Matlab to do that, the design of the filter takes forever to design. Having made a bit of research on this, it seems that this happens because of the high ratio of $\frac{sampling frequency}{Fpass}$ .


This got me wondering, is there a rule of thumb regarding this quantity?



Answer



In addition to @David's comments about theoretical results, there is another approach you can take. The idea is to filter with a low-pass filter, then downsample, then repeat N times. The LPFs do not need to be very long, and each filter in the sequence is less complex than the previous one, because it works at a slower sampling rate.


An especially interesting use case is when you use half-band filters, because their computational complexity is so low. These filters have cutoff frequency at $f_N/2$.


In your case, the first HB filter would have $f_c=25.6$ kHz, and would be followed by a decimator that reduces the sampling rate by half. Subsequent low-pass filters have cutoff frequencies at 12.8, 6.4, 3.2, 1.6 kHz, 800, 400, 200, 100, 50, 25 Hz. So you would have 11 filters in series, and maybe one last one to get rid of the final 5 Hz.


Even though you have a large sequence of filters/downsamplers, I think you'll find this much easier to design than a single, extremely high-order filter.


My favorite reference on this subject is




Bellanger, M., Daguet, J., and Lepagnol, G. 1974. "Interpolation, extrapolation, and reduction of computation speed in digital filters." IEEE Transactions on Acoustics, Speech, and Signal Processing 22 (4): 231-235. doi:10.1109/TASSP.1974.1162581.



No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...