How to - Distortion Measurements with REW

Administrator
Joined 2004
Paid Member
I tried 100nF+100ohms before that but that was a complete fail, distortion exploded (arround -70db), maybe I should try again since I ajusted divisor
That circuit was given as having a 23kHz cutoff, I think. But it's going to depend on the input impedance of your soundcard. What is the input impedance of your mic input? 1K-2K? Line input is probably 10K.
 
That circuit was given as having a 23kHz cutoff, I think. But it's going to depend on the input impedance of your soundcard. What is the input impedance of your mic input? 1K-2K? Line input is probably 10K.


Right, low pass filter. Impedance is not stated anywhere in specs but as per my multimeter minimum impedance would be 12KO Hot/Cold (balanced) or 6KO Hot to shield/pin1 (unbalanced). If that's relevant I should go for a much lower capacitance value. I have 680pF but that's CMS, I'll try to find a way
 
Member
Joined 2009
Paid Member
Yes - I know.
It just takes some time to change habits:)
 

Attachments

  • Conventional.png
    Conventional.png
    108.6 KB · Views: 460
  • Coherent.png
    Coherent.png
    159.6 KB · Views: 458
AX tech editor
Joined 2002
Paid Member
The next step now becomes, what can we get from such a multitone response?

For instance, if you connect the peaks of all the signals, you have the frequency response.

If you set it up smartly, you can measure noise in the presence of signal from bins where only noise can fall, see attachment.

And several measurements more. How do you extract HD and IMD from the response? These are the important discussions.

Jan
 

Attachments

  • multi.PNG
    multi.PNG
    99.2 KB · Views: 428
  • multinoise.PNG
    multinoise.PNG
    37.2 KB · Views: 427
Last edited:
I am testing the coherent averaging as it yields visually quite different results to magnitude averaging.

Fundamental 1,125Hz fits exactly bin center at 64k FFT and 48kHz samplerate

1,125Hz / (48,000Hz/2^16 bins) = 1,536th bin.

Testing with distortion calibration and compensation continously running on ADC side, i.e. the harmonics are being removed from the recorded signal with the calibration profile updated every 2 seconds.

Chart 1 - magnitude averaging at 64k FFT - the harmonics are within the noise.

Chart 2 - coherent (vector) averaging at 64k FFT - the harmonics are still within the noise, the noise is averaged-out significantly.

Chart 3 - H2, H4, H5 at -150dBFS are added after distortion compensation

Chart 4 - H2, H4, H5 at -155dBFS are added after distortion compensation (I left the averaging running for a while)

Chart 5 - H2, H4, H5 at -160dBFS are added after distortion compensation

In all cases the added distortion is shown filtered out from the noise of the soundcard. The -160dBFS distortions are identifed slightly higher, this may already approach precision of the distortion generator (chebyshev polynomials).

It looks the algorithm is working correctly.
 

Attachments

  • 160dBFS.png
    160dBFS.png
    131.6 KB · Views: 105
  • 155dBFS.png
    155dBFS.png
    134.6 KB · Views: 104
  • 150dBFS.png
    150dBFS.png
    134.3 KB · Views: 110
  • 64k-vector-avg.png
    64k-vector-avg.png
    131 KB · Views: 126
  • 64k-magn-avg.png
    64k-magn-avg.png
    122.8 KB · Views: 154
Last edited:
Source signal is generated by REW (1,125Hz):

REW -> my compensation SW -> E-MU 0404 (average distorting - see the attached spectrum) -> the distortion calibration adapter (it has no role in this measurement) -> E-MU -> compensation SW running combined-sides calibration + compensation + adding the distortions to the compensated signal -> REW.

The averaging does not "surpress" all non-harmonic bins as there are hairs at -145dB left. No idea what that is, maybe calculation artefacts.

I used specifically 1,125Hz to avoid 64k FFT bin leakage.

I can try adding some non-harmonic tone.
 

Attachments

  • passing.png
    passing.png
    143.9 KB · Views: 131
Last edited:
I did rebuild my measurement setup based on balanced classD attenuator shown post #283, and that works quite well.


2 questions however :

  1. what is the purpose of the capacitor in series (1uF) ? i would understand the need for Low pass filter but why a High pass filter in there ?
  2. If I switch polarity at the amp output THD has a slighly different value with slightly different harmonic profile. Is that because polarity change harmonic's phases and then harmonics adds/substracts differently with soundcard's harmonics ?
 

Attachments

  • IMG_20200525_213324.jpg
    IMG_20200525_213324.jpg
    981.9 KB · Views: 528
My guess is that the caps in series are DC blocking. Many small Class-D amps with single rail supplies have outputs that ride at 1/2 supply voltage.


Ok thanks for the lead Pano. I finaly took them off as I saw no difference in THD results and these caps were obviously arming other type of measurements such as frequency response (Tested on ncores and cheap Alientek D8).
 
Macbook Pro (late 2013) Loopback Test

Just for grins and to learn REW, I built a loopback for my Macbook - sending the headphone output back into the external mic input via an attenuator.

The Macbook, in order to be faked out for external mic detection, needs about a 1.6K resistor across the mic input. I used a splitter to separate output and input.

THD is not so bad (.0038%), but noise is pretty bad (.033%), as is often the case with built-in sound devices. Not sure if this will be useful for actual amplifier testing, or if I will need to pony up for a Focusrite (or other external device). We'll see.
 

Attachments

  • Screen Shot 2020-06-23 at 4.16.39 PM.png
    Screen Shot 2020-06-23 at 4.16.39 PM.png
    354.2 KB · Views: 177