Open epsi1on opened 2 weeks ago
some refs: Total Harmonic Distortion explained https://www.youtube.com/v/imfz1xrSSdM
Measuring Total Harmonic Distortion THD using an FFT on an oscilloscope https://www.youtube.com/watch?v=s_cVP5gu4SY
Understanding Harmonic Distortion Measurements https://www.youtube.com/watch?v=FFQjkkDMQGs
What is the Inverse Fourier Transform? (reconstruct original signal from sin waves) https://www.youtube.com/watch?v=WrE5lgeZHyk
n
: length of samples
signalShape
: type uint16[]
, with length of n
, raw ADC values
samplingRate
: type double, samples per second
$\alpha$, $\beta$, calibration values, for converting ADC values into volt: Volt=alpha*ADC+beta
fft
: Dft of signalShape
, with length n
, output of FFT function, type: complex[]
need to calculate THD in whatever unit. how?
Need some discussion