LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

filter out dips in waveform

Hello LV community:
I'm trying to filter out dips in a waveform and I'm having trouble. The attached vi just has the input waveform, not what I've attempted thus far.
Basically, I need to filter out any spikes and valleys then take rest of waveform to avg.
The problem is the duration of the valleys are not predictable, nor are the threshold Y values.
I really appreciate looking at tthe problem, my back is up against the wall.
Mike
0 Kudos
Message 1 of 6
(3,315 Views)
Do you know the maximum value (or order of change) of the spike / valley?
0 Kudos
Message 2 of 6
(3,310 Views)
Hello Joe:
No, the waveform will not have a max value, that is one the parameters I will find in the rest of the waveform. I'm not sure what you mean by order of change but I could set a time limit on the width of the positive spikes and another limit test on the negative spikes I guess.

Mike
0 Kudos
Message 3 of 6
(3,308 Views)
Assuming that the waveform is ideally a square wave, then the only thing I can think of is a Haar Wavelet filter. This can be done with the Signal Processing Toolkit. You probably don't have this, but if you do, let me know and I post my quick filter.

Attached is the results using the data you provided.
Randall Pursley
Message 4 of 6
(3,300 Views)
Randall:
thanks for your help. I worked out a vi that will walk through the waveform and check for time duration of the pulse.
I will have to expose this limit to the user as well as the magnetude limits.
Mike
0 Kudos
Message 5 of 6
(3,294 Views)
Mike,

Can you use knowledge about the process or circuit which generates the signal to help eliminate the troublesome parts? For example your signal looks like it could be the result of switch bounce feeding a circuit with a single pole low pass response. In such a case you could wait until enough time has elapsed for the transients to settle out and then make the amplitude measurements. The timing measurements can also be adjusted for the known behavior of the circuits, if necessary.

Another approach similar to Randall's suggestion would be to fit a model of your ideal waveform (square wave?) to the data and then make the measurements on the idealized waveform. Sometimes this can result in less computation and be more robust in the presence of interference.

Lynn
Message 6 of 6
(3,286 Views)