Questions tagged [zero-padding]

Zero padding consists of extending a signal (or spectrum) with zeros to extend its time (or frequency band) limits.

A finer sampling of a frequency spectrum (more samples between frequency 0 and 0.5) can be obtained by padding the time domain signal with zeros before taking the DFT. Duality allows this to work in the opposite direction. If we want a finer sampling in the time domain (interpolation), pad the frequency spectrum with zeros before taking the Inverse DFT.

References:
1. http://books.w3k.org/html/mdft/Zero_Padding.html
2. http://www.dspguide.com/ch10/4.htm

93 questions
96
votes
6 answers

Why should I zero-pad a signal before taking the Fourier transform?

In an answer to a previous question, it was stated that one should zero-pad the input signals (add zeros to the end so that at least half of the wave is "blank") What's the reason for this?
Jonas
  • 2,981
  • 2
  • 18
  • 19
20
votes
2 answers

Frequency-domain zero padding - special treatment of X[N/2]

Suppose we wish to interpolate a periodic signal with an even number of samples (e.g. N=8) by zero-padding in the frequency domain. Let the DFT X=[A,B,C,D,E,F,G,H] Now let's pad it to 16 samples to give Y. Every textbook example and online tutorial…
finnw
  • 391
  • 2
  • 10
14
votes
2 answers

Why do we say that "zero-padding doesn't really increase frequency resolution"

Here is a sinusoid of frequency f = 236.4 Hz (it is 10 milliseconds long; it has N=441 points at sampling rate fs=44100Hz) and its DFT, without zero-padding : The only conclusion we can give by looking at the DFT is: "The frequency is…
Basj
  • 1,167
  • 5
  • 20
  • 53
8
votes
1 answer

What happens when N increases in N-point DFT

I am curious about DFT, and I wrote a simple MATLAB code to test what happens when $N$ increases. I took a rectangular signal with length $L=15$, an then found th DFT of 16, 32 and 64 points. I looked at the plots of the DFTs, however I could not…
Canberk
  • 131
  • 1
  • 6
7
votes
1 answer

How Exactly Does MATLAB Zero Pad Signal?

I am doing some massive number crunching in MATLAB which involves millions of PSD estimations. Each data segment has length 41. So I have been using the multi-taper method with nfft=41 (details below in the code). My last simulation took more than…
7
votes
2 answers

Why Zero Padding in the Center of the DFT Interpolates / Upsamples the Signal (Sinc Interpolation / DFT Interpolation / Periodic Interpolation)

I'm experimenting with the Inverse Discrete Fourier Transform. Starting from the two-cycles continuous $x(t)$ signal below: I have the discrete signal $x(n) = \{ 1, 0, -1, 0, 1, 0, -1, 0 \}$ leading to the 8 points DFT $X_0(n) = \{ 0, 0, 4, 0, 0,…
Sylvain Leroux
  • 315
  • 2
  • 16
7
votes
3 answers

Sense of zeropadding in a time domain

I have the task related to Radon transform which contains a subtask which uses resampling by means of DFT. Let's consider the non-periodical discretized signal (Fig.1) (for example the string of pixels) having 515 pixels length. In my…
7
votes
3 answers

Zero Padding in FFT

whats is the effect of pading zeroes to a sequence in FFT? for eg: x[n]=[2 3 4 5] corresponds to X[K]=[14 -2+2i -2 -2-2i] while x[n]=[2 3 4 5 0 0 0 0] corresponds to X[K]=[14 0.58-9.65i -2+2i -3.414+1.65i -2 3.414-1.65i -2-2i 0.58+9.65i] so what is…
Kaustubh
  • 71
  • 1
  • 3
6
votes
3 answers

How to Zero Pad in Order to Perform Filtering in the Fourier (Frequency) Domain?

Consider an $M\times N$ image $f$ and an $G \times K$ filter $h$. Given that convolution in the spatial domain corresponds to multiplication in the Fourier domain, then we can perform a convolution of $f$ with $h$ (that is, we can filter image $f$…
6
votes
2 answers

How does zero-padding affect the magnitude of the DFT?

Let's simulate sinusoids of two frequencies using the following Matlab code: fs = 1000; t = 0 : 1/fs : 1 - 1/fs; f1 = 3; f2 = 3.5; x1 = cos(2*pi*f1*t); x2 = cos(2*pi*f2*t); L1 = length(x1); L2 = length(x2); If I take the FFT of the first signal…
Vivek Subramanian
  • 183
  • 1
  • 1
  • 5
6
votes
3 answers

Advantages/disadvantage of zero padding

I would like to know what are the advantages/disadvantage of zero padding with respect to frequency measurement and amplitude measurement
Shittu Olalekan
  • 61
  • 1
  • 1
  • 2
5
votes
3 answers

FFT: Removed padded zeroes?

I have an application where I do this: DFT->Filter->IDFT on a range For computational performance I'm zero-padding my FFT to a power of two, but when I take the IDFT I want to get out an interpolated image instead of the zero-padded image. A minor…
Mikhail
  • 508
  • 4
  • 13
4
votes
1 answer

Zero padding effect on a FFT of gaussian noise

I have a gaussian noise $\nu(t)$ with variance $\sigma^2$. After a FFT I get $X(\omega)$. If now I do the IFFT on the $X(\omega)$ can I say that the result is still a gaussian noise of variance $\sigma^2$? What is the effect of zero padding on FFT?…
4
votes
2 answers

How to remove the boundary effects arising due to zero padding in scipy/numpy fft?

I have made a python code to smoothen a given signal using the Weierstrass transform, which is basically the convolution of a normalised gaussian with a signal. The code is as follows: #Importing relevant libraries from __future__ import…
Omkar
  • 141
  • 1
  • 1
  • 3
3
votes
1 answer

Zero-Padding seems to CHANGE FFT of signal!

I am having trouble with zero-padding. As I understand it, in theory, zero-padding in the time-domain should 'sinc-interpolate' the FFT of the signal in the frequency domain. This would mean, that 1) none of the values of the original signal…
DankMasterDan
  • 331
  • 5
  • 15
1
2 3 4 5 6 7