The library offers three methods for THD
computation, selected at compile time by the HARMONICS_SUPPORT and
USE_GOERTZEL_THD macros in the template.h template:
Method 1 – Based on PLL (default when the HARMONICS_SUPPORT macro is not defined)
Method 2 – Goertzel DFT (when the HARMONICS_SUPPORT and USE_GOERTZEL_THD macros are both
defined)
Method 3 – 2048-Point Real FFT (when the HARMONICS_SUPPORT macro is defined but the
USE_GOERTZEL_THD macro is not)