Professional Documents
Culture Documents
1.
2.
3.
4.
Peak detection is the process of finding local maxima and minima of a signal that satisfy certain properties. You can perform peak
detection, such as threshold peak detection and curve-fitting-based peak detection, using LabVIEW (
http://zone.ni.com/devzone/cda/tut/p/id/3770).
If you install the NI LabVIEW Advanced Signal Processing Toolkit (http://sine.ni.com/nips/cds/view/p/lang/en/nid/12118), you can
perform peak detection using the WA Multiscale Peak Detection VI. The Advanced Signal Processing Toolkit is a suite of VIs,
libraries, software tools, example programs, and utilities for signal processing and analysis. This toolkit provides tools for wavelet
analysis, time frequency analysis, and time series analysis.
This document mainly describes wavelet-based peak detection. The wavelet-based peak detection method utilizes the inherent
multiscale nature of wavelet analysis and is more robust and accurate than the threshold or curve-fitting-based peak detection
method.
1. Identifying peaks and valleys using wavelet-based peak detection
Wavelet analysis represents a signal using approximation coefficients and detail coefficients. A zero crossing in the detail
coefficients usually corresponds to a peak or valley in the input signal, as shown in the following figure:
Multiresolution analysis is useful for identifying peaks and valleys of noisy signals. This method makes wavelet-based peak
detection more accurate and robust than threshold or curve-fitting-based peak detection methods.
Signals usually contain both low-frequency components and high-frequency components. Low-frequency components vary slowly
with time and require fine frequency resolution but coarse time resolution. High-frequency components vary quickly with time and
require fine time resolution but coarse frequency resolution. Therefore, a multiresolution analysis method is useful for analyzing a
signal that contains both low- and high-frequency components.
The multiresolution analysis method can help you recognize both the long-term trend and short-term variations of a signal.
1/5
www.ni.com
The multiresolution analysis method can help you recognize both the long-term trend and short-term variations of a signal.
Information on the coarser resolution of a signal can help you locate the features, such as peaks, in which you are interested.
Observation of the finer resolution levels can refine the gross features and provide more details. The following figure shows the
multiresolution refinement process of the wavelet-based peak detection method.
www.ni.com
In D5 of the previous figure, the first zero crossing is at index 83. In D4, the zero crossing nearest to 83 is 84. The refinement
process repeats until the peak is refined to index 86 in D1. You can see from the Signal array that index 86 is indeed a local
maximum.
3. Determining the wavelet transform level to use
You can determine an appropriate level of wavelet transforms to find the peaks or valleys in an input signal. For noise-free data, a
small level value is sufficient. For noisy data, you might need a large level value. When you use a large level value, you first need
to check if the resulting peak locations and amplitudes at that level are what you expect. The following figure shows the effects of
different wavelet transform levels.
Figures 6a and 6b compare the wavelet-based and curve-fitting-based peak detection methods used to process an
electrocardiogram (ECG) signal.
3/5
www.ni.com
Figure 6a: Comparing curve-fitting-based and wavelet-based peak detection with width for curve fitting = 10 and level of UWT
=5
Figure 6b: Comparing curve-fitting-based and wavelet-based peak detection with width for curve fitting = 30 and level of UWT
=5
This example sets the level of UWT to 5. Notice that the wavelet-based method accurately identifies the peaks in the ECG signal
with this value. However, the curve-fitting-based method is not as accurate as the wavelet-based method. When the width for
curve fitting is small, this method returns false detections. When the width for curve fitting increases, the curve-fitting-based
method fails to identify some real peaks. In both figures above, the wavelet-based method is more accurate than the
curve-fitting-based method.
Refer to the LabVIEW Help for more information about approximation coefficients, detail coefficients, multiresolution analysis, and
the UWT.
PRODUCT
SUPPORT
COMPANY
Events (http://www.ni.com/events/)
Manuals (http://www.ni.com/manuals/)
Careers (http://www.ni.com/careers/)
Activate a product (
http://sine.ni.com/myproducts/app/main.xhtml?lang=en)
Drivers (http://www.ni.com/downloads/drivers/)
Alliance Partners (http://www.ni.com/alliance/)
MISSION
4/5
www.ni.com
MISSION
NI equips engineers and scientists with systems that accelerate productivity, innovation, and discovery.
(http://twitter.com/niglobal)
(http://www.facebook.com/NationalInstruments)
(http://www.linkedin.com/company/3433?trk=tyah)
(http://www.youtube.com/nationalinstruments)
Contact Us (http://www.ni.com/contact-us/)
(http://privacy.truste.com/privacy-seal/National-Instruments-Corporation/validation?rid=bc6daa8f-7051-4eea-b7b5-fb24dcd96d95)
Legal (http://www.ni.com/legal/) | National Instruments. All rights reserved. | Site map (
http://www.ni.com/help/map.htm)
5/5
www.ni.com
(http://