0
$\begingroup$

I have some data that is sampled at a certain rate (16384Hz). I am only interested in the 10-30Hz region, so I want to downsample the data. My idea to do this goes as follows:

  1. I apply some kind of filter to the data so the PSD quickly drops after about twice the maximum frequency of interest (60Hz). This filter should approach 0 gain after about 10Hz of the cutoff (70Hz).
  2. I fold the filtered PSD on itself so that it goes up to 60Hz. The residual power from the 60-70Hz region will fall in the 0-10Hz region when folded, and, since I don't care about these frequencies, it won't affect the analysis.
  3. I have now resampled the data and can transform it back to the time domain as needed.

So far, I have tried to filter the PSD using a Butterworth filter, but I can't figure out how to make it drop to ~0 fast enough (from ~1 at 60Hz to ~0 at 70Hz). I have the following questions about this procedure:

  1. Does it make sense? Is this a good way to downsample the data given the constraints that I have given?
  2. Is it correct that I should keep the frequencies up to at least twice the maximum frequency of interest (60Hz)? In order to keep the data Nyquist sampled.
  3. Is a Butterworth filter the way to go? Or should I use some other kind of filter?

Excuse me if this question is not well formulated, or if I'm not making any sense, I am very new to the subject and still trying to figure out what exactly it is I'm doing. Thanks in advance!

$\endgroup$
2
  • 1
    $\begingroup$ How long is your data? What are your efficiency requirements? Do you care about phase linearity? Do you care about doing this in the frequency domain or are you ok doing it in the time domain? $\endgroup$
    – Jdip
    Aug 24, 2023 at 8:04
  • $\begingroup$ My data is 64s, but I can get my hands on much more. I'm not too sure about efficiency requirements, just something reasonable. For now I don't care about phase linearity. I'm doing it in Fourier space because that is what I came up with, but it is not necessarily important. $\endgroup$
    – sancholp
    Aug 24, 2023 at 8:21

1 Answer 1

2
$\begingroup$

Does it make sense? Is this a good way to downsample the data given the constraints that I have given?

I don't think so, but from the words (without code or math) it's hard to to understand the exact details.

This being said: down-sampling is a well understood process and it's easy enough: 1) apply low-pass filter, 2) throw away extra samples.

There are some nuances around the filtering process, but that's about it.

Is it correct that I should keep the frequencies up to at least twice the maximum frequency of interest (60Hz)? In order to keep the data Nyquist sampled.

No, that's actually a bit backwards. Your lowpass filter will have two key properties: the cutoff frequency and the stop band start frequency. You want your cutoff frequency to be a bit higher than your frequency of interest and your new sample rate to be at least twice the stop band frequency. There are ways to optimize the latter further but in most applications it's a good idea to leave a little head room there unless there is a strong reason not it. Dealing with a few more samples generally is easier and than trying to manage residual aliasing.

Is a Butterworth filter the way to go? Or should I use some other kind of filter?

That depends on the specific requirements of your application. No lowpass filter is perfect and there are a lot of trade-offs to consider: flatness of pass band, phase distortions, FIR vs IIR, latency, time domain ringing, preservation of transients, etc.

$\endgroup$

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.