Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

longLong time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & AimSetup & Aim: I have a time series that I want to downsample, and I simply want to run a low passlowpass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like MatlabMATLAB behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms $0.5\textrm{ ms}$ (2000Hz, fNyquist=1000Hz$2000\textrm{ Hz}, f_{\rm Nyquist}=1000\textrm{ Hz}$) and I want to resample to 2ms$2\textrm{ ms}$ (250Hz, fNyquist=250Hz$250\textrm{ Hz}, f_{\rm Nyquist}=250\textrm{ Hz}$), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz$> 250\textrm{ Hz}$, and then downsample. SoSo far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn)$\omega_n$. My understanding is that in my case Wn = 250Hz/1000Hz = 0.25$\omega_n = 250\textrm{ Hz}/1000\textrm{ Hz} = 0.25$.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing? I know that maximum frequency that I want to keep.

  • What if my original time series ($f_s=2000\textrm{ Hz}$) had been upsampled from $1\textrm{ ms}$ ($f_s=1000\textrm{ Hz}, f_{\rm Nyquist}=500\textrm{ Hz}$)? There is no extra information between $500\textrm{ Hz}$ and $1000\textrm{ Hz}$ but I don't necessarily know that and I apply a Butterworth Filter with $omega_n = 0.25$ (instead of $\omega_n = 0.5$ for $1\textrm{ ms}$ sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

  • My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new $f_{\rm Nyquist}$, so in my case. So in my case I would use something like $0-0-200-250\textrm{ Hz}$. Again, what am I missing? I know that maximum frequency that I want to keep.

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a low pass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like Matlab behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms (2000Hz, fNyquist=1000Hz) and I want to resample to 2ms (250Hz, fNyquist=250Hz), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn). My understanding is that in my case Wn = 250Hz/1000Hz = 0.25.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing? I know that maximum frequency that I want to keep.

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

Long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a lowpass filter on it before doing so to avoid aliasing. I am using Python (SciPy) but it looks like MATLAB behaves similarly, neither are really relevant for these questions.

My original time series is sampled at $0.5\textrm{ ms}$ ($2000\textrm{ Hz}, f_{\rm Nyquist}=1000\textrm{ Hz}$) and I want to resample to $2\textrm{ ms}$ ($250\textrm{ Hz}, f_{\rm Nyquist}=250\textrm{ Hz}$), so I must apply an anti-alias filter that cuts off any frequencies $> 250\textrm{ Hz}$, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency $\omega_n$. My understanding is that in my case $\omega_n = 250\textrm{ Hz}/1000\textrm{ Hz} = 0.25$.

Now, what I don't understand and I cannot find any information on, is as follows:

  • What if my original time series ($f_s=2000\textrm{ Hz}$) had been upsampled from $1\textrm{ ms}$ ($f_s=1000\textrm{ Hz}, f_{\rm Nyquist}=500\textrm{ Hz}$)? There is no extra information between $500\textrm{ Hz}$ and $1000\textrm{ Hz}$ but I don't necessarily know that and I apply a Butterworth Filter with $omega_n = 0.25$ (instead of $\omega_n = 0.5$ for $1\textrm{ ms}$ sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

  • My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new $f_{\rm Nyquist}$, so in my case. So in my case I would use something like $0-0-200-250\textrm{ Hz}$. Again, what am I missing? I know that maximum frequency that I want to keep.

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

added 51 characters in body
Source Link
Stev
  • 121
  • 4

long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a low pass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like Matlab behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms (2000Hz, fNyquist=1000Hz) and I want to resample to 2ms (250Hz, fNyquist=250Hz), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn). My understanding is that in my case Wn = 250Hz/1000Hz = 0.25.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing? I know that maximum frequency that I want to keep.

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a low pass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like Matlab behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms (2000Hz, fNyquist=1000Hz) and I want to resample to 2ms (250Hz, fNyquist=250Hz), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn). My understanding is that in my case Wn = 250Hz/1000Hz = 0.25.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing?

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a low pass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like Matlab behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms (2000Hz, fNyquist=1000Hz) and I want to resample to 2ms (250Hz, fNyquist=250Hz), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn). My understanding is that in my case Wn = 250Hz/1000Hz = 0.25.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing? I know that maximum frequency that I want to keep.

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?

Source Link
Stev
  • 121
  • 4

Resampling time series to regular array, then downsampling (Butterworth)

long time reader, first time poster. I have a few very simple questions that are troubling me and I am hoping that one of you guys can help me out.

Setup & Aim: I have a time series that I want to downsample, and I simply want to run a low pass filter on it before doing so, to avoid aliasing. I am using Python (SciPy) but it looks like Matlab behaves similarly, neither are really relevant for these questions.

My original time series is sampled at 0.5ms (2000Hz, fNyquist=1000Hz) and I want to resample to 2ms (250Hz, fNyquist=250Hz), so I must apply an anti-alias filter that cuts off any frequencies > 250Hz, and then downsample. So far, so good.

In Python, it looks like a Butterworth Filter is the way to go, which requires a normalised frequency (Wn). My understanding is that in my case Wn = 250Hz/1000Hz = 0.25.

Now, what I don't understand and I cannot find any information on, is as follows: what if my original time series (fs=2000Hz) had been upsampled from 1ms (fs=1000Hz, fNyquist=500Hz)? There is no extra information between 500 and 1000Hz but I don't necessarily know that and I apply a Butterworth Filter with Wn = 0.25 (instead of Wn = 0.5 for 1ms sampling). Is it an issue? Am I misunderstanding how a Butterworth filter works?

My second question is something like "Why is this the preferred implementation of a low pass filter?" I am sure there are good reasons but I have used software in the past to just high cut filter my data knowing my new fNyquist, so in my case. So in my case I would use something like 0-0-200-250Hz. Again, what am I missing?

Finally, one of the roots of my problem is that I sometimes have irregularly sampled data. I can run an interpolation to a regular time array but when doing this I tend to oversample, to avoid losing signal (This is where my first question comes in). Am I wasting my time? Should I just resample to the smallest time interval in my data?