Efectos del promedio
El uso de un filtro de promedio móvil suavizará las irregularidades en la señal. El ruido se convierte en E / N donde N es la longitud del filtro de promedio móvil. El efecto secundario de usar un MA es que los picos de señal se vuelven más anchos y menos profundos.
Además, el contenido de frecuencia de la señal cambiará. Un filtro de promedio móvil en el dominio del tiempo es lo mismo que convolucionar la señal del dominio de frecuencia por una función sinc, todo se borra.
Algoritmo de
detección de picos La detección de picos es un problema común en problemas de ingeniería 9/10. (No realmente, pero un TON depende de ellos)
Por lo general, esto es lo que se hace:
Umbral medio
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.
Aquí hay un ejemplo:
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.
Determinación de frecuencia
Ahora que ha encontrado efectivamente la localización del tiempo del pico, intente encontrar su frecuencia:
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.
Estimación de frecuencia alternativa
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)
Avenidas adicionales de investigación
Si bien es posible que esté satisfecho con la señal máxima, hay algoritmos que se aplican a una serie de problemas completamente diferentes llamada Detección de inicio.
La detección de inicio es un área grande en la investigación de recuperación de información musical. Se utiliza para determinar cuándo se reproduce una nota.

Si piensa que la señal de su cabezal de cinta es una señal altamente muestreada, puede aplicar muchos de los algoritmos que encontrará en este documento:
http://www.elec.qmul.ac.uk/people/juan/Documents/Bello-TSAP-2005.pdf