Ok, I realize this would be limited by the precision of the tools at hand, but other than eyeballing an FFT, or a spectrum analyzer (I'm not sure how well my Siglent SSA3021 plus is below its rated 9 kHz), could the following method be used for a hobbyists grade result.
So here's my idea.
Use my Arb Gen to create as duplicate as possible a sine wave as the signal under test. Using the meaurements my scope gives me, match freq, phase, and peak to peak voltage.
Invert one of the signals
add them.
What ever remains is distortion, correct? And doing the math should give me the THD as close as my gear (siglent sdg 2042 arb gen, rigol 1054z scope) can do, right?
The trouble with THD measurements is that the audio world likes to quote numbers down in the 10ths of a percent or less, and so your signal generator's sine wave isn't allowed to have much distortion. Also the circuitry that you use to perform the subtraction must be pretty good too. I would personally try to spend my money on a really good digitizer and do all the subtraction of a sine wave in software.
proper THD measurement requires to take into account result for at least 5-10 harmonics.
It's more easy to measure IMD3 (intermodulation distortion from the third order). In order to do that you're needs to put two-tone signal with non multiple frequencies. The standard IMD testing frequencies for audio is a two tone signal with 850 Hz + 2200 Hz. It is often used for SSB equipment testing (it has 2.7 kHz audio bandwidth).
Here is another standard combinations for two tone IMD testing:
and triple tone:
Your “dual channel subtract” will not address the phase difference the amp adds, and will show it as distortion. The phase shift changes by frequency just to complicate things.
A better way is to do a very good FFT (by a 24 bit ADC, 64K points, like a pro external sound I interface) to baseline your oscillator, then FFT the amps output. Subtract the baseline, then eliminate the primary signal from the spectrum. Then IFFT back to time domain, calculate the rms value. It gives you the distortion. Compare it to the primary signal and you have your distortion.
Many articles are on diyaudio
Can't I correct phase in the sig gen? Basicaslly force it to match? (
I should be more specific. I'm not trying to characterize an amplifier. Just an educational experiment in characterizing an oscillator. Not looking for "official" numbers.
The classic way to measure THD for audio signals is to pass the output signal of the DUT through a narrow "notch filter" on the fundamental of the test signal.
Any remaining signal after the fundamental is "nulled out" is the DUT THD plus noise.
You can then measure the noise by removing the test signal & terminating the input of the DUT, then calculate what proportion of the above "distortion" is noise.
In most cases, the noise component is negligible.
Another way used back in the day, was with a Selective Millivoltmeter, tuning to each harmonic in turn, then calculating the THD.
In the method you proposed, why would you "duplicate" the signal?
Why not use the same signal source, with one channel looking at the input & the other the output.
Of course, there will be a delay problem, but it shouldn't be insuperable.
In the method you proposed, why would you "duplicate" the signal?
Why not use the same signal source, with one channel looking at the input & the other the output.
I'm trying to measure the purity of a sine oscillator I'm experimenting with. There is no "input"
My plan is currently thwarted because I can as of yet not find a way to sync my arb gen with the very slightly unstable oscillator output. (can't get the reference and DUT signals to stand still together on tyhe scope).
I have some PLL chips I've always wanted to play with so, I might try locking my oscillator to the siglent that way.
I have seen what you describe done. The reference source is phase locked to the test signal and then the phase and amplitude is minutely adjusted for maximum nulling. Conveniently a phase locked loop allows for adjusting phase to be negative so a phase alignment of zero degrees is possible.
If the THD is high enough the FFT on your Rigol scope may let you see the distortion. If your oscillator frequency is low enough that the fundamental and a handful of harmonics are in the audio range, then a sound card (even the one you already have in your computer) would probably fit the bill; there are free software packages such as REW (room equalization wizard) will plot the spectrum essentially in real time.
jason
As stated by others, use a 24bit sound card and capture the output. I'm sure there are utilities out there to directly measure the distortion of the input fed to a sound card.
I am not confident that using a computer sound card to sample an audio signal will not introduce any number of harmonics or other artifacts. Or it could hide those harmonics that may already be present in the signal. And it WILL add digital noise.
While shortcuts may be OK when measuring the THD in an amplifier where a known good sine wave can be used at the input and then also be available at the measurement point, thus preserving frequency and phase, the same can not so easily be said for checking a sine wave generator.
As stated by others, use a 24bit sound card and capture the output. I'm sure there are utilities out there to directly measure the distortion of the input fed to a sound card.
1kHz@1V phase shift of 1us could give ~0.1% THD error and that would be poor amplifier/generator . for poor amplifier delay could be ~x100
power amplifiers can go down to ~0.001% and OP amps even less
HP33120A ~0.04% for audio range
24bit sound card with high sample rate
I am not confident that using a computer sound card to sample an audio signal will not introduce any number of harmonics or other artifacts. Or it could hide those harmonics that may already be present in the signal. And it WILL add digital noise.
Some sound cards work very well for this measurement. The two problems in my experience are getting an uncorrupted signal into the card through its single ended chassis grounded shared inputs, and knowing which sound cards are suitable.
Here is an old review that gives some examples:
https://web.archive.org/web/20180507221601/http://www.clarisonus.com/Research%20Reports/RR001-SoundCardEval/RR001-PCsoundCards.html
As David Hess mentioned, it is difficult to deliver a clean signal into a computer sound card. I have been using a Focusrite Scarlett Solo and REW software to make measurements.
Differential/balanced input on the sound card can help to get over the signal grounding issue. The better ones all have balanced line and mic level ins.