LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph peak detection problem

For surface analysis of a sample, I did signal processing and peak detection using inbuilt peak detector .vi . But the problem is in shown peak/valley location... I have attached the screenshot of one run. See there are some peaks(valleys) which are fairly away from the actual graph. I am confused. What might be the reason of this fault? Any idea?

 

red blocks--> peaks

green blocks--> valleys 

 

graph peaks.png

0 Kudos
Message 1 of 12
(3,824 Views)

Hello, Sukhiray!

 

Is it real situation or an emulation?

 

Can You increase resolution(Duration-axis)?

 

If it is a real instrument then You can attach real oscillograph and see right values.

0 Kudos
Message 2 of 12
(3,813 Views)
x-axis resolution can not be adjusted.. because only y-axis data array is acquired from picture. actually the surface under analysis is already stored as picture in computer. through this program one just can open and read the data lies on line of interest on the picture. that data is palotted and peaks/valleys are detected.
0 Kudos
Message 3 of 12
(3,799 Views)

with=?

If with > 1 then some points will not be shown on the picture. Am I right?

0 Kudos
Message 4 of 12
(3,794 Views)

Kolan, thank you for your response.

r u saying about the WIDTH of Peak Detection .vi ????? that is set to 3 by default. But the continous plot in the graph is the actual graph of the data before peak detection... and the width of peak detector mainly eliminates the multiple peaks in that 'width' length. but how a peak can it get a point as peak which actually not in the array on which we are working? [peak not on the graph means the poin is not listed in the actual graph array]

 

The same program is working properly if I plot graph and find peaks using nX2 data array stored in .lvm/.xls file. In that case i hhave used width even upto 300.

0 Kudos
Message 5 of 12
(3,789 Views)

Built in Peak Detection.vi interpolates by parabolic polynome y=ax^2+bx+c and gets peaks between Your X grid points.

0 Kudos
Message 6 of 12
(3,780 Views)
do u ve any idea abt the exact code behind the peakdetection.vi??
0 Kudos
Message 7 of 12
(3,777 Views)

What? Sorry, I don't understand =( (my english is a little bad)

Exact code?

I just suppose that peakdetection.vi makes interpolation (it may be not a polynome, I'm not shure) and thanks for that You see values which are differ from initial.

0 Kudos
Message 8 of 12
(3,755 Views)

From the help of the "Peak Detector.vi"

Locations contains the index locations of all peaks or valleys detected in the current block of data. Because the peak detection algorithm uses a quadratic fit to find the peaks, it actually interpolates between the data points. Therefore, the indexes are not integers. In other words, the peaks found are not necessarily actual points in the input data but may be at fractions of an index and at amplitudes not found in the input array.

To view the locations in terms of time, use the following equation.

Time Locations[i] = t0 + dt*Locations[i]

 

So like previously said, the locations of the peaks may differ from real data because of this.

 

 

You may use the "Threshold Peak Detector.vi" to avoid this.

0 Kudos
Message 9 of 12
(3,753 Views)

I have used the peak detection function in several application. The peak detections will sometimes be inaccurate in amplitude. The reason for this is as I think covered by Kolan and Alain S. I have found the that the locations is more accurate than the amplitudes parameter. So use the locations parameter to pick values from your wave data. This will improve your accuracy



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 10 of 12
(3,739 Views)