06-22-2006 03:13 PM
06-22-2006 04:41 PM
Hi,
As far as I know, the LabVIEW's Peak Detector algorithm performs quadratic fitting on a sliding data subset to identify the peaks and valleys in the data. As long as the 2nd order fit approximates your data reasonably well, you can use it to estimate the peak width. I don't think it is usually the case, so you get a rough estimate at best.
I did this at some point. I got the following expression for the full width at half magnitude (FWHM) of the peak:
FWHM = 2 sqrt (-y/y")
where y and y" are the signal and it's second derivative at the peak, respectively, that the Peak Detector gives you. You may wish to check my algebra at some point.
I would also consider performing secondary fitting on the identified peaks, say, Gaussian, to obtain a better width estimate. Level crossing detection may be another approach.
Good luck!
Zador
06-23-2006 08:43 AM
Hi Zador,
Thanks for the reply.
This is the logic I used, and I ended up with the same expression you had.
y" = A
y' = At + C1
y = A/2 * t^2 + C1t + C2
Assuming peak occurs at t = 0, and that the peak occurs at a relative maximum, then C1 = 0, and C2 = peak value
So, the equation is y = A/2 * t^2 + PEAK
At y = 1/2 PEAK,
Width = 2*sqrt(-PEAK/A), which looks to be the same thing you got.
This assumes that the 2nd derivative is a constant, and not some hidden function of t. It also assumes the function is a polynomial type. Are these assumptions correct?
You also mentioned some other methods I can use to calculate width. Are there Mathematical VIs in LabVIEW that can calculate width for every peak index in the array? Or would using the 2nd derivative part of the Peak Detector be the best way to do this in your opinion?
Thanks,
Mark
06-23-2006 09:04 AM
06-23-2006 02:54 PM