4 Replies Latest reply on Mar 22, 2016 9:33 AM by user_302397898

    Are overlapping FFTs feasible on PSoC 5LP?

    user_302397898

      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?

        • 1. Re: Are overlapping FFTs feasible on PSoC 5LP?
          user_1377889

          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

          • 2. Re: Are overlapping FFTs feasible on PSoC 5LP?
            user_302397898

            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.

            • 3. Re: Are overlapping FFTs feasible on PSoC 5LP?
              user_342122993
                      @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.   
              • 4. Re: Are overlapping FFTs feasible on PSoC 5LP?
                user_302397898

                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.