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.

TMS320F28335: RFFT 32 Phase, problem with results of function rfft_32_phase

Part Number: TMS320F28335

Hello to everybody.

I am working on one project, and I have to measure an AC voltage and to put that voltage into frequency domain. So far, I did not have bigger problems, but when I needed to find out the phase shift between harmonics I stacked into a problem I can not solve.

The simplest example: I want to measure grid voltage (0.4kV AC), to do rfft_f32 in dsp, and after that to do rfft_32_phase and find out phase shift between first and second harmonic. The problem that I can not solve is that every time I do my measure I get different phase shift (practically I am getting random number every time).

I was searching for some examples for rfft32_phase and I did not find any useful and complete example of using rfft32_phase function. Also, I did not find common problems on this forum.

I hope that someone can help me, because I am out of my ideas for this problem.

Sorry for my English.

Regards, Igor.

  • Igor,

    Unless you do something special with the way you capture the buffer, the phase you will get after DFT is not going to be random,

    do you sync your buffer collection to a ZCD etc??

    You can potentially try a Goertzel Algroithm approach if you care about the phase so much...

    Unfortunately i myself do not have enough expertise in this area to comment further.

    regards
    Manish Bhardwaj