If I use Goertzel algorithm for calculate the magnitude of current or voltage, use for measure current harmonic or voltage harmonic or fundamental component. I not use for detect harmonic. Do you know the accuracy for measure harmonics is good or not?,How much about relative error?

Another one question is The Accuracy relative with number of data sample? Ex. If I have measure voltage harmonic, I measure waveform of current by use sample rate = 4000 Hz, target frequency for measure fundamental harmonic is 50Hz, so if I use number of sample (bin width) for Goertzel algorithm is 80 sample this is minimum, If I use more then 80 samples like 4000 sample the accuracy will more accurate right? how much better?


The most common Goertzel algorithms are identical to calculating the magnitude of 1 bin of an FFT/DFT using a rectangular window. As such, there will be rectangular window artifacts (so called "leakage") for any spectral content, such as harmonics, that are not exactly periodic in the DFT length, or Goertzel length.

Thus the accuracy of using just 1 bin may not be more accurate if you increase the length from one where all the spectral content is periodic to one where it isn't. With a complete FFT, one can somewhat mitigate this effect by using high quality interpolation in the complex domain before taking the magnitude.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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