The sampling rate is how many times per second a data acquisition system measures a signal, in samples per second (S/s or Hz). To record a signal faithfully you must sample at more than twice its highest frequency, the Nyquist criterion, and you must remove any content above half the sampling rate with an analog anti-aliasing filter before the signal reaches the ADC. If you don’t, frequencies above that limit fold back into the data as false lower-frequency signals, called aliases, and no amount of processing afterwards can tell them apart from real ones.
This article is part of our complete guide to data acquisition (DAQ). It explains sampling, aliasing and anti-aliasing filters in depth; for choosing rates on fast signals and sizing the data stream, see our companion article on high-speed data acquisition.
What the sampling rate means
An analog signal is continuous. A DAQ system turns it into a list of numbers by measuring it at evenly spaced instants set by a hardware clock. At 1,000 S/s, the system takes a reading every millisecond and knows nothing about what the signal did in between. The sampling rate therefore sets the highest frequency the system can represent, and it also sets how much data you collect.
Two terms are easy to confuse. The Nyquist frequency is half the sampling rate: the highest frequency a given rate can represent. The Nyquist rate is twice the highest frequency in a signal: the minimum rate needed to capture it. Sampling at 10 kS/s gives a Nyquist frequency of 5 kHz; a signal containing content up to 5 kHz has a Nyquist rate of 10 kS/s.
The Nyquist–Shannon sampling theorem
The theorem states that a signal containing no frequencies above B can be reconstructed exactly from samples taken at a rate greater than 2B. Two conditions in that sentence matter in practice:
- “No frequencies above B.” Real signals are never perfectly band-limited. Noise, harmonics, switching power supplies and motor drives put energy at high frequencies whether you care about them or not. That is the job of the anti-aliasing filter.
- “Reconstructed exactly.” The theorem assumes ideal mathematical reconstruction. If you want to see a waveform’s shape directly on a plot, or measure peaks and edges accurately, you need to sample much faster than 2B.
What aliasing is, and why it can’t be fixed afterwards
When a signal above the Nyquist frequency is sampled, its samples are identical to those of a lower-frequency signal. The apparent frequency is:
falias = | fsignal − n × fs |, where n is the whole number that brings the result into the range 0 to fs/2.
Worked examples
- Sampling at 1,000 S/s, a 900 Hz vibration appears at |900 − 1,000| = 100 Hz.
- Sampling at 1,000 S/s, a 2,060 Hz component appears at |2,060 − 2 × 1,000| = 60 Hz, easily mistaken for mains pickup.
- Sampling at 200 S/s, interference at 180 Hz from a power supply (three times 60 Hz) appears at 20 Hz, which can look like a real mechanical resonance.
Because the aliased samples are mathematically identical to a real low-frequency signal, digital filtering cannot remove them. The only fix is to stop the high-frequency content before it is sampled, with an analog filter in front of the ADC, or to sample fast enough that it falls below the Nyquist frequency.
Anti-aliasing filters
An anti-aliasing filter is an analog lowpass filter placed before the ADC. It passes the frequencies you want and attenuates everything above the Nyquist frequency enough that whatever aliases is smaller than the measurement’s resolution. Filters are covered as part of signal conditioning; here is how to size one.
How much attenuation you need
For an alias to be invisible, it must fall below one step of the ADC. An ideal N-bit converter has a dynamic range of about 6.02 × N + 1.76 dB, so:
| ADC resolution | Ideal dynamic range | Attenuation needed at the Nyquist frequency |
|---|---|---|
| 12-bit | About 74 dB | About 74 dB |
| 16-bit | About 98 dB | About 98 dB |
| 24-bit | About 146 dB in theory | In practice, as far as the noise floor (often 100–120 dB) |
In practice you can relax this when you know there is little energy above the passband, but these numbers show why a simple first-order RC filter is rarely enough.
Filter order and the sampling rate trade-off
Each pole of an analog filter adds about 6 dB per octave (20 dB per decade) of roll-off. That links the filter’s complexity to how much faster than the signal you must sample:
| Filter | Roll-off | Distance from cutoff to reach about 96 dB | Implied sampling rate |
|---|---|---|---|
| 2-pole | 12 dB/octave | 8 octaves (256 × cutoff) | Over 500 × cutoff: impractical |
| 4-pole | 24 dB/octave | 4 octaves (16 × cutoff) | About 32 × cutoff |
| 8-pole | 48 dB/octave | 2 octaves (4 × cutoff) | About 8 × cutoff |
| Delta-sigma ADC (digital filter after oversampling) | Brick-wall | Passband to about 0.45 × sampling rate | About 2.2 × cutoff |
This is the real reason sampling rates in practice are well above twice the bandwidth: the faster you sample, the gentler (and simpler) the analog filter can be. It is also why delta-sigma converters dominate vibration and acoustic measurements. They oversample internally at a very high rate, where a simple analog filter is enough, then apply a steep digital filter and decimate to the output rate you selected.
Choosing the filter response
- Butterworth: flattest passband, good for amplitude and spectral measurements.
- Bessel: constant delay, preserves pulse and step shapes; rolls off more slowly, so sample faster.
- Elliptic or Chebyshev: steepest roll-off for a given order, at the cost of passband ripple and phase distortion.
On multi-channel systems, use the same filter on every channel whose phase you compare, because every analog filter adds a frequency-dependent delay.
How to choose a sampling rate
Start from the highest frequency you need to measure, not from the fastest rate the hardware offers:
| Measurement | Bandwidth of interest | Typical sampling rate |
|---|---|---|
| Temperature (thermocouple, RTD) | Under 1 Hz to a few Hz | 1 to 100 S/s, with averaging to reject 50/60 Hz |
| Process pressure, flow, level | A few Hz | 10 to 100 S/s |
| Static strain and load | Tens of Hz | 100 S/s to 1 kS/s |
| Dynamic strain, motor current | Hundreds of Hz to a few kHz | 5 to 20 kS/s |
| Vibration and acoustics | Up to 20 kHz or more | 2.56 × bandwidth, e.g. 51.2 kS/s |
| Shock and transients | Set by rise time (0.35 ÷ rise time) | 5 to 10 × that bandwidth |
- Frequency content: sample at 2.5 to 4 times the highest frequency, with an anti-aliasing filter just above it.
- Waveform shape and peaks: sample at 10 times the highest frequency or more. At 2.5 times, the largest sample in a cycle can read more than 50% below the true peak; at 10 times, the error is at most about 5%.
- Multiplexed inputs: divide the device’s aggregate rate by the number of channels to get the real per-channel rate.
- Data volume: every doubling of the rate doubles storage and processing; our high-speed data acquisition article shows how to calculate it.
Oversampling, averaging and decimation
Sampling faster than needed and then reducing the rate in software is a useful technique, as long as it is done correctly:
- Averaging groups of samples lowers random noise (by roughly the square root of the number averaged) and, when averaged over whole 50/60 Hz cycles, rejects mains pickup.
- Decimation (keeping every Nth sample) creates a new, lower Nyquist frequency. Apply a digital lowpass filter before decimating, or the data aliases a second time.
- Oversampling still needs an analog anti-aliasing filter at the original rate. Digital processing only handles what happens after the ADC.
Common sampling mistakes
- Sampling at exactly twice the frequency of interest and expecting correct amplitudes.
- Relying on digital filters to remove aliasing that has already happened.
- Using a multiplexed device’s total rate as the per-channel rate.
- Decimating or downsampling data without filtering first.
- Sampling slow signals at a rate that is a near-multiple of 50/60 Hz, which turns mains noise into slow drifts that look real.
- Choosing the highest rate available “to be safe” and producing data no one can store or analyze.
- Using different analog filters on channels whose phase relationship matters.
Sciotex designs data acquisition systems where these choices are made per channel, from slow environmental monitoring to high-speed transient capture, so that every signal is sampled at the rate it needs and no faster. See our DAQ project examples.
Not sure your data is telling the truth?
Sciotex engineers specify sampling, filtering and conditioning channel by channel, then build and support the complete DAQ system in the US, as we have since 1997.
Frequently asked questions
Sample at 2.5 to 4 times the highest frequency you need for frequency analysis, and 10 times or more to measure waveform shape and peaks accurately. Slow signals such as temperature need only 1 to 100 samples per second.
The Nyquist–Shannon sampling theorem states that a signal with no content above frequency B can be reconstructed from samples taken faster than 2B. Half the sampling rate is called the Nyquist frequency.
An analog lowpass filter placed before the analog-to-digital converter that removes frequencies above half the sampling rate, so they cannot fold back into the data as false low-frequency signals.
No. Aliased samples are identical to samples of a real lower-frequency signal, so software cannot separate them. Aliasing must be prevented with an analog filter or a higher sampling rate.
It is probably an alias: a component above half your sampling rate folded down to |f − n × fs|. Check for vibration, switching noise or mains harmonics above the Nyquist frequency and add or tighten the anti-aliasing filter.