Rigol scope FFT

Jan 18, 2019 16 Replies

We have a thing that generates DDS sine waves, audio kind of range, and we want to production test all 12 channels. We figure we might measure distortion too. The question is how good a Rigol scope is as a distortion analyzer.



So I bandpass filtered my B+K function generator and made a pretty good sine wave. The reported scope 2nd and 3rd harmonics are down about 56 dB or so, plenty good enough.



formatting link



formatting link



formatting link



My guys will actually slurp out the waveforms and do the FFTs in Python. We could do lots of points. Scopes do mediocre FFTs, but it looks like the basic Rigol acquisition is pretty good.



John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

My cheap Rigol (at home) does a kinda crappy FFT.. mostly on the high frequency end. (There is some HF crud leaking in or something.)

Averaging a little can help some. Here's the (256) avg of a 2 kHz sine wave. (Wien bridge osc.)

formatting link

That's not bad. When I look at this on a 'real' FFT I get that the

3rd harmonics is down about 90 dB.

George H.

So for this FFT I had the sine wave filling the 8 bit screen and lot's of wiggles... (I was going to say near Nyquist but I don't know the record length.) But still I was thinking the noise is down 100dB! (if you believe it.) How is that possible w/ 8 bits? This says it has a million point memory depth.

formatting link
(big pdf) I don't know how much is used in the FFT. But just for fun numbers, lets say I had ten points per sine wave and 100k pts. Then I'd be averaging 10^4 sine waves, which would give a 10^2 improvement. (I think that's right... )

George H.

An ideal N-bit digitizer produces total RMS noise of 1/sqrt(12) LSB. That's spread out over the whole Nyquist interval, so the noise floor is

sqrt(PSD) = 1/sqrt(12) * 2**-N/sqrt(0.5*f_sample) * V_FS.

(This assumes that the signal is at least a few LSBs in size, so that Widrow's theorem applies--a noiseless digitizer with no input signal produces a constant output.)

Thus you get lower noise by sampling faster. A 10 MS/s 8-bit digitizer with a 1V full-scale range (e.g. -0.5V to 0/5V) has a theoretical noise floor of 0.5 uV/sqrt(Hz). For AC signals, you lose a factor of 8 in the SNR due to having to fit the p-p swing of the sine wave into the FSR, so the maximum dynamic range of the above digitizer is

CNRmax = 1/8 V**2 / (0.5 uV) **2 = -117 dBc per hertz.

The longer you make your data run, the narrower the frequency bins get, and so the lower your noise floor. Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

It is almost certainly from aliasing of the frequencies that represent the sharp step discontinuity between the start and end of the buffer in the time domain.

Classic FFT assumes periodic repetition of the sampled waveform at the buffer length whereas some variants (eg. Jodrell Banks) are closer to a JPEG DCT and do reflection symmetry at the buffers end.

raw data 1 2 3 4

normal FFT implied waveform: ... 1 2 3 4 1 2 3 4 1 2 3 4 ... JPEG DCT FFT variant waveform: ... 1 2 3 4 4 3 2 1 1 2 3 4 ...

Removing the step discontinuity helps to keep artefacts under control.

Depends what you mean by a real FFT. If you use a long enough buffer then the effect of the boundary discontinuity can be made arbitrarily small. Most practical implementations soften it with a window function.

Regards, Martin Brown

I had it selected for a Hamming(sp) window. That rolls of the edge effect.

Right- Hamming windw George H.

Kee-chunk. (sound of a big load hitting ground) Thanks Phil! It's going to take me a while to unpack all that. I did notice that my scope shot says the FFT resolution is

7.63 Hz. (10 kHz span.) ~1200 bins. But I still don't know the record length (in the time domain).

Is my quick and fast approximation about right?

8 bits 256 ~54 dB, and averaging 10k sine waves gives me 100 40 dB.. close enough

I'm going to have to play some more with my scope.

George H.

Since we only need to measure THD at one frequency, I could make a little notch LC filter in a Pomona box and knock down the fundamental

20 dB or so.
John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

But leaves some numerical artefacts at the ~ -50dB level. If the scope offers it and you have plenty of data periods in the buffer then Hann, Blackman, Nuttall or Blackman-Nuttall windows will do a better job of suppressing artefacts of the FFT method being used. See:

formatting link

As ever you trade peak width resolution for suppression of unwanted artefacts.

I suspect your results are due to the choice of windowing function.

Regards, Martin Brown

Huh, OK thanks. I didn't realize the window choice effected the base line that much.

I'll try some other windows, and post results.

George H.

Or you could do it right and use an HP 339A. ;)

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

Did that even have an interface?

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Sure. Really nice knobs and meters. I got one for super cheap but have never used it for anything real.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
[about FFT artifacts]

My preference (if you have enough cycles captured) would be a (1 - cos(2pi * n/N)) window; it only broadens a sharp frequency peak by a couple of channels, and it zeros at the step/edge that's causing the trouble.

The scope has some sort of (probably jfet?) hi-z low-c input amp, and overload protection diodes, ahead of a (probably overclocked) pair of interleaved ADCs, so the analog nonlinearity may be what I'm seeing.

John Larkin Highland Technology, Inc lunatic fringe electronics

I was playing with the keysight FFT. When I used the voltage fine control on the gain input, the third harmonic jumped by ~20dB. (best to use an upstream pot.)

George H.

Am 20.01.19 um 00:47 schrieb John Larkin:

hello,

for distortion measurements i used a passive double-T-Filter with 1 % components and you can get about 40 dB supression. When you use selected (paired) components for the filter (or 0.1%) you could reach more then

50 % supression.

For more precise measurements i used a double-T-Filter plus Buffer opamp and a tunable passive LC-notch in series and the resultant supression was about 90 dB.

You can use a soundcard with baudline under Linux for THD measurement. You can measure THD near 100 dB.

formatting link
formatting link

Bernd Mayer

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required