01-20-2024 07:50 PM - edited 01-20-2024 07:52 PM
Hi Engineers,
I am going to use Butterworth filter to remove a few high value noises, I played around and could not get ride of the spikes.
The data was from a acquisition channel, data rate is 5 samples per second, the spikes are approximately 4s wide
Could someone help?
Attached is my Vi of LB2015
Thanks,
Gu
Solved! Go to Solution.
01-21-2024 12:25 AM
Try increasing the filter window from 2 to maybe 10 or more.
01-22-2024 12:47 PM
Filtering can be part science, part art (based on domain knowledge). Here I'd be tempted to use a median filter.
A median filter can be more effective at removing short-duration "spiky" outliers, but you should *also* have a good reason for erasing those outliers. Same as needing a reason for setting your Butterworth cutoff frequency -- which stuff is ok to attenuate and why?
Using a median filter with both left & right rank set to 20 samples "erased" all the spikes in your provided data set. Whether or not that's a valid manipulation of the data is for you to decide.
-Kevin P
01-22-2024 09:32 PM - edited 01-22-2024 09:36 PM
Hi Kevin,
An excellent solution. Thanks.
I also tried peak detection vi and successfully removed the spikes, which are abnormal signals and must be removed. Using a median filter is the best method, simple code and efficient.
Gu