DSPRelated.com
Forums

FFT in blocks

Started by Al February 16, 2007
Hi everybody! I have a question regarding FFT. I'm working with radar
data & matlab.

I have a block of data of 512 samples and I'm doing its FFT, but I
want to do the same with exactly the same block of data but in blocks
of 64 samples each, so I should do 8 FFTs right?
What I don't know is how to merge those 8 FFTs afterwards, to be able
to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs
of 64 samples each.
Thank you!!

On Feb 16, 6:54 am, "Al" <albertzur...@gmail.com> wrote:
> Hi everybody! I have a question regarding FFT. I'm working with radar > data & matlab. > > I have a block of data of 512 samples and I'm doing its FFT, but I > want to do the same with exactly the same block of data but in blocks > of 64 samples each, so I should do 8 FFTs right? > What I don't know is how to merge those 8 FFTs afterwards, to be able > to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > of 64 samples each. > Thank you!!
The issue here is that if you do 8 FFTs of length 64, you don't get data that you can directly compare to the 512-length FFT. When you do a FFT on a set of data, the spacing of the frequency bins is (2*pi)/N. So, each of your 64-length FFT outputs will have a frequency spacing of pi/32, while your 512-length FFT will have a frequency spacing of pi/256. You could average your 8 64-length blocks, then decimate the larger FFT's output to do a direct comparison between like frequency bins, but I'm not sure what that buys you. In this sense, it's not like block filtering, where you can break the operation up into smaller chunks; if you shorten the length of the FFT, you get coarser frequency spacing on the output. Jason
On Feb 16, 1:10 pm, cincy...@gmail.com wrote:
> On Feb 16, 6:54 am, "Al" <albertzur...@gmail.com> wrote: > > > Hi everybody! I have a question regarding FFT. I'm working with radar > > data & matlab. > > > I have a block of data of 512 samples and I'm doing its FFT, but I > > want to do the same with exactly the same block of data but in blocks > > of 64 samples each, so I should do 8 FFTs right? > > What I don't know is how to merge those 8 FFTs afterwards, to be able > > to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > > of 64 samples each. > > Thank you!! > > The issue here is that if you do 8 FFTs of length 64, you don't get > data that you can directly compare to the 512-length FFT. When you do > a FFT on a set of data, the spacing of the frequency bins is (2*pi)/N. > So, each of your 64-length FFT outputs will have a frequency spacing > of pi/32, while your 512-length FFT will have a frequency spacing of > pi/256. You could average your 8 64-length blocks, then decimate the > larger FFT's output to do a direct comparison between like frequency > bins, but I'm not sure what that buys you. In this sense, it's not > like block filtering, where you can break the operation up into > smaller chunks; if you shorten the length of the FFT, you get coarser > frequency spacing on the output. > > Jason
mmm yes you're right.but i'm not reusing data, so that for the first FFT of 512 I'm using 512 samples, and for the other FFT's I'm using 1:64, 65:128, 129:192 and so on. I know that the resolution will be still worse but i wanted to compare the two methods just to see if there are 'fake' spikes or other modes in the signal when using the complete 512 FFT
Al wrote:

