BioDeviceHub

Sampling Frequency Calculator

Choose a sampling rate from the highest frequency of interest, and get the samples, frequency resolution, data rate and file size of a multichannel recording.

Formula

fs≥2 fmax⁡f_s \ge 2\,f_{\max}
N=fs TN = f_s\,T
Δf=1T=fsN\Delta f = \dfrac{1}{T} = \dfrac{f_s}{N}
data=fs×bits×channels×T8\text{data} = \dfrac{f_s\times\text{bits}\times\text{channels}\times T}{8}
fmax⁡f_{\max}
the highest frequency that must be captured
fsf_s
sampling frequency, in samples per second
TT
record length, in seconds
Δf\Delta f
frequency resolution of the record's spectrum

How it works

To capture a signal whose content stops at f_max, the sampling frequency has to be more than twice f_max (the Nyquist criterion); components above half the sampling rate fold back into the band and cannot be told from real signal. The tool takes the sampling frequency as a multiple of f_max, since a practical system samples several times faster than the minimum to allow for a filter that cannot cut off sharply.

A longer record resolves frequencies more finely: the spacing of a spectrum is the reciprocal of the record length. The data volume follows from the rate, the bits per sample, the number of channels and the duration, which is what sizes the storage and the link.

Worked example

A 12-channel recording with content up to 150 Hz, sampled at 5 × f_max, for 10 s at 16 bits.

  1. fs = 5 × 150 = 750 Hz.
  2. Samples per channel = 750 × 10 = 7,500.
  3. Data = 750 × 16 × 12 × 10 / 8 = 180,000 bytes.

The sampling rate is 750 Hz and the record is 180 kB, with a 0.1 Hz frequency resolution.

These are the values the calculator opens with, so you can check its output against this example.

Assumptions

  • No significant content above f_max, which an analogue anti-aliasing filter has to ensure.
  • Uniform sampling and uncompressed storage.

Common mistakes

  • Sampling at exactly twice the highest frequency.
  • Choosing f_max from the signal of interest and ignoring noise above it.
  • Forgetting the channels when sizing the data.

Related equipment

Service documentation, failure modes and parts for the instruments this calculation is used with.