4
\$\begingroup\$

I am processing a signal in the digital domain and I have to detect "peaks" in it, e.g. by finding local maxima formed by three consecutive values. (More sophisticated criteria could be used like setting a minimum peak height or peak width.)

If I know the behavior of the signal spectrum, is there a way to choose the sampling frequency to make sure not to miss a peak ? Is there theory about this ? Is there a relation to the Nyquist limit ?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ If we don't give you an adequate answer on EE, you might also try this question on dsp.stackexchange.com. They'll be much more knowledgeable about the mathematical details over there; we're much more into practical solutions here. \$\endgroup\$
    – The Photon
    Commented Dec 26, 2012 at 18:05

1 Answer 1

3
\$\begingroup\$

In principle, if your input signal is strictly band-limited, and has no content above some frequency F, then it can be perfectly reconstructed from samples taken at sampling frequency fs, if fs > 2 F. This is the Nyquist-Shannon limit. If you can perfectly reconstruct the signal, you ought to be able to find some way to perfectly identify the peaks.

In practice, it's rare to actually be able to create a perfect reconstruction. Either because the input signal isn't truly band-limited (it has some tail beyond what we think of as the bandwidth), or because the sampling process has some noise, or jitter, or errors, or because we don't want to go to the trouble of using sinc interpolation in the reconstruction, which is what's needed to properly reconstruct a signal from minimal samples.

I think you will want to oversample by at least 2x - 4x, but how much is needed will depend on how much math you're willing to put in to the reconstruction. Unfortunately I can't point you to any particular methods of finding peaks using minimum sampling rate.

Edit

As Kortuk points out, the length of time you sample for (number of samples) will also affect your ability to reconstruct a signal perfectly. Even if you are looking for time-domain peaks rather than frequency-domain peaks, this could come in to play. However if your sample period is smaller than the resolution you want for determining the peak time, you should be okay.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Please note that it is a strictly greater than 2F. At exactly 2F, you can perfectly detect every node, but you can't tell if it is increasing or decreasing at that node. \$\endgroup\$
    – Kit Scuzz
    Commented Dec 26, 2012 at 18:19
  • 1
    \$\begingroup\$ And as a side note, the clarity of your peaks when using an FFT will have more to do with how many samples you include, as long as you have a high enough sampling frequency to stop any aliasing corrupting your data. \$\endgroup\$
    – Kortuk
    Commented Dec 26, 2012 at 18:44
  • \$\begingroup\$ @Kortuk, I think OP is looking for peak detection in time domain, but nonetheless you hit on a valid point if he's trying to do a reconstruction from Nyquist-limitted sampling. \$\endgroup\$
    – The Photon
    Commented Dec 26, 2012 at 18:59
  • \$\begingroup\$ @ThePhoton I think you may be right when rereading, good luck answering it all! \$\endgroup\$
    – Kortuk
    Commented Dec 26, 2012 at 20:35
  • \$\begingroup\$ I confirm that I am looking for time-domain peaks. Perfect reconstruction can indeed give me access to any feature of the signal. I am dreaming of something "lighter", such as processing a fixed number of samples in a running window. \$\endgroup\$ Commented Dec 27, 2012 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.