## Is 'Zero-Padding' in 'FFT' meaningful in operation IFFT(FFT * FFT) operation?

### Daljae Yun (view profile)

on 26 Jun 2013

I use convolution operation in main code

and implemente that operation by using 'fftshift(ifft(fft() .* fft())' format.

In this operation, changing 'fft()' to 'fft( , NFFT)'

i.e. 'Zero-padding' is good for improving resolution of results in

'fftshift(ifft(fft() .* fft())' ?

## Products

No products are associated with this question.

### Wayne King (view profile)

on 3 Jul 2013
Edited by Wayne King

### Wayne King (view profile)

on 3 Jul 2013

Zero-padding before taking the DFT of a signal does not improve the frequency resolution of a spectral estimate. In other words, it does not allow you to resolve closely-spaced spectral lines that you cannot resolve with the N-point DFT, where N is the length of the signal.

It does interpolate the grid of frequencies on which the DFT is computed as the other poster states.

In terms of convolution, padding the DFT is important when you want to use the DFT to compute the linear convolution of two sequences.

Specifically, the linear convolution of two sequences of length L and M is equivalent to the circular convolution of the two sequences extended to length L+M-1.

You can use this result and the DFT -- multiplication of two DFTs is equivalent to circular convolution of the sequences -- to implement linear convolution using an FFT algorithm.

For example:

```    x = randn(8,1);
y = randn(9,1);
convout1 = ifft(fft(x,16).*fft(y,16));
convout2 = conv(x,y);```

You see in the above example that convout1 and convout2 are equal. In this case, it was necessary to pad sequences before taking the DFT.

There is an example of this in the Signal Processing Toolbox documentation:

https://www.mathworks.com/help/signal/ug/linear-and-circular-convolution.html

### Guru (view profile)

on 3 Jul 2013

The role that zero-padding has in the FFT function is to increase the frequency resolution of the signal by interpolating frequencies to estimate the FFT for the signal.

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi