use your Rigol DS1052E to measure distortion? - Page 1
Forum section: electronics / general

author: slburris
author_rank: Frequent Contributor
timestamp: July 12, 2010, 08:13:22 pm
content: I'm working on calibrating a newly repaired WaveTek 275 function generator.Internally, it produces triangle waves and shapes them into sine waves, usinga variety of circuits to make the sine waves "clean".The calibration procedure calls for a distortion analyzer and in spite of mypredilection for getting odd test equipment off of Ebay, this is something Idon't have.Since the procedure requires looking at sine waves to 100Khz, I was thinkingI could just feed it to my Rigol scope and turn on the FFT. Then do theadjustments looking for the best display with the fewest spurs.Crackpot idea?Does the 1502E have enough resolution to make a half-way decentdistortion analyzer?Failing that, I may just skip that part of calibration and hope that it'sgood enough.Scott

author: Unknown
author_rank: Unknown
timestamp: July 12, 2010, 10:03:41 pm
content: Not really half-way decent (which would be something like .01% distortion), but most function generators don't produce sines with half-way decent distortion either, so it might just work, not sure what the distortion specs are? I believe I verified something for harmonics below -55dB, but it was on a different scope. Hook it up, set the scope to FFT and check if the harmonics are significantly above the noise floor. If they are, you can adjust for lowest harmonic amplitude. If it's hard to see, I would just leave it, if it's reasonably close, no point in risking making it worse. Note that THD is based on the sum of squares of the amplitudes of the harmonics.

author: slburris
author_rank: Frequent Contributor
timestamp: July 12, 2010, 10:10:46 pm
content: Looking at the manual:Sine Distortion (THD at 5Vp-p)< 0.5% 10mHz to 99.9kHz (yes, that's millihertz)No harmonics above- 40 dBc 100Khz to 999kHz- 30 dBc 1Mhz to 12MhzScott

author: saturation
author_rank: Super Contributor
timestamp: July 12, 2010, 10:58:07 pm
content: There's a discussion on this on a thread on spectrum analyzershttps://www.eevblog.com/forum/index.php?topic=525.0https://www.eevblog.com/forum/index.php?topic=653.0Since the Rigol has an 8 bit ADC, the maximum resolution is 1/256. That likewise is the maximum the FFT can measure. It should detect the amplitude of harmonics >= 0.4% but it wouldn't be able to measure values lower than that.

author: Unknown
author_rank: Unknown
timestamp: July 12, 2010, 11:14:31 pm
content: -40dBc should be detectable I think, <0.5% probably not. Noise is likely to limit dynamic range even more than the vertical resolution would suggest, the effective number of bits of the system is likely significantly less than 8.

author: DJPhil
author_rank: Frequent Contributor
timestamp: July 12, 2010, 11:18:17 pm
content: Check out thedistortion analyzer projecton Rod Elliot's audio projects page. He's got a bunch ofaudio test equipment buildsprojects with the details to go with them.The circuit itself may not be very useful at high frequencies, but it's a start. He's got a good discussion of theory in that project that really explained to me what was happening in a dedicated distortion analyzer.Hope that helps some.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 13, 2010, 01:06:35 am
content: Quote from: saturation on July 12, 2010, 10:58:07 pmAt lower frequencies, there's a trick called "decimation" that increases SNR at the expense of bandwidth. Not sure if the Rigol does that, but I wouldn't be surprised given that it has a fast CPU.One thing you could do is build a highpass filter set to just below twice the test frequency. Then you can examine for harmonics and minimize them.

author: EEVblog
author_rank: Unknown
timestamp: July 13, 2010, 02:30:50 am
content: Quote from: NiHaoMike on July 13, 2010, 01:06:35 amYes, that's a common technique.It might be possible to use the Rigol's digital high pass filter to knock out the signal and then gain it up to get a better look at the harmonics, but I haven't tried it.On an analog scopes, you can actually *see* the distortion under 1% if you know what you are looking for. Lower if you have a grey beard and stroke it and have your tongue at the correct angleDave.

author: DJPhil
author_rank: Frequent Contributor
timestamp: July 13, 2010, 04:17:00 am
content: Quote from: EEVblog on July 13, 2010, 02:30:50 amI immediately took that as a Robert Pease reference, as I am working my way throughTroubleshooting Analog Circuitsat the moment. His temperament is almost exactly that of my grandfather, from whom I inherited all my technical leanings. A man after my own heart indeed!I strongly recommend the book. I've only been through about two dozen electronics books so far, but this one is #2 right behind AoE for me and I'm only half done!

author: Unknown
author_rank: Unknown
timestamp: July 13, 2010, 04:28:20 am
content: Quote from: EEVblog on July 13, 2010, 02:30:50 amI doubt it, since the limiting factor is ADC dynamic range / noise.For analog high pass/notch filters, you need a pretty sharp cut-off (Rod Elliot discusses this), multiple poles or active filters are probably needed. They're probably the best cheap solution, but you do need to tune it to the output frequency pretty accurately (less so for high pass filters, but they only work if you're just interested in harmonic distortion), and the output frequency may not be that stable for a function generator.

