I use the TI FFT Library and I have two question : First, in the TI example RFFT32_brev(ipcb,ipcb,N); RFFT32_brev(ipcb,ipcb,N);// Input samples in Real Part fft.win(&fft); RFFT32_brev(ipcb,ipcb,N); RFFT32_brev(ipcb,ipcb,N);// Input after windowing fft.calc(&fft); fft.split(&fft); fft.mag(&fft); There are 4 times "RFFT32_brev(ipcb,ipcb,N); ", I don't know why ? I deleted the last 3 line et I obtained the good result in IPCB after fft.split. Second, fft.mag give 0 for all N/2 points (with ipcb or mag)and I don't understand why ? Can you help me ? Thx

# FFT with TMS320F2812

Started by ●February 9, 2007

Posted by ●April 3, 2007

On Feb 10, 12:06 am, epig...@free.fr wrote:> I use the TIFFTLibrary and I have two question : > First, in the TI example > > RFFT32_brev(ipcb,ipcb,N); > RFFT32_brev(ipcb,ipcb,N);// Input samples in Real Partfft.win(&fft); > RFFT32_brev(ipcb,ipcb,N); > RFFT32_brev(ipcb,ipcb,N);// Input afterwindowingfft.calc(&fft);fft.split(&fft);fft.mag(&fft);> > There are 4 times "RFFT32_brev(ipcb,ipcb,N); ", I don't know why ? I > deleted the last 3 line et I obtained the good result in IPCB afterfft.split. > > Second,fft.mag give 0 for all N/2 points (with ipcb or mag)and I don't > understand why ? > > Can you help me ? > > ThxHi, I'm working with the same DSP and TIs FFT library. I'm having exactly the same problem. Did you find a solution to this?

Posted by ●June 18, 2008

>On Feb 10, 12:06 am, epig...@free.fr wrote: >> I use the TIFFTLibrary and I have two question : >> First, in the TI example >> >> RFFT32_brev(ipcb,ipcb,N); >> RFFT32_brev(ipcb,ipcb,N);// Input samples in Real Partfft.win(&fft); >> RFFT32_brev(ipcb,ipcb,N); >> RFFT32_brev(ipcb,ipcb,N);// Input afterwindowingfft.calc(&fft);fft.split(&fft);fft.mag(&fft);>> >> There are 4 times "RFFT32_brev(ipcb,ipcb,N); ", I don't know why ? I >> deleted the last 3 line et I obtained the good result in IPCBafterfft.split.>> >> Second,fft.mag give 0 for all N/2 points (with ipcb or mag)and I don't >> understand why ? >> >> Can you help me ? >> >> Thx > >Hi, > >I'm working with the same DSP and TIs FFT library. I'm having exactly >the same problem. Did you find a solution to this? > >The lines: RFFT32_brev(ipcb,ipcb,N); simply perform a bit reversal on the data buffer ipcb. If you use the acq module (which the TI example does) to bring the data into ipcb then it is already in the proper bit reversed mode. So in the example: RFFT32_brev(ipcb,ipcb,N); - Data is now in proper time domain format so you can look at it here using the view-graph tool to see original data RFFT32_brev(ipcb,ipcb,N); - this just puts the data back into bit reversed format so the windowing function can operate correctly fft.win(&fft); - apply a window to the data (standard FFT stuff) RFFT32_brev(ipcb,ipcb,N); - Convert the data back to proper bit order mode so that again you can use the view graph tool to see how the original data has changed after being windowed RFFT32_brev(ipcb,ipcb,N); - put the data stream back into bit reversed mode to allow the calc function to operate. fft.calc(&fft); fft.split(&fft); fft.mag(&fft); So essentially if you are making use of the acq module (acquisition) to read in data in bit reversed form then all RFFT32_brev calls can be deleted. However during your debugging and development it may be a good idea to leave them. Once you go to production you should remove them since they do nothing worthwhile to a production system and they will slow down the time required to perform an FFT.

Posted by ●September 7, 2008

>>On Feb 10, 12:06 am, epig...@free.fr wrote: >>> I use the TIFFTLibrary and I have two question : >>> First, in the TI example >>> >>> RFFT32_brev(ipcb,ipcb,N); >>> RFFT32_brev(ipcb,ipcb,N);// Input samples in Real Partfft.win(&fft); >>> RFFT32_brev(ipcb,ipcb,N); >>> RFFT32_brev(ipcb,ipcb,N);// Input after >windowingfft.calc(&fft);fft.split(&fft);fft.mag(&fft); >>> >>> There are 4 times "RFFT32_brev(ipcb,ipcb,N); ", I don't know why ? I >>> deleted the last 3 line et I obtained the good result in IPCB >afterfft.split. >>> >>> Second,fft.mag give 0 for all N/2 points (with ipcb or mag)and Idon't>>> understand why ? >>> >>> Can you help me ? >>> >>> Thx >> >>Hi, >> >>I'm working with the same DSP and TIs FFT library. I'm having exactly >>the same problem. Did you find a solution to this? >>I'd like to know if anyone has solved the fft.calc/fft.mag problem yet. Here is what I did: RFFT32_brev(crazy_input,crazy_output,N); fft.win(&fft); fft.calc(&fft); fft.split(&fft); fft.mag(&fft); My input to the first argument of RFFT32_brev(crazy_input,crazy_output,N) is close to a sine wave, with peak magnitude of around 5E+5 in time domain. I then copy input's memory data to Excel to perform Fourier Analysis and plot the result. I see a beautiful peak value (around 60E+6) in a low frequency bin, which is what I expected (location of the peak). I then check fft.mag and it's filled with 0's. Upon further review of TI's document, it seems like fft.calc is re-scaling data (1/N) to avoid over-flow. Anyone has the solution to the above problem? I don't want the smart re-scale function because my input signal is too weak for fft.mag to detect.