DSPRelated.com
Forums

How to use dspic for FFT with big data?

Started by Glennis March 28, 2006
Hi!
I am using a MicroChip Dspic30 for sampling data, the data is about 10
to 30 kb and is after sampling stored in a external flash. Now i want
load this data and perform FFT on this data to calculate the maxiumum
frequency.
The problem is that i only have about 1kb data memory left. So the
question is how to perform FFT whis this small data memory, have anyone
tried it and made i working or has any other idea?

/Glenn

Glennis wrote:
> Hi! > I am using a MicroChip Dspic30 for sampling data, the data is about 10 > to 30 kb and is after sampling stored in a external flash. Now i want > load this data and perform FFT on this data to calculate the maxiumum > frequency. > The problem is that i only have about 1kb data memory left. So the > question is how to perform FFT whis this small data memory, have anyone > tried it and made i working or has any other idea? > > /Glenn
You can look up "out of core FFT" but I didn't find much practical info for problems like yours the last time I did. One approach is something like the zoom FFT. You take multiple passes through the data, complex mix it to DC, lowpass filter and decimate, and compute a smaller complex FFT. On each successive pass you step the mix frequency up. The larger spectrum is built up in segments. The FFT size you need is reduced by the decimation, but the final resolution bandwidth is the same. I have used this approach for a very similar problem and it works, albeit slowly. John
Glennis wrote:
> Hi! > I am using a MicroChip Dspic30 for sampling data, the data is about 10 > to 30 kb and is after sampling stored in a external flash. Now i want > load this data and perform FFT on this data to calculate the maxiumum > frequency. > The problem is that i only have about 1kb data memory left. So the > question is how to perform FFT whis this small data memory, have anyone > tried it and made i working or has any other idea? > > /Glenn
You can look up "out of core FFT" but I didn't find much practical info for problems like yours the last time I did. One approach is something like the zoom FFT. You take multiple passes through the data, complex mix it to DC, lowpass filter and decimate, and compute a smaller complex FFT. On each successive pass you step the mix frequency up. The larger spectrum is built up in segments. The FFT size you need is reduced by the decimation, but the final resolution bandwidth is the same. I have used this approach for a very similar problem and it works, albeit slowly. John
Glennis wrote:

> Hi! > I am using a MicroChip Dspic30 for sampling data, the data is about 10 > to 30 kb and is after sampling stored in a external flash. Now i want > load this data and perform FFT on this data to calculate the maxiumum > frequency. > The problem is that i only have about 1kb data memory left. So the > question is how to perform FFT whis this small data memory, have anyone > tried it and made i working or has any other idea? > > /Glenn >
Oppenheim & Shafer, "Digital Signal Processing", 1975, Prentice-Hall, ISBN 0-13-214635-5. Starting on page 305 there's a description of FFT in-place computation. It's intended for computers that keep their memory on magnetic tape. It may not be the best way, but it might point the way. You will have to store some intermediate results to flash, so your computation will be extremely slow and you'll wear out the flash. If you only need a few bins you may be better off doing a plain old DFT on just the parts you need. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Thanx all for your replies, ill try to use a simple algorith to find
the interested part and then do FFT around this, hope it helps =)