author: saturation
author_rank: Super Contributor
timestamp: July 13, 2010, 12:17:18 pm
content: Its a fast enough test to see if the Rigol can discern the harmonics at 100kHz, why not slburris give it a whirl on the Rigol and send us a pic?Quote from: alm on July 13, 2010, 04:28:20 am

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 13, 2010, 01:37:05 pm
content: Quote from: alm on July 13, 2010, 04:28:20 amSwitched capacitor filters like the Maxim MAX264 allow you to build a filter that can be tuned by adjusting the clock frequency.

author: jahonen
author_rank: Super Contributor
timestamp: July 13, 2010, 08:11:53 pm
content: I'm not sure if this has effect on the Rigol, but on Agilent MSO6034 you get quite an improvement on the FFT noise floor (about 20 dB) when using trace averaging. That is also worth trying.Regards,Janne

author: Unknown
author_rank: Unknown
timestamp: July 13, 2010, 08:40:42 pm
content: Quote from: saturation on July 13, 2010, 12:17:18 pmI agree that the first test should be to see if the scope can see the harmonics directly, that's an easy test and was also my first suggestion. It's just that I didn't think any digital high-pass/notch filter would do much good, but of course no harm in trying.Quote from: NiHaoMike on July 13, 2010, 01:37:05 pmThe MAX264 sounds like a neat solution, although probably not good enough for low-distortion signals (eg. any halfway-decent audio amplifier), it should be fine for this application. The $14 or so each might be more than Scott is willing to spend, not to mention availability.Quote from: jahonen on July 13, 2010, 08:11:53 pmAveraging should work, as long as you're only after harmonics, and not something like SINAD. It will improve the noise floor, but not the dynamic range (at least not on cheap scopes). Even with 8.00 bits ENOB, the best you're going to get is -48dB (.4%).

author: slburris
author_rank: Frequent Contributor
timestamp: July 15, 2010, 03:30:11 am
content: I haven't yet tried the DS1052E yet on the distortion test because I'm stuckseveral steps before that in the calibration trying tocalibrate the 10 millihertz to 10 hertz range. The WaveTek 275uses current sources to charge and discharge capacitors to form atriangle wave. For most of the frequencies up to 12 Mhz, that's doneby selecting different capacitors and varying the charge current.Below 10 Hz though, it's done with what they call a capacitancemultiplier circuit. Looks like that selectively bleeds some of the charging currentto extend the time period. However, the potentiometers to adjust thiswon't let me get to the frequencies the manual says. So somethingmust be wrong in the multiplier. Having to read the manual nowto figure out how this circuit works.One I get past these low frequency alignments, I'll start trying the distortiontests.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: July 16, 2010, 09:08:14 pm
content: I've gotten past the calibration problems -- helps to be adjustingthe correct potentiometer!Attached is a capture of the FFT from my Rigol doing thedistortion adjustment. Hmm, do I believe it?Maybe I'll just leave well enough alone and carry on.Scott

author: saturation
author_rank: Super Contributor
timestamp: July 16, 2010, 10:51:30 pm
content: Looks good to me, slburris. Just to confirm your read push out a square wave at the same frequency, it should have a clearly defined set of harmonics diminishing at a mathematically predicted rate, i.e., the sinewave with a frequency 11 times the fundamental will have an amplitude of 1/11th the fundamental. So it could show you the limits of its resolution.

author: slburris
author_rank: Frequent Contributor
timestamp: July 16, 2010, 10:57:51 pm
content: Yes, if I feed my scope a square wave, the FFT shows a dropoff at each harmonic.Scott

author: Unknown
author_rank: Unknown
timestamp: July 17, 2010, 05:03:18 am
content: The fundamental looks way too low to me to show any harmonics, you should set the vertical scale to dB, and adjust vertical settings and amplitude so the fundamental is as large as possible (without clipping), to maximize dynamic range. Adjust window for best amplitude accuracy. If the fundamental is 5Vpp, the harmonics should be below 50mV (-40dB) for 100kHz plus, and even less for lower frequencies. You should probably decrease the horizontal scale of the FFT (don't have a Rigol, but I'd expect that you have to increase the timebase setting), since you're mainly interested in the first few harmonics.