Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Measuring thd

Status
Not open for further replies.

DJAE

New Member
Can anyone explain a simple way to measure thd of an audio circuit using signal generator and scope please? Datasheet for device in question recommends Sine @10khz 0db. I have included thd trim and would like a BASIC way of measuring.

Thanks in advance.
 
Can anyone explain a simple way to measure thd of an audio circuit using signal generator and scope please? Datasheet for device in question recommends Sine @10khz 0db. I have included thd trim and would like a BASIC way of measuring.

Thanks in advance.

Have a look at this:

**broken link removed**

You could also use the FFT capability of a digital scope if you have such an instrument; do you have one?
 
I have an old scope at home and access to a tektronix digital scope at work. Its one of the little potable jobs so may not have loads of functions.. I will take a look at that link...
 
... OK, so once again I underestimate the process involved; oh the curse of the optimist!
So in my case I would need to build another circuit with much tighter tolerances than the one I am measuring in order to null the signal leaving only noise? Electronics is an exponential hobby isn't it?

So are nulling and using a digital scope the only two methods or the best two? I'm not looking to measure to the tight tolerances discussed in that article, and this opening gambit freaked me out a bit:

" It is not intended to give a detailed description of the nulling method. This was the basis of my M.Sc. dissertation, which was 98 pages in length, with 44 references...."
 
Arrgh... What do the + and - buttons dob at the bottom of posts? I accidentally just pressed one on my phone!
 
OK, based on your feedback, and the price of one of those hp's I think I may be punching above my weight!
I have a compander ic which I have incorporated into a project. I used a thd trim circuit from the datasheet, which works by applying current to the gain cell.
I thinkn what I really need to measure its thd+n, but I don't need a figure, just to be able to offset any distortion, maybe your first link maybe I will look more into the techniques in the link you provided.
 
Something just occurred: if I only want to trim the output signal could I not just compare the peaks of the in/ out waves on a dual trace scope?
 
Something just occurred: if I only want to trim the output signal could I not just compare the peaks of the in/ out waves on a dual trace scope?

Most dual trace scopes can do simple trace math, namely, display the difference between two waveforms. This would be equivalent to the null method; you have to make sure that the two waves have the same amplitude before you subtract them, and you might have a problem if your compander introduces much phase shift.

And, of course, as you have asked, you could just compare the two waveforms on a dual trace. This won't be as sensitive as if you actually subtract the two waves.
 
Keep in mind that your input source has to have significantly lower THD than your output.
 
Last edited:
Keep in mind that your input source has to have significantly lower THD than your output.

Not necessarily; it depends on the method being used. For example, using this null method:

**broken link removed**

the author says:

"There are several advantages to this method:
An ultra low distortion signal generator is not needed. The signal generator distortion and noise are cancelled along with the undistorted component. On one occasion I measured distortion components around 0.00001% using a signal generator with over 0.5% t.h.d."
 
Well I'm going to be using a hp signal generator, that will be wave 1, I would compare that at stages in the circuit (e.g. After input buffer) to get an idea of whatn originates where.

I was thinking dual trace, opened up to view peaks, then adjusting trim until they look most like one another. Basic but should work right? Surely the fact it has a linear pot to adjust would imply that there will be a tipping point where either side of the adjustment looks worse than at its center right?
 
Not necessarily; it depends on the method being used. For example, using this null method:

**broken link removed**

the author says:

"There are several advantages to this method:
An ultra low distortion signal generator is not needed. The signal generator distortion and noise are cancelled along with the undistorted component. On one occasion I measured distortion components around 0.00001% using a signal generator with over 0.5% t.h.d."

And it was at that point in the text that I really sat up and paid attention! Great link added to favorites!
 
Hi,

The way i've always done it in the past is to use a THD meter. These things are not cheap however.

If you are going to try the null method, you'll need a way to adjust both the amplitude and the phase shift. You might get away with a good quality op amp to do the subtraction. Test it first.
 
Hi,

The way i've always done it in the past is to use a THD meter. These things are not cheap however.

If you are going to try the null method, you'll need a way to adjust both the amplitude and the phase shift. You might get away with a good quality op amp to do the subtraction. Test it first.

hi again! Well I won't be buying a thd meter, I'm a hobbiest so cannot justify it!
As for having to adjust amplitude a phase shift please elaborate as to why I would need to adjust these two to simply minimize the difference between in and out of this chip... Sorry to be slow, but please keep it simple (thats all I want to know really; the simplest way for me to observe the effect of the thd trim network while adjusting it for best possible output).

I know there is a lot more to this, but I am not after accurate figures, just an overview of the affect of this part of my circuit.

this is not for professional applications really, and I wouldn't say I'm a purest, or audiophile, just looking to make the best of what I have.
 
Hi,

Yes i didnt think you'd want to buy one. That's very understandable.

The adjustments for the nulling would of course include amplitude, so that you can null out the first harmonic whatever amplitude it happens to come out of the amplifier under test (AUT) at. If you input say 1v and you get 2v out, then you've got to be able to null out 2v or if attenuated back down to 1v then you've got to be able to null that out. The amplifier could very well introduce some phase shift too however, so you would have to be able to adjust the phase shift. Just in case the amp puts out an inverted signal you would also need a 180 phase shifter which could be done with an op amp as an inverter.

