03-20-2010 07:05 AM
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
03-20-2010 07:52 AM
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.
03-20-2010 09:49 AM
03-20-2010 10:25 AM
with=?
If with > 1 then some points will not be shown on the picture. Am I right?
03-20-2010 11:00 AM
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.
03-20-2010 11:49 AM
Built in Peak Detection.vi interpolates by parabolic polynome y=ax^2+bx+c and gets peaks between Your X grid points.
03-20-2010 12:05 PM
03-21-2010 04:27 AM
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.
03-21-2010 04:36 AM
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.
03-21-2010 06:15 AM
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