Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Zero padding in FFTW

There are 6 messages in this thread.

You are currently looking at messages 0 to 6.


Zero padding in FFTW - Peng Yu - 2005-03-04 22:45:00

Dear All,

I want to do zero padding of of the data and than do fft by
FFTW(www.fftw.org).

The dummiest way is to make an array which has more elements than the
data set size. However, it takes more  memory space and more
computation time. I'm wondering if there is a way to tell FFTW do zero
padding automatical and compute the fft.

Best wishes,
Peng
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Zero padding in FFTW - 2005-03-05 10:51:00



Real data or complex data?
How many points of data, how many points of zeropadding?

Dirk

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Zero padding in FFTW - Peng Yu - 2005-03-05 10:56:00

Complex data.

Say I have n complex numbers, I want to pad it with at least 10n
complex numbers (this is for 1D array). For 2D array, that's 100n^2
padding for n^2 complex numbers.

Thanks,
Peng

On 5 Mar 2005 07:51:11 -0800, d...@niitek.com wrote:

>Real data or complex data?
>How many points of data, how many points of zeropadding?
>
>Dirk

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Zero padding in FFTW - 2005-03-05 13:29:00

Peng Yu wrote:
> I want to do zero padding of of the data and than do fft by
> FFTW(www.fftw.org).
>
> The dummiest way is to make an array which has more elements than the
> data set size. However, it takes more  memory space and more
> computation time. I'm wondering if there is a way to tell FFTW do
zero
> padding automatical and compute the fft.

FFTW only computes the ordinary DFT; for anything beyond that you are
on your own (although you can use FFTW as a part of your algorithm, of
course).

There are a couple of approaches to what you seem to want, if I
understand you correctly.

First, if you want *all* of the DFT outputs from zero-padded inputs,
then you can't really save any memory--you still need storage for the
outputs, after all.  However, you can save some (but not too much) time
compared to a full FFT, using what is known as a "pruned" FFT.  There
is some description of this at fftw.org/pruned.html, including code
snippets for the inverse case (computing a few *outputs* from *all* of
the inputs); in your case you reverse the steps.

Second, if the reason you are zero-padding is to get a smoother
spectrum (i.e. to interpolate the spectrum to a higher resolution,
although resolution of spectral features is not really improved), then
you might look instead at the "chirp-z" algorithm instead; see:
http://en.wikipedia.org/wiki/Bluestein%27s_FFT_algorithm

Cordially,
Steven G. Johnson

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Zero padding in FFTW - Peng Yu - 2005-03-05 22:20:00

Hi,

I think what I need is to get a smoother spectrum and only compute the
low frequency amplitude. Is there any implementation of the following
alogrithm? Or can I use FFTW to achieve my goal? Thanks!

Best wishes,
Peng

>Second, if the reason you are zero-padding is to get a smoother
>spectrum (i.e. to interpolate the spectrum to a higher resolution,
>although resolution of spectral features is not really improved), then
>you might look instead at the "chirp-z" algorithm instead; see:
>http://en.wikipedia.org/wiki/Bluestein%27s_FFT_algorithm
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Zero padding in FFTW - Peng Yu - 2005-03-05 22:21:00

Hi,

I think what I need is to get a smoother spectrum and only compute the
low frequency amplitude. Is there any implementation of the following
alogrithm? Or can I use FFTW to achieve my goal? Thanks!

Best wishes,
Peng

>Second, if the reason you are zero-padding is to get a smoother
>spectrum (i.e. to interpolate the spectrum to a higher resolution,
>although resolution of spectral features is not really improved), then
>you might look instead at the "chirp-z" algorithm instead; see:
>http://en.wikipedia.org/wiki/Bluestein%27s_FFT_algorithm
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.