06-08-2015 02:14 AM
Hi,
I want to get the all the intersections points of a line and a signal. The signal is real time saved signal so it may contain a little bit noise, it means it is not always in ascending order in rising edge or not always in descending order in falling edge. The screen short is attached. May I know is there approaches I can use to detect the intersections?
06-08-2015 11:47 AM
Do you know how to code in LabVIEW? If not (or if you don't feel confident doing it), there are numerous good tutorials online (you can do a Web search for LabVIEW Tutorial -- a number of them are also frequently mentioned in the Forum).
You need to consider the nature of your signal and what you mean by "intersection". The data are not continuous, so there might, in fact, be a "gap" where your line "crosses" the signal. Think of what kind of criterion you want to use, taking into account the nature of your signal, and code that in LabVIEW. Deciding on the algorithm/criteria is the more challenging question (unless you don't know LabVIEW, in which case take the Tutorials).
Bob Schor
06-08-2015 01:06 PM
Consider the Threshold 1D Array function. Use the y-axis value of the line for the threshold. You will need to separate the data array into segments. This can find a close approximation to the rising signal crossings. If the noise becomds a problem, find the point where the noise first crosses the threshold. Then fit a straight line to several points of the data on either side of that crossing. The intersection of the threshold line with the fitted line should be close to the point you want. To find the falling crossing, reverse the array segment containing the falling crossing. This makes it a rising crossing. Then apply the same procedure. Do some "bookeeping" on the indexes to account for the reversal to get the data in terms of the original signal.
Lynn
06-09-2015 10:57 PM
Hi Bob,
Thanks for your reply.
I know LABVIEW but not very good at it, and not familiar with some VIs. I have done research in the Forum and also google it, unfortunately I could not fine any idea because my case is different from those posts. There are multiplication of adjacent two points to deifne the intersection. For my case, it is impossible because there are some noise point.
06-09-2015 11:11 PM
Hi Lynn,
Thanks for your solution. I guess this may work. Thank you very much.
06-10-2015 05:02 AM
Hi Lynn,
I have tried to use the threshold 1 D array method, but it does not work. My signal is toally non uniformed and it is not in ascending order at the rising edge. Is there any other method I could use? Thanks in advance.
06-10-2015 05:25 AM
Since it looks like your line is actually just 0, you could just use the Zero Crossing PtByPt VI.
06-10-2015 06:45 AM
@crossrulz wrote:
Since it looks like your line is actually just 0, you could just use the Zero Crossing PtByPt VI.
And, you can subtract a value from your data to find crossings at levels other than zero.