A regular low pass filter provides a phase shift, and a two or three stage low pass filter provides even more of a phase shift. You would possibly use that plus an op amp amplifier to adjust gain. The low pass filter resistor(s) could be a potentiometer and that would give you phase adjustment, or you could look into an all pass filter. Either way, you would get phase shift adjustment, and adjusting the output attenuation (perhaps a pot too) you could null out the signal generators frequency out of the output. That would leave just the junk which would be taken to be the distortion.

To test you could probably introduce a small phase shift with another low pass (in place of the AUT) and see if you can null it out. You might also start with say a 1kHz signal and mix in some 60Hz or 50Hz signal of lower amplitude, then see if you can null out the 1kHz and see only the 60Hz (or 50Hz) signal. Just in case you want to test your setup first.

A low pass filter can be made with a resistor and capacitor. Changing the value of cap and/or resistor changes the phase shift. The amplitude also goes up or down too though depending on the desired phase shift, so you have to readjust the amplitude.

I think the best way to look for a null is with a scope. Maybe a band pass filter too so you can concentrate on the first harmonic.
 
Hi,

Yes i didnt think you'd want to buy one. That's very understandable.

The adjustments for the nulling would of course include amplitude, so that you can null out the first harmonic whatever amplitude it happens to come out of the amplifier under test (AUT) at. If you input say 1v and you get 2v out, then you've got to be able to null out 2v or if attenuated back down to 1v then you've got to be able to null that out. The amplifier could very well introduce some phase shift too however, so you would have to be able to adjust the phase shift. Just in case the amp puts out an inverted signal you would also need a 180 phase shifter which could be done with an op amp as an inverter.

A regular low pass filter provides a phase shift, and a two or three stage low pass filter provides even more of a phase shift. You would possibly use that plus an op amp amplifier to adjust gain. The low pass filter resistor(s) could be a potentiometer and that would give you phase adjustment, or you could look into an all pass filter. Either way, you would get phase shift adjustment, and adjusting the output attenuation (perhaps a pot too) you could null out the signal generators frequency out of the output. That would leave just the junk which would be taken to be the distortion.

To test you could probably introduce a small phase shift with another low pass (in place of the AUT) and see if you can null it out. You might also start with say a 1kHz signal and mix in some 60Hz or 50Hz signal of lower amplitude, then see if you can null out the 1kHz and see only the 60Hz (or 50Hz) signal. Just in case you want to test your setup first.

A low pass filter can be made with a resistor and capacitor. Changing the value of cap and/or resistor changes the phase shift. The amplitude also goes up or down too though depending on the desired phase shift, so you have to readjust the amplitude.

I think the best way to look for a null is with a scope. Maybe a band pass filter too so you can concentrate on the first harmonic.
Post #11 has a link to the null method. It sounds good, but it's a real bear to adjust.
 
Last edited:
hi,
One way you could try is to create a audio 'wav' of the sound under test and then use LTSpice 'wav' file input option and then view the FFT.

IIRC you can specify a 16bit 'wave' file for increased quality.

EDIT:

The freeware 'Audacity 1.3 Beta' has recording and Spectrum options

http://audacity.sourceforge.net/download/
 
Last edited:
the subtraction method on a dual trace scope will work as long as there's no phase shift (you may be close to 90 degrees with most amps at 2 or 3khz, and close to 150 or so by the time you get to 20khz).

there are two general types of distortion meters, subtraction (best, but needs compensation for phase shift), and a notch filter (not quite as good, unless the notch depth is -100db) a subtraction meter can ignore (to some extent at least) distortion in the oscillator, because it's subtracting the amp output from the input. a notch filter meter needs to have as distortion-free a source as possible, and also requires the oscillator frequency to be dead on (or have the oscillator and notch frequency controls mechanically linked) and equal to the notch frequency.

there is a third alternative, and that's using a computer with a spectrum analyzer program, which only requires a low distortion source (which can also be supplied by the sound card) and an appropriate attenuator to keep the sound card input below 1Vrms.
 
I made an inexpensive active notch filter that allows me (with a companion inexpensive low0distortion sine wave oscillator) that with an AC voltmeter, lets me measure THD down to well less than 0.01%. Even some of the best THD analyzers (e.g., Tektronix AA501) can only get down to a bit less that 0.001%. The claims of measuring 0.00001% with a 0.5% audio source using a scope sounds like a lot of BS to me. Even finding distortion levels that low on anything makes my BS meter peg out and bend the pointer. Sure, I've read the article, but as Roff will attest, I'm from Missouri. Ya gotta show me.

Using an AC voltmeter solves some problems, too, by averaging out a non-sinusoidal notched signal. Using a scope as the measurement tool, where do you measure? Peak-to-peak? Some kind of assumed average? What?

After all, if this is such a wonderful, easy, accurate and low THD level method of measuring THD, then why don't Tektronix, Agilent/HP and all the others use it rather than using some version of a notch filter and measuring the output as they do? Ding, ding, ding, ding ... dang, there goes that meter of mine again.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top