04-29-2022 03:17 AM
Hello,
I want to read an accelarometer and then filter the Frequency till 100Hz. After the filtration I want o change the sample rate to 600Hz, so I could save space. How can I change the sample rate after the filtration?
Thanks
Solved! Go to Solution.
04-29-2022 05:05 AM
Hi mub,
@mub.re wrote:
How can I change the sample rate after the filtration?
This is typically called "decimation". Look for related functions…
04-29-2022 09:44 AM
Check out the Sample Compression function.
04-29-2022 11:37 AM
@mub.re wrote:
Hello,
I want to read an accelarometer and then filter the Frequency till 100Hz. After the filtration I want o change the sample rate to 600Hz, so I could save space. How can I change the sample rate after the filtration?
Thanks
This makes no sense. How are you saving space by resampling at 6 times the filter cutoff frequency?
Attach a vi with data and a description of the output.
05-01-2022 05:42 AM
My initial sample rate is 10k
05-03-2022 07:31 AM
@JÞB wrote:
@mub.re wrote:
Hello,
I want to read an accelarometer and then filter the Frequency till 100Hz. After the filtration I want o change the sample rate to 600Hz, so I could save space. How can I change the sample rate after the filtration?
Thanks
This makes no sense. How are you saving space by resampling at 6 times the filter cutoff frequency?
It does make sense, but I had to read it multiple times to realise what they want to do.....
05-03-2022 11:01 AM - edited 05-03-2022 11:02 AM
My understanding is that the OP wants to pass the signal through a low pass filter and retain only signals < 100Hz.
Now, the filtered signal can be represented easily with a 600Hz sampling rate since the max signal frequency is only 100Hz.
Counter argument, why not sample the Accelerometer at the 600Hz rate and thereby able to sample only up to 300Hz or sample at 200Hz.
05-03-2022 08:13 PM
I have been told to use 6x sampling rate
05-03-2022 10:24 PM
6x oversampling compared to the highest frequency of interest is fairly minimal for time domain work. The rule of thumb I've encountered must often is to aim for at least 10x with 20x being preferable.
I've been known to run through 3 stages of software filtering:
1. A narrow median filter (left rank=right rank=1 sample) to eliminate "spiky" noise data. I run this first to suppress such outliers on equipment that needs it.
2. A regular IIR or FIR filter, most commonly Butterworth for its flat and predictable passband gain. This suppresses higher frequencies that are captured but not of interest. (Note: it's important to do median filtering *before* IIR or FIR filtering or else the spikes just get partially attenuated and spread out.)
3. Resampling to the desired data logging rate, often using averaging-based decimation. Averaging helps suppress random noise, and even moreso with larger oversampling factors like 25x.
-Kevin P
05-04-2022 05:57 AM
Hi Kevin,
Thank you for your advice. I was confused, which filter to use. Now I know the Butterworth it is. Could please elaborate me the median filtering? I am calculation some low frequency vibration of a moving train, part of my bachelor thesis. My supervisor told me that 6x is enough to collect the vibrations. Everything is new for me.
Thank you in advance.
Regards
Mubin