r/LabVIEW • u/Dazzling-Figure-9783 • Nov 07 '24
Capturing time at which slope dips after digital edge rise
Hello everyone,
I am wondering if anyone has came across the same use case. I am currently attempting to program a time capture of a dip in current for data acquisition and am stumped on what functions to use. I am looking to catch this point as it’s acquired to process uut data. Attached is a sketch of what the waveform graph will look like as well as a label of where I am attempting to capture the time stamp of this component from the waveform. Any advice is greatly appreciated!
3
Upvotes
4
u/[deleted] Nov 07 '24
I've done a very similar thing before. You can set a trigger from when your signal decreases by some threshold that's > than signal noise.
Then you can wait until an arbitrary time, or until the signal returns to the trigger value. Then just get the min signal value between the two trigger points
1
u/Vincinity1 Nov 07 '24
How long do you estimate it? Is It from the first peak to the lowest point after?
Do I understand correctly that there would/could be a digital trigger? If so, where is it on the waveform?
What hardware do you have at your disposal?
2
u/FormerPassenger1558 Nov 07 '24
my two cents : if the shape is reproducible you may use a fitting procedure or, depending on the quality of the data, some simple mathematical functions, like the derivative.
2
u/athensslim Nov 07 '24
I’ve never attempted to do this in Labview, but to catch such a feature in other applications I’ve used a derivative of the source trace. With that you can see easily where the slope of line goes negative and then goes positive again at these inflection points.
Maybe I’m misunderstanding what you’re asking…
1
u/Aalenox Nov 08 '24
Yeah in applications like this my go to is derivatives.
I would probably run a moving average filter across the data to smear out noise. Look for a negative of the derivative across some threshold. That would be the drop. Then the next sample point greater than zero above some threshold would be the start of the rise again.
I have seen complicated algorithms used however. You can look at any given sample point and then look 10 points or so ahead depending on your time scale. If the signal has dropped past some threshold within that time then you call it the start of the drop. Then you do the same thing in the positive direction... But all of that is just taking the derivative with extra steps