Are overlapping FFTs feasible on PSoC 5LP?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

I have been doing experiments in Digital Signal Processing on a CY8CKIT-050.  I am processing audio frequencies through a FIR filter and DMA.  I do FFTs on the output before outputting the results.  My problem is that while I compute the FFT I cannot gather data during the compute time. So I have gaps in data collection. Gather data >> Compute >> Output >> Gather Data ...
One solution would be to use multiple (3?) PSoCs and overlap the processes by a few samples, then merge the computed results.  My guess is that interrupts would not be fast enough to keep my data arrays in sync even if I use external clocking.  Has anyone tried this on PSoC 5LP?  Do you think I need an assembly of dedicated Digital Signal Processors and run an RTOS?

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

while I compute the FFT I cannot gather data    DMA does not use the CPU, so the question is

   

How long does it take to calculate the FFT for your given number of points? When the calculation is as fast as taking the samples, you can get away with double buffering. That is: While calculating the FFT with data from the first buffer, data is DMAed into the second buffer.

   

 

   

Bob

0 Likes

Well, Bob, that is an excellent question: "How long does it take to calculate the FFT?" I should put a timer on it. I only assumed that I could not keep up with calculating at a sample rate of 44.1 kHz in two channels. For each channel I collect 4 TDs of 1,984 samples (uint16) each, then generate an interrupt to stop the SAR and Filter and start my calcs.  You give me something to think about. Maybe I could generate an interrupt after every TD and work on that array -- and maybe I could keep up and be ready for the next TD.  At a 24 MHz clock rate, it seems unlikely I can process that fast.  I will add a timer and see. Or, I can do some arithmetic to see how long it takes to calc my FFT theoretically.  This will take some time so I apologize if I do not gratify you with my results soon.

   

Meanwhile, if anyone else has ideas on overlapping FFTs using multiple PSoC 5LPs, let me know. Cypress employees? And, Bob, I wish my German were as fluent as your English. You are valuable to this blog.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        @78RPM, I don't see how a single PSoC can handle continuous FFT. If 2 streams were sampled at 44kHz, 1024 points each, that would be 23ms per array, which leaves 11.5ms for FFT processing of each array. Reported times for processing 1024 point array on PSoC are about 20-60ms. This task is for some faster processor, M4 running at 100MHz probably the smallest suitable. There are many low cost boards around starting at $11. IMHO splitting task between processors is not right direction in this case. If results are being observed on a PC, I would send collected data and perform FFT on PC.   
0 Likes

odissey1, thank you for the response. You confirmed my hunch. I'm looking at M4 solutions now and comparing dedicated DSP versus microcontrollers. Some new M4 devices offer a combination. I'm re-considering my direction for research.

0 Likes