I have an assignment for a class where I have to calculate the thd of a signal using MATLAB.
I think I have a pretty good understanding of how this should be done, however, my professor instructed that we use only the first harmonic to calculate the thd.
Maybe my understanding is bad, but I thought the thd was calculated using the first harmonic (fundamental frequency) in relation to the magnitudes of the (other) harmonics. I have looked everywhere online and have not found anyways to calculate thd using only the first harmonic.
I have added the specific assignment phrasing below.
A .mat file is given with this project that contains one period of a periodic signal. Use the formulas of the exponential Fourier series and the definition of the total harmonic distortion (Audio engineer’s formula) to calculate the total harmonic distortion of the given signal.In your calculations, you have to just find thefirst harmonic. You need to manipulate the THD formula and represent it as a function of only the first harmonic.
Upon emailing my teacher to clarify if he wanted the thd with respect to the first "additional" harmonic he said he meant fundamental frequency when he said first harmonic.