Go Back   Home > Forums > Design & Build > Equipment & Tools
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 9th October 2008, 08:32 AM   #41
Elvee is offline Elvee  Belgium
diyAudio Member
 
Join Date: Sep 2006
Quote:
Originally posted by The Electrician
The 339A isn't capable of .001% accuracy. :-(

But as I mentioned in post #13, a measurement would have to include harmonics up to the 867th to get .1% accuracy with a square wave input, so you would have to use a fundamental of no more than 380 Hz with the full bandwidth of the instrument.

If you're satisfied with 1% accuracy using a square wave, you only need to see up to the 87th harmonic, which would be about 3800 Hz with the full bandwidth of the instrument.

So, use a square wave of several volts amplitude and 1 uS or so rise time at 1 kHz, full bandwidth of the 339A, and you should get a distortion of close to the theoretical value of 43.5%. Or, use a triangle wave, and see something close to the theoretical value of 12.027%.
Some rectifications are needed here: first, the distortion of a pure square wave is something like 46.7%, not 43.5%.
And in order to get less than 1% relative error on the distortion, you only need up to the 25th harmonic. I didn't make the calculations for 0.1%, because as has been pointed out, such an accuracy is totally ludicrous for distortion measurements. 1% is already extremely ample.
  Reply With Quote
Old 10th October 2008, 08:32 AM   #42
diyAudio Member
 
Join Date: Mar 2008
Quote:
Originally posted by Elvee

Some rectifications are needed here: first, the distortion of a pure square wave is something like 46.7%, not 43.5%.
And in order to get less than 1% relative error on the distortion, you only need up to the 25th harmonic. I didn't make the calculations for 0.1%, because as has been pointed out, such an accuracy is totally ludicrous for distortion measurements. 1% is already extremely ample.
I searched the web to see if I could find where you got the 46.7% number, and I found this site:

http://www.vk1od.net/SquareWave/THD.htm

If that's where you got the number, you should be aware that the calculation on that page is in error.

In Figure 2, he has the function f(x) = (1 - 4/pi*sin(x))^2, which is the correct function up to that point.

But in Table 1, he left out the 4/pi factor in the calculation for the RMS responding meter (and the average responding one, too). If you put back this factor and do the calculation, you will get 43.5% distortion for a square wave.

Or, work it out from the definition of THD:

Total power of harmonics
----------------------------------------------------
Total power of (fundamental+harmonics)

like this:

SQRT(1/9 + 1/25 + 1/49 +...+ 1/(2n-1)^2)
---------------------------------------------------
SQRT(1/1 + 1/9 + 1/25 + 1/49 +...+ 1/(2n-1)^2)

Let n be 1000 or so, and use Matlab or something to add them all up and you will get something around .435

The theoretical value for n -> infinity is 100*SQRT((pi^2-8)/(pi^2)) = 43.52362%

You can also use the quotient of series to find that including up to the 87th harmonic (n=44) will give a value of 43.0906%, just a tiny bit less than 1% smaller than the exact theoretical value.
  Reply With Quote
Old 10th October 2008, 08:35 AM   #43
diyAudio Member
 
Join Date: Mar 2008
Quote:
Originally posted by jackinnj


It will work down to a little above 0.001%, however --
I was referring to relative error (percent of reading), not absolute error.
  Reply With Quote
Old 10th October 2008, 11:18 AM   #44
Elvee is offline Elvee  Belgium
diyAudio Member
 
Join Date: Sep 2006
Quote:
Originally posted by The Electrician


I searched the web to see if I could find where you got the 46.7% number, and I found this site:

http://www.vk1od.net/SquareWave/THD.htm

If that's where you got the number, you should be aware that the calculation on that page is in error.

In Figure 2, he has the function f(x) = (1 - 4/pi*sin(x))^2, which is the correct function up to that point.

But in Table 1, he left out the 4/pi factor in the calculation for the RMS responding meter (and the average responding one, too). If you put back this factor and do the calculation, you will get 43.5% distortion for a square wave.

Or, work it out from the definition of THD:

Total power of harmonics
----------------------------------------------------
Total power of (fundamental+harmonics)

like this:

SQRT(1/9 + 1/25 + 1/49 +...+ 1/(2n-1)^2)
---------------------------------------------------
SQRT(1/1 + 1/9 + 1/25 + 1/49 +...+ 1/(2n-1)^2)

