LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

derivatives to find concave and max for each peak

I need to find peaks of any size over a 5 mins. I'm thinking I could use a derivative to check for inflections points, and the find the max of each positive peak. I do not have a derivative VI. Or not sure how to create one.
0 Kudos
Message 1 of 10
(3,698 Views)
Unless you have the Base Package of Labview, there should be a peak detector VI under Analyze -> Signal Processing -> Time Domain. That basically does exactly, what you want to do.

If you do not have that your idea to go back to calculus is good. If you have your data in as arrays of X and corresponding F(X) values you can calculate the derivative using a FOR loop and the following formula:

F'(Xn) = (F(X(n+1))-F(Xn))/(X(n+1)-Xn)

It is just an approximation, but it should work for your purposes.

Please see attached file for example.
0 Kudos
Message 2 of 10
(3,698 Views)
I can't open this sample VI. I'm getting an error 8. Am I missing something.
0 Kudos
Message 3 of 10
(3,698 Views)
I am running Labview 6.0.2 and have no clue what an error 8 is. I saved the file as Labview 5. Try that.
0 Kudos
Message 4 of 10
(3,698 Views)
Heiko is right on the money but I wanted to point out there is a KnowlegeBase that discusses different ways to take the derivative in LabVIEW. It even contains examples.

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/be28836009204a3986256b9700656133?OpenDocument

Jeremy
0 Kudos
Message 5 of 10
(3,698 Views)
thank you. I am at ver 5.1.1
0 Kudos
Message 6 of 10
(3,698 Views)
I have not gotten your sample program workering, the second for-loop has an index array that will not accept the wire from the bundle in the previous for-loop. In-turn the output wire from the array is bad. IS this becuase I'm using 5.1.?
0 Kudos
Message 7 of 10
(3,698 Views)
Can I get this in 5.1
0 Kudos
Message 8 of 10
(3,698 Views)
It should be working fine. Right-click on the tunnel where the wire enters the second for loop and make sure that 'disable indexing' is selected.
0 Kudos
Message 9 of 10
(3,698 Views)
The index array in the second loop would not work with a added demension with the +1. SO I just made it two arrays.
Thanks, that works fine.
0 Kudos
Message 10 of 10
(3,698 Views)