1
\$\begingroup\$

I am trying to calculate harmonics of power supply with using a FFT. My sampling rate is 400 samples/sec. This means 8 samples per cycle. I am not getting sensible answers and think that I am making a mistake as I am getting harmonics power more than my signal power.

The input of my FFT is

  • 0
  • 222
  • 325
  • 222
  • 0
  • -222
  • -325
  • -222

at 2.5 ms spacing. The output of my FFT is:

  • 0 Hz: 0 + 0j
  • 50 Hz: 39.59798 - 1317.508801j
  • 100 Hz: 0 + 0j
  • 150 Hz: 39.59798 - 17.508801j
  • 200 Hz: 0 + 0j
  • 250 Hz: 39.59798 - 17.508801j
  • 300 Hz: 0 + 0j
  • 350 Hz: 39.59798 - 1317.508801j

    Sampled signal

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

Leaving aside the mismatch in power, for a minute:

Your sampling rate is 400 Hz.

Assuming you live in a 50 Hz country, the frequencies you are interested in are the 5th harmonic at 250 Hz, the 7th harmonic at 350Hz, and so on.

Your sampling rate is not fast enough. Your sampling rate must be at least twice the frequency of the highest frequency signal you are interested in.

As an example, if you want to detect up to the 19th harmonic (1,950 Hz) your sampling frequency must be at least 3,900 Hz.

Fix that, then try your calculations again and see if you get sensible results.

\$\endgroup\$
6
  • \$\begingroup\$ Thanks I was misinterpreting as my sampling frequency should be double to my fundamental frequency,.. \$\endgroup\$ Nov 25, 2015 at 7:48
  • \$\begingroup\$ So can't I do this using 8 point FFT? Is it compulsory to use 16 point fft? Thanks \$\endgroup\$ Nov 26, 2015 at 9:01
  • \$\begingroup\$ What 8 points were you going to use for an 8-point FFT? You need to do an FFT over at least one 50Hz cycle (20msec). So if you are sampling at 10 kHz you will need to do a 200-point FFT. \$\endgroup\$ Nov 26, 2015 at 9:06
  • \$\begingroup\$ I am getting 39.59798 - 1317.508801j as fundamental and 39.59798 - 17.508801j at 3rd harmonic what should be my THD? @Li-aung Yip \$\endgroup\$ Aug 9, 2016 at 10:36
  • \$\begingroup\$ I don't think there is enough space in the comments field to adequately help you solve your detailed calculation problem. \$\endgroup\$ Aug 9, 2016 at 12:17
0
\$\begingroup\$

An 8 point FFT does not produce useful results in the second half of it's output - all of the frequencies above 200 Hz are just a mirror image of the frequencies below it. This is a fundamental property of the discrete Fourier transform.

With that in mind, there are only 2 frequencies that show any signal here: 50 Hz and 150 Hz. The 50 Hz amplitude is much larger than the 150 Hz amplitude. We can't say anything about the other harmonics, since we have no information on them. You'll need a lot more samples to say that

I am getting harmonics power more than my signal power.

because we simply can't see the other harmonics here. (See Li-aung Yip's answer for more info.)

\$\endgroup\$
1
  • \$\begingroup\$ I am getting 39.59798 - 1317.508801j as fundamental and 39.59798 - 17.508801j at 3rd harmonic what should be my THD? @Greg d'Eon \$\endgroup\$ Aug 9, 2016 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.