How to - Distortion Measurements with REW

I just have a cheapie Behringer UCA222, so things are pretty simple. I characterized its performance vs various input levels to know how hard to hit it for best performance.

In Generator, you can pre-distort the waveform to drive down your harmonics. I successfully played around with that a bit, but the amplifiers I work with have high enough distortion that I don't much bother with it any more. Make sure to display phase of distortion products, then just pre-distort with same level, but 180deg out of phase.

In addition to the USB harmonics phofman mentions, you also don't want to be right at 1000Hz when measuring an amplifier because some of the 60Hz harmonics will land on the 1k distortion products, making distortion appear worse. I find 1015 works pretty well - guess it'd be easy enough to calculate but I never bothered. For best performance I also have to pull out my laptop's charger.
 
Again - do not use exactly 1kHz, you cannot distinguish harmonics and eventual USB artefacts.

Understood and agreed. However, 1kHz is industry standard, so that is what I was showing. I didn't feel it appropriate to send every image I captured...

I had previously dithered, locked the frequency to the FFT (1000.5Hz) and even went off-center to see what was what. In this manner, I identified which were actual harmonics and which were artifacts, which is why I was looking for ways to tame the peaks at 8k and 16k.

Just so you understand that I understand, here is a snapshot of 1,234Hz... Note that the 8k and 16k, now no longer harmonics, still exist (as do superharmonics from the 8k signal). Do you have any idea what I can do to reduce or eliminate the 8k and 16k peaks with my Focusrite Solo (v3) or with REW?
 

Attachments

  • DIYResponseWOff1kFreq.PNG
    DIYResponseWOff1kFreq.PNG
    113.9 KB · Views: 357
@kking85743 -
FWIW - I can't keep my FR / REW combination stably operating. I went in this morning to try some measurements, and I could not get the loopback measurements like I was using yesterday to work properly. Literally, I just let the machine go to sleep. I think there was a Windows update last night, but that should be unrelated.
I have seen the same thing. I have noticed that the REW Generator screen resets the output level between sessions, so I have to constantly reset that. There are others, but I'm drawing a blank at the moment. Also, my Focusrite Control has almost no options (phantom power/air for the XLR and insturment/line for input 2), so it is hard for it to change. There is a save snapshot in File pulldown in Control. I presume that saves the configuration for next time. Has that behaved in that manner for you? Or does it still switch out what you had last time? I can't help much, as there are almost no modifiable values in Control for the Solo...

It might be an interesting experiment to see when/if the device's configuration changes under the following circumstances:
- close and reopen Control with the device still running
- with Control not running unplug, and replug the device, then start Control and see if it's the same
- sleep and wake the computer with Control not running and the device still plugged in
- shut down and restart the computer (presumably it powers down the USB port) and see what Control shows on reboot.

Note that I try to run my feedback at a level where the halo is still green, no visible flashes of yellow, and certainly no red. One of your earlier photos of the Focusrite box itself showed the halo as red (clipping).

Anyway, if I get it back up and running, I'll post some screenshots. re: setting the output to "line" - I am not sure. When I set it up on the Mac - it disabled the monitor volume for my "Inputs 1 and 2". On the PC, even using Java and with allowing REW to set levels using the "Master" - my pot is active for Inputs 1 and 2. I'm stumped. I don't see anything re: a switch in the user manual for the FR.
Interesting that you have that clean a line even with Java. My Java based screens were gawd-awful. For me, using the ASIO, it stops using "speakers" and "left/right" for outputs, so I have to be careful. It's also unfortunate that the "L+R" option is gone for output. I just plugged the different possible combinations (very few for my Solo) and noted the connections I used. I haven't seen the Preferences | Soundcard input/output/loopback/timing values change on me. They have stayed the same from reboot to reboot.

Question: have you saved the calibration to a file? (middle of that same screen) Without a saved calibration file (and presumably therefore reloadable), the system may be coming up to a default value each time. If that default settings are different from what you are using, I could see something like that happening...

Here's what I found re: the specs for the output voltage for line out.
View attachment 840236
View attachment 840237
That's interesting. I had seen all the specs, and they were in dB, not volts for max. I didn't notice the little 'u' at the end of the dBu, so I ignored it as another relative measurement. Thanks for noticing that. My output should be well below that, so I shouldn't have to worry about a divider network as yet (pre-amp).

Oh wait, that was for output... Hmm. Not sure how to switch mine from Speaker to Line (or vice-versa). The Focusrite Control has literally no controls shown for the output tab. But that is most definately *NOT* what I'm seeing with my little o'scope. The 0.25Vpp I'm reading isn't even in the ballpark... an order and a half of magnitude below what your chart shows...

I am presently using unbalanced cable for the feedback loop, as I will also be using unbalanced for testing the pre-amp, so while that may be a "problem" in the sense that I'm throwing half the output away, I'm also going to be using the device in this manner for testing the preamp and the amp, so it is one I will have to deal with eventually. Quick note - switched briefly to a TRS 1/4" for the feedback, and got the noise floor to drop a bit (presumably 3db), but the noise dropped by about a third and the THD dropped into the noise floor. Interesting data point.

