Home/Tools

Sample rate and aliasing calculator

Find where an undersampled signal shows up (900 Hz sampled at 1 kS/s reads as 100 Hz), or the per-channel and aggregate rate a multiplexed DAQ needs.

Mode
Apparent frequency
Nyquist frequency
Result
Nyquist zone

Nyquist frequency and where aliases land

A converter sampling at fs can only represent frequencies from 0 up to the Nyquist frequency, fs / 2. Content above that folds back into the 0 to fs/2 band and shows up at a lower frequency that was never in the signal. The apparent frequency is the distance from the signal to the nearest whole multiple of the sample rate:

Nyquist  = fs / 2
k        = round(f / fs)
f_alias  = | f - k * fs |

The result always lands between 0 and fs/2. A real 100 Hz tone and a 900 Hz tone folded down to 100 Hz produce identical samples, so no processing after the ADC can tell them apart. In the calculator’s plot, every dot sits on both the fast true signal and the slow alias.

Worked examples

A 900 Hz vibration sampled at 1 kS/s gives k = round(0.9) = 1, so it appears at |900 − 1,000| = 100 Hz. A 2.4 kHz tone at the same rate gives k = 2 and appears at |2,400 − 2,000| = 400 Hz. A 1 kHz tone sampled at exactly 1 kS/s gives k = 1 and an alias of 0 Hz. Every sample hits the same point in the cycle, so the tone reads as a steady offset whose size depends on where the clock started.

At 10 S/s, 60 Hz mains pickup is an exact multiple of the sample rate and aliases to 0 Hz, so hum turns into a DC offset that drifts slowly as the two clocks slip against each other.

Choosing a sample rate

Twice the highest frequency is the theoretical floor for a perfectly band-limited signal and an ideal filter. Real measurements need margin, and the amount depends on what you want from the data.

GoalRateReason
Frequency content (FFT, vibration spectra)2.56 × fmaxThe ratio FFT analyzers use, leaving room for the anti-aliasing filter to roll off before fs/2.
Waveform shape on a time plot10 × fmaxTen points per cycle draws a recognizable sine. A sampled peak can read up to 4.9% low (1 − cos(π/10)).
Peaks, edges and transients20 × fmax or morePeak error drops to 1.2% (1 − cos(π/20)), and edge timing improves with every extra point.

If the highest component you need in a spectrum is 2 kHz, sample each channel at 5.12 kS/s. Eight channels on one multiplexed ADC then need 40.96 kS/s aggregate. Compare that with the spec sheet, because many USB DAQ devices quote one total rate shared by every channel in the scan list.

Common mistakes

To test a live signal for aliasing, change only the sample rate. A real tone stays put in the spectrum and an alias moves.

The sample rate and aliasing guide goes further into choosing rates. DAQAtlas, which is in development, runs hardware-paced scans where the device has a pacer and shows a live FFT spectrum, so you can change the rate and watch whether a peak moves.

Questions

How do I calculate the alias frequency?

Find the nearest whole multiple of the sample rate to the signal frequency and take the distance: f_alias = |f − round(f/fs) × fs|. A 900 Hz signal sampled at 1 kS/s appears at |900 − 1000| = 100 Hz.

What sample rate do I need for a 1 kHz signal?

At least 2 kS/s in theory. Use 2.56 kS/s for an FFT with an anti-aliasing filter, about 10 kS/s to see the waveform shape, and 20 kS/s or more to catch peaks and edges.

Is the sample rate on a DAQ spec sheet per channel?

Often not. Devices with one multiplexed ADC quote an aggregate rate shared by every channel in the scan, so a 100 kS/s device scanning 8 channels gives 12.5 kS/s per channel. Simultaneous-sampling devices quote a per-channel rate.

Why does 2.56 times the bandwidth come up so often?

FFT analyzers use a 2.56 ratio between sample rate and analysis bandwidth so the anti-aliasing filter can roll off before half the sample rate. For a 1,024-point FFT it also gives 400 usable lines.