Sine Wave distortion measurements

Discussion in 'General Electronics Chat' started by Bill_Marsden, Nov 12, 2009.

  1. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    Way back when I used a piece of HP equipment to measure distortion of a sine wave. It was fun to use, but long gone.

    How would a hobbiest measure distortion of a sine wave? It can look good on a oscope and still be pretty bad.

    One thought is to take the waveform in question, filter it though several low pass filters to create a reference (without phase shifting it), invert it, and null it with op amps. What is left is the distortion.

    Anyone seen a home brew setup to do this? With all the audiophiles out there I suspect it exists.
  2. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,093
    Location:
    In the vast midwest of the USA; CST
    I don't know how you could run a signal through several low pass filters and not get at least SOME phase shift, just due to propagation delays alone.

    [eta]
    Just a thought - wind yourself a broadband 1:1 isolation transformer using a quality ferrite toroid. Use the output of the transformer to drive the y-axis of your o-scope, and the input signal for the x-axis. If there is no distortion and no losses, you should get a perfect circle on the 'scope.
    Last edited: Nov 12, 2009
  3. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    Any imperfections in the circle being distortion?
  4. studiot

    studiot E-book Developer

    Joined:
    Nov 9, 2007
    Messages:
    4,202
    Location:
    Somerset UK
    It is often overlooked that to get meaningful measurements on low value distortion you require a very low distortion signal.

    The "poor man's" way is to use spot frequencies. Both the generator and the filter can be finely tuned, twinTEE being the frequency defining network of choice, although I have seen the Wein used as well.
  5. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    The old HP equipment (don't remember it's model number) you adjusted for a in the meter, then flipped the switch to automatic, and it would tune itself to the waveform. My shop used it to check the quality of amplifiers in milspec equipment.

    I think it was a precursor to a selective voltmeter.
  6. KL7AJ

    KL7AJ E-book Developer

    Joined:
    Nov 4, 2008
    Messages:
    1,604
    Location:
    North Pole, Alaska

    Howdy!

    The traditional distortion analyzer was pretty straightforward. It had a NULL circuit for notching out the fundamental frequency (a modified Wheatstone Bridge). You'd then measure alll the remaining power, which was all the harmonics, if any. Although you couldn't separate the diffferent harmonics, it was usually THD you were looking for.

    With FFT analyzers, you can get a lot more detail, of course.


    If you have an idea ahead of time as to what the harmonic content might be, you could also use a null-type analyzer on those particular harmonics and eliminate them, one at a time.


    Eric
  7. KL7AJ

    KL7AJ E-book Developer

    Joined:
    Nov 4, 2008
    Messages:
    1,604
    Location:
    North Pole, Alaska
    I might add that with a trained eye and a good oscilloscope, you CAN see harmonic distortion down to about 1%.


    eric
  8. Externet

    Externet Distinguished Member

    Joined:
    Nov 29, 2005
    Messages:
    504
    Location:
    Mideast USA
    For a signal generator, I don't know. For an amplifier, try an oscilloscope channel A at input, channel B at output, invert B if not inverted output, and select A+B.
    Adjust channel gain for minimum amplitude reading at maximum magnification. It may need adjusting delay setting. Will yield a qualitative waveform, not a % reading.
  9. studiot

    studiot E-book Developer

    Joined:
    Nov 9, 2007
    Messages:
    4,202
    Location:
    Somerset UK
    The thing to do to eyeball it in a scope is to use a dual channel.
    Input the signal input to the amp into one channel
    Take the output from the amp through a sharp filter to remove this frequency and amplify what's left 1000 or 10,000 times in the second channel.

    You can see the distortion this way.
  10. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    Sorry, no dual channels here. X and Y maybe, but have I mentioned how old my oscope is?

    Another thought occurs, the PC sound card oscope can also be used as a spectrum analyzer, so I've heard.
  11. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    You can feed any signal (even a square-wave) into a switched-capacitor lowpass filter IC and get a low distortion sine-wave output.

    My extremely low distortion sine-wave generator uses an over-sampled stepped sine-wave made from a CD4018 and a few resistors and an 8th-order Butterworth lowpass filter IC. My distortion analyser uses a switched-capacitor notch filter IC that uses the same clock as the generator so they track.
  12. KL7AJ

    KL7AJ E-book Developer

    Joined:
    Nov 4, 2008
    Messages:
    1,604
    Location:
    North Pole, Alaska

    Yes, the FFT analyzer built into GoldWave is really very good. And Goldwave is FREE!


    You can also use a ramp generator to check linearity...but you need to know if your scope is linear first! (Old rubber yardstick syndrome!)

    eric
  13. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    OK, this I know, but how do you measure the numbers?

    What's driving this is simple enough, how do you know when you have a good design?

    Made ya'll think at least. I'm not sure I would buy that old HP equipment if it was available, but it would be tempting.
  14. studiot

    studiot E-book Developer

    Joined:
    Nov 9, 2007
    Messages:
    4,202
    Location:
    Somerset UK
    Well it doesn't have to be dual. You can just measure one, then the other.
  15. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Rectify and filter the input sine-wave. It is the reference.
    Adjust the rectified and filtered output level so its DC signal is the same level as the input DC reference signal.
    Then rectify and filter the output with the fundamental notched out. Its level is the percentage of noise plus distortion.
  16. THE_RB

    THE_RB AAC Fanatic!

    Joined:
    Feb 11, 2008
    Messages:
    5,435
    I would try recording it into your PC sound card which is 16bit, then look for some free software to analyse it. It would be easy enough to write a VB application etc to analyse the sound data, wave files are very easy to read, but I would be surprised if there is not already a free app out there to do it.
  17. Bill_Marsden

    Bill_Marsden Thread Starter Moderator Staff Member

    Joined:
    Mar 24, 2008
    Messages:
    19,233
    Location:
    Dallas, TX (GMT-5 w/ DST)
    Probably. I like AudioGuru's notch idea, it is simple, and I'm betting that is how HP did it.

    The spectrum analyzer would also be an interesting approach, though getting numbers out of it would be hard. It would let you tweak a wave shaper for the best waveform.

    I wouldn't bother recording it, you can do this stuff real time if I'm not mistaken. I think the sound card makes a questionable oscope, but it definately has its uses.
  18. studiot

    studiot E-book Developer

    Joined:
    Nov 9, 2007
    Messages:
    4,202
    Location:
    Somerset UK
    It should be remembered that most THD instruments actually record THD + Noise.

    Switched capacitor filters have two difficulties that have to be overcome at the expense of circuit complexity. This is not a problem for an IC manufacturer, but extra work for a one-off designer.

    These problems are:

    1) Keeping the switching noise out of the measurement.

    2) Achieving appropriate impedance levels presented to the source.

    I still maintain that for the average amateur analog based spot frequency measurement is the way to go.
  19. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    The switching noise of modern switched capacitor filter ICs is very low and is 100 times the cutoff frequency so is easily filtered out.

    An opamp buffer isolates the fairly low and changing-with-frequency input impedance of a switched capacitor filter IC.
  20. studiot

    studiot E-book Developer

    Joined:
    Nov 9, 2007
    Messages:
    4,202
    Location:
    Somerset UK
    Yes Guru I agree both those points are true.

    All I said was you have to take them into account if you use an SCF.

    Incidentally you need a special op amp to do the buffering so as not to introduce distortion from your equipment.
Similar Threads
Forum Title Date
General Electronics Chat Sine wave from microcontroller Oct 14, 2014
General Electronics Chat Summation of multiple sine wave Aug 12, 2014
General Electronics Chat Sine wave oscillator help Jul 26, 2014
General Electronics Chat Q: How can you verify if an inverter is a pure sine wave inverter? Jul 12, 2014
General Electronics Chat p2p Detection of Sine Wave Jun 16, 2014

Share This Page