I may just switch to a different source for the signal, and get THD for the generator, then subtract it from the output (manually). not an ideal solution (as it's cheap and probably full of harmonics), but I need to see what happens when when the preamp is driven hard...

Note - I'm learning alongside, so someone that knows the software should comment. I think my Control software and REW are fighting with each other, and/or I have some kind of a driver issue.
That's part of what makes this platform so much fun - we get to thrash alongside the others, help each-other and from time to time, gain wisdom from a benevolent guru who happens to notice our struggles.
:)
 
Understood and agreed. However, 1kHz is industry standard, so that is what I was showing.

I know but IMO that standard was established long before USB-based measurement devices came to existence. The device params at 981Hz or 1015 Hz will not differ from 1,000Hz.

USB protocol operates in frames. USB low/fullspeed (12Mbps, USB audio class 1) sends data in frames every 1ms - hence the processing occurs in 1kHz bursts.

USB-audio class 2 using high-speed (USB2) sends the packets in times defined by the soundcard (parameter bInterval reported in the USB headers). These are typically 1ms for slower samplerates, 0.5, 0.25 and 0.125ms for the highest samplerates/channel counts/sample lengths. 0.125ms corresponds to 8kHz.

You can easily see what USB configuration your soundcard reports, i.e. what the data period is. In Linux command lsusb -v, there are similar softwares for windows too.

It is quite common for a USB audio interface to introduce artefacts at base (+ harmonics) of the data bursts frequency. My 2 cents your soundcard for musicians cares about low latency, sending the data as often as possible - i.e. 125us (bInterval = 0) - IMO that is an answer to your 8kHz question.
 
Last edited:
Member
Joined 2019
Paid Member
I have seen the same thing. I have noticed that the REW Generator screen resets the output level between sessions, so I have to constantly reset that. There are others, but I'm drawing a blank at the moment. Also, my Focusrite Control has almost no options (phantom power/air for the XLR and insturment/line for input 2), so it is hard for it to change. There is a save snapshot in File pulldown in Control. I presume that saves the configuration for next time. Has that behaved in that manner for you? Or does it still switch out what you had last time? I can't help much, as there are almost no modifiable values in Control for the Solo...

It might be an interesting experiment to see when/if the device's configuration changes under the following circumstances:
- close and reopen Control with the device still running

I agree. Everything below is from my Windows machine. The Mac seems more stable, but it has a few other things I just can't figure out yet. Most likely it relates to user error.

Both control and REW were running, shut down Control and re-opened. Everything stayed the same.

- with Control not running unplug, and replug the device, then start Control and see if it's the same

It stayed the same.

- sleep and wake the computer with Control not running and the device still plugged in

Shut down control. Put computer to sleep. Woke computer. Control stayed the same.

- shut down and restart the computer
(presumably it powers down the USB port) and see what Control shows on reboot.[/QUOTE]

Control stayed the same.

Note that I try to run my feedback at a level where the halo is still green, no visible flashes of yellow, and certainly no red. One of your earlier photos of the Focusrite box itself showed the halo as red (clipping).

Good catch - Mine transitions to yellow at -6.9dBFS and Red at -0.9dBFS with no gain on the input. The picture (I think) was taken either then the monitor pot became active and/or when I was running a higher input level.


Interesting that you have that clean a line even with Java. My Java based screens were gawd-awful. For me, using the ASIO, it stops using "speakers" and "left/right" for outputs, so I have to be careful. It's also unfortunate that the "L+R" option is gone for output. I just plugged the different possible combinations (very few for my Solo) and noted the connections I used. I haven't seen the Preferences | Soundcard input/output/loopback/timing values change on me. They have stayed the same from reboot to reboot.

Mine seem to only change when I shut down REW. Then I need to go back into preferences and reset my input / output etc. and choose my calibration file.

Question: have you saved the calibration to a file? (middle of that same screen) Without a saved calibration file (and presumably therefore reloadable), the system may be coming up to a default value each time. If that default settings are different from what you are using, I could see something like that happening...

Yes, but I am still not 100% certain I am doing it properly. On the PC, the IN and OUT levels matched dead on using the Java driver when IN and out were set to 1.0 per instructions and using "Master". With ASIO, it worked flawlessly for my first tryout once I choose the correct channels for in and out. Now, even if I set it precisely like I had it... the FR shows no input signal getting to it. I may just uninstall / re-install both Control and REW. There's an update that was pushed to REW anyway.

That's interesting. I had seen all the specs, and they were in dB, not volts for max. I didn't notice the little 'u' at the end of the dBu, so I ignored it as another relative measurement. Thanks for noticing that. My output should be well below that, so I shouldn't have to worry about a divider network as yet (pre-amp).

Oh wait, that was for output... Hmm. Not sure how to switch mine from Speaker to Line (or vice-versa). The Focusrite Control has literally no controls shown for the output tab. But that is most definately *NOT* what I'm seeing with my little o'scope. The 0.25Vpp I'm reading isn't even in the ballpark... an order and a half of magnitude below what your chart shows...

