LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select proper values for low or high cut-off freqency for butterworth filter?

Solved!
Go to solution

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?

 

edmonton_1-1705801667444.png

edmonton_0-1705801913504.png

 

 

Attached is my Vi of LB2015

 

 

Thanks,

 Gu

0 Kudos
Message 1 of 4
(1,098 Views)

Try increasing the filter window from 2 to maybe 10 or more.

0 Kudos
Message 2 of 4
(1,069 Views)
Solution
Accepted by topic author edmonton

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

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
Message 3 of 4
(1,001 Views)

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

0 Kudos
Message 4 of 4
(974 Views)