peak analysis video -凯发k8网页登录
determine the period of a signal by measuring the distance between the peaks, and find peaks in a noisy signal using signal processing toolbox™.
the peaks of a signal are most noticeable and useful features. and for that reason, peak analysis is an important area of signal processing. you may want to find out how many peaks are there in the signal, how far apart they are from each other, or whether they follow some kind of pattern. in this video, i will show you how you can detect, locate, and display peaks of signals using find peaks function. i will concentrate on two typical tasks—determining the period of a signal by measuring the distance between its peaks and finding peaks in a noisy signal.
let us load some data into matlab®. the plot here shows the number of sunspots that have been observed over time for the last 300 years. sunspots are spots or patches that appear on the surface of the sun.
their number is known to vary periodically. the signal clearly contains many peaks. let us use find peaks function to see where they are. the function blocks the signal and displays all the peaks when it is called with no output arguments.
you can limit the number of peaks displayed by using the end peaks option. here, i have chosen to display the first 15 peaks. you may also want to filter out peaks that are so close to others that they do not provide new information. use the min peak distance option to ignore those closely spaced peaks. please refer to the documentation of find peaks for a list of available properties.
we can now calculate the distance between the maximum values to see how often the sunspot activity peaks. find peaks reveals the amplitude of the peaks and their location. applying the function to the signal returns a number of sunspots during peak years and the peak years themselves.
i set the min peak distance parameter to 6 to ignore closely spaced peaks. we see that the first peak occurred in the year 1705, the second in the year 1717, et cetera. there was a 12-year interval between the first and second peaks, 10 years between the second and third, and so on. we can use diff function on the peak years and find the average interval. this number turns out to be 10.96 years, which is approximately equal to the actual sunspot cycle of 11 years.
next, we will see how to detect peaks in a noisy signal. let us load a fragment of an ecg signal in matlab. despite all the noise, we see a repeating structure in the ecg signal.
the most noticeable up-down pattern is called the qrs complex. cardiologists use the properties of the qrs complex to diagnose abnormal heart behavior. the up peaks are called r waves. to detect them, set the min peak height option to 0.5 millivolts. there is a chance that some peaks that are not r waves may be higher than the 0.5 threshold because of noise. to filter out the false positives, we can impose a minimum peak-to-peak separation by setting the min peak distance to 200.
the down peaks right after the r waves are the s waves. to find them, we can proceed exactly as before after flipping the signal upside down. the dips right before the r waves are called the q waves. these are harder to detect because they are much smaller and often buried in the noise. one solution is to eliminate some of the noise by using a smoothing filter. savitzky-golay filters are a popular tool to clean up signals.
if we plot the original and the smooth data, we can see that the filtering has made the q waves stand out more clearly. we can now detect, locate, and display the q peaks just like we did with the r and s waves. once we have found and characterized the three sets of peaks, we are ready to study the ecg signal in detail. for more detailed information, please refer to the peak analysis example in the signal processing toolbox documentation.
featured product
signal processing toolbox
up next:
related videos:
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)