Let n be 1000 or so, and use Matlab or something to add them all up and you will get something around .435

The theoretical value for n -> infinity is 100*SQRT((pi^2-8)/(pi^2)) = 43.52362%

You can also use the quotient of series to find that including up to the 87th harmonic (n=44) will give a value of 43.0906%, just a tiny bit less than 1% smaller than the exact theoretical value.
The figures I gave pertain to another definition of distortion, which is the ratio of the rms voltage of harmonics to the rms voltage of the fundamental, as shown here f.e.:
http://zone.ni.com/devzone/cda/tut/p/id/3401
It is the definition generally used in Europe for audio purposes.
I'm aware other definitions exist, including yours.
I will certainly not take sides in this matter and say that my definition is better than yours; the important thing is to know exactly what we're talking about.
Anyway, when distortion figures are small, the two methods give very close results; in the case of a square wave, there are significant differences, and in particular, the much slower convergence with your method, due to the presence of the harmonics in the denominator of the expression.
Also note that in the case the square wave is "diluted" in a large amount of fundamental, both methods will yield similar results and will converge at speed of "my" method: i.e. 1% relative accuracy obtained at 25th harmonic.
  Reply With Quote
Old 10th October 2008, 01:22 PM   #45
diyAudio Member
 
Join Date: Mar 2008
Quote:
Originally posted by Elvee

The figures I gave pertain to another definition of distortion, which is the ratio of the rms voltage of harmonics to the rms voltage of the fundamental, as shown here f.e.:
http://zone.ni.com/devzone/cda/tut/p/id/3401
It is the definition generally used in Europe for audio purposes.
I'm aware other definitions exist, including yours.
I will certainly not take sides in this matter and say that my definition is better than yours; the important thing is to know exactly what we're talking about.
This thread was started with a question about checking the calibration of an HP339A. This instrument uses the definition of THD which is commonly used in the US for measuring audio distortion (in post #42, where I said "Total power of...., I meant to say "RMS value of...":

RMS value of harmonics
---------------------------------------
RMS value of (fundamental+harmonics)

The definition you are using is used by the power industry in the U.S.

See: http://en.wikipedia.org/wiki/Total_harmonic_distortion

They say: "...for audio measurements 100% is preferred as maximum, thus the IEC version is used (Rohde & Schwartz, Bruel and Kjær use it).", and then they show a definition which is the same as that used by the 339A, squared. This definition has the power of (fundamental+harmonics) in the denominator instead of just the power of the fundamental.

I would have thought that Rohde & Schwarz or Bruel and Kjaer would be common instruments in Europe, and that the IEC method would be the one commonly used in Europe for audio measurements.

Can any Europeans verify the method used by the aforementioned European instruments?

But regardless of which method is common in Europe, the theoretical distortion for an ideal square wave, including all the harmonics, using the method you're using (the IEEE method referred to in the Wikipedia article, and also on the web page you referenced: http://zone.ni.com/devzone/cda/tut/p/id/3401) is not 46.7%, but rather 48.34%.

The exact value is 100*SQRT((pi^2-8)/8) = 48.34258...%

The distortion of a square wave up to the nth harmonic can be calculated for the definition you used (the IEEE definition) like this:

RMS value of harmonics
------------------------------
RMS value of fundamental

or:

SQRT(1/9 + 1/25 + 1/49 +...+ 1/(2n-1)^2)
----------------------------------------------
1

If I use the figure you have given for the distortion of a square wave, namely 46.7%, then the expression just above is indeed within 1% of 46.7% when harmonics up to the 25th are included, but as I said the 46.7% number when using your definition of THD is incorrect.

If you use as a reference the correct figure of 48.34258%, harmonics up to the 107th must be included to get 1% relative accuracy.
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get Microphone Calibrated LetGoMyEggo Everything Else 3 4th March 2009 10:17 PM
source of distortion??? Dan2 Car Audio 6 11th February 2009 10:09 AM
Calibrated DAC with one chip per bit ? Bernhard Digital Source 8 16th May 2005 11:27 PM
Microprocessor Calibrated Amp. Brian Guralnick Solid State 11 29th October 2002 06:29 AM


New To Site? Need Help?

All times are GMT. The time now is 03:16 AM.

Page generated in 0.11819 seconds (82.37% PHP - 17.63% MySQL) with 11 queries

Copyright ©1999-2012 diyAudio