FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2006, 07:07 PM
Rajan
Guest
 
Posts: n/a
Default 1024 point FFT on a vector of size less than 1024


Hi all!
I am a newbie to DSP. I have some basic questions. I will reall
appreciate if someone answers them.

1. Is it logical to perform 1024 point FFT on a vector of size less tha
1024 (say 150) in MATLAB ?
2. If yes, then -does MATLAB perform zero padding automatically in abov
case or do we need to do it manually ?
3. what kind of output will it give ?
Reply With Quote
  #2 (permalink)  
Old 06-16-2006, 09:54 PM
Rune Christensen
Guest
 
Posts: n/a
Default Re: 1024 point FFT on a vector of size less than 1024

"Rajan" <prasad6927373@rediffmail.com> skrev i en meddelelse
news:-JidnfJgtJHkbg_ZnZ2dnUVZ_s-dnZ2d@giganews.com...
>
> Hi all!
> I am a newbie to DSP. I have some basic questions. I will really
> appreciate if someone answers them.
>
> 1. Is it logical to perform 1024 point FFT on a vector of size less than
> 1024 (say 150) in MATLAB ?


It will increase the resolution of the spectrum and FFT of a 2^n vector is
easier/faster to calculate.

> 2. If yes, then -does MATLAB perform zero padding automatically in above
> case or do we need to do it manually ?


Use the help function in matlab and you will get an answer to some of your
questions.

>> help fft


FFT Discrete Fourier transform.
FFT(X) is the discrete Fourier transform (DFT) of vector X. For
matrices, the FFT operation is applied to each column. For N-D
arrays, the FFT operation operates on the first non-singleton
dimension.

FFT(X,N) is the N-point FFT, padded with zeros if X has less
than N points and truncated if it has more.

FFT(X,[],DIM) or FFT(X,N,DIM) applies the FFT operation across the
dimension DIM.

For length N input vector x, the DFT is a length N vector X,
with elements
N
X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N.
n=1
The inverse DFT (computed by IFFT) is given by
N
x(n) = (1/N) sum X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N.
k=1

See also IFFT, FFT2, IFFT2, FFTSHIFT.

Overloaded methods
help qfft/fft.m

> 3. what kind of output will it give ?


A small example could be:

subplot(1,3,1); plot(abs(fftshift(fft([1 2 3 4], 4))))
subplot(1,3,2); plot(abs(fftshift(fft([1 2 3 4], 16))))
subplot(1,3,3); plot(abs(fftshift(fft([1 2 3 4], 128))))

To reconstruct the signal ifft(fft([1 2 3 4])) you only need 4 points but
when you want to use the graph in a report then you could make a high
resolution graph by increasing N.

/Rune


Reply With Quote
  #3 (permalink)  
Old 06-17-2006, 06:49 PM
Fred Marshall
Guest
 
Posts: n/a
Default Re: 1024 point FFT on a vector of size less than 1024


"Rajan" <prasad6927373@rediffmail.com> wrote in message
news:-JidnfJgtJHkbg_ZnZ2dnUVZ_s-dnZ2d@giganews.com...
>
> Hi all!
> I am a newbie to DSP. I have some basic questions. I will really
> appreciate if someone answers them.
>
> 1. Is it logical to perform 1024 point FFT on a vector of size less than
> 1024 (say 150) in MATLAB ?
> 2. If yes, then -does MATLAB perform zero padding automatically in above
> case or do we need to do it manually ?
> 3. what kind of output will it give ?


1. Maybe, if that's what you want to do.
It will take longer than computing an fft over just 150 points.
The results will be an interpolated version of an fft that is 150 points but
add really no new information. So, the apparent increased resolution is a
bit illusory.

2. It depends. If you use fft(x) then no. If you use fft(x,n) then yes.

3. A complex vector of the length of x in the first case. A complex vector
of length n in the second case.


Reply With Quote
  #4 (permalink)  
Old 06-18-2006, 08:52 AM
Ron N.
Guest
 
Posts: n/a
Default Re: 1024 point FFT on a vector of size less than 1024

Fred Marshall wrote:
> "Rajan" <prasad6927373@rediffmail.com> wrote in message
> news:-JidnfJgtJHkbg_ZnZ2dnUVZ_s-dnZ2d@giganews.com...
> >
> > Hi all!
> > I am a newbie to DSP. I have some basic questions. I will really
> > appreciate if someone answers them.
> >
> > 1. Is it logical to perform 1024 point FFT on a vector of size less than
> > 1024 (say 150) in MATLAB ?
> > 2. If yes, then -does MATLAB perform zero padding automatically in above
> > case or do we need to do it manually ?
> > 3. what kind of output will it give ?

>
> 1. Maybe, if that's what you want to do.
> It will take longer than computing an fft over just 150 points.
> The results will be an interpolated version of an fft that is 150 points but
> add really no new information. So, the apparent increased resolution is a
> bit illusory.


It won't add information. But there will be an increase in
the resolution of the precise frequency of a well separated
sinusoidal component, more accurately than can be done
with using just the peak bins or even quadratic interpolation.
Essentially you get a high quality interpolator of lots
of intermediate points automatically in a much longer fft.


IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementation of 1024 point FFT in Actel FPGA cisivakumar FPGA 3 10-24-2005 03:22 PM
A good way to encode a 1024 one-hot vector into binary? Ryan VHDL 9 01-31-2005 02:16 AM
A good way to encode a 1024 one-hot vector into binary? Anthony J Bybell VHDL 0 01-28-2005 05:35 AM
1024-point FFT buffer size of OFDM receiver Nilnod DSP 2 12-10-2004 05:50 AM
floating pt. 1024 pt. radix4 FFT vivek DSP 3 06-13-2004 03:03 AM


All times are GMT +1. The time now is 07:08 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved