LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding crossing point between cursor and waveforms

Solved!
Go to solution

Hi everyone,

I need to find the x coordinate of all the first crossing points between a constant (Y coordinate of a cursor) and a given set of plots considering that:

  • Plots are not monotonic; they're similar to distorted rect function, so there will generally be multiple crossing points, but i'm only interested to the first
  • There will always be at least one crossing point, because the cursor always falls between the min and the max value of each plot
  • A typical crossing point is not equal to an array element value which characterize the plot, but rather equal to a value contained in an interval of two consecutive array elements
  • Array elements are never less than or equal to zero.

i found some solutions, posted by "Altenbach", to similar problems, and he used shift register and threshold 1D array, but none of them worked for me.

 

Here's a typical plot:

Plot_example.png

 

Here's a typical situation: i need to find the first crossing points between the Y value of the cursor in the previuos image and the plots in the image below.

Plot_example_2.png

 

Thanks in advance.


Alessio Aurilia,

Electrical Engineer at Roma Tre University

0 Kudos
Message 1 of 4
(2,488 Views)

@GreatPepo wrote:

i found some solutions, posted by "Altenbach", to similar problems, and he used shift register and threshold 1D array, but none of them worked for me.

 


  • If you quote an earlier post, include a link.
  • If a normally working example does not work for you, show us what you did (attach a simplified VI containing data!) so we can figure out the mistake.
  • If you simply want to align all the traces, you could e.g. use cross-correlation tools.

 

Message 2 of 4
(2,468 Views)

Hi Christian, thanks for your reply

 

You guessed correctly: i need to align (overlap) traces so i tried to use cross-correlation tool as you suggested. The problem is that i keep getting a triangular waveform as a result of cross-correlation, no matter which waveforms i correlate. On top of that i don't understand how to use the peak of the cross-correlation to get the time shift 😞

 

Here are two waveforms

Plot_example_3.pngHere is the cross-correlation result

Plot_example_4.pngI also attached a simplified VI + Typical Data

 

Thanks in advance.


Alessio Aurilia,

Electrical Engineer at Roma Tre University

Download All
0 Kudos
Message 3 of 4
(2,433 Views)
Solution
Accepted by topic author GreatPepo

This shape of the cross-correlation means that you should apply a threshold and substract the background value. The fact that it's peak is for the value of the size of your waveform and it's triangular shape, means that what you can gain from 'synchronizing' the 2 waveform is negligeable before the loss from the background as you shift your 2 waveform one from another (The background is so high in front of your signal that the correlation see it like it's only a background, so you have the autocorrelation of a rectangular function of the size of your waveform)

Message 4 of 4
(2,428 Views)