LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting Peaks and Valleys of a sine cycle with noise

I am having a problem with the peak detection VI. I have attached a typical signal that I am getting: an offset of 4 V and an amplitude of 1 V. I have put these values into the simulated sine with noise VI, as you can see. What I want this peak detector to do is give me an array of all the valleys in order, i.e. 2,97 2,90 3,00 2,90 2,88. What numbers should I give to the threshold and width in order to get an array with these values in that order. Also what numbers should I enter to show all the peaks in order i.e 5,25 4,90 5,10 5,09 4,94. Thanks.
Download All
0 Kudos
Message 1 of 2
(2,628 Views)
You could run your data array into a for loop. Take 'x' datapoints from the beginning of the array. Then use the array max/min function for the section of the array. On the next run in the for loop, take the next section of the data array and use the array max/min function.
0 Kudos
Message 2 of 2
(2,628 Views)