7
$\begingroup$

I would like to know what are the advantages/disadvantage of zero padding with respect to frequency measurement and amplitude measurement

$\endgroup$
2
  • $\begingroup$ zero padding in what scenario? can you be more specific? you mean the circular convolution? $\endgroup$
    – phanitej
    Commented Mar 13, 2015 at 5:03
  • $\begingroup$ Possibly a duplicate of: dsp.stackexchange.com/questions/741/… $\endgroup$
    – hotpaw2
    Commented Mar 13, 2015 at 12:54

3 Answers 3

6
$\begingroup$

Advantages of zero padding:

  • If length of your sequence doesn't correspond to the size that can be handled efficiently with FFT routine (usually powers of prime numbers) then you might want to add some extra zeros to the nearest power in order to get the maximum speed-up. In worst case you double the memory you need for your signal.

  • Adding zeros is equal to interpolating samples of your spectrum with $\mathrm{sinc}$ function. Therefore you will find it looking more smoothly. It is not affecting frequency resolution in any way.

  • If some peaks were split between two bins, these can be interpolated to some extend and you might be able to retrieve some amplitude information thanks to that.

  • If you are trying to plot frequency response of some FIR filter from it's impulse response then you need to add zeros to it. Otherwise you will get as many samples as the length of filter is. Please see here

  • If you are trying to convolve your signal with some pattern using FFT, then you need to pad your signals with zeros to the appropriate length. Otherwise result of convolution will be incorrect (replicas in frequency domain will overlap). Please see here

Disadvantages of zero padding:

Can't think of any. Oh maybe except of people believing that it will improve their frequency resolution in some magical way - I knew PhD's saying that...

$\endgroup$
2
  • 2
    $\begingroup$ PhD was in English Lit, right? ;-) $\endgroup$
    – Peter K.
    Commented Mar 13, 2015 at 12:21
  • $\begingroup$ @PeterK. Yes indeed ;) $\endgroup$
    – jojeck
    Commented Mar 13, 2015 at 13:28
2
$\begingroup$

The disadvantage is you end up doing a longer FFT with higher computational cost: more MACs, energy spent toggling ALU/FPU transistors, memory paging and cache miss penalties, resulting in greater latency till the result is ready or requiring faster, hotter hardware.

If you only need a few interpolated points (one, or a small fraction of log N), it may be faster to do that locally using windowed Sinc interpolation rather than computing an entire longer FFT.

However that increased cost can be significantly less that other means of getting similar results, such as the interpolation of an entire window of plot points using polyphase filtering, or straight convolution vs. overlap add/save fast convolution, etc., etc.

$\endgroup$
1
$\begingroup$

Zero padding can help you resolve the finer structure of the spectrum, but it won't improve the resolution. Zero padding to 2^n number of points so that FFT can be faster. the computation scales like n*logn instead of n^2. As for amplitude measurement, the resolution is dominated by SNR no matter how fine spectrum you get in the end with zero padding.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.