04-29-2014 04:45 AM
Hi,
I want to detect the on and offset:
of the signal attached in de VI.
I've tried it with a 2nd deritive and then a peak detection, but it just won't work all the time... And sometimes it pick peak, that i don't want because of the noise...
Does anyone have a better solution for this problem?
Best regards,
Thijs
04-29-2014 10:22 AM
From a logical point do the following.
For getting the onset,take the values in an array and find the difference between 2 consecutive points. So pick the point where you get more difference and thats your Onset.
For getting offset, just take only the data after the Onset and find the difference between 2 consecutive point.,Nnow pick the point where the difference is less and now you got the Offset.
Good luck.
04-29-2014 11:47 AM
04-29-2014 04:43 PM
Any derivative process tends to enhace the noise.
Is situations like this it helps to apply any knowledge you have about the cause of the offset. Is that offset always much larger than the changes due to drift, noise, or the desired signal as shown in your image? Do you have all the data shown when you do the analysis or are you trying to detect the offset as it happens? What is the sampling rate? How many samples do you read at a time?
If you are doing the analysis after the data is collected, I would look at fitting straight lines to segments of data containing 30-40 time units (x-axis units). In the horizontal sections the slope will be ~1 while in the offset section it will be ~500. If you select the segment lengths short enough that one complete segment is in the high slope section, it would be fairly easy to apply the analytic geometery for the intersection of two straight lines to find the points you marked with X.
Lynn
04-29-2014 11:49 PM
Please downconvert the VI to 2011 and post it.
04-30-2014 02:00 AM
Here is a version LV 2011
04-30-2014 02:06 AM - edited 04-30-2014 02:07 AM
@johnsold
Here is some more info on the data
Samplerate is 512 Hz.
I already have al the data so it's a detection afterwards.
I can read as many sample at a time as i want...
Can you send an example of your fitting technique?
Best regards and thanks for the help!
Thijs
04-30-2014 02:49 AM
Do you mean something like this?
Regards,
Thijs
04-30-2014 09:16 AM
Hello Thijs,
I have had a look at your actual data set in the VI.
There seem to be some spurs (noise?) that are actually bigger than the rising edge you want to detect.
Can you indicate on a sceenshot (like the one in attachment) which edges are the ones you want to do your measurements on?
Do you only want to work on the raw data or would you consider doing some "outlier removal" before the processing? (of course you'll then have to first identify outliers)
Don't mind the amount ofmarkers on the edges in attachment.
I was just playing around at my side with some cross-product calculation VIs (while taking into acount mean values and standard deviation of my array subsets).
04-30-2014 11:00 AM