LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to detect plateaus in signals

I need to detect a plteau (or multiple plateaus) and output the index of the first and last numbers of that plateau (similar to peak detect program, except a plateau).
0 Kudos
Message 1 of 4
(6,085 Views)
Hello,

Would it be possible to take some sort of running average, and compare all the numbers together using a threshhold of some sort (perhaps standard deviation)? I haven't coded an application exactly like this before, but it seems as though it would be a statistical problem. Perhaps as simple as comparing each new point with the previous, and if it is within some acceptable threshhold, incrementing a number, then if that number reaches a certain value (the length of the plateau you want to recognize), returning the first and last index of the value? I put together a simple bit of code to show you what I mean.

Please let me know if you think any of these ideas might work. This is an interesting application!

Liz Fausak
National Instruments
0 Kudos
Message 2 of 4
(6,085 Views)
just my ideas to that task:
you need a definition of your plateau. I assume a curve maybe like a temperature plateau due to phase changes during heatup or cool down. So in real world of measurements you might never get the same reading for a periode of time. Or you get only a smaller increase or decrease of your values.


look at absolute of the first derivative of your (maybe filtered eg. smoothed) curve. that gives you a zero at a plateau or at least smaller values. now find the minima (zeroes) , decide if the minima are small enough for your plateau definition. starting from these points go 'left and right' on your curve until you reach your 'plateau limits'.

Or determin the bounderies of your plateau by a minima threshhold of your (absolute) de
rivative.
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 3 of 4
(6,085 Views)
This problem seems to be essentially the same as the one posed recently by ldrummon "How do I detect number of transitions in my acquired data?".

Could you not use the threshold array.vi to find the first index of your plateau, then after inverting the subsequent data, use the vi again to find the last index of your plateau?
0 Kudos
Message 4 of 4
(6,085 Views)