平均效果
使用移动平均滤波器将消除信号中的不规则性。噪声变为E / N,其中N是移动平均滤波器的长度。使用MA的副作用是信号峰值变宽和变浅。
另外,信号的频率内容也会改变。时域的移动平均滤波器与通过sinc函数对频域信号进行卷积是一回事。
峰值检测算法
峰值检测是9/10工程问题中的常见问题。(不是真的,但是吨取决于他们)
通常,这是完成的操作:
阈值中位数
1) Look for all peaks in your signal. (i.e., a point that is larger than the two
adjacent points
2) take this list of points and for each one of them compute:
med_threshold = median(Peak,Width) + constantThresholmedian where median is the
median value of the data centered at "Peak" with Width being the number of
points to look at.
a) The Width(usually written as Lambda in literature) and constantThreshold
(usually written as C) are determined by trial and error and using the ROC
curve (Acronym below)
3) if the peak's magnitude is above this threshold accept it as a true peak.
Else: Discard it, its a false peak
4) Generate a Receiver Operating Characteristic Curve(ROC) to how well the algorithm
is performing.
这是一个例子:
suppose we have the signal X = [ 0 0 0 0 1 3 **9** 2 1 1 **2** 1 1 ]
1) 9 and 2 are both potential peaks
2) Lets use a window of 5 and a threshold =2
so at 9 we have [1 3 9 1 2] -> [1 1 2 3 9] so Median(9,5) = 2
9 > 2 +2, therefor its a peak
Lets take a look at 2: [ 1 1 2 1 1] -> [1 1 1 1 2 ] Median(2,5) = 1
2 < 1+2, therefor it is NOT a peak.
确定频率
既然您已经有效地找到了峰值的时间本地化,请尝试找到其频率:
1) Use the locations of the peaks to generate a pulse train
a) this means create sum(Dirac_delta[t-L(n)]) where L(n) is the nth time that
you've localized through median thresholding
2) Apply FFT Algorithm
3) Look for largest peak.
备用频率估算
1) Think of this like a beat in a piece of music (I learned about thresholding by
researching Onset Detection.
2) Compute the average time distance between detected peaks.
3) now call your results BPM or PPM (pulses per minute)
其他研究途径
尽管您可能会对峰值信号感到满意,但是有一些算法适用于完全不同的问题,称为“开始检测”。
病历检测是音乐信息检索研究中的一个大领域。它用于确定何时播放音符。
如果您认为磁带头信号是高度采样的信号,则可以应用在本文中可以找到的许多算法:
http://www.elec.qmul.ac.uk/people/juan/Documents/Bello-TSAP-2005.pdf