I am presently using unbalanced cable for the feedback loop, as I will also be using unbalanced for testing the pre-amp, so while that may be a "problem" in the sense that I'm throwing half the output away, I'm also going to be using the device in this manner for testing the preamp and the amp, so it is one I will have to deal with eventually. Quick note - switched briefly to a TRS 1/4" for the feedback, and got the noise floor to drop a bit (presumably 3db), but the noise dropped by about a third and the THD dropped into the noise floor. Interesting data point.

I may just switch to a different source for the signal, and get THD for the generator, then subtract it from the output (manually). not an ideal solution (as it's cheap and probably full of harmonics), but I need to see what happens when when the preamp is driven hard...


That's part of what makes this platform so much fun - we get to thrash alongside the others, help each-other and from time to time, gain wisdom from a benevolent guru who happens to notice our struggles.
:)

I'm not sure re: the output levels. If it varies when you rotate the volume pot, then it's set to monitor out. I haven't found anything to move it to line out in the Windows software. When I use my Mac - it automatically sets that output to line-level when I open REW. :confused:

It is a blast even when it's frustrating. Makes it all the sweeter when it works. :D Yes, the people on DIYA are absolutely incredible. The level of knowledge and time shared warms the heart.

If I find anything compelling that may lead to a solution, I'll post. I have not measured the voltage levels on my 4i4 with a DMM yet. I may give that a shot as a reference point.
 
Hi Folks

Setup as below - bananas and rcas to amp

Obviously levels to Solo are too high (see spectrum) - Left gain glows red even turned counterclockwise

Spectrum shows high level of distortion

I use the Akitika level control to set 3.17VAC across 10 ohm resistor

REW is set to use the Solo with Output= speaker and Input= Microphone

Cannot obtain green on the Solo Control (left)

????

Help appreciated

Thanks

Bob
 

Attachments

  • IMG_8386 2.jpg
    IMG_8386 2.jpg
    752.9 KB · Views: 364
  • m2 toshiba R.jpg
    m2 toshiba R.jpg
    104.4 KB · Views: 371
Member
Joined 2016
Paid Member
Hi Bob,

I built myself a switchable attenuator with 6 dB, 12 dB, 18 dB, ... attenuation for this purpose.

See my post #19 in this very thread:
https://www.diyaudio.com/forums/sof...istortion-measurements-rew-2.html#post5807692

djoffe, who started this whole thing in this thread:
Distortion Measurement with Soundcard and ARTA software
also came up with the design for the attenuator. I can't find his original post with the schematic at the moment, but Mark posted it in that thread:
https://www.diyaudio.com/forums/equ...nt-soundcard-arta-software-3.html#post6100425

I checked the attenuation rates when doing first measurements with the attenuator, it really does what it says on the tin ... ;)


Have fun,
Claas
 
trobbins and chede Thank you

I can achieve 3.17VAC across the 10 ohm load. The first posts show 2.87VAC into a Solo. ( I can lower that by lowering gain of the 1kHz signal.) That seems to be amplified when it goes into Solo. If I attenuate after 10 ohm resistor it seems I would be looking at less than 1 Watt amp output. I will experiment today
 
I am missing something really obvious - sorry guys

Build the attenuator Chede referenced - screwed someting up because essentially am getting 0 out

Lets go simpler
Put a 20k and 2k resistor in series - Put pos output from amp at the 20k end and connected midpoint to pos input on the 10 ohm - not quite sure what to do with neg amp output and what should be ground.

should be clear but my brain is clouded
 
Connect your load resistor per usual to the amp. Connect the positive end of the load resistor / amp to the wiper of the switch in the attenuator (leftmost point). Connect the ground of the attenuator (shown in the schematic at the bottom of the 10k resistor next to the LEDs) to the negative end of your load resistor. Connect the output of the attenuator ("Out") to your sound card input, along with the common ground to soundcard ground. Adjust the switch to obtain the desired output. Attenuator posted below for reference.
attenuator.JPG
 
Last edited:
Correct, but it depends on what you want to meter. Typically (in my setup) the meter would be right across the load (amplifier output) so you can set the output level to 1W, 10W or whatever level you want to measure performance. Then you would adjust the attenuator to hit the sound card with the appropriate level the sound card likes.

Also, if you are measuring the performance of a bridged amplifier you may not be able to run the negative side of the amp (which is an inverted output, not ground) to the sound card ground depending on how things are grounded. I have normally measured single ended amplifiers. The one time I was trying to measure a bridged amp it caused headaches from which I have yet to recover. Not sure the best way to do that.
 
danschy, chede, trobbins Thanks again for all the help !!!

Set up as danschy most recently recommended - Able to monitor load across my 10 ohm resistor and with attenuator (same as in pic sans leds) about .5V at Solo

Now the real challenge - read thread and manual to get nice looking RTA curves.
If anybody wants to share settings I am always open

Best and thanks for this thread

Bob