11-12-2014 04:49 PM
Ricky,
The data in that file seems to lack resolution. There are multiple readings for each x value. Is your raw data collected that way or was it a result of the way it was saved to the file?
The Peak Detector seems to work well with the width greater than ~30. Looking at the points used to find the peak shows only two or three distinct amplitude values at the peak.
The attached VI shows what I have tried. The all rows array contains the data from the file you posted so that the VI does not need to read the file every time.
Lynn
11-13-2014 05:00 PM
My apologies - the angles exported as integers... I replaced them with what they should be about (increments of 0.072 degrees) and attached the file. I have not used the amplitude part of the Peak Detector yet, just the locations. I have gotten it to recognize every peak using a width of 20 so far with no false peaks, and I have been able to use the location (as an integer) to find the angle that was assigned to the readings on the peak.
11-14-2014 02:37 PM
With the revised data I still find that I need a width of >=30 to reliably get all the peaks. There are several smaller values (7, 13, 16, 21, 29) which return 6 peaks but I would not trust that they would work for the next data set.
Lynn
11-17-2014 10:39 AM - edited 11-17-2014 10:49 AM
If the frequency is not changing too fast.... well, ... the min max have a regular periode
capture enough points to get at least 2 to 5 periodes
use tone detection to get the main frequence (main = dominat, maybe you will also get the main (line) frequency 😉 )
with the dominant frequency and the samplerate calc the points per half periode
apply that point value to the find peaks vi. The find peak vi will adapt a quadratic fit to locate the peak position and max value (using the number of points specified) so it's quite robust to noise.
do the same to get the minima.
If you only have one min/max per revolution, turn multiple times ( 😉 ) or have a look at the Savitsky-Golay filter as Lynn already mentioned.
11-17-2014 04:10 PM
Thank you, I will use a width of 30 from now on and see how it goes. Thank you all so much for your advice, it has helped me get so much farther Have a great day! -Ricky