LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spike removal

Is there a simple vi or function that does the following? If the new value of a variable is greater or equal to a specific maximum value it substitutes the previous value instead, otherwise it passes the new value. Basically, I want to use it as a filter of incoming data to remove spikes.
0 Kudos
Message 1 of 5
(3,812 Views)

Try the "in range and coerce" function in the comparsion palette. You may also look at the Y[i]=Clip{X[i]} VI if you have LV pro or better



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 5
(3,809 Views)
You can also take a look at the Median Filter function.
Randall Pursley
0 Kudos
Message 3 of 5
(3,800 Views)
I agree with Randall. Filtering is the best approach. Using the clipping approach may introduce some heavy signal distortionIf you only have LV base you may try a "running average" filter. You can also try a down sampling method


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 5
(3,791 Views)
Thank you Randall and t06afre. Yes, I had looked at the clip and coerce functions and unfortunately both substitute the limit values as opposed to a value closer previous data samples. I think the pt by pt median filter is closer to what I am looking for. I will report back after tests.
0 Kudos
Message 5 of 5
(3,766 Views)