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.

MSP430F67651: the accuracy of the FFT on MSP430

Part Number: MSP430F67651

Hi, I have an issue about the accuracy of the FFT on MSP430, When I sampling the 220V electricy with 5120 Hz,

when the electricy frequency is 50Hz, and I use the first 1024 sampling data in a second to calculate the 32 harmonics by FFT, the accuray is acceptable,

when the electricy frequency is 49.80 Hz or 50.02Hz, and I use the first 1024 sampling data to calculate the 32 harmonics by FFT, but I found the accuray is not acceptable. how to improve the accuracy of the harmonics?

  • Hi, Hui Ping

    You need to align your result points with the target frequency.

    When fs = 5120, N = 1024, your frequency step is (fs/2)/(N/2) = 5 Hz, 50Hz is exactly an integer multiple of 5.

    If you want to accurately resolve 50.02Hz, you need a frequency resolution of 0.02Hz.

    Which means, you need a N = 2* (5120/0.02) = 256000 points FFT.

    You can append (256000-1024) zeros after your 1024 sampling data.

    This will take a long time.

    Regards,

    Helic

**Attention** This is a public forum