Your Equation

Library / Signal processing and digital filters / DSP-25

Signal processing and digital filters

Usable input block size for FFT convolution

Largest fresh input block whose linear convolution with an M-tap FIR filter still fits in an FFT frame of length Nfft (Nfft ≥ M), for overlap-add filtering.

Ref
DSP-25
Rev
v1
Field
Signal processing and digital filters
Result
Lmax [samples]

In overlap-add filtering, an input block of length L convolved with an M-tap filter gives L + M − 1 output samples, which must fit in an FFT frame of Nfft samples. So the largest block is Lmax = Nfft − M + 1. Each output block overlaps the next by M − 1 samples, which are added together.

Largest fresh input block whose linear convolution with an M-tap FIR filter still fits in an FFT frame of length Nfft (Nfft ≥ M), for overlap-add filtering. The M − 1 tail samples of each output block are overlapped with the start of the next.

Calculator

Solve for
samples
samples
6465,540
taps
163
  • Fraction of the frame used for fresh input87.5 %
  • Overlap added into the next block, M − 132 samples
  • Blocks needed for a million input samples4,465 blocks

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.

Largest input block (samples) current value 224 samples
NfftFFT lengthKey driver
3265,500
MFIR tap count
194256
  • Each 256-point frame can take 224 fresh input samples, 87.5 % of its length, and 32 samples overlap the next block.
  • The frame is used efficiently when Nfft is several times M; if M approaches Nfft the transform does little useful work.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (samples)Local stepChange in result
Nfft FFT length64 to 65,540 samples3265,50065,470+1 samples+0.446 %
M FIR tap count1 to 63 taps19425662+1 taps−0.446 %

Sweep of FIR tap count

FIR tap count (taps)Largest input block (samples)
1256
8.75248
16.5240
24.25233
32225
39.75217
47.5209
55.25202
63194

Sweep one variable

Largest input block (samples)Hover, touch, or use the arrow keys on the chart
190200210220230240250260 102030405060 FIR tap count (taps) now 224

Variables and how each one contributes

Lmax

Largest input block

Result · samples

What the equation gives you. Everything else feeds it.

Nfft

FFT length

samples · typical 64 to 65,540

The FFT length, in samples. A longer frame allows a bigger block for the same filter and makes better use of each transform. Raising it by 10 % (to 281.6) moves the result by +11.6 %, from 224 to 250 samples.

M

FIR tap count

taps · typical 1 to 63

The FIR tap count. A longer filter leaves fewer fresh samples per frame, one for each extra tap. Raising it by 10 % (to 36.3) moves the result by −1.34 %, from 224 to 221 samples.

Worked example with the values above

  1. Frame length: Nfft = 256 samples; filter length: M = 33 taps.
  2. Tail: M − 1 = 32 samples must be kept clear at the end of the frame.
  3. Lmax = 256 − 33 + 1 = 224 samples.

Assumptions and limits

  • Finite real sequences indexed from zero and taken as zero outside their stored length.
  • Equally spaced samples, and for the circular forms, periodic extension of both sequences.

Common mistakes

  • Mixing up the linear and circular forms when an FFT is used.
  • Reversing the lag convention for correlation.
  • Dividing by N − ℓ where the biased form divides by N.

Statistics and uncertainty

Convolution and correlation sums are exact, so errors come from the data; a delay found from a correlation peak is limited to the sampling interval unless interpolated, and finite records bias the autocovariance by a factor of (N − ℓ)/N.

Where it is used

  • Computing filter outputs, delays and covariance by hand for checks.
  • Choosing block sizes for fast FFT-based filtering.

Maths you need

  • Linear convolution: y[n] = Σ h[j] x[n − j]
  • Circular convolution: the same sum with indices wrapped modulo N
  • Correlation: a sliding product that measures similarity at each lag

Related formulas

Practise this formula