Your Equation

Library / Signal processing and digital filters / DSP-46

Signal processing and digital filters

Rational resampling output rate

Output sampling rate after interpolating by a positive integer L and then decimating by a positive integer M, with a suitable low-pass filter.

Ref
DSP-46
Rev
v1
Field
Signal processing and digital filters
Result
fout [Hz]

Interpolating by L raises the sampling rate to L·fin, and decimating by M divides it by M, so the output rate is fin·L/M. Reduce L/M by their common factor first: converting 48 kHz to 44.1 kHz is L/M = 147/160, not 44100/48000. The low-pass filter between the two stages must remove images and prevent aliasing, and the rate alone does not show that it does.

Output sampling rate after interpolating by a positive integer L and then decimating by a positive integer M, with a suitable low-pass filter. Reduce L/M by their common factor for an efficient design. The rate alone does not show that aliasing is rejected.

Calculator

Solve for
Hz
Hz
11e7
11,000
11,000
  • Greatest common divisor of L and M1
  • Reduced interpolation factor, L/gcd147
  • Reduced decimation factor, M/gcd160

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Output sampling rate (Hz) current value 44,100 Hz
finInput sampling rateKey driver
0.9199,190,000
MDecimation factor
7,0607,060,000
LInterpolation factor
300300,000
  • Resampling 48,000 Hz by 147/160 gives 44,100 Hz, a ratio of 0.91875.
  • The output sample interval is 22.68 µs. The rate goes down, so the filter must cut off below the new Nyquist frequency of 22,050 Hz.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (Hz)Local stepChange in result
fin Input sampling rate1 to 1e7 Hz0.91879,188,0009,187,000+10%+10 %
M Decimation factor1 to 1,000 7,0567,056,0007,049,000+1 −0.621 %
L Interpolation factor1 to 1,000 300300,000299,700+1 +0.68 %

Sweep of Decimation factor

Decimation factorOutput sampling rate (Hz)
17,056,000
2.3713,528,000
5.6231,176,000
13.34542,800
31.62220,500
74.9994,080
177.839,640
421.716,720
1,0007,056

Sweep one variable

Output sampling rate (Hz)Hover, touch, or use the arrow keys on the chart
02M4M6M 1520100500 Decimation factor, log scale now 44,100

Variables and how each one contributes

fout

Output sampling rate

Result · Hz

What the equation gives you. Everything else feeds it.

fin

Input sampling rate

Hz · typical 1 to 1e7

The input sampling rate, in Hz. Scales the output rate in direct proportion. Raising it by 10 % (to 52,800) moves the result by +10 %, from 44,100 to 48,510 Hz.

L

Interpolation factor

· typical 1 to 1,000

The interpolation factor, a positive integer. Raises the output rate in direct proportion. Raising it by 10 % (to 161.7) moves the result by +10.2 %, from 44,100 to 48,600 Hz.

M

Decimation factor

· typical 1 to 1,000

The decimation factor, a positive integer. Lowers the output rate in inverse proportion. Raising it by 10 % (to 176) moves the result by −9.09 %, from 44,100 to 40,090 Hz.

Worked example with the values above

  1. Common factor: gcd(147, 160) = 1, so L/M reduces to 147/160.
  2. Ratio: L/M = 0.91875.
  3. f_out = 48,000 × 0.91875 = 44,100 Hz.

Assumptions and limits

  • Integer, positive resampling factors, with a low-pass filter that gives enough alias rejection.
  • For analytic-signal formulas, a narrowband signal with a clean quadrature component and less than π of phase change per sample.

Common mistakes

  • Not reducing L/M by the common factor, which wastes computation.
  • Forgetting the filter delay when counting output samples.
  • Using the phase difference when the true change per sample exceeds π.

Statistics and uncertainty

Rates and lengths here are exact integer relations. Estimates of envelope and frequency from analytic samples are sensitive to noise, since the phase of a small sample is poorly defined, so use only samples well above the noise floor.

Where it is used

  • Converting between audio and instrumentation sample rates and sizing buffers.
  • Demodulating amplitude and frequency from complex baseband data.

Maths you need

  • Interpolation and decimation: raising and lowering the sampling rate by integer factors
  • Analytic signal: a real signal plus i times its Hilbert transform
  • Principal phase: phase wrapped to the range −π to π

Related formulas

Practise this formula