TCustomSpectrumAnalyzer.THDN Method

Double THDN(Double ActualZeroPadding)

Total harmonic distortion plus noise, in percent. Combines the noise floor power with the power of every marked peak except the largest, relative to the largest marked peak.

#NameDescription
1ActualZeroPaddingZero-padding factor used to compute Amplt
2scales the noise-power normalisation. Default 1.

Returns: Double - Total harmonic distortion and noise in percent.

Remarks:

With A_(max) the largest mark amplitude, {A_i} the remaining marks, and P_n the sum of squared amplitude lines outside the mark guard bands (each guard spans MainlobeWidth*ActualZeroPadding bins centred on a mark), THDN = 100 * (sqrt(P_n/Z + sum_(i != max) A_i^2))/A_(max) [%], where Z = ActualZeroPadding compensates the noise power for zero padding. Domain: Amplt is a single-sided amplitude spectrum with Marks placed on the tones. Returns 0 when Marks.Count is 0 or on internal error.