> Hi everybody! I have a question regarding FFT. I'm working with radar > data & matlab. > > I have a block of data of 512 samples and I'm doing its FFT, but I > want to do the same with exactly the same block of data but in blocks > of 64 samples each, so I should do 8 FFTs right? > What I don't know is how to merge those 8 FFTs afterwards, to be able > to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > of 64 samples each. > Thank you!! >
If I understand you correctly, you want to use a 64 point FFT to perform your 512 point transform? If so, then you want to look at the mixed radix algorithm. Basically, you take every 8th point and perform the 64 point FFTs on those. i.e. a 64 point of of points 0,8,16,.... one of points 1,9,17,... one of points 2,10,18,... Then you combine the results by doing a phase rotation and then 8 point FFTs across the sets you wind up doing 8 64-point FFTs, 512 phase rotations and then 64 8-point FFTs.
On Feb 16, 3:24 pm, Ray Andraka <r...@andraka.com> wrote:
> Al wrote: > > Hi everybody! I have a question regarding FFT. I'm working with radar > > data & matlab. > > > I have a block of data of 512 samples and I'm doing its FFT, but I > > want to do the same with exactly the same block of data but in blocks > > of 64 samples each, so I should do 8 FFTs right? > > What I don't know is how to merge those 8 FFTs afterwards, to be able > > to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > > of 64 samples each. > > Thank you!! > > If I understand you correctly, you want to use a 64 point FFT to perform > your 512 point transform? If so, then you want to look at the mixed > radix algorithm. Basically, you take every 8th point and perform the 64 > point FFTs on those. i.e. a 64 point of of points 0,8,16,.... one of > points 1,9,17,... one of points 2,10,18,... Then you combine the > results by doing a phase rotation and then 8 point FFTs across the sets > > you wind up doing 8 64-point FFTs, 512 phase rotations and then 64 > 8-point FFTs.
wow, thanks for your reply, I'll have a look at it. Now I'm not taking care about the phase so I could discard those phase rotations I think. Since now I was just performing 8 FFTs of 64 blocks of consecutive data (not mixed as you said) and summing up them all, but probably that's not correct
Al wrote:
> On Feb 16, 3:24 pm, Ray Andraka <r...@andraka.com> wrote: >> Al wrote: >>> Hi everybody! I have a question regarding FFT. I'm working with radar >>> data & matlab. >>> I have a block of data of 512 samples and I'm doing its FFT, but I >>> want to do the same with exactly the same block of data but in blocks >>> of 64 samples each, so I should do 8 FFTs right? >>> What I don't know is how to merge those 8 FFTs afterwards, to be able >>> to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs >>> of 64 samples each. >>> Thank you!! >> If I understand you correctly, you want to use a 64 point FFT to perform >> your 512 point transform? If so, then you want to look at the mixed >> radix algorithm. Basically, you take every 8th point and perform the 64 >> point FFTs on those. i.e. a 64 point of of points 0,8,16,.... one of >> points 1,9,17,... one of points 2,10,18,... Then you combine the >> results by doing a phase rotation and then 8 point FFTs across the sets >> >> you wind up doing 8 64-point FFTs, 512 phase rotations and then 64 >> 8-point FFTs. > > wow, thanks for your reply, I'll have a look at it. > Now I'm not taking care about the phase so I could discard those phase > rotations I think.
No. You need them for the calculation. You can discard them later.
> Since now I was just performing 8 FFTs of 64 blocks > of consecutive data (not mixed as you said) and summing up them all, > but probably that's not correct
Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On Feb 16, 5:27 pm, Jerry Avins <j...@ieee.org> wrote:
> Al wrote: > > On Feb 16, 3:24 pm, Ray Andraka <r...@andraka.com> wrote: > >> Al wrote: > >>> Hi everybody! I have a question regarding FFT. I'm working with radar > >>> data & matlab. > >>> I have a block of data of 512 samples and I'm doing its FFT, but I > >>> want to do the same with exactly the same block of data but in blocks > >>> of 64 samples each, so I should do 8 FFTs right? > >>> What I don't know is how to merge those 8 FFTs afterwards, to be able > >>> to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > >>> of 64 samples each. > >>> Thank you!! > >> If I understand you correctly, you want to use a 64 point FFT to perfo=
rm
> >> your 512 point transform? If so, then you want to look at the mixed > >> radix algorithm. Basically, you take every 8th point and perform the =
64
> >> point FFTs on those. i.e. a 64 point of of points 0,8,16,.... one of > >> points 1,9,17,... one of points 2,10,18,... Then you combine the > >> results by doing a phase rotation and then 8 point FFTs across the sets > > >> you wind up doing 8 64-point FFTs, 512 phase rotations and then 64 > >> 8-point FFTs. > > > wow, thanks for your reply, I'll have a look at it. > > Now I'm not taking care about the phase so I could discard those phase > > rotations I think. > > No. You need them for the calculation. You can discard them later. > > > Since now I was just performing 8 FFTs of 64 blocks > > of consecutive data (not mixed as you said) and summing up them all, > > but probably that's not correct > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF thanks! and by using this algorithm, Am I preserving the resolution then or definitely not?
On Feb 16, 5:27 pm, Jerry Avins <j...@ieee.org> wrote:
> Al wrote: > > On Feb 16, 3:24 pm, Ray Andraka <r...@andraka.com> wrote: > >> Al wrote: > >>> Hi everybody! I have a question regarding FFT. I'm working with radar > >>> data & matlab. > >>> I have a block of data of 512 samples and I'm doing its FFT, but I > >>> want to do the same with exactly the same block of data but in blocks > >>> of 64 samples each, so I should do 8 FFTs right? > >>> What I don't know is how to merge those 8 FFTs afterwards, to be able > >>> to compare the two methods, that is, the FFT of 512 samples, or 8 FFTs > >>> of 64 samples each. > >>> Thank you!! > >> If I understand you correctly, you want to use a 64 point FFT to perfo=
rm
> >> your 512 point transform? If so, then you want to look at the mixed > >> radix algorithm. Basically, you take every 8th point and perform the =
64
> >> point FFTs on those. i.e. a 64 point of of points 0,8,16,.... one of > >> points 1,9,17,... one of points 2,10,18,... Then you combine the > >> results by doing a phase rotation and then 8 point FFTs across the sets > > >> you wind up doing 8 64-point FFTs, 512 phase rotations and then 64 > >> 8-point FFTs. > > > wow, thanks for your reply, I'll have a look at it. > > Now I'm not taking care about the phase so I could discard those phase > > rotations I think. > > No. You need them for the calculation. You can discard them later. > > > Since now I was just performing 8 FFTs of 64 blocks > > of consecutive data (not mixed as you said) and summing up them all, > > but probably that's not correct > > Jerry > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF There's no way to get the same spectra by using consecutive data then, right?
Al wrote:

   ...

> thanks! and by using this algorithm, Am I preserving the resolution > then or definitely not?
It's just a different way to calculate a 512-point transform. Compare the data flow in radix 2 and radix 4 FFTs to get a general idea. (You should be able to find those with Google.) Ray described a mixed-radix (2 and 8) for you. In the end, you have the same numbers in the same bins. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Al wrote:

   ...

> There's no way to get the same spectra by using consecutive data then, > right?
Right. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;