Coherent Sampling Calculator
This calculator computes the coherent sampling frequency and coherent input frequency for configuring coherent sampling in FFT analysis.
Without coherent sampling, FFT analysis suffers from spectral leakage. Coherent sampling follows these rules:
- The signal under test must be divided into periods
- Fs/N = Ft/M, where Fs is the sampling frequency, N is the number of samples, Ft is the signal frequency, and M is the number of sampled periods
- M and N must be mutually prime integers, which avoids redundant sampling and improves efficiency
Input and output parameters
| fDSAMPLE | Sampling frequency |
| fDIN | Enter frequency |
| NRECORD | Number of FFT data points |
| SIGFIG | Signal generator resolution, decimal places after MHz |
| fCSAMPLE | Result: coherent sampling frequency |
| fCIN | Result: coherent input frequency |
Result:
Formula
Step 1: calculate the basic frequency resolution
H = fDSAMPLE / NRECORD
Step 2: round to the specified precision
K = round(H, SIGFIG)
Step 3: calculate the coherent sampling frequency
fCSAMPLE = K × NRECORD
Step 4: calculate the number of periods (nearest odd integer)
G = (fDIN / fCSAMPLE) × NRECORD
J = odd(⌊G⌋ + 1)
Step 5: calculate the coherent input frequency
fCIN = (fCSAMPLE × J) / NRECORD
Tip:Window functions can be an alternative to coherent sampling for reducing spectral leakage, but cannot eliminate it entirely. Common windows include Hann, Hamming, and Blackman — choose according to your needs.

