How to - Distortion Measurements with REW

Chede,

Could you show me whatyour Focusrite 2i2 looks like when used in the sine sweep mode? I can get a 78dB dynamic range with my Tascam US-144 MKII (signal to THD) and have wondered about a Focusrite 2i2, but I suspect that the DR may not be that much better.
 
Founder of XSA-Labs
Joined 2012
Paid Member
Aridace,
Thanks for the filter design, do these have to be air cores or can I use small ferrite cores?

760542d1559510534-howto-distortion-measurements-rew-100khz-lpf-jpg
 
Founder of XSA-Labs
Joined 2012
Paid Member
Focusrite Solo gen2 Loopback Performance

Here is Focusrite Solo Gen 2 with internal oscillator (in REW) and also with external Akitika 2ppm 1kHz oscillator. Both at 1.0Vpp into internal 10kohm impedance of audio input. Both tests performed with PC laptop connected to mains via SMPS brick and external monitor.

Internal oscillator achieves about 0.00058% THD and has dominant 2nd order harmonic and some higher orders:
attachment.php


External Akitika 2ppm oscillator is 3rd harmonic dominant (specs say should be 2nd order) and no higher orders, THD is about same as 2i4, at 0.00036% given same DAC is used. However, the mysterious 100Hz comb is now gone:
attachment.php


So it looks like the less pricey Solo 2nd gen is quite capable.

And here is using the Cayin N3 DAP with internal AKM4490EN DAC and OPA1688 output driver playing a high res 1kHz FLAC file (generated in Audacity), it achieves THD of 0.00062%, but look at the purity of the 1khz oscillator linewidth (narrow spike vs broad shoulders of the above oscillators), however, it has a mildly rising DC level perhaps generating some low-level broadband rumble?:
attachment.php


Use of the Cayin N3 is certainly better than the built in DAC for the Solo and internal generator - but the 2ppm linear oscillator seems to beat them both - so a good tool to have on hand if you want lower than 0.0006%THD loopback.
 

Attachments

  • Solo-Gen2-Loopback-Internal-Osc-1khz-1.0Vpp-10kHz-FFT.jpg
    Solo-Gen2-Loopback-Internal-Osc-1khz-1.0Vpp-10kHz-FFT.jpg
    217.7 KB · Views: 3,903
  • Solo-Gen2-2ppm-Osc-1khz-1.0Vpp-10kHz-FFT.jpg
    Solo-Gen2-2ppm-Osc-1khz-1.0Vpp-10kHz-FFT.jpg
    215 KB · Views: 10,709
  • Solo-Gen2-Loopback-DAP-FLAC-1khz-0.98Vpp-10kHz-FFT.jpg
    Solo-Gen2-Loopback-DAP-FLAC-1khz-0.98Vpp-10kHz-FFT.jpg
    215.6 KB · Views: 3,803
Last edited:
Founder of XSA-Labs
Joined 2012
Paid Member
Behringer UM2 interface and REW

My UM2 arrived today, hooked it up and ran similar tests to the Focusrite Solo. The UM2 is about physically the same size, but uses no metal on the case, and all knobs are plastic rather than a nice metal volume knob. It seems well built though. Connecting it to Win10, it was recognized and worked fine with Java drivers. I also installed the factory ASIO driver. Performance with ASIO is less noisy - so there is an advantage to using ASIO driver here.

Setup:
attachment.php


UM2 with Java driver and internal oscillator loopback 1.0Vpp into 3kohm (internal impedance according to manufacturer). Notice the low level hash and 19kHz feature:
attachment.php


UM2 with Java driver and Akitika 2ppm 1kHz oscillator, 1.0Vpp into 3kohm, less hash but 19khz feature still there:
attachment.php


UM2 with Java driver and Cayin N3 FLAC 1kHz oscillator, 1.0Vpp into 3kohm, 19kHz feature still there:
attachment.php


UM2 with ASIO driver and Akitika 2ppm 1kHz oscillator, 1.0Vpp into 3kohm, able to get 0.0014%THD but 19kHz feature is now gone - looks like Java noise or processing artifact:
attachment.php


UM2 with ASIO driver and Cayin N3 FLAC 1kHz oscillator, 1.0Vpp into 3kohm, same 0.0014%THD with higher THD source so looks like the UM2 instrument limit is 0.0014%THD :
attachment.php


Overall, at $38, it is a very usable instrument for basic spectral measurements of most DIY amps and headphones, but not lower distortion amps. I forgot to measure internal oscillator with ASIO. i wouldn't be surprised if it also was 0.0014%. I think what we may be seeing here is the the Behringer touted 'ZENYX" microphone preamp which seems to have equal amounts of H2 and H3 for a sweet sound yet still have some 'bite' to it. Actually, a similar profile to M2 amp, but with 40x less THD.
 

