Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68997

Peak detection- problems finding x values of location

$
0
0

Hello, I'm a a learning programmer and I have a problem you might be able to help with. I have an array of values, a frequency (x) and a voltage (y) that I need to process. I need to find the local maxima and minima. I am using the waveform peak detect vi to do so. I need to find the frequency at which there is a voltage spike, and so what I am doing is the following:

1. run peak detection

2. take the locations of the peaks and multiply by the step size

3. add to the starting frequency to find the frequency at which the spike occured

 

i am adding the product of the peak location and step size because it is my inderstanding that the waveform peak detection VI will not take my x values, but will do all of the peak detection relative to the point, for example, if I have an array that contains y points as 1,2,-2,5,6,7,8,9 then it would return a peak somewhere between points 2 and 3. 

 

The problem is that the frequency it tells me the peak/valley is at does not match the graph of the array. Any ideas on why ths is happening or how i could fix the problem? Many thanks.


Viewing all articles
Browse latest Browse all 68997

Trending Articles