TSpectrumAnalyzer::THDN Method

virtual double THDN(double ActualZeroPadding = 1);

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.

#NameTypeDescription
1ActualZeroPadding = 1doubleZero-padding factor used to compute Amplt; scales the noise-power normalisation. Default 1.

Returns: 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.

See Also: TSpectrumAnalyzer::THD, TSpectrumAnalyzer::SINAD
Declared in Dew::Signal::TSpectrum · Dew.Signal/SignalTools.h · Cross-compiler