LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interesting Problem on a Graph

Hello everyone, 

I have an interesting problem (at least for me) which I guess LabVIEW masters will have a clear solution. In the attached image you will see a graph. In the graph I have to find the depth value of the deep that is marked as "X". In this purpose I used max & min array function but as you may guess it found the point A as max and point B as min point respectively. Do you guys have any suggestions or solutions for that? 

p.s: These  values received from an interrogator. For your reference I have attached my VI in 2014 version and saved the values as "default". So that you may directly go along with the actual parameters.

Add 273 on whatever Celcius said.
-Kelvin
Download All
0 Kudos
Message 1 of 16
(3,072 Views)

What you are looking for is the peak detector vi.

0 Kudos
Message 2 of 16
(3,062 Views)

Okayy. How you thing it will work exactly?

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 3 of 16
(3,053 Views)

@TITAN-x wrote:

Okayy. How you thing it will work exactly?


Read the help of the function. Just a sec google search also gives you detailed info:

http://digital.ni.com/public.nsf/allkb/2B685D5B2A919E2A8625654C006AF03C

There is even an example VI, see where to find it behind the above link.

0 Kudos
Message 4 of 16
(3,040 Views)

Hello Blokk, thank you for your reply. I know what is peak detector vi and how to use it as I have already used it few times previously. But the point I marked in the graph is neither a peak nor a deep point.  That is why I was asking how to use the peak detector vi. I meant what algortihm I have to follow in order to overcome the problem. If you have any idea about it I would be grateful if you would share it with me. 

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 5 of 16
(2,965 Views)

But the point I marked in the graph is neither a peak nor a deep point.

 

No, it is a local valley (you call it "deep"). The peak detector VI should find it, if you use the proper parameters. You should play with the "threshold" and "width" parameters in order to find such valleys.

0 Kudos
Message 6 of 16
(2,958 Views)

Yes Blokk you are right it is valley. But unfortunately I couldn2T find the solution. Eventhough, I played around the width and threshold. I am still working on it. But if there is any suggestions I would be happy to remark.

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 7 of 16
(2,945 Views)

Hi N.,

 

For your reference I have attached my VI in 2014 version and saved the values as "default".

Unfortunately your VI is saved with LV2016…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(2,931 Views)

Can you please check the attached file please GerdW.

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 9 of 16
(2,926 Views)

Hi N.,

 

limit the range of your data to interesting parts, then search for a sufficient valley:

 

(When this peak is always as clear as in your example data you might find it using a running mean filter and check for "extremely far away" samples…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(2,914 Views)