Sampling rate (also sample rate or sampling frequency, commonly denoted Fs) is the number of samples taken per second from a continuous-time signal, expressed in hertz (samples per second). It determines the highest signal frequency that can be represented without aliasing and sets the time resolution of the captured data.
In practice
Sampling rate appears wherever an ADC, DAC, or digital audio/RF peripheral is in use. Common embedded targets include microcontroller ADCs (typically 100 kSps to a few MSps for general-purpose SAR converters, e.g., the STM32G4 ADC at up to 4 MSps), dedicated audio codecs (8 kHz for telephony, 44.1 kHz or 48 kHz for audio), and high-speed data-converter ICs used in software-defined radio or motor-drive applications (tens to hundreds of MSps). The required Fs for a given application is set first by the Nyquist criterion: Fs must exceed twice the highest frequency of interest. In practice, Fs is chosen to be somewhat higher than the Nyquist minimum to allow realizable anti-aliasing filters with finite roll-off slopes.
A critical pitfall is under-sampling caused by an inadequate or missing anti-aliasing filter. Any signal energy above Fs/2 folds back (aliases) into the baseband and is indistinguishable from legitimate in-band content. Hardware low-pass filtering before the ADC input is the standard remedy on most designs. The cutoff frequency and roll-off of that filter must be matched to Fs and the application's dynamic requirements.
Bandpass sampling (also called undersampling or IF sampling) is an intentional exception to the "Fs > 2 * Fmax" rule: if a signal occupies a bandlimited passband, Fs only needs to exceed twice the signal bandwidth, not twice the carrier frequency, provided the band is positioned correctly relative to Fs to avoid aliasing from other spectral copies. This technique is common in software-defined radio front-ends. The blog post "Sampling bandpass signals" covers the placement constraints in detail.
When working with oversampling ADCs (sigma-delta converters, as used in precision measurement and audio), Fs at the decimation output is set by the oversampling ratio (OSR) relative to the modulator clock. Increasing Fs in these converters trades effective resolution for bandwidth. Firmware that drives DMA transfers from ADC peripherals must be sized to sustain the selected Fs without buffer overruns; on Cortex-M class devices a DMA double-buffer arrangement is typical for continuous capture above a few hundred kSps.
Learn this in DSP Foundations
Discussed on DSPRelated
Frequently asked
What is the Nyquist limit, and how does it relate to sampling rate?
The
Nyquist limit is Fs/2. To reconstruct a signal without
aliasing, the signal must contain no frequency components at or above Fs/2. In practice, the signal is low-pass filtered to somewhat below Fs/2 before sampling so that the filter's transition band does not allow aliased content into the passband. The blog post 'The Sampling Theorem - An Intuitive Approach' provides an accessible derivation of why this limit exists.
What happens if I set my ADC sampling rate too low?
Frequency components above Fs/2 fold back into the 0 to Fs/2 range. A 5 kHz tone sampled at 8 kSps (
Nyquist limit 4 kHz) would alias to 3 kHz and appear in your data as legitimate signal content. Without an anti-
aliasing filter you cannot distinguish it from a real 3 kHz component after the fact.
How do I choose a sampling rate for my application?
Start with the highest frequency your signal of interest contains. Apply the
Nyquist criterion (Fs > 2 * Fmax), then increase Fs by a margin that allows your anti-
aliasing filter to attenuate out-of-band content to an acceptable level before the
ADC input. A common rule of thumb is to target Fs at 2.5x to 5x Fmax when using practical analog filters. Also verify that your MCU or FPGA can sustain continuous DMA or interrupt-driven transfers at the resulting data rate.
Are sampling rate and baud rate the same thing?
No. Sampling rate (Fs) is the number of
ADC or
DAC conversions per second on an analog signal. Baud rate is the number of symbol transitions per second on a digital communications link. They are related only in the specific context of a digital receiver that oversamples an incoming waveform to recover bits, where Fs is deliberately set to a multiple of the baud rate. The blog post 'A Table of Digital Frequency Notation' maps out the different frequency and rate conventions used in DSP and communications contexts.
Can I sample above Fs/2 intentionally, and is it ever useful?
Yes, this is bandpass sampling (undersampling). If your signal occupies a narrow band centered on a carrier well above Fs/2, you can choose Fs so that the aliased spectral copy lands cleanly in
baseband without overlapping adjacent bands. It is commonly used in IF sampling for
software-defined radio to avoid a separate analog downconversion stage. The constraints on valid Fs values are stricter than baseband sampling; the blog post 'Sampling bandpass signals' covers how to calculate the allowable Fs ranges for a given bandpass signal.
Differentiators vs similar concepts
Sampling rate (Fs) is sometimes conflated with
ADC throughput rate and with output data rate (ODR). ADC throughput rate refers to the raw conversion speed of the ADC core, which may be higher than the usable output data rate when an
oversampling or
decimation stage is present (common in sigma-delta ADCs such as the AD7177 or ADS1262). ODR is the rate at which filtered, decimated samples are delivered to firmware, and is the figure that governs
Nyquist behavior. In audio, sample rate and bit depth are separate parameters: sample rate sets time resolution and frequency coverage, while bit depth sets amplitude resolution and dynamic range.