12-05-2012 01:43 AM
I have two 1-D arrays. One contains the amplitude and the other contains their index (from another array). As an example:
Amplitude array: 9.8, 10, 9.7, 9.9, 10.1, 9.1, 9.9, 9.6, 9.8 ...
Index array: 1, 3, 49, 50, 53, 97,101, 102,104...
In index array, note that after certain counts, the value increases drastically (the minimum increment value is known, say 40, 49-3 =46 >40; 97-53=44>40; ...).
I want to generate another array to extract peak values from Amplitude array, i.e., 10, 10.1, 9.9, ...
How to do this in labview.
Thanks
12-05-2012 01:51 AM - edited 12-05-2012 01:52 AM
@Alice12 wrote:
I have two 1-D arrays. One contains the amplitude and the other contains their index (from another array). As an example:
Amplitude array: 9.8, 10, 9.7, 9.9, 10.1, 9.1, 9.9, 9.6, 9.8 ...
Index array: 1, 3, 49, 50, 53, 97,101, 102,104...
In index array, note that after certain counts, the value increases drastically (the minimum increment value is known, say 40, 49-3 =46 >40; 97-53=44>40; ...).
I want to generate another array to extract peak values from Amplitude array, i.e., 10, 10.1, 9.9, ...
How to do this in labview.
Thanks
Use the peak detector VI on your amplitude array (the index array is not necessary to find the peaks). I used 9.7 as the threshold and got the three peak numbers you mentioned.
12-05-2012 02:07 AM - edited 12-05-2012 02:13 AM
The threshold value is not known. It could be anything.
Also the arrays are very large (500) in size.
12-05-2012 02:24 AM
Ok, so I left threshold at 0.0 and got the same result. And an array of only 500 values is not a problem.
(HINT:You could always try the Peak Detector and see what you get)
12-05-2012 02:43 AM - edited 12-05-2012 02:44 AM
Thanks for your reply.
Peak Detector doesn't work in my case. The data which I presented was very simple.
Amplitude array: 9.8, 10, 9.7, 9.9, 10.1, 9.1, 9.9, 9.6, 9.8 ...
Index array: 1, 3, 49, 50, 53, 97,101, 102,104...
In actual case, for example, 9.7, 9.9, 10.1 could be 9.7, 9.9, 10.1, 10.2,10.4, 10.5, 10.7, 9.2, 9.4 at locations 47, 49, 51, 53, 55, 57, 59, 61, 63. In this case (the minimum increment value is,
say, 30, only this value is known beforehand).
12-05-2012 02:55 AM
You lost me with the minimum increment and locations thing. What does that have to do with the array of amplitudes? You need to post an example of the actual data for which you want to find peaks.
12-05-2012 05:27 AM
Actually I want to find all local maxima and minima of a noisy signal (without any curve fitting).
So, first I use the Peak Detector and a threshold value (8 in the figure) to isolate all the peaks. Then I need to find the maximum/ minimum in each chunk of data
separately.How do I do this ? So, the only meaningful imformation is the big gap between the chunks (whose size I call "minimum increment").
12-05-2012 05:30 AM
The results of Peak Detector is also Array and if you Know the index between peaks that is zero crossing in your case then search for maximum peaks between a zero crossing.
12-05-2012 05:40 AM - edited 12-05-2012 05:42 AM
Yes, but my actual data is all positive and the y-axis (amplitude) is not fixed nor is its mid point. In this case the only
useful information is x-axis gap between the chunks.
In the picture, the data is computer generated.
12-05-2012 06:01 AM
Take RMS or average of data and try to threshold with that value.