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.

TMS320F28374S: FFT usage in VCU

Part Number: TMS320F28374S


Hi Team,

 

My customer is using VCU(c28x_vcu2_library.lib) FFT feature in solar inverter for data filter, has feedback with some questions, could you kindly help to clarify?

 

  1. Used CFFT_init256Pt、CFFT_run256Pt for 256 FFT analysis, which required the 512 data of array,   if customer only sampled for 256 data in S zone, how to build the 512 array which required?

  2. How to using unpack and pack feature? What’s the input and output?

  3. What’s the relationship input & output amplitude? For example, if harmonic amplitude is 20 in the input data array 20Khz, what’s the amplitude of 20Khz after FFT conversation?

  4. What’s the limitation for S zone and sample point? For example, if the sample frequency is 320KHz, in theory, the calculated frequency can reach to 160Khz no matter with 256 point or 512 point sample?

Expect for your reply, thanks.

Best Regards

Benjamin

  • Hi Benjamin,

    I have answered inline.

    1. Used CFFT_init256Pt、CFFT_run256Pt for 256 FFT analysis, which required the 512 data of array, if customer only sampled for 256 data in S zone, how to build the 512 array which required?
    [Sira]: I am not clear what the customer means by "S zone". But if there are only 256 samples available, barring additional information, I can thing of three things you can do a) wait until you have 512 samples (!), b) run a 256 point RFFT instead of CFFT, c) run a 128 point CFFT

    2. How to using unpack and pack feature? What’s the input and output?
    [Sira]: Sections 5.2.4.8 and 5.2.4.9 of the VCU user's guide contain information on pack and unpack. Pack functions are illustrated in any of the RIFFT examples. Unpack functions are illustrated in any of the RFFT examples.

    3. What’s the relationship input & output amplitude? For example, if harmonic amplitude is 20 in the input data array 20Khz, what’s the amplitude of 20Khz after FFT conversation?
    [Sira]: I presume the customer is asking if the amplitude of a 20kHz sinusoid (After ADC, in the C28 device) is 20, then what will its amplitude be in the FFT domain? Not sure how representative this value would be for 16-bit data, meaning it would be really small. The FFT operation does a scaling down by a factor of N (FFT size).

    4. What’s the limitation for S zone and sample point? For example, if the sample frequency is 320KHz, in theory, the calculated frequency can reach to 160Khz no matter with 256 point or 512 point sample?
    [Sira]: This is correct. FFT size determines only frequency resolution, but the sampling theorem still applies i.e. if your sampling frequency is fs, then your input should have only frequency components upto fs/2 to prevent aliasing. Otherwise, the FFT spectrum will contain aliased components.

    Thanks,
    Sira
  • Sira,
    Noticed with lots of thanks. My customer is now using your suggestion, and if any further support I'll continue post with the forum.

    Best Regards
    Benjamin
  • Benjamin,

    Appreciate the note. Please click on Answer Verified so this issue can be closed.

    Thanks,
    Sira