This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2800137: FFT related questions

Part Number: TMS320F2800137
Other Parts Discussed in Thread: C2000WARE

Hi expert,

my customer uses Fixed Point FFT to do AFCI function, and they recently report an issue that Many results of FFT3\ rfft.mag are calculated as 0,

which means a lot of information is lost compared to the spectrum (or amplitude spectrum) of FFT1;

Customer requirements: they need a method to obtain spectrum information, that is, the results of FFT1 and rfft.split.

FFT1 and FFT3 is defined as below:

I am not familiar with FFT, please help how to achieve this function.

BR

Emma

  • Hello Emma,

    Is this the customer's own function or are they utilizing a library? Unfortunately we do not offer support for general coding questions, they can go to a non-TI forum for these sorts of solutions. If they are using the DSP FPU library (which uses floating-point) or the DSP VCU library (which uses fixed-point), then let me know. If there seems to be an issue with the way the code is compiled or debugging the code shows that it's not executing as it is coded, then let me know as well.

    Best regards,

    Omer Amir

  • Omer,

    it is TI library.

    Emma

  • Hello Emma,

    I looked in the VCU documentation and could not find mentions of the functions/objects that the customer uses in their code, please ask them which library they're using (and possibly where in C2000Ware this is located).

    Best regards,

    Omer Amir

  • Omer, 

    they are using fixed point lib, just loaded at 

    C:\ti\c2000\C2000Ware_4_02_00_00\libraries\dsp\FixedPoint\c28

    BR

    Emma

  • Emma,

    In the 1st picture that you posted, line 51 is commented out i.e. the window coefficient array. If you look at our example in C2000Ware, it is used (C:\ti\c2000\C2000Ware_5_00_00_00\libraries\dsp\FixedPoint\c28\examples\FixedPoint_RFFT)

    Please ask the customer to use the window coeff array.

    In the 2nd picture you posted, there are references to FFT1 and FFT3 that I don't understand.

    Thanks,

    Sira

  • Sira,

    Thanks for your reply.

    2nd picture is FFT calculate in MATLAB.

    FF1 calculate the amplitude spectrum of discrete data. First the fft is computed, then the integer is computed, then the valid value is computed, and finally the integer is performed.

    The energy spectrum of FFT3 is calculated using FFT1, and the calculated result of FFT3 is basically consistent with the calculated "mag" value in fft library.

    According to the comments in the fft library, line 55 of Figure 1 should be the result of the FFT1 calculation. So how do I get the result of "split" (FFT1)?

    Because the energy spectrum (" mag",FFT3) has much less information than the amplitude spectrum ("split", FFT1")

    BR

    Emma

  • Emma,

    Sorry, I am still not following what your question means? What do you mean by "how do I get the result of "split" (FFT1)?" ?

    According to the fixed-pt DSP user guide, the result of the split should contain the information you desire in the format specified below.

    So what is missing in the customer case?

    What kind of input are they providing?

  • Sira,

    Input 2048 data samples for the ADC module.

    Figure 1 to Figure 3 shows the code in the fft library (FFt.h), Figure 4 shows the user's call, "split" does not show the storage buffer, how do I get it out? I tried to single-step debugging before, running Figure 4 lines 52 and 53, the content of ipcbptr will change; Run 54 lines and the contents of the magptr will change. Therefore, after running line 54, I read what the ipcbptr points to, but it is completely inconsistent with the expected spectrum, and the data is strange.So how do I get the correct value

      

  • Emma, I am out of office today. I’ll review this and respond tomorrow.

    Thanks

    Sira

  • Emma,

    1. Have they run the RFFT example present in our Fixed point DSP library at C:\ti\c2000\C2000Ware_5_00_00_00\libraries\dsp\FixedPoint\c28\examples\FixedPoint_RFFT?

    2. Line 45, there's a << 19. What's the purpose of this? What's the Q format of their data? From the Fixed point DSP user guide, it seems like the Q format mentioned for both the CFFT and RFFT input data is Q31.

    3. Line 50, the assignment to "win" is commented out. Can they assign this to some window function like we do in the example? I am not sure this is needed, but just in case.

    4. What are the sizes of the pFFTInput_s and pFFTOutput_s buffers?

    5. Are the buffer alignment requirements being met?

    Thanks,

    Sira