jingxuelu
Junior Member level 3
thd inconsistent results
[/img]
I'm still confused about the THD simulation result, I pasted the simulation figure, the left one is sinewave, and right one is the DFT simulation (only sampled the last period as LvW suggested) with rectangula window,
from the DFT simulation I found there is no much distortion
the THD is sqrt(sum(harmonics^2)/fundamental^2 ), so it is about 0.0049, however, thd function give me 3.58e-1, very big.
By the way, when I changed the window type from rectangula window to hamming window for DFT simulation, there is very big even order harmonic in the DFT spectrum, if I count 2nd order harmonic, then the result is quit close to thd() function, but my gm-c topolpgy is fully differential, and it should be immune from even order distortion, right?
Is there anyone can help me to clarify aboves, I should choose DFT or THD function , retagular window or other window if DFT?
[/img]
I'm still confused about the THD simulation result, I pasted the simulation figure, the left one is sinewave, and right one is the DFT simulation (only sampled the last period as LvW suggested) with rectangula window,
from the DFT simulation I found there is no much distortion
the THD is sqrt(sum(harmonics^2)/fundamental^2 ), so it is about 0.0049, however, thd function give me 3.58e-1, very big.
By the way, when I changed the window type from rectangula window to hamming window for DFT simulation, there is very big even order harmonic in the DFT spectrum, if I count 2nd order harmonic, then the result is quit close to thd() function, but my gm-c topolpgy is fully differential, and it should be immune from even order distortion, right?
Is there anyone can help me to clarify aboves, I should choose DFT or THD function , retagular window or other window if DFT?