LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intersection of line and signal

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?

0 Kudos
Message 1 of 8
(3,322 Views)

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

0 Kudos
Message 2 of 8
(3,282 Views)

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

0 Kudos
Message 3 of 8
(3,261 Views)

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.

0 Kudos
Message 4 of 8
(3,226 Views)

Hi Lynn,

 

Thanks for your solution. I guess this may work. Thank you very much.

0 Kudos
Message 5 of 8
(3,218 Views)

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.

0 Kudos
Message 6 of 8
(3,197 Views)

Since it looks like your line is actually just 0, you could just use the Zero Crossing PtByPt VI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(3,190 Views)

@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.

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 8 of 8
(3,178 Views)