Attachments

  • UM2-ASIO-Loopback-Cayin-N3-1khz-1.0Vpp-3kohm.jpg
    UM2-ASIO-Loopback-Cayin-N3-1khz-1.0Vpp-3kohm.jpg
    200.5 KB · Views: 3,588
  • UM2-ASIO-Loopback-2ppm-Osc-1khz-1.0Vpp-3kohm-FFT.jpg
    UM2-ASIO-Loopback-2ppm-Osc-1khz-1.0Vpp-3kohm-FFT.jpg
    198.9 KB · Views: 3,588
  • UM2-Loopback-Cayin-N3-1khz-1.0Vpp-3kohm.jpg
    UM2-Loopback-Cayin-N3-1khz-1.0Vpp-3kohm.jpg
    201.4 KB · Views: 3,628
  • UM2-Loopback-2ppm-Osc-1khz-1.0Vpp-3kohm-FFT.jpg
    UM2-Loopback-2ppm-Osc-1khz-1.0Vpp-3kohm-FFT.jpg
    205.9 KB · Views: 3,626
  • UM2-Loopback-Internal-Osc-1khz-1.0Vpp-FFT.jpg
    UM2-Loopback-Internal-Osc-1khz-1.0Vpp-FFT.jpg
    206.9 KB · Views: 3,702
  • UM2-Setup-Testing.jpg
    UM2-Setup-Testing.jpg
    365 KB · Views: 3,751
Last edited:
When looking at spectra of high purity oscillators like this the specific FFT window chosen is vital - otherwise you risk assuming the shoulders of the fundamental are actual oscillator phase noise (they could just be FFT window shape). In particular you need a high dynamic range flat-top window to see the true phase-noise side band detail. The Hann (aka Hanning) window will not do.

Plots that don't identify the FFT window are alas rather meaningless in this context.

http://holometer.fnal.gov/GH_FFT.pdf
 
106dB is an A-weighted specification. Tascam rates the distortion of the US-144MKII as 0.0045% (= -86.9dB, through ADC and DAC), but this is with an input of +20dBu. Since the maximum input level is specified as +9dBu, work that out!

I can achieve an 80dB range in the sine sweep measurement as the attached view shows. Now what does the Focusrite 2i2 (2nd generation, if you will) achieve in PRACTICE in a sine sweep?
 

Attachments

  • Tascam and REW sine sweep dynamic range.jpg
    Tascam and REW sine sweep dynamic range.jpg
    101.9 KB · Views: 408
Member
Joined 2018
Paid Member
Aridace,
Thanks for the filter design, do these have to be air cores or can I use small ferrite cores?

760542d1559510534-howto-distortion-measurements-rew-100khz-lpf-jpg

Off the shelf Toko inductors have a ferrite core and the 100mH shielded version has a limit of 5 mA DC, lower inductors have higher limits so it's unlikely that a signal level of several volts (ADC input) for a low pass filter would pose a problem.
 
Founder of XSA-Labs
Joined 2012
Paid Member
Here is a frequency scan using Focusrite Solo Gen 2. In the "Measurement" dialog, choose the depth of points to get more dynamic range. Default is 256k which gives kind of a low DR. Choose 1M points gives 86dB for fundamental and 96dB for noisefloor at 100Hz. Gets worser at higher frequencies and about 5dB worse at 1kHz. You can even average multiple sweeps to get it higher.

Here is loopback using internal freq generator for distortion orders vs frequency - going all the way out to 44kHz since this is ASIO 96kHz:
attachment.php


Looks like the input preamp filters etc work above 20kHz though - and that's good.
 

Attachments

  • Solo-Gen2-Freq-Sweep-1M-points.jpg
    Solo-Gen2-Freq-Sweep-1M-points.jpg
    256.7 KB · Views: 5,598
Last edited:
Member
Joined 2016
Paid Member
Hello,


I finally found the time to try a frequency sweep today. But somehow I'm missing something here. In REW's generator window, I can select "Measurement Sweep" and set the parameters as xrk971 described in post #51. However, I only see the sweep running on the RTA window.

I have not been able to show it on the main window as shown be xrk971 in #51. What do I have to do / set to be able to ?


Thanks in advance,
Claas
 
Member
Joined 2016
Paid Member
xrk971, thank you !

I always had tried to use the "signal generator" icon, as I did for the sine and stepped sine measurements. That didn't work for the sweeps ... :p

The key was to use the "measure" icon. So here are my results for Focurite 2i2, internal generator, output level digital -3 dBFS, output analog 0.7V, and I set the gain so that I got -10 dBFS at the 1kHz sine peak, as I found that this gives slightly lower THD than setting the gain to -4 dBFS at the peak.

Also, I had s slight 50 Hz signal I got that gets picked through the air, as shown earlier. I found that this gets much lower to non-detectable when I put my hand on the metal case of the Focusrite. Laptop running on battery for all of this ... :rolleyes:


Here is the result again for the 1kHz signal:

attachment.php




And for the sweep:

attachment.php





And again, for comparison, the stepped sine:

attachment.php



I also tried averaging multiple sweeps (8x), but found that it didn't help the THD. The noise floor got lower, but in the high frequency range from 10 kHz up the distortion signatures didn't average out, but instead summed or something similar, rising sharply.


I think the results are not too bad for the Focusrite and its internal generator ... that one is certainly much lower distortion than my (rather oldish) Tektronix CFG250 ... ;)


Best regards, Claas
 

Attachments

  • Focusrite 2i2 loopback 190604 0.7V -10dBFS.png
    Focusrite 2i2 loopback 190604 0.7V -10dBFS.png
    62.7 KB · Views: 3,072
  • Focusrite 2i2 loopback 190604 0.7V -10dBFS sweep 1x 0-48 kHz.png
    Focusrite 2i2 loopback 190604 0.7V -10dBFS sweep 1x 0-48 kHz.png
    97.3 KB · Views: 3,903
  • Focusrite 2i2 loopback 190604 0.7V -10dBFS step.png
    Focusrite 2i2 loopback 190604 0.7V -10dBFS step.png
    55.8 KB · Views: 3,037
...but look at the purity of the 1khz oscillator linewidth (narrow spike vs broad shoulders of the above oscillators)...

Comments of the purity could be because say the other stimulus is either in family of 44,1 or 48kHz rates, but for Cayin N3 DAP you tell its high res 1kHz FLAC file (generated in Audacity), say that high res is then up in area 96kHz or more then stimulus should be a sharper notch as what happens for impulse responses that the higher the rate the sharper less wide is visual impulse, and then at same when noice floor is raised as in example compared to the other ones then a high res notch fired would look kind of crazy pure would i think when it is cut off to the relative higher noice floor.

BTW nice thread thanks sharing stuff : )
 
Last edited:
Founder of XSA-Labs
Joined 2012
Paid Member
Nice work Chede,
I wonder why your Focusrite has a broad distortion hump at low frequencies? It should be very similar to the Solo? Maybe there are other settings at play.

Please check to make sure you have all native PC “sound effects” processors turned off. I had to turn off my HP “noise reduction” background plugin and the B&O “audio effects” driver. Leaving things like that on will sometimes generate all sorts of distortion anomalies. I struggled with a an anomalous bass distortion for weeks until I found out it was due to a “bass boost” background audio plugin from factory.

760915d1559679566-howto-distortion-measurements-rew-focusrite-2i2-loopback-190604-0-7v-10dbfs-sweep-1x-0-48-khz-png


This looks like a 7.5dB 60Hz bass boost with Q=0.5
 
Member
Joined 2016
Paid Member
Hi xrk971,

I did have a close look at the settings of the PC, and didn't find any audio settings that were set away from flat.

Also note that in the graph I posted there is no normalising of the fundamental; the level is almost flat at the whole range, with very slight drops towards 10 Hz and 30 kHz.

I did take a number of sine measurements at different frequencies - 20, 30, 50, 60, 100, 200 Hz, and it really looks like that while the Focusrite 2i2 has constant level, there is the range of higher distortion between 15 and a few 100 Hz that you can see in the sweep. And tonight I didn't have visible 50 Hz / 25 Hz or other noise peaks in my spectra ...

So, it remains a puzzle ... :confused:
From my current state of measurements taken, I would have to infer that the Focusrite 2i2 has a range of higher distortion at low frequencies ...


Best regards,
Claas
 
Founder of XSA-Labs
Joined 2012
Paid Member
Some recent measurements of my new overkill 8x parallel OPA1622 Muscle Amp headphone amp. This was made using the 2ppm 1kHz source and 2i4 in differential input mode using a TRS input jack with tip and ring wired across 47ohm dummy load. No attenuation divider used. I noticed that the 100Hz comb around the 1kHz shows up when I take my hand away from the plastic case that the 2ppm source housed in. Looks like it could use a metal case that is grounded for better noise performance. I also found that by expanding the setup dialogue sub window and doing a screenshot, all settings are displayed vs using the “camera” screenshot to file button which does not show the settings.

https://www.diyaudio.com/forums/hea...pa1688-low-thd-muscle-amp-22.html#post5817653

1Vpp into 47ohms:
761838d1560092889-cheap-chips-opa1688-low-thd-muscle-amp-muscle-amp-1vpp-47ohms-fft-ss-jpg


2Vpp:
761839d1560092889-cheap-chips-opa1688-low-thd-muscle-amp-muscle-amp-2vpp-47ohms-fft-ss-jpg


4Vpp:
761840d1560092889-cheap-chips-opa1688-low-thd-muscle-amp-muscle-amp-4vpp-47ohms-fft-ss-jpg


This amp seems to have an increasing second order distortion with increasing power - not a bad thing. It is ultra quiet and sounds very neutral, otherwise.
 
Last edited: