2
\$\begingroup\$

So when I ask my function generator for 2 MHz, it gives me that with a 19 Hz oscillation. For my application this low-frequency signal is very problematic. I've tried high passing it which does close to nothing (barely attenuates); I've tried assuming it's a power fluctuation and amplifying it to saturation before re-attenuating to the power I need, which caused more problems than it solved; I've tried a few different function generators and they all do this, with the exact low frequency slightly varying (e.g. 15 Hz instead of 19 Hz). There is no similar problem at 100 MHz. This is the function generator with the best specs available to me. This function generator also allows me to modulate output. I'm reading up on modulation now, but in case someone knows this off the top of their head, the supported modulations are AM, FM, PM, ASK, FSK, 3FSK, 4FSK, PSK, BPSK, QPSK, PWM, and OSK: is there any way I can use modulation to get rid of the low frequency in a signal with two frequencies? I know this also might be a silly question depending on what the exact problem with the function generator is, so happy to be educated on that too.

The process of detecting it was that it was coming out on the oscilloscope at the end of my massive combined circuit and I traced it back to just the function generator (along the way thinking maybe it was a mixer, etc, etc): if I put the 2 MHz signal from the function generator directly into the oscilloscope, I see a low-frequency component. I can also definitely see the 2 MHz signal that I am supposed to have. I can see the frequency flatten if I change the 2 MHz to 1.999985 MHz and can get it to a mHz oscillation. The function generator is Rigol DG4162 (but as I said I've tried a few) and the oscilloscope is DS1104.

2MHz from function generator

expected 2MHz oscillation

undesired 19Hz oscillation

\$\endgroup\$
5
  • 2
    \$\begingroup\$ How did you measure and detect the 19Hz oscillation? \$\endgroup\$
    – nanofarad
    Commented Aug 9, 2022 at 15:34
  • 2
    \$\begingroup\$ 19Hz isn't very far from 60Hz which is "everywhere". Possible you're mis-measuring it - Thinking a 60Hz signal is actually 19Hz? That would indicate you need to work on your system grounding. \$\endgroup\$
    – Kyle B
    Commented Aug 9, 2022 at 16:51
  • \$\begingroup\$ You say that in your application this frequency is problematic... Did you see an impact on the application? That could help identify if the effect is real or virtual. \$\endgroup\$
    – crasic
    Commented Aug 9, 2022 at 17:11
  • \$\begingroup\$ This question is good and useful, but - as so many such questions do - it presupposes a solution without identifying the problem first. Yes, modulating the generator would be a very crude fix, but it's unnecessary and not how such measurements should be done. \$\endgroup\$ Commented Aug 9, 2022 at 17:28
  • \$\begingroup\$ "Also, to be clear, I can see the desired 2MHz as well. Added some pictures to the question." - are these both the same signal? The middle photo is too blurry to see the settings. What's the sample rate? \$\endgroup\$ Commented Aug 10, 2022 at 0:56

3 Answers 3

7
\$\begingroup\$

For such measurements done with a sampling oscilloscope, the time base of the scope and of the function generator must be synchronized to a common reference.

In a lab where you deal with precise frequency measurements, you'll need a common 10 MHz reference, with at least two outputs, or a distribution amplifier, and this output is then fed to all the instruments that have a sampling clock of any sort, as well to frequency counters etc.

Typically, such a lab reference is a rubidium or crystal oscillator disciplined by GPS, called a GPSDO for GPS-disciplined oscillator. You don't need that - a simple 10 MHz quartz oscillator will do just fine, with two line drivers on the output. Test equipment typically terminates the 10 MHz reference inputs in 50 ohms, thus the need for the line drivers/output amps. Typically, a lab frequency reference either comes with a distribution amp with multiple outputs, or it feeds its sole output to one.

Scopes costing below $10k probably won't have a 10 MHz frequency reference input. The DS1104Z doesn't, unfortunately, and it doesn't have an AWG either.

But many scopes in that price range, e.g SDS2104X, have an AWG that can generate a 10 MHz sine or square output. This would then be fed to the function generator's reference frequency input. The AWG is usually running from the oscillator that feeds the sampling system, so that works. It certainly works for the SDS2104X and SDG2042X combo.


I haven't looked into clock sources inside of a DS1104Z, but if the SoC and the FPGA run from the same oscillator, then there is a "third option" that could perhaps work:

The USB host's 125us-period "microframe" SOF signal can be detected and converted to a 4kHz square wave. A 10MHz square wave generator could be phase-locked to this 4kHz reference, and used to feed the AWG's clock reference input. This will have more jitter, so the demodulated waveform you'll observe will be more noisy than what you have seen so far, but it'd work.

Detecting the SOF and outputting it as a square wave can be done with a small FPGA, or a microcontroller with a USB device peripheral.


You're massively undersampling the signal - both scope screenshots you show are sampled at 100 kHz. That's fine: you're using Nyquist sampling - a valid technique to demodulate low-frequency drift of frequency sources. As long as valid metrological techniques are used!

What you're observing is the beating of the oscilloscope's reference oscillator with the generator's reference oscillator. Or, more directly: the signal you observe is the relative phase between the generator's sampling clock and the oscilloscope's sampling clock.

You will see such waveforms no matter what kind of a generator you're using - as long as the generator and the scope's time bases are not mutually phase-locked, or locked to a common reference.

You'd see it using a purely analog function generator - it would likely be much worse, since simple analog function generators aren't super stable in frequency - certainly much less stable than a crystal oscillator.

If you used a (RF) signal generator that phase-locks the output frequency to a reference, and fed the reference to the scope for use as the sampling clock reference, then you'd see the flat line you expect. But you're not using a signal generator, but a function/waveform generator, a digital one - since its output is inherently sampled, there is a sampling clock involved, and as long as you get that clock in sync with the scope's clock, you're good.

Now, if your scope does not have a 10 MHz clock reference input, you're somewhat out of luck, unless you'd feel comfortable opening the scope, disconnecting the oscillator used for the sampler, and feeding the same frequency from an external generator phase-locked to a 10 MHz reference shared with the ARB/AWG you're using. Any competent AWG will have a 10 MHz external frequency reference input. You could also have a little adapter board with a frequency divider that would scale down the sampling clock oscillator's output down to 10MHz, and this would be fed to the AWG's frequency reference input.

If the scope and the AWG offer no clock reference inputs, then not all is lost. If this was done in a professional setting, you'd just get a better scope and AWG, since without clock reference such tools are not very versatile, as you've found out.

You'd have to modify the AWG and the scope to buffer and bring out their sampling clocks to an external connector. You'd then use an external phase detector with analog output to generate a phase difference signal. That signal would be passed back to the AWG's modulation input, with Phase Modulation selected. The phase signal would require appropriate scaling/offsetting to match the imperfect inputs on the ARB, and you'd get artifacts each time the phase wrapped around.

This is the "modulation hack" you were originally proposing. It's not practical.

\$\endgroup\$
3
\$\begingroup\$

Your oscilloscope is aliasing the waveform due to it having a limited sampling rate when looking for low frequency perturbations.

I've tried a few different function generators and they all do this, with the exact low frequency slightly varying (eg 15Hz instead of 19Hz)

Do you really think that they are all having the same problem or, possibly you are expecting too-much from your oscilloscope.

Tektronix - what is aliasing

\$\endgroup\$
4
  • \$\begingroup\$ For some reason my oscilloscope won't let me directly control sampling rate, but I tried turning anti-aliasing on - no dice. How else could I test this? Also, to be clear, I can see the desired 2MHz as well. Added some pictures to the question. \$\endgroup\$
    – qmstatmech
    Commented Aug 9, 2022 at 16:11
  • 2
    \$\begingroup\$ If these low frequencies are caused by aliasing (I will almost always bet on Andy), then change one of the frequencies as a test. You can't finely adjust the scope sample rate, but you can change your input. Change it to 2000100 Hz for example, and see what happens. \$\endgroup\$
    – Mattman944
    Commented Aug 9, 2022 at 16:34
  • 1
    \$\begingroup\$ I'm convinced the "auto-set" button causes your EUT to explode, I've never pushed it! \$\endgroup\$
    – crasic
    Commented Aug 9, 2022 at 17:14
  • \$\begingroup\$ Your oscilloscope is aliasing the waveform due to it having a limited sampling rate when looking for low frequency perturbations. Such aliasing is a common demodulation technique, also called Nyquist sampling. As long as the input bandwidth is sufficient, of course - and here, that's not a problem, the scope is plenty wideband. Naturally, it only works when the signal source and demodulator share a common frequency reference. What we see on the scope is just the phase drift of the scope vs. the generator. Much to be expected, I think. \$\endgroup\$ Commented Aug 9, 2022 at 17:16
0
\$\begingroup\$

What is the model # of your generator?

Show a scope show of the modulation. How did you detect the 19 Hz component?

If it is actually modulation (e.g. AM or FM), then you won't be able to filter it because the unwanted components are very close to the 2 MHz carrier.

If it is just additive noise (very unlikely), it could be filtered. More likely it is an artifact of the frequency synthesizer in a low cost function generator and is not removable.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Hint: How likely is it that two free-running crystal oscillators in two separate pieces of equipment will track with a phase error rate better than 360*19 degrees/second? Well aged, stable, ovenized oscillators probably would. You don't get those in a typical scope or an AWG. Not even in expensive scopes, because it's kinda pointless. You'd feed every piece of equipment in the lab with a 10MHz reference from a distribution amp from your lab reference - a quartz or rubidium GPSDO most often, or cesium if you can afford it :) \$\endgroup\$ Commented Aug 9